/* $Id: navigations.js 11513 2010-12-21 13:41:34Z dvrhein $ */
"use strict";function deactivateDataTableNavigation(a){a.style.visibility="hidden"}function hoverEffectNavLvlOneBtn(a,b){if("hover"===a){b.getElementsByTagName("td")[0].style.backgroundPosition="0px -43px";b.getElementsByTagName("a")[0].style.color="white"}else{if("normal"===a){b.getElementsByTagName("td")[0].style.backgroundPosition="0px 0px";b.getElementsByTagName("a")[0].style.color="black"}else{alert("Fehler in Parameteruebergabe.")}}}function hoverEffectNavLvlFourBtn(a,b){if("hover"===a){b.getElementsByTagName("td")[0].style.backgroundPosition="0px -37px";b.getElementsByTagName("a")[0].style.color="white"}else{if("normal"===a){b.getElementsByTagName("td")[0].style.backgroundPosition="0px 0px";b.getElementsByTagName("a")[0].style.color="black"}else{alert("Fehler in Parameteruebergabe.")}}}function doBannerSlide(a){jQuery("#teaserSlider").animate({marginLeft:a},600)}function bannerSlide(a,d){var b,e,c;switch(a){case 1:c=293;break;case 3:c=879;break;default:c=879}e=parseInt(document.getElementById("teaserSlider").style.marginLeft,10);if("left"===d&&-1758<e){b=(e-c)+"px";doBannerSlide(b)}if("right"===d&&0>e){b=(e+c)+"px";doBannerSlide(b)}}jQuery(document).ready(function(){jQuery(window).unload(function(){jQuery(".navigationLvl2, .navigationLvl3, .soccercard").css("visibility","hidden")});jQuery("#teaserSlider").animate({marginLeft:"0px"},600);jQuery(".navigationLvl2, .navigationLvl3").css("visibility","hidden");jQuery(".callToActionLink").hover(function(){jQuery(this).siblings(".closer").css("backgroundPosition","0 -25px")},function(){jQuery(this).siblings(".closer").css("backgroundPosition","0 0")});jQuery(".callToActionMainActionLink").hover(function(){jQuery(this).siblings(".closer").css("backgroundPosition","0 -25px")},function(){jQuery(this).siblings(".closer").css("backgroundPosition","0 0")});jQuery(".modelDataTableCategoryLinkOpenClose").click(function(){jQuery(this).css("backgroundPosition","0 -39px");jQuery(this).parent("tr").next(".category").children(".categoryContent").css("border","1px solid red")});jQuery("#modelName").css("cursor","pointer");jQuery("#modelName").click(function(){location.replace("lacetti-overview.html")});var a=jQuery("#navigationFirstModel").offset()});function findPos(c){var b=0,d=0,a=c;while(a.offsetParent){b+=a.offsetLeft;d+=a.offsetTop;a=a.offsetParent}return[b,d]}function handle_main_nav(){return true}jQuery(document).ready(function(){var a={isTypeHtmlElement:function(g){return(typeof(g)==="object"&&g.nodeName&&typeof(g.nodeType==="number"))?true:false},isTypeString:function(g){return(typeof(g)==="string")},isTypeBoolean:function(g){return(typeof(g)==="boolean")},isTypeNumber:function(g){return(typeof(g)==="number")},isTypeArray:function(g){return(typeof(g)==="object"&&g instanceof Array)},getDomElement:function(h){var g="";if(jQuery){switch(arguments[1]){case"id":g="#";break;case"class":g=".";break;default:g=""}return jQuery(g+h)}else{switch(arguments[1]){case"id":return document.getElementById(h);break;case"class":return document.getElementsByName(h)[0];break;default:return document.getElementsByTagName(h)[0]}}},oExtend:function(i,g){var h=function(){};h.prototype=g.prototype;i.prototype=new h();i.prototype.constructor=i},oConv:function(h){var k={};for(var j=0,g=h.length;j<g;j++){k[h[j]]=null}return k}};function d(g){this.init(g)}d.prototype.delay=290;d.prototype.elementHoverClassName="hover";d.prototype.elementSelectedClassName="selected";d.prototype.init=function(g){this.rootElement=g};d.prototype.apply=function(){if(!jQuery){alert("Framework 'jQuery' not found!");return false}try{(a.isTypeHtmlElement(this.rootElement))?true:this.rootElement=a.getDomElement(this.rootElement,"id")}catch(g){alert("The html-element can not be found or is not of type ID-Element.\n"+g);return false}try{(this.rootElement.nodeName==="UL"||this.rootElement.nodeName==="ul")?true:false}catch(g){alert("Selected element is not of type 'UL'!");return false}this._scanItems()};d.prototype._stack=[];d.prototype._getRoot=function(){return this.rootElement};d.prototype._addStack=function(g){window.clearTimeout(this._stack[0]);this._stack[0]=g};d.prototype._emptyStack=function(){while(0<this._stack.length){window.clearTimeout(this._stack[0]);this._stack.shift()}};d.prototype._scanItems=function(){var h=jQuery(this.rootElement).find("li");var g=this.rootElement;jQuery(h).each(function(j){h[j]=new e(jQuery(this),g);h[j].constructor=h[j]})};function e(h,g){this.htmlElement=h;this.rootElement=g;this.addEvents()}a.oExtend(e,d);e.prototype.addEvents=function(){var i=this;var h=this.htmlElement;var g=jQuery(this.htmlElement).hover(function(){var k=jQuery(this);var j=k.siblings("li");j.removeClass(i.elementHoverClassName);j.removeClass(i.elementSelectedClassName);k.addClass(i.elementHoverClassName);i.activateParentItems(this)},function(){jQuery(this).removeClass(i.elementHoverClassName);i._addStack(window.setTimeout(function(){i.hideMenu(h)},i.delay))});if(isMobile()){g.click(function(j){j.stopPropagation();i._addStack(window.setTimeout(function(){i.showMenu(h)},i.delay));if(g.find("ul").length>0&&!h.children("a:first").hasClass("sdtNavigationCallToAction")&&!h.children("div:first").hasClass("boxTop")){return false}})}else{g.mouseover(function(){i._addStack(window.setTimeout(function(){i.showMenu(h)},i.delay));return false})}};e.prototype.activateParentItems=function(g){var h=jQuery(g).parent("ul:first");if(jQuery(h).attr("id")!=jQuery(this.rootElement).attr("id")){h=jQuery(h).parent("li");jQuery(h).addClass(this.elementHoverClassName);this.activateParentItems(h)}};e.prototype.showMenu=function(h){var i=jQuery(h);var g=i.siblings("li");g.removeClass(this.elementSelectedClassName);i.find("li").removeClass(this.elementSelectedClassName);i.parent("ul").parent("li").addClass(this.elementSelectedClassName);g.find("ul").css("visibility","hidden");i.find("ul:first").css("visibility","visible")};e.prototype.hideMenu=function(h){var i=jQuery(h);var g=i.siblings("li");g.find("ul").css("visibility","hidden");i.removeClass(this.elementSelectedClassName).find("ul").css("visibility","hidden")};function f(){var g=jQuery("#navigationFirstModel").offset();var h=jQuery("ul#navigationLvl1").find("ul.soccercard");jQuery.each(h,function(){var i=jQuery(this).offset();jQuery(this).css("top","-"+(parseInt(i.top,10)-parseInt(g.top,10))+"px")})}f();var c="navigationLvl1";var b=new d(c);b.apply()});
