/*
set scripts
*/

$(document).ready(function(){
	
	//Examples of how to assign the ColorBox event to elements
	$('a#colorBox').colorbox();
	$("a#colorBox.modalLink").colorbox({width:"50%", inline:true });
	$('a#colorBoxVid').colorbox({iframe:true, innerWidth:640, innerHeight:385, href:function(){ return this.href.replace('watch?v=', 'v/'); }});
	
	//Hide the tooglebox when page load
	$("#featuresToggle").hide(); 
	//slide up and down when hover over item
	$("#featuresBox #feature").hoverIntent(function(){
		$(this).find("img#featureArrow").attr("src","imgs/img-arrow-2.png");
		$("#featuresToggle", this).slideDown("slow");
		//$(this).next("#featuresToggle").slideDown("slow");
			}, function() {
			$("#featuresToggle", this).slideUp("slow");
			//$(this).next("#featuresToggle").slideUp("slow");
			$(this).find("img#featureArrow").attr("src","imgs/img-arrow-1.png");
		return false; //prevent link anchor
	});
	//Hide the tooglebox (all) when clicked
	$("#featuresBox #feature a#closeLink").click(function(){
		$(this).parent().parent().parent().slideUp("slow");
		$(this).prev("img#featureArrow").attr("src","imgs/img-arrow-1.png");
		return false; //prevent link anchor
	});
	
	//sets localScroll for anchors
	//$.localScroll({ duration: 888 });

});



