bt = new Object(); bt.searchbox = new Class({ options: { clearOnOpen:false
}, initialize: function(elOpener,elBox,options){ this.setOptions(options); this.elO = $(elOpener); this.elB = $(elBox); this.open = false; $(this.elO).addEvent('click', this.showForm.bindWithEvent(this)); $(this.elB).addEvent('mouseleave', this.hideForm.bindWithEvent(this));}, showForm: function(){ if(!this.open){ this.showFormWorker();}
}, showFormWorker: function(){ $(this.elB).setStyle('opacity','1'); $(this.elB).setStyle('display','block'); $(this.elO).setStyle('display','none'); if(this.options.clearOnOpen)
$(this.elB).getElement('input.searchinput').value=""; $(this.elB).getElement('input.searchinput').focus(); this.open = true;}, hideForm: function(i){ if(this.open){ this.hideFormWorker.delay(1000,this);}
}, hideFormWorker: function(){ var myFx = new Fx.Morph($(this.elB), { onComplete: (function(){ $(this.elO).setStyle('display','block'); $(this.elB).setStyle('display','none'); this.open = false;}).bind(this)
}).start({'opacity': 0 });}
}); bt.searchbox.implement(new Options(), new Events()); bt.mooMenue = new Class({ options: { useIESelectFix:false, duration:350, classSubnavi:'hasSubnavi', classActive:'active'
}, initialize: function(el,options){; this.setOptions(options); this.oDropDownRoot = el; if(!this.oDropDownRoot) { dbug.log('mooDropDown error: Element oRoot is not defined or not found'); return;}
this.setChildProperties(this.oDropDownRoot);}, setChildProperties: function(oObj){ var aChilds = oObj.getChildren(); aChilds.each(function(oChild){ if(oChild.tagName=='LI'){ var oChildChilds = oChild.getChildren(); oChildChilds.each(function(oChild2){ if(oChild2.tagName=='UL'){ oChild.firstChild.addClass(this.options.classSubnavi); this.setChildProperties(oChild2); var fx1 = new Fx.Morph(oChild2, { 'duration': this.options.duration }); var fx2 = new Fx.Morph(oChild2, { 'duration': this.options.duration }); var fx3 = new Fx.Morph(oChild2, { 'duration': this.options.duration }); var fx4 = new Fx.Morph(oChild2, { 'duration': this.options.duration }); oChild.addEvent('mouseenter',(function(){ if(this.options.useIESelectFix && ( window.ie || window.ie7) )$$('select').setStyle('display','none'); fx2.cancel();fx3.cancel();fx4.cancel(); fx1.start({'opacity': '1'}); if(!oChild.hasClass(this.options.classActive)){oChild.addClass(this.options.classActive);}
}).bind(this)); oChild.addEvent('mouseleave',(function(){ if(this.options.useIESelectFix && ( window.ie || window.ie7) )$$('select').setStyle('display','block'); fx1.cancel();fx3.cancel();fx4.cancel(); fx2.start({'opacity': '0'}); if(oChild.hasClass(this.options.classActive)){oChild.removeClass(this.options.classActive);}
}).bind(this)); oChild2.addEvent('mouseenter',(function(){ if(this.options.useIESelectFix && ( window.ie || window.ie7) )$$('select').setStyle('display','none'); fx1.cancel();fx2.cancel();fx4.cancel(); fx3.start({'opacity': '1'});}).bind(this)); oChild2.addEvent('mouseleave',(function(){ if(this.options.useIESelectFix && ( window.ie || window.ie7) )$$('select').setStyle('display','block'); fx1.cancel();fx3.cancel();fx3.cancel(); fx4.start({'opacity': '0'});}).bind(this));}
},this);}
},this);}
}); bt.mooMenue.implement(new Options); window.addEvent('domready', function(){ $$('.mooDownMenue').each(function(mooObj){ new bt.mooMenue(mooObj);}); new bt.searchbox('searchInputOpener','searchInputBox',{});}); 
