// JavaScript Document
function over(el){
	el.className= el.id + "_na";	
}
function out(el){
	if (el.id != 'menu_'+ activeMenu ){
		el.className= el.id + "_n";	
	}
}
function goUrl(url){
	document.location.href=url;
	//setTimeout('document.location.href="../'+url+'"',100 ); 
	return true;
}
 
 
 
function slide_left(){
	var p = $("#slider").css("left");
	var left = parseInt(p) ;
	var width = $("#slider").innerWidth();
	width = width - (238*3);
	if(left > -width){
		$("#slider").animate({"left": "-=238px"}, "slow","", function(){
			var p2 = $("#slider").css("left");
			var left2 = parseInt(p2) ;
																	 
		  if(left2 <= -width){
				 $("#slider").clearQueue();
				  $("#slider").stop();
		   }
		 }) ;
	}
}
function slide_right(){
	var p = $("#slider").css("left");
	var left = parseInt(p) ;
	if(left < 0){
		$("#slider").animate({"left": "+=238px"}, "slow","", function(){
			var p2 = $("#slider").css("left");
			var left2 = parseInt(p2) ;
																	 
		   if(left2>=0){
				 $("#slider").clearQueue();
				  $("#slider").stop();
		   }
																		 
		}) ;
	}
}
function buyItem(id){
	jQuery.post("/add_shop.php", { "items_id": id }, function(response){
 		$('#buy_text').html(response)	;
	});	

}
function res_vote(){
	jQuery.post("/vote.php", { "vid": $("#vote_id").val()  }, function(response){
 		$('#vote_block').html(response)	;
	});	
}
function res_vote2(){
	jQuery.post("/vote.php", { "vid": $("#vote_id").val(), "vote": 1  }, function(response){
 		$('#vote_block').html(response)	;
	});	
}
function change_vote(){
	
	jQuery.post("/vote.php", { "vid": $("#vote_id").val(), "change": 1  }, function(response){
  		$('#vote_block').html(response)	;
	});	
}
