// (c)2002 Douglas Crokford

var gebDatCetelem;var abortCetelem;function noreturn(e){return e.keyCode==13?false:true;}
function chkformcetelem(){var ok=new Boolean(true);var texteingabe=document.getElementById("datecetelem").value;var regex=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/;if(document.getElementById("datecetelem").value.search(regex)==-1)
{alert("Bitte geben Sie ihren Geburtstag in Form 'TT.MM.JJJJ' an!");ok==false;}
else
{gebDatCetelem=texteingabe;document.getElementById("datecetelem").onclick=PopUpcetelem();}}
function oeffnefenstercetelem(url){fenster=window.open(url,"fenster1","width=600,height=400,status=yes,scrollbars=yes,resizable=yes");fenster.focus();}
function PopUpcetelem(){var URL="https://www.finanzierung.dresdner-cetelem.de/Dresdner_Cetelem_Finanzierung/faces/WEB-INF/jsp/creditoffering/entry.jsp?resetSession=true&/AuthentificationData/vendorID=1503&/CreditCalculator/materialInfo=Musterkauf&/CreditCalculator/creditType=0&/CreditCalculator/creditName=Ratenkredit%20BWM%20indirekt&/CreditCalculator/creditAmount=2500,00&/CreditCalculator/goodsPrice=5000,00&/CreditCalculator/birthdateCreditholder="+gebDatCetelem;var Fensteroptionen="toolbar=0,scrollbars= 1,location=0,statusbar=0,menubar=0,resizable=0";var optimalHeight=750;var optimalWidth=900;if(optimalHeight>screen.height)
optimalHeight=screen.height*0.9;if(optimalWidth>screen.width)
optimalWidth=screen.width*0.9;window.open(URL,'Name',Fensteroptionen);}
function bilder(){var alle_bilder=document.getElementsByTagName('img');for(i=0;i<alle_bilder.length;i++){alle_bilder[i].onmousedown=auf_einem_bild;alle_bilder[i].oncontextmenu=auf_einem_bild;}}
function auf_einem_bild(e)
{if(!e)
e=window.event;if((e.type&&e.type=="contextmenu")||(e.button&&e.button==2)||(e.which&&e.which==3))
{if(window.opera)
window.alert("Sorry: Diese Funktion ist deaktiviert.");return false;}}
if(document.layers)
document.captureEvents(Event.MOUSEDOWN);window.onload=bilder;function blink(speed){if(speed){if(document.all)
setInterval("blink()",speed*1000)
return;}
var blink=document.all.tags("BLINK")
for(var i=0;i<blink.length;i++)
blink[i].style.visibility=blink[i].style.visibility==""?"hidden":""}
blink(0.7);function popup(){var window_string="width=469, height=849, resizable='no', scrollbars='no'";window.open("http://www.innova.ag/images/aktuelle_werbung/popup_01062007.html","popup",window_string);}
function AC_AddExtension(src,ext)
{if(src.indexOf('?')!=-1)
return src.replace(/\?/,ext+'?');else
return src+ext;}
function AC_Generateobj(objAttrs,params,embedAttrs)
{var str='<object ';for(var i in objAttrs)str+=i+'="'+objAttrs[i]+'" ';str+='>';for(var i in params)str+='<param name="'+i+'" value="'+params[i]+'" /> ';str+='<embed ';for(var i in embedAttrs)str+=i+'="'+embedAttrs[i]+'" ';str+=' ></embed></object>';document.write(str);}
function AC_FL_RunContent(){var ret=AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_SW_RunContent(){var ret=AC_GetArgs
(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"id":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}
ret.objAttrs["classid"]=classid;if(mimeType)ret.embedAttrs["type"]=mimeType;return ret;}
var switcher;function checkflash(){with(navigator)if(appName.indexOf('Microsoft')!=-1&&appVersion.indexOf('Mac')==-1)document.write(''+'<scr'+'ipt language="VBScript">\nOn error resume next\n'+'det_flash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))\n</scr'+'ipt>');var plugin="Shockwave Flash";with(navigator)if(appName.indexOf('Microsoft')==-1||(plugins&&plugins.length)){switcher=(plugins&&plugins[plugin]);}else if(appVersion.indexOf('3.1')==-1){if(plugin.indexOf("Flash")!=-1&&window.det_flash!=null)switcher=window.det_flash;}}
function genflashtop(){var protocol=(('https:'==document.location.protocol)?'https://':'http://');if(switcher){AC_FL_RunContent('codebase',protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','wmode','transparent','width','800','height','110','src',protocol+'www.innova-medien.de/flash/werbung/werbung_oben_biz','quality','high','pluginspage',protocol+'www.macromedia.com/go/getflashplayer','movie',protocol+'www.innova-medien.de/flash/werbung/werbung_oben_biz');}else{document.write("<a href='http://www.innova.ag/linklwerbung.html' target='_top'><img src='"+protocol+"www.innova-medien.de/flash/werbung/werbung_oben_weiss.jpg' width='800' height='110' border='0'></a>");}}
function genflashcountdown(){var protocol=(('https:'==document.location.protocol)?'https://':'http://');if(switcher){AC_FL_RunContent('codebase',protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0','wmode','transparent','width','253','height','255','src',protocol+'www.innova-medien.de/flash/werbung/countdown','quality','high','pluginspage',protocol+'www.macromedia.com/go/getflashplayer','movie',protocol+'www.innova-medien.de/flash/werbung/countdown');}else{document.write("");}}
function genflashright(){var protocol=(('https:'==document.location.protocol)?'https://':'http://');document.write("<div class='partner'><a href='http://www.innova-reisen.de' title='Lust auf Urlaub?' target='_blank'><img src='/App_Themes/Innova/images/giata.jpg' alt='Lust auf Urlaub?' style='margin-top: 20px; border: 0px;' /></a></div>");document.write("<div class='partner'><a href='http://www.innsula.de' title='&Ouml;kologisch bauen! Niedrigenergieh&auml;user zu Festpreisen mit INNSULA' target='_blank'><img src='/App_Themes/Innova/images/banner_innsula.jpg' alt='&Ouml;kologisch bauen! Niedrigenergieh&auml;user zu Festpreisen mit INNSULA' style='margin-top: 20px; border: 0px;' /></a></div>");document.write("<div class='partner'><a href='http://www.innova-kuechen.de/' title='Innova Kuechen' target='_blank'><img src='/App_Themes/Innova/images/buttonkueche.png' alt='Innova Kuechen' style='margin-top: 20px; border: 0px;' /></a></div>");document.write("<div class='partner'><a href='http://www.noxxslogistic.de' title='Versandl&ouml;sungen f&uuml;r jede Gr&ouml;&szlig;e - NOXXS LOGISTIC' target='_blank'><img src='/App_Themes/Innova/images/gel.gif' alt='Versandl&ouml;sungen f&uuml;r jede Gr&ouml;&szlig;e - NOXXS LOGISTIC' style='margin-top: 20px; border: 0px;' /></a></div>");}
function genMusicControl(){if(switcher){var protocol=(('https:'==document.location.protocol)?'https://':'http://');AC_FL_RunContent('codebase',protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0','wmode','transparent','width','110','height','25','src',protocol+'www.innova.ag/uploads/tx_rlmpflashdetection/music','quality','high','pluginspage',protocol+'www.macromedia.com/go/getflashplayer','movie',protocol+'www.innova.ag/uploads/tx_rlmpflashdetection/music','base','www.innova.ag/uploads/tx_rlmpflashdetection/');}}
function genflashnurheute(){var protocol=(('https:'==document.location.protocol)?'https://':'http://');document.write("<h4>Nur heute!</h4>");document.write("<p>Hier finden Sie ausgew&auml;hlte Artikel die nur heute zu besonders g&uuml;nstigen Preisen erh&auml;ltlich sind.</p>");if(switcher){AC_FL_RunContent('codebase',protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0','wmode','transparent','width','750','height','537','src',protocol+'www.innova-medien.de/flash/nurheute/aktuell/nurheute','quality','high','pluginspage',protocol+'www.macromedia.com/go/getflashplayer','movie',protocol+'www.innova-medien.de/flash/nurheute/aktuell/nurheute');}else{wirnurheutepic();}}
function popupvideo(Adresse){var VideoLink="/App_Themes/Innova/Templates/ItemVideo.html?"+Adresse;VideoFenster=window.open(VideoLink,"Video","width=400,height=278,scrollbars=no,status=no,resizable=no");VideoFenster.focus();}
checkflash();$(document).ready(function(){$("#at_flag").click(function(){if($("#at_flag_pos").css('display')=='none'){if($("#pl_flag_pos").css('display')!='none'){$("#pl_flag").click();}
$("#at_flag_pos").show("blind",{direction:"vertical"},50);}
else{$("#at_flag_pos").hide("blind",{direction:"vertical"},50);}});$("#pl_flag").click(function(){if($("#pl_flag_pos").css('display')=='none'){if($("#at_flag_pos").css('display')!='none'){$("#at_flag").click();}
$("#pl_flag_pos").show("blind",{direction:"vertical"},50);}
else{$("#pl_flag_pos").hide("blind",{direction:"vertical"},50);}});$("#at_flag_pos").position({my:"left top",at:"left bottom",of:"#at_flag",offset:"-5 0"});$("#pl_flag_pos").position({my:"left top",at:"left bottom",of:"#pl_flag",offset:"-5 0"});$(document).keypress(function(e){if(e.keyCode==27){$("#ctl00_Pagetable_head_divNavMain").click();}});$("#ctl00_Pagetable_head_divNavMain").click(function(){if($("#at_flag_pos").css('display')!='none'){$("#at_flag").click();}
if($("#pl_flag_pos").css('display')!='none'){$("#pl_flag").click();}});$("#imgDoZoom").click(function(){$("#imgContainer").click();});$("#imgContainer").click(function(){var $bigImgParent=$("#imgZoom");var $bigImg=$bigImgParent.find("img");var $imgParent=$("#image");var $img=$imgParent.find("img");var $imgPos=$img.position();var $imgWidth=$img.width();var $imgHeight=$img.height();if($bigImgParent.css('display')=='none'){var bigImg=document.createElement("img");bigImg.src=$bigImg.attr("src");var bigImgSrc=bigImg.src;var $imgLink_Url=$bigImg.attr("src");if($imgLink_Url!=''){$bigImg.css({height:$imgHeight,width:$imgWidth,opacity:1,border:"1px solid #000000"});$bigImgParent.css({display:"block",left:$imgPos.left,top:$imgPos.top+10});$bigImg.animate({width:bigImg.width,height:bigImg.height},"slow","swing",function(){})}}
else{$bigImg.animate({width:$imgWidth,height:$imgHeight,opacity:.5},"slow","swing",function(){$bigImgParent.css("display","none");})}});$("#setMoreImagesList li a").each(function(){var mediumImg=document.createElement("img");mediumImg.src=$(this).attr("rev")});$("#setMoreImagesList").delegate("li","mouseenter",function(){var $imgAnchor=$("#image");var mediumImg=$(this).find("a").attr("rev");var largeImg=$(this).find("a").attr("href");$imgAnchor.find("img").attr("src",mediumImg);$imgAnchor.attr("href",largeImg);$("#imgZoom").find("img").attr("src",largeImg)}).delegate("li","click",function(event){event.preventDefault()});$('#tickeroffers').marquee({speed:3,vertical:false,draggable:true,speedUp:'#btSpeedLeft',speedDown:'#btSpeedRight',clsSpeedUp:'btntickerspeedlefta',clsSpeedDown:'btntickerspeedrighta',clsDrag:'onDrag',enableCookie:true,enableScroll:true,stepScroll:10,enableAnimateScroll:true,animateScrollDuration:250,animateScrollEasing:'linear'});});;(function($){var ie6=$.browser.msie&&parseInt($.browser.version)==6&&typeof window['XMLHttpRequest']!="object",ieQuirks=null,w=[];$.modal=function(data,options){return $.modal.impl.init(data,options);};$.modal.close=function(){$.modal.impl.close();};$.fn.modal=function(options){return $.modal.impl.init(this,options);};$.modal.defaults={appendTo:'body',focus:true,opacity:50,overlayId:'simplemodal-overlay',overlayCss:{},containerId:'simplemodal-container',containerCss:{},dataId:'simplemodal-data',dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:false,autoPosition:true,zIndex:1000,close:true,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:'simplemodal-close',escClose:true,overlayClose:false,position:null,persist:false,modal:true,onOpen:null,onShow:null,onClose:null};$.modal.impl={o:null,d:{},init:function(data,options){var s=this;if(s.d.data){return false;}ieQuirks=$.browser.msie&&!$.boxModel;s.o=$.extend({},$.modal.defaults,options);s.zIndex=s.o.zIndex;s.occb=false;if(typeof data=='object'){data=data instanceof jQuery?data:$(data);s.d.placeholder=false;if(data.parent().parent().size()>0){data.before($('<span></span>').attr('id','simplemodal-placeholder').css({display:'none'}));s.d.placeholder=true;s.display=data.css('display');if(!s.o.persist){s.d.orig=data.clone(true);}}}else if(typeof data=='string'||typeof data=='number'){data=$('<div></div>').html(data);}else{alert('SimpleModal Error: Unsupported data type: '+typeof data);return s;}s.create(data);data=null;s.open();if($.isFunction(s.o.onShow)){s.o.onShow.apply(s,[s.d]);}return s;},create:function(data){var s=this;w=s.getDimensions();if(s.o.modal&&ie6){s.d.iframe=$('<iframe src="javascript:false;"></iframe>').css($.extend(s.o.iframeCss,{display:'none',opacity:0,position:'fixed',height:w[0],width:w[1],zIndex:s.o.zIndex,top:0,left:0})).appendTo(s.o.appendTo);}s.d.overlay=$('<div></div>').attr('id',s.o.overlayId).addClass('simplemodal-overlay').css($.extend(s.o.overlayCss,{display:'none',opacity:s.o.opacity/100,height:s.o.modal?w[0]:0,width:s.o.modal?w[1]:0,position:'fixed',left:0,top:0,zIndex:s.o.zIndex+1})).appendTo(s.o.appendTo);s.d.container=$('<div></div>').attr('id',s.o.containerId).addClass('simplemodal-container').css($.extend(s.o.containerCss,{display:'none',position:'fixed',zIndex:s.o.zIndex+2})).append(s.o.close&&s.o.closeHTML?$(s.o.closeHTML).addClass(s.o.closeClass):'').appendTo(s.o.appendTo);s.d.wrap=$('<div></div>').attr('tabIndex',-1).addClass('simplemodal-wrap').css({height:'100%',outline:0,width:'100%'}).appendTo(s.d.container);s.d.data=data.attr('id',data.attr('id')||s.o.dataId).addClass('simplemodal-data').css($.extend(s.o.dataCss,{display:'none'})).appendTo('body');data=null;s.setContainerDimensions();s.d.data.appendTo(s.d.wrap);if(ie6||ieQuirks){s.fixIE();}},bindEvents:function(){var s=this;$('.'+s.o.closeClass).bind('click.simplemodal',function(e){e.preventDefault();s.close();});if(s.o.modal&&s.o.close&&s.o.overlayClose){s.d.overlay.bind('click.simplemodal',function(e){e.preventDefault();s.close();});}$(document).bind('keydown.simplemodal',function(e){if(s.o.modal&&s.o.focus&&e.keyCode==9){s.watchTab(e);}else if((s.o.close&&s.o.escClose)&&e.keyCode==27){e.preventDefault();s.close();}});$(window).bind('resize.simplemodal',function(){w=s.getDimensions();s.setContainerDimensions(true);if(ie6||ieQuirks){s.fixIE();}else if(s.o.modal){s.d.iframe&&s.d.iframe.css({height:w[0],width:w[1]});s.d.overlay.css({height:w[0],width:w[1]});}});},unbindEvents:function(){$('.'+this.o.closeClass).unbind('click.simplemodal');$(document).unbind('keydown.simplemodal');$(window).unbind('resize.simplemodal');this.d.overlay.unbind('click.simplemodal');},fixIE:function(){var s=this,p=s.o.position;$.each([s.d.iframe||null,!s.o.modal?null:s.d.overlay,s.d.container],function(i,el){if(el){var bch='document.body.clientHeight',bcw='document.body.clientWidth',bsh='document.body.scrollHeight',bsl='document.body.scrollLeft',bst='document.body.scrollTop',bsw='document.body.scrollWidth',ch='document.documentElement.clientHeight',cw='document.documentElement.clientWidth',sl='document.documentElement.scrollLeft',st='document.documentElement.scrollTop',s=el[0].style;s.position='absolute';if(i<2){s.removeExpression('height');s.removeExpression('width');s.setExpression('height',''+bsh+' > '+bch+' ? '+bsh+' : '+bch+' + "px"');s.setExpression('width',''+bsw+' > '+bcw+' ? '+bsw+' : '+bcw+' + "px"');}else{var te,le;if(p&&p.constructor==Array){var top=p[0]?typeof p[0]=='number'?p[0].toString():p[0].replace(/px/,''):el.css('top').replace(/px/,'');te=top.indexOf('%')==-1?top+' + (t = '+st+' ? '+st+' : '+bst+') + "px"':parseInt(top.replace(/%/,''))+' * (('+ch+' || '+bch+') / 100) + (t = '+st+' ? '+st+' : '+bst+') + "px"';if(p[1]){var left=typeof p[1]=='number'?p[1].toString():p[1].replace(/px/,'');le=left.indexOf('%')==-1?left+' + (t = '+sl+' ? '+sl+' : '+bsl+') + "px"':parseInt(left.replace(/%/,''))+' * (('+cw+' || '+bcw+') / 100) + (t = '+sl+' ? '+sl+' : '+bsl+') + "px"';}}else{te='('+ch+' || '+bch+') / 2 - (this.offsetHeight / 2) + (t = '+st+' ? '+st+' : '+bst+') + "px"';le='('+cw+' || '+bcw+') / 2 - (this.offsetWidth / 2) + (t = '+sl+' ? '+sl+' : '+bsl+') + "px"';}s.removeExpression('top');s.removeExpression('left');s.setExpression('top',te);s.setExpression('left',le);}}});},focus:function(pos){var s=this,p=pos||'first';var input=$(':input:enabled:visible:'+p,s.d.wrap);input.length>0?input.focus():s.d.wrap.focus();},getDimensions:function(){var el=$(window);var h=$.browser.opera&&$.browser.version>'9.5'&&$.fn.jquery<='1.2.6'?document.documentElement['clientHeight']:$.browser.opera&&$.browser.version<'9.5'&&$.fn.jquery>'1.2.6'?window.innerHeight:el.height();return[h,el.width()];},getVal:function(v){return v=='auto'?0:v.indexOf('%')>0?v:parseInt(v.replace(/px/,''));},setContainerDimensions:function(resize){var s=this;if(!resize||(resize&&s.o.autoResize)){var ch=$.browser.opera?s.d.container.height():s.getVal(s.d.container.css('height')),cw=$.browser.opera?s.d.container.width():s.getVal(s.d.container.css('width')),dh=s.d.data.outerHeight(true),dw=s.d.data.outerWidth(true);var mh=s.o.maxHeight&&s.o.maxHeight<w[0]?s.o.maxHeight:w[0],mw=s.o.maxWidth&&s.o.maxWidth<w[1]?s.o.maxWidth:w[1];if(!ch){if(!dh){ch=s.o.minHeight;}else{if(dh>mh){ch=mh;}else if(dh<s.o.minHeight){ch=s.o.minHeight;}else{ch=dh;}}}else{ch=ch>mh?mh:ch;}if(!cw){if(!dw){cw=s.o.minWidth;}else{if(dw>mw){cw=mw;}else if(dw<s.o.minWidth){cw=s.o.minWidth;}else{cw=dw;}}}else{cw=cw>mw?mw:cw;}s.d.container.css({height:ch,width:cw});if(dh>ch||dw>cw){s.d.wrap.css({overflow:'auto'});}}if(s.o.autoPosition){s.setPosition();}},setPosition:function(){var s=this,top,left,hc=(w[0]/2)-(s.d.container.outerHeight(true)/2),vc=(w[1]/2)-(s.d.container.outerWidth(true)/2);if(s.o.position&&Object.prototype.toString.call(s.o.position)==="[object Array]"){top=s.o.position[0]||hc;left=s.o.position[1]||vc;}else{top=hc;left=vc;}s.d.container.css({left:left,top:top});},watchTab:function(e){var s=this;if($(e.target).parents('.simplemodal-container').length>0){s.inputs=$(':input:enabled:visible:first, :input:enabled:visible:last',s.d.data[0]);if((!e.shiftKey&&e.target==s.inputs[s.inputs.length-1])||(e.shiftKey&&e.target==s.inputs[0])||s.inputs.length==0){e.preventDefault();var pos=e.shiftKey?'last':'first';setTimeout(function(){s.focus(pos);},10);}}else{e.preventDefault();setTimeout(function(){s.focus();},10);}},open:function(){var s=this;s.d.iframe&&s.d.iframe.show();if($.isFunction(s.o.onOpen)){s.o.onOpen.apply(s,[s.d]);}else{s.d.overlay.show();s.d.container.show();s.d.data.show();}s.focus();s.bindEvents();},close:function(){var s=this;if(!s.d.data){return false;}s.unbindEvents();if($.isFunction(s.o.onClose)&&!s.occb){s.occb=true;s.o.onClose.apply(s,[s.d]);}else{if(s.d.placeholder){var ph=$('#simplemodal-placeholder');if(s.o.persist){ph.replaceWith(s.d.data.removeClass('simplemodal-data').css('display',s.display));}else{s.d.data.hide().remove();ph.replaceWith(s.d.orig);}}else{s.d.data.hide().remove();}s.d.container.hide().remove();s.d.overlay.hide().remove();s.d.iframe&&s.d.iframe.hide().remove();s.d={};}}};})(jQuery);(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(i){var g=i||window.event,f=[].slice.call(arguments,1),j=0,h=true,e=0,d=0;i=c.event.fix(g);i.type="mousewheel";if(i.wheelDelta){j=i.wheelDelta/120}if(i.detail){j=-i.detail/3}d=j;if(g.axis!==undefined&&g.axis===g.HORIZONTAL_AXIS){d=0;e=-1*j}if(g.wheelDeltaY!==undefined){d=g.wheelDeltaY/120}if(g.wheelDeltaX!==undefined){e=-1*g.wheelDeltaX/120}f.unshift(i,j,e,d);return c.event.handle.apply(this,f)}})(jQuery);;(function($){var proxy=function(__method){var args=Array.prototype.slice.call(arguments,1),object=args.shift();return function(event){return __method.apply(object,args.concat(Array.prototype.slice.call(arguments,0)));}};function Marquee(element,config){this.element=element;this.content=element.children();$.extend(this,config);this.element.css({'overflow':'hidden','position':'relative'});this.content.css('position','relative');this.inverseDirc=this.speed<0;this.dirc=this.vertical?'top':'left';var offset='offset'+(this.vertical?'Height':'Width');var cookieStep;if(this.enableCookie&&this.element.attr('id')){cookieStep=this.getCookie();$(window).bind('unload',proxy(this.saveCookie,this));}
if($.browser.webkit){this.startStep=this.maxStep=0;this.__defineGetter__('maxStep',function(){return this.inverseDirc?this.element.attr(offset):-this.content.attr(offset);});this.__defineGetter__('startStep',function(){return!this.inverseDirc?this.element.attr(offset):-this.content.attr(offset);});if(cookieStep){this.currentStep=cookieStep;}else if(this.inverseDirc){this.content.css(this.dirc,this.maxStep);this.currentStep=this.maxStep}else this.currentStep=this.startStep}else{var elementDim=this.element.attr(offset);var contentDim=this.content.attr(offset);this.maxStep=this.inverseDirc?elementDim:-contentDim;this.startStep=this.inverseDirc?-contentDim:elementDim;this.currentStep=cookieStep||this.startStep;}
if(this.speedUp||this.speedDown){this.eventAcc=this.eventAcc=='over'?['mouseenter','mouseleave']:['mousedown','mouseup'];this.oriSpeed=this.speed;if(this.speedUp){this.speedUp=$(this.speedUp);this.speedUp[this.eventAcc[0]](proxy(this.enableAcc,this,this.inverseDirc));if(this.eventAcc!='over'){this.disableSelection($(this.speedUp)[0]);}}
if(this.speedDown){this.speedDown=$(this.speedDown);this.speedDown[this.eventAcc[0]](proxy(this.enableAcc,this,!this.inverseDirc));if(this.eventAcc!='over'){this.disableSelection($(this.speedDown)[0]);}}}
if(this.draggable){this.element.bind('mousedown',null,proxy(this.enableDrag,this));this.disableSelection(this.element[0]);}
if(this.enableScroll){this.element.mousewheel(proxy(this.scroll,this));}
if(this.stopOnOver){this.element.mouseenter(proxy(this.enter,this));this.element.mouseleave(proxy(this.leave,this));}
this.enableTimer();}
Marquee.prototype={speed:0.5,coefAcc:3,vertical:true,stopOnOver:true,eventAcc:'over',stepScroll:20,animateScrollDuration:100,animateScrollEasing:'easeOut',scroll:function(event,delta){var step,inverse;if(delta<0){step=-this.stepScroll;if(!this.inverseDirc){inverse=true;this.toogleDirc();}}else if(delta>0){step=this.stepScroll;if(this.inverseDirc){inverse=true;this.toogleDirc();}}
this.run(step,this.enableAnimateScroll);if(inverse)
this.toogleDirc();},disableSelection:function(target){if(target){target.onmousedown=target.onselectstart=target.ondragstart=function(){return false;};}},enableDrag:function(event){if(!this.stopOnOver)
disableTimer();this.onDrag=true;this.lastDragCoor=this.vertical?event.pageY:event.pageX;this.dragHandler=proxy(this.drag,this);$(document).bind('mousemove',this.dragHandler);this.toogleDragHandler=proxy(this.disableDrag,this);$(document).mouseup(this.toogleDragHandler);if(this.clsDrag){$(document.body).addClass(this.clsDrag);this.element.addClass(this.clsDrag);}},disableDrag:function(){this.onDrag=false;if(this.inverseDirc!=this.speed<0)
this.toogleDirc();this.inverseDirc=this.speed<0;$(document).unbind('mousemove',this.dragHandler);$(document).unbind('mouseup',this.toogleDragHandler);if(!this.isOver)
this.enableTimer();if(this.clsDrag){$(document.body).removeClass(this.clsDrag);this.element.removeClass(this.clsDrag);}},drag:function(event){var coor=this.vertical?event.pageY:event.pageX;if((this.inverseDirc&&this.lastDragCoor>coor)||(!this.inverseDirc&&this.lastDragCoor<coor)){this.toogleDirc();}
this.run(this.lastDragCoor-coor);this.lastDragCoor=coor;},enableAcc:function(inverse){this.speed*=inverse?-this.coefAcc:this.coefAcc;if(inverse)
this.toogleDirc();this.toogleClsSpeed(inverse,false);this.disableAccHandler=proxy(this.disableAcc,this,inverse);(this.eventAcc[1]=='mouseleave'?$(this['speed'+(inverse?'Down':'Up')]):$(document))
[this.eventAcc[1]](this.disableAccHandler);},disableAcc:function(inverse){this.speed=this.oriSpeed;if(inverse)
this.toogleDirc();this.toogleClsSpeed(inverse,true);(this.eventAcc[1]=='mouseleave'?$(this['speed'+(inverse?'Down':'Up')]):$(document)).unbind(this.eventAcc[1],this.disableAccHandler);},toogleDirc:function(){this.inverseDirc=!this.inverseDirc;if(!$.browser.webkit){var tmp=this.startStep;this.startStep=this.maxStep;this.maxStep=tmp;}},toogleClsSpeed:function(inverse,remove){var cls=this[inverse?'clsSpeedDown':'clsSpeedUp'];if(cls)
this[inverse?'speedDown':'speedUp'][remove?'removeClass':'addClass'](cls);},enter:function(){this.isOver=true;this.disableTimer();},leave:function(){this.isOver=false;if(!this.onDrag)
this.enableTimer();},run:function(step,animate){step=step!=undefined?step:this.speed;this.currentStep-=step;if(animate){this.content.stop();var ani={};ani[this.dirc]=this.currentStep;this.content.animate(ani,250);}else this.content.css(this.dirc,this.currentStep+'px');if((this.inverseDirc&&this.currentStep>=this.maxStep)||(!this.inverseDirc&&this.currentStep<=this.maxStep)){this.currentStep=this.startStep;}},disableTimer:function(){clearInterval(this.timer);this.timer=null;},enableTimer:function(){this.timer=setInterval(proxy(this.run,this,null,null),35);},pause:function(){if(this.timer)return;this.enableTimer();},resume:function(){if(this.timer)return;this.enableTimer();},getCookie:function(){var n='marquee_'+this.element.attr('id');var i=document.cookie.indexOf(n+"=");if(i>-1){i+=n.length+1
var j=document.cookie.indexOf(';',i);if(j<0)
j=document.cookie.length;return unescape(document.cookie.substring(i,j));}
return'';},saveCookie:function(){document.cookie='marquee_'+this.element.attr('id')+"="+this.currentStep+';';}};$.fn.marquee=function(options){this.marquee=new Marquee(this,options);return this;};})(jQuery);
