//make HTML5 placeholders work in non supportive browsers
$(document).ready(function(){
  $("input[placeholder]").each(function(){
    if($(this).val()==""){
     // $(this).addClass('hasplaceholder');
      $(this).val($(this).attr("placeholder"));
      $(this).focus(function(){
        if($(this).val()==$(this).attr("placeholder")) $(this).val("");
       // $(this).removeClass('hasplaceholder');
      });
      $(this).blur(function(){
        if($(this).val()==""){
	  // $(this).addClass('hasplaceholder');
           $(this).val($(this).attr("placeholder"));
        }
       });
    }
  });

	$('form').submit(function(evt){
		$('input[placeholder]').each(function(){
			if($(this).attr("placeholder") == $(this).val()) {$(this).val('');}
		});
	});
});
//make HTML5 placeholders work in non supportive browsers


$(document).ready(function () {

	$(".imageoverlay").css({opacity:0.1});
	$(".imageoverlay").css({'background-color': '#AA8E66'});
	
	$(".imageoverlay85").css({opacity:0.1});
	$(".imageoverlay85").css({'background-color': '#AA8E66'});

	$(".imageoverlay").hover(function(){
	      $(this).stop().animate({opacity:0}, 200);
	  }, function () {      
	      $(this).stop().animate({opacity:0.1}, 200);
	  });
	  
	  $(".imageoverlay85").hover(function(){
	      $(this).stop().animate({opacity:0}, 200);
	  }, function () {      
	      $(this).stop().animate({opacity:0.1}, 200);
	  });
	  
	$("#homeright a").hover(function(){
	      $(this).stop().animate({backgroundColor:'#a98e69'}, 200);
	  }, function () {      
	      $(this).stop().animate({backgroundColor:'#d3c6b3'}, 200);
	  });
});


$(document).ready(function(){	
	$("#slider").easySlider({
		auto: true, 
		continuous: true,
		pause: 5000,
		speed: 1200,
		numeric: true
	});
});	

$(document).ready(function() {
	$(".validateform").validate();
});


function changeImg(image_id, image_folder) {
    $("#" + image_id).attr({ 'src': image_folder, 'alt': image_folder });
}
