AJS={BASE_URL:"",drag_obj:null,drag_elm:null,_drop_zones:[],_cur_pos:null,join:function(_1,_2){try{return _2.join(_1);}catch(e){var r=_2[0]||"";AJS.map(_2,function(_4){r+=_1+_4;},1);return r+"";}},getScrollTop:function(){var t;if(document.documentElement&&document.documentElement.scrollTop){t=document.documentElement.scrollTop;}else{if(document.body){t=document.body.scrollTop;}}return t;},addClass:function(){var _6=AJS.forceArray(arguments);var _7=_6.pop();var _8=function(o){if(!new RegExp("(^|\\s)"+_7+"(\\s|$)").test(o.className)){o.className+=(o.className?" ":"")+_7;}};AJS.map(_6,function(_a){_8(_a);});},setStyle:function(){var _b=AJS.forceArray(arguments);var _c=_b.pop();var _d=_b.pop();AJS.map(_b,function(_e){_e.style[_d]=AJS.getCssDim(_c);});},_getRealScope:function(fn,_10,_11,_12){var _13=window;_10=AJS.$A(_10);if(fn._cscope){_13=fn._cscope;}return function(){var _14=[];var i=0;if(_11){i=1;}AJS.map(arguments,function(arg){_14.push(arg);},i);_14=_14.concat(_10);if(_12){_14=_14.reverse();}return fn.apply(_13,_14);};},preloadImages:function(){AJS.AEV(window,"load",AJS.$p(function(_17){AJS.map(_17,function(src){var pic=new Image();pic.src=src;});},arguments));},_createDomShortcuts:function(){var _1a=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","br","textarea","form","p","select","option","iframe","script","center","dl","dt","dd","small","pre"];var _1b=function(elm){var _1d="return AJS.createDOM.apply(null, ['"+elm+"', arguments]);";var _1e="function() { "+_1d+" }";eval("AJS."+elm.toUpperCase()+"="+_1e);};AJS.map(_1a,_1b);AJS.TN=function(_1f){return document.createTextNode(_1f);};},documentInsert:function(elm){if(typeof (elm)=="string"){elm=AJS.HTML2DOM(elm);}document.write("<span id=\"dummy_holder\"></span>");AJS.swapDOM(AJS.$("dummy_holder"),elm);},getWindowSize:function(doc){doc=doc||document;var _22,_23;if(self.innerHeight){_22=self.innerWidth;_23=self.innerHeight;}else{if(doc.documentElement&&doc.documentElement.clientHeight){_22=doc.documentElement.clientWidth;_23=doc.documentElement.clientHeight;}else{if(doc.body){_22=doc.body.clientWidth;_23=doc.body.clientHeight;}}}return {"w":_22,"h":_23};},flattenList:function(_24){var r=[];var _26=function(r,l){AJS.map(l,function(o){if(o==null){}else{if(AJS.isArray(o)){_26(r,o);}else{r.push(o);}}});};_26(r,_24);return r;},setEventKey:function(e){e.key=e.keyCode?e.keyCode:e.charCode;if(window.event){e.ctrl=window.event.ctrlKey;e.shift=window.event.shiftKey;}else{e.ctrl=e.ctrlKey;e.shift=e.shiftKey;}switch(e.key){case 63232:e.key=38;break;case 63233:e.key=40;break;case 63235:e.key=39;break;case 63234:e.key=37;break;}},removeElement:function(){var _2b=AJS.forceArray(arguments);AJS.map(_2b,function(elm){AJS.swapDOM(elm,null);});},_unloadListeners:function(){if(AJS.listeners){AJS.map(AJS.listeners,function(elm,_2e,fn){AJS.REV(elm,_2e,fn);});}AJS.listeners=[];},partial:function(fn){var _31=AJS.forceArray(arguments);return AJS.$b(fn,null,_31.slice(1,_31.length).reverse(),false,true);},getIndex:function(elm,_33,_34){for(var i=0;i<_33.length;i++){if(_34&&_34(_33[i])||elm==_33[i]){return i;}}return -1;},isDefined:function(o){return (o!="undefined"&&o!=null);},isArray:function(obj){return obj instanceof Array;},setLeft:function(){var _38=AJS.forceArray(arguments);_38.splice(_38.length-1,0,"left");AJS.setStyle.apply(null,_38);},appendChildNodes:function(elm){if(arguments.length>=2){AJS.map(arguments,function(n){if(AJS.isString(n)){n=AJS.TN(n);}if(AJS.isDefined(n)){elm.appendChild(n);}},1);}return elm;},isOpera:function(){return (navigator.userAgent.toLowerCase().indexOf("opera")!=-1);},isString:function(obj){return (typeof obj=="string");},hideElement:function(elm){var _3d=AJS.forceArray(arguments);AJS.map(_3d,function(elm){elm.style.display="none";});},setOpacity:function(elm,p){elm.style.opacity=p;elm.style.filter="alpha(opacity="+p*100+")";},setHeight:function(){var _41=AJS.forceArray(arguments);_41.splice(_41.length-1,0,"height");AJS.setStyle.apply(null,_41);},setWidth:function(){var _42=AJS.forceArray(arguments);_42.splice(_42.length-1,0,"width");AJS.setStyle.apply(null,_42);},createArray:function(v){if(AJS.isArray(v)&&!AJS.isString(v)){return v;}else{if(!v){return [];}else{return [v];}}},isDict:function(o){var _45=String(o);return _45.indexOf(" Object")!=-1;},isMozilla:function(){return (navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210);},_listenOnce:function(elm,_47,fn){var _49=function(){AJS.removeEventListener(elm,_47,_49);fn(arguments);};return _49;},addEventListener:function(elm,_4b,fn,_4d,_4e){if(!_4e){_4e=false;}var _4f=AJS.$A(elm);AJS.map(_4f,function(_50){if(_4d){fn=AJS._listenOnce(_50,_4b,fn);}if(AJS.isIn(_4b,["submit","load","scroll","resize"])){var old=elm["on"+_4b];elm["on"+_4b]=function(){if(old){fn(arguments);return old(arguments);}else{return fn(arguments);}};return;}if(AJS.isIn(_4b,["keypress","keydown","keyup","click"])){var _52=fn;fn=function(e){AJS.setEventKey(e);return _52.apply(null,arguments);};}if(_50.attachEvent){_50.attachEvent("on"+_4b,fn);}else{if(_50.addEventListener){_50.addEventListener(_4b,fn,_4e);}}AJS.listeners=AJS.$A(AJS.listeners);AJS.listeners.push([_50,_4b,fn]);});},createDOM:function(_54,_55){var i=0,_57;elm=document.createElement(_54);if(AJS.isDict(_55[i])){for(k in _55[0]){_57=_55[0][k];if(k=="style"){elm.style.cssText=_57;}else{if(k=="class"||k=="className"){elm.className=_57;}else{elm.setAttribute(k,_57);}}}i++;}if(_55[0]==null){i=1;}AJS.map(_55,function(n){if(n){if(AJS.isString(n)||AJS.isNumber(n)){n=AJS.TN(n);}elm.appendChild(n);}},i);return elm;},setTop:function(){var _59=AJS.forceArray(arguments);_59.splice(_59.length-1,0,"top");AJS.setStyle.apply(null,_59);},getElementsByTagAndClassName:function(_5a,_5b,_5c){var _5d=[];if(!AJS.isDefined(_5c)){_5c=document;}if(!AJS.isDefined(_5a)){_5a="*";}var els=_5c.getElementsByTagName(_5a);var _5f=els.length;var _60=new RegExp("(^|\\s)"+_5b+"(\\s|$)");for(i=0,j=0;i<_5f;i++){if(_60.test(els[i].className)||_5b==null){_5d[j]=els[i];j++;}}return _5d;},removeClass:function(){var _61=AJS.forceArray(arguments);var cls=_61.pop();var _63=function(o){o.className=o.className.replace(new RegExp("\\s?"+cls,"g"),"");};AJS.map(_61,function(elm){_63(elm);});},bindMethods:function(_66){for(var k in _66){var _68=_66[k];if(typeof (_68)=="function"){_66[k]=AJS.$b(_68,_66);}}},log:function(o){if(AJS.isMozilla()){console.log(o);}else{var div=AJS.DIV({"style":"color: green"});AJS.ACN(AJS.getBody(),AJS.setHTML(div,""+o));}},isNumber:function(obj){return (typeof obj=="number");},map:function(_6c,fn,_6e,_6f){var i=0,l=_6c.length;if(_6e){i=_6e;}if(_6f){l=_6f;}for(i;i<l;i++){fn.apply(null,[_6c[i],i]);}},removeEventListener:function(elm,_73,fn,_75){if(!_75){_75=false;}if(elm.removeEventListener){elm.removeEventListener(_73,fn,_75);if(AJS.isOpera()){elm.removeEventListener(_73,fn,!_75);}}else{if(elm.detachEvent){elm.detachEvent("on"+_73,fn);}}},getCssDim:function(dim){if(AJS.isString(dim)){return dim;}else{return dim+"px";}},setHTML:function(elm,_78){elm.innerHTML=_78;return elm;},bind:function(fn,_7a,_7b,_7c,_7d){fn._cscope=_7a;return AJS._getRealScope(fn,_7b,_7c,_7d);},forceArray:function(_7e){var r=[];AJS.map(_7e,function(elm){r.push(elm);});return r;},update:function(l1,l2){for(var i in l2){l1[i]=l2[i];}return l1;},getBody:function(){return AJS.$bytc("body")[0];},HTML2DOM:function(_84,_85){var d=AJS.DIV();d.innerHTML=_84;if(_85){return d.childNodes[0];}else{return d;}},getElement:function(id){if(AJS.isString(id)||AJS.isNumber(id)){return document.getElementById(id);}else{return id;}},showElement:function(){var _88=AJS.forceArray(arguments);AJS.map(_88,function(elm){elm.style.display="";});},swapDOM:function(_8a,src){_8a=AJS.getElement(_8a);var _8c=_8a.parentNode;if(src){src=AJS.getElement(src);_8c.replaceChild(src,_8a);}else{_8c.removeChild(_8a);}return src;},isIn:function(elm,_8e){var i=AJS.getIndex(elm,_8e);if(i!=-1){return true;}else{return false;}}};AJS.$=AJS.getElement;AJS.$$=AJS.getElements;AJS.$f=AJS.getFormElement;AJS.$p=AJS.partial;AJS.$b=AJS.bind;AJS.$A=AJS.createArray;AJS.DI=AJS.documentInsert;AJS.ACN=AJS.appendChildNodes;AJS.RCN=AJS.replaceChildNodes;AJS.AEV=AJS.addEventListener;AJS.REV=AJS.removeEventListener;AJS.$bytc=AJS.getElementsByTagAndClassName;AJS.addEventListener(window,"unload",AJS._unloadListeners);AJS._createDomShortcuts();AJS.Class=function(_90){var fn=function(){if(arguments[0]!="no_init"){return this.init.apply(this,arguments);}};fn.prototype=_90;AJS.update(fn,AJS.Class.prototype);return fn;};AJS.Class.prototype={extend:function(_92){var _93=new this("no_init");for(k in _92){var _94=_93[k];var cur=_92[k];if(_94&&_94!=cur&&typeof cur=="function"){cur=this._parentize(cur,_94);}_93[k]=cur;}return new AJS.Class(_93);},implement:function(_96){AJS.update(this.prototype,_96);},_parentize:function(cur,_98){return function(){this.parent=_98;return cur.apply(this,arguments);};}};AJS.$=AJS.getElement;AJS.$$=AJS.getElements;AJS.$f=AJS.getFormElement;AJS.$b=AJS.bind;AJS.$p=AJS.partial;AJS.$FA=AJS.forceArray;AJS.$A=AJS.createArray;AJS.DI=AJS.documentInsert;AJS.ACN=AJS.appendChildNodes;AJS.RCN=AJS.replaceChildNodes;AJS.AEV=AJS.addEventListener;AJS.REV=AJS.removeEventListener;AJS.$bytc=AJS.getElementsByTagAndClassName;AJSDeferred=function(req){this.callbacks=[];this.errbacks=[];this.req=req;};AJSDeferred.prototype={excCallbackSeq:function(req,_9b){var _9c=req.responseText;while(_9b.length>0){var fn=_9b.pop();var _9e=fn(_9c,req);if(_9e){_9c=_9e;}}},callback:function(){this.excCallbackSeq(this.req,this.callbacks);},errback:function(){if(this.errbacks.length==0){alert("Error encountered:\n"+this.req.responseText);}this.excCallbackSeq(this.req,this.errbacks);},addErrback:function(fn){this.errbacks.unshift(fn);},addCallback:function(fn){this.callbacks.unshift(fn);},addCallbacks:function(fn1,fn2){this.addCallback(fn1);this.addErrback(fn2);},sendReq:function(_a3){if(AJS.isObject(_a3)){this.req.send(AJS.queryArguments(_a3));}else{if(AJS.isDefined(_a3)){this.req.send(_a3);}else{this.req.send("");}}}};script_loaded=true;script_loaded=true;AJS.fx={_shades:{0:"ffffff",1:"ffffee",2:"ffffdd",3:"ffffcc",4:"ffffbb",5:"ffffaa",6:"ffff99"},highlight:function(_1,_2){var _3=new AJS.fx.Base();_3.elm=AJS.$(_1);_3.setOptions(_2);_3.options.duration=600;AJS.update(_3,{increase:function(){if(this.now==7){_1.style.backgroundColor="transparent";}else{_1.style.backgroundColor="#"+AJS.fx._shades[Math.floor(this.now)];}}});return _3.custom(6,0);},fadeIn:function(_4,_5){_5=_5||{};if(!_5.from){_5.from=0;AJS.setOpacity(_4,0);}if(!_5.to){_5.to=1;}var s=new AJS.fx.Style(_4,"opacity",_5);return s.custom(_5.from,_5.to);},fadeOut:function(_7,_8){_8=_8||{};if(!_8.from){_8.from=1;}if(!_8.to){_8.to=0;}_8.duration=300;var s=new AJS.fx.Style(_7,"opacity",_8);return s.custom(_8.from,_8.to);},setWidth:function(_a,_b){var s=new AJS.fx.Style(_a,"width",_b);return s.custom(_b.from,_b.to);},setHeight:function(_d,_e){var s=new AJS.fx.Style(_d,"height",_e);return s.custom(_e.from,_e.to);}};AJS.fx.Base=new AJS.Class({init:function(){AJS.bindMethods(this);},setOptions:function(_10){this.options=AJS.update({onStart:function(){},onComplete:function(){},transition:AJS.fx.Transitions.sineInOut,duration:500,wait:true,fps:50},_10||{});},step:function(){var _11=new Date().getTime();if(_11<this.time+this.options.duration){this.cTime=_11-this.time;this.setNow();}else{setTimeout(AJS.$b(this.options.onComplete,this,[this.elm]),10);this.clearTimer();this.now=this.to;}this.increase();},setNow:function(){this.now=this.compute(this.from,this.to);},compute:function(_12,to){var _14=to-_12;return this.options.transition(this.cTime,_12,_14,this.options.duration);},clearTimer:function(){clearInterval(this.timer);this.timer=null;return this;},_start:function(_15,to){if(!this.options.wait){this.clearTimer();}if(this.timer){return;}setTimeout(AJS.$p(this.options.onStart,this.elm),10);this.from=_15;this.to=to;this.time=new Date().getTime();this.timer=setInterval(this.step,Math.round(1000/this.options.fps));return this;},custom:function(_17,to){return this._start(_17,to);},set:function(to){this.now=to;this.increase();return this;},setStyle:function(elm,_1b,val){if(this.property=="opacity"){AJS.setOpacity(elm,val);}else{AJS.setStyle(elm,_1b,val);}}});AJS.fx.Style=AJS.fx.Base.extend({init:function(elm,_1e,_1f){this.parent();this.elm=elm;this.setOptions(_1f);this.property=_1e;},increase:function(){this.setStyle(this.elm,this.property,this.now);}});AJS.fx.Styles=AJS.fx.Base.extend({init:function(elm,_21){this.parent();this.elm=AJS.$(elm);this.setOptions(_21);this.now={};},setNow:function(){for(p in this.from){this.now[p]=this.compute(this.from[p],this.to[p]);}},custom:function(obj){if(this.timer&&this.options.wait){return;}var _23={};var to={};for(p in obj){_23[p]=obj[p][0];to[p]=obj[p][1];}return this._start(_23,to);},increase:function(){for(var p in this.now){this.setStyle(this.elm,p,this.now[p]);}}});AJS.fx.Transitions={linear:function(t,b,c,d){return c*t/d+b;},sineInOut:function(t,b,c,d){return -c/2*(Math.cos(Math.PI*t/d)-1)+b;}};script_loaded=true;script_loaded=true;var GB_CURRENT=null;GB_hide=function(){GB_CURRENT.hide();};GreyBox=new AJS.Class({init:function(_1){this.use_fx=AJS.fx;this.type="page";this.overlay_click_close=false;this.salt=0;this.root_dir=GB_ROOT_DIR;this.callback_fns=[];this.reload_on_close=false;this.src_loader=this.root_dir+"loader_frame.html";var _2=window.location.hostname.indexOf("www");var _3=this.src_loader.indexOf("www");if(_2!=-1&&_3==-1){this.src_loader=this.src_loader.replace("://","://www.");}if(_2==-1&&_3!=-1){this.src_loader=this.src_loader.replace("://www.","://");}this.show_loading=true;AJS.update(this,_1);},addCallback:function(fn){if(fn){this.callback_fns.push(fn);}},show:function(_5){GB_CURRENT=this;this.url=_5;var _6=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(_6),function(_7){_7.style.visibility="hidden";});this.createElements();return false;},hide:function(){var _8=this.callback_fns;if(_8!=[]){AJS.map(_8,function(fn){fn();});}this.onHide();if(this.use_fx){var _a=this.overlay;AJS.fx.fadeOut(this.overlay,{onComplete:function(){AJS.removeElement(_a);_a=null;},duration:300});AJS.removeElement(this.g_window);}else{AJS.removeElement(this.g_window,this.overlay);}this.removeFrame();AJS.REV(window,"scroll",_GB_setOverlayDimension);AJS.REV(window,"resize",_GB_update);var _b=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(_b),function(_c){_c.style.visibility="visible";});GB_CURRENT=null;if(this.reload_on_close){window.location.reload();}},update:function(){this.setOverlayDimension();this.setFrameSize();this.setWindowPosition();},createElements:function(){this.initOverlay();this.g_window=AJS.DIV({"id":"GB_window"});AJS.hideElement(this.g_window);AJS.getBody().insertBefore(this.g_window,this.overlay.nextSibling);this.initFrame();this.initHook();this.update();var me=this;if(this.use_fx){AJS.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){me.onShow();AJS.showElement(me.g_window);me.startLoading();}});}else{AJS.setOpacity(this.overlay,0.7);AJS.showElement(this.g_window);this.onShow();this.startLoading();}AJS.AEV(window,"scroll",_GB_setOverlayDimension);AJS.AEV(window,"resize",_GB_update);},removeFrame:function(){try{AJS.removeElement(this.iframe);}catch(e){}this.iframe=null;},startLoading:function(){this.iframe.src=this.src_loader+"?s="+this.salt++;AJS.showElement(this.iframe);},setOverlayDimension:function(){var _e=AJS.getWindowSize();if(AJS.isMozilla()||AJS.isOpera()){AJS.setWidth(this.overlay,"100%");}else{AJS.setWidth(this.overlay,_e.w);}var _f=Math.max(AJS.getScrollTop()+_e.h,AJS.getScrollTop()+this.height);if(_f<AJS.getScrollTop()){AJS.setHeight(this.overlay,_f);}else{AJS.setHeight(this.overlay,AJS.getScrollTop()+_e.h);}},initOverlay:function(){this.overlay=AJS.DIV({"id":"GB_overlay"});if(this.overlay_click_close){AJS.AEV(this.overlay,"click",GB_hide);}AJS.setOpacity(this.overlay,0);AJS.getBody().insertBefore(this.overlay,AJS.getBody().firstChild);},initFrame:function(){if(!this.iframe){var d={"name":"GB_frame","class":"GB_frame","frameBorder":0};this.iframe=AJS.IFRAME(d);this.middle_cnt=AJS.DIV({"class":"content"},this.iframe);this.top_cnt=AJS.DIV();this.bottom_cnt=AJS.DIV();AJS.ACN(this.g_window,this.top_cnt,this.middle_cnt,this.bottom_cnt);}},onHide:function(){},onShow:function(){},setFrameSize:function(){},setWindowPosition:function(){},initHook:function(){}});_GB_update=function(){if(GB_CURRENT){GB_CURRENT.update();}};_GB_setOverlayDimension=function(){if(GB_CURRENT){GB_CURRENT.setOverlayDimension();}};AJS.preloadImages(GB_ROOT_DIR+"indicator.gif");script_loaded=true;var GB_SETS={};function decoGreyboxLinks(){var as=AJS.$bytc("a");AJS.map(as,function(a){if(a.getAttribute("href")&&a.getAttribute("rel")){var rel=a.getAttribute("rel");if(rel.indexOf("gb_")==0){var _14=rel.match(/\w+/)[0];var _15=rel.match(/\[(.*)\]/)[1];var _16=0;var _17={"caption":a.title||"","url":a.href};if(_14=="gb_pageset"||_14=="gb_imageset"){if(!GB_SETS[_15]){GB_SETS[_15]=[];}GB_SETS[_15].push(_17);_16=GB_SETS[_15].length;}if(_14=="gb_pageset"){a.onclick=function(){GB_showFullScreenSet(GB_SETS[_15],_16);return false;};}if(_14=="gb_imageset"){a.onclick=function(){GB_showImageSet(GB_SETS[_15],_16);return false;};}if(_14=="gb_image"){a.onclick=function(){GB_showImage(_17.caption,_17.url);return false;};}if(_14=="gb_page"){a.onclick=function(){var sp=_15.split(/, ?/);GB_show(_17.caption,_17.url,parseInt(sp[1]),parseInt(sp[0]));return false;};}if(_14=="gb_page_fs"){a.onclick=function(){GB_showFullScreen(_17.caption,_17.url);return false;};}if(_14=="gb_page_center"){a.onclick=function(){var sp=_15.split(/, ?/);GB_showCenter(_17.caption,_17.url,parseInt(sp[1]),parseInt(sp[0]));return false;};}}}});}AJS.AEV(window,"load",decoGreyboxLinks);GB_showImage=function(_1a,url,_1c){var _1d={width:300,height:300,type:"image",fullscreen:false,center_win:true,caption:_1a,callback_fn:_1c};var win=new GB_Gallery(_1d);return win.show(url);};GB_showPage=function(_1f,url,_21){var _22={type:"page",caption:_1f,callback_fn:_21,fullscreen:true,center_win:false};var win=new GB_Gallery(_22);return win.show(url);};GB_Gallery=GreyBox.extend({init:function(_24){this.parent({});this.img_close=this.root_dir+"g_close.gif";AJS.update(this,_24);this.addCallback(this.callback_fn);},initHook:function(){AJS.addClass(this.g_window,"GB_Gallery");var _25=AJS.DIV({"class":"inner"});this.header=AJS.DIV({"class":"GB_header"},_25);AJS.setOpacity(this.header,0);AJS.getBody().insertBefore(this.header,this.overlay.nextSibling);var _26=AJS.TD({"id":"GB_caption","class":"caption","width":"40%"},this.caption);var _27=AJS.TD({"id":"GB_middle","class":"middle","width":"20%"});var _28=AJS.IMG({"src":this.img_close});AJS.AEV(_28,"click",GB_hide);var _29=AJS.TD({"class":"close","width":"40%"},_28);var _2a=AJS.TBODY(AJS.TR(_26,_27,_29));var _2b=AJS.TABLE({"cellspacing":"0","cellpadding":0,"border":0},_2a);AJS.ACN(_25,_2b);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this));}else{AJS.AEV(window,"scroll",AJS.$b(this._setHeaderPos,this));}},setFrameSize:function(){var _2c=this.overlay.offsetWidth;var _2d=AJS.getWindowSize();if(this.fullscreen){this.width=_2c-40;this.height=_2d.h-80;}AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height);AJS.setWidth(this.header,_2c);},_setHeaderPos:function(){AJS.setTop(this.header,AJS.getScrollTop()+10);},setWindowPosition:function(){var _2e=this.overlay.offsetWidth;var _2f=AJS.getWindowSize();AJS.setLeft(this.g_window,((_2e-50-this.width)/2));var _30=AJS.getScrollTop()+55;if(!this.center_win){AJS.setTop(this.g_window,_30);}else{var fl=((_2f.h-this.height)/2)+20+AJS.getScrollTop();if(fl<0){fl=0;}if(_30>fl){fl=_30;}AJS.setTop(this.g_window,fl);}this._setHeaderPos();},onHide:function(){AJS.removeElement(this.header);AJS.removeClass(this.g_window,"GB_Gallery");},onShow:function(){if(this.use_fx){AJS.fx.fadeIn(this.header,{to:1});}else{AJS.setOpacity(this.header,1);}}});AJS.preloadImages(GB_ROOT_DIR+"g_close.gif");GB_showFullScreenSet=function(set,_33,_34){var _35={type:"page",fullscreen:true,center_win:false};var _36=new GB_Sets(_35,set);_36.addCallback(_34);_36.showSet(_33-1);return false;};GB_showImageSet=function(set,_38,_39){var _3a={type:"image",fullscreen:false,center_win:true,width:300,height:300};var _3b=new GB_Sets(_3a,set);_3b.addCallback(_39);_3b.showSet(_38-1);return false;};GB_Sets=GB_Gallery.extend({init:function(_3c,set){this.parent(_3c);if(!this.img_next){this.img_next=this.root_dir+"next.gif";}if(!this.img_prev){this.img_prev=this.root_dir+"prev.gif";}this.current_set=set;},showSet:function(_3e){this.current_index=_3e;var _3f=this.current_set[this.current_index];this.show(_3f.url);this._setCaption(_3f.caption);this.btn_prev=AJS.IMG({"class":"left",src:this.img_prev});this.btn_next=AJS.IMG({"class":"right",src:this.img_next});AJS.AEV(this.btn_prev,"click",AJS.$b(this.switchPrev,this));AJS.AEV(this.btn_next,"click",AJS.$b(this.switchNext,this));GB_STATUS=AJS.SPAN({"class":"GB_navStatus"});AJS.ACN(AJS.$("GB_middle"),this.btn_prev,GB_STATUS,this.btn_next);this.updateStatus();},updateStatus:function(){AJS.setHTML(GB_STATUS,(this.current_index+1)+" / "+this.current_set.length);if(this.current_index==0){AJS.addClass(this.btn_prev,"disabled");}else{AJS.removeClass(this.btn_prev,"disabled");}if(this.current_index==this.current_set.length-1){AJS.addClass(this.btn_next,"disabled");}else{AJS.removeClass(this.btn_next,"disabled");}},_setCaption:function(_40){AJS.setHTML(AJS.$("GB_caption"),_40);},updateFrame:function(){var _41=this.current_set[this.current_index];this._setCaption(_41.caption);this.url=_41.url;this.startLoading();},switchPrev:function(){if(this.current_index!=0){this.current_index--;this.updateFrame();this.updateStatus();}},switchNext:function(){if(this.current_index!=this.current_set.length-1){this.current_index++;this.updateFrame();this.updateStatus();}}});AJS.AEV(window,"load",function(){AJS.preloadImages(GB_ROOT_DIR+"next.gif",GB_ROOT_DIR+"prev.gif");});GB_show=function(_42,url,_44,_45,_46){var _47={caption:_42,height:_44||500,width:_45||500,fullscreen:false,callback_fn:_46};var win=new GB_Window(_47);return win.show(url);};GB_showCenter=function(_49,url,_4b,_4c,_4d){var _4e={caption:_49,center_win:true,height:_4b||500,width:_4c||500,fullscreen:false,callback_fn:_4d};var win=new GB_Window(_4e);return win.show(url);};GB_showFullScreen=function(_50,url,_52){var _53={caption:_50,fullscreen:true,callback_fn:_52};var win=new GB_Window(_53);return win.show(url);};GB_Window=GreyBox.extend({init:function(_55){this.parent({});this.img_header=this.root_dir+"header_bg.gif";this.img_close=this.root_dir+"w_close.gif";this.show_close_img=true;AJS.update(this,_55);this.addCallback(this.callback_fn);},initHook:function(){AJS.addClass(this.g_window,"GB_Window");this.header=AJS.TABLE({"class":"header"});this.header.style.backgroundImage="url("+this.img_header+")";var _56=AJS.TD({"class":"caption"},this.caption);var _57=AJS.TD({"class":"close"});if(this.show_close_img){var _58=AJS.IMG({"src":this.img_close});var _59=AJS.SPAN("Close");var btn=AJS.DIV(_58,_59);AJS.AEV([_58,_59],"mouseover",function(){AJS.addClass(_59,"on");});AJS.AEV([_58,_59],"mouseout",function(){AJS.removeClass(_59,"on");});AJS.AEV([_58,_59],"mousedown",function(){AJS.addClass(_59,"click");});AJS.AEV([_58,_59],"mouseup",function(){AJS.removeClass(_59,"click");});AJS.AEV([_58,_59],"click",GB_hide);AJS.ACN(_57,btn);}tbody_header=AJS.TBODY();AJS.ACN(tbody_header,AJS.TR(_56,_57));AJS.ACN(this.header,tbody_header);AJS.ACN(this.top_cnt,this.header);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this));}},setFrameSize:function(){if(this.fullscreen){var _5b=AJS.getWindowSize();overlay_h=_5b.h;this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);this.height=Math.round(overlay_h-(overlay_h/100)*10);}AJS.setWidth(this.header,this.width+6);AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height);},setWindowPosition:function(){var _5c=AJS.getWindowSize();AJS.setLeft(this.g_window,((_5c.w-this.width)/2)-13);if(!this.center_win){AJS.setTop(this.g_window,AJS.getScrollTop());}else{var fl=((_5c.h-this.height)/2)-20+AJS.getScrollTop();if(fl<0){fl=0;}AJS.setTop(this.g_window,fl);}}});AJS.preloadImages(GB_ROOT_DIR+"w_close.gif",GB_ROOT_DIR+"header_bg.gif");script_loaded=true;(function(c){function p(d,b,a){var e=this,l=d.add(this),h=d.find(a.tabs),i=b.jquery?b:d.children(b),j;h.length||(h=d.children());i.length||(i=d.parent().find(b));i.length||(i=c(b));c.extend(this,{click:function(f,g){var k=h.eq(f);if(typeof f=="string"&&f.replace("#","")){k=h.filter("[href*="+f.replace("#","")+"]");f=Math.max(h.index(k),0)}if(a.rotate){var n=h.length-1;if(f<0)return e.click(n,g);if(f>n)return e.click(0,g)}if(!k.length){if(j>=0)return e;f=a.initialIndex;k=h.eq(f)}if(f===j)return e;g=g||c.Event();g.type="onBeforeClick";l.trigger(g,[f]);if(!g.isDefaultPrevented()){o[a.effect].call(e,f,function(){g.type="onClick";l.trigger(g,[f])});j=f;h.removeClass(a.current);k.addClass(a.current);return e}},getConf:function(){return a},getTabs:function(){return h},getPanes:function(){return i},getCurrentPane:function(){return i.eq(j)},getCurrentTab:function(){return h.eq(j)},getIndex:function(){return j},next:function(){return e.click(j+1)},prev:function(){return e.click(j-1)},destroy:function(){h.unbind(a.event).removeClass(a.current);i.find("a[href^=#]").unbind("click.T");return e}});c.each("onBeforeClick,onClick".split(","),function(f,g){c.isFunction(a[g])&&c(e).bind(g,a[g]);e[g]=function(k){k&&c(e).bind(g,k);return e}});if(a.history&&c.fn.history){c.tools.history.init(h);a.event="history"}h.each(function(f){c(this).bind(a.event,function(g){e.click(f,g);return g.preventDefault()})});i.find("a[href^=#]").bind("click.T",function(f){e.click(c(this).attr("href"),f)});if(location.hash&&a.tabs=="a"&&d.find("[href="+location.hash+"]").length)e.click(location.hash);else if(a.initialIndex===0||a.initialIndex>0)e.click(a.initialIndex)}c.tools=c.tools||{version:"1.2.5"};c.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:false,history:false},addEffect:function(d,b){o[d]=b}};var o={"default":function(d,b){this.getPanes().hide().eq(d).show();b.call()},fade:function(d,b){var a=this.getConf(),e=a.fadeOutSpeed,l=this.getPanes();e?l.fadeOut(e):l.hide();l.eq(d).fadeIn(a.fadeInSpeed,b)},slide:function(d,b){this.getPanes().slideUp(200);this.getPanes().eq(d).slideDown(400,b)},ajax:function(d,b){this.getPanes().eq(0).load(this.getTabs().eq(d).attr("href"),b)}},m;c.tools.tabs.addEffect("horizontal",function(d,b){m||(m=this.getPanes().eq(0).width());this.getCurrentPane().animate({width:0},function(){c(this).hide()});this.getPanes().eq(d).animate({width:m},function(){c(this).show();b.call()})});c.fn.tabs=function(d,b){var a=this.data("tabs");if(a){a.destroy();this.removeData("tabs")}if(c.isFunction(b))b={onBeforeClick:b};b=c.extend({},c.tools.tabs.conf,b);this.each(function(){a=new p(c(this),d,b);c(this).data("tabs",a)});return b.api?a:this}})(jQuery);(function(c){function p(g,a){function m(f){var e=c(f);return e.length<2?e:g.parent().find(f)}var b=this,i=g.add(this),d=g.data("tabs"),h,j=true,n=m(a.next).click(function(){d.next()}),k=m(a.prev).click(function(){d.prev()});c.extend(b,{getTabs:function(){return d},getConf:function(){return a},play:function(){if(h)return b;var f=c.Event("onBeforePlay");i.trigger(f);if(f.isDefaultPrevented())return b;h=setInterval(d.next,a.interval);j=false;i.trigger("onPlay");return b},pause:function(){if(!h)return b;var f=c.Event("onBeforePause");i.trigger(f);if(f.isDefaultPrevented())return b;h=clearInterval(h);i.trigger("onPause");return b},stop:function(){b.pause();j=true}});c.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","),function(f,e){c.isFunction(a[e])&&c(b).bind(e,a[e]);b[e]=function(q){return c(b).bind(e,q)}});a.autopause&&d.getTabs().add(n).add(k).add(d.getPanes()).hover(b.pause,function(){j||b.play()});a.autoplay&&b.play();a.clickable&&d.getPanes().click(function(){d.next()});if(!d.getConf().rotate){var l=a.disabledClass;d.getIndex()||k.addClass(l);d.onBeforeClick(function(f,e){k.toggleClass(l,!e);n.toggleClass(l,e==d.getTabs().length-1)})}}var o;o=c.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:false,autopause:true,interval:3E3,clickable:true,api:false}};c.fn.slideshow=function(g){var a=this.data("slideshow");if(a)return a;g=c.extend({},o.conf,g);this.each(function(){a=new p(c(this),g);c(this).data("slideshow",a)});return g.api?a:this}})(jQuery);(function(f){function p(a,b,c){var h=c.relative?a.position().top:a.offset().top,d=c.relative?a.position().left:a.offset().left,i=c.position[0];h-=b.outerHeight()-c.offset[0];d+=a.outerWidth()+c.offset[1];if(/iPad/i.test(navigator.userAgent))h-=f(window).scrollTop();var j=b.outerHeight()+a.outerHeight();if(i=="center")h+=j/2;if(i=="bottom")h+=j;i=c.position[1];a=b.outerWidth()+a.outerWidth();if(i=="center")d-=a/2;if(i=="left")d-=a;return{top:h,left:d}}function u(a,b){var c=this,h=a.add(c),d,i=0,j=0,m=a.attr("title"),q=a.attr("data-tooltip"),r=o[b.effect],l,s=a.is(":input"),v=s&&a.is(":checkbox, :radio, select, :button, :submit"),t=a.attr("type"),k=b.events[t]||b.events[s?v?"widget":"input":"def"];if(!r)throw'Nonexistent effect "'+b.effect+'"';k=k.split(/,\s*/);if(k.length!=2)throw"Tooltip: bad events configuration for "+t;a.bind(k[0],function(e){clearTimeout(i);if(b.predelay)j=setTimeout(function(){c.show(e)},b.predelay);else c.show(e)}).bind(k[1],function(e){clearTimeout(j);if(b.delay)i=setTimeout(function(){c.hide(e)},b.delay);else c.hide(e)});if(m&&b.cancelDefault){a.removeAttr("title");a.data("title",m)}f.extend(c,{show:function(e){if(!d){if(q)d=f(q);else if(b.tip)d=f(b.tip).eq(0);else if(m)d=f(b.layout).addClass(b.tipClass).appendTo(document.body).hide().append(m);else{d=a.next();d.length||(d=a.parent().next())}if(!d.length)throw"Cannot find tooltip for "+a;}if(c.isShown())return c;d.stop(true,true);var g=p(a,d,b);b.tip&&d.html(a.data("title"));e=e||f.Event();e.type="onBeforeShow";h.trigger(e,[g]);if(e.isDefaultPrevented())return c;g=p(a,d,b);d.css({position:"absolute",top:g.top,left:g.left});l=true;r[0].call(c,function(){e.type="onShow";l="full";h.trigger(e)});g=b.events.tooltip.split(/,\s*/);if(!d.data("__set")){d.bind(g[0],function(){clearTimeout(i);clearTimeout(j)});g[1]&&!a.is("input:not(:checkbox, :radio), textarea")&&d.bind(g[1],function(n){n.relatedTarget!=a[0]&&a.trigger(k[1].split(" ")[0])});d.data("__set",true)}return c},hide:function(e){if(!d||!c.isShown())return c;e=e||f.Event();e.type="onBeforeHide";h.trigger(e);if(!e.isDefaultPrevented()){l=false;o[b.effect][1].call(c,function(){e.type="onHide";h.trigger(e)});return c}},isShown:function(e){return e?l=="full":l},getConf:function(){return b},getTip:function(){return d},getTrigger:function(){return a}});f.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(e,g){f.isFunction(b[g])&&f(c).bind(g,b[g]);c[g]=function(n){n&&f(c).bind(g,n);return c}})}f.tools=f.tools||{version:"1.2.5"};f.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:false,cancelDefault:true,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,b,c){o[a]=[b,c]}};var o={toggle:[function(a){var b=this.getConf(),c=this.getTip();b=b.opacity;b<1&&c.css({opacity:b});c.show();a.call()},function(a){this.getTip().hide();a.call()}],fade:[function(a){var b=this.getConf();this.getTip().fadeTo(b.fadeInSpeed,b.opacity,a)},function(a){this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)}]};f.fn.tooltip=function(a){var b=this.data("tooltip");if(b)return b;a=f.extend(true,{},f.tools.tooltip.conf,a);if(typeof a.position=="string")a.position=a.position.split(/,?\s/);this.each(function(){b=new u(f(this),a);f(this).data("tooltip",b)});return a.api?b:this}})(jQuery);(function(d){var i=d.tools.tooltip;d.extend(i.conf,{direction:"up",bounce:false,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!d.browser.msie});var e={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};i.addEffect("slide",function(g){var a=this.getConf(),f=this.getTip(),b=a.slideFade?{opacity:a.opacity}:{},c=e[a.direction]||e.up;b[c[1]]=c[0]+"="+a.slideOffset;a.slideFade&&f.css({opacity:0});f.show().animate(b,a.slideInSpeed,g)},function(g){var a=this.getConf(),f=a.slideOffset,b=a.slideFade?{opacity:0}:{},c=e[a.direction]||e.up,h=""+c[0];if(a.bounce)h=h=="+"?"-":"+";b[c[1]]=h+"="+f;this.getTip().animate(b,a.slideOutSpeed,function(){d(this).hide();g.call()})})})(jQuery);(function(g){function j(a){var c=g(window),d=c.width()+c.scrollLeft(),h=c.height()+c.scrollTop();return[a.offset().top<=c.scrollTop(),d<=a.offset().left+a.width(),h<=a.offset().top+a.height(),c.scrollLeft()>=a.offset().left]}function k(a){for(var c=a.length;c--;)if(a[c])return false;return true}var i=g.tools.tooltip;i.dynamic={conf:{classNames:"top right bottom left"}};g.fn.dynamic=function(a){if(typeof a=="number")a={speed:a};a=g.extend({},i.dynamic.conf,a);var c=a.classNames.split(/\s/),d;this.each(function(){var h=g(this).tooltip().onBeforeShow(function(e,f){e=this.getTip();var b=this.getConf();d||(d=[b.position[0],b.position[1],b.offset[0],b.offset[1],g.extend({},b)]);g.extend(b,d[4]);b.position=[d[0],d[1]];b.offset=[d[2],d[3]];e.css({visibility:"hidden",position:"absolute",top:f.top,left:f.left}).show();f=j(e);if(!k(f)){if(f[2]){g.extend(b,a.top);b.position[0]="top";e.addClass(c[0])}if(f[3]){g.extend(b,a.right);b.position[1]="right";e.addClass(c[1])}if(f[0]){g.extend(b,a.bottom);b.position[0]="bottom";e.addClass(c[2])}if(f[1]){g.extend(b,a.left);b.position[1]="left";e.addClass(c[3])}if(f[0]||f[2])b.offset[0]*=-1;if(f[1]||f[3])b.offset[1]*=-1}e.css({visibility:"visible"}).hide()});h.onBeforeShow(function(){var e=this.getConf();this.getTip();setTimeout(function(){e.position=[d[0],d[1]];e.offset=[d[2],d[3]]},0)});h.onHide(function(){var e=this.getTip();e.removeClass(a.classNames)});ret=h});return a.api?ret:this}})(jQuery);(function(e){function p(f,c){var b=e(c);return b.length<2?b:f.parent().find(c)}function u(f,c){var b=this,n=f.add(b),g=f.children(),l=0,j=c.vertical;k||(k=b);if(g.length>1)g=e(c.items,f);e.extend(b,{getConf:function(){return c},getIndex:function(){return l},getSize:function(){return b.getItems().size()},getNaviButtons:function(){return o.add(q)},getRoot:function(){return f},getItemWrap:function(){return g},getItems:function(){return g.children(c.item).not("."+c.clonedClass)},move:function(a,d){return b.seekTo(l+a,d)},next:function(a){return b.move(1,a)},prev:function(a){return b.move(-1,a)},begin:function(a){return b.seekTo(0,a)},end:function(a){return b.seekTo(b.getSize()-1,a)},focus:function(){return k=b},addItem:function(a){a=e(a);if(c.circular){g.children("."+c.clonedClass+":last").before(a);g.children("."+c.clonedClass+":first").replaceWith(a.clone().addClass(c.clonedClass))}else g.append(a);n.trigger("onAddItem",[a]);return b},seekTo:function(a,d,h){a.jquery||(a*=1);if(c.circular&&a===0&&l==-1&&d!==0)return b;if(!c.circular&&a<0||a>b.getSize()||a<-1)return b;var i=a;if(a.jquery)a=b.getItems().index(a);else i=b.getItems().eq(a);var r=e.Event("onBeforeSeek");if(!h){n.trigger(r,[a,d]);if(r.isDefaultPrevented()||!i.length)return b}i=j?{top:-i.position().top}:{left:-i.position().left};l=a;k=b;if(d===undefined)d=c.speed;g.animate(i,d,c.easing,h||function(){n.trigger("onSeek",[a])});return b}});e.each(["onBeforeSeek","onSeek","onAddItem"],function(a,d){e.isFunction(c[d])&&e(b).bind(d,c[d]);b[d]=function(h){h&&e(b).bind(d,h);return b}});if(c.circular){var s=b.getItems().slice(-1).clone().prependTo(g),t=b.getItems().eq(1).clone().appendTo(g);s.add(t).addClass(c.clonedClass);b.onBeforeSeek(function(a,d,h){if(!a.isDefaultPrevented())if(d==-1){b.seekTo(s,h,function(){b.end(0)});return a.preventDefault()}else d==b.getSize()&&b.seekTo(t,h,function(){b.begin(0)})});b.seekTo(0,0,function(){})}var o=p(f,c.prev).click(function(){b.prev()}),q=p(f,c.next).click(function(){b.next()});if(!c.circular&&b.getSize()>1){b.onBeforeSeek(function(a,d){setTimeout(function(){if(!a.isDefaultPrevented()){o.toggleClass(c.disabledClass,d<=0);q.toggleClass(c.disabledClass,d>=b.getSize()-1)}},1)});c.initialIndex||o.addClass(c.disabledClass)}c.mousewheel&&e.fn.mousewheel&&f.mousewheel(function(a,d){if(c.mousewheel){b.move(d<0?1:-1,c.wheelSpeed||50);return false}});if(c.touch){var m={};g[0].ontouchstart=function(a){a=a.touches[0];m.x=a.clientX;m.y=a.clientY};g[0].ontouchmove=function(a){if(a.touches.length==1&&!g.is(":animated")){var d=a.touches[0],h=m.x-d.clientX;d=m.y-d.clientY;b[j&&d>0||!j&&h>0?"next":"prev"]();a.preventDefault()}}}c.keyboard&&e(document).bind("keydown.scrollable",function(a){if(!(!c.keyboard||a.altKey||a.ctrlKey||e(a.target).is(":input")))if(!(c.keyboard!="static"&&k!=b)){var d=a.keyCode;if(j&&(d==38||d==40)){b.move(d==38?-1:1);return a.preventDefault()}if(!j&&(d==37||d==39)){b.move(d==37?-1:1);return a.preventDefault()}}});c.initialIndex&&b.seekTo(c.initialIndex,0,function(){})}e.tools=e.tools||{version:"1.2.5"};e.tools.scrollable={conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,touch:true,wheelSpeed:0}};var k;e.fn.scrollable=function(f){var c=this.data("scrollable");if(c)return c;f=e.extend({},e.tools.scrollable.conf,f);this.each(function(){c=new u(e(this),f);e(this).data("scrollable",c)});return f.api?c:this}})(jQuery);(function(b){var f=b.tools.scrollable;f.autoscroll={conf:{autoplay:true,interval:3E3,autopause:true}};b.fn.autoscroll=function(c){if(typeof c=="number")c={interval:c};var d=b.extend({},f.autoscroll.conf,c),g;this.each(function(){var a=b(this).data("scrollable");if(a)g=a;var e,h=true;a.play=function(){if(!e){h=false;e=setInterval(function(){a.next()},d.interval)}};a.pause=function(){e=clearInterval(e)};a.stop=function(){a.pause();h=true};d.autopause&&a.getRoot().add(a.getNaviButtons()).hover(a.pause,a.play);d.autoplay&&a.play()});return d.api?g:this}})(jQuery);(function(d){function p(b,g){var h=d(g);return h.length<2?h:b.parent().find(g)}var m=d.tools.scrollable;m.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,idPrefix:null,history:false}};d.fn.navigator=function(b){if(typeof b=="string")b={navi:b};b=d.extend({},m.navigator.conf,b);var g;this.each(function(){function h(a,c,i){e.seekTo(c);if(j){if(location.hash)location.hash=a.attr("href").replace("#","")}else return i.preventDefault()}function f(){return k.find(b.naviItem||"> *")}function n(a){var c=d("<"+(b.naviItem||"a")+"/>").click(function(i){h(d(this),a,i)}).attr("href","#"+a);a===0&&c.addClass(l);b.indexed&&c.text(a+1);b.idPrefix&&c.attr("id",b.idPrefix+a);return c.appendTo(k)}function o(a,c){a=f().eq(c.replace("#",""));a.length||(a=f().filter("[href="+c+"]"));a.click()}var e=d(this).data("scrollable"),k=b.navi.jquery?b.navi:p(e.getRoot(),b.navi),q=e.getNaviButtons(),l=b.activeClass,j=b.history&&d.fn.history;if(e)g=e;e.getNaviButtons=function(){return q.add(k)};f().length?f().each(function(a){d(this).click(function(c){h(d(this),a,c)})}):d.each(e.getItems(),function(a){n(a)});e.onBeforeSeek(function(a,c){setTimeout(function(){if(!a.isDefaultPrevented()){var i=f().eq(c);!a.isDefaultPrevented()&&i.length&&f().removeClass(l).eq(c).addClass(l)}},1)});e.onAddItem(function(a,c){c=n(e.getItems().index(c));j&&c.history(o)});j&&f().history(o)});return b.api?g:this}})(jQuery);(function(a){function t(d,b){var c=this,j=d.add(c),o=a(window),k,f,m,g=a.tools.expose&&(b.mask||b.expose),n=Math.random().toString().slice(10);if(g){if(typeof g=="string")g={color:g};g.closeOnClick=g.closeOnEsc=false}var p=b.target||d.attr("rel");f=p?a(p):d;if(!f.length)throw"Could not find Overlay: "+p;d&&d.index(f)==-1&&d.click(function(e){c.load(e);return e.preventDefault()});a.extend(c,{load:function(e){if(c.isOpened())return c;var h=q[b.effect];if(!h)throw'Overlay: cannot find effect : "'+b.effect+'"';b.oneInstance&&a.each(s,function(){this.close(e)});e=e||a.Event();e.type="onBeforeLoad";j.trigger(e);if(e.isDefaultPrevented())return c;m=true;g&&a(f).expose(g);var i=b.top,r=b.left,u=f.outerWidth({margin:true}),v=f.outerHeight({margin:true});if(typeof i=="string")i=i=="center"?Math.max((o.height()-v)/2,0):parseInt(i,10)/100*o.height();if(r=="center")r=Math.max((o.width()-u)/2,0);h[0].call(c,{top:i,left:r},function(){if(m){e.type="onLoad";j.trigger(e)}});g&&b.closeOnClick&&a.mask.getMask().one("click",c.close);b.closeOnClick&&a(document).bind("click."+n,function(l){a(l.target).parents(f).length||c.close(l)});b.closeOnEsc&&a(document).bind("keydown."+n,function(l){l.keyCode==27&&c.close(l)});return c},close:function(e){if(!c.isOpened())return c;e=e||a.Event();e.type="onBeforeClose";j.trigger(e);if(!e.isDefaultPrevented()){m=false;q[b.effect][1].call(c,function(){e.type="onClose";j.trigger(e)});a(document).unbind("click."+n).unbind("keydown."+n);g&&a.mask.close();return c}},getOverlay:function(){return f},getTrigger:function(){return d},getClosers:function(){return k},isOpened:function(){return m},getConf:function(){return b}});a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(e,h){a.isFunction(b[h])&&a(c).bind(h,b[h]);c[h]=function(i){i&&a(c).bind(h,i);return c}});k=f.find(b.close||".close");if(!k.length&&!b.close){k=a('<a class="close"></a>');f.prepend(k)}k.click(function(e){c.close(e)});b.load&&c.load()}a.tools=a.tools||{version:"1.2.5"};a.tools.overlay={addEffect:function(d,b,c){q[d]=[b,c]},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};var s=[],q={};a.tools.overlay.addEffect("default",function(d,b){var c=this.getConf(),j=a(window);if(!c.fixed){d.top+=j.scrollTop();d.left+=j.scrollLeft()}d.position=c.fixed?"fixed":"absolute";this.getOverlay().css(d).fadeIn(c.speed,b)},function(d){this.getOverlay().fadeOut(this.getConf().closeSpeed,d)});a.fn.overlay=function(d){var b=this.data("overlay");if(b)return b;if(a.isFunction(d))d={onBeforeLoad:d};d=a.extend(true,{},a.tools.overlay.conf,d);this.each(function(){b=new t(a(this),d);s.push(b);a(this).data("overlay",b)});return d.api?b:this}})(jQuery);(function(h){function k(d){var e=d.offset();return{top:e.top+d.height()/2,left:e.left+d.width()/2}}var l=h.tools.overlay,f=h(window);h.extend(l.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});function o(d,e){var a=this.getOverlay(),c=this.getConf(),g=this.getTrigger(),p=this,m=a.outerWidth({margin:true}),b=a.data("img"),n=c.fixed?"fixed":"absolute";if(!b){b=a.css("backgroundImage");if(!b)throw"background-image CSS property not set for overlay";b=b.slice(b.indexOf("(")+1,b.indexOf(")")).replace(/\"/g,"");a.css("backgroundImage","none");b=h('<img src="'+b+'"/>');b.css({border:0,display:"none"}).width(m);h("body").append(b);a.data("img",b)}var i=c.start.top||Math.round(f.height()/2),j=c.start.left||Math.round(f.width()/2);if(g){g=k(g);i=g.top;j=g.left}if(c.fixed){i-=f.scrollTop();j-=f.scrollLeft()}else{d.top+=f.scrollTop();d.left+=f.scrollLeft()}b.css({position:"absolute",top:i,left:j,width:0,zIndex:c.zIndex}).show();d.position=n;a.css(d);b.animate({top:a.css("top"),left:a.css("left"),width:m},c.speed,function(){a.css("zIndex",c.zIndex+1).fadeIn(c.fadeInSpeed,function(){p.isOpened()&&!h(this).index(a)?e.call():a.hide()})}).css("position",n)}function q(d){var e=this.getOverlay().hide(),a=this.getConf(),c=this.getTrigger();e=e.data("img");var g={top:a.start.top,left:a.start.left,width:0};c&&h.extend(g,k(c));a.fixed&&e.css({position:"absolute"}).animate({top:"+="+f.scrollTop(),left:"+="+f.scrollLeft()},0);e.animate(g,a.closeSpeed,d)}l.addEffect("apple",o,q)})(jQuery);(function(d){function R(a,c){return 32-(new Date(a,c,32)).getDate()}function S(a,c){a=""+a;for(c=c||2;a.length<c;)a="0"+a;return a}function T(a,c,j){var q=a.getDate(),h=a.getDay(),r=a.getMonth();a=a.getFullYear();var f={d:q,dd:S(q),ddd:B[j].shortDays[h],dddd:B[j].days[h],m:r+1,mm:S(r+1),mmm:B[j].shortMonths[r],mmmm:B[j].months[r],yy:String(a).slice(2),yyyy:a};c=c.replace(X,function(s){return s in f?f[s]:s.slice(1,s.length-1)});return Y.html(c).html()}function v(a){return parseInt(a,10)}function U(a,c){return a.getFullYear()===c.getFullYear()&&a.getMonth()==c.getMonth()&&a.getDate()==c.getDate()}function C(a){if(a){if(a.constructor==Date)return a;if(typeof a=="string"){var c=a.split("-");if(c.length==3)return new Date(v(c[0]),v(c[1])-1,v(c[2]));if(!/^-?\d+$/.test(a))return;a=v(a)}c=new Date;c.setDate(c.getDate()+a);return c}}function Z(a,c){function j(b,e,g){n=b;D=b.getFullYear();E=b.getMonth();G=b.getDate();g=g||d.Event("api");g.type="change";H.trigger(g,[b]);if(!g.isDefaultPrevented()){a.val(T(b,e.format,e.lang));a.data("date",b);h.hide(g)}}function q(b){b.type="onShow";H.trigger(b);d(document).bind("keydown.d",function(e){if(e.ctrlKey)return true;var g=e.keyCode;if(g==8){a.val("");return h.hide(e)}if(g==27)return h.hide(e);if(d(V).index(g)>=0){if(!w){h.show(e);return e.preventDefault()}var i=d("#"+f.weeks+" a"),t=d("."+f.focus),o=i.index(t);t.removeClass(f.focus);if(g==74||g==40)o+=7;else if(g==75||g==38)o-=7;else if(g==76||g==39)o+=1;else if(g==72||g==37)o-=1;if(o>41){h.addMonth();t=d("#"+f.weeks+" a:eq("+(o-42)+")")}else if(o<0){h.addMonth(-1);t=d("#"+f.weeks+" a:eq("+(o+42)+")")}else t=i.eq(o);t.addClass(f.focus);return e.preventDefault()}if(g==34)return h.addMonth();if(g==33)return h.addMonth(-1);if(g==36)return h.today();if(g==13)d(e.target).is("select")||d("."+f.focus).click();return d([16,17,18,9]).index(g)>=0});d(document).bind("click.d",function(e){var g=e.target;if(!d(g).parents("#"+f.root).length&&g!=a[0]&&(!L||g!=L[0]))h.hide(e)})}var h=this,r=new Date,f=c.css,s=B[c.lang],k=d("#"+f.root),M=k.find("#"+f.title),L,I,J,D,E,G,n=a.attr("data-value")||c.value||a.val(),m=a.attr("min")||c.min,p=a.attr("max")||c.max,w;if(m===0)m="0";n=C(n)||r;m=C(m||c.yearRange[0]*365);p=C(p||c.yearRange[1]*365);if(!s)throw"Dateinput: invalid language: "+c.lang;if(a.attr("type")=="date"){var N=d("<input/>");d.each("class,disabled,id,maxlength,name,readonly,required,size,style,tabindex,title,value".split(","),function(b,e){N.attr(e,a.attr(e))});a.replaceWith(N);a=N}a.addClass(f.input);var H=a.add(h);if(!k.length){k=d("<div><div><a/><div/><a/></div><div><div/><div/></div></div>").hide().css({position:"absolute"}).attr("id",f.root);k.children().eq(0).attr("id",f.head).end().eq(1).attr("id",f.body).children().eq(0).attr("id",f.days).end().eq(1).attr("id",f.weeks).end().end().end().find("a").eq(0).attr("id",f.prev).end().eq(1).attr("id",f.next);M=k.find("#"+f.head).find("div").attr("id",f.title);if(c.selectors){var z=d("<select/>").attr("id",f.month),A=d("<select/>").attr("id",f.year);M.html(z.add(A))}for(var $=k.find("#"+f.days),O=0;O<7;O++)$.append(d("<span/>").text(s.shortDays[(O+c.firstDay)%7]));d("body").append(k)}if(c.trigger)L=d("<a/>").attr("href","#").addClass(f.trigger).click(function(b){h.show();return b.preventDefault()}).insertAfter(a);var K=k.find("#"+f.weeks);A=k.find("#"+f.year);z=k.find("#"+f.month);d.extend(h,{show:function(b){if(!(a.attr("readonly")||a.attr("disabled")||w)){b=b||d.Event();b.type="onBeforeShow";H.trigger(b);if(!b.isDefaultPrevented()){d.each(W,function(){this.hide()});w=true;z.unbind("change").change(function(){h.setValue(A.val(),d(this).val())});A.unbind("change").change(function(){h.setValue(d(this).val(),z.val())});I=k.find("#"+f.prev).unbind("click").click(function(){I.hasClass(f.disabled)||h.addMonth(-1);return false});J=k.find("#"+f.next).unbind("click").click(function(){J.hasClass(f.disabled)||h.addMonth();return false});h.setValue(n);var e=a.offset();if(/iPad/i.test(navigator.userAgent))e.top-=d(window).scrollTop();k.css({top:e.top+a.outerHeight({margins:true})+c.offset[0],left:e.left+c.offset[1]});if(c.speed)k.show(c.speed,function(){q(b)});else{k.show();q(b)}return h}}},setValue:function(b,e,g){var i=v(e)>=-1?new Date(v(b),v(e),v(g||1)):b||n;if(i<m)i=m;else if(i>p)i=p;b=i.getFullYear();e=i.getMonth();g=i.getDate();if(e==-1){e=11;b--}else if(e==12){e=0;b++}if(!w){j(i,c);return h}E=e;D=b;g=new Date(b,e,1-c.firstDay);g=g.getDay();var t=R(b,e),o=R(b,e-1),P;if(c.selectors){z.empty();d.each(s.months,function(x,F){m<new Date(b,x+1,-1)&&p>new Date(b,x,0)&&z.append(d("<option/>").html(F).attr("value",x))});A.empty();i=r.getFullYear();for(var l=i+c.yearRange[0];l<i+c.yearRange[1];l++)m<=new Date(l+1,-1,1)&&p>new Date(l,0,0)&&A.append(d("<option/>").text(l));z.val(e);A.val(b)}else M.html(s.months[e]+" "+b);K.empty();I.add(J).removeClass(f.disabled);l=!g?-7:0;for(var u,y;l<(!g?35:42);l++){u=d("<a/>");if(l%7===0){P=d("<div/>").addClass(f.week);K.append(P)}if(l<g){u.addClass(f.off);y=o-g+l+1;i=new Date(b,e-1,y)}else if(l>=g+t){u.addClass(f.off);y=l-t-g+1;i=new Date(b,e+1,y)}else{y=l-g+1;i=new Date(b,e,y);if(U(n,i))u.attr("id",f.current).addClass(f.focus);else U(r,i)&&u.attr("id",f.today)}m&&i<m&&u.add(I).addClass(f.disabled);p&&i>p&&u.add(J).addClass(f.disabled);u.attr("href","#"+y).text(y).data("date",i);P.append(u)}K.find("a").click(function(x){var F=d(this);if(!F.hasClass(f.disabled)){d("#"+f.current).removeAttr("id");F.attr("id",f.current);j(F.data("date"),c,x)}return false});f.sunday&&K.find(f.week).each(function(){var x=c.firstDay?7-c.firstDay:0;d(this).children().slice(x,x+1).addClass(f.sunday)});return h},setMin:function(b,e){m=C(b);e&&n<m&&h.setValue(m);return h},setMax:function(b,e){p=C(b);e&&n>p&&h.setValue(p);return h},today:function(){return h.setValue(r)},addDay:function(b){return this.setValue(D,E,G+(b||1))},addMonth:function(b){return this.setValue(D,E+(b||1),G)},addYear:function(b){return this.setValue(D+(b||1),E,G)},hide:function(b){if(w){b=d.Event();b.type="onHide";H.trigger(b);d(document).unbind("click.d").unbind("keydown.d");if(b.isDefaultPrevented())return;k.hide();w=false}return h},getConf:function(){return c},getInput:function(){return a},getCalendar:function(){return k},getValue:function(b){return b?T(n,b,c.lang):n},isOpen:function(){return w}});d.each(["onBeforeShow","onShow","change","onHide"],function(b,e){d.isFunction(c[e])&&d(h).bind(e,c[e]);h[e]=function(g){g&&d(h).bind(e,g);return h}});a.bind("focus click",h.show).keydown(function(b){var e=b.keyCode;if(!w&&d(V).index(e)>=0){h.show(b);return b.preventDefault()}return b.shiftKey||b.ctrlKey||b.altKey||e==9?true:b.preventDefault()});C(a.val())&&j(n,c)}d.tools=d.tools||{version:"1.2.5"};var W=[],Q,V=[75,76,38,39,74,72,40,37],B={};Q=d.tools.dateinput={conf:{format:"mm/dd/yy",selectors:false,yearRange:[-5,5],lang:"en",offset:[0,0],speed:0,firstDay:0,min:undefined,max:undefined,trigger:false,css:{prefix:"cal",input:"date",root:0,head:0,title:0,prev:0,next:0,month:0,year:0,days:0,body:0,weeks:0,today:0,current:0,week:0,off:0,sunday:0,focus:0,disabled:0,trigger:0}},localize:function(a,c){d.each(c,function(j,q){c[j]=q.split(",")});B[a]=c}};Q.localize("en",{months:"January,February,March,April,May,June,July,August,September,October,November,December",shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",days:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",shortDays:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"});var X=/d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*'/g,Y=d("<a/>");d.expr[":"].date=function(a){var c=a.getAttribute("type");return c&&c=="date"||!!d(a).data("dateinput")};d.fn.dateinput=function(a){if(this.data("dateinput"))return this;a=d.extend(true,{},Q.conf,a);d.each(a.css,function(j,q){if(!q&&j!="prefix")a.css[j]=(a.css.prefix||"")+(q||j)});var c;this.each(function(){var j=new Z(d(this),a);W.push(j);j=j.getInput().data("dateinput",j);c=c?c.add(j):j});return c?c:this}})(jQuery);(function(e){function F(d,a){a=Math.pow(10,a);return Math.round(d*a)/a}function q(d,a){if(a=parseInt(d.css(a),10))return a;return(d=d[0].currentStyle)&&d.width&&parseInt(d.width,10)}function C(d){return(d=d.data("events"))&&d.onSlide}function G(d,a){function h(c,b,f,j){if(f===undefined)f=b/k*z;else if(j)f-=a.min;if(s)f=Math.round(f/s)*s;if(b===undefined||s)b=f*k/z;if(isNaN(f))return g;b=Math.max(0,Math.min(b,k));f=b/k*z;if(j||!n)f+=a.min;if(n)if(j)b=k-b;else f=a.max-f;f=F(f,t);var r=c.type=="click";if(D&&l!==undefined&&!r){c.type="onSlide";A.trigger(c,[f,b]);if(c.isDefaultPrevented())return g}j=r?a.speed:0;r=r?function(){c.type="change";A.trigger(c,[f])}:null;if(n){m.animate({top:b},j,r);a.progress&&B.animate({height:k-b+m.width()/2},j)}else{m.animate({left:b},j,r);a.progress&&B.animate({width:b+m.width()/2},j)}l=f;H=b;d.val(f);return g}function o(){if(n=a.vertical||q(i,"height")>q(i,"width")){k=q(i,"height")-q(m,"height");u=i.offset().top+k}else{k=q(i,"width")-q(m,"width");u=i.offset().left}}function v(){o();g.setValue(a.value!==undefined?a.value:a.min)}var g=this,p=a.css,i=e("<div><div/><a href='#'/></div>").data("rangeinput",g),n,l,u,k,H;d.before(i);var m=i.addClass(p.slider).find("a").addClass(p.handle),B=i.find("div").addClass(p.progress);e.each("min,max,step,value".split(","),function(c,b){c=d.attr(b);if(parseFloat(c))a[b]=parseFloat(c,10)});var z=a.max-a.min,s=a.step=="any"?0:a.step,t=a.precision;if(t===undefined)try{t=s.toString().split(".")[1].length}catch(I){t=0}if(d.attr("type")=="range"){var w=e("<input/>");e.each("class,disabled,id,maxlength,name,readonly,required,size,style,tabindex,title,value".split(","),function(c,b){w.attr(b,d.attr(b))});w.val(a.value);d.replaceWith(w);d=w}d.addClass(p.input);var A=e(g).add(d),D=true;e.extend(g,{getValue:function(){return l},setValue:function(c,b){o();return h(b||e.Event("api"),undefined,c,true)},getConf:function(){return a},getProgress:function(){return B},getHandle:function(){return m},getInput:function(){return d},step:function(c,b){b=b||e.Event();var f=a.step=="any"?1:a.step;g.setValue(l+f*(c||1),b)},stepUp:function(c){return g.step(c||1)},stepDown:function(c){return g.step(-c||-1)}});e.each("onSlide,change".split(","),function(c,b){e.isFunction(a[b])&&e(g).bind(b,a[b]);g[b]=function(f){f&&e(g).bind(b,f);return g}});m.drag({drag:false}).bind("dragStart",function(){o();D=C(e(g))||C(d)}).bind("drag",function(c,b,f){if(d.is(":disabled"))return false;h(c,n?b:f)}).bind("dragEnd",function(c){if(!c.isDefaultPrevented()){c.type="change";A.trigger(c,[l])}}).click(function(c){return c.preventDefault()});i.click(function(c){if(d.is(":disabled")||c.target==m[0])return c.preventDefault();o();var b=m.width()/2;h(c,n?k-u-b+c.pageY:c.pageX-u-b)});a.keyboard&&d.keydown(function(c){if(!d.attr("readonly")){var b=c.keyCode,f=e([75,76,38,33,39]).index(b)!=-1,j=e([74,72,40,34,37]).index(b)!=-1;if((f||j)&&!(c.shiftKey||c.altKey||c.ctrlKey)){if(f)g.step(b==33?10:1,c);else if(j)g.step(b==34?-10:-1,c);return c.preventDefault()}}});d.blur(function(c){var b=e(this).val();b!==l&&g.setValue(b,c)});e.extend(d[0],{stepUp:g.stepUp,stepDown:g.stepDown});v();k||e(window).load(v)}e.tools=e.tools||{version:"1.2.5"};var E;E=e.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:undefined,vertical:0,keyboard:true,progress:false,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var x,y;e.fn.drag=function(d){document.ondragstart=function(){return false};d=e.extend({x:true,y:true,drag:true},d);x=x||e(document).bind("mousedown mouseup",function(a){var h=e(a.target);if(a.type=="mousedown"&&h.data("drag")){var o=h.position(),v=a.pageX-o.left,g=a.pageY-o.top,p=true;x.bind("mousemove.drag",function(i){var n=i.pageX-v;i=i.pageY-g;var l={};if(d.x)l.left=n;if(d.y)l.top=i;if(p){h.trigger("dragStart");p=false}d.drag&&h.css(l);h.trigger("drag",[i,n]);y=h});a.preventDefault()}else try{y&&y.trigger("dragEnd")}finally{x.unbind("mousemove.drag");y=null}});return this.data("drag",true)};e.expr[":"].range=function(d){var a=d.getAttribute("type");return a&&a=="range"||!!e(d).filter("input").data("rangeinput")};e.fn.rangeinput=function(d){if(this.data("rangeinput"))return this;d=e.extend(true,{},E.conf,d);var a;this.each(function(){var h=new G(e(this),e.extend(true,{},d));h=h.getInput().data("rangeinput",h);a=a?a.add(h):h});return a?a:this}})(jQuery);(function(e){function t(a,b,c){var k=a.offset().top,f=a.offset().left,l=c.position.split(/,?\s+/),p=l[0];l=l[1];k-=b.outerHeight()-c.offset[0];f+=a.outerWidth()+c.offset[1];if(/iPad/i.test(navigator.userAgent))k-=e(window).scrollTop();c=b.outerHeight()+a.outerHeight();if(p=="center")k+=c/2;if(p=="bottom")k+=c;a=a.outerWidth();if(l=="center")f-=(a+b.outerWidth())/2;if(l=="left")f-=a;return{top:k,left:f}}function y(a){function b(){return this.getAttribute("type")==a}b.key="[type="+a+"]";return b}function u(a,b,c){function k(g,d,i){if(!(!c.grouped&&g.length)){var j;if(i===false||e.isArray(i)){j=h.messages[d.key||d]||h.messages["*"];j=j[c.lang]||h.messages["*"].en;(d=j.match(/\$\d/g))&&e.isArray(i)&&e.each(d,function(m){j=j.replace(this,i[m])})}else j=i[c.lang]||i;g.push(j)}}var f=this,l=b.add(f);a=a.not(":button, :image, :reset, :submit");e.extend(f,{getConf:function(){return c},getForm:function(){return b},getInputs:function(){return a},reflow:function(){a.each(function(){var g=e(this),d=g.data("msg.el");if(d){g=t(g,d,c);d.css({top:g.top,left:g.left})}});return f},invalidate:function(g,d){if(!d){var i=[];e.each(g,function(j,m){j=a.filter("[name='"+j+"']");if(j.length){j.trigger("OI",[m]);i.push({input:j,messages:[m]})}});g=i;d=e.Event()}d.type="onFail";l.trigger(d,[g]);d.isDefaultPrevented()||q[c.effect][0].call(f,g,d);return f},reset:function(g){g=g||a;g.removeClass(c.errorClass).each(function(){var d=e(this).data("msg.el");if(d){d.remove();e(this).data("msg.el",null)}}).unbind(c.errorInputEvent||"");return f},destroy:function(){b.unbind(c.formEvent+".V").unbind("reset.V");a.unbind(c.inputEvent+".V").unbind("change.V");return f.reset()},checkValidity:function(g,d){g=g||a;g=g.not(":disabled");if(!g.length)return true;d=d||e.Event();d.type="onBeforeValidate";l.trigger(d,[g]);if(d.isDefaultPrevented())return d.result;var i=[];g.not(":radio:not(:checked)").each(function(){var m=[],n=e(this).data("messages",m),v=r&&n.is(":date")?"onHide.v":c.errorInputEvent+".v";n.unbind(v);e.each(w,function(){var o=this,s=o[0];if(n.filter(s).length){o=o[1].call(f,n,n.val());if(o!==true){d.type="onBeforeFail";l.trigger(d,[n,s]);if(d.isDefaultPrevented())return false;var x=n.attr(c.messageAttr);if(x){m=[x];return false}else k(m,s,o)}}});if(m.length){i.push({input:n,messages:m});n.trigger("OI",[m]);c.errorInputEvent&&n.bind(v,function(o){f.checkValidity(n,o)})}if(c.singleError&&i.length)return false});var j=q[c.effect];if(!j)throw'Validator: cannot find effect "'+c.effect+'"';if(i.length){f.invalidate(i,d);return false}else{j[1].call(f,g,d);d.type="onSuccess";l.trigger(d,[g]);g.unbind(c.errorInputEvent+".v")}return true}});e.each("onBeforeValidate,onBeforeFail,onFail,onSuccess".split(","),function(g,d){e.isFunction(c[d])&&e(f).bind(d,c[d]);f[d]=function(i){i&&e(f).bind(d,i);return f}});c.formEvent&&b.bind(c.formEvent+".V",function(g){if(!f.checkValidity(null,g))return g.preventDefault()});b.bind("reset.V",function(){f.reset()});a[0]&&a[0].validity&&a.each(function(){this.oninvalid=function(){return false}});if(b[0])b[0].checkValidity=f.checkValidity;c.inputEvent&&a.bind(c.inputEvent+".V",function(g){f.checkValidity(e(this),g)});a.filter(":checkbox, select").filter("[required]").bind("change.V",function(g){var d=e(this);if(this.checked||d.is("select")&&e(this).val())q[c.effect][1].call(f,d,g)});var p=a.filter(":radio").change(function(g){f.checkValidity(p,g)});e(window).resize(function(){f.reflow()})}e.tools=e.tools||{version:"1.2.5"};var z=/\[type=([a-z]+)\]/,A=/^-?[0-9]*(\.[0-9]+)?$/,r=e.tools.dateinput,B=/^([a-z0-9_\.\-\+]+)@([\da-z\.\-]+)\.([a-z\.]{2,6})$/i,C=/^(https?:\/\/)?[\da-z\.\-]+\.[a-z\.]{2,6}[#&+_\?\/\w \.\-=]*$/i,h;h=e.tools.validator={conf:{grouped:false,effect:"default",errorClass:"invalid",inputEvent:null,errorInputEvent:"keyup",formEvent:"submit",lang:"en",message:"<div/>",messageAttr:"data-message",messageClass:"error",offset:[0,0],position:"center right",singleError:false,speed:"normal"},messages:{"*":{en:"Please correct this value"}},localize:function(a,b){e.each(b,function(c,k){h.messages[c]=h.messages[c]||{};h.messages[c][a]=k})},localizeFn:function(a,b){h.messages[a]=h.messages[a]||{};e.extend(h.messages[a],b)},fn:function(a,b,c){if(e.isFunction(b))c=b;else{if(typeof b=="string")b={en:b};this.messages[a.key||a]=b}if(b=z.exec(a))a=y(b[1]);w.push([a,c])},addEffect:function(a,b,c){q[a]=[b,c]}};var w=[],q={"default":[function(a){var b=this.getConf();e.each(a,function(c,k){c=k.input;c.addClass(b.errorClass);var f=c.data("msg.el");if(!f){f=e(b.message).addClass(b.messageClass).appendTo(document.body);c.data("msg.el",f)}f.css({visibility:"hidden"}).find("p").remove();e.each(k.messages,function(l,p){e("<p/>").html(p).appendTo(f)});f.outerWidth()==f.parent().width()&&f.add(f.find("p")).css({display:"inline"});k=t(c,f,b);f.css({visibility:"visible",position:"absolute",top:k.top,left:k.left}).fadeIn(b.speed)})},function(a){var b=this.getConf();a.removeClass(b.errorClass).each(function(){var c=e(this).data("msg.el");c&&c.css({visibility:"hidden"})})}]};e.each("email,url,number".split(","),function(a,b){e.expr[":"][b]=function(c){return c.getAttribute("type")===b}});e.fn.oninvalid=function(a){return this[a?"bind":"trigger"]("OI",a)};h.fn(":email","Please enter a valid email address",function(a,b){return!b||B.test(b)});h.fn(":url","Please enter a valid URL",function(a,b){return!b||C.test(b)});h.fn(":number","Please enter a numeric value.",function(a,b){return A.test(b)});h.fn("[max]","Please enter a value smaller than $1",function(a,b){if(b===""||r&&a.is(":date"))return true;a=a.attr("max");return parseFloat(b)<=parseFloat(a)?true:[a]});h.fn("[min]","Please enter a value larger than $1",function(a,b){if(b===""||r&&a.is(":date"))return true;a=a.attr("min");return parseFloat(b)>=parseFloat(a)?true:[a]});h.fn("[required]","Please complete this mandatory field.",function(a,b){if(a.is(":checkbox"))return a.is(":checked");return!!b});h.fn("[pattern]",function(a){var b=new RegExp("^"+a.attr("pattern")+"$");return b.test(a.val())});e.fn.validator=function(a){var b=this.data("validator");if(b){b.destroy();this.removeData("validator")}a=e.extend(true,{},h.conf,a);if(this.is("form"))return this.each(function(){var c=e(this);b=new u(c.find(":input"),c,a);c.data("validator",b)});else{b=new u(this,this.eq(0).closest("form"),a);return this.data("validator",b)}}})(jQuery);(function(){function f(a,b){if(b)for(var c in b)if(b.hasOwnProperty(c))a[c]=b[c];return a}function l(a,b){var c=[];for(var d in a)if(a.hasOwnProperty(d))c[d]=b(a[d]);return c}function m(a,b,c){if(e.isSupported(b.version))a.innerHTML=e.getHTML(b,c);else if(b.expressInstall&&e.isSupported([6,65]))a.innerHTML=e.getHTML(f(b,{src:b.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title});else{if(!a.innerHTML.replace(/\s/g,"")){a.innerHTML="<h2>Flash version "+b.version+" or greater is required</h2><h3>"+(g[0]>0?"Your version is "+g:"You have no flash plugin installed")+"</h3>"+(a.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+k+"'>here</a></p>");if(a.tagName=="A")a.onclick=function(){location.href=k}}if(b.onFail){var d=b.onFail.call(this);if(typeof d=="string")a.innerHTML=d}}if(i)window[b.id]=document.getElementById(b.id);f(this,{getRoot:function(){return a},getOptions:function(){return b},getConf:function(){return c},getApi:function(){return a.firstChild}})}var i=document.all,k="http://www.adobe.com/go/getflashplayer",n=typeof jQuery=="function",o=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,j={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});window.flashembed=function(a,b,c){if(typeof a=="string")a=document.getElementById(a.replace("#",""));if(a){if(typeof b=="string")b={src:b};return new m(a,f(f({},j),b),c)}};var e=f(window.flashembed,{conf:j,getVersion:function(){var a,b;try{b=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(c){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"))&&a.GetVariable("$version")}catch(d){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"))&&a.GetVariable("$version")}catch(h){}}}return(b=o.exec(b))?[b[1],b[3]]:[0,0]},asString:function(a){if(a===null||a===undefined)return null;var b=typeof a;if(b=="object"&&a.push)b="array";switch(b){case "string":a=a.replace(new RegExp('(["\\\\])',"g"),"\\$1");a=a.replace(/^\s?(\d+\.?\d+)%/,"$1pct");return'"'+a+'"';case "array":return"["+l(a,function(d){return e.asString(d)}).join(",")+"]";case "function":return'"function()"';case "object":b=[];for(var c in a)a.hasOwnProperty(c)&&b.push('"'+c+'":'+e.asString(a[c]));return"{"+b.join(",")+"}"}return String(a).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(a,b){a=f({},a);var c='<object width="'+a.width+'" height="'+a.height+'" id="'+a.id+'" name="'+a.id+'"';if(a.cachebusting)a.src+=(a.src.indexOf("?")!=-1?"&":"?")+Math.random();c+=a.w3c||!i?' data="'+a.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';c+=">";if(a.w3c||i)c+='<param name="movie" value="'+a.src+'" />';a.width=a.height=a.id=a.w3c=a.src=null;a.onFail=a.version=a.expressInstall=null;for(var d in a)if(a[d])c+='<param name="'+d+'" value="'+a[d]+'" />';a="";if(b){for(var h in b)if(b[h]){d=b[h];a+=h+"="+(/function|object/.test(typeof d)?e.asString(d):d)+"&"}a=a.slice(0,-1);c+='<param name="flashvars" value=\''+a+"' />"}c+="</object>";return c},isSupported:function(a){return g[0]>a[0]||g[0]==a[0]&&g[1]>=a[1]}}),g=e.getVersion();if(n){jQuery.tools=jQuery.tools||{version:"1.2.5"};jQuery.tools.flashembed={conf:j};jQuery.fn.flashembed=function(a,b){return this.each(function(){$(this).data("flashembed",flashembed(this,a,b))})}}})();(function(b){function h(c){if(c){var a=d.contentWindow.document;a.open().close();a.location.hash=c}}var g,d,f,i;b.tools=b.tools||{version:"1.2.5"};b.tools.history={init:function(c){if(!i){if(b.browser.msie&&b.browser.version<"8"){if(!d){d=b("<iframe/>").attr("src","javascript:false;").hide().get(0);b("body").append(d);setInterval(function(){var a=d.contentWindow.document;a=a.location.hash;g!==a&&b.event.trigger("hash",a)},100);h(location.hash||"#")}}else setInterval(function(){var a=location.hash;a!==g&&b.event.trigger("hash",a)},100);f=!f?c:f.add(c);c.click(function(a){var e=b(this).attr("href");d&&h(e);if(e.slice(0,1)!="#"){location.href="#"+e;return a.preventDefault()}});i=true}}};b(window).bind("hash",function(c,a){a?f.filter(function(){var e=b(this).attr("href");return e==a||e==a.replace("#","")}).trigger("history",[a]):f.eq(0).trigger("history",[a]);g=a});b.fn.history=function(c){b.tools.history.init(this);return this.bind("history",c)}})(jQuery);(function(b){function k(){if(b.browser.msie){var a=b(document).height(),d=b(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-d<20?d:a]}return[b(document).width(),b(document).height()]}function h(a){if(a)return a.call(b.mask)}b.tools=b.tools||{version:"1.2.5"};var l;l=b.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,onClose:null}};var c,i,e,g,j;b.mask={load:function(a,d){if(e)return this;if(typeof a=="string")a={color:a};a=a||g;g=a=b.extend(b.extend({},l.conf),a);c=b("#"+a.maskId);if(!c.length){c=b("<div/>").attr("id",a.maskId);b("body").append(c)}var m=k();c.css({position:"absolute",top:0,left:0,width:m[0],height:m[1],display:"none",opacity:a.startOpacity,zIndex:a.zIndex});a.color&&c.css("backgroundColor",a.color);if(h(a.onBeforeLoad)===false)return this;a.closeOnEsc&&b(document).bind("keydown.mask",function(f){f.keyCode==27&&b.mask.close(f)});a.closeOnClick&&c.bind("click.mask",function(f){b.mask.close(f)});b(window).bind("resize.mask",function(){b.mask.fit()});if(d&&d.length){j=d.eq(0).css("zIndex");b.each(d,function(){var f=b(this);/relative|absolute|fixed/i.test(f.css("position"))||f.css("position","relative")});i=d.css({zIndex:Math.max(a.zIndex+1,j=="auto"?0:j)})}c.css({display:"block"}).fadeTo(a.loadSpeed,a.opacity,function(){b.mask.fit();h(a.onLoad);e="full"});e=true;return this},close:function(){if(e){if(h(g.onBeforeClose)===false)return this;c.fadeOut(g.closeSpeed,function(){h(g.onClose);i&&i.css({zIndex:j});e=false});b(document).unbind("keydown.mask");c.unbind("click.mask");b(window).unbind("resize.mask")}return this},fit:function(){if(e){var a=k();c.css({width:a[0],height:a[1]})}},getMask:function(){return c},isLoaded:function(a){return a?e=="full":e},getConf:function(){return g},getExposed:function(){return i}};b.fn.mask=function(a){b.mask.load(a);return this};b.fn.expose=function(a){b.mask.load(a,this);return this}})(jQuery);(function(b){function c(a){switch(a.type){case "mousemove":return b.extend(a.data,{clientX:a.clientX,clientY:a.clientY,pageX:a.pageX,pageY:a.pageY});case "DOMMouseScroll":b.extend(a,a.data);a.delta=-a.detail/3;break;case "mousewheel":a.delta=a.wheelDelta/120;break}a.type="wheel";return b.event.handle.call(this,a,a.delta)}b.fn.mousewheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};b.event.special.wheel={setup:function(){b.event.add(this,d,c,{})},teardown:function(){b.event.remove(this,d,c)}};var d=!b.browser.mozilla?"mousewheel":"DOMMouseScroll"+(b.browser.version<"1.9"?" mousemove":"")})(jQuery);(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);(function($) {$.fn.innerfade = function(options) {return this.each(function() { $.innerfade(this, options);});};$.innerfade = function(container, options) {var settings = {'animationtype': 'fade','speed': 'normal','type': 'sequence','timeout': 2000,'containerheight': 'auto','runningclass': 'innerfade','children': null};if (options)$.extend(settings, options);if (settings.children === null)var elements = $(container).children();elsevar elements = $(container).children(settings.children);if (elements.length > 1) {$(container).css('position', 'relative').css('height', settings.containerheight).addClass(settings.runningclass);for (var i = 0; i < elements.length; i++) {$(elements[i]).css('z-index', String(elements.length-i)).css('position', 'absolute').hide();};if (settings.type == "sequence") {setTimeout(function() {$.innerfade.next(elements, settings, 1, 0);}, settings.timeout);$(elements[0]).show();} else if (settings.type == "random") {var last = Math.floor ( Math.random () * ( elements.length ) );setTimeout(function() {do { current = Math.floor ( Math.random ( ) * ( elements.length ) );} while (last == current ); $.innerfade.next(elements, settings, current, last);}, settings.timeout);$(elements[last]).show();} else if ( settings.type == 'random_start' ) {settings.type = 'sequence';var current = Math.floor ( Math.random () * ( elements.length ) );setTimeout(function(){$.innerfade.next(elements, settings, (current + 1) % elements.length, current);}, settings.timeout);$(elements[current]).show();} else {alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');}}};$.innerfade.next = function(elements, settings, current, last) {if (settings.animationtype == 'slide') {$(elements[last]).slideUp(settings.speed);$(elements[current]).slideDown(settings.speed);} else if (settings.animationtype == 'fade') {$(elements[last]).fadeOut(settings.speed);$(elements[current]).fadeIn(settings.speed, function() {removeFilter($(this)[0]);});} elsealert('Innerfade-animationtype must either be \'slide\' or \'fade\'');if (settings.type == "sequence") {if ((current + 1) < elements.length) {current = current + 1;last = current - 1;} else {current = 0;last = elements.length - 1;}} else if (settings.type == "random") {last = current;while (current == last)current = Math.floor(Math.random() * elements.length);} elsealert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');setTimeout((function() {$.innerfade.next(elements, settings, current, last);}), settings.timeout);};})(jQuery);// **** remove Opacity-Filter in ie ****function removeFilter(element) {if(element.style.removeAttribute){element.style.removeAttribute('filter');}}(function(k,w){if(!k.jqDock){var v=["Top","Right","Bottom","Left"],N=["Major","Minor"],z=["mouseenter","mousemove","mouseleave"],x=["docknudge","dockidle","dockfreeze"],s=["Idler","Inactive","Indock","Overdock","Offdock"],E=['<div style="position:relative;padding:0;',"margin:0;border:0 none;background-color:transparent;",'">'],p={v:{wh:"height",xy:1,tl:"top",lead:0,trail:2,inv:"h"},h:{wh:"width",xy:0,tl:"left",lead:3,trail:1,inv:"v"}},m=[],F=[0,0],X=function(){},C=function(a){a=parseInt(a,10);return isNaN(a)?0:a},t=function(a,d){for(var c=s[d]?d+1:s.length;d<c&&c--;)if(a[s[c]]){w.clearTimeout(a[s[c]]);a[s[c]]=null}},A=function(a){return a?1*((a.id||"").match(/^jqDock(\d+)$/)||[0,-1])[1]:-1},Y=function(){var a=m[A(k(".jqDockFilter",this).add(this).css({filter:""}).removeClass("jqDockFilter").filter(".jqDock")[0])];if(a){a.Asleep=false;a.Menu.trigger("dockshow",["ready"]).trigger(x[0])}},G=function(a,d){for(var c=true,e=m.length,b;a&&c&&e--&&m[e].Elem;)for(b=m[e].Elem.length;c&&b--;)c=m[e].Elem[b].Img[0]!==a;return c?!c:d?[e,b]:m[e].Elem[b]},H=function(a){var d=(new Date).getTime();a=a?a.Stamp+a.Opts.duration:0;if(a>d)d-=a-d;return d},O=function(a){var d=m[a.data.id],c=d.Elem[a.data.idx];c.height=this.height;c.width=this.width;--d.Load<=0&&w.setTimeout(function(){k.jqDock.initDock(a.data.id)},0)},Z=function(a,d){for(var c;a&&a.ownerDocument&&a!==d;){if(c=a.className.toString().match(/jqDockMouse(\d+)/))return 1*c[1];a=a.parentNode}return-1},P=function(a,d,c){var e={},b=p[c].wh;c=p[p[c].inv].wh;e[b]=d;e[c]=Math.round(d*a[c]/a[b]);return e},Q=function(){k(this).prev("img").trigger("click");return false},y=function(a,d){var c=a.Elem[a.Current];if(c&&a.Opts.labels)c.Label.el[d?"show":"hide"]()},R=function(a){var d=p[a.Opts.vh],c=a.Elem.length,e=-1,b=0,f,h,j,i=F[d.xy]-a.Elem[0].Wrap.parent().offset()[d.tl];if(i>=0)for(;e<0&&b<c;b++){f=a.Elem[b];h=f.Pad[d.lead]+f.Pad[d.trail];j=f.Major+h;if(i<j){if(b!=a.Current){y(a);a.Current=b}e=f.Offset+i*(f.Initial+h)/j}else i-=j}return e},S=function(a){for(var d=a.childNodes.length,c;d;){c=a.childNodes[--d];if(c.childNodes&&c.childNodes.length)S(c);else c.nodeType==3&&a.removeChild(c)}},T=function(a){a.Menu.css({visibility:"visible"}).show()},D=function(a){var d=a.Opts.idle;if(d){t(a,0);a[s[0]]=w.setTimeout(function(){a.Menu.trigger("dockidle")},d)}},$=function(a,d,c){var e=a.Opts,b=e.labels,f=d.Label,h;f.el=k('<div class="jqDockLabel jqDockLabel'+d.Link+'" style="position:absolute;margin:0;"></div>').hide().insertAfter(d.Img);if(b){h=b.charAt(0)=="b";b=b.charAt(1)=="r";f.el.css({top:h?"auto":0,left:b?"auto":0,bottom:h?0:"auto",right:b?0:"auto"}).click(Q)}a=e.setLabel.call(a.Menu[0],d.Title,c,f.el[0]);a!==false&&k('<div class="jqDockLabelText">'+a.toString()+"</div>").appendTo(f.el)},I=function(a,d){var c=m[a],e=c.Opts,b=p[e.vh].wh,f=c.Elem.length,h,j,i;for(d=d||d===0?d:R(c);f--;){h=c.Elem[f];i=h.Initial;if(d>=0){j=Math.abs(d-h.Centre);if(j<e.distance)i=h[b]-Math.round((h[b]-h.Initial)*Math.pow(j,e.coefficient)/e.attenuation);if(f==c.Current){j=[F[p[e.vh].xy],c.Current,i].join(",");if(j===c.ToFro[0]&&i!==c.ToFro[2])i=c.ToFro[2];else c.ToFro=[c.ToFro[1],j,i]}}h.Final=i}},aa=function(a){return a},U=function(a,d,c,e){a=m[a];var b=a.Elem[d],f=a.Opts,h=a.Yard,j=p[f.vh],i=p[j.inv],n=b.src!=b.altsrc,o,g,l;if(e||b.Major!=c){o=k.boxModel||f.vh=="v"?0:a.Border[j.lead]+a.Border[j.trail];if(n&&!e&&b.Major==b.Initial)b.Img[0].src=b.altsrc;a.Spread+=c-b.Major;g=P(b,c,f.vh);l=f.size-g[i.wh];if({top:1,left:1}[f.align])g["margin"+v[i.trail]]=l;else if({middle:1,center:1}[f.align]){g["margin"+v[i.lead]]=(l+l%2)/2;g["margin"+v[i.trail]]=(l-l%2)/2}else g["margin"+v[i.lead]]=l;if(c!=b.Major||e&&!d){f.flow&&h.parent()[j.wh](a.Spread+a.Border[j.lead]+a.Border[j.trail]);h[j.wh](a.Spread+o)}b.Wrap.css(g);f.flow||h.css(j.tl,Math.floor(Math.max(0,(a[j.wh]-a.Spread)/2)));if(a.OnDock){d=!a.Stamp;f=a.Opts.labels;h=p[a.Opts.vh];j=a.Elem[a.Current];var q,r;if(j&&f){o=j.Label;l=o.el;if(o.mc){o.mc=0;for(q in p){o[q]=l[p[q].wh]();for(r in{lead:1,trail:1})o[q]+=C(l.css("padding"+v[p[q][r]]))}}f.charAt(0)=="m"&&l.css({top:Math.floor((j[N[p[h.inv].xy]]-o.v)/2)});f.charAt(1)=="c"&&l.css({left:Math.floor((j[N[h.xy]]-o.h)/2)})}d&&y(a,1)}b.Major=c;b.Minor=g[i.wh];if(n&&!e&&c==b.Initial)b.Img[0].src=b.src}},J=function(a){var d=m[a],c=d.Opts,e=p[c.vh],b=c.duration+c.step,f=0,h;if(d.Stamp){b=H()-d.Stamp;if(b>=c.duration)d.Stamp=0}if(b>=c.step){for(h=(c.duration-b)/c.step;f<d.Elem.length;f++){c=d.Elem[f];b=(b=c.Final-c.Major)&&h>1?c.Major+Math[b<0?"floor":"ceil"](b/h):c.Final;U(a,f,b)}if(d.Spread>d[e.wh]){d.Yard.parent()[e.wh](d.Spread+d.Border[e.lead]+d.Border[e.trail]);d[e.wh]=d.Spread}}},K=function(a,d){var c=m[a],e=c.Elem,b=e.length;t(c,2);if(c.OnDock&&!c.Stamp){for(I(a,d);b--&&e[b].Major==e[b].Final;);if(b<0)y(c,1);else{J(a);c[s[2]]=w.setTimeout(function(){K(a,d)},c.Opts.step)}}},V=function(a,d){var c=m[a],e=c.Elem,b=e.length;if(!c.OnDock){for(;b--&&e[b].Major<=e[b].Initial;);R(c);if(b<0){c.Stamp=0;for(b=e.length;b--;)e[b].Major=e[b].Final=e[b].Initial;c.Current=-1;d||D(c)}else{J(a);c[s[4]]=w.setTimeout(function(){V(a,d)},c.Opts.step)}}},W=function(a,d){var c=m[a],e=c.Elem,b=e.length;if(c.OnDock){for(I(a,d);b--&&e[b].Major==e[b].Final;);if(b<0||!c.Stamp){c.Stamp=0;K(a,d)}else{J(a);c[s[3]]=w.setTimeout(function(){W(a,d)},c.Opts.step)}}},B=function(a,d,c,e){var b=m[d],f=b.Elem,h=f.length;if(a===0){b.OnDock=1;b.Current>=0&&b.Current!==c&&y(b);b.Current=c;b.Stamp=e&&e>1?0:H(b);W(d,e?f[c].Centre:null)}if(a===1){if(c!==b.Current){y(b);b.Current=c}K(d)}if(a===2){t(b,1);b.OnDock=0;y(b);for(b.Stamp=H(b);h--;)f[h].Final=f[h].Initial;V(d,!!e)}},L=function(a){var d=A(this),c=m[d],e=c?Z(a.target,this):-1,b=-1,f;if(c)if(c.Asleep){if(!c.Opts.noBuffer)c.Sleeper={target:a.target,type:a.type,pageX:a.pageX,pageY:a.pageY}}else{f=c.OnDock;t(c,0);F=[a.pageX,a.pageY];if(a.type==z[2])if(f)b=2;else D(c);else{if(c.Opts.inactivity){t(c,1);c[s[1]]=w.setTimeout(function(){B(2,d,e,1)},c.Opts.inactivity)}if(a.type==z[1])if(e<0){if(f&&c.Current>=0)b=2}else b=!f||c.Current<0?0:1;else if(e>=0&&!f)b=0}c.Sleeper=null;b>=0&&B(b,d,e)}},M=function(a){var d=k(".jqDock",this).get(0),c=A(d),e=m[c],b=a.type==x[2],f=b?"freeze":"sleep";if(e)if(a.type==x[0]){f=e.Frozen?"thaw":"wake";if(e.Asleep&&!(e.Asleep=e.Opts.onWake.call(this,f)===false))e.Frozen=!k(this).trigger("dockwake",[f]);if(!e.Asleep){D(e);e.Sleeper&&L.call(d,e.Sleeper)}}else{t(e,0);a=!e.Asleep||b&&!e.Frozen;if(!a||e.Opts.onSleep.call(e.Menu[0],f)!==false){e.Asleep=!t(e,b?-1:1);e.Frozen=e.Frozen||b;a&&e.Menu.trigger("docksleep",[f]);if(b)e.Stamp=e.OnDock=0;else B(2,c,0,1)}}};k.jqDock=function(){return{version:1.6,defaults:{size:48,distance:72,coefficient:1.5,duration:300,align:"bottom",labels:0,source:0,loader:0,inactivity:0,fadeIn:0,fadeLayer:"",step:50,setLabel:0,flow:0,idle:0,onReady:0,onSleep:0,onWake:0,noBuffer:0,active:-1},useJqLoader:k.browser.opera||k.browser.safari,initDock:function(a){var d=m[a],c=d.Opts,e=p[c.vh],b=p[e.inv],f=d.Border,h=d.Elem.length,j=E.join(""),i=0,n=0,o,g,l,q=c.fadeLayer;S(d.Menu[0]);for(d.Menu.children().each(function(r,u){var ba=d.Elem[r].Wrap=k(u).wrap(j+j+"</div></div>").parent();c.vh=="h"&&ba.parent().css("float","left")}).find("img").andSelf().css({position:"relative",padding:0,margin:0,borderWidth:0,borderStyle:"none",verticalAlign:"top",display:"block",width:"100%",height:"100%"});n<h;){g=d.Elem[n++];l=P(g,c.size,e.inv);g.Major=g.Final=g.Initial=l[e.wh];g.Wrap.css(l);g.Img.attr({alt:""}).parent("a").andSelf().removeAttr("title");d[b.wh]=Math.max(d[b.wh],c.size+g.Pad[b.lead]+g.Pad[b.trail]);g.Offset=i;g.Centre=i+g.Pad[e.lead]+g.Initial/2;i+=g.Initial+g.Pad[e.lead]+g.Pad[e.trail]}for(n=0;n<h;){g=d.Elem[n++];l=g.Pad[e.lead]+g.Pad[e.trail];d.Spread+=g.Initial+l;for(o in{Centre:1,Offset:1}){I(a,g[o]);i=0;for(b=h;b--;)i+=d.Elem[b].Final+l;if(i>d[e.wh])d[e.wh]=i}}for(;n;){g=d.Elem[--n];g.Final=g.Initial}e=[E[0],E[2],'<div id="jqDock',a,'" class="jqDock" style="position:absolute;top:0;left:0;padding:0;margin:0;overflow:visible;height:',d.height,"px;width:",d.width,'px;"></div></div>'].join("");d.Yard=k("div.jqDock",d.Menu.wrapInner(e));for(b=4;b--;)f[b]=C(d.Yard.css("border"+v[b]+"Width"));for(d.Yard.parent().addClass("jqDockWrap").width(d.width+f[1]+f[3]).height(d.height+f[0]+f[2]);n<h;n++){g=d.Elem[n];l=g.Wrap.parent();for(b=4;b--;)g.Pad[b]&&l.css("padding"+v[b],g.Pad[b]);U(a,n,g.Final,true);l.add(g.Img).addClass("jqDockMouse"+n);$(d,g,n)}g=d.Menu.bind(x.join(" "),M);d.Yard.bind(z.join(" "),L).find("*").css({filter:"inherit"});d.Elem[c.active]&&B(0,a,c.active,2);if(!(d.Asleep=c.onReady.call(d.Menu[0],"ready")===false))if(q){if(q!="menu"){g=d.Yard;if(q=="wrap")g=g.parent()}d.Asleep=!!k(".jqDock,.jqDockWrap",g).addClass("jqDockFilter").css({filter:"inherit"});g.css({opacity:0});T(d);g.animate({opacity:1},c.fadeIn,Y)}else{T(d);d.Menu.trigger("dockshow",["ready"]);D(d)}}}}();k.fn.jqDock=function(a){if(a==="nudge"||a==="idle"||a==="freeze")this.filter(".jqDocked").each(function(){M.call(this,{type:"dock"+a})});else if(a==="destroy")this.filter(".jqDocked").each(function(){var c=A(k(".jqDock",k(this).removeClass("jqDocked")).get(0)),e=m[c],b=z.length,f,h,j;if(e){for(t(e,-1);b--;)e.Yard.unbind(z[b],L);for(b=x.length;b--;)e.Menu.unbind(x[b],M);for(b=0;b<e.Elem.length;b++){h=e.Elem[b];j=h.Img;h.Label.el.unbind("click",Q).remove();j.attr(h.Orig.i).removeClass("jqDockMouse"+b);h.Orig.i.style||j.removeAttr("style");if(h.Link=="Link"){j.parent().attr(h.Orig.a);h.Orig.a.style||j.parent().removeAttr("style")}e.Menu.append(h.Wrap.children());h.Label.el=h.Orig.i=h.Orig.a=null;for(f in h)h[f]=null}k(".jqDockWrap",e.Menu).remove();for(b in e)e[b]=null;m[c]=null}for(c=m.length;c--&&m[c]===null;);if(c<0)m=[]});else if(a==="active"||a==="expand")this.each(function(){var c=G(this,1),e=c?m[c[0]]:0;if(e){t(e,-1);if(!e.Frozen)e.Frozen=e.Asleep=!!e.Menu.trigger("docksleep",["freeze"]);B(0,c[0],c[1],a=="active"?2:1)}});else if(a==="get"){var d=this.filter(".jqDocked");return(d=d.length?m[A(k(".jqDock",d).get(0))]:G(this.get(0)))?k.extend(true,{},d):null}else this.length&&!this.not("img").length?this.each(function(c,e){var b=G(e),f=0,h,j,i;a=a||{};if(b){h=b.Major==b.Initial;for(i in{src:1,altsrc:1})if(a[i]){j=(k.isFunction(a[i])?a[i].call(e,b[i],i):a[i]).toString();if(b[i]!==j){b[i]=j;f=(i=="src"?h:!h)?i:f}}f&&k(e).attr("src",b[f])}}):this.not(".jqDocked").filter(function(){return!k(this).parents(".jqDocked").length&&!k(this).children().not("img").filter(function(){return k(this).filter("a").children("img").parent().children().length!==1}).length}).addClass("jqDocked").each(function(){var c=k(this),e=m.length,b,f,h,j,i;m[e]={Elem:[],Menu:c,OnDock:0,Stamp:0,width:0,height:0,Spread:0,Border:[],Opts:k.extend({},k.jqDock.defaults,a||{},k.metadata?c.metadata():{}),Current:-1,Load:0,ToFro:["","",0]};b=m[e];f=b.Opts;h=!f.loader&&k.jqDock.useJqLoader||f.loader==="jquery";for(i in{size:1,distance:1,duration:1,inactivity:1,fadeIn:1,step:1,idle:1,active:1})f[i]=C(f[i]);i=f.coefficient*1;f.coefficient=isNaN(i)?1.5:i;f.labels=/^[tmb][lcr]$/.test(f.labels.toString())?f.labels:f.labels?{top:"br",left:"tr"}[f.align]||"tl":"";f.setLabel=f.setLabel?f.setLabel:aa;f.fadeLayer=f.fadeIn?{dock:1,wrap:1}[f.fadeLayer]?f.fadeLayer:"menu":"";for(i in{onSleep:1,onWake:1,onReady:1,onFreeze:1})f[i]||(f[i]=X);j=/^m|c$/.test(f.labels);f.attenuation=Math.pow(f.distance,f.coefficient);f.vh={left:1,center:1,right:1}[f.align]?"v":"h";k("img",c).each(function(n,o){var g=k(o),l=g.parent("a"),q=l.attr("title")||"",r={},u;for(u in{src:1,alt:1,title:1,style:1})r[u]=g.attr(u)||"";++b.Load;b.Elem[n]={Img:g,src:r.src,altsrc:(f.source?f.source.call(o,n):"")||(/\.(gif|jpg|jpeg|png)$/i.test(r.alt||"")?r.alt:"")||r.src,Title:r.title||q||"",Orig:{i:k.extend({},r),a:{title:q,style:l.attr("style")||""}},Label:{mc:j},Pad:[],Link:l.length?"Link":"Image"};for(u=4;u--;)b.Elem[n].Pad[u]=C(g.css("padding"+v[u]))});k.each(b.Elem,function(n,o){var g,l=o.altsrc;if(h)k("<img>").bind("load",{id:e,idx:n},O).attr({src:l});else{g=new Image;g.onload=function(){O.call(this,{data:{id:e,idx:n}});g.onload="";g=null};g.src=l}})});return this}}})(jQuery,window);(function($) {$.fn.easySlider = function(options){// default configuration propertiesvar defaults = { prevId: 'prevBtn',prevText: 'Previous',nextId: 'nextBtn', nextText: 'Next',controlsShow: true,controlsBefore: '',controlsAfter: '', controlsFade: true,firstId: 'firstBtn',firstText: 'First',firstShow: false,lastId: 'lastBtn', lastText: 'Last',lastShow: false, vertical: false,speed: 800,auto: false,pause: 2000,continuous: false}; var options = $.extend(defaults, options); this.each(function() { var obj = $(this); var s = $("li", obj).length;var w = $("li", obj).width(); var h = $("li", obj).height(); obj.width(w); obj.height(h); obj.css("overflow","hidden");var ts = s-1;var t = 0;$("ul", obj).css('width',s*w); if(!options.vertical) $("li", obj).css('float','left');if(options.controlsShow){var html = options.controlsBefore;if(options.firstShow) html += '<span id="'+ options.firstId +'"><a href=\"javascript:void(0);\">'+ options.firstText +'</a></span>';html += ' <span id="'+ options.prevId +'"><a href=\"javascript:void(0);\">'+ options.prevText +'</a></span>';html += ' <span id="'+ options.nextId +'"><a href=\"javascript:void(0);\">'+ options.nextText +'</a></span>';if(options.lastShow) html += ' <span id="'+ options.lastId +'"><a href=\"javascript:void(0);\">'+ options.lastText +'</a></span>';html += options.controlsAfter; $(obj).after(html); };$("a","#"+options.nextId).click(function(){ animate("next",true);});$("a","#"+options.prevId).click(function(){ animate("prev",true); }); $("a","#"+options.firstId).click(function(){ animate("first",true);}); $("a","#"+options.lastId).click(function(){ animate("last",true); }); function animate(dir,clicked){var ot = t; switch(dir){case "next":t = (ot>=ts) ? (options.continuous ? 0 : ts) : t+1; break; case "prev":t = (t<=0) ? (options.continuous ? ts : 0) : t-1;break; case "first":t = 0;break; case "last":t = ts;break; default:break; }; var diff = Math.abs(ot-t);var speed = diff*options.speed; if(!options.vertical) {p = (t*w*-1);$("ul",obj).animate({ marginLeft: p }, speed); } else {p = (t*h*-1);$("ul",obj).animate({ marginTop: p }, speed); };if(!options.continuous && options.controlsFade){ if(t==ts){$("a","#"+options.nextId).hide();$("a","#"+options.lastId).hide();} else {$("a","#"+options.nextId).show();$("a","#"+options.lastId).show(); };if(t==0){$("a","#"+options.prevId).hide();$("a","#"+options.firstId).hide();} else {$("a","#"+options.prevId).show();$("a","#"+options.firstId).show();}; }; if(clicked) clearTimeout(timeout);if(options.auto && dir=="next" && !clicked){;timeout = setTimeout(function(){animate("next",false);},diff*options.speed+options.pause);};};// initvar timeout;if(options.auto){;timeout = setTimeout(function(){animate("next",false);},options.pause);}; if(!options.continuous && options.controlsFade){ $("a","#"+options.prevId).hide();$("a","#"+options.firstId).hide(); }; });};})(jQuery);(function($) {$.fn.jqm=function(o){var p={overlay: 50,overlayClass: 'jqmOverlay',closeClass: 'jqmClose',trigger: '.jqModal',ajax: F,ajaxText: '',target: F,modal: F,toTop: F,onShow: F,onHide: F,onLoad: F};return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s;H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s};if(p.trigger)$(this).jqmAddTrigger(p.trigger);});};$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');};$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');};$.fn.jqmShow=function(t){return this.each(function(){t=t||window.event;$.jqm.open(this._jqm,t);});};$.fn.jqmHide=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t)});};$.jqm = {hash:{},open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z);if(c.modal) {if(!A[0])L('bind');A.push(s);}else if(c.overlay > 0)h.w.jqmAddClose(o);else o=F;h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F;if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}if(c.ajax) {var r=c.target||h.w,u=c.ajax,r=(typeof r == 'string')?$(r,h.w):$(r),u=(u.substr(0,1) == '@')?$(t).attr(u.substring(1)):u;r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});}else if(cc)h.w.jqmAddClose($(cc,h.w));if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o); (c.onShow)?c.onShow(h):h.w.show();e(h);return F;},close:function(s){var h=H[s];if(!h.a)return F;h.a=F;if(A[0]){A.pop();if(!A[0])L('unbind');}if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} return F;},params:{}};var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),F=false,i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);},f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}},L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);},m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;},hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() {if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});};})(jQuery);if (!document.myGetElementsByClassName) {document.myGetElementsByClassName = function(className) {var children = document.getElementsByTagName('*') || document.all;var elements = new Array();for (var i = 0; i < children.length; i++) {var child = children[i];var classNames = child.className.split(' ');for (var j = 0; j < classNames.length; j++) {if (classNames[j] == className) {elements.push(child);break;}}}return elements;}}var Reflection = {defaultHeight : 0.5,defaultOpacity: 0.5,add: function(image, options) {Reflection.remove(image);doptions = { "height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity }if (options) {for (var i in doptions) {if (!options[i]) {options[i] = doptions[i];}}} else {options = doptions;}try {var d = document.createElement('div');var p = image;var classes = p.className.split(' ');var newClasses = '';for (j=0;j<classes.length;j++) {if (classes[j] != "reflect") {if (newClasses) {newClasses += ' '}newClasses += classes[j];}}var reflectionHeight = Math.floor(p.height*options['height']);var divHeight = Math.floor(p.height*(1+options['height']));var reflectionWidth = p.width;if (document.all && !window.opera) {/* Fix hyperlinks */if(p.parentElement.tagName == 'A') {var d = document.createElement('a');d.href = p.parentElement.href;} /* Copy original image's classes & styles to div */d.className = newClasses;p.className = 'reflected';d.style.cssText = p.style.cssText;p.style.cssText = 'vertical-align: bottom';var reflection = document.createElement('img');reflection.src = p.src;reflection.style.width = reflectionWidth+'px';reflection.style.display = 'block';reflection.style.height = p.height+"px";reflection.style.marginBottom = "-"+(p.height-reflectionHeight)+'px';reflection.style.filter = 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options['opacity']*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options['height']*100)+')';d.style.width = reflectionWidth+'px';d.style.height = divHeight+'px';p.parentNode.replaceChild(d, p);d.appendChild(p);d.appendChild(reflection);} else {var canvas = document.createElement('canvas');if (canvas.getContext) {/* Copy original image's classes & styles to div */d.className = newClasses;p.className = 'reflected';d.style.cssText = p.style.cssText;p.style.cssText = 'vertical-align: bottom';var context = canvas.getContext("2d");canvas.style.height = reflectionHeight+'px';canvas.style.width = reflectionWidth+'px';canvas.height = reflectionHeight;canvas.width = reflectionWidth;d.style.width = reflectionWidth+'px';d.style.height = divHeight+'px';p.parentNode.replaceChild(d, p);d.appendChild(p);d.appendChild(canvas);context.save();context.translate(0,image.height-1);context.scale(1,-1);context.drawImage(image, 0, 0, reflectionWidth, image.height);context.restore();context.globalCompositeOperation = "destination-out";var gradient = context.createLinearGradient(0, 0, 0, reflectionHeight);gradient.addColorStop(1, "rgba(255, 255, 255, 1.0)");gradient.addColorStop(0, "rgba(255, 255, 255, "+(1-options['opacity'])+")");context.fillStyle = gradient;context.rect(0, 0, reflectionWidth, reflectionHeight*2);context.fill();}}} catch (e) {}},remove : function(image) {if (image.className == "reflected") {image.className = image.parentNode.className;image.parentNode.parentNode.replaceChild(image, image.parentNode);}}}function addReflections() {var rimages = document.myGetElementsByClassName('reflect');for (i=0;i<rimages.length;i++) {var rheight = null;var ropacity = null;var classes = rimages[i].className.split(' ');for (j=0;j<classes.length;j++) {if (classes[j].indexOf("rheight") == 0) {var rheight = classes[j].substring(7)/100;} else if (classes[j].indexOf("ropacity") == 0) {var ropacity = classes[j].substring(8)/100;}}Reflection.add(rimages[i], { height: rheight, opacity : ropacity});}}var previousOnload = window.onload;window.onload = function () { if(previousOnload) previousOnload(); addReflections(); }jQuery.fn.ytplaylist = function(options) {// default settingsvar options = jQuery.extend( {holderId: 'ytvideo',playerHeight: '300',playerWidth: '450',addThumbs: false,thumbSize: 'small',thumbWpix: '120',thumbHpix: '90',showInline: false,autoPlay: true,showRelated: true,allowFullScreen: false},options);return this.each(function() {var selector = $(this);var autoPlay = "";var showRelated = "&rel=0";var fullScreen = "";if(options.autoPlay) autoPlay = "&autoplay=1"; if(options.showRelated) showRelated = "&rel=1"; if(options.allowFullScreen) fullScreen = "&fs=1"; //throw a youtube player infunction play(id){var html = '';html += '<object height="'+options.playerHeight+'" width="'+options.playerWidth+'">';html += '<param name="movie" value="http://www.youtube.com/v/'+id+autoPlay+showRelated+fullScreen+'"> </param>';html += '<param name="wmode" value="transparent"> </param>';if(options.allowFullScreen) { html += '<param name="allowfullscreen" value="true"> </param>'; }html += '<embed src="http://www.youtube.com/v/'+id+autoPlay+showRelated+fullScreen+'"';if(options.allowFullScreen) { html += ' allowfullscreen="true" '; }html += 'type="application/x-shockwave-flash" wmode="transparent" height="'+options.playerHeight+'" width="'+options.playerWidth+'"></embed>';html += '</object>';return html;};//grab a youtube id from a (clean, no querystring) url (thanks to http://jquery-howto.blogspot.com/2009/05/jyoutube-jquery-youtube-thumbnail.html)function youtubeid(url) {var ytid = url.match("[\\?&]v=([^&#]*)");ytid = ytid[1];return ytid;};//load inital videovar firstVid = selector.children("li:first-child").addClass("currentvideo").children("a").attr("href");$("#"+options.holderId+"").html(play(youtubeid(firstVid)));//load video on requestselector.children("li").children("a").click(function() {if(options.showInline) {$("li.currentvideo").removeClass("currentvideo");$(this).parent("li").addClass("currentvideo").html(play(youtubeid($(this).attr("href"))));}else {$("#"+options.holderId+"").html(play(youtubeid($(this).attr("href"))));$(this).parent().parent("ul").find("li.currentvideo").removeClass("currentvideo");$(this).parent("li").addClass("currentvideo");}return false;});//do we want thumns with that?if(options.addThumbs) {selector.children().each(function(i){var replacedText = $(this).text();if(options.thumbSize == 'small') {var thumbUrl = "http://img.youtube.com/vi/"+youtubeid($(this).children("a").attr("href"))+"/2.jpg";}else {var thumbUrl = "http://img.youtube.com/vi/"+youtubeid($(this).children("a").attr("href"))+"/0.jpg";}$(this).children("a").empty().html("<img src='"+thumbUrl+"' style='width:"+options.thumbWpix+"px;height:"+options.thumbHpix+"px;border:black 1px solid;' alt='"+replacedText+"' />"+replacedText).attr("title", replacedText);}); }});};jQuery.extend( jQuery.easing,{easeIn: function (x, t, b, c, d) {return jQuery.easing.easeInQuad(x, t, b, c, d);},easeOut: function (x, t, b, c, d) {return jQuery.easing.easeOutQuad(x, t, b, c, d);},easeInOut: function (x, t, b, c, d) {return jQuery.easing.easeInOutQuad(x, t, b, c, d);},expoin: function(x, t, b, c, d) {return jQuery.easing.easeInExpo(x, t, b, c, d);},expoout: function(x, t, b, c, d) {return jQuery.easing.easeOutExpo(x, t, b, c, d);},expoinout: function(x, t, b, c, d) {return jQuery.easing.easeInOutExpo(x, t, b, c, d);},bouncein: function(x, t, b, c, d) {return jQuery.easing.easeInBounce(x, t, b, c, d);},bounceout: function(x, t, b, c, d) {return jQuery.easing.easeOutBounce(x, t, b, c, d);},bounceinout: function(x, t, b, c, d) {return jQuery.easing.easeInOutBounce(x, t, b, c, d);},elasin: function(x, t, b, c, d) {return jQuery.easing.easeInElastic(x, t, b, c, d);},elasout: function(x, t, b, c, d) {return jQuery.easing.easeOutElastic(x, t, b, c, d);},elasinout: function(x, t, b, c, d) {return jQuery.easing.easeInOutElastic(x, t, b, c, d);},backin: function(x, t, b, c, d) {return jQuery.easing.easeInBack(x, t, b, c, d);},backout: function(x, t, b, c, d) {return jQuery.easing.easeOutBack(x, t, b, c, d);},backinout: function(x, t, b, c, d) {return jQuery.easing.easeInOutBack(x, t, b, c, d);}});(function($){$.dimensions = {version: '@VERSION'};// Create innerHeight, innerWidth, outerHeight and outerWidth methods$.each( [ 'Height', 'Width' ], function(i, name){// innerHeight and innerWidth$.fn[ 'inner' + name ] = function() {if (!this[0]) return;var torl = name == 'Height' ? 'Top' : 'Left', // top or leftborr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or rightreturn num( this, name.toLowerCase() ) + num(this, 'padding' + torl) + num(this, 'padding' + borr);};// outerHeight and outerWidth$.fn[ 'outer' + name ] = function(options) {if (!this[0]) return;var torl = name == 'Height' ? 'Top' : 'Left', // top or leftborr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or rightoptions = $.extend({ margin: false }, options || {});return num( this, name.toLowerCase() )+ num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width')+ num(this, 'padding' + torl) + num(this, 'padding' + borr)+ (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);};});// Create scrollLeft and scrollTop methods$.each( ['Left', 'Top'], function(i, name) {$.fn[ 'scroll' + name ] = function(val) {if (!this[0]) return;return val != undefined ?// Set the scroll offsetthis.each(function() {this == window || this == document ?window.scrollTo( name == 'Left' ? val : $(window)[ 'scrollLeft' ](),name == 'Top' ? val : $(window)[ 'scrollTop' ]()) :this[ 'scroll' + name ] = val;}) :// Return the scroll offsetthis[0] == window || this[0] == document ?self[ (name == 'Left' ? 'pageXOffset' : 'pageYOffset') ] ||$.boxModel && document.documentElement[ 'scroll' + name ] ||document.body[ 'scroll' + name ] :this[0][ 'scroll' + name ];};});$.fn.extend({position: function() {var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results;if (elem) {// Get *real* offsetParentoffsetParent = this.offsetParent();// Get correct offsetsoffset = this.offset();parentOffset = offsetParent.offset();// Subtract element marginsoffset.top -= num(elem, 'marginTop');offset.left -= num(elem, 'marginLeft');// Add offsetParent bordersparentOffset.top += num(offsetParent, 'borderTopWidth');parentOffset.left += num(offsetParent, 'borderLeftWidth');// Subtract the two offsetsresults = {top: offset.top - parentOffset.top,left: offset.left - parentOffset.left};}return results;},offsetParent: function() {var offsetParent = this[0].offsetParent;while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static') )offsetParent = offsetParent.offsetParent;return $(offsetParent);}});function num(el, prop) {return parseInt($.css(el.jquery?el[0]:el,prop))||0;};})(jQuery);(function($) {// If the UI scope is not available, add it$.ui = $.ui || {};$.fn.extend({accordion: function(options, data) {var args = Array.prototype.slice.call(arguments, 1);return this.each(function() {if (typeof options == "string") {var accordion = $.data(this, "ui-accordion");accordion[options].apply(accordion, args);// INIT with optional options} else if (!$(this).is(".ui-accordion"))$.data(this, "ui-accordion", new $.ui.accordion(this, options));});},// deprecated, use accordion("activate", index) insteadactivate: function(index) {return this.accordion("activate", index);}});$.ui.accordion = function(container, options) {// setup configurationthis.options = options = $.extend({}, $.ui.accordion.defaults, options);this.element = container;$(container).addClass("ui-accordion");if ( options.navigation ) {var current = $(container).find("a").filter(options.navigationFilter);if ( current.length ) {if ( current.filter(options.header).length ) {options.active = current;} else {options.active = current.parent().parent().prev();current.addClass("current");}}}// calculate active if not specified, using the first headeroptions.headers = $(container).find(options.header);options.active = findActive(options.headers, options.active);if ( options.fillSpace ) {var maxHeight = $(container).parent().height();options.headers.each(function() {maxHeight -= $(this).outerHeight();});var maxPadding = 0;options.headers.next().each(function() {maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());}).height(maxHeight - maxPadding);} else if ( options.autoheight ) {var maxHeight = 0;options.headers.next().each(function() {maxHeight = Math.max(maxHeight, $(this).outerHeight());}).height(maxHeight);}options.headers.not(options.active || "").next().hide();options.active.parent().andSelf().addClass(options.selectedClass);if (options.event)$(container).bind((options.event) + ".ui-accordion", clickHandler);};$.ui.accordion.prototype = {activate: function(index) {// call clickHandler with custom eventclickHandler.call(this.element, {target: findActive( this.options.headers, index )[0]});},enable: function() {this.options.disabled = false;},disable: function() {this.options.disabled = true;},destroy: function() {this.options.headers.next().css("display", "");if ( this.options.fillSpace || this.options.autoheight ) {this.options.headers.next().css("height", "");}$.removeData(this.element, "ui-accordion");$(this.element).removeClass("ui-accordion").unbind(".ui-accordion");}}function scopeCallback(callback, scope) {return function() {return callback.apply(scope, arguments);};}function completed(cancel) {// if removed while animated data can be emptyif (!$.data(this, "ui-accordion"))return;var instance = $.data(this, "ui-accordion");var options = instance.options;options.running = cancel ? 0 : --options.running;if ( options.running )return;if ( options.clearStyle ) {options.toShow.add(options.toHide).css({height: "",overflow: ""});}$(this).triggerHandler("change.ui-accordion", [options.data], options.change);}function toggle(toShow, toHide, data, clickedActive, down) {var options = $.data(this, "ui-accordion").options;options.toShow = toShow;options.toHide = toHide;options.data = data;var complete = scopeCallback(completed, this);// count elements to animateoptions.running = toHide.size() == 0 ? toShow.size() : toHide.size();if ( options.animated ) {if ( !options.alwaysOpen && clickedActive ) {$.ui.accordion.animations[options.animated]({toShow: jQuery([]),toHide: toHide,complete: complete,down: down,autoheight: options.autoheight});} else {$.ui.accordion.animations[options.animated]({toShow: toShow,toHide: toHide,complete: complete,down: down,autoheight: options.autoheight});}} else {if ( !options.alwaysOpen && clickedActive ) {toShow.toggle();} else {toHide.hide();toShow.show();}complete(true);}}function clickHandler(event) {var options = $.data(this, "ui-accordion").options;if (options.disabled)return false;// called only when using activate(false) to close all parts programmaticallyif ( !event.target && !options.alwaysOpen ) {options.active.parent().andSelf().toggleClass(options.selectedClass);var toHide = options.active.next(),data = {instance: this,options: options,newHeader: jQuery([]),oldHeader: options.active,newContent: jQuery([]),oldContent: toHide},toShow = options.active = $([]);toggle.call(this, toShow, toHide, data );return false;}// get the click targetvar clicked = $(event.target);// due to the event delegation model, we have to check if one// of the parent elements is our actual header, and find thatif ( clicked.parents(options.header).length )while ( !clicked.is(options.header) )clicked = clicked.parent();var clickedActive = clicked[0] == options.active[0];// if animations are still active, or the active header is the target, ignore clickif (options.running || (options.alwaysOpen && clickedActive))return false;if (!clicked.is(options.header))return;// switch classesoptions.active.parent().andSelf().toggleClass(options.selectedClass);if ( !clickedActive ) {clicked.parent().andSelf().addClass(options.selectedClass);}// find elements to show and hidevar toShow = clicked.next(),toHide = options.active.next(),//data = [clicked, options.active, toShow, toHide],data = {instance: this,options: options,newHeader: clicked,oldHeader: options.active,newContent: toShow,oldContent: toHide},down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] );options.active = clickedActive ? $([]) : clicked;toggle.call(this, toShow, toHide, data, clickedActive, down );return false;};function findActive(headers, selector) {return selector != undefined? typeof selector == "number"? headers.filter(":eq(" + selector + ")"): headers.not(headers.not(selector)): selector === false? $([]): headers.filter(":eq(0)");}$.extend($.ui.accordion, {defaults: {selectedClass: "selected",alwaysOpen: true,animated: 'slide',event: "click",header: "a",autoheight: true,running: 0,navigationFilter: function() {return this.href.toLowerCase() == location.href.toLowerCase();}},animations: {slide: function(options, additions) {options = $.extend({easing: "swing",duration: 300}, options, additions);if ( !options.toHide.size() ) {options.toShow.animate({height: "show"}, options);return;}var hideHeight = options.toHide.height(),showHeight = options.toShow.height(),difference = showHeight / hideHeight;options.toShow.css({ height: 0, overflow: 'hidden' }).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{step: function(now) {var current = (hideHeight - now) * difference;if ($.browser.msie || $.browser.opera) {current = Math.ceil(current);}options.toShow.height( current );},duration: options.duration,easing: options.easing,complete: function() {if ( !options.autoheight ) {options.toShow.css("height", "auto");}options.complete();}});},bounceslide: function(options) {this.slide(options, {easing: options.down ? "bounceout" : "swing",duration: options.down ? 1000 : 200});},easeslide: function(options) {this.slide(options, {easing: "easeinout",duration: 700})}}});})(jQuery);eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1u.1h({1v:g(m){m=$.1h({u:"",7:"",6:"",j:"",r:"1w 1x:",k:"1y 1i:",o:"1z 1i:",L:1A,G:0,W:x,h:1B,z:"",p:"",A:x,X:1C},m);8 u=m.u;8 7=m.7;8 6=m.6;8 j=m.j;8 L=m.L;8 G=m.G;8 r=m.r;8 k=m.k;8 o=m.o;8 W=m.W;8 h=m.h;8 z=m.z;8 p=m.p;8 A=m.A;8 X=m.X;4(p){8 e=1}4(X===x){8 9=1}G=1j(G,10);h=1j(h,10);8 H=$(\'#I\').c(\'i\');4(!H){H=z+\'1D.M\'}8 B=$(\'#J\').c(\'i\');4(!B){B=z+\'1E.M\'}8 N=$(\'#O\').c(\'i\');4(!N){N=z+\'1F.M\'}8 P=$(\'#1G\').c(\'i\');4(!P){P=z+\'1H.M\'}8 Q=$(\'#1I\').c(\'i\');4(!Q){Q=z+\'1J.M\'}8 R=$(\'#1K\').c(\'i\');4(!R){R=z+\'1L.M\'}8 S,Y,b,19,1a,l,v,1M;b=$(\'#\'+u+\' .K\').1b();19=$(\'#\'+u+\' .K\').C(0).5();1a=$(\'#\'+u+\' .K\').C(1).c(\'1c\');l=0;$(\'#\'+7).s(19);4(e===1&&9!=1){$(\'#\'+p).5(\'1/\'+b)}4(e!=1&&9!=1){$(\'#\'+6).5(r+\'1/\'+b+\'<w>\')}$(\'#\'+6).s(k+1a);$(\'#\'+j+\' #J\').T(g(){Z(v);$(1d).c({i:Q});$(\'#\'+j+\' #I\').c({i:H});$(\'#\'+j+\' #O\').c({i:N});l=l+1;4(l==b){l=0}8 d=l+1;8 t=$(\'#\'+u+\' .K\').C(l).5();8 11=d;4(11==b){11=0}8 a=$(\'#\'+u+\' .K\').C(11).c(\'1c\');1k(G){D 0:$(\'#\'+7).12(h,g(){$(\'#\'+7).n();$(\'#\'+7).5(t);4(e===1&&9!=1){$(\'#\'+p).5(d+\'/\'+b);$(\'#\'+6).5(k+a)}4(e!=1&&9!=1){$(\'#\'+6).n().5(r+\'\'+d+\'/\'+b+\'<w>\');$(\'#\'+6).s(k+a)}4(9===1){$(\'#\'+6).5(k+a)}$(\'#\'+7).13(h)});y;D 1:$(\'#\'+7).1l(h,g(){$(\'#\'+7).n();$(\'#\'+7).5(t);4(e===1&&9!=1){$(\'#\'+p).5(d+\'/\'+b);$(\'#\'+6).5(k+a)}4(e!=1&&9!=1){$(\'#\'+6).n().5(r+\'\'+d+\'/\'+b+\'<w>\');$(\'#\'+6).s(k+a)}4(9===1){$(\'#\'+6).5(k+a)}$(\'#\'+7).1m(h)});y;D 2:$(\'#\'+7).14({15:"1n",16:0.1o},h,g(){$(\'#\'+7).n();$(\'#\'+7).5(t);$(\'#\'+7).14({15:"U%",16:1},h,g(){4(e===1&&9!=1){$(\'#\'+p).5(d+\'/\'+b);$(\'#\'+6).5(k+a)}4(e!=1&&9!=1){$(\'#\'+6).n().5(r+\'\'+d+\'/\'+b+\'<w>\');$(\'#\'+6).s(k+a)}4(9===1){$(\'#\'+6).5(k+a)}})});y;D 3:$(\'#\'+7).5(t);4(e===1&&9!=1){$(\'#\'+p).5(d+\'/\'+b);$(\'#\'+6).5(k+a)}4(e!=1&&9!=1){$(\'#\'+6).n().5(r+\'\'+d+\'/\'+b+\'<w>\');$(\'#\'+6).s(k+a)}4(9===1){$(\'#\'+6).5(k+a)}y;1p:$(\'#\'+7).12(h,g(){$(\'#\'+7).n();$(\'#\'+7).5(t);4(e===1&&9!=1){$(\'#\'+p).5(d+\'/\'+b);$(\'#\'+6).5(k+a)}4(e!=1&&9!=1){$(\'#\'+6).n().5(r+\'\'+d+\'/\'+b+\'<w>\');$(\'#\'+6).s(k+a)}4(9===1){$(\'#\'+6).5(k+a)}$(\'#\'+7).13(h)});y}4(A===x){v=E(V,L,l)}});$(\'#\'+j+\' #I\').T(g(){Z(v);$(1d).c({i:P});$(\'#\'+j+\' #J\').c({i:B});$(\'#\'+j+\' #O\').c({i:N});l=l-1;4(l<0){l=b-1}8 d=l+1;8 17=d-2;4(17<0){17=b-1}8 t=$(\'#\'+u+\' .K\').C(l).5();8 a=$(\'#\'+u+\' .K\').C(17).c(\'1c\');1k(G){D 0:$(\'#\'+7).12(h,g(){$(\'#\'+7).n();$(\'#\'+7).5(t);4(e===1&&9!=1){$(\'#\'+p).5(d+\'/\'+b);$(\'#\'+6).5(o+a)}4(e!=1&&9!=1){$(\'#\'+6).n().5(r+\'\'+d+\'/\'+b+\'<w>\');$(\'#\'+6).s(o+a)}4(9===1){$(\'#\'+6).5(o+a)}$(\'#\'+7).13(h)});y;D 1:$(\'#\'+7).1l(h,g(){$(\'#\'+7).n();$(\'#\'+7).5(t);4(e===1&&9!=1){$(\'#\'+p).5(d+\'/\'+b);$(\'#\'+6).5(o+a)}4(e!=1&&9!=1){$(\'#\'+6).n().5(r+\'\'+d+\'/\'+b+\'<w>\');$(\'#\'+6).s(o+a)}4(9===1){$(\'#\'+6).5(o+a)}$(\'#\'+7).1m(h)});y;D 2:$(\'#\'+7).14({15:"1n",16:0.1o},h,g(){$(\'#\'+7).n();$(\'#\'+7).5(t);$(\'#\'+7).14({15:"U%",16:1},h,g(){4(e===1&&9!=1){$(\'#\'+p).5(d+\'/\'+b);$(\'#\'+6).5(o+a)}4(e!=1&&9!=1){$(\'#\'+6).n().5(r+\'\'+d+\'/\'+b+\'<w>\');$(\'#\'+6).s(o+a)}4(9===1){$(\'#\'+6).5(o+a)}})});y;D 3:$(\'#\'+7).5(t);4(e===1&&9!=1){$(\'#\'+p).5(d+\'/\'+b);$(\'#\'+6).5(o+a)}4(e!=1&&9!=1){$(\'#\'+6).n().5(r+\'\'+d+\'/\'+b+\'<w>\');$(\'#\'+6).s(o+a)}4(9===1){$(\'#\'+6).5(o+a)}y;1p:$(\'#\'+7).12(h,g(){$(\'#\'+7).n();$(\'#\'+7).5(t);4(e===1&&9!=1){$(\'#\'+p).5(d+\'/\'+b);$(\'#\'+6).5(k+a)}4(e!=1&&9!=1){$(\'#\'+6).n().5(r+\'\'+d+\'/\'+b+\'<w>\');$(\'#\'+6).s(o+a)}4(9===1){$(\'#\'+6).5(o+a)}$(\'#\'+7).13(h)});y}4(A===x){v=E(1e,L,l)}});$(\'#\'+j+\' #O\').T(g(){$(1d).c({i:R});$(\'#\'+j+\' #J\').c({i:B});$(\'#\'+j+\' #I\').c({i:H});Z(v)});4(W===x){$(\'#\'+7).1N(g(){Z(v);S=$(\'#\'+j+\' #J\').c(\'i\');Y=$(\'#\'+j+\' #I\').c(\'i\');$(\'#\'+j+\' #O\').c({i:R});$(\'#\'+j+\' #J\').c({i:B});$(\'#\'+j+\' #I\').c({i:H})},g(){$(\'#\'+j+\' #O\').c({i:N});4(S==B&&Y==H){4(A===x){v=E(V,U,l)}}4(S===Q&&A===x){v=E(V,U,l)}4(S===B&&Y===P&&A===x){v=E(1e,U,l)}})}8 1f=1q.E;1q.E=g(18,1g){4(1O 18==\'g\'){8 1r=1P.1Q.1R.1S(1T,2);8 f=(g(){18.1U(1V,1r)});1s 1f(f,1g)}1s 1f(18,1g)};g V(q){4(!q){q=0}F=$(\'#\'+u+\' .1t\').1b();F=F-1;4(q>=F){q=0}$(\'#\'+j+\' #J\').C(q).T();q=q+1}g 1e(q){4(!q){q=0}F=$(".1t").1b();F=F-1;4(q>=F){q=0}$(\'#\'+j+\' #I\').C(q).T();q=q+1}4(A===x){v=E(V,L,1)}}});',62,120,'||||if|html|thirdname|secondname|var|news_dis|mynow_explain|mysize|attr|mynum|news_sp||function|effectspeed|src|fourthname|nexttitle|active|option|empty|prevtitle|newscountname||playingtitle|append|mynow|firstname|timer|br|true|break|imagedir|isauto|mynextimg|eq|case|setTimeout|myend|effectis|myprevimg|news_prev|news_next|news_style|newsspeed|gif|mypauseimg|news_pause|myprevimg0|mynextimg0|mypauseimg0|activechk|click|100|autonext|mouseover|disablenewscount|activechkmore|clearTimeout||nextnum|fadeOut|fadeIn|animate|width|opacity|myprevnum|fRef|myfirst|myfirst_explain|size|rel|this|autoprev|_st|mDelay|extend|News|parseInt|switch|slideUp|slideDown|0px|33|default|window|argu|return|news_hide_style|jQuery|init_news|Now|Playing|Next|Prev|6000|600|false|prev|next|pause|news_prev0|prev0|news_next0|next0|news_pause0|pause0|splaynum|hover|typeof|Array|prototype|slice|call|arguments|apply|null'.split('|'),0,{}));(function ($) {$.fn.marquee = function (klass) {var newMarquee = [],last = this.length;// works out the left or right hand reset position, based on scroll// behavior, current direction and new directionfunction getReset(newDir, marqueeRedux, marqueeState) {var behavior = marqueeState.behavior, width = marqueeState.width, dir = marqueeState.dir;var r = 0;if (behavior == 'alternate') {r = newDir == 1 ? marqueeRedux[marqueeState.widthAxis] - (width*2) : width;} else if (behavior == 'slide') {if (newDir == -1) {r = dir == -1 ? marqueeRedux[marqueeState.widthAxis] : width;} else {r = dir == -1 ? marqueeRedux[marqueeState.widthAxis] - (width*2) : 0;}} else {r = newDir == -1 ? marqueeRedux[marqueeState.widthAxis] : 0;}return r;}// single "thread" animationfunction animateMarquee() {var i = newMarquee.length,marqueeRedux = null,$marqueeRedux = null,marqueeState = {},newMarqueeList = [],hitedge = false;while (i--) {marqueeRedux = newMarquee[i];$marqueeRedux = $(marqueeRedux);marqueeState = $marqueeRedux.data('marqueeState');if ($marqueeRedux.data('paused') !== true) {// TODO read scrollamount, dir, behavior, loops and last from datamarqueeRedux[marqueeState.axis] += (marqueeState.scrollamount * marqueeState.dir);// only true if it's hit the endhitedge = marqueeState.dir == -1 ? marqueeRedux[marqueeState.axis] <= getReset(marqueeState.dir * -1, marqueeRedux, marqueeState) : marqueeRedux[marqueeState.axis] >= getReset(marqueeState.dir * -1, marqueeRedux, marqueeState);if ((marqueeState.behavior == 'scroll' && marqueeState.last == marqueeRedux[marqueeState.axis]) || (marqueeState.behavior == 'alternate' && hitedge && marqueeState.last != -1) || (marqueeState.behavior == 'slide' && hitedge && marqueeState.last != -1)) { if (marqueeState.behavior == 'alternate') {marqueeState.dir *= -1; // flip}marqueeState.last = -1;$marqueeRedux.trigger('stop');marqueeState.loops--;if (marqueeState.loops === 0) {if (marqueeState.behavior != 'slide') {marqueeRedux[marqueeState.axis] = getReset(marqueeState.dir, marqueeRedux, marqueeState);} else {// corrects the positionmarqueeRedux[marqueeState.axis] = getReset(marqueeState.dir * -1, marqueeRedux, marqueeState);}$marqueeRedux.trigger('end');} else {// keep this marquee goingnewMarqueeList.push(marqueeRedux);$marqueeRedux.trigger('start');marqueeRedux[marqueeState.axis] = getReset(marqueeState.dir, marqueeRedux, marqueeState);}} else {newMarqueeList.push(marqueeRedux);}marqueeState.last = marqueeRedux[marqueeState.axis];// store updated state only if we ran an animation$marqueeRedux.data('marqueeState', marqueeState);} else {// even though it's paused, keep it in the listnewMarqueeList.push(marqueeRedux); }}newMarquee = newMarqueeList;if (newMarquee.length) {setTimeout(animateMarquee, 25);} }// TODO consider whether using .html() in the wrapping process could lead to loosing predefined events...this.each(function (i) {var $marquee = $(this),width = $marquee.attr('width') || $marquee.width(),height = $marquee.attr('height') || $marquee.height(),$marqueeRedux = $marquee.after('<div ' + (klass ? 'class="' + klass + '" ' : '') + 'style="display: block-inline; width: ' + width + 'px; height: ' + height + 'px; overflow: hidden;"><div style="float: left; white-space: nowrap;">' + $marquee.html() + '</div></div>').next(),marqueeRedux = $marqueeRedux.get(0),hitedge = 0,direction = ($marquee.attr('direction') || 'left').toLowerCase(),marqueeState = {dir : /down|right/.test(direction) ? -1 : 1,axis : /left|right/.test(direction) ? 'scrollLeft' : 'scrollTop',widthAxis : /left|right/.test(direction) ? 'scrollWidth' : 'scrollHeight',last : -1,loops : $marquee.attr('loop') || -1,scrollamount : $marquee.attr('scrollamount') || this.scrollAmount || 2,behavior : ($marquee.attr('behavior') || 'scroll').toLowerCase(),width : /left|right/.test(direction) ? width : height};// corrects a bug in Firefox - the default loops for slide is -1if ($marquee.attr('loop') == -1 && marqueeState.behavior == 'slide') {marqueeState.loops = 1;}$marquee.remove();// add paddingif (/left|right/.test(direction)) {$marqueeRedux.find('> div').css('padding', '0 ' + width + 'px');} else {$marqueeRedux.find('> div').css('padding', height + 'px 0');}// events$marqueeRedux.bind('stop', function () {$marqueeRedux.data('paused', true);}).bind('pause', function () {$marqueeRedux.data('paused', true);}).bind('start', function () {$marqueeRedux.data('paused', false);}).bind('unpause', function () {$marqueeRedux.data('paused', false);}).data('marqueeState', marqueeState); // finally: store the state// todo - rerender event allowing us to do an ajax hit and redraw the marqueenewMarquee.push(marqueeRedux);marqueeRedux[marqueeState.axis] = getReset(marqueeState.dir, marqueeRedux, marqueeState);$marqueeRedux.trigger('start');// on the very last marquee, trigger the animationif (i+1 == last) {animateMarquee();}}); return $(newMarquee);};}(jQuery));(function($){$.fn.galleryView = function(options) {var opts = $.extend($.fn.galleryView.defaults,options);var id;var iterator = 0;var gallery_width;var gallery_height;var frame_margin = 10;var strip_width;var wrapper_width;var item_count = 0;var slide_method;var img_path;var paused = false;var frame_caption_size = 20;var frame_margin_top = 5;var pointer_width = 2;var j_gallery;var j_filmstrip;var j_frames;var j_panels;var j_pointer;function showItem(i) {$('img.nav-next').unbind('click');$('img.nav-prev').unbind('click');j_frames.unbind('click');if(has_panels) {if(opts.fade_panels) {j_panels.fadeOut(opts.transition_speed).eq(i%item_count).fadeIn(opts.transition_speed,function(){if(!has_filmstrip) {$('img.nav-prev').click(showPrevItem);$('img.nav-next').click(showNextItem);}});} }if(has_filmstrip) {if(slide_method=='strip') {j_filmstrip.stop();var distance = getPos(j_frames[i]).left - (getPos(j_pointer[0]).left+2);var leftstr = (distance>=0?'-=':'+=')+Math.abs(distance)+'px';j_filmstrip.animate({'left':leftstr},opts.transition_speed,opts.easing,function(){if(i>item_count) {i = i%item_count;iterator = i;j_filmstrip.css('left','-'+((opts.frame_width+frame_margin)*i)+'px');} else if (i<=(item_count-strip_size)) {i = (i%item_count)+item_count;iterator = i;j_filmstrip.css('left','-'+((opts.frame_width+frame_margin)*i)+'px');}if(!opts.fade_panels) {j_panels.hide().eq(i%item_count).show();}$('img.nav-prev').click(showPrevItem);$('img.nav-next').click(showNextItem);enableFrameClicking();});} else if(slide_method=='pointer') {j_pointer.stop();var pos = getPos(j_frames[i]);j_pointer.animate({'left':(pos.left-2+'px')},opts.transition_speed,opts.easing,function(){if(!opts.fade_panels) {j_panels.hide().eq(i%item_count).show();}$('img.nav-prev').click(showPrevItem);$('img.nav-next').click(showNextItem);enableFrameClicking();});}if($('a',j_frames[i])[0]) {j_pointer.unbind('click').click(function(){var a = $('a',j_frames[i]).eq(0);if(a.attr('target')=='_blank') {window.open(a.attr('href'));}else {location.href = a.attr('href');}});}}};function showNextItem() {$(document).stopTime("transition");if(++iterator==j_frames.length) {iterator=0;}showItem(iterator);$(document).everyTime(opts.transition_interval,"transition",function(){showNextItem();});};function showPrevItem() {$(document).stopTime("transition");if(--iterator<0) {iterator = item_count-1;}showItem(iterator);$(document).everyTime(opts.transition_interval,"transition",function(){showNextItem();});};function getPos(el) {var left = 0, top = 0;var el_id = el.id;if(el.offsetParent) {do {left += el.offsetLeft;top += el.offsetTop;} while(el = el.offsetParent);}if(el_id == id) {return {'left':left,'top':top};}else {var gPos = getPos(j_gallery[0]);var gLeft = gPos.left;var gTop = gPos.top;return {'left':left-gLeft,'top':top-gTop};}};function enableFrameClicking() {j_frames.each(function(i){if($('a',this).length==0) {$(this).click(function(){$(document).stopTime("transition");showItem(i);iterator = i;$(document).everyTime(opts.transition_interval,"transition",function(){showNextItem();});});}});};function buildPanels() {if($('.panel-overlay').length>0) {j_panels.append('<div class="overlay"></div>');}if(!has_filmstrip) {$('<img />').addClass('nav-next').attr('src',img_path+opts.nav_theme+'/next.png').appendTo(j_gallery).css({'position':'absolute','zIndex':'1100','cursor':'pointer','top':((opts.panel_height-22)/2)+'px','right':'10px','display':'none'}).click(showNextItem);$('<img />').addClass('nav-prev').attr('src',img_path+opts.nav_theme+'/prev.png').appendTo(j_gallery).css({'position':'absolute','zIndex':'1100','cursor':'pointer','top':((opts.panel_height-22)/2)+'px','left':'10px','display':'none'}).click(showPrevItem);$('<img />').addClass('nav-overlay').attr('src',img_path+opts.nav_theme+'/panel-nav-next.png').appendTo(j_gallery).css({'position':'absolute','zIndex':'1099','top':((opts.panel_height-22)/2)-10+'px','right':'0','display':'none'});$('<img />').addClass('nav-overlay').attr('src',img_path+opts.nav_theme+'/panel-nav-prev.png').appendTo(j_gallery).css({'position':'absolute','zIndex':'1099','top':((opts.panel_height-22)/2)-10+'px','left':'0','display':'none'});}j_panels.css({'width':(opts.panel_width-parseInt(j_panels.css('paddingLeft').split('px')[0],10)-parseInt(j_panels.css('paddingRight').split('px')[0],10))+'px','height':(opts.panel_height-parseInt(j_panels.css('paddingTop').split('px')[0],10)-parseInt(j_panels.css('paddingBottom').split('px')[0],10))+'px','position':'absolute','top':(opts.filmstrip_position=='top'?(opts.frame_height+frame_margin_top+(opts.show_captions?frame_caption_size:frame_margin_top))+'px':'0px'),'left':'0px','overflow':'hidden','background':'white','display':'none'});$('.panel-overlay',j_panels).css({'position':'absolute','zIndex':'999','width':(opts.panel_width-20)+'px','height':opts.overlay_height+'px','top':(opts.overlay_position=='top'?'0':opts.panel_height-opts.overlay_height+'px'),'left':'0','padding':'0 10px','color':opts.overlay_text_color,'fontSize':opts.overlay_font_size});$('.panel-overlay a',j_panels).css({'color':opts.overlay_text_color,'textDecoration':'underline','fontWeight':'bold'});$('.overlay',j_panels).css({'position':'absolute','zIndex':'998','width':opts.panel_width+'px','height':opts.overlay_height+'px','top':(opts.overlay_position=='top'?'0':opts.panel_height-opts.overlay_height+'px'),'left':'0','background':opts.overlay_color,'opacity':opts.overlay_opacity});$('.panel iframe',j_panels).css({'width':opts.panel_width+'px','height':(opts.panel_height-opts.overlay_height)+'px','border':'0'});};function buildFilmstrip() {j_filmstrip.wrap('<div class="strip_wrapper"></div>');if(slide_method=='strip') {j_frames.clone().appendTo(j_filmstrip);j_frames.clone().appendTo(j_filmstrip);j_frames = $('li',j_filmstrip);}if(opts.show_captions) {j_frames.append('<div class="caption"></div>').each(function(i){$(this).find('.caption').html($(this).find('img').attr('title')); });}j_filmstrip.css({'listStyle':'none','margin':'0','padding':'0','width':strip_width+'px','position':'absolute','zIndex':'900','top':'0','left':'0','height':(opts.frame_height+10)+'px','background':opts.background_color});j_frames.css({'float':'left','position':'relative','height':opts.frame_height+'px','zIndex':'901','marginTop':frame_margin_top+'px','marginBottom':'0px','marginRight':frame_margin+'px','padding':'0','cursor':'pointer'});$('img',j_frames).css({'border':'none'});$('.strip_wrapper',j_gallery).css({'position':'absolute','top':(opts.filmstrip_position=='top'?'0px':opts.panel_height+'px'),'left':((gallery_width-wrapper_width)/2)+'px','width':wrapper_width+'px','height':(opts.frame_height+frame_margin_top+(opts.show_captions?frame_caption_size:frame_margin_top))+'px','overflow':'hidden'});$('.caption',j_gallery).css({'position':'absolute','top':opts.frame_height+'px','left':'0','margin':'0','width':opts.frame_width+'px','padding':'0','color':opts.caption_text_color,'textAlign':'center','fontSize':'10px','height':frame_caption_size+'px','lineHeight':frame_caption_size+'px'});var pointer = $('<div></div>');pointer.attr('id','pointer').appendTo(j_gallery).css({'position':'absolute','zIndex':'1000','cursor':'pointer','top':getPos(j_frames[0]).top-(pointer_width/2)+'px','left':getPos(j_frames[0]).left-(pointer_width/2)+'px','height':opts.frame_height-pointer_width+'px','width':opts.frame_width-pointer_width+'px','border':(has_panels?pointer_width+'px solid '+(opts.nav_theme=='dark'?'black':'white'):'none')});j_pointer = $('#pointer',j_gallery);if(has_panels) {var pointerArrow = $('<img />');pointerArrow.attr('src',img_path+opts.nav_theme+'/pointer'+(opts.filmstrip_position=='top'?'-down':'')+'.png').appendTo($('#pointer')).css({'position':'absolute','zIndex':'1001','top':(opts.filmstrip_position=='bottom'?'-'+(10+pointer_width)+'px':opts.frame_height+'px'),'left':((opts.frame_width/2)-10)+'px'});}if(slide_method=='strip') {j_filmstrip.css('left','-'+((opts.frame_width+frame_margin)*item_count)+'px');iterator = item_count;}if($('a',j_frames[iterator])[0]) {j_pointer.click(function(){var a = $('a',j_frames[iterator]).eq(0);if(a.attr('target')=='_blank') {window.open(a.attr('href'));}else {location.href = a.attr('href');}});}$('<img />').addClass('nav-next').attr('src',img_path+opts.nav_theme+'/next.png').appendTo(j_gallery).css({'position':'absolute','cursor':'pointer','top':(opts.filmstrip_position=='top'?0:opts.panel_height)+frame_margin_top+((opts.frame_height-22)/2)+'px','right':(gallery_width/2)-(wrapper_width/2)-10-22+'px'}).click(showNextItem);$('<img />').addClass('nav-prev').attr('src',img_path+opts.nav_theme+'/prev.png').appendTo(j_gallery).css({'position':'absolute','cursor':'pointer','top':(opts.filmstrip_position=='top'?0:opts.panel_height)+frame_margin_top+((opts.frame_height-22)/2)+'px','left':(gallery_width/2)-(wrapper_width/2)-10-22+'px'}).click(showPrevItem);};function mouseIsOverPanels(x,y) {var pos = getPos(j_gallery[0]);var top = pos.top;var left = pos.left;return x > left && x < left+opts.panel_width && y > top && y < top+opts.panel_height;};return this.each(function() {j_gallery = $(this);$('script').each(function(i){var s = $(this);if(s.attr('src') && s.attr('src').match(/linearconsfunc/)){img_path = s.attr('src').split('linearconsfunc')[0]+'jquery-galleryview-1\.1/themes/';}});j_gallery.css('visibility','hidden');j_filmstrip = $('.filmstrip',j_gallery);j_frames = $('li',j_filmstrip);j_panels = $('.panel',j_gallery);id = j_gallery.attr('id');has_panels = j_panels.length > 0;has_filmstrip = j_frames.length > 0;if(!has_panels) opts.panel_height = 0;item_count = has_panels?j_panels.length:j_frames.length;strip_size = has_panels?Math.floor((opts.panel_width-64)/(opts.frame_width+frame_margin)):Math.min(item_count,opts.filmstrip_size); if(strip_size >= item_count) {slide_method = 'pointer';strip_size = item_count;}else {slide_method = 'strip';}gallery_width = has_panels?opts.panel_width:(strip_size*(opts.frame_width+frame_margin))-frame_margin+64;gallery_height = (has_panels?opts.panel_height:0)+(has_filmstrip?opts.frame_height+frame_margin_top+(opts.show_captions?frame_caption_size:frame_margin_top):0);if(slide_method == 'pointer') {strip_width = (opts.frame_width*item_count)+(frame_margin*(item_count));}else {strip_width = (opts.frame_width*item_count*3)+(frame_margin*(item_count*3));}wrapper_width = ((strip_size*opts.frame_width)+((strip_size-1)*frame_margin));j_gallery.css({'position':'relative','margin':'0','background':opts.background_color,'border':opts.border,'width':gallery_width+'px','height':gallery_height+'px'});if(has_filmstrip) {buildFilmstrip();}if(has_panels) {buildPanels();}if(has_filmstrip) enableFrameClicking();$().mousemove(function(e){if(mouseIsOverPanels(e.pageX,e.pageY)) {if(opts.pause_on_hover) {$(document).oneTime(500,"animation_pause",function(){$(document).stopTime("transition");paused=true;});}if(has_panels && !has_filmstrip) {$('.nav-overlay').fadeIn('fast');$('.nav-next').fadeIn('fast');$('.nav-prev').fadeIn('fast');}} else {if(opts.pause_on_hover) {$(document).stopTime("animation_pause");if(paused) {$(document).everyTime(opts.transition_interval,"transition",function(){showNextItem();});paused = false;}}if(has_panels && !has_filmstrip) {$('.nav-overlay').fadeOut('fast');$('.nav-next').fadeOut('fast');$('.nav-prev').fadeOut('fast');}}});j_panels.eq(0).show();if(item_count > 1) {$(document).everyTime(opts.transition_interval,"transition",function(){showNextItem();});}j_gallery.css('visibility','visible');});};$.fn.galleryView.defaults = {panel_width: 400,panel_height: 300,frame_width: 80,frame_height: 80,filmstrip_size: 3,overlay_height: 70,overlay_font_size: '1em',transition_speed: 400,transition_interval: 6000,overlay_opacity: 0.6,overlay_color: 'black',background_color: 'black',overlay_text_color: 'white',caption_text_color: 'white',border: '1px solid black',nav_theme: 'light',easing: 'swing',filmstrip_position: 'bottom',overlay_position: 'bottom',show_captions: false,fade_panels: true,pause_on_hover: false};})(jQuery);jQuery.fn.extend({everyTime: function(interval, label, fn, times, belay) {return this.each(function() {jQuery.timer.add(this, interval, label, fn, times, belay);});},oneTime: function(interval, label, fn) {return this.each(function() {jQuery.timer.add(this, interval, label, fn, 1);});},stopTime: function(label, fn) {return this.each(function() {jQuery.timer.remove(this, label, fn);});}});jQuery.event.specialjQuery.extend({timer: {global: [],guid: 1,dataKey: "jQuery.timer",regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,powers: {// Yeah this is major overkill...'ms': 1,'cs': 10,'ds': 100,'s': 1000,'das': 10000,'hs': 100000,'ks': 1000000},timeParse: function(value) {if (value == undefined || value == null)return null;var result = this.regex.exec(jQuery.trim(value.toString()));if (result[2]) {var num = parseFloat(result[1]);var mult = this.powers[result[2]] || 1;return num * mult;} else {return value;}},add: function(element, interval, label, fn, times, belay) {var counter = 0;if (jQuery.isFunction(label)) {if (!times) times = fn;fn = label;label = interval;}interval = jQuery.timer.timeParse(interval);if (typeof interval != 'number' || isNaN(interval) || interval <= 0)return;if (times && times.constructor != Number) {belay = !!times;times = 0;}times = times || 0;belay = belay || false;var timers = jQuery.data(element, this.dataKey) || jQuery.data(element, this.dataKey, {});if (!timers[label])timers[label] = {};fn.timerID = fn.timerID || this.guid++;var handler = function() {if (belay && this.inProgress) return;this.inProgress = true;if ((++counter > times && times !== 0) || fn.call(element, counter) === false)jQuery.timer.remove(element, label, fn);this.inProgress = false;};handler.timerID = fn.timerID;if (!timers[label][fn.timerID])timers[label][fn.timerID] = window.setInterval(handler,interval);this.global.push( element );},remove: function(element, label, fn) {var timers = jQuery.data(element, this.dataKey), ret;if ( timers ) {if (!label) {for ( label in timers )this.remove(element, label, fn);} else if ( timers[label] ) {if ( fn ) {if ( fn.timerID ) {window.clearInterval(timers[label][fn.timerID]);delete timers[label][fn.timerID];}} else {for ( var fn in timers[label] ) {window.clearInterval(timers[label][fn]);delete timers[label][fn];}}for ( ret in timers[label] ) break;if ( !ret ) {ret = null;delete timers[label];}}for ( ret in timers ) break;if ( !ret ) jQuery.removeData(element, this.dataKey);}}}});jQuery(window).bind("unload", function() {jQuery.each(jQuery.timer.global, function(index, item) {jQuery.timer.remove(item);});});(function(d){d.anythingSlider=function(h,i){var a=this,b;a.el=h;a.$el=d(h).addClass("anythingBase").wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>');a.$el.data("AnythingSlider",a);a.init=function(){a.options=b=d.extend({},d.anythingSlider.defaults,i);a.initialized=!1;d.isFunction(b.onBeforeInitialize)&&a.$el.bind("before_initialize",b.onBeforeInitialize);a.$el.trigger("before_initialize",a);a.$wrapper=a.$el.parent().closest("div.anythingSlider").addClass("anythingSlider-"+ b.theme);a.$window=a.$el.closest("div.anythingWindow");a.win=window;a.$win=d(a.win);a.$controls=d('<div class="anythingControls"></div>').appendTo(b.appendControlsTo!==null&&d(b.appendControlsTo).length?d(b.appendControlsTo):a.$wrapper);a.$startStop=d('<a href="#" class="start-stop"></a>');b.buildStartStop&&a.$startStop.appendTo(b.appendStartStopTo!==null&&d(b.appendStartStopTo).length?d(b.appendStartStopTo):a.$controls);a.$nav=d('<ul class="thumbNav" />').appendTo(b.appendNavigationTo!==null&&d(b.appendNavigationTo).length? d(b.appendNavigationTo):a.$controls);a.flag=!1;a.playing=b.autoPlay;a.slideshow=!1;a.hovered=!1;a.panelSize=[];a.currentPage=b.startPanel=parseInt(b.startPanel,10)||1;b.changeBy=parseInt(b.changeBy,10)||1;a.adj=b.infiniteSlides?0:1;a.width=a.$el.width();a.height=a.$el.height();a.outerPad=[a.$wrapper.innerWidth()-a.$wrapper.width(),a.$wrapper.innerHeight()-a.$wrapper.height()];b.playRtl&&a.$wrapper.addClass("rtl");if(b.expand)a.$outer=a.$wrapper.parent(),a.$window.css({width:"100%",height:"100%"}), a.checkResize();b.buildStartStop&&a.buildAutoPlay();b.buildArrows&&a.buildNextBackButtons();if(!b.autoPlay)b.autoPlayLocked=!1;a.updateSlider();a.$lastPage=a.$currentPage;a.runTimes=d("div.anythingSlider").index(a.$wrapper)+1;a.regex=RegExp("panel"+a.runTimes+"-(\\d+)","i");a.runTimes===1&&a.makeActive();if(!d.isFunction(d.easing[b.easing]))b.easing="swing";b.pauseOnHover&&a.$wrapper.hover(function(){a.playing&&(a.$el.trigger("slideshow_paused",a),a.clearTimer(!0))},function(){a.playing&&(a.$el.trigger("slideshow_unpaused", a),a.startStop(a.playing,!0))});a.setCurrentPage(a.gotoHash()||b.startPage,!1);a.slideControls(!1);a.$wrapper.bind("mouseenter mouseleave",function(b){a.hovered=b.type==="mouseenter"?!0:!1;a.slideControls(a.hovered,!1)});d(document).keyup(function(c){if(b.enableKeyboard&&a.$wrapper.is(".activeSlider")&&!c.target.tagName.match("TEXTAREA|INPUT|SELECT")&&(b.vertical||!(c.which===38||c.which===40)))switch(c.which){case 39:case 40:a.goForward();break;case 37:case 38:a.goBack()}});a.$items.delegate("a", "focus.AnythingSlider",function(c){var e=d(this).closest(".panel"),f=a.$items.index(e)+a.adj;a.$items.find(".focusedLink").removeClass("focusedLink");d(this).addClass("focusedLink");a.$window.scrollLeft(0);!e.is(".activePage")&&a.currentPage+b.showMultiple-1>f&&(a.gotoPage(f),c.preventDefault())});var c="slideshow_paused slideshow_unpaused slide_init slide_begin slideshow_stop slideshow_start initialized swf_completed".split(" ");d.each("onShowPause onShowUnpause onSlideInit onSlideBegin onShowStop onShowStart onInitialized onSWFComplete".split(" "), function(g,e){d.isFunction(b[e])&&a.$el.bind(c[g],b[e])});d.isFunction(b.onSlideComplete)&&a.$el.bind("slide_complete",function(){setTimeout(function(){b.onSlideComplete(a)},0)});a.initialized=!0;a.$el.trigger("initialized",a);a.startStop(a.playing)};a.updateSlider=function(){a.$el.children(".cloned").remove();a.$nav.empty();a.currentPage=a.currentPage||1;a.$items=a.$el.children();a.pages=a.$items.length;a.dir=b.vertical?"top":"left";b.showMultiple=b.vertical?1:parseInt(b.showMultiple,10)||1;if(b.showMultiple> 1){if(b.showMultiple>a.pages)b.showMultiple=a.pages;a.adjustMultiple=b.infiniteSlides&&a.pages>1?0:b.showMultiple-1;a.pages=a.$items.length-a.adjustMultiple}a.$controls.add(a.$nav).add(a.$startStop).add(a.$forward).add(a.$back)[a.pages<=1?"hide":"show"]();a.pages>1&&a.buildNavigation();b.infiniteSlides&&a.pages>1&&(a.$el.prepend(a.$items.filter(":last").clone().removeAttr("id").addClass("cloned")),b.showMultiple>1?a.$el.append(a.$items.filter(":lt("+b.showMultiple+")").clone().removeAttr("id").addClass("cloned").addClass("multiple")): a.$el.append(a.$items.filter(":first").clone().removeAttr("id").addClass("cloned")),a.$el.find(".cloned").each(function(){d(this).find("a,input,textarea,select,button,area").attr("disabled","disabled");d(this).find("[id]").removeAttr("id")}));a.$items=a.$el.children().addClass("panel"+(b.vertical?" vertical":""));a.setDimensions();b.resizeContents?(a.$items.css("width",a.width),a.$wrapper.css("width",a.getDim(a.currentPage)[0]),a.$wrapper.add(a.$items).css("height",a.height)):a.$win.load(function(){a.setDimensions()}); if(a.currentPage>a.pages)a.currentPage=a.pages;a.setCurrentPage(a.currentPage,!1);a.$nav.find("a").eq(a.currentPage-1).addClass("cur")};a.buildNavigation=function(){if(b.buildNavigation&&a.pages>1){var c,g;a.$items.filter(":not(.cloned)").each(function(e){var f=e+1;c=(f===1?"first":"")+(f===a.pages?"last":"");g=d('<a href="#"></a>').addClass("panel"+f).wrap('<li class="'+c+'" />');a.$nav.append(g.parent());d.isFunction(b.navigationFormatter)?(c=b.navigationFormatter(f,d(this)),g.html("<span>"+c+"</span>"), parseInt(g.find("span").css("text-indent"),10)<0&&g.addClass(b.tooltipClass).attr("title",c)):g.html("<span>"+f+"</span>");g.bind(b.clickControls,function(c){if(!a.flag&&b.enableNavigation)a.flag=!0,setTimeout(function(){a.flag=!1},100),a.gotoPage(f),b.hashTags&&a.setHash(f);c.preventDefault()})});if(b.navigationSize!==!1&&parseInt(b.navigationSize,10)<a.pages)a.$controls.find(".anythingNavWindow").length||a.$nav.before('<ul><li class="prev"><a href="#"><span>'+b.backText+"</span></a></li></ul>").after('<ul><li class="next"><a href="#"><span>'+ b.forwardText+"</span></a></li></ul>").wrap('<div class="anythingNavWindow"></div>'),a.navWidths=a.$nav.find("li").map(function(){return d(this).innerWidth()}).get(),a.navLeft=1,a.$nav.width(a.navWidth(1,a.pages+1)+5),a.$controls.find(".anythingNavWindow").width(a.navWidth(1,b.navigationSize+1)).end().find(".prev,.next").bind(b.clickControls,function(c){if(!a.flag)a.flag=!0,setTimeout(function(){a.flag=!1},200),a.navWindow(a.navLeft+b.navigationSize*(d(this).is(".prev")?-1:1));c.preventDefault()})}}; a.navWidth=function(b,g){for(var d=Math.min(b,g),f=Math.max(b,g),j=0;d<f;d++)j+=a.navWidths[d-1]||0;return j};a.navWindow=function(c){var d=a.pages-b.navigationSize+1,c=c<=1?1:c>1&&c<d?c:d;if(c!==a.navLeft)a.$controls.find(".anythingNavWindow").animate({scrollLeft:a.navWidth(1,c),width:a.navWidth(c,c+b.navigationSize)},{queue:!1,duration:b.animationTime}),a.navLeft=c};a.buildNextBackButtons=function(){a.$forward=d('<span class="arrow forward"><a href="#"><span>'+b.forwardText+"</span></a></span>"); a.$back=d('<span class="arrow back"><a href="#"><span>'+b.backText+"</span></a></span>");a.$back.bind(b.clickBackArrow,function(c){if(b.enableArrows&&!a.flag)a.flag=!0,setTimeout(function(){a.flag=!1},100),a.goBack();c.preventDefault()});a.$forward.bind(b.clickForwardArrow,function(c){if(b.enableArrows&&!a.flag)a.flag=!0,setTimeout(function(){a.flag=!1},100),a.goForward();c.preventDefault()});a.$back.add(a.$forward).find("a").bind("focusin focusout",function(){d(this).toggleClass("hover")});a.$back.appendTo(b.appendBackTo!== null&&d(b.appendBackTo).length?d(b.appendBackTo):a.$wrapper);a.$forward.appendTo(b.appendForwardTo!==null&&d(b.appendForwardTo).length?d(b.appendForwardTo):a.$wrapper);a.$arrowWidth=a.$forward.width()};a.buildAutoPlay=function(){a.$startStop.html("<span>"+(a.playing?b.stopText:b.startText)+"</span>").bind(b.clickSlideshow,function(c){b.enableStartStop&&(a.startStop(!a.playing),a.makeActive(),a.playing&&!b.autoPlayDelayed&&a.goForward(!0));c.preventDefault()}).bind("focusin focusout",function(){d(this).toggleClass("hover")})}; a.checkResize=function(c){clearTimeout(a.resizeTimer);a.resizeTimer=setTimeout(function(){var d=a.$outer.width()-a.outerPad[0],e=(a.$outer[0].tagName==="BODY"?a.$win.height():a.$outer.height())-a.outerPad[1];if(a.width*b.showMultiple!==d||a.height!==e)a.setDimensions(),a.gotoPage(a.currentPage,a.playing,null,-1);typeof c==="undefined"&&a.checkResize()},500)};a.setDimensions=function(){var c,g,e,f=0,j=b.showMultiple>1?a.width||a.$window.width()/b.showMultiple:a.$window.width(),h=a.$win.width();if(b.expand)c= a.$outer.width()-a.outerPad[0],a.height=g=a.$outer.height()-a.outerPad[1],a.$wrapper.add(a.$window).add(a.$items).css({width:c,height:g}),a.width=j=b.showMultiple>1?c/b.showMultiple:c;a.$items.each(function(i){e=d(this).children();b.resizeContents?(c=a.width,g=a.height,d(this).css({width:c,height:g}),e.length&&e[0].tagName==="EMBED"&&e.attr({width:"100%",height:"100%"}),e.length===1&&e.css({width:"100%",height:"100%"})):(c=d(this).width(),e.length===1&&c>=h&&(c=e.width()>=h?j:e.width(),e.css("max-width", c)),d(this).css("width",c),g=e.length===1?e.outerHeight(!0):d(this).height(),d(this).css("height",g));a.panelSize[i]=[c,g,f];f+=b.vertical?g:c});a.$el.css(b.vertical?"height":"width",f)};a.getDim=function(c){if(a.pages<1||isNaN(c))return[a.width,a.height];var c=b.infiniteSlides&&a.pages>1?c:c-1,d,e=a.panelSize[c][0],f=a.panelSize[c][1];if(b.showMultiple>1)for(d=1;d<b.showMultiple;d++)e+=a.panelSize[(c+d)%b.showMultiple][0],f=Math.max(f,a.panelSize[c+d][1]);return[e,f]};a.goForward=function(c){a.gotoPage(a.currentPage+ b.changeBy*(b.playRtl?-1:1),c)};a.goBack=function(c){a.gotoPage(a.currentPage+b.changeBy*(b.playRtl?1:-1),c)};a.gotoPage=function(c,g,e,f){g!==!0&&(g=!1,a.startStop(!1),a.makeActive());/^[#|.]/.test(c)&&d(c).length&&(c=d(c).closest(".panel").index()+a.adj);b.changeBy!==1&&(c<0&&(c+=a.pages),c>a.pages&&(c-=a.pages));if(!(a.pages<=1)){a.$lastPage=a.$currentPage;if(typeof c!=="number")c=b.startPanel,a.setCurrentPage(c);if(!g||!b.isVideoPlaying(a))c>a.pages+1-a.adj&&(c=!b.infiniteSlides&&!b.stopAtEnd? 1:a.pages),c<a.adj&&(c=!b.infiniteSlides&&!b.stopAtEnd?a.pages:1),a.currentPage=c>a.pages?a.pages:c<1?1:a.currentPage,a.$currentPage=a.$items.eq(a.currentPage-a.adj),a.exactPage=c,a.$targetPage=a.$items.eq(c===0?a.pages-a.adj:c>a.pages?1-a.adj:c-a.adj),f=f||b.animationTime,f>=0&&a.$el.trigger("slide_init",a),a.slideControls(!0,!1),g!==!0&&(g=!1),(!g||b.stopAtEnd&&c===a.pages)&&a.startStop(!1),f>=0&&a.$el.trigger("slide_begin",a),setTimeout(function(d){b.resizeContents||(d=a.getDim(c),a.$wrapper.filter(":not(:animated)").animate({width:d[0]|| a.width,height:d[1]||a.height},{queue:!1,duration:f<0?0:f,easing:b.easing}));d={};d[a.dir]=-a.panelSize[b.infiniteSlides&&a.pages>1?c:c-1][2];a.$el.filter(":not(:animated)").animate(d,{queue:!1,duration:f,easing:b.easing,complete:function(){a.endAnimation(c,e,f)}})},parseInt(b.delayBeforeAnimate,10)||0)}};a.endAnimation=function(c,d,e){c===0?(a.$el.css(a.dir,-a.panelSize[a.pages][2]),c=a.pages):c>a.pages&&(a.$el.css(a.dir,-a.panelSize[1][2]),c=1);a.exactPage=c;a.setCurrentPage(c,!1);a.$items.removeClass("activePage").eq(c- a.adj).addClass("activePage");a.hovered||a.slideControls(!1);e>=0&&a.$el.trigger("slide_complete",a);typeof d==="function"&&d(a);b.autoPlayLocked&&!a.playing&&setTimeout(function(){a.startStop(!0)},b.resumeDelay-(b.autoPlayDelayed?b.delay:0))};a.setCurrentPage=function(c,d){c=parseInt(c,10);if(!(a.pages<1||c===0||isNaN(c))){c>a.pages+1-a.adj&&(c=a.pages-a.adj);c<a.adj&&(c=1);b.buildNavigation&&a.$nav.find(".cur").removeClass("cur").end().find("a").eq(c-1).addClass("cur");!b.infiniteSlides&&b.stopAtEnd&& (a.$wrapper.find("span.forward")[c===a.pages?"addClass":"removeClass"]("disabled").end().find("span.back")[c===1?"addClass":"removeClass"]("disabled"),c===a.pages&&a.playing&&a.startStop());if(!d){var e=a.getDim(c);a.$wrapper.css({width:e[0],height:e[1]}).add(a.$window).scrollLeft(0);a.$el.css(a.dir,-a.panelSize[b.infiniteSlides&&a.pages>1?c:c-1][2])}a.currentPage=c;a.$currentPage=a.$items.removeClass("activePage").eq(c-a.adj).addClass("activePage")}};a.makeActive=function(){a.$wrapper.is(".activeSlider")|| (d(".activeSlider").removeClass("activeSlider"),a.$wrapper.addClass("activeSlider"))};a.gotoHash=function(){var c=a.win.location.hash,g=c.indexOf("&"),e=c.match(a.regex);e===null&&!/^#&/.test(c)?(c=c.substring(0,g>=0?g:c.length),e=d(c).closest(".anythingBase")[0]===a.el?d(c).closest(".panel").index():null):e!==null&&(e=b.hashTags?parseInt(e[1],10):null);return e};a.setHash=function(b){var d="panel"+a.runTimes+"-",e=a.win.location.hash;if(typeof e!=="undefined")a.win.location.hash=e.indexOf(d)>0?e.replace(a.regex, d+b):e+"&"+d+b};a.slideControls=function(c){var d=c?0:b.animationTime,e=c?b.animationTime:0,f=c?1:0,h=c?0:1;b.toggleControls&&a.$controls.stop(!0,!0).delay(d)[c?"slideDown":"slideUp"](b.animationTime/2).delay(e);b.buildArrows&&b.toggleArrows&&(!a.hovered&&a.playing&&(h=1,f=0),a.$forward.stop(!0,!0).delay(d).animate({right:h*a.$arrowWidth,opacity:f},b.animationTime/2),a.$back.stop(!0,!0).delay(d).animate({left:h*a.$arrowWidth,opacity:f},b.animationTime/2))};a.clearTimer=function(b){if(a.timer&&(a.win.clearInterval(a.timer), !b&&a.slideshow))a.$el.trigger("slideshow_stop",a),a.slideshow=!1};a.startStop=function(c,d){c!==!0&&(c=!1);if((a.playing=c)&&!d)a.$el.trigger("slideshow_start",a),a.slideshow=!0;b.buildStartStop&&(a.$startStop.toggleClass("playing",c).find("span").html(c?b.stopText:b.startText),parseInt(a.$startStop.find("span").css("text-indent"),10)<0&&a.$startStop.addClass(b.tooltipClass).attr("title",c?b.stopText:b.startText));c?(a.clearTimer(!0),a.timer=a.win.setInterval(function(){b.isVideoPlaying(a)?b.resumeOnVideoEnd|| a.startStop():a.goForward(!0)},b.delay)):a.clearTimer()};a.init()};d.anythingSlider.defaults={theme:"default",expand:!1,resizeContents:!0,vertical:!1,showMultiple:!1,easing:"swing",buildArrows:!0,buildNavigation:!0,buildStartStop:!0,appendForwardTo:null,appendBackTo:null,appendControlsTo:null,appendNavigationTo:null,appendStartStopTo:null,toggleArrows:!1,toggleControls:!1,startText:"Start",stopText:"Stop",forwardText:"»",backText:"«",tooltipClass:"tooltip",enableArrows:!0,enableNavigation:!0, enableStartStop:!0,enableKeyboard:!0,startPanel:1,changeBy:1,hashTags:!0,infiniteSlides:!0,navigationFormatter:null,navigationSize:!1,autoPlay:!1,autoPlayLocked:!1,autoPlayDelayed:!1,pauseOnHover:!0,stopAtEnd:!1,playRtl:!1,delay:3E3,resumeDelay:15E3,animationTime:600,delayBeforeAnimate:0,clickForwardArrow:"click",clickBackArrow:"click",clickControls:"click focusin",clickSlideshow:"click",resumeOnVideoEnd:!0,addWmodeToObject:"opaque",isVideoPlaying:function(){return!1}};d.fn.anythingSlider=function(h, i){return this.each(function(){var a,b=d(this).data("AnythingSlider");(typeof h).match("object|undefined")?b?b.updateSlider():new d.anythingSlider(this,h):/\d/.test(h)&&!isNaN(h)&&b?(a=typeof h==="number"?h:parseInt(d.trim(h),10),a>=1&&a<=b.pages&&b.gotoPage(a,!1,i)):/^[#|.]/.test(h)&&d(h).length&&b.gotoPage(h,!1,i)})}})(jQuery);(function(d){d.fn.anythingSliderVideo=function(b){var c={videoID:"asvideo"};return this.each(function(){var a,e,h,g,f=d(this).data("AnythingSlider");if(f){a=f.video={};a.options=d.extend({},c,b);a.hasSwfo=typeof swfobject!=="undefined"&&swfobject.hasOwnProperty("embedSWF")&&typeof swfobject.embedSWF==="function"?!0:!1;a.list={};a.hasVid=!1;a.hasEmbed=!1;a.services=d.fn.anythingSliderVideo.services;a.len=0;a.hasEmbedCount=0;a.hasiframeCount=0;a.$items=f.$items.filter(":not(.cloned)");for(h in a.services)if(typeof h=== "string")g=a.services[h].selector,a.$items.find(g).each(function(){e=d(this);e.attr("id",a.options.videoID+a.len);a.list[a.len]={id:a.options.videoID+a.len++,panel:e.closest(".panel")[0],service:h,selector:g,status:-1};a.hasVid=!0;g.match("embed|object")?(a.hasEmbed=!0,a.hasEmbedCount++):g.match("iframe")&&a.hasiframeCount++});d.each(a.list,function(b,c){var l,e,i,g,h=d(c.panel).find(c.selector),j=a.services[c.service],k=j.initAPI||"";a.hasEmbed&&a.hasSwfo&&c.selector.match("embed|object")?h.each(function(){e= d(this).parent()[0].tagName==="OBJECT"?d(this).parent():d(this);i=e[0].tagName==="EMBED"?e.attr("src"):e.find("embed").attr("src")||e.children().filter("[name=movie]").attr("value");g=d.extend(!0,{},{flashvars:null,params:{allowScriptAccess:"always",wmode:f.options.addWmodeToObject,allowfullscreen:!0},attr:{"class":e.attr("class"),style:e.attr("style"),"data-url":i}},j.embedOpts);e.wrap('<div id="'+c.id+'"></div>');swfobject.embedSWF(i+(k===""?"":k+c.id),c.id,e.attr("width"),e.attr("height"),"10", null,g.flashvars,g.params,g.attr,function(){if(j.hasOwnProperty("init"))a.list[b].player=j.init(f,c.id,b);b>=a.hasEmbedCount&&f.$el.trigger("swf_completed",f)})}):c.selector.match("iframe")&&h.each(function(){i=d(this).attr("src");l=(i.match(/\?/g)?"":"?")+"&wmode="+f.options.addWmodeToObject;d(this).attr("src",function(a,b){return b+l+(k===""?"":k+c.id)})})});a.gup=function(a,b){var a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),c=RegExp("[\\?&]"+a+"=([^&#]*)").exec(b||window.location.href);return c=== null?"":c[1]};a.postMsg=function(a,b){var c=d("#"+b);c.length&&c[0].contentWindow.postMessage(a,c.attr("src").split("?")[0])};a.message=function(b){if(b.data&&!/infoDelivery/g.test(b.data)){var c=d.parseJSON(b.data);d.each(a.list,function(b){a.services[a.list[b].service].hasOwnProperty("message")&&a.services[a.list[b].service].message(f,c)})}};a.control=function(b){var c,d=a.list,e=b==="pause"?f.$lastPage[0]:f.$currentPage[0],g=!1;for(c=0;c<a.len;c++)d[c].panel===e&&a.services[d[c].service].hasOwnProperty(b)&& (g=a.services[d[c].service][b](f,d[c].id,c));return g};a.hasiframeCount&&(window.addEventListener?window.addEventListener("message",a.message,!1):window.attachEvent("onmessage",a.message,!1));f.$el.bind("slide_init",function(){a.control("pause")}).bind("slide_complete",function(){a.control("cont")});f.options.isVideoPlaying=function(){return a.control("isPlaying")}}})};d.fn.anythingSliderVideo.services={video:{selector:"video",cont:function(b,c){var a=d("#"+c);a.length&&a[0].paused&&a[0].currentTime> 0&&!a[0].ended&&a[0].play()},pause:function(){d("video").each(function(){typeof this.pause!=="undefined"&&this.pause()})},isPlaying:function(b,c){var a=d("#"+c);return a.length&&typeof a[0].pause!=="undefined"&&!a[0].paused&&!a[0].ended?!0:!1}},vimeo1:{selector:"iframe[src*=vimeo]",initAPI:"&api=1&player_id=",cont:function(b,c,a){b.video.list[a].status==="pause"&&b.video.postMsg('{"method":"play"}',c)},pause:function(b){d("iframe[src*=vimeo]").each(function(){b.video.postMsg('{"method":"pause"}', this.id)})},message:function(b,c){var a,d=c.player_id||"";if(d!==""&&(a=d.replace(b.video.options.videoID,""),c.event==="ready"&&(b.video.postMsg('{"method":"addEventListener","value":"play"}',d),b.video.postMsg('{"method":"addEventListener","value":"pause"}',d),b.video.postMsg('{"method":"addEventListener","value":"finish"}',d)),b.video.list[a]))b.video.list[a].status=c.event},isPlaying:function(b,c,a){return b.video.list[a].status==="play"?!0:!1}},vimeo2:{selector:"object[data-url*=vimeo], embed[src*=vimeo]", embedOpts:{flashvars:{api:1}},cont:function(b,c){var a=d("#"+c);typeof a[0].api_play==="function"&&a[0].api_paused()&&a[0].api_getCurrentTime()!==0&&a[0].api_getDuration()-a[0].api_getCurrentTime()>2&&a[0].api_play()},pause:function(){d("object[data-url*=vimeo], embed[src*=vimeo]").each(function(){var b=this.tagName==="EMBED"?d(this).parent()[0]:this;typeof b.api_pause==="function"&&b.api_pause()})},isPlaying:function(b,c){var a=d("#"+c);return typeof a[0].api_paused==="function"&&!a[0].api_paused()? !0:!1}},youtube1:{selector:"iframe[src*=youtube]",initAPI:"&iv_load_policy=3&enablejsapi=1&playerapiid=",cont:function(b,c,a){b.video.list[a].status===2&&b.video.postMsg('{"event":"command","func":"playVideo"}',c)},pause:function(b,c){d("iframe[src*=youtube]").each(function(){b.video.postMsg('{"event":"command","func":"pauseVideo"}',c)})},message:function(b,c){if(c.event!=="infoDelivery"&&c.info&&c.info.videoUrl){var a=b.video.gup("v",c.info.videoUrl),a=d("iframe[src*="+a+"]")[0].id,e=a.replace(b.video.options.videoID, "");c.event==="onReady"&&b.video.postMsg('{"event":"listening","func":"onStateChange"}',a);if(c.event==="onStateChange"&&b.video.list[e])b.video.list[e].status=c.state}},isPlaying:function(b,c,a){b=b.video.list[a].status;return b===1||b>2?!0:!1}},youtube2:{selector:"object[data-url*=youtube], embed[src*=youtube]",initAPI:"&iv_load_policy=3&enablejsapi=1&version=3&playerapiid=",cont:function(b,c){var a=d("#"+c);a.length&&typeof a[0].getPlayerState==="function"&&a[0].getPlayerState()>0&&a[0].playVideo()}, pause:function(){d("object[data-url*=youtube], embed[src*=youtube]").each(function(){var b=this.tagName==="EMBED"?d(this).parent()[0]:this;typeof b.getPlayerState==="function"&&b.getPlayerState()>0&&b.pauseVideo()})},isPlaying:function(b,c){var a=d("#"+c);return typeof a[0].getPlayerState==="function"&&(a[0].getPlayerState()===1||a[0].getPlayerState()>2)?!0:!1}}}})(jQuery);jQuery(window).load(function(){jQuery(".anythingBase").anythingSliderVideo()});(function(i){i.fn.anythingSliderFx=function(q,r){var n=i(this).closest(".anythingSlider"),g=n.width(),o=n.height(),p=function(c){var a=c,l;c&&typeof c==="string"&&c.indexOf(",")>0&&(c=c.split(","),a=i.trim(c[0]),l=i.trim(c[1]));return{top:[{inFx:{top:0},outFx:{top:"-"+(a||o)}}],bottom:[{inFx:{top:0},outFx:{top:a||o}}],left:[{inFx:{left:0},outFx:{left:"-"+(a||g)}}],right:[{inFx:{left:0},outFx:{left:a||g}}],fade:[{inFx:{opacity:a||1},outFx:{opacity:0}}],expand:[{inFx:{width:l||"100%",height:l||"100%", top:"0%",left:"0%"},outFx:{width:a||"10%",height:a||"10%",top:"50%",left:"50%"}}],grow:[{inFx:{top:0,fontSize:a||"16px",opacity:1},outFx:{top:"-200px",fontSize:l||"80px",opacity:0}}],listLR:[{inFx:{left:0,opacity:1},outFx:[{left:a||g,opacity:0},{left:"-"+(a||g),opacity:0}],selector:[":odd",":even"]}],listRL:[{inFx:{left:0,opacity:1},outFx:[{left:a||g,opacity:0},{left:"-"+(a||g),opacity:0}],selector:[":even",":odd"]}],"caption-Top":[{inFx:{top:0,opacity:0.8},outFx:{top:"-"+a||-50,opacity:0}}],"caption-Right":[{inFx:{right:0, opacity:0.8},outFx:{right:"-"+a||-150,opacity:0}}],"caption-Bottom":[{inFx:{bottom:0,opacity:0.8},outFx:{bottom:"-"+a||-50,opacity:0}}],"caption-Left":[{inFx:{left:0,opacity:0.8},outFx:{left:"-"+a||-150,opacity:0}}]}};return this.each(function(){i(this).data("AnythingSlider").fx=q;var c=i.extend({easing:"swing",timeIn:400,timeOut:350,stopRepeat:!1,outFxBind:"slide_init",inFxBind:"slide_complete"},r),a=p(),l=function(a,b,e,c){if(!(a.length===0||typeof b==="undefined")){var d=b[0]||b,f=d[1]||"",c=c|| parseInt(f===""?d.duration:d[0].duration,10);if(e&&(a.css("position")!=="absolute"&&a.css({position:"relative"}),a.stop(),f!=="")){a.filter(b[1][0]).animate(d[0],{queue:!1,duration:c,easing:d[0].easing});a.filter(b[1][1]).animate(f,{queue:!0,duration:c,easing:d[0].easing});return}a.animate(d,{queue:!0,duration:c,easing:d.easing})}},g=function(k,b){var e,j=b?"outFx":"inFx",d={},f=b?c.timeOut:c.timeIn,h=i.trim(k[0].replace(/\s+/g," ")).split(" ");if(b&&h.length===1&&a.hasOwnProperty(h)&&typeof a[h][0].selector!== "undefined")return e=a[h][0].outFx,e[0].duration=k[2]||c.timeOut,e[0].easing=k[3]||c.easing,[e,a[h][0].selector||[]];i.each(h,function(e,h){if(a.hasOwnProperty(h)){var g=typeof k[1]==="undefined"||k[1]==="",g=g?a:p(k[1]);i.extend(!0,d,g[h][0][j]);g=k[2]||d.duration||f;d.duration=b?g/2:g;d.easing=isNaN(k[3])?k[3]||c.easing:k[4]||c.easing}});return[d]},m=i(this).bind(c.outFxBind,function(a,b){if(!(c.stopRepeat&&b.$lastPage[0]===b.$targetPage[0])){var e,j,d,f=b.$lastPage.add(b.$items.eq(b.exactPage)).add(b.$targetPage), h=b.fx;b.exactPage===0&&(f=f.add(b.$items.eq(b.pages)));b.options.animationTime<c.timeOut&&(d=b.options.animationTime||c.timeOut);f=f.find("*").andSelf();for(e in h)if(e==="outFx")for(j in h.outFx)f.filter(j).length&&l(f.filter(j),h.outFx[j],!0);else e!=="inFx"&&i.isArray(h[e])&&f.filter(e).length&&l(f.filter(e),g(h[e],!0),!0,d)}}).bind(c.inFxBind,function(a,b){if(!(c.stopRepeat&&b.$lastPage[0]===b.$targetPage[0])){var e,j,d=b.$currentPage.add(b.$items.eq(b.exactPage)),f=b.fx,d=d.find("*").andSelf(); for(e in f)if(e==="inFx")for(j in f.inFx)d.filter(j).length&&l(d.filter(j),f.inFx[j],!1);else e!=="outFx"&&i.isArray(f[e])&&d.filter(e).length&&l(d.filter(e),g(f[e],!1),!1)}}).data("AnythingSlider");i(window).load(function(){m.gotoPage(m.currentPage,m.playing)})})}})(jQuery);(function($) {$.fn.jRating = function(op) {var defaults = {/** String vars **/bigStarsPath : 'images/lp.jstar.inverse.png', // path of the icon stars.pngsmallStarsPath : 'images/lp.jstar.inverse.png', // path of the icon small.pngphpPath : 'more/ratingajax.lasso', // path of the php file jRating.phptype : 'small', // can be set to 'small' or 'big'/** Boolean vars **/step:false, // if true, mouseover binded star by star,isDisabled:false,showRateInfo: true,/** Integer vars **/length:5, // number of star to displaydecimalLength : 0, // number of decimals.. Max 3, but you can complete the function 'getNote'rateMax : 10, // maximal rate - integer from 0 to 9999 (or more)rateInfosX : -45, // relative position in X axis of the info box when mouseoverrateInfosY : 5, // relative position in Y axis of the info box when mouseover/** Functions **/onSuccess : null,onError : null}; if(this.length>0)return this.each(function() {var opts = $.extend(defaults, op), newWidth = 0,starWidth = 0,starHeight = 0,bgPath = '';if($(this).hasClass('jDisabled') || opts.isDisabled)var jDisabled = true;elsevar jDisabled = false;getStarWidth();$(this).height(starHeight);var average = parseFloat($(this).attr('data').split('_')[0]),idBox = parseInt($(this).attr('data').split('_')[1]), // get the id of the boxidTail = parseInt($(this).attr('data').split('_')[2]), // get the tail of the boxidtype = parseInt($(this).attr('data').split('_')[3]), // get the type of the boxwidthRatingContainer = starWidth*opts.length, // Width of the ContainerwidthColor = average/opts.rateMax*widthRatingContainer, // Width of the color Containerquotient = $('<div>', {'class' : 'jRatingColor',css:{width:widthColor}}).appendTo($(this)),average = $('<div>', {'class' : 'jRatingAverage',css:{width:0,top:- starHeight}}).appendTo($(this)),jstar =$('<div>', {'class' : 'jStar',css:{width:widthRatingContainer,height:starHeight,top:- (starHeight*2),background: 'url('+bgPath+') repeat-x'}}).appendTo($(this));$(this).css({width: widthRatingContainer,overflow:'hidden',zIndex:1,position:'relative'});if(!jDisabled)$(this).bind({mouseenter : function(e){var realOffsetLeft = findRealLeft(this);var relativeX = e.pageX - realOffsetLeft;if (opts.showRateInfo)var tooltip = $('<p>',{'class' : 'jRatingInfos',html : getNote(relativeX)+' <span class="maxRate">/ '+opts.rateMax+'</span>',css : {top: (e.pageY + opts.rateInfosY),left: (e.pageX + opts.rateInfosX)}}).appendTo('body').show();},mouseover : function(e){$(this).css('cursor','pointer'); },mouseout : function(){$(this).css('cursor','default');average.width(0);},mousemove : function(e){var realOffsetLeft = findRealLeft(this);var relativeX = e.pageX - realOffsetLeft;if(opts.step) newWidth = Math.floor(relativeX/starWidth)*starWidth + starWidth;else newWidth = relativeX;average.width(newWidth); if(opts.showRateInfo)$("p.jRatingInfos").css({left: (e.pageX + opts.rateInfosX)}).html(getNote(newWidth) +' <span class="maxRate">/ '+opts.rateMax+'</span>');},mouseleave : function(){$("p.jRatingInfos").remove();},click : function(e){$(this).unbind().css('cursor','default').addClass('jDisabled');if(opts.showRateInfo) $("p.jRatingInfos").fadeOut('fast',function(){$(this).remove();});e.preventDefault();var rate = getNote(newWidth);average.width(newWidth);$.post(opts.phpPath,{idBox : idBox,idtype : idtype,idTail : idTail,rate : rate,action : 'rating'},function(data) {if(!data.error){/** Here you can display an alert box, or use the jNotify Plugin :) http://www.myqjqueryplugins.com/jNotifyexemple : */if(opts.onSuccess) opts.onSuccess();}else{/** Here you can display an alert box, or use the jNotify Plugin :) http://www.myqjqueryplugins.com/jNotifyexemple : */if(opts.onError) opts.onError();}},'json');}});function getNote(relativeX) {var noteBrut = parseFloat((relativeX*100/widthRatingContainer)*opts.rateMax/100);switch(opts.decimalLength) {case 1 :var note = Math.round(noteBrut*10)/10;break;case 2 :var note = Math.round(noteBrut*100)/100;break;case 3 :var note = Math.round(noteBrut*1000)/1000;break;default :var note = Math.round(noteBrut*1)/1;}return note;};function getStarWidth(){switch(opts.type) {case 'small' :starWidth = 17; // width of the picture small.pngstarHeight = 16; // height of the picture small.pngbgPath = opts.smallStarsPath;break;default :starWidth = 17; // width of the picture stars.pngstarHeight = 16; // height of the picture stars.pngbgPath = opts.bigStarsPath;}};function findRealLeft(obj) {if( !obj ) return 0;return obj.offsetLeft + findRealLeft( obj.offsetParent );};});}})(jQuery);(function($){$.prettyPhoto={version:'3.1.3'};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({animation_speed:'fast',slideshow:5000,autoplay_slideshow:false,opacity:0.80,show_title:true,allow_resize:true,default_width:500,default_height:344,counter_separator_label:'/',theme:'pp_default',horizontal_padding:20,hideflash:false,wmode:'opaque',autoplay:true,modal:false,deeplinking:true,overlay_gallery:true,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},ie6_fallback:true,markup:'<div class="pp_pic_holder"> \<div class="ppt"> </div> \<div class="pp_top"> \<div class="pp_left"></div> \<div class="pp_middle"></div> \<div class="pp_right"></div> \</div> \<div class="pp_content_container"> \<div class="pp_left"> \<div class="pp_right"> \<div class="pp_content"> \<div class="pp_loaderIcon"></div> \<div class="pp_fade"> \<a href="#" class="pp_expand" title="Expand the image">Expand</a> \<div class="pp_hoverContainer"> \<a class="pp_next" href="#">next</a> \<a class="pp_previous" href="#">previous</a> \</div> \<div id="pp_full_res"></div> \<div class="pp_details"> \<div class="pp_nav"> \<a href="#" class="pp_arrow_previous">Previous</a> \<p class="currentTextHolder">0/0</p> \<a href="#" class="pp_arrow_next">Next</a> \</div> \<p class="pp_description"></p> \<div class="pp_social">{pp_social}</div> \<a class="pp_close" href="#">Close</a> \</div> \</div> \</div> \</div> \</div> \</div> \<div class="pp_bottom"> \<div class="pp_left"></div> \<div class="pp_middle"></div> \<div class="pp_right"></div> \</div> \</div> \<div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \<a href="#" class="pp_arrow_previous">Previous</a> \<div> \<ul> \{gallery} \</ul> \</div> \<a href="#" class="pp_arrow_next">Next</a> \</div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:'',social_tools:'<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="http://www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},pp_settings);var matchedObjects=this,percentBased=false,pp_dimensions,pp_open,pp_contentHeight,pp_contentWidth,pp_containerHeight,pp_containerWidth,windowHeight=$(window).height(),windowWidth=$(window).width(),pp_slideshow;doresize=true,scroll_pos=_get_scroll();$(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){_center_overlay();_resize_overlay();});if(pp_settings.keyboard_shortcuts){$(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){if(typeof $pp_pic_holder!='undefined'){if($pp_pic_holder.is(':visible')){switch(e.keyCode){case 37:$.prettyPhoto.changePage('previous');e.preventDefault();break;case 39:$.prettyPhoto.changePage('next');e.preventDefault();break;case 27:if(!settings.modal)$.prettyPhoto.close();e.preventDefault();break;};};};});};$.prettyPhoto.initialize=function(){settings=pp_settings;if(settings.theme=='pp_default')settings.horizontal_padding=16;if(settings.ie6_fallback&&$.browser.msie&&parseInt($.browser.version)==6)settings.theme="light_square";theRel=$(this).attr('rel');galleryRegExp=/\[(?:.*)\]/;isSet=(galleryRegExp.exec(theRel))?true:false;pp_images=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return $(n).attr('href');}):$.makeArray($(this).attr('href'));pp_titles=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).find('img').attr('alt'))?$(n).find('img').attr('alt'):"";}):$.makeArray($(this).find('img').attr('alt'));pp_descriptions=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).attr('title'))?$(n).attr('title'):"";}):$.makeArray($(this).attr('title'));if(pp_images.length>30)settings.overlay_gallery=false;set_position=jQuery.inArray($(this).attr('href'),pp_images);rel_index=(isSet)?set_position:$("a[rel^='"+theRel+"']").index($(this));_build_overlay(this);if(settings.allow_resize)$(window).bind('scroll.prettyphoto',function(){_center_overlay();});$.prettyPhoto.open();return false;}$.prettyPhoto.open=function(event){if(typeof settings=="undefined"){settings=pp_settings;if($.browser.msie&&$.browser.version==6)settings.theme="light_square";pp_images=$.makeArray(arguments[0]);pp_titles=(arguments[1])?$.makeArray(arguments[1]):$.makeArray("");pp_descriptions=(arguments[2])?$.makeArray(arguments[2]):$.makeArray("");isSet=(pp_images.length>1)?true:false;set_position=0;_build_overlay(event.target);}if($.browser.msie&&$.browser.version==6)$('select').css('visibility','hidden');if(settings.hideflash)$('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden');_checkPosition($(pp_images).size());$('.pp_loaderIcon').show();if(settings.deeplinking)setHashtag();if(settings.social_tools){facebook_like_link=settings.social_tools.replace('{location_href}',encodeURIComponent(location.href));$pp_pic_holder.find('.pp_social').html(facebook_like_link);}if($ppt.is(':hidden'))$ppt.css('opacity',0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find('.currentTextHolder').text((set_position+1)+settings.counter_separator_label+$(pp_images).size());if(pp_descriptions[set_position]!=""){$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));}else{$pp_pic_holder.find('.pp_description').hide();}movie_width=(parseFloat(getParam('width',pp_images[set_position])))?getParam('width',pp_images[set_position]):settings.default_width.toString();movie_height=(parseFloat(getParam('height',pp_images[set_position])))?getParam('height',pp_images[set_position]):settings.default_height.toString();percentBased=false;if(movie_height.indexOf('%')!=-1){movie_height=parseFloat(($(window).height()*parseFloat(movie_height)/100)-150);percentBased=true;}if(movie_width.indexOf('%')!=-1){movie_width=parseFloat(($(window).width()*parseFloat(movie_width)/100)-150);percentBased=true;}$pp_pic_holder.fadeIn(function(){(settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined")?$ppt.html(unescape(pp_titles[set_position])):$ppt.html(' ');imgPreloader="";skipInjection=false;switch(_getFileType(pp_images[set_position])){case'image':imgPreloader=new Image();nextImage=new Image();if(isSet&&set_position<$(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image();if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find('#pp_full_res')[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){pp_dimensions=_fitToViewport(imgPreloader.width,imgPreloader.height);_showContent();};imgPreloader.onerror=function(){alert('Image cannot be loaded. Make sure the path is correct and image exist.');$.prettyPhoto.close();};imgPreloader.src=pp_images[set_position];break;case'youtube':pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=getParam('v',pp_images[set_position]);if(movie_id==""){movie_id=pp_images[set_position].split('youtu.be/');movie_id=movie_id[1];if(movie_id.indexOf('?')>0)movie_id=movie_id.substr(0,movie_id.indexOf('?'));if(movie_id.indexOf('&')>0)movie_id=movie_id.substr(0,movie_id.indexOf('&'));}movie='http://www.youtube.com/embed/'+movie_id;(getParam('rel',pp_images[set_position]))?movie+="?rel="+getParam('rel',pp_images[set_position]):movie+="?rel=1";if(settings.autoplay)movie+="&autoplay=1";toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case'vimeo':pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=pp_images[set_position];var regExp=/http:\/\/(www\.)?vimeo.com\/(\d+)/;var match=movie_id.match(regExp);movie='http://player.vimeo.com/video/'+match[2]+'?title=0&byline=0&portrait=0';if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=pp_dimensions['width']+'/embed/?moog_width='+pp_dimensions['width'];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie);break;case'quicktime':pp_dimensions=_fitToViewport(movie_width,movie_height);pp_dimensions['height']+=15;pp_dimensions['contentHeight']+=15;pp_dimensions['containerHeight']+=15;toInject=settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case'flash':pp_dimensions=_fitToViewport(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf('flashvars')+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf('?'));toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);break;case'iframe':pp_dimensions=_fitToViewport(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1);toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url);break;case'ajax':doresize=false;pp_dimensions=_fitToViewport(movie_width,movie_height);doresize=true;skipInjection=true;$.get(pp_images[set_position],function(responseHTML){toInject=settings.inline_markup.replace(/{content}/g,responseHTML);$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;_showContent();});break;case'custom':pp_dimensions=_fitToViewport(movie_width,movie_height);toInject=settings.custom_markup;break;case'inline':myClone=$(pp_images[set_position]).clone().append('<br clear="all" />').css({'width':settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo($('body')).show();doresize=false;pp_dimensions=_fitToViewport($(myClone).width(),$(myClone).height());doresize=true;$(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());break;};if(!imgPreloader&&!skipInjection){$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;_showContent();};});return false;};$.prettyPhoto.changePage=function(direction){currentGalleryPage=0;if(direction=='previous'){set_position--;if(set_position<0)set_position=$(pp_images).size()-1;}else if(direction=='next'){set_position++;if(set_position>$(pp_images).size()-1)set_position=0;}else{set_position=direction;};rel_index=set_position;if(!doresize)doresize=true;$('.pp_contract').removeClass('pp_contract').addClass('pp_expand');_hideContent(function(){$.prettyPhoto.open();});};$.prettyPhoto.changeGalleryPage=function(direction){if(direction=='next'){currentGalleryPage++;if(currentGalleryPage>totalPage)currentGalleryPage=0;}else if(direction=='previous'){currentGalleryPage--;if(currentGalleryPage<0)currentGalleryPage=totalPage;}else{currentGalleryPage=direction;};slide_speed=(direction=='next'||direction=='previous')?settings.animation_speed:0;slide_to=currentGalleryPage*(itemsPerPage*itemWidth);$pp_gallery.find('ul').animate({left:-slide_to},slide_speed);};$.prettyPhoto.startSlideshow=function(){if(typeof pp_slideshow=='undefined'){$pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){$.prettyPhoto.stopSlideshow();return false;});pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow);}else{$.prettyPhoto.changePage('next');};}$.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});clearInterval(pp_slideshow);pp_slideshow=undefined;}$.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;$.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find('object,embed').css('visibility','hidden');$('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){$(this).remove();});$pp_overlay.fadeOut(settings.animation_speed,function(){if($.browser.msie&&$.browser.version==6)$('select').css('visibility','visible');if(settings.hideflash)$('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible');$(this).remove();$(window).unbind('scroll.prettyphoto');clearHashtag();settings.callback();doresize=true;pp_open=false;delete settings;});};function _showContent(){$('.pp_loaderIcon').hide();projectedTop=scroll_pos['scrollTop']+((windowHeight/2)-(pp_dimensions['containerHeight']/2));if(projectedTop<0)projectedTop=0;$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find('.pp_content').animate({height:pp_dimensions['contentHeight'],width:pp_dimensions['contentWidth']},settings.animation_speed);$pp_pic_holder.animate({'top':projectedTop,'left':(windowWidth/2)-(pp_dimensions['containerWidth']/2),width:pp_dimensions['containerWidth']},settings.animation_speed,function(){$pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']);$pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed);if(isSet&&_getFileType(pp_images[set_position])=="image"){$pp_pic_holder.find('.pp_hoverContainer').show();}else{$pp_pic_holder.find('.pp_hoverContainer').hide();}if(pp_dimensions['resized']){$('a.pp_expand,a.pp_contract').show();}else{$('a.pp_expand').hide();}if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open)$.prettyPhoto.startSlideshow();settings.changepicturecallback();pp_open=true;});_insert_gallery();};function _hideContent(callback){$pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');$pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){$('.pp_loaderIcon').show();callback();});};function _checkPosition(setCount){(setCount>1)?$('.pp_nav').show():$('.pp_nav').hide();};function _fitToViewport(width,height){resized=false;_getDimensions(width,height);imageWidth=width,imageHeight=height;if(((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight))&&doresize&&settings.allow_resize&&!percentBased){resized=true,fitting=false;while(!fitting){if((pp_containerWidth>windowWidth)){imageWidth=(windowWidth-200);imageHeight=(height/width)*imageWidth;}else if((pp_containerHeight>windowHeight)){imageHeight=(windowHeight-200);imageWidth=(width/height)*imageHeight;}else{fitting=true;};pp_containerHeight=imageHeight,pp_containerWidth=imageWidth;};_getDimensions(imageWidth,imageHeight);if((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight)){_fitToViewport(pp_containerWidth,pp_containerHeight)};};return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(pp_containerHeight),containerWidth:Math.floor(pp_containerWidth)+(settings.horizontal_padding*2),contentHeight:Math.floor(pp_contentHeight),contentWidth:Math.floor(pp_contentWidth),resized:resized};};function _getDimensions(width,height){width=parseFloat(width);height=parseFloat(height);$pp_details=$pp_pic_holder.find('.pp_details');$pp_details.width(width);detailsHeight=parseFloat($pp_details.css('marginTop'))+parseFloat($pp_details.css('marginBottom'));$pp_details=$pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({'position':'absolute','top':-10000});detailsHeight+=$pp_details.height();detailsHeight=(detailsHeight<=34)?36:detailsHeight;if($.browser.msie&&$.browser.version==7)detailsHeight+=8;$pp_details.remove();$pp_title=$pp_pic_holder.find('.ppt');$pp_title.width(width);titleHeight=parseFloat($pp_title.css('marginTop'))+parseFloat($pp_title.css('marginBottom'));$pp_title=$pp_title.clone().appendTo($('body')).css({'position':'absolute','top':-10000});titleHeight+=$pp_title.height();$pp_title.remove();pp_contentHeight=height+detailsHeight;pp_contentWidth=width;pp_containerHeight=pp_contentHeight+titleHeight+$pp_pic_holder.find('.pp_top').height()+$pp_pic_holder.find('.pp_bottom').height();pp_containerWidth=width;}function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com\/watch/i)||itemSrc.match(/youtu\.be/i)){return'youtube';}else if(itemSrc.match(/vimeo\.com/i)){return'vimeo';}else if(itemSrc.match(/\b.mov\b/i)){return'quicktime';}else if(itemSrc.match(/\b.swf\b/i)){return'flash';}else if(itemSrc.match(/\biframe=true\b/i)){return'iframe';}else if(itemSrc.match(/\bajax=true\b/i)){return'ajax';}else if(itemSrc.match(/\bcustom=true\b/i)){return'custom';}else if(itemSrc.substr(0,1)=='#'){return'inline';}else{return'image';};};function _center_overlay(){if(doresize&&typeof $pp_pic_holder!='undefined'){scroll_pos=_get_scroll();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=(windowHeight/2)+scroll_pos['scrollTop']-(contentHeight/2);if(projectedTop<0)projectedTop=0;if(contentHeight>windowHeight)return;$pp_pic_holder.css({'top':projectedTop,'left':(windowWidth/2)+scroll_pos['scrollLeft']-(contentwidth/2)});};};function _get_scroll(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};};};function _resize_overlay(){windowHeight=$(window).height(),windowWidth=$(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height($(document).height()).width(windowWidth);};function _insert_gallery(){if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"&&(settings.ie6_fallback&&!($.browser.msie&&parseInt($.browser.version)==6))){itemWidth=52+5;navWidth=(settings.theme=="facebook"||settings.theme=="pp_default")?50:30;itemsPerPage=Math.floor((pp_dimensions['containerWidth']-100-navWidth)/itemWidth);itemsPerPage=(itemsPerPage<pp_images.length)?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide();}else{$pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show();};galleryWidth=itemsPerPage*itemWidth;fullGalleryWidth=pp_images.length*itemWidth;$pp_gallery.css('margin-left',-((galleryWidth/2)+(navWidth/2))).find('div:first').width(galleryWidth+5).find('ul').width(fullGalleryWidth).find('li.selected').removeClass('selected');goToPage=(Math.floor(set_position/itemsPerPage)<totalPage)?Math.floor(set_position/itemsPerPage):totalPage;$.prettyPhoto.changeGalleryPage(goToPage);$pp_gallery_li.filter(':eq('+set_position+')').addClass('selected');}else{$pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave');}}function _build_overlay(caller){if(settings.social_tools)facebook_like_link=settings.social_tools.replace('{location_href}',encodeURIComponent(location.href));settings.markup=settings.markup.replace('{pp_social}',(settings.social_tools)?facebook_like_link:'');$('body').append(settings.markup);$pp_pic_holder=$('.pp_pic_holder'),$ppt=$('.ppt'),$pp_overlay=$('div.pp_overlay');if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var i=0;i<pp_images.length;i++){if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname='default';img_src='';}else{classname='';img_src=pp_images[i];}toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>";};toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find('#pp_full_res').after(toInject);$pp_gallery=$('.pp_pic_holder .pp_gallery'),$pp_gallery_li=$pp_gallery.find('li');$pp_gallery.find('.pp_arrow_next').click(function(){$.prettyPhoto.changeGalleryPage('next');$.prettyPhoto.stopSlideshow();return false;});$pp_gallery.find('.pp_arrow_previous').click(function(){$.prettyPhoto.changeGalleryPage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_content').hover(function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();},function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();});itemWidth=52+5;$pp_gallery_li.each(function(i){$(this).find('a').click(function(){$.prettyPhoto.changePage(i);$.prettyPhoto.stopSlideshow();return false;});});};if(settings.slideshow){$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')$pp_pic_holder.find('.pp_nav .pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});}$pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);$pp_overlay.css({'opacity':0,'height':$(document).height(),'width':$(window).width()}).bind('click',function(){if(!settings.modal)$.prettyPhoto.close();});$('a.pp_close').bind('click',function(){$.prettyPhoto.close();return false;});$('a.pp_expand').bind('click',function(e){if($(this).hasClass('pp_expand')){$(this).removeClass('pp_expand').addClass('pp_contract');doresize=false;}else{$(this).removeClass('pp_contract').addClass('pp_expand');doresize=true;};_hideContent(function(){$.prettyPhoto.open();});return false;});$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){$.prettyPhoto.changePage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){$.prettyPhoto.changePage('next');$.prettyPhoto.stopSlideshow();return false;});_center_overlay();};if(!pp_alreadyInitialized&&getHashtag()){pp_alreadyInitialized=true;hashIndex=getHashtag();hashRel=hashIndex;hashIndex=hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1);hashRel=hashRel.substring(0,hashRel.indexOf('/'));setTimeout(function(){$("a[rel^='"+hashRel+"']:eq("+hashIndex+")").trigger('click');},50);}return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize);};function getHashtag(){url=location.href;hashtag=(url.indexOf('#!')!=-1)?decodeURI(url.substring(url.indexOf('#!')+2,url.length)):false;return hashtag;};function setHashtag(){if(typeof theRel=='undefined')return;location.hash='!'+theRel+'/'+rel_index+'/';};function clearHashtag(){url=location.href;hashtag=(url.indexOf('#!prettyPhoto'))?true:false;if(hashtag)location.hash="!prettyPhoto";}function getParam(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);var pp_alreadyInitialized=false;function disableSubmit(whichButton){if (document.getElementById){// this is the way the standards workdocument.getElementById(whichButton).disabled = true;}else if (document.all){// this is the way old msie versions workdocument.all[whichButton].disabled = true;}else if (document.layers){// this is the way nn4 worksdocument.layers[whichButton].disabled = true;}}//Editorial Font Sizefunction font_size(toggle) {var post_body_selector = jQuery('.body');var current_size = parseInt(post_body_selector.css('font-size').replace('px', ''));if (toggle === 'up'){post_body_selector.css({'font-size': (current_size + 1) + 'px'})}else if (toggle === 'down'){post_body_selector.css({'font-size': (current_size - 1) + 'px'})}}function loadXMLDocbigcal(url){if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safarixmlhttp=new XMLHttpRequest();xmlhttp.open("GET",url,false);xmlhttp.send(null);}else{// code for IE6, IE5xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");xmlhttp.open("GET",url,false);// Do not send null for ActiveXxmlhttp.send();}document.getElementById('bigcal').innerHTML=xmlhttp.responseText;}function loadXMLDoccaldate(url){if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safarixmlhttp=new XMLHttpRequest();xmlhttp.open("GET",url,false);xmlhttp.send(null);}else{// code for IE6, IE5xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");xmlhttp.open("GET",url,false);// Do not send null for ActiveXxmlhttp.send();}document.getElementById('caldate').innerHTML=xmlhttp.responseText;}
