 $(document).ready(function()
 {
    //scroll pour "meilleur" affichage petite résolution
     //if(document.location.href.indexOf('#')<0){ window.scrollBy(0,201); }
    

	//compteur d'affichage des coordonnées du promoteur ------------------------------------------------------------
	var client_prospect = $.trim($("input[name='client_prospect']").val());
	var idproduit = $.trim($("input[name='selectid']").val());
    var idaddcom = $.trim($("input[name='add_com_id']").val());
    var client_id = $.trim($("input[name='extClID']").val()); 
    var Flag = $.trim($("input[name='flag']").val()); 
    idproduit = idproduit.slice(2);
		
	$("a#clv").click
	(
		function()
		{ 	if($('#detail_coordonnees .Wcont').length < 1){
                $('#detail_coordonnees').append("<div class='Wcont'><div class='waiter'></div></div>").find('.Wcont').css({width:'200px',float:'right',opacity:.8}).children('.waiter').css({height:'45px'}); 
            }
			$('.new_tools a').removeClass('current');
			$(this).addClass('current');
			$.post("http://"+window.location.hostname+"/detail/compteur.php",{ client_prospect: client_prospect ,id_produit: idproduit,add_com_id:idaddcom,extClientId:client_id,flag:Flag },
            function(xml){
            $('.Wcont').remove();
            $(".new_tools").css({"margin-bottom":"0"});
            $('#bloc_contact').html(xml).addClass("ohmy").show("slow");
            });
		}
	);
	//--------------------------------------------------------------------------------------------------------------
	

	/* FIX pour IE6 et SAFARi*/
	var bversion = jQuery.browser.version;
	var idnum = bversion.substring(0,1);
	
	//images switcher
	$(".thumb img").click(function(){ 
	var new_src = $(this).attr("src");
	if(new_src.indexOf("no_image2") < 0){ $(".visuel > img").attr({src:new_src}); } 
	return false;
	});
    
    $("#reForm").click(function(){
        $(".red,h4.cookie_mess").remove();
        $("#cookie_form").attr({id:"detail_form_new"});
        return false;
    });
    
     //text #proposition rouge au survol
    $("#proposition .prop").hover( function(){ $(this).children('p').css({color:'red'});},function(){ $(this).children('p').css({color:'black'});});
	
});
