$(document).ready(function() {     

    $(window).load(function() {
    	$('#slider').nivoSlider({
    		effect:'random', //Specify sets like: 'fold,fade,sliceDown'
    		slices:15,
    		animSpeed:500,
    		pauseTime:3000,
    		startSlide:0, //Set starting Slide (0 index)
    		directionNav:false, //Next & Prev
    		directionNavHide:false, //Only show on hover
    		controlNav:false, //1,2,3...
    		controlNavThumbs:false, //Use thumbnails for Control Nav
          controlNavThumbsFromRel:false, //Use image rel for thumbs
    		controlNavThumbsSearch: '.jpg', //Replace this with...
    		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
    		keyboardNav:true, //Use left & right arrows
    		pauseOnHover:true, //Stop animation while hovering
    		manualAdvance:false, //Force manual transitions
    		captionOpacity:0.8, //Universal caption opacity
    		beforeChange: function(){},
    		afterChange: function(){},
    		slideshowEnd: function(){} //Triggers after all slides have been shown
    	});
    });


	$("#licensees_content #right h4").click(function(){
			$(this).next().slideToggle(400);
		return false;
	});	
	
    $("#licensees_content #right h4").toggle(function() {
         $(this).removeClass("inactive").addClass("active");
    }, function (){
         $(this).removeClass("active").addClass("inactive");
    })	
    
    $("a.credits").click(function(){
		$("#credits").fadeIn(500);	
		return false;
	});	
	
	$("#credits_content .close_button").click(function(){
		$("#credits").fadeOut(500);	
		return false;
	});	
	
    $(".nav_item.welcome").hover(function(){
		$(".nav_tooltip.welcome").fadeIn(300);	
	}, function(){
        $(".nav_tooltip.welcome").fadeOut(100);	
    });	
    
    $(".nav_item.aboutus").hover(function(){
		$(".nav_tooltip.aboutus").fadeIn(300);	
	}, function(){
        $(".nav_tooltip.aboutus").fadeOut(100);	
    });	
    
    $(".nav_item.advertisers").hover(function(){
		$(".nav_tooltip.advertisers").fadeIn(300);	
	}, function(){
        $(".nav_tooltip.advertisers").fadeOut(100);	
    });	
    
    $(".nav_item.distribution").hover(function(){
		$(".nav_tooltip.distribution").fadeIn(300);	
	}, function(){
        $(".nav_tooltip.distribution").fadeOut(100);	
    });	
    
    $(".nav_item.licensees").hover(function(){
		$(".nav_tooltip.licensees").fadeIn(300);	
	}, function(){
        $(".nav_tooltip.licensees").fadeOut(100);	
    });	
    
    $(".nav_item.links").hover(function(){
		$(".nav_tooltip.links").fadeIn(300);	
	}, function(){
        $(".nav_tooltip.links").fadeOut(100);	
    });	
    
    $(".nav_item.contactus").hover(function(){
		$(".nav_tooltip.contactus").fadeIn(300);	
	}, function(){
        $(".nav_tooltip.contactus").fadeOut(100);	
    });	
    
    	
	
});

