﻿var slide_width=313
var pcs_counter=0;
$(document).ready(function() {
  // Handler for .ready() called.
//alert("jjj");
ax=0;
	
$(".featured .property_box").css('left',-slide_width);
$(".featured .property_box").css('width',slide_width*(pcs_counter+2)+1);
$(".search_box input").focus(function(){if($(this).attr("value")=="min" || $(this).attr("value")=="max")$(this).attr("value","")})
$("#arrow_left").click(function(){
$("#arrow_left").css("display","none");
if(ax==0)
{
$(".featured .property_box").css('left',-(pcs_counter+1)*slide_width);
ax=pcs_counter;
}

if(ax>0)
{
  $(".featured .property_box").animate({"left": "+="+slide_width+"px"}, "slow");
ax--
}
$("#arrow_left").css("display","block");
});

$("#arrow_right").click(function(){
$(this).css("display","none");
if(ax==pcs_counter-1)
{
  $(".featured .property_box").css('left',0);
ax=-1
}
if(ax<pcs_counter-1)
{
	//alert("jjj");
  $(".featured .property_box").animate({"left": "-="+slide_width+"px"}, "slow");
ax++
}
$(this).css("display","block");
});
})
