(function(g){g.fn.matchHeight=function(e){var a=0;this.each(function(){a=Math.max(a,g(this).outerHeight())});if(e)a=Math.max(a,e);return this.each(function(){var c=g(this),b=c.outerHeight()-c.height();c.css("min-height",a-b+"px")})};g.fn.matchWidth=function(e){return this.each(function(){var a=g(this),c=a.children(e),b=0;c.width(function(d,f){if(d<c.length-1){b+=f;return f}return a.width()-b})})};g.fn.morph=function(e,a,c,b,d){var f={duration:500,transition:"swing",ignore:null};c=g.extend(f,c);b=g.extend(f,b);var h=c.ignore?g(c.ignore):null;if(h)h=h.toArray();return this.each(function(){var i=g(this);if(!(h&&g.inArray(this,h)!=-1)){var k=d?i.find(d).css(a):[i.css(a)];i.bind({mouseenter:function(){g(k).each(function(){var j=g(this).stop();e["background-color"]&&a["background-color"]&&j.attr("background-color")=="transparent"&&j.attr("background-color",a["background-color"]);j.animate(e,c.duration,c.transition)})},mouseleave:function(){g(k).each(function(){g(this).stop().animate(a,b.duration,b.transition)})}})}})};g.fn.smoothScroller=function(e){e=g.extend({duration:1E3,transition:"easeOutExpo"},e);return this.each(function(){g(this).bind("click",function(){var a=this.hash,c=g(this.hash).offset().top,b=window.location.href.replace(window.location.hash,""),d=g.browser.opera?"html:not(:animated)":"html:not(:animated),body:not(:animated)";if(b+a==this){g(d).animate({scrollTop:c},e.duration,e.transition,function(){window.location.hash=a.replace("#","")});return false}})})};g.fn.backgroundFx=function(e){e=g.extend({duration:9E3,transition:"swing",colors:["#FFFFFF","#999999"]},e);return this.each(function(){var a=g(this),c=0,b=e.colors;window.setInterval(function(){a.stop().animate({"background-color":b[c]},e.duration,e.transition);c=c+1>=b.length?0:c+1},e.duration*2)})}})(jQuery);(function(g){function e(c){var b;if(c&&c.constructor==Array&&c.length==3)return c;if(b=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])];if(b=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(b[1])*2.55,parseFloat(b[2])*2.55,parseFloat(b[3])*2.55];if(b=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)];if(b=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return a.transparent;return a[g.trim(c).toLowerCase()]}g.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(c,b){g.fx.step[b]=function(d){if(!d.colorInit){var f;f=d.elem;var h=b,i;do{i=g.curCSS(f,h);if(i!=""&&i!="transparent"||g.nodeName(f,"body"))break;h="backgroundColor"}while(f=f.parentNode);f=e(i);d.start=f;d.end=e(d.end);d.colorInit=true}d.elem.style[b]="rgb("+[Math.max(Math.min(parseInt(d.pos*(d.end[0]-d.start[0])+d.start[0]),255),0),Math.max(Math.min(parseInt(d.pos*(d.end[1]-d.start[1])+d.start[1]),255),0),Math.max(Math.min(parseInt(d.pos*(d.end[2]-d.start[2])+d.start[2]),255),0)].join(",")+")"}});var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]}})(jQuery);(function(g){g.easing.jswing=g.easing.swing;g.extend(g.easing,{def:"easeOutQuad",swing:function(e,a,c,b,d){return g.easing[g.easing.def](e,a,c,b,d)},easeInQuad:function(e,a,c,b,d){return b*(a/=d)*a+c},easeOutQuad:function(e,a,c,b,d){return-b*(a/=d)*(a-2)+c},easeInOutQuad:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a+c;return-b/2*(--a*(a-2)-1)+c},easeInCubic:function(e,a,c,b,d){return b*(a/=d)*a*a+c},easeOutCubic:function(e,a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},easeInOutCubic:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a+c;return b/2*((a-=2)*a*a+2)+c},easeInQuart:function(e,a,c,b,d){return b*(a/=d)*a*a*a+c},easeOutQuart:function(e,a,c,b,d){return-b*((a=a/d-1)*a*a*a-1)+c},easeInOutQuart:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a+c;return-b/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(e,a,c,b,d){return b*(a/=d)*a*a*a*a+c},easeOutQuint:function(e,a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},easeInOutQuint:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a*a+c;return b/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(e,a,c,b,d){return-b*Math.cos(a/d*(Math.PI/2))+b+c},easeOutSine:function(e,a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+c},easeInOutSine:function(e,a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},easeInExpo:function(e,a,c,b,d){return a==0?c:b*Math.pow(2,10*(a/d-1))+c},easeOutExpo:function(e,a,c,b,d){return a==d?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},easeInOutExpo:function(e,a,c,b,d){if(a==0)return c;if(a==d)return c+b;if((a/=d/2)<1)return b/2*Math.pow(2,10*(a-1))+c;return b/2*(-Math.pow(2,-10*--a)+2)+c},easeInCirc:function(e,a,c,b,d){return-b*(Math.sqrt(1-(a/=d)*a)-1)+c},easeOutCirc:function(e,a,c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},easeInOutCirc:function(e,a,c,b,d){if((a/=d/2)<1)return-b/2*(Math.sqrt(1-a*a)-1)+c;return b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(e,a,c,b,d){e=1.70158;var f=0,h=b;if(a==0)return c;if((a/=d)==1)return c+b;f||(f=d*0.3);if(h<Math.abs(b)){h=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f))+c},easeOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,h=b;if(a==0)return c;if((a/=d)==1)return c+b;f||(f=d*0.3);if(h<Math.abs(b)){h=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/h);return h*Math.pow(2,-10*a)*Math.sin((a*d-e)*2*Math.PI/f)+b+c},easeInOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,h=b;if(a==0)return c;if((a/=d/2)==2)return c+b;f||(f=d*0.3*1.5);if(h<Math.abs(b)){h=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f)+c;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f)*0.5+b+c},easeInBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;return b*(a/=d)*a*((f+1)*a-f)+c},easeOutBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;return b*((a=a/d-1)*a*((f+1)*a+f)+1)+c},easeInOutBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;if((a/=d/2)<1)return b/2*a*a*(((f*=1.525)+1)*a-f)+c;return b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+c},easeInBounce:function(e,a,c,b,d){return b-g.easing.easeOutBounce(e,d-a,0,b,d)+c},easeOutBounce:function(e,a,c,b,d){return(a/=d)<1/2.75?b*7.5625*a*a+c:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+0.75)+c:a<2.5/2.75?b*(7.5625*(a-=2.25/2.75)*a+0.9375)+c:b*(7.5625*(a-=2.625/2.75)*a+0.984375)+c},easeInOutBounce:function(e,a,c,b,d){if(a<d/2)return g.easing.easeInBounce(e,a*2,0,b,d)*0.5+c;return g.easing.easeOutBounce(e,a*2-d,0,b,d)*0.5+b*0.5+c}})})(jQuery);(function(a){var c=function(){};a.extend(c.prototype,{name:"accordionMenu",options:{mode:"default",display:null,collapseall:false},initialize:function(e,b){b=a.extend({},this.options,b);var f=e.find("ul.accordion"),g=e.find("li.toggler");if(g.length){var j=[];g.each(function(i){var h=a(this),k=h.find("span:first"),d=a(f[i]).parent().css("overflow","hidden"),l=d.height();j.push(d);h.hasClass("active")||i==b.display?d.show():d.hide().css("height",0);k.bind("click",function(){if(b.collapseall){a(j).each(function(){a(this).hide().css("height",0)});g.each(function(m){m!=i&&a(this).removeClass("active").find("span:first").removeClass("active")})}if(b.mode=="slide")h.hasClass("active")?d.stop().animate({height:0},function(){d.hide()}):d.stop().show().animate({height:l});else h.hasClass("active")?d.hide().css("height",0):d.show().css("height",l);k.toggleClass("active");h.toggleClass("active")})})}}});a.fn[c.prototype.name]=function(){var e=arguments,b=e[0]?e[0]:null;return this.each(function(){var f=a(this);if(c.prototype[b]&&f.data(c.prototype.name)&&b!="initialize")f.data(c.prototype.name)[b].apply(f.data(c.prototype.name),Array.prototype.slice.call(e,1));else if(!b||a.isPlainObject(b)){var g=new c;c.prototype.initialize&&g.initialize.apply(g,a.merge([f],e));f.data(c.prototype.name,g)}else a.error("Method "+b+" does not exist on jQuery."+c.name)})}})(jQuery);(function(e){var c=function(){};c.prototype=e.extend(c.prototype,{name:"dropdownMenu",initialize:function(f,b){b=e.extend({mode:"default",duration:600,transition:"linear"},b);var d={width:0,height:0};switch(b.mode){case"width":d={width:0};break;case"height":d={height:0}}var a=f.find("ul:first");if(a.length){var g={width:a.css("width"),height:a.css("height")};if(!e.browser.msie){d.opacity=0;g.opacity=a.css("opacity")}a.css(d);f.bind({mouseenter:function(){var h=f.parent();h.css("overflow")=="hidden"&&h.css("overflow","visible");a.css("overflow","hidden");a.animate(g,b.duration,b.transition)},mouseleave:function(){a.stop();a.css(d)}})}}});e.fn[c.prototype.name]=function(){var f=arguments,b=f[0]?f[0]:null;return this.each(function(){var d=e(this);if(c.prototype[b]&&d.data(c.prototype.name)&&b!="initialize")d.data(c.prototype.name)[b].apply(d.data(c.prototype.name),Array.prototype.slice.call(f,1));else if(!b||e.isPlainObject(b)){var a=new c;c.prototype.initialize&&a.initialize.apply(a,e.merge([d],f));d.data(c.prototype.name,a)}else e.error("Method "+b+" does not exist on jQuery."+c.name)})}})(jQuery);jQuery(function($){(function(){$('div.headerbox div.deepest').matchHeight(40);$('div.topbox div.deepest').matchHeight(40);$('div.bottombox div.deepest').matchHeight(40);$('div.maintopbox div.deepest').matchHeight(40);$('div.mainbottombox div.deepest').matchHeight(40);$('div.contenttopbox div.deepest').matchHeight(40);$('div.contentbottombox div.deepest').matchHeight(40);})();switch(Warp.Settings.color){case'default':if($('#object1').length){new YOOMove('#object1',{'direction':'right','speed':40000,'pause':60});}
if($('#object2').length){new YOOMove('#object2',{'direction':'left','speed':30000,'pause':50});}
break;case'brown':case'blue':case'green':case'red':if($('#object1').length){new YOOMove('#object1',{'direction':'left','speed':300000,'pause':3});}
if($('#object2').length){new YOOMove('#object2',{'direction':'right','speed':60000,'pause':50});}
if($('#object3').length){new YOOMove('#object3',{'direction':'left','speed':30000,'pause':60});}
break;case'orange':case'black':if($('#object1').length){new YOOMove('#object1',{'direction':'right','speed':70000,'pause':40});}
if($('#object2').length){new YOOMove('#object2',{'direction':'right','speed':30000,'pause':10});}
if($('#object3').length){new YOOMove('#object3',{'direction':'left','speed':100000,'pause':90});}
break;case'mint':case'turquoise':case'yellow':if($('#object1').length){new YOOMove('#object1',{'direction':'left','speed':300000,'pause':3});}
if($('#object2').length){new YOOMove('#object2',{'direction':'right','speed':50000,'pause':50});}
if($('#object3').length){new YOOMove('#object3',{'direction':'left','speed':100000,'pause':60});}
break;}
$('.menu-accordion').accordionMenu({mode:'slide'});$('div#menu li.parent').dropdownMenu({mode:'height',transition:'easeOutExpo'});var menuEnter={'color':'#ffffaa'};var menuLeave={'color':'#F0F0DC'};switch(Warp.Settings.color){case'blue':case'green':case'black':menuEnter={'color':'#ff9934'};break;}
$('div#menu li.level1').morph(menuEnter,menuLeave,{transition:'linear',duration:100},{transition:'easeInSine',duration:300},'a.level1');$('div#menu li.level1').morph(menuEnter,menuLeave,{transition:'linear',duration:100},{transition:'easeInSine',duration:300},'span.sub');var selector='div#menu li.level2 a, div#menu li.level2 span.separator';$(selector).morph(menuEnter,menuLeave,{transition:'swing',duration:0},{transition:'easeInSine',duration:500});var submenuEnter={'color':'#ffffaa'};var submenuLeave={'color':'#F0F0DC'};switch(Warp.Settings.color){case'blue':submenuEnter={'color':'#ba5d00'};submenuLeave={'color':'#266892'};break;case'green':submenuEnter={'color':'#ba5d00'};submenuLeave={'color':'#669125'};break;case'black':submenuEnter={'color':'#ba5d00'};submenuLeave={'color':'#437ca1'};break;}
$('div#middle ul.menu a, div#middle ul.menu span').morph(submenuEnter,submenuLeave,{transition:'easeOutExpo',duration:0},{transition:'easeInSine',duration:300});$('a[href="#page"]').smoothScroller({duration:500});});function cookie(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};function YOOMove(element,options){var options=jQuery.extend({direction:'left',speed:10000,pause:5,duration:1000,transition:'linear'},options);var elm=jQuery(element);var key='yt-'+elm.attr('id');var timer=null;var val=cookie(key);if(val){elm.css('left',val+'px');}
window.setInterval(function(){cookie(key,elm.css('left'));},2500);var animate=function(){var dir=options.direction;var pause=options.pause;var coord=elm.position();var dest=(dir=='left')?0-elm.width():jQuery(window).width();var track=coord.left-dest;if(track<0){track=-track;}
var duration=parseInt(options.speed*track/1024);elm.stop().animate({'left':(dir=='left')?0-elm.width():jQuery(window).width()},duration,options.transition,function(){elm.css({'left':(dir=='left')?jQuery(window).width():0-elm.width()});clearTimeout(timer);timer=window.setTimeout(animate,(Math.floor(Math.random()*pause)*1000));});};animate();};
