// JavaScript Document

$(".button").click(function() {
		$(".button").show();
		var margin = $(this).attr("value"); //retrieve title of link so we can compare with php file
							var prev = margin - 1200;
							if(prev < 0) {
								$("#prev").hide();
								}
							var next = prev + 2400;
							if (next >6000) {
								$('#next').hide();
							}


			$("#sites").animate ({
			left: '-'+margin+'px'
			}, 300);
		 
		 $("#prev").attr({
				value: prev
			});
			$("#next").attr({
				value: next
			});
			
});
$("#next").hover(
		function(){
			$(this).animate({
				right: '35px'
			}, 200 ); },
		function() {
			$(this).animate({
				right: '40px'
			}, 200 );
		});
		$("#prev").hover(
		function(){
			$(this).animate({
				left: '35px'
			}, 200 ); },
		function() {
			$(this).animate({
				left: '40px'
			}, 200 );
		});
$(".items").hover(
		function(){
		var leg = $(this).attr("value");
			$("#"+leg).slideDown("fast"); },
		function() {
		var leg = $(this).attr("value");
			$("#"+leg).slideUp("fast");
			
		});
