/*
set scripts
*/

$(document).ready(function(){
				
	//Examples of how to assign the ColorBox event to elements
	$('a#colorBox').colorbox();
	$('a#colorBoxVid').colorbox({iframe:true, innerWidth:640, innerHeight:385, href:function(){ return this.href.replace('watch?v=', 'v/'); }}); 
	$('#colorBoxVid').colorbox({iframe:true, innerWidth:640, innerHeight:385, href:function(){ return this.href.replace('watch?v=', 'v/'); }}); 
	
	//set superfish menu
	$('ul.sf-menu').superfish({ 
            delay:       1000,                            // one second delay on mouseout 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            speed:       'fast',                          // faster animation speed 
            autoArrows:  false,                           // disable generation of arrow mark-up 
            dropShadows: true                            // disable drop shadows 
    }); 
	
	//set showhide
	$('#showhidePrivacy').hide();
	$('#showhideLegal').hide();

	$('#togPrivacy').click(function(){
		$('#showhidePrivacy').toggle();
	});
	$('#togLegal').click(function(){
		$('#showhideLegal').toggle();
	});
	
	$('#showhideReturnPolicy').hide();
	$('#showhideShippingPolicy').hide();

	$('#togReturnPolicy').click(function(){
		$('#showhideReturnPolicy').toggle();
		$('#showhideShippingPolicy').hide();
	});
	$('#togShippingPolicy').click(function(){
		$('#showhideShippingPolicy').toggle();
		$('#showhideReturnPolicy').hide();
	});
	
	//sets localScroll for anchors
	$.localScroll();
	
	//SlidingBoxes
				//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
				//Full Caption Sliding (Hidden to Visible)
				$('.boxgrid.captionfull').hover(function(){
					$(".cover", this).stop().animate({top:'120px'}, 111, "easeOutSine");
				}, function() {
					$(".cover", this).stop().animate({top:'128px'}, 222, "easeOutSine");
				});
				$('.boxgrid2.captionfull').hover(function(){
					$(".cover", this).stop().animate({top:'120px'}, 111, "easeOutSine");
				}, function() {
					$(".cover", this).stop().animate({top:'128px'}, 222, "easeOutSine");
				});
				
				
				$(".boxgrid").click(function(){
					window.location=$(this).find("a").attr("href"); return false;
				});
	
});

