if(typeof(mobile)=="undefined"){var mobile={}
}var documentBody;
mobile._initialize=function(){document.fire("mobile:init");
documentBody=$(document.body);
mobile.BrowserCheck={IE6:Prototype.Browser.IE&&(typeof(document.body.style.maxHeight)=="undefined")};
document.fire("mobile:early");
if(mobile.BrowserCheck.IE6){setTimeout(function(){document.fire("mobile:ready")
},10)
}else{document.fire("mobile:ready")
}};
if(mobile._domLoaded){mobile._initialize()
}else{document.observe("dom:loaded",mobile._initialize)
}Event.observe(window,"load",function(){document.fire("mobile:loaded");
setTimeout(function(){document.fire("mobile:late")
},200);
setTimeout(function(){document.fire("mobile:preload")
},1000)
});
mobile.initializePage=function(b,c,a){a=a||"mobile:ready";
document.observe(a,function(){if(documentBody.hasClassName(b)){c()
}})
};
mobile.observe=function(a,b,d,c){c=Object.extend({parentElement:documentBody,allowNested:false,stopEvent:true},c);
var e=(function(g){var f;
if(c.allowNested){f=g.findElement(a)
}else{if(g.element().match(a)){f=g.element()
}}if(f&&f!=document){if(c.stopEvent){g.stop()
}d(g,f)
}}).bindAsEventListener();
$(c.parentElement).observe(b,e);
if(mobile.isDev){console.info("Registered handler for selector %o and event %o on %o",a,b,c.parentElement==documentBody?"document body":c.parentElement)
}return e
};
mobile.require=function(a,d){a=$H(a);
var c=a.keys();
mobile.utils.waitFor(c,d);
var b=a.findAll(function(e){return mobile.utils.getObject(e.key)===undefined
}).pluck("value");
mobile.loadRequiredScripts(b)
};
mobile.loadRequiredScripts=function(a){var b=$$("head, body").first();
[a].flatten().each(function(c){var d=new Element("script",{type:"text/javascript",async:true,src:c});
b.insert(d)
})
};
mobile.loadScript=function(a,b){var b=Object.extend({onLoad:Prototype.emptyFunction},b);
var c=new Element("script",{type:"text/javascript",async:true,src:a});
if(Prototype.Browser.IE){c.onreadystatechange=function(){if(this.readyState=="loaded"){b.onLoad()
}}
}else{c.observe("load",b.onLoad)
}$$("head, body").first().insert(c)
};
mobile.utils=(function(){function a(f){var g=Object.isArray(f)?f:f.split(".");
if(g[0]=="window"){g.shift()
}try{return g.inject(window,function(i,e){return i[e]
})
}catch(h){return undefined
}}function c(g){var h=g.split(".");
var e=h.pop();
var f=this.getObject(h);
return{object:f,key:e}
}function b(f,g){var h=this._getParentObject(f);
if(h){var i=h.object[h.key];
if(Object.isFunction(i)){g=Object.extend({consolePrefix:"-- ",logBefore:true,logAfter:true},g);
var e=i.wrap(function(){var j=$A(arguments);
var l=j.shift();
if(g.logBefore){console.debug(g.consolePrefix+"Executing %o with arguments %o",f,j)
}var k=l.apply(null,j);
if(g.logAfter){console.debug(g.consolePrefix+"Returning from %o with result %o",f,k)
}return k
});
h.object[h.key]=e;
return e
}}}function d(h,g,f){f=Object.extend({interval:100},f);
var h=[h].flatten();
var e;
var i=function(){var j=h.map(mobile.utils.getObject);
if(j.indexOf(undefined)<0){clearInterval(e);
g(j.size()==1?j.first():j)
}};
e=setInterval(i,f.interval);
i()
}return{getObject:a,logMethod:b,waitFor:d}
})();
Element.addMethods({__visible:function(a){return $(a).getStyle("display")!="none"
},mobile_toggle:function(a){a=$(a);
Element[Element.__visible(a)?"hide":"__show"](a);
return a
},__show:function(a){a=$(a);
a.style.display="block";
return a
}});if(typeof(mobile)=="undefined"){var mobile={}
}mobile.AdLoader=Class.create({_targets:null,_options:null,initialize:function(a,b){this._targets=Object.isString(a)?[{element:a}]:[a].flatten();
this._options=Object.extend({titleSingle:b.title||"Anzeige",titleMultiple:b.title||"Anzeigen",callbackName:"callback"+Math.floor(new Date().getTime()*Math.random()),onComplete:Prototype.emptyFunction},b);
window[this._options.callbackName]=this._callback.bind(this)
},load:function(){},_createAdHTML:function(a){return mobile.AdLoader.AD_TEMPLATE.evaluate({ad:a,visible_url_escaped:a.visible_url.replace(/'/,"\\'").replace(/"/,"&quot;")})
},_createHeaderHTML:function(a){return mobile.AdLoader.AD_TITLE_TEMPLATE.evaluate({title:a.size()>1?this._options.titleMultiple:this._options.titleSingle})
},_update:function(a){this._targets.each(function(e){var c=$(e.element);
var b=e.numberOfAds?a.splice(0,e.numberOfAds):a;
if(b.size()>0){var d=this._createHeaderHTML(b);
var f=b.map(this._createAdHTML).join("\n");
if(e.wrapper){f=e.wrapper.evaluate({content:f})
}c.update(d+f);
c.show()
}else{c.hide()
}},this)
},_callback:function(a){}});
Object.extend(mobile.AdLoader,{AD_TEMPLATE:new Template('<div class="ad_container"><a href="#" onclick="window.open(\'#{ad.url}\',\'AdWindow\');return false"onmouseout="window.status=\'\';return true" onmouseover="window.status=\'go to #{visible_url_escaped}\';return true" style="text-decoration:none"><span class="ad_line_1">#{ad.line1}</span><span class="ad_line_2">#{ad.line2}</span><span class="ad_line_3">#{ad.visible_url}</span></a></div>'),AD_TITLE_TEMPLATE:new Template('<div class="ad_header">#{title}</div>\n'),AD_SES_TOP_WRAPPER:new Template('#{content}<div class="iconSprite onsiteline"></div>')});
mobile.AdMomentumLoader=Class.create(mobile.AdLoader,{initialize:function($super,a,b){b=Object.extend(b||{},{callbackName:"mobileTextAds_call_done"});
$super(a,b)
},load:function(a){var b=new Element("script",{type:"text/javascript",src:a});
$$("head").first().insert(b)
},_callback:function(a){var c=a.ads;
var b=c.size();
this._update(c);
this._options.onComplete(b)
}});
mobile.IframeAdLoader=Class.create(mobile.AdLoader,{_iframe:null,initialize:function($super,a,b){b=b||{};
$super(a,b);
this._options.iframeId=b.iframeId||"adLoaderIframe"+Math.floor(new Date().getTime()*Math.random())
},_loadInIframe:function(d,b,e){var f=this._options.iframeId;
if($(f)){$(f).remove()
}this._iframe=new Element("iframe",{id:f,style:"display: none;"});
if(Prototype.Browser.IE){document.domain=location.hostname.replace(/.*\.([^\.]*\.[^\.\d]*)$/,"$1");
this._iframe.src="javascript:document.write('<script>document.domain=\""+document.domain+"\";<\/script>');document.close();"
}documentBody.insert(this._iframe);
var a="<script type='text/javascript'>\n";
if(Prototype.Browser.IE){a+="document.domain = '"+document.domain+"';\n"
}a+=b;
a+="<\/script>\n";
if(d){a+="<script type='text/javascript' src='"+d+"'><\/script>\n"
}if(e){a+="<script type='text/javascript'>\n"+e+"\n<\/script>\n"
}var c=function(){var g=$(f);
var h=g.contentDocument||g.contentWindow.document;
h.write(a);
if(!Prototype.Browser.IE){h.close()
}};
if(!Prototype.Browser.IE){c()
}else{setTimeout(c,10)
}}});
mobile.AdSenseLoader=Class.create(mobile.IframeAdLoader,{initialize:function($super,a,b){b=b||{};
$super(a,b);
this._options.adType=b.adType||"text"
},load:function(b,c){var a=c?$H(c).map(function(d){return"var "+d.key+" = '"+d.value+"';"
}).join("\n")+"\n":"";
a+="var "+this._options.callbackName+" = parent."+this._options.callbackName+";\n";
this._loadInIframe(b,a)
},_callback:function(a){if(Prototype.Browser.IE){this._iframe.contentWindow.document.close()
}var c=$A(a).findAll(function(d){return d.type==this._options.adType
},this);
var b=c.size();
this._update(c);
this._options.onComplete(b)
}});
mobile.DartLoader=Class.create(mobile.IframeAdLoader,{load:function(b){var a="var __content = '';\n document.write = function(c){__content += c;};\n";
var d="parent."+this._options.callbackName+"(__content);";
var c=Prototype.Browser.IE?"window.onload=function() {"+d+"}":d;
this._loadInIframe(b,a,c)
},_callback:function(a){if(Prototype.Browser.IE){this._iframe.contentWindow.document.close()
}if(a.indexOf("<!DOCTYPE")==0){a=""
}this._targets.each(function(c){var b=$(c.element);
b.removeClassName("loading");
b.update(a)
},this);
this._options.onComplete(a?1:0)
}});
mobile.DomWriteLoader=(function(){var adUrls=[];
var domWriteScripts=[];
document.observe("mobile:domwritescripts",function(){var pointer=domWriteScripts.size();
if(pointer>0){var content=domWriteScripts[pointer-1];
if(content.indexOf("src=")>-1){var scriptSrc=content.match(/src[^=]*=[^'"]*['"]([^'"]*?)['"]/i);
mobile.loadScript(scriptSrc[1])
}else{var inlineScript=" "+content.match(/[^'"]*<script[^>]*>([\s\S]*?)<\/script[^>]*>[^'"]*/gi)+" ";
inlineScript=inlineScript.replace(/[^'"]*<script[^>]*>/gi,"");
inlineScript=inlineScript.replace(/<\/script[^>]*>[^'"]*/gi,"");
eval(inlineScript)
}}});
document.observe("mobile:late",function(){if(adUrls.size()>0){document.write=document.writeln=function(content,placement){if(content!=""){if(content.indexOf("<script")>-1){domWriteScripts.push(content);
document.fire("mobile:domwritescripts")
}else{if(placement){var placementId=placement.match(/<\!--([\s\S]*?)-->/i)[1].trim();
if($(placementId)){if(content.indexOf("<!DOCTYPE")>-1){$(placementId).hide()
}else{$(placementId).insert(content)
}}}}}};
adUrls.each(function(adUrl){mobile.loadScript(adUrl)
})
}});
return function(adUrl){adUrls.push(adUrl)
}
})();if(Object.isUndefined(mobile)){var mobile={}
}mobile.AmbitSearchController=Class.create({_zipField:null,_countryField:null,_radiusField:null,_options:null,_zipValid:false,_zip:null,_zipCache:null,initialize:function(a){this._options=Object.extend({zipField:"zipcode",countryField:"ambitCountry",radiusField:"zipcodeRadius",defaultCountry:"DE",setDefaultCountry:false,onChange:Prototype.emptyFunction,zipValidatorUrl:null,requestHitsOnInit:false,cache:$H(),matchers:this.constructor.ZIP_MATCHERS},a);
this._zipField=$(this._options.zipField);
this._countryField=$(this._options.countryField);
this._radiusField=$(this._options.radiusField);
this._requestHitsOnInit=$(this._options.requestHitsOnInit);
if(!this._zipField||!this._countryField||!this._radiusField){throw new Exception("Could not find all required input fields!");
return false
}if(this._options.setDefaultCountry){this._countryField.setValue(this._options.defaultCountry)
}this._preboundZipFieldChangedHandler=this._zipFieldChangedHandler.bind(this);
this._zipField.observe("keyup",this._preboundZipFieldChangedHandler);
this._preboundCountryFieldChangedHandler=this._countryFieldChangedHandler.bind(this);
this._countryField.observe("change",this._preboundCountryFieldChangedHandler);
this._zipCache=this._options.cache;
this._initializing=true;
this._countryFieldChangedHandler();
if(this._requestHitsOnInit){requestHits()
}},stop:function(){this._zipField.stopObserving("keyup",this._preboundZipFieldChangedHandler);
this._countryField.stopObserving("change",this._preboundCountryFieldChangedHandler)
},_zipFieldChangedHandler:function(c){var b=$F(this._zipField).strip();
var a=$F(this._countryField);
if(!c||(b!=this._zip)){if(b.length>0){if(!this._isGeoSearchSupported(a)){this._countryField.setValue(this._options.defaultCountry.toUpperCase());
this._countryFieldChangedHandler();
return
}}this._zip=b
}this._isValidZip(b,a,this._isValidZipCallback.bind(this,b,a,!c))
},_countryFieldChangedHandler:function(c){var a=$F(this._countryField);
var b=this._isGeoSearchSupported(a);
if(b){this._countryBecameSupporting()
}else{this._countryBecameUnsupporting()
}this._zipFieldChangedHandler()
},_zipBecameValid:function(){this._zipValid=true;
mobile.FormHelper.enableFieldAndLabel(this._radiusField);
if(!$F(this._radiusField)&&!this._initializing){this._radiusField.setValue(100)
}},_zipBecameInvalid:function(){this._zipValid=false;
mobile.FormHelper.disableFieldAndLabel(this._radiusField);
this._radiusField.setValue("")
},_countryBecameSupporting:function(){},_countryBecameUnsupporting:function(){this._zipField.setValue("")
},_isValidZip:function(c,d,e){d=(d||"").toUpperCase();
var b=this._options.matchers.get(d||this._options.defaultCountry)||this._options.matchers.get(this._options.defaultCountry);
if(b.validateOnServer){var a=b.regExp.test(c);
if(a){this._validateZipOnServer(c,d,e)
}else{e(a)
}}else{if(b instanceof RegExp){var a=b.test(c);
e(a)
}else{if(Object.isFunction(b)){b(c,d,e)
}else{if(Object.isString(b)){e(b==c)
}else{}}}}},_isValidZipCallback:function(a,d,b,c){if(b||(c!=this._zipValid)){if(c){this._zipBecameValid()
}else{this._zipBecameInvalid()
}if(!b){this._options.onChange(c)
}}this._initializing=false
},_hasCountrySelection:function(){return(this._countryField.type!="hidden")
},_isGeoSearchSupported:function(a){return this._options.matchers.keys().include(a)
},_validateZipOnServer:function(a,d,e){var c=this._cacheKey(d,a);
if(this._zipCache.keys().include(c)){e(this._zipCache.get(c));
return
}var b={ambitCountry:d,zipcode:a};
new Ajax.Request(this._options.zipValidatorUrl,{method:"get",parameters:b,onSuccess:(function(g){var f=false;
if(g){f=(g.responseText=="true")
}this._zipCache.set(c,f);
e(f)
}).bind(this)})
},_cacheKey:function(b,a){return b+"__"+a
}});
Object.extend(mobile.AmbitSearchController,{ZIP_MATCHERS:$H({DE:{validateOnServer:true,regExp:/^\d{5}$/},PL:{validateOnServer:true,regExp:/^\d{2}-\d{3}$/},RO:{validateOnServer:true,regExp:/^\d{6}$/},DEx:/^\d{5}$/})});if(typeof(mobile)=="undefined"){var mobile={}
}mobile.Cookie=Class.create({_options:null,_name:null,initialize:function(b,a){this._options=Object.extend({path:false,duration:false},a);
this._name=b
},set:function(b){b=encodeURIComponent(b);
if(this._options.path){b+="; path="+this._options.path
}if(this._options.duration){var a=new Date();
a.setTime(a.getTime()+this._options.duration*24*60*60*1000);
b+="; expires="+a.toGMTString()
}document.cookie=this._name+"="+b
},get:function(){var a=document.cookie.match("(?:^|;)\\s*"+RegExp.escape(this._name)+"=([^;]*)");
return(a)?decodeURIComponent(a[1]):null
},unset:function(){document.cookie=this._name+"= ;expires="+(new Date(0)).toGMTString()
}});
mobile.Cookie.cookiesAllowed=function(){var a=new mobile.Cookie("testCookie");
a.set("null");
if(a.get()!==null){a.unset();
return true
}else{return false
}};if(typeof(mobile)=="undefined"){var mobile={}
}mobile.FormHelper=Object.extend({},{enableFieldAndLabel:function(c,b,d){c=$(c);
if(c){b=b||c.id;
d=d||"inactive";
c.enable();
var a=$$('label[for="'+b+'"]').first();
if(a){a.removeClassName(d)
}}},disableFieldAndLabel:function(c,b,d){c=$(c);
if(c){b=b||c.id;
d=d||"inactive";
c.disable();
var a=$$('label[for="'+b+'"]').first();
if(a){a.addClassName(d)
}}},checkBoxes:function(b,a){b=$(b);
b.select("input[type=checkbox]").each(function(c){c.checked=a
})
},connectSelects:function(a,b){a=$(a);
b=$(b);
if(a&&b){a.observe("change",function(c){b.setValue(this.value)
})
}},connectMultiSelects:function(a,b){b.each(function(c){this.connectSelects(a,c)
}.bind(this))
},connectTextInputs:function(b,a){b=$(b);
a=$(a);
if(b&&a){b.observe("change",function(){a.value=this.value
})
}},connectMultiTextInputs:function(b,a){a.each(function(c){this.connectTextInputs(b,c)
}.bind(this))
},submitOnce:function(a){a=$(a);
a.observe("submit",function(b){a.down("input[type=submit]").disable()
})
}});if(typeof(mobile)=="undefined"){var mobile={}
}mobile.FormWatcher=Class.create({_form:null,_method:null,_options:null,initialize:function(b,c,a){this._form=$(b);
this._method=c;
this._options=Object.extend({registerKeyHandlers:true,registerChangeHandlers:true},a);
this._initHandlers()
},_initHandlers:function(){if(this._options.registerChangeHandlers){this._initChangeHandlers()
}if(this._options.registerKeyHandlers){this._initKeyUpHandlers()
}},_initChangeHandlers:function(){if(!Prototype.Browser.IE){this._form.observe("change",(function(b){var a=Event.element(b);
if(!(a.tagName.toLowerCase()=="input"&&(a.type||"").toLowerCase()=="text")){this._method(a)
}}).bindAsEventListener(this))
}else{this._form.getElements("select").invoke("observe","change",function(a){this._method(a.element())
}.bind(this));
this._form.select("input[type=checkbox]").invoke("observe","click",function(a){this._method(a.element())
}.bind(this));
this._form.observe("dom:update",(function(a){a.memo.select("select").invoke("observe","change",function(b){this._method(b.element())
}.bind(this))
}).bindAsEventListener(this))
}},_initKeyUpHandlers:function(){this._form.observe("keyup",(function(a){if((a.keyCode>20&&!this.constructor._SPECIAL_KEY_CODES.include(a.keyCode))||a.keyCode==Event.KEY_BACKSPACE){this._method(a.element())
}}).bindAsEventListener(this))
}});
Object.extend(mobile.FormWatcher,{_SPECIAL_KEY_CODES:$w("TAB RETURN ESC LEFT UP RIGHT DOWN HOME END PAGEUP PAGEDOWN INSERT").map(function(a){return Event["KEY_"+a]
})});if(typeof(mobile)=="undefined"){var mobile={}
}mobile.ImageHelper={};
mobile.ImageHelper.preloadImages=function(){if(document.images){if(!document.preloads){document.preloads=new Array()
}var c;
var b=document.preloads.length;
var a=mobile.ImageHelper.preloadImages.arguments;
for(c=0;
c<a.length;
c++){if(a[c].indexOf("#")!=0){document.preloads[b]=new Image;
document.preloads[b++].src=a[c]
}}}};
mobile.ImageHelper.loadAllImages=function(b){document.stopObserving("mobile:late",mobile.ImageHelper.loadAllImagesCurry);
Event.stopObserving(window,"scroll",mobile.ImageHelper.loadAllImagesCurry);
var a=5;
b.each(function(c,d){setTimeout((function(){var e=c.getAttribute("rel");
if(e!==""&&e!=c.src){c.observe("load",function(){var f=c.up("a");
f.removeClassName("loaded-later");
c.setStyle({visibility:"visible"})
});
c.src=e
}}).bind(c),a)
})
};
mobile.ImageHelper.imageLateLoader=function(a){if(document.viewport.getScrollOffsets().top>0){mobile.ImageHelper.loadAllImages(a)
}else{mobile.ImageHelper.loadAllImagesCurry=mobile.ImageHelper.loadAllImages.curry(a);
document.observe("mobile:late",mobile.ImageHelper.loadAllImagesCurry);
Event.observe(window,"scroll",mobile.ImageHelper.loadAllImagesCurry)
}};
mobile.ImageSwitcher=Class.create({_imageElement:null,_thumbnailListElement:null,_options:null,_currentThumbnail:null,_selectionTimeout:null,initialize:function(c,a,b){this._imageElement=$(c);
this._thumbnailListElement=$(a);
this._options=Object.extend({selectEvent:"mouseover",tagName:"a",timeout:100},b);
this._thumbnailListElement.observe(this._options.selectEvent,this._thumbnailSelectHandler.bindAsEventListener(this))
},_thumbnailSelectHandler:function(c){var b=Event.element(c);
var a=(b.tagName.toLowerCase()==this._options.tagName.toLowerCase())?b:b.up(this._options.tagName);
if(a&&a.descendantOf(this._thumbnailListElement)){if(this._currentThumbnail!=a&&a.rel){if(this._selectionTimeout){clearTimeout(this._selectionTimeout)
}this._selectionTimeout=setTimeout(this._switchImage.bind(this,a),this._options.timeout)
}}},_switchImage:function(a){this._currentThumbnail=a;
this._imageElement.src=this._currentThumbnail.rel
}});
mobile.ImageHelper.InventoryGallery=Class.create({_DISPLAY_DELAY:400,_mouseoverTimeout:null,_currentThumbnailElement:null,initialize:function(a){mobile.observe("."+a,"mouseover",function(b){this._startDisplayGalleryImg(b)
}.bind(this));
if(mobile.BrowserCheck.IE6){this.iframeShim=new IframeShim()
}},_startDisplayGalleryImg:function(a){this._stopDisplayGalleryImg(a);
var b=Prototype.Browser.IE?Object.clone(a):a;
this._mouseoverTimeout=setTimeout(this._displayGalleryImg.bind(this,b),this._DISPLAY_DELAY)
},_stopDisplayGalleryImg:function(a){if(this._mouseoverTimeout){clearTimeout(this._mouseoverTimeout);
this._mouseoverTimeout=null
}},_displayGalleryImg:function(b){var a=Event.findElement(b,"a");
var c=this._getImageWrapper();
if(!c.down(".gallery-img")||(c.down(".gallery-img")&&c.down(".gallery-img").src!=a.rel)){this.setImageWrapperAlignment(a);
c.show();
this._loadGalleryImage(a);
a.up(".thumb-wrap").observe(Prototype.Browser.IE?"mouseleave":"mouseout",this._closeImageWrapper.bindAsEventListener(this,c))
}else{this.setImageWrapperAlignment(a);
c.show()
}this._currentThumbnailElement=a
},_getImageWrapper:function(){if(!this._imageWrapperElement){this._imageWrapperElement=this._createImageWrapper()
}return this._imageWrapperElement
},_createImageWrapper:function(){var a=documentBody.down(".imageWrapper");
if(a){return a
}else{var b=new Element("div",{className:"imageWrapper"});
b.setStyle({position:"absolute",zIndex:"10",border:"2px solid #ccc",backgroundColor:"#fff"});
b.innerHTML='<img style="margin: 85px 129px" class="loading-gif" alt="" src="'+mobile.PageParams.imagePath+'loading_big.gif"/>';
if(!(mobile.BrowserCheck.IE6&&documentBody.down(".ie6-position-fixed"))){documentBody.insert({bottom:b})
}else{documentBody.down(".page").insert({bottom:b})
}b.observe(Prototype.Browser.IE?"mouseleave":"mouseout",this._closeImageWrapper.bindAsEventListener(this,b));
return b
}},_closeImageWrapper:function(b,a){if(Prototype.Browser.IE||(b.relatedTarget&&b.relatedTarget!=b.currentTarget&&!b.relatedTarget.childOf(b.currentTarget))){a.hide();
if(this.iframeShim){this.iframeShim.hide()
}b.stop()
}this._stopDisplayGalleryImg()
},_loadGalleryImage:function(a){this._imageWrapperElement.down("img.loading-gif").show();
var b=new Element("img",{className:"gallery-img"});
if(this._imageWrapperElement.down(".gallery-img")){this._imageWrapperElement.select(".gallery-img").invoke("remove")
}b.onload=function(){this._imageWrapperElement.down("img.loading-gif").hide();
this._imageWrapperElement.insert(b,{bottom:b})
}.bind(this);
b.src=a.rel
},setImageWrapperAlignment:function(c){var d=this._getImageWrapper();
var e=c.up(".thumb-wrap");
var b=e.cumulativeOffset();
var a=e.getDimensions();
d.setStyle({top:b.top+"px"});
d.setStyle({left:(b.left+a.width+10)+"px"});
if(this.iframeShim){this.iframeShim.positionUnder(d);
this.iframeShim.show()
}}});if(typeof(mobile)=="undefined"){var mobile={}
}mobile.InfoIconsManager=Class.create({_DISPLAY_INFO_BOX_DELAY:200,_currentInfoIconElement:null,_infoBoxElement:null,_closeInfoBoxHandlerPrebound:null,_mouseoverTimeout:null,initialize:function(a){mobile.observe("."+a,"mouseover",function(b){this._startDisplayInfoBox(b)
}.bindAsEventListener(this));
mobile.observe("."+a,"mouseout",function(b){this._stopDisplayInfoBox(b)
}.bindAsEventListener(this));
mobile.observe("."+a,"click",function(c,b){b.up("a").blur()
});
if(mobile.BrowserCheck.IE6){this._helper=new mobile.IE6Hover()
}},_startDisplayInfoBox:function(a){this._stopDisplayInfoBox();
var b=Prototype.Browser.IE?Object.clone(a):a;
this._mouseoverTimeout=setTimeout(this._displayInfoBox.bind(this,b),this._DISPLAY_INFO_BOX_DELAY)
},_stopDisplayInfoBox:function(){if(this._mouseoverTimeout){clearTimeout(this._mouseoverTimeout);
this._mouseoverTimeout=null
}},_displayInfoBox:function(d){var a=Event.findElement(d,"a");
var c=this._getInfoBox();
if(this._currentInfoIconElement!=a){var b=this._getInfoBoxContent(a);
this._updateInfoBoxContent(b);
this._updateInfoBoxTitle(a.getAttribute("title"));
this._currentInfoIconElement=a
}this._setInfoBoxAlignment(a);
c.show();
if(mobile.BrowserCheck.IE6){this._helper.showBackgroundFrame(this._getInfoBox())
}},_closeInfoBoxHandler:function(b,a){if(Prototype.Browser.IE||(b.relatedTarget!=b.currentTarget&&!b.relatedTarget.childOf(b.currentTarget))){a.hide();
if(mobile.BrowserCheck.IE6){this._helper.hideBackgroundFrame(this._getInfoBox())
}b.stop()
}},_getInfoBox:function(){if(!this._infoBoxElement){this._infoBoxElement=this._createInfoBoxElement()
}return this._infoBoxElement
},_createInfoBoxElement:function(){var a=new Element("div",{className:"infoBoxWrapper"});
a.innerHTML="<div class='shadow'></div><div class='infoBox'><div class='infoIconOrange'></div><h4>Info</h4><a href='#' class='close'></a><div class='content'></div></div>";
if(!(mobile.BrowserCheck.IE6&&documentBody.down(".ie6-position-fixed"))){documentBody.insert({bottom:a})
}else{documentBody.down(".page").insert({bottom:a})
}a.observe(Prototype.Browser.IE?"mouseleave":"mouseout",this._closeInfoBoxHandler.bindAsEventListener(this,a));
a.down(".close").observe("click",(function(b){a.hide();
b.findElement("a").blur();
b.stop()
}).bindAsEventListener());
return a
},_updateInfoBoxContent:function(a){this._getInfoBox().down(".content").update(a)
},_updateInfoBoxTitle:function(a){this._getInfoBox().down("h4").update(a)
},_getInfoBoxContent:function(b){var a=b;
var c=a.next(".infoBoxContent");
while(!c&&a!=documentBody){a=a.up();
c=a.next(".infoBoxContent")
}if(c){return c.innerHTML
}},_setInfoBoxPosition:function(a){this._getInfoBox().clonePosition(a.down("img"),{setWidth:false,setHeight:false,offsetLeft:-11,offsetTop:-11})
},_setInfoBoxAlignment:function(e){var g=this._getInfoBox();
var f=e.down("img");
var k=document.viewport.getDimensions();
var m=f.viewportOffset();
var b=f.cumulativeOffset();
var l=g.getDimensions();
var j=10;
var c=(k.height-m.top-l.height>j);
var a=(m.top-l.height>j);
var d=(k.width-m.left-l.width>j);
var i=(m.left-l.width>j);
var h=g.down(".infoBox");
if(!c&&a){g.setStyle({top:(b.top-l.height+2*j+1)+"px"});
h.addClassName("bottom")
}else{g.setStyle({top:(b.top-j-1)+"px"});
h.removeClassName("bottom")
}if(!d&&i){g.setStyle({left:(b.left-l.width+2*j+1)+"px"});
h.addClassName("right")
}else{g.setStyle({left:(b.left-j-1)+"px"});
h.removeClassName("right")
}}});
document.observe("mobile:ready",function(){new mobile.InfoIconsManager("infoIcon")
});if(typeof(mobile)=="undefined"){var mobile={}
}mobile.loader=Class.create({initialize:function(b,a){this._element=b;
this._loadingWrapper=new Element("div",{"class":"loadingWrapper"});
this._loadingImage=new Element("div",{"class":"loadingImage"});
this._loadingText=new Element("span",{"class":"loadingText"});
this._elementPosition=this._element.cumulativeOffset();
this._options=Object.extend({imageClassName:"",text:"",textClassName:"",zIndex:50000,opacity:0.5,insertIntoElement:false},a);
if(this._options.imageClassName!=""){this._loadingImage.removeClassName("loadingImage");
this._loadingImage.addClassName(this._options.imageClassName)
}if(this._options.textClassName!=""){this._loadingText.removeClassName("loadingText");
this._loadingText.addClassName(this._options.textClassName)
}if(this._options.text!=""&&this._loadingText.empty){this._loadingText.insert(this._options.text)
}},show:function(){this._loadingWrapper.insert(this._loadingImage);
this._loadingWrapper.insert(this._loadingText);
this._loadingWrapper.setStyle({zIndex:this._options.zIndex});
this._loadingWrapper.hide();
if(this._options.insertIntoElement){this._element.setStyle({position:"relative"});
this._element.insert(this._loadingWrapper)
}else{documentBody.insert(this._loadingWrapper)
}this._centerElement(this._loadingWrapper,this._element);
this._element.setOpacity(this._options.opacity);
this._loadingWrapper.show()
},hide:function(){if(this._loadingWrapper){if(this._options.insertIntoElement){this._element.setStyle({position:"static"})
}this._element.setOpacity(1);
this._loadingWrapper.remove()
}},_centerElement:function(g,d){g.absolutize();
if(this._options.insertIntoElement){var f=0;
var b=0
}else{var f=d.cumulativeOffset().left;
var b=d.cumulativeOffset().top
}var h=d.getWidth();
var j=d.getHeight();
var c=g.positionedOffset()[0];
var a=g.positionedOffset()[1];
var k=g.getWidth();
var i=g.getHeight();
var l=(b+(j/2))-(a+(i/2));
var e=(f+(h/2))-(c+(k/2));
g.setStyle({left:e+"px",top:l+"px"})
}});if(typeof(mobile)=="undefined"){var mobile={}
}mobile.ModelHelper=Class.create({_categoryElement:null,_makeElement:null,_modelElement:null,_previousCategoryValue:null,_previousMakeValue:null,_previousModelValue:null,_uriPrefix:null,_options:null,initialize:function(c){this._options=Object.extend({modelsPath:"models.html",makesPath:"makes.html",firstOptionMake:false,firstOptionModel:false,withCategory:false,isFirstUseModelIndexModelId:false},c);
this._categoryElement=$(c.categoryElement||"selectCategory");
this._makeElement=$(c.makeElement||"selectMake");
this._modelElement=$(c.modelElement||"selectModel");
this._descriptionElement=$(c.descriptionElement||"specifics.modelDescription");
if(!this._makeElement||!this._modelElement){return
}if(this._options.withCategory){this._categoryElement.observe("change",this.updateMakeList.bind(this,null))
}this._makeElement.observe("change",this.updateModelList.bind(this,null));
if(this._descriptionElement){this._modelElement.observe("change",this._updateDescription.bind(this))
}if(c.saveState&&mobile.stateHelper){Element.observe(window,"unload",this._saveStateHandler.bind(this))
}if(c.useFormAction){var e=this._makeElement.up("form");
if(e){this._uriPrefix=e.action.replace(/[^\/]*$/,"")
}}else{if(c.urlPrefix){this._uriPrefix=c.urlPrefix
}}if(this._options.withCategory&&$F(this._categoryElement)){var f=c.initialMakeId;
if(c.loadState&&mobile.stateHelper){var b=mobile.stateHelper.readProperty(this._categoryElement.id);
if(b){this._categoryElement.setValue(b)
}f=f||mobile.stateHelper.readProperty(this._makeElement.id)
}}var a=c.initialModelId;
if(c.loadState&&mobile.stateHelper){var d=mobile.stateHelper.readProperty(this._makeElement.id);
if(d){this._makeElement.setValue(d)
}a=a||mobile.stateHelper.readProperty(this._modelElement.id)
}if(this._options.withCategory&&$F(this._categoryElement)){this.updateMakeList(f,a);
if(Prototype.Browser.IE){if(this._modelElement.getDimensions()["width"]!="0"){this._modelElement.setStyle({width:this._modelElement.getDimensions()["width"]+"px"})
}}}else{if($F(this._makeElement)&&this._modelElement.options.length<=1){this.updateModelList(a)
}if(Prototype.Browser.IE){if(this._modelElement.getDimensions()["width"]!="0"){this._modelElement.setStyle({width:this._modelElement.getDimensions()["width"]+"px"})
}}}},updateMakeList:function(c,a){var b=$F(this._categoryElement);
if(b){this._retrieveMakes(b,c,a)
}else{this._deactivateMakeList()
}},updateModelList:function(a){var b=this._makeElement.value;
if(b){if(this._options.withCategory&&$F(this._categoryElement)){if($F(this._categoryElement)==="Car"){this._retrieveModels(b,a)
}else{this._deactivateModelList()
}}else{this._retrieveModels(b,a)
}}else{this._deactivateModelList()
}},_retrieveMakes:function(g,f,a){this._previousMakeValue=$F(this._makeElement);
if(this._previousCategoryValue&&(g!=this._previousMakeValue||this._previousMakeValue==1)){this._previousMakeValue=null
}this._previousCategoryValue=g;
var b=this.constructor._modelCache.get(g);
if(b){this._makeElement.update(b);
this._makeListUpdated(f)
}else{var d=(this._uriPrefix||"")+this._options.makesPath;
var e=Object.extend({category:g,lang:mobile.language||"de"},this.constructor._additionalParams);
var c=new Ajax.Updater({success:this._makeElement},d,{parameters:e,method:"get",onSuccess:function(h){if(typeof(this._options.firstOptionMake)=="string"){h.responseText=this._addFirstOption(this._options.firstOptionMake,h.responseText)
}}.bind(this),onComplete:this._makeListUpdated.bind(this,g,f,a)})
}},_retrieveModels:function(c,a){this._previousModelValue=$F(this._modelElement);
if(this._previousMakeValue&&(c!=this._previousMakeValue||this._previousModelValue==1)){this._previousModelValue=null
}this._previousMakeValue=c;
var b=this.constructor._modelCache.get(c);
if(b){this._modelElement.update(b);
this._modelListUpdated(a)
}else{var e=(this._uriPrefix||"")+this._options.modelsPath;
var f=Object.extend({makeId:c,lang:mobile.language||"de"},this.constructor._additionalParams);
if(this._options.withCategory){f=Object.extend({category:$F(this._categoryElement)},f)
}var d=new Ajax.Updater({success:this._modelElement},e,{parameters:f,method:"get",onSuccess:function(g){if(typeof(this._options.firstOptionModel)=="string"){g.responseText=this._addFirstOption(this._options.firstOptionModel,g.responseText)
}}.bind(this),onComplete:this._modelListUpdated.bind(this,c,a)})
}},_makeListUpdated:function(d,c,b){if(!this.constructor._modelCache.get(d)){this.constructor._modelCache.set(d,this._makeElement.innerHTML)
}var a=c||this._previousMakeValue;
if(a){this._makeElement.setValue(a)
}else{if(this._makeElement.options.length==2){this._makeElement.selectedIndex=1
}}mobile.FormHelper.enableFieldAndLabel(this._makeElement);
if(mobile.BrowserCheck.IE6){setTimeout(this.updateModelList.bind(this,b),100)
}else{this.updateModelList(b)
}},_modelListUpdated:function(c,b){if(!this.constructor._modelCache.get(c)){this.constructor._modelCache.set(c,this._modelElement.innerHTML)
}var a=b||this._previousModelValue;
if(a){this._modelElement.setValue(a)
}else{if(this._modelElement.options.length==2){this._modelElement.selectedIndex=1
}else{if(typeof(modelIndexModelId)!="undefined"){if(modelIndexModelId!=null&&modelIndexModelId.length>0&&!this._options.isFirstUseModelIndexModelId){this._modelElement.setValue(modelIndexModelId);
this._options.isFirstUseModelIndexModelId=true
}}}}if(typeof(maMoDefaultModel)!="undefined"){this._modelElement.value=$F(this._makeElement)+"-"+maMoDefaultModel;
maMoDefaultModel=""
}mobile.FormHelper.enableFieldAndLabel(this._modelElement)
},_deactivateModelList:function(){this._modelElement.selectedIndex=0;
if(this._modelElement.options[0]&&this._modelElement.options[0].text!==""){this._modelElement.options[0].text=""
}mobile.FormHelper.disableFieldAndLabel(this._modelElement)
},_deactivateMakeList:function(){this._makeElement.selectedIndex=0;
if(this._makeElement.options[0]&&this._makeElement.options[0].text!==""){this._makeElement.options[0].text=""
}mobile.FormHelper.disableFieldAndLabel(this._makeElement);
if(this._modelElement.options.length>1){this._deactivateModelList()
}},_updateDescription:function(){if(this._descriptionElement){var a=this._modelElement.options[this._modelElement.selectedIndex];
this._descriptionElement.value=a.value?a.text:"";
this._descriptionElement.focus()
}},_saveStateHandler:function(){if(this._options.withCategory){var a=$F(this._categoryElement)
}var b=$F(this._makeElement);
var c=$F(this._modelElement);
if(this._options.withCategory){mobile.stateHelper.writeProperty(this._categoryElement.id,a)
}mobile.stateHelper.writeProperty(this._makeElement.id,b);
mobile.stateHelper.writeProperty(this._modelElement.id,c)
},_addFirstOption:function(c,a){var b='<option value="">'+c+"</option>";
return(b+a)
}});
Object.extend(mobile.ModelHelper,{_instances:[],_additionalParams:{},_modelCache:$H(),getHelper:function(a){var b=new this(a);
this._instances.push(b);
return b
},updateAllModelLists:function(){this._instances.invoke("updateModelList")
},setAdditionalParams:function(a){this._additionalParams=a;
this._modelCache=$H()
}});(function(){function c(){if(typeof document.location.href!="undefined"&&document.location.href.length>0){return document.location.href
}else{if(typeof window.location.href!="undefined"&&window.location.href.length>0){return window.location.href
}else{if(typeof document.URL!="undefined"&&document.URL.length>0){return document.URL
}}}return""
}function b(){if(typeof document.location.hash!="undefined"){return document.location.hash
}else{if(typeof window.location.hash!="undefined"){return window.location.hash
}}return""
}function d(){if(typeof top.document.referrer!="undefined"){return top.document.referrer
}else{if(typeof document.referrer!="undefined"){return document.referrer
}}return""
}function a(e){var j={GERMANY:"4284-30318-12262-0",ROMANIA:"11425-67711-25143-0",POLAND:"12983-80845-27852-0",FRANCE:"13061-91731-30282-0",ITALY:"13060-91790-30283-0"};
var f=j[e]||j.GERMANY;
var g=d();
if(!g&&(location.search.indexOf("_refQA")>-1)){var k=location.search.toQueryParams();
g=k._refQA
}if(!g){return false
}var n=c();
var h=b();
if(h.length>0&&h.indexOf("#skip_ns")>-1){return false
}var m=["metager.de","suche.infospace.de","metacrawler.com",".excite.com","suche.fireball.","search.yahoo.com","search.msn.",".altavista.com","www.alltheweb.com","search.lycos.com/default.asp",".ask.com/web","www.google.com.au","images.google.com.au","ninemsn.com.au","search.aol.com.au","www.goeureka.com.au","au.anzwers.yahoo.com","www.yellowpages.com.au/search/searchEntry.do","search.bigpond.com","www.google.be/search","images.google.be/images","maps.google.be/maps","www.google.ba/search","images.google.ba/images","www.google.bg/search","images.google.bg/images","diri.bg/search.php","web.search.bg/search.php","www.all.bg","www.baidu.com/","image.baidu.com/","site.baidu.com/","seek.3721.com/","page.zhongsou.com/","hc360.zhongsou.com/","site.zhongsou.com/","search.sina.com.cn/","pic.sina.com.cn/","dir.sina.com.cn/","search.sohu.com/","image.search.sohu.com/","www.sogou.com/","nisearch.163.com/","psearch.163.com/","picsearch.163.com/","search.tom.com/","sitesearch.tom.com/","cn.websearch.yahoo.com/","cn.imagesearch.yahoo.com/","www.yisou.com/search","image.yisou.com/","www.google.dk/search","images.google.dk/images","www.google.de/search","www.google.de/product_url?q=","images.google.de/images","maps.google.de/maps","suche.aol.de/aol/search","suche.aol.de/aol/image","suche.freenet.de/suche","shopping.freenet.de/suchergebnis/index.html","suche.t-online.de/fast-cgi/tsc","suche.web.de/search/","dir.web.de","suche.lycos.de","webkatalog.lycos.de","search.live.com/results.aspx","www.google.ee/search","images.google.ee/images","www.google.fi/search","images.google.fi/images","www.google.fr/search","images.google.fr/images","maps.google.fr/maps","www.recherche.aol.fr","www.images.aol.fr","vachercher.lycos.fr/cgi-bin/pursuit","search.ke.voila.fr","recherche.wanadoo.fr","search1-2.free.fr","www.google.ge/search","images.google.ge/images","www.google.gr/search","images.google.gr/images","www.google.co.uk/search","images.google.co.uk/images","maps.google.co.uk/maps","search.aol.co.uk/web_uk.adp","www.ask.co.uk/res.asp","search.lycos.co.uk/cgi-bin/pursuit","search.orange.co.uk/all","www.google.it/search","images.google.it/images","maps.google.it/maps","search.virgilio.it","arianna.libero.it","business.libero.it/arianna/","search.tiscali.it","www.google.ca","ca.yahoo.com","www.toile.qc.ca","www.lycos.ca","www.google.hr/search","images.google.hr/images","www.google.lt/search","images.google.lt/images","search.delfi.lt/search.php","www.google.md/search","images.google.md/images","www.google.nl/search","images.google.nl/images","maps.google.nl/maps","www.ilse.nl/searchresults.dbl","pagina.nl","www.google.no/search","images.google.no/images","suche.lycos.at","www.google.at/search","images.google.at/images","maps.google.at/maps","austronaut.at/page.php","www.google.pl/search","images.google.pl/images","szukaj.onet.pl/query.html","szukaj.wp.pl/szukaj.html","www.google.pt/search","images.google.pt/images","www.google.ro/search","images.google.ro/images","www.google.ru/search","images.google.ru/images","yandex.ru/yandsearch","www.rambler.ru/srch","www.google.se/search","images.google.se/images","www.search.ch","www.google.ch/search","images.google.ch/images","maps.google.ch/maps","www.google.es/search","images.google.es/images","maps.google.es/maps","buscador.terra.es","buscar.ya.com","www2.yatv.com","busca.wanadoo.es/search","www.google.sk/search","images.google.sk/images","best.sk/search.aspx","search.centrum.sk","www.zoznam.sk/hladaj.fcgi","www.azet.sk/katalog/vyhladavanie/internet/","www.pozri.sk/hladaj.php","www.google.si/search","images.google.si/images","tw.yahoo.com","www.google.com.tw","images.google.com.tw","www.pchome.com.tw","image.pchome.com.tw","dir.pchome.com.tw","www.yam.com","wps.yam.com","dir.yam.com","www.msn.com.tw","www.google.cz/search","images.google.cz/images","search.seznam.cz","search.centrum.cz","www.google.ua/search","images.google.ua/images","www.google.hu/search","images.google.hu/images","ok.hu/katalogus","www.looksmart.com","www.google.com/search","images.google.com/images","maps.google.com/maps","directory.google.com","groups.google.com","aolsearch.aol.com","search.aol.com","s.teoma.com/","www.hotbot.com","search.hotbot.de","www.wisenut.com","search.netscape.com","www.bing.com/search","www.bing.com/images/search","www.bing.com/videos/search"];
for(var l=0;
l<m.length;
++l){if(g.indexOf(m[l])>-1){var o=["http://a","dfarm.medi","aplex.com/a","d/lt/",f].join("");
o+="?mpt="+(new Date().getTime());
if(typeof encodeURIComponent=="function"){o+="&mpcl="+encodeURIComponent(n);
o+="&mpvl="+encodeURIComponent(g)
}else{o+="&mpcl="+escape(n);
o+="&mpvl="+escape(g)
}document.write('<img src="'+o+'" alt="" border="0" width="1" height="1" />');
return
}}}if(typeof(mobile)!="undefined"){if(!mobile.dontUseNaturalSearch){a(mobile.siteId)
}}else{a()
}})();if(typeof(mobile)=="undefined"){var mobile={}
}mobile.PopupHelper={initPopupMenus:function(){mobile.observe("a.popup","click",(function(f,e){var b=1024;
var a=768;
var d=new RegExp(/^.*\s(\d{2,4}x\d{2,4}){1}.*$/).exec(e.getAttribute("class"));
if(d){var c=d[d.length-1].split("x");
if(d.length==2){b=c[0];
a=c[1]
}}this.openPopUp(e.getAttribute("href").strip(),b,a,50,50,"no","no","no","no","yes","yes");
return false
}).bind(this),{allowNested:true});
mobile.observe("a.close-popup","click",function(){window.close();
return false
})
},openPopUp:function(b,c,l,d,i,j,k,e,h,g,a){if(b&&b.indexOf("?")!=-1){b+="&isPopup=true"
}else{b+="?isPopup=true"
}var f=window.open(b,"popup","width="+c+",height="+l+",left="+d+",top="+i+",toolbar="+j+",location="+location+",directories="+k+",status="+e+",menubar="+h+",scrollbars="+g+",resizable="+a+"");
if(f){f.focus()
}},leavePopUpFocusOpener:function(a){window.opener.location.href=a;
window.opener.focus()
}};
document.observe("mobile:ready",function(){mobile.PopupHelper.initPopupMenus()
});if(typeof(mobile)=="undefined"){var mobile={}
}mobile.SearchViewData={};
Object.extend(mobile.SearchViewData,{_relevantSearchParams:null,getRelevantRequestParams:function(){if(!this._relevantSearchParams){var a=$H(location.search.toQueryParams());
this._relevantSearchParams=this.normalizeSearchParams(a)
}return this._relevantSearchParams
},normalizeSearchParams:function(c){var d=$w("isSearchRequest lang _features bodyStyleRadio sortOption.sortBy sortOption.sortOrder pageNumber __lp siteId");
var b=$H({scopeId:"C","export":"NO_EXPORT",damageUnrepaired:"NO_DAMAGE_UNREPAIRED","makeModelVariant1.searchInFreetext":"false","makeModelVariant2.searchInFreetext":"false","makeModelVariant3.searchInFreetext":"false",negativeFeatures:"EXPORT",vehicleCategory:"Car",segment:"Car"});
var a=$H();
c.each(function(e){if(!e.value){return
}if(d.include(e.key)){return
}if(b.get(e.key)==e.value){return
}if(e.key=="minPowerAsArray"||e.key=="maxPowerAsArray"){if(e.value[0]==""){return
}}a.set(e.key,e.value)
},this);
return a
},addRequiredParams:function(a){var b=$H({scopeId:"C",isSearchRequest:true});
return b.merge(a)
},getMinimalValidSearchParams:function(a){var b=this.normalizeSearchParams(a);
return this.addRequiredParams(b)
},addSessionParamsToLink:function(b,a,g){var e=b.href;
var c=(g)?g:e.split("?")[0];
var d=$H(e.toQueryParams());
var a=$H(a.toQueryParams());
var f=a.merge(d);
c=c+"?"+f.toQueryString();
return c
}});if(typeof(mobile)=="undefined"){var mobile={}
}mobile.shortUrl={create:function(b,g,a){var f="__callback"+(new Date()).getTime();
var c=false;
var e=new Element("script",{type:"text/javascript"});
e.src=mobile.PageParams.shortUrlServiceUrl+"share?callback=mobile.shortUrl."+f+"&url="+encodeURIComponent(b);
var d=setTimeout(function(){c=true;
g(a||"http://mobile.de");
this[f]=Prototype.emptyFunction
},1500);
this[f]=function(h){if(!c){clearTimeout(d);
g(h)
}};
documentBody.insert(e);
return f
},createForCurrentPage:function(d,c,a){var b=c?this.urlWithAnalytics(document.URL,c):document.URL;
return this.create(b,d,a)
},urlWithAnalytics:function(a,b){return a+(a.indexOf("?")==-1?"?":"&")+"utm_medium=socialmedia&utm_campaign=generic&utm_source="+b
}};if(typeof(mobile)=="undefined"){var mobile={}
}mobile.spinner=Class.create({_element:null,_wrapper:null,_cover:null,_image:null,_imageLoaded:false,_lastShown:null,initialize:function(b,a){this._element=$(b);
this._options=Object.extend({opacity:0.7,image:"images/spinner.gif",minShowTime:0,styles:{}},a);
this._image=new Image();
this._image.onload=function(){this._imageLoaded=true
}.bind(this);
this._image.onerror=function(c){console.log("error: ",c)
};
this._image.src=this._options.image
},show:function(a){if(!this._wrapper){this._wrapper=new Element("div",{style:"position: absolute;"});
this._wrapper.hide();
this._cover=new Element("div",{style:"background-color: white; width: 100%; height: 100%;"});
this._wrapper.insert(this._cover);
this._wrapper.setStyle(this._options.styles);
documentBody.insert(this._wrapper);
this._showImage()
}setTimeout((function(){var c=this._element.cumulativeOffset();
var b=this._element.getDimensions();
this._wrapper.setStyle({width:b.width+"px",height:b.height+"px",left:c.left+"px",top:c.top+"px"});
this._cover.setOpacity(a?1:this._options.opacity);
this._wrapper.show();
this._lastShown=new Date()
}).bind(this),10)
},_showImage:function(){if(!this._imageLoaded){this._showImage.bind(this).delay(0.1)
}else{this._wrapper.insert(this._image);
this._image=this._wrapper.down("img");
this._image.setStyle({position:"absolute",top:"50%",left:"50%",marginLeft:"-"+this._image.width/2+"px",marginTop:"-"+this._image.height/2+"px"});
this._image.show()
}},hide:function(){if(!this._wrapper){return
}var a=new Date()-this._lastShown;
if(!this._lastShown||a>=this._options.minShowTime*1000){this._wrapper.hide()
}else{this.hide.bind(this).delay(this._options.minShowTime-a/1000+10/1000)
}}});
Object.extend(mobile.spinner,{_defaults:{},setDefaults:function(a){this._defaults=a
},getSpinner:function(b,a){b=$(b);
var d=b.retrieve("spinner");
if(!d){var c=Object.extend(this._defaults,a);
d=new mobile.spinner(b,c);
b.store("spinner",d)
}return d
},show:function(b,a){this.getSpinner(b,a).show()
},hide:function(a){this.getSpinner(a).hide()
}});if(typeof(mobile)=="undefined"){var mobile={}
}mobile.stateHelper={_currentHash:null,hasProperty:function(a){return(this.readProperty(a)!==undefined)
},readProperty:function(a){this._readHash();
var b=this._currentHash.get(a);
return b
},writeProperty:function(a,b){this._readHash();
if(this._currentHash.get(a)==b){return
}else{this._currentHash.set(a,b);
this._writeHash()
}},_readHash:function(){if(!this._currentHash){var b;
try{b=window.name.evalJSON(true)
}catch(a){b={}
}this._currentHash=$H(b)
}},_writeHash:function(){if(this._currentHash&&this._currentHash.size()>0){window.name=this._currentHash.toJSON()
}}};if(typeof(mobile)=="undefined"){var mobile={}
}if(typeof(mobile.webAnalyticsParams)=="undefined"){mobile.webAnalyticsParams={}
}mobile.webAnalyticsParams.basePageCode=(mobile.PageParams.isDealer)?"/"+mobile.language+"/dealer":"/"+mobile.language+"/public";
mobile.GoogleWebAnalyticsTrackEvent=Class.create({_options:null,_elements:null,_match:null,initialize:function(b,a){this._elements=$H(b||{});
this._options=Object.extend({parentElement:documentBody,allowNested:false,stopEvent:false,skipTextInputFields:true},a||{})
},track:function(a){if(!(a.tagName=="INPUT"&&a.getAttribute("type")=="text"&&this._options.skipTextInputFields)){this._elements.keys().each(function(b){if(a.match(b)){_gaq.push(this._elements.get(b))
}}.bind(this))
}},trackEvents:function(a){var b=this._elements.keys().join(", ");
mobile.observe(b,"click",function(d,c){this.track(c)
}.bind(this),{parentElement:this._options.parentElement,allowNested:this._options.allowNested,stopEvent:this._options.stopEvent})
}});