$(document).ready(function() {

	/* input text hint
	/*-------------------------------------------------------------------------------*/
	$("input.login_hint").ezpz_hint();	


	/* brand carousel
	/*-------------------------------------------------------------------------------*/
	$(function(){	
		$('.brandArrowRight').click(function(){
			var carousel = $(this).parents('#brandCarousel').find('ul');
			var scroll = carousel.scrollLeft();
			var x = 0;
			carousel.find('li').each(function(){
				if (x==0&&$(this).position().left>1) x = $(this).position().left;
	        });		
			carousel.animate({ scrollLeft: scroll+x }, 'fast');			
			return false;
		});
		$('.brandArrowLeft').click(function(){
			var carousel = $(this).parents('#brandCarousel').find('ul');
			var scroll = carousel.scrollLeft();
			var x = 0;
			carousel.find('li').each(function(){
				if ($(this).position().left<0) x = $(this).position().left;
			});
			carousel.animate({ scrollLeft: scroll+x }, 'fast');			
			return false;
		});
	});


	/* standard carousel
	/*-------------------------------------------------------------------------------*/
	$(function() {
	    $("#ppcGallery").jCarouselLite({
	        btnNext: ".arrowRight",
	        btnPrev: ".arrowLeft",
	        visible: 1
	    });
	});


	/* hero gallery
	/*-------------------------------------------------------------------------------*/
	$("#heroCarousel").tinycarousel({ pager: true, animation: false, interval: true });
	

	/* fancybox modal
	/*-------------------------------------------------------------------------------*/			
	if ($("#ppcModal").length > 0)
	{
		$("#ppcModal").fancybox({
			'padding'			: 0,
			'autoScale'			: true,
			'transitionOut'		: 'elastic',
			'autoDimensions'	: false,
			'width'         	: 560,
			'height'        	: 380
		});	
	}
});


/* flash
/*-------------------------------------------------------------------------------*/

swfobject.embedSWF("video/landing/screencast-employee-landing.swf", "ppcLanding", "384", "260", "10.0.0", "flash/expressInstall.swf");


