function prechargimg() {
	var doc=document;
	if(doc.images){ if(!doc.precharg) doc.precharg=new Array();
	var i,j=doc.precharg.length,x=prechargimg.arguments; for(i=0; i<x.length; i++)
	if (x[i].indexOf("#")!=0){ doc.precharg[j]=new Image; doc.precharg[j++].src=x[i];}}
}

function validate(form1) {
	if (!document.form1.transac[0].checked && !document.form1.transac[1].checked)
	{
		alert("Pour faire une recherche vous devez choisir Location ou Vente");
		return false;
	}
}
function trim (str) {
   return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
}

	
$(document).ready(function(){

		$('.rollover').mouseenter(function(){
				$(this).animate({ marginTop: "-31px"  }, 150);
			});
	   	$('.rollover').mouseleave(function(){
				$(this).animate({ marginTop: "0px" }, 400);
			});
		
		$('#move').scrollDiv({butH: 350, butB: 100});
		
});

$(function() {
		$('#sti-menu').iconmenu({
			animMouseenter	: {
				'mText' : {speed : 150, easing : 'jswing', delay : 0, dir : 1},
				'sText' : {speed : 150, easing : 'jswing', delay : 0, dir : 1},
				'icon'  : {speed : 150, easing : 'jswing', delay : 0, dir : 1}
			},
			animMouseleave	: {
				'mText' : {speed : 100, easing : 'jswing', delay : 0, dir : 1},
				'sText' : {speed : 100, easing : 'jswing', delay : 0, dir : 1},
				'icon'  : {speed : 100, easing : 'jswing', delay : 0, dir : 1}
			},
			boxAnimSpeed: 0
		});
		
		$('#btn_up').click(function() {
			$('html,body').animate({scrollTop: 0}, 'slow');
		});
	  
	  $(window).scroll(function(){
		 if($(window).scrollTop()<300){
			$('#btn_up').fadeOut();
		 }else{
			$('#btn_up').fadeIn();
		 }
	  });
});
