function move_hover_bg($itm,sp){
	$itm.parent().css({backgroundPosition : (sp+'px') 	});
	} 

$(document).ready(function(){
cLeftPos =  	parseInt($("#container").css("left"));						   
$(".spacer1")
	.hover(
		function() {

				move_hover_bg($(this),-65);
							 
			} ,
		function() {

				move_hover_bg($(this),0);

						 

			}

		)
	.click(
		   function(){

				cLeftPos = document.body.scrollLeft;
				if(cLeftPos+585 > window.scrollMaxX ){

						cLeftPos = window.scrollMaxX;

					} else cLeftPos += 585;
 			    $("html,body").animate({ // scroll view
									   scrollLeft:	cLeftPos 
									   },

									   1000);
			   }

		   );

$(".spacer2").hover(
 					function() {
							$(this).parent().css({backgroundPosition : '-130px'});
						} ,
						function() {
							$(this).parent().css({backgroundPosition : '0px'});
						}

					)
 		.click(
			   function(){
 				cLeftPos = document.body.scrollLeft;
				if(cLeftPos-585 < 0 ){
						cLeftPos = 0;
					} else cLeftPos -= 585;
				$("html,body").animate({
									   scrollLeft:	cLeftPos 
									   },
									   1000);
			   }
		   );


 

						   });
