$.extend($.expr[':'],{notnone:function(elm){return $(elm).css('display')!='none';}});function offresInfosSlider(jElm){var height_total=parseInt(jQuery('#blocOffre > .innerBloc').css('height'),10);var height_elms=null;var elms_display=jQuery('#blocOffre .innerBloc > *:notnone');elms_display.each(function(){height_new=parseInt(jQuery(this)[0].offsetHeight,10);height_elms=height_elms+height_new;});var height_result=parseInt(height_total-height_elms,10);var height_actual=parseInt(jElm.next('.offreInfos').height(),10);var height_final=parseInt(height_result+height_actual,10);try{jElm.next('.offreInfos').height(height_final);}catch(e){}}jQuery(document).ready(function(){jQuery('html').addClass('js');skinSelect();jQuery('#oParis, #oIdf, #oRegions').bind('click',function(){jQuery('span',jQuery('#oParis, #oIdf, #oRegions')).removeClass('active');jQuery('span',this).addClass('active');jQuery('#blocOffre .offreInfos').hide();jQuery(this).next('.offreInfos').fadeIn();offresInfosSlider(jQuery(this));return false;});jQuery('#blocTransactions .title').bind('click',function(){jQuery('#blocTransactions .title span').removeClass('active');jQuery('span',this).addClass('active');jQuery('#blocTransactions .offreInfos').hide();jQuery(this).next('.offreInfos').fadeIn();offresInfosSlider(jQuery(this));return false;});jQuery('#btAccesDirect').bind('click',function(){jQuery(this).next().slideToggle();return false;});if(jQuery("#tabConseilsContainer").size()>0)jQuery("#tabConseilsContainer > ul").tabs({fx:{opacity:'toggle'}});var heightBlockMax=0;$(".blockFigures .top").each(function(){if($(this).height()>heightBlockMax)heightBlockMax=$(this).height();});$(".blockFigures .top").each(function(){$(this).css("height",heightBlockMax);});heightBlockMax=0;$(".blockFigures").each(function(){if($(this).height()>heightBlockMax)heightBlockMax=$(this).height();});$(".blockFigures").each(function(){$(this).css("height",heightBlockMax);});heightBlockMax=0;heightBlockMax=0;if(jQuery('#blocLastOffres .innerBloc')[0]&&jQuery('#blocOffre .innerBloc')[0]){$(".blocHome .innerBloc").each(function(){if($(this).height()>heightBlockMax){heightBlockMax=$(this).height();}});$(".blocHome .innerBloc").each(function(){$(this).css("height",heightBlockMax);});heightBlockMax=0;}if(jQuery("#listeAgence").size()>0){jQuery("#listeAgence").change(function(){val=jQuery(this).val();if(val!=null)document.location.href=val;});}if(jQuery("a.takeMeThere").size()>0){jQuery("a.takeMeThere").click(function(){jQuery.formSuite();return false;});}if(jQuery("#formInvestir").size()>0){jQuery("#formInvestir").validate({rules:{typebien:"required",sup_min:"required",sup_max:"required",prix_min:"required",prix_max:"required",secteurGeo:"required",nom:"required",prenom:"required",email:{required:true,email:true}},errorElement:"span"});}if(jQuery('.scrollPane').size()>0){jQuery('.scrollPane').jScrollPane({showArrows:true});}var offresInfosElm=jQuery("#oParis");offresInfosSlider(offresInfosElm);jQuery("#captchaRefreshBtn").click(function(){jQuery("#captcha").load("/pushedContent/newCaptcha/"+jQuery("input#NodeID").val());return false;})});jQuery.formSuite=function(){for(var i=1;i<=2;i++){if(jQuery("#partie_"+i).hasClass('offleft')){jQuery("#partie_"+i).removeClass('offleft');jQuery("#stepImage_"+i).attr("src",jQuery("#stepImage_"+i).attr("src").replace("_off","_on").replace("-off","-on"));}else{jQuery("#partie_"+i).addClass('offleft');jQuery("#stepImage_"+i).attr("src",jQuery("#stepImage_"+i).attr("src").replace("_on","_off").replace("-on","-off"));}}}function skinSelect(popin){if((navigator.userAgent.match(/\bFirefox\/3\b/))||(navigator.userAgent.match(/\bMSIE 7.0\b/))||(jQuery.browser.safari&&!navigator.platform.match(/\bWin.+\b/))){var config={class_right:{0:'style-select-r-0',1:'style-select-r-1',2:'style-select-r-2'},class_left:{0:'style-select-l-0',1:'style-select-l-1',2:'style-select-l-2'},class_value:'select-value'};var parent=jQuery('#blocSelectDirect select');parent.each(function(i){var select=jQuery(this);select.wrap('<span class="'+config.class_left[0]+'"><\/span>').wrap('<span class="'+config.class_right[0]+'"><\/span>');select.before('<span class="'+config.class_value+'"> <\/span>').each(function(){select.prev().text(this.options[0].innerHTML);var x=jQuery(this).css('width');select.prev().css('width',jQuery(this).css('width'));if(jQuery.browser.msie&&jQuery.browser.version=='7.0'){select.parent().css('width',jQuery(this).css('width'));select.parent().parent().css('width',jQuery(this).css('width'));}});var styleSelect=function(method,nb){select.parents('.'+config.class_right[0])[method](config.class_right[nb]);select.parents('.'+config.class_left[0])[method](config.class_left[nb]);};var keySelect=function(val){if(val[0]){var selectedOption=val.prev();var that=val[0];selectedOption.text(that.options[that.selectedIndex].innerHTML);}};if(select[0].disabled)styleSelect('addClass',2);else{select.focus(function(){styleSelect('addClass',1);}).mouseover(function(){styleSelect('addClass',1);});select.blur(function(){styleSelect('removeClass',1);}).mouseout(function(){styleSelect('removeClass',1);});select.click(function(){keySelect(select);}).keypress(function(){keySelect(select);});keySelect(select);}});}}
