	if (document.getElementById("Accordion1")) {		var Accordion1 = new Spry.Widget.Accordion("Accordion1");	}	$j(document).ready(function(){		$j("#icerca").click(			function(){ 				if(this.value=='cerca in Motori24') {					this.value = '';				}			}		);		$j("#icerca").blur(			function(){ 				if(jQuery.trim(this.value)=='') {					this.value = 'cerca in Motori24';				}			}		);		$j("#bcerca").click(			function(){ 				if(jQuery.trim($j("#icerca").val())=='' || $j("#icerca").val()=='cerca in Motori24') {					alert("Inserisci almeno un termine da cercare");					return false;				}			}		);		$j("#b2cerca").click(			function(){ 				if(jQuery.trim($j("#i2cerca").val())=='' || $j("#i2cerca").val()=='cerca in Motori24') {					alert("Inserisci almeno un termine da cercare");					return false;				}			}		);		//select current gallery		var domainlen = ('http://'+document.domain).length;		var galurl = document.location.href.split("?")[0].substr(domainlen);		$j(".padding10mm .gallery_med a[@href*='"+galurl+"']").parents(".gallery_elemento").attr("style", "border:1px solid #AF100D");				/*				$j(".gallery_med a[@href*='"+galurl+"']").parents(".gallery_elemento").attr("class", "gallery_elemento_attivo");		$j(".gallery_med a[@href*='"+galurl+"'] img[@class=opacityit]").attr("class", "");		*/				if ( typeof photoid != "undefined" ) {				jQuery('#mycarousel').jcarousel({					vertical: true,					scroll: 2,					start: photoid				});				lightbox.windowload();		}		if( typeof uuid != "undefined" ){			var img = document.createElement('img');				img.src = '/common/counter.php?uuid='+uuid;			document.body.appendChild(img);		}				$j("#sdcercaannunci").click(			function(){ 				$j("#sdcercaannunci").html('Cerca<br />Annunci');				$j("#sdtrovalistino").html('<a href="javascript:void(0);">Trova<br /> Listino</a>');				$j("#sdcalcolaass").html('<a href="javascript:void(0);">Calcola <br />assicurazione</a>');				$j("#ctrext iframe").attr("src", "http://annunci.motori24.ilsole24ore.com/Automobili/motori24Box.jsp");				$j("#sdcercaannunci").attr("class", "tab2_dx_on tab_dx_primo tab2_bg01_on");				$j("#sdtrovalistino").attr("class", "tab2_dx_off tab2_bg02_off");				$j("#sdcalcolaass").attr("class", "tab2_dx_off tab2_bg03_off");				return false;			}		);				$j("#sdtrovalistino").click(			function(){ 				$j("#sdcercaannunci").html('<a href="javascript:void(0);">Cerca <br />Annunci</a>');				$j("#sdtrovalistino").html('Trova<br /> Listino');				$j("#sdcalcolaass").html('<a href="javascript:void(0);">Calcola <br />assicurazione</a>');				$j("#ctrext iframe").attr("src", "http://listini-motornet.motori24.ilsole24ore.com/external/trova_listino_motornet.html");				$j("#sdcercaannunci").attr("class", "tab2_dx_off tab2_bg01_off");				$j("#sdtrovalistino").attr("class", "tab2_dx_on tab2_bg02_on");				$j("#sdcalcolaass").attr("class", "tab2_dx_off tab2_bg03_off");				return false;			}		);		$j("#sdcalcolaass").click(			function(){ 				$j("#sdcercaannunci").html('<a href="javascript:void(0);">Cerca <br />Annunci</a>');				$j("#sdtrovalistino").html('<a href="javascript:void(0);">Trova<br /> Listino</a>');				$j("#sdcalcolaass").html('Calcola <br />assicurazione');				$j("#ctrext iframe").attr("src", "http://assicurazioni-auto.ilsole24ore.com/widgetmotori_300.php");				$j("#sdcercaannunci").attr("class", "tab2_dx_off tab2_bg01_off");				$j("#sdtrovalistino").attr("class", "tab2_dx_off tab2_bg02_off");				$j("#sdcalcolaass").attr("class", "tab2_dx_on tab2_bg03_on");				return false;			}		);		//interstitial		if( typeof interstitial != "undefined" ) { 			$j("a[@href*='.php']").click(				function(){ 					document.location = '/vai_articolo.php?url='+encodeURI(this.href);					return false;				}			);		}			 });/* Omniture partner*/if(document.domain != "www.motori24.ilsole24ore.com"	&& document.domain != "audi-usato.motori24.ilsole24ore.com") {	var oSezione = "partner";	var motourl = 'http://www.motori24.ilsole24ore.com';	var omniture = "\n";	omniture += '<!-- SiteCatalyst code version: H.20.3.'+"\n";	omniture += 'Copyright 1996-2010 Adobe, Inc. All Rights Reserved'+"\n";	omniture += 'More info available at http://www.omniture.com -->'+"\n";	omniture += '<scr'+'ipt language="JavaScript" type="text/javascript" src="'+motourl+'/js2008/100709_IlSole24Ore_Motori_DEV_s_code.js"></scr'+'ipt>'+"\n";	omniture += '<scr'+'ipt language="JavaScript" type="text/javascript" src="'+motourl+'/js2008/omniture.js"></scr'+'ipt>'+"\n";	omniture += '<scr'+'ipt language="JavaScript" type="text/javascript" src="'+motourl+'/js2008/omnitureExt.js"></scr'+'ipt>'+"\n";	omniture += '<noscript><a href="http://www.omniture.com" title="Web Analytics"><img src="http://metrics.ilsole24ore.com/b/ss/s24omotoriprod,s24oglobal/1/H.20.3--NS/0" height="1" width="1" border="0" alt="" /></a></noscript><!--/DO NOT REMOVE/-->'+"\n";	omniture += '<!-- End SiteCatalyst code version: H.20.3. -->'+"\n";	document.write(omniture);}
