/* jQuery Sitewide Stuff */
    $(window).load(function() {
      $('#slider').nivoSlider(
        {
          effect:'sliceDownLeft',
          captionOpacity: 0.4,
          animSpeed:600, //Slide transition speed
          pauseTime:5500
        });
    });  

	$(document).ready(function() {
	  
	  // New Promo Ticker
	  $('#js-news').ticker({
			speed: 0.10,
			displayType: 'fade',
			fadeInSpeed: 600,
			fadeOutSpeed: 600,
			controls: false,
			pauseOnItems: 5500,
			titleText: ''
		});
	  
	  // Hidden shipping details in shop
		$('.free-shipping a').click(function() {
	    $('.shipping-details').show();
	    return false;
	  });
	  
	  $('a.checkout-shipping-more').click(function() {
	    $('p.checkout-shipping-more').show();
	    return false;
	  });
	  
	  	$(".store_tab_content").hide(); 
      	$("ul.store_tabs li:first").addClass("active").show();
      	$(".store_tab_content:first").show();

      	$("ul.store_tabs li").click(function() {
      		$("ul.store_tabs li").removeClass("active"); 
      		$(this).addClass("active"); 
      		$(".store_tab_content").hide();
      		var activeTab = $(this).find("a").attr("href");
      		$(activeTab).fadeIn(); 
      		return false;
      	});
		
		// Handles the large and small video layer window using colorbox (http://colorpowered.com/colorbox/)
		$('a.video-large').colorbox({transition:'elastic', speed:500, width:570, height:610, iframe: true});
		$('a.video').colorbox({transition:'elastic', speed:500, width:415, height:520, iframe: true});
		
		// Handles the attachment enlarging in the forum
		$('a.attachment').colorbox({photo:true, transition:'elastic', speed:500});
		
		// Handles the attachment enlarging in the shop
		$('a.product-enlarge').colorbox({photo:true, transition:'elastic', speed:500});
		
		// Hides the videos and forum subnavs
		$('#Layer1').hide();
		$('#Layer2').hide();
		
		// Shows the video subnav
		$('li a.videos').hover(function() {
			$('#Layer1').slideDown('fast')
			return false;
		});
		
		// Hide video subnav when it's not active
		$('ul.tabs.khtabs li a:not(.videos)').mouseover(function() {
			$('#Layer1').slideUp('fast');
		});
		
		// Shows the forum subnav
		$('li a.community').hover(function() {
			$('#Layer2').slideDown('fast')
			return false;
		});
		
		// Hide forum subnav when it's not active
		$('ul.tabs.khtabs li a:not(.community)').mouseover(function() {
			$('#Layer2').slideUp('fast');
		});
		
	});
	
