/* * Copyright(C) 2010 - IceTheme.com. All rights reserved. */ var IceMenu364={};IceMenu364.accordion=function(){function slider(n){this.n=n; this.a=[];}slider.prototype.init=function(t,e,sec,m,o,k){var a=$(t), i=s=0, n=a.childNodes, l=n.length; this.s=k||0; this.m=m||0;for(i;i<l;i++){var v=n[i];if(v.nodeType!=3){this.a[s]={}; this.a[s].h=h=$(v).getElements(e)[0]; this.a[s].c=c=$(v).getElements(sec)[0];var trg = $(h).getElement('span.accArrow');if (ICEMENU_ACC_EVENT364 == 'mouseover') {$(h).addEvents({'mouseover' : new Function('event', 'event = new Event(event); event.stop();' + this.n+'.pr(0,'+s+')')});} else {if (trg) {$(trg).addEvents({'click' : new Function('event', 'event = new Event(event); event.stop(); ' + this.n+'.pr(0,'+s+')')});}}if(o==s){$(h).addClass('oppened');if(c){c.style.height='auto';c.style.visibility='visible';c.d=1;}}else{if(c){c.style.height=0;c.style.visibility='hidden';c.d=-1;}}s++;}}this.l=s;};slider.prototype.pr=function(f,d){for(var i=0;i<this.l;i++){var h=this.a[i].h, c=this.a[i].c;if (c) {var k=c.style.height; k=k=='auto' ? 1:parseInt(k);clearInterval(c.t);if((k!=1&&c.d==-1)&&(f==1||i==d)){c.style.height='';c.m=c.offsetHeight;c.style.height=k+'px';c.d=1;$(h).addClass('oppened');c.style.visibility='visible';} else if(k>0&&(f==-1||this.m||i==d)){c.d=-1;$(h).removeClass('oppened');}su(c);}}};function su(c){if (!ICEMENU_ACC_ALLOW_ANIM364) {if (c.d == 1) {c.style.height='auto';} else {c.style.height='0px';}} else {c.t=setInterval(function(){sl(c)},ICEMENU_ACC_ANIM_SPEED364);}};function sl(c){var h=c.offsetHeight, d=c.d==1?c.m-h:h; c.style.height=h+(Math.ceil(d/5)*c.d)+'px';if (ICEMENU_ACC_ALLOW_OPACITY364) {c.style.opacity=h/c.m; c.style.filter='alpha(opacity='+h*100/c.m+')';}if((c.d==1&&h>=c.m)||(c.d!=1&&h==1)){if(c.d==1){c.style.height='auto'} else {c.style.visibility='hidden';} clearInterval(c.t);}};return{slider:slider};}();IceMenu364.dropdown=function(){var z=50,s=6,a;function dd(n){this.n=n; this.h=[]; this.c=[];};dd.prototype.init=function(p,c) {a=c;var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;for(i;i<l;i++){var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];$(h).addEvents({'mouseover': new Function('event', 'event = new Event(event); ' + this.n+'.st('+i+',true);'),'mouseout': new Function('event', 'event = new Event(event); ' + this.n+'.st('+i+');')});};};dd.prototype.st=function(x,f){var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];clearInterval(c.t);c.style.overflow='hidden';if(f){$(p).addClass(a);c.style.display='block';if(!c.mh){c.mh=c.offsetHeight;if (ICEMENU_DROP_ALLOW_HEIGHT364){c.style.height=0;}}if(!c.mw){c.mw=c.offsetWidth;if (ICEMENU_DROP_ALLOW_WIDTH364){c.style.width=0;}}if(c.mh==c.offsetHeight && c.mw==c.offsetWidth){c.style.overflow='visible';} else {c.style.zIndex=z; z++;c.t=setInterval(function(){sl(c,1);},ICEMENU_DROP_ANIM_SPEED364);}} else {$(p).removeClass(a);c.t=setInterval(function(){sl(c,-1);},ICEMENU_DROP_ANIM_SPEED364);}};function sl(c,f){var h=c.offsetHeight, w=c.offsetWidth, tostop = false;var pt = $(c).getStyle('paddingTop').toInt();var pb = $(c).getStyle('paddingBottom').toInt();if (pt || pb) h = h + ((pt + pb) * f);var pl = $(c).getStyle('paddingLeft').toInt();var pr = $(c).getStyle('paddingRight').toInt();if (pl || pr) w = w + ((pl + pr) * f);if (ICEMENU_DROP_ALLOW_HEIGHT364 && ICEMENU_DROP_ALLOW_WIDTH364) {tostop=(((h<=0&&f!=1)||(h>=c.mh&&f==1))&&((w<=0&&f!=1)||(w>=c.mw&&f==1)));} else if (ICEMENU_DROP_ALLOW_HEIGHT364) {tostop=((h<=0&&f!=1)||(h>=c.mh&&f==1));} else if (ICEMENU_DROP_ALLOW_WIDTH364) {tostop=((w<=0&&f!=1)||(w>=c.mw&&f==1));}if (tostop){if(f==1){if (ICEMENU_DROP_ALLOW_OPACITY364) {c.style.filter='';c.style.opacity=1;}c.style.overflow='visible';} else {c.style.display='none';}clearInterval(c.t);return;}var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s);var dw=(f==1)?Math.ceil((c.mw-w)/s):Math.ceil(w/s);var o = 1;if (ICEMENU_DROP_ALLOW_HEIGHT364) {o=h/c.mh;} else if (ICEMENU_DROP_ALLOW_WIDTH364) {o=w/c.mw;}if (ICEMENU_DROP_ALLOW_OPACITY364) {c.style.opacity=o;c.style.filter='alpha(opacity='+(o*100)+')';}if (ICEMENU_DROP_ALLOW_HEIGHT364){if ((h<=0&&f!=1)||(h>=c.mh&&f==1)) {c.style.height=c.mh+'px';} else {c.style.height=h+(d*f)+'px';}}if (ICEMENU_DROP_ALLOW_WIDTH364){if ((w<=0&&f!=1)||(w>=c.mw&&f==1)) {c.style.height=c.mh+'px';} else {c.style.width=w+(dw*f)+'px';}}if(!(ICEMENU_DROP_ALLOW_HEIGHT364 || ICEMENU_DROP_ALLOW_WIDTH364)) {c.style.display='none';}};return{dd:dd};}();
