
	/*set variables*/
	var checkMovement = 1;
	
	$(document).ready(function(){ 
		setupAnimation();
		loadIframe();
		$('.sheenSearch').keypress(doSeachOnEnter);
	});
	
	function doSeachOnEnter(e)
	{
		if((e = e || window.event).keyCode == 13)
		{
					doSearchies();
		}
		return (e.keyCode != 13);
	}

	
	$(window).load(function(){ 
		setupAnimation();		
		moveImages();		
	});
	
	$(window).resize(function() {
		setupAnimation();
	});
	
	
	
	/*make sure the animation sits in the center of the page*/
	function setupAnimation() {
		var bannerWidth = 0;		
		
		/*set the banner holder to the right width*/
		$('.scrollingImages img').each(function(index) {
			bannerWidth = bannerWidth + $(this).width() + 16;
		  });
		
		var positionX = (($(window).width() / 2) - (bannerWidth / 2));
		
		
		$(".mainholder").css( {"width": $(window).width()});
		$(".gradient").css( {"top": $(".bannerHolder").position().top });
		/*Show the animation after everything has initialised*/
		$(".bannerHolder").show();
		
		
	}
	
	function moveImages() {
		var movement = $(".scrollingImages").position().left;
		t=setTimeout("moveImages()",15);
		$(".scrollingImages").css( {"left":movement - 1});
		
		checkMovement++;
		
		if (checkMovement == 250) {			
			$(".scrollingImages").css( {"left":$(".scrollingImages").position().left + 250});
			$('.mainholder img:first').appendTo('.scrollingImages');
			checkMovement = 0;
			
			}
		
		
		
		
		
		}
	

	
