//set up the content flow object
var GuruNewFlow = new ContentFlow( 'xt5kFlow', { 
		reflectionHeight: 0 ,
		visibleItems: 3,
		relativeItemPosition: 'center center',
		scrollWheelSpeed: 0,
		onclickActiveItem: function(){ return; }
	});

$(document).ready(function(){

	//alert('herro!');
	
	subFooterGradientPosition();

	footerContactLinkPosition();
	
	appendPtr();
	
	$('#xt5kFlow a').live('click', function(e){
		//alert('herro!');
		e.preventDefault();
		return false;
	});
	
	$('#xt5kFlow a').lightBox();
	//had to copy images folder to root directory of website....  there is also a copy in the j folder in the theme
	
	
});

$(window).resize(function(){

	subFooterGradientPosition();
	footerContactLinkPosition();
});



function appendPtr(){

	var menuA = $('.menu-header li.menu-item a');
	
	menuA.each(function(){
		$(this).append( '<div class="ptr"></div>' );
	});
	
}

function subFooterGradientPosition(){
	var grad	= $('section#sub-footer .radialgradient'),
		wind	= $(window),
		gradW	= grad.width(),
		windW	= wind.width(),
		pLeft	= (windW - gradW) / 2;
	
	grad.css({ left : pLeft });
}

function footerContactLinkPosition(){
	var uls		= $('#foot-left ul'),
		aLeft	= uls.last().offset().left;
			
	$('a#foot-contact').css({ left : aLeft });

}
