// JavaScript Document
jQuery(function($){
    $("#wheretostayeat img").css("width", "150px");
    setTimeout(function(){
        $("ul#ticker01").css('visibility', 'visible');
    }, 2000);
    $("ul#ticker01").liScroll({
        travelocity: 0.05
    });
    //if ($.browser.msie) {
          //$('#box1').boxShadow( 2, 2, 2, "#888");
    //} 
    $(document).pngFix();
    if (window.location == "http://gamedayusssa.isinproduction.com" || window.location == "http://gamedayusssa.isinproduction.com/") {
        $('#item1 a').addClass('p7PMmark');
    }
    
    $(".tab_content").hide(); //Hide all content
    $("ul.tabs1 li:first").addClass("active").show(); //Activate first tab
    $(".tab_content:first").show(); //Show first tab content
    //On Click Event
    $("ul.tabs1 li").click(function(){
        $("ul.tabs1 li").removeClass("active"); //Remove any "active" class
        $(this).addClass("active"); //Add "active" class to selected tab
        $(".tab_content").hide(); //Hide all tab content
        var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
        $(activeTab).fadeIn(); //Fade in the active ID content
        return false;
    });
});
function slideSwitch(){
    var $active = $('#slideshow IMG.active');
    
    if ($active.length == 0) 
        $active = $('#slideshow IMG:last');
    
    // use this to pull the images in the order they appear in the markup
    var $next = $active.next().length ? $active.next() : $('#slideshow IMG:first');
    
    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );
    
    
    $active.addClass('last-active');
    
    $next.css({
        opacity: 0.0
    }).addClass('active').animate({
        opacity: 1.0
    }, 1000, function(){
        $active.removeClass('active last-active');
    });
}

jQuery(function(){
    setInterval("slideSwitch()", 9000);
	MM_preloadImages('/images/rotator_images/ad4.png');
});

function MM_preloadImages(){ //v3.0
    var d = document;
    if (d.images) {
        if (!d.MM_p) 
            d.MM_p = new Array();
        var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
        for (i = 0; i < a.length; i++) 
            if (a[i].indexOf("#") != 0) {
                d.MM_p[j] = new Image;
                d.MM_p[j++].src = a[i];
            }
    }
}
