/*
set scripts
*/

$(document).ready(function(){
	
	// sets Superfish
	$('ul.sf-menu').superfish({ 
		animation: {height:'show'},   	// slide-down effect without fade-in 
		delay: 800,             		// 2 second delay on mouseout 
		autoArrows: false           	// disable generation of arrow mark-up 
	});
	
	// sets link classes with target attribute
	//$("a[@href$=pdf]")
	//	.addClass("pdfLink");
	//	.attr({ target: "_blank" });
	//
	//$("a:not([@href*=http://])").not("[href^=#]")
	//	.addClass("externalLink")
	//	.attr({ target: "_blank" });
		
	//hides all class togBox
	$('[class^=togBox]').hide();

	//shows togBox for same info class
	$('[class^=info]').click(function() {
		var $this = $(this);
		var x = $this.attr("className");
		$('.togBox-' + x).toggle();
		return false;
	});
	
	//hides all propBox class and shows same propBox for same info class
	//$('[class^=info]').click(function() {
	//	$('[class^=propBox]').hide();
	//	var $this = $(this);
	//	var x = $this.attr("className");
	//	$('.propBox-' + x).show();
	//	return false;
	//});
	
    //sets galleryNav lightBox
    $('#galleryNav a').lightBox();
	
	//hide li after the 1st
	$("#galleryNav li:gt(0)").hide();
	
	//sets localScroll for anchors
	$.localScroll();
	
	//sets cycle slideshow
	//$('#slideshow-team').cycle({ 
    //	fx: 'scrollHorz', 
    //	timeout: 4000 
 	//});
	
	//simplyScroll
	$("#scroller").simplyScroll({
		autoMode: 'loop',
		frameRate: 42,
		speed: 1
	});
	
	//$("#scrollBox").simplyScroll({
	//	horizontal: false,
	//	autoMode: 'loop',
	//	frameRate: 42,
	//	speed: 1
	//});
	
	//makes pressBox div clickable to h2 a link
	$("#pressBox").click(function() {  
		window.location = $(this).find("h2:first a:first").attr("href");  
	});
	
});


