// JavaScript Document Home

$(document).ready(		  
	function() {
		
		
				$(".arrow").css({opacity:'0'});
				// HOVER
				$(".window").hover(
						function() {
							$(".arrow").stop().animate({opacity:'1'},{queue:false,duration:400});
						},
						function() {
							$(".arrow").stop().animate({opacity:'0'},{queue:false,duration:400});
						}
				);	

				// Slider
				var v = 0;	
				$(".arrow_l").bind("click", function() {
					if (v == 0)
						$(".slider").stop().animate({left:'-1805px'}), n = 2;
						
					if (v == 1)
						$(".slider").stop().animate({left:'-900px'}), n = 1;
						
					if (v == 2)
						$(".slider").stop().animate({left:'0px'}), n = 0;
						
					if (v == 3)
						$(".slider").stop().animate({left:'-1805px'}),n = 2, v = 0;
					
					v++;
				});
			
			
				var n = 0;	
				$(".arrow_r").bind("click", function() {
					if (n == 0)
						$(".slider").stop().animate({left:'-900px'}), v = 2;
						
					if (n == 1)
						$(".slider").stop().animate({left:'-1805px'}), v = 1;
						
					if (n == 2)
						$(".slider").stop().animate({left:'0px'}), v = 0;	
						
					if (n == 3)
						$(".slider").stop().animate({left:'-900px'}), v = 2, n = 0;
					
					n++;
				});
				
	}
);
