(function(){if(!window.MagicJS){var c={version:"2.3.8",UUID:0,storage:{},$uuid:function(a){return a.$J_UUID||(a.$J_UUID=++$J.UUID)},getStorage:function(a){return $J.storage[a]||($J.storage[a]={})},$F:function(){},$false:function(){return false},defined:function(a){return undefined!=a},exists:function(a){return!!a},j1:function(a){if(!$J.defined(a))return false;if(a.$J_TYPE)return a.$J_TYPE;if(a.nodeType){if(1==a.nodeType)return"element";if(3==a.nodeType)return"textnode"}if(a.length&&a.item)return"collection";
if(a.length&&a.callee)return"arguments";if((a instanceof window.Object||a instanceof window.Function)&&a.constructor===$J.Class)return"class";if(a instanceof window.Array)return"array";if(a instanceof window.Function)return"function";if(a instanceof window.String)return"string";if($J.v.trident){if($J.defined(a.cancelBubble))return"event"}else if(a instanceof window.Event||a===window.event||a.constructor==window.MouseEvent)return"event";if(a instanceof window.Date)return"date";if(a instanceof window.RegExp)return"regexp";
if(a===window)return"window";if(a===document)return"document";return typeof a},extend:function(a,b){a instanceof window.Array||(a=[a]);for(var d=0,e=a.length;d<e;d++)if($J.defined(a))for(var f in b||{})a[d][f]=b[f];return a[0]},implement:function(a,b){a instanceof window.Array||(a=[a]);for(var d=0,e=a.length;d<e;d++)if($J.defined(a[d]))for(var f in b||{})a[d].prototype[f]||(a[d].prototype[f]=b[f]);return a[0]},nativize:function(a,b){if(!$J.defined(a))return a;for(var d in b||{})a[d]||(a[d]=b[d]);
return a},$try:function(){for(var a=0,b=arguments.length;a<b;a++)try{return arguments[a]()}catch(d){}return null},$A:function(a){if(!$J.defined(a))return $j([]);if(a.toArray)return $j(a.toArray());if(a.item){for(var b=a.length||0,d=new Array(b);b--;)d[b]=a[b];return $j(d)}return $j(Array.prototype.slice.call(a))},now:function(){return(new Date).getTime()},detach:function(a){var b;switch($J.j1(a)){case "object":b={};for(var d in a)b[d]=$J.detach(a[d]);break;case "array":b=[];d=0;for(var e=a.length;d<
e;d++)b[d]=$J.detach(a[d]);break;default:return a}return b},$:function(a){if(!$J.defined(a))return null;if(a.$J_EXTENDED)return a;switch($J.j1(a)){case "array":a=$J.nativize(a,$J.extend($J.Array,{$J_EXTENDED:true}));a.j14=a.forEach;return a;case "string":a=document.getElementById(a);if($J.defined(a))return $J.$(a);return null;case "window":case "document":$J.$uuid(a);a=$J.extend(a,$J.Doc);break;case "element":$J.$uuid(a);a=$J.extend(a,$J.Element);break;case "event":a=$J.extend(a,$J.Event);break;case "textnode":return a;
case "function":case "array":case "date":default:break}return $J.extend(a,{$J_EXTENDED:true})},$new:function(a,b,d){return $j($J.doc.createElement(a)).setProps(b).j6(d)}};window.magicJS=window.$J=c;window.$j=c.$;$J.Array={$J_TYPE:"array",indexOf:function(a,b){var d=this.length;for(b=b<0?Math.max(0,d+b):b||0;b<d;b++)if(this[b]===a)return b;return-1},contains:function(a,b){return this.indexOf(a,b)!=-1},forEach:function(a,b){for(var d=0,e=this.length;d<e;d++)d in this&&a.call(b,this[d],d,this)},filter:function(a,
b){for(var d=[],e=0,f=this.length;e<f;e++)if(e in this){var g=this[e];a.call(b,this[e],e,this)&&d.push(g)}return d},map:function(a,b){for(var d=[],e=0,f=this.length;e<f;e++)if(e in this)d[e]=a.call(b,this[e],e,this);return d}};$J.implement(String,{$J_TYPE:"string",j21:function(){return this.replace(/^\s+|\s+$/g,"")},trimLeft:function(){return this.replace(/^\s+/g,"")},trimRight:function(){return this.replace(/\s+$/g,"")},j20:function(a){return this.toString()===a.toString()},icompare:function(a){return this.toLowerCase().toString()===
a.toLowerCase().toString()},k:function(){return this.replace(/-\D/g,function(a){return a.charAt(1).toUpperCase()})},dashize:function(){return this.replace(/[A-Z]/g,function(a){return"-"+a.charAt(0).toLowerCase()})},j22:function(a){return parseInt(this,a||10)},toFloat:function(){return parseFloat(this)},j23:function(){return!this.replace(/true/i,"").j21()},has:function(a,b){b=b||"";return(b+this+b).indexOf(b+a+b)>-1}});c.implement(Function,{$J_TYPE:"function",j19:function(){var a=$J.$A(arguments),
b=this,d=a.shift();return function(){return b.apply(d||null,a.concat($J.$A(arguments)))}},j18:function(){var a=$J.$A(arguments),b=this,d=a.shift();return function(e){return b.apply(d||null,$j([e||window.event]).concat(a))}},j32:function(){var a=$J.$A(arguments),b=this,d=a.shift();return window.setTimeout(function(){return b.apply(b,a)},d||0)},j33:function(){var a=$J.$A(arguments),b=this;return function(){return b.j32.apply(b,a)}},interval:function(){var a=$J.$A(arguments),b=this,d=a.shift();return window.setInterval(function(){return b.apply(b,
a)},d||0)}});$J.v={features:{xpath:!!document.evaluate,air:!!window.runtime,query:!!document.querySelector},engine:window.opera?"presto":window.ActiveXObject?"trident":!navigator.taintEnabled?"webkit":undefined!=document.getBoxObjectFor?"gecko":"unknown",version:"",platform:$J.defined(window.orientation)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),backCompat:document.compatMode&&"backcompat"==document.compatMode.toLowerCase(),getDoc:function(){return document.compatMode&&
"backcompat"==document.compatMode.toLowerCase()?document.body:document.documentElement},ready:false,onready:function(){if(!$J.v.ready){$J.v.ready=true;$J.body=$j(document.body);$j(document).raiseEvent("domready")}}};(function(){function a(){return!!arguments.callee.caller}$J.v.version="presto"==$J.v.engine?a()?960:document.getElementsByClassName?950:925:"trident"==$J.v.engine?window.XMLHttpRequest&&window.postMessage?6:window.XMLHttpRequest?5:4:"webkit"==$J.v.engine?$J.v.features.xpath?$J.v.features.query?
525:420:419:"gecko"==$J.v.engine?window.localStorage?191:document.getElementsByClassName?190:181:"";$J.v[$J.v.engine]=$J.v[$J.v.engine+$J.v.version]=true})();$J.Element={j13:function(a){return this.className.has(a," ")},j2:function(a){if(a&&!this.j13(a))this.className+=(this.className?" ":"")+a;return this},j3:function(a){a=a||".*";this.className=this.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1").j21();return this},j4:function(a){return this.j13(a)?this.j3(a):this.j2(a)},j5:function(a){a=
a=="float"&&this.currentStyle?"styleFloat":a.k();var b=null;if(this.currentStyle)b=this.currentStyle[a];else if(document.defaultView&&document.defaultView.getComputedStyle)b=(css=document.defaultView.getComputedStyle(this,null))?css.getPropertyValue([a.dashize()]):null;b||(b=this.style[a]);if("opacity"==a)return $J.defined(b)?parseFloat(b):1;if(/^(border(Top|Bottom|Left|Right)Width)|((padding|margin)(Top|Bottom|Left|Right))$/.test(a))b=parseInt(b)?b:"0px";return"auto"==b?null:b},j6Prop:function(a,
b){try{if("opacity"==a){this.g(b);return this}if("float"==a){this.style["undefined"===typeof this.style.styleFloat?"cssFloat":"styleFloat"]=b;return this}this.style[a.k()]=b+("number"==$J.j1(b)&&!$j(["zIndex","zoom"]).contains(a.k())?"px":"")}catch(d){}return this},j6:function(a){for(var b in a)this.j6Prop(b,a[b]);return this},j30s:function(){var a={};$J.$A(arguments).j14(function(b){a[b]=this.j5(b)},this);return a},g:function(a,b){b=b||false;a=parseFloat(a);if(b)if(a==0){if("hidden"!=this.style.visibility)this.style.visibility=
"hidden"}else if("visible"!=this.style.visibility)this.style.visibility="visible";if($J.v.trident){if(!this.currentStyle||!this.currentStyle.hasLayout)this.style.zoom=1;try{var d=this.filters.item("DXImageTransform.Microsoft.Alpha");d.enabled=1!=a;d.opacity=a*100}catch(e){this.style.filter+=1==a?"":"progid:DXImageTransform.Microsoft.Alpha(enabled=true,opacity="+a*100+")"}}this.style.opacity=a;return this},setProps:function(a){for(var b in a)this.setAttribute(b,""+a[b]);return this},hide:function(){return this.j6({display:"none",
visibility:"hidden"})},show:function(){return this.j6({display:"block",visibility:"visible"})},j7:function(){return{width:this.offsetWidth,height:this.offsetHeight}},j10:function(){return{top:this.scrollTop,left:this.scrollLeft}},j11:function(){var a=this,b={top:0,left:0};do{b.left+=a.scrollLeft||0;b.top+=a.scrollTop||0;a=a.parentNode}while(a);return b},j8:function(){if($J.defined(document.documentElement.getBoundingClientRect)){var a=this.getBoundingClientRect(),b=$j(document).j10(),d=$J.v.getDoc();
return{top:a.top+b.y-d.clientTop,left:a.left+b.x-d.clientLeft}}a=this;b=t=0;do{b+=a.offsetLeft||0;t+=a.offsetTop||0;a=a.offsetParent}while(a&&!/^(?:body|html)$/i.test(a.tagName));return{top:t,left:b}},j9:function(){var a=this.j8(),b=this.j7();return{top:a.top,bottom:a.top+b.height,left:a.left,right:a.left+b.width}},update:function(a){try{this.innerHTML=a}catch(b){this.innerText=a}return this},remove:function(){return this.parentNode?this.parentNode.removeChild(this):this},kill:function(){$J.$A(this.childNodes).j14(function(a){3!=
a.nodeType&&$j(a).kill()});this.remove();this.clearEvents();if(this.$J_UUID){$J.storage[this.$J_UUID]=null;delete $J.storage[this.$J_UUID]}return null},append:function(a,b){b=b||"bottom";var d=this.firstChild;"top"==b&&d?this.insertBefore(a,d):this.appendChild(a);return this},j43:function(a,b){$j(a).append(this,b);return this},enclose:function(a){this.append(a.parentNode.replaceChild(this,a));return this},hasChild:function(a){if(!(a=$j(a)))return false;return this==a?false:this.contains&&!$J.v.webkit419?
this.contains(a):this.compareDocumentPosition?!!(this.compareDocumentPosition(a)&16):$J.$A(this.byTag(a.tagName)).contains(a)}};$J.Element.j30=$J.Element.j5;$J.Element.j31=$J.Element.j6;if(!window.Element){window.Element=$J.$F;$J.v.engine.webkit&&window.document.createElement("iframe");window.Element.prototype=$J.v.engine.webkit?window["[[DOMElement.prototype]]"]:{}}$J.implement(window.Element,{$J_TYPE:"element"});$J.Doc={j7:function(){if($J.v.presto925||$J.v.webkit419)return{width:self.innerWidth,
height:self.innerHeight};return{width:$J.v.getDoc().clientWidth,height:$J.v.getDoc().clientHeight}},j10:function(){return{x:self.pageXOffset||$J.v.getDoc().scrollLeft,y:self.pageYOffset||$J.v.getDoc().scrollTop}},j12:function(){var a=this.j7();return{width:Math.max($J.v.getDoc().scrollWidth,a.width),height:Math.max($J.v.getDoc().scrollHeight,a.height)}}};$J.extend(document,{$J_TYPE:"document"});$J.extend(window,{$J_TYPE:"window"});$J.extend([$J.Element,$J.Doc],{j40:function(a,b){var d=$J.getStorage(this.$J_UUID),
e=d[a];if(undefined!=b&&undefined==e)e=d[a]=b;return e||null},j41:function(a,b){$J.getStorage(this.$J_UUID)[a]=b;return this},j42:function(a){delete $J.getStorage(this.$J_UUID)[a];return this}});window.HTMLElement&&window.HTMLElement.prototype&&window.HTMLElement.prototype.getElementsByClassName||$J.extend([$J.Element,$J.Doc],{getElementsByClassName:function(a){return $J.$A(this.getElementsByTagName("*")).filter(function(b){try{return 1==b.nodeType&&b.className.has(a," ")}catch(d){}})}});$J.extend([$J.Element,
$J.Doc],{byClass:function(a){return this.getElementsByClassName(a)},byTag:function(a){return this.getElementsByTagName(a)}});$J.Event={$J_TYPE:"event",stop:function(){if(this.stopPropagation)this.stopPropagation();else this.cancelBubble=true;if(this.preventDefault)this.preventDefault();else this.returnValue=false;return this},j15:function(){return{x:this.pageX||this.clientX+$J.v.getDoc().scrollLeft,y:this.pageY||this.clientY+$J.v.getDoc().scrollTop}},getTarget:function(){for(var a=this.target||this.srcElement;a&&
3==a.nodeType;)a=a.parentNode;return a},getRelated:function(){var a=null;switch(this.type){case "mouseover":a=this.relatedTarget||this.fromElement;break;case "mouseout":a=this.relatedTarget||this.toElement;break;default:return a}try{for(;a&&3==a.nodeType;)a=a.parentNode}catch(b){a=null}return a},getButton:function(){if(!this.which&&this.button!==undefined)return this.button&1?1:this.button&2?3:this.button&4?2:0;return this.which}};$J._event_add_="addEventListener";$J._event_del_="removeEventListener";
$J._event_prefix_="";if(!document.addEventListener){$J._event_add_="attachEvent";$J._event_del_="detachEvent";$J._event_prefix_="on"}$J.extend([$J.Element,$J.Doc],{a:function(a,b){var d="domready"==a?false:true,e=this.j40("events",{});e[a]=e[a]||[];if(e[a].hasOwnProperty(b.$J_EUID))return this;if(!b.$J_EUID)b.$J_EUID=Math.floor(Math.random()*$J.now());var f=this,g=function(){return b.call(f)};if("domready"==a)if($J.v.ready){b.call(this);return this}if(d){g=function(j){j=$J.extend(j||window.e,{$J_TYPE:"event"});
return b.call(f,$j(j))};this[$J._event_add_]($J._event_prefix_+a,g,false)}e[a][b.$J_EUID]=g;return this},j26:function(a,b){var d="domready"==a?false:true,e=this.j40("events");if(!e||!e[a])return this;e=e[a];b=b||null;if(a&&!b){for(var f in e)e.hasOwnProperty(f)&&this.j26(a,f);return this}b="function"==$J.j1(b)?b.$J_EUID:b;if(!e.hasOwnProperty(b))return this;if("domready"==a)d=false;d&&this[$J._event_del_]($J._event_prefix_+a,e[b],false);delete e[b];return this},raiseEvent:function(a,b){var d=this,
e;if(!("domready"==a?false:true)){b=this.j40("events");if(!b||!b[a])return this;a=b[a];for(e in a)a.hasOwnProperty(e)&&a[e].call(this);return this}if(d===document&&document.createEvent&&!el.dispatchEvent)d=document.documentElement;if(document.createEvent){e=document.createEvent(a);e.initEvent(b,true,true)}else{e=document.createEventObject();e.eventType=a}document.createEvent?d.dispatchEvent(e):d.fireEvent("on"+b,e);return e},clearEvents:function(){var a=this.j40("events");if(!a)return this;for(var b in a)this.j26(b);
this.j42("events");return this}});(function(){if($J.v.webkit&&$J.v.version<420)(function(){$j(["loaded","complete"]).contains(document.readyState)?$J.v.onready():arguments.callee.j32(50)})();else if($J.v.trident&&window==top)(function(){$J.$try(function(){$J.v.getDoc().doScroll("left");return true})?$J.v.onready():arguments.callee.j32(50)})();else{$j(document).a("DOMContentLoaded",$J.v.onready);$j(window).a("load",$J.v.onready)}})();$J.Class=function(){var a=null,b=$J.$A(arguments);if("class"==$J.j1(b[0]))a=
b.shift();var d=function(){for(var g in this)this[g]=$J.detach(this[g]);if(this.constructor.$parent){this.$parent={};g=this.constructor.$parent;for(var j in g){var i=g[j];switch($J.j1(i)){case "function":this.$parent[j]=$J.Class.wrap(this,i);break;case "object":this.$parent[j]=$J.detach(i);break;case "array":this.$parent[j]=$J.detach(i);break}}}j=this.init?this.init.apply(this,arguments):this;delete this.caller;return j};if(!d.prototype.init)d.prototype.init=$J.$F;if(a){var e=function(){};e.prototype=
a.prototype;d.prototype=new e;d.$parent={};for(var f in a.prototype)d.$parent[f]=a.prototype[f]}else d.$parent=null;d.constructor=$J.Class;d.prototype.constructor=d;$J.extend(d.prototype,b[0]);$J.extend(d,{$J_TYPE:"class"});return d};c.Class.wrap=function(a,b){return function(){return b.apply(a,arguments)}};$J.FX=new $J.Class({options:{fps:50,duration:500,transition:function(a){return-(Math.cos(Math.PI*a)-1)/2},onStart:$J.$F,onComplete:$J.$F,onBeforeRender:$J.$F},styles:null,init:function(a,b){this.el=
$j(a);this.options=$J.extend(this.options,b);this.timer=false},start:function(a){this.styles=a;this.curFrame=this.state=0;this.startTime=$J.now();this.finishTime=this.startTime+this.options.duration;this.timer=this.loop.j19(this).interval(Math.round(1E3/this.options.fps));this.options.onStart.call();return this},stop:function(a){a=$J.defined(a)?a:false;if(this.timer){clearInterval(this.timer);this.timer=false}if(a){this.render(1);this.options.onComplete.j32(10)}return this},calc:function(a,b,d){return(b-
a)*d+a},loop:function(){var a=$J.now();if(a>=this.finishTime){if(this.timer){clearInterval(this.timer);this.timer=false}this.render(1);this.options.onComplete.j32(10);return this}this.render(this.options.transition((a-this.startTime)/this.options.duration))},render:function(a){var b={};for(var d in this.styles)b[d]="opacity"===d?Math.round(this.calc(this.styles[d][0],this.styles[d][1],a)*100)/100:Math.round(this.calc(this.styles[d][0],this.styles[d][1],a));this.options.onBeforeRender(b);this.set(b)},
set:function(a){return this.el.j6(a)}});$J.FX.Transition={linear:function(a){return a},sineIn:function(a){return-(Math.cos(Math.PI*a)-1)/2},sineOut:function(a){return 1-$J.FX.Transition.sineIn(1-a)},expoIn:function(a){return Math.pow(2,8*(a-1))},expoOut:function(a){return 1-$J.FX.Transition.expoIn(1-a)},quadIn:function(a){return Math.pow(a,2)},quadOut:function(a){return 1-$J.FX.Transition.quadIn(1-a)},cubicIn:function(a){return Math.pow(a,3)},cubicOut:function(a){return 1-$J.FX.Transition.cubicIn(1-
a)},backIn:function(a,b){b=b||1.618;return Math.pow(a,2)*((b+1)*a-b)},backOut:function(a){return 1-$J.FX.Transition.backIn(1-a)},elasticIn:function(a,b){b=b||[];return Math.pow(2,10*--a)*Math.cos(20*a*Math.PI*(b[0]||1)/3)},elasticOut:function(a,b){return 1-$J.FX.Transition.elasticIn(1-a,b)},bounceIn:function(a){for(var b=0,d=1;;b+=d,d/=2)if(a>=(7-4*b)/11)return d*d-Math.pow((11-6*b-11*a)/4,2)},bounceOut:function(a){return 1-$J.FX.Transition.bounceIn(1-a)},none:function(){return 0}};$J.FX.Slide=new $J.Class($J.FX,
{options:{mode:"vertical"},init:function(a,b){this.el=$j(a);this.options=$J.extend(this.$parent.options,this.options);this.$parent.init(a,b);this.wrapper=(this.wrapper=this.el.j40("slide:wrapper"))||$J.$new("DIV").j6($J.extend(this.el.j30s("margin-top","margin-left","margin-right","margin-bottom","position","top","float"),{overflow:"hidden"})).enclose(this.el);this.el.j41("slide:wrapper",this.wrapper).j6({margin:0})},vertical:function(){this.margin="margin-top";this.layout="height";this.offset=this.el.offsetHeight},
horizontal:function(a){this.margin="margin-"+(a||"left");this.layout="width";this.offset=this.el.offsetWidth},right:function(){this.horizontal()},left:function(){this.horizontal("right")},start:function(a,b){this[b||this.options.mode]();b=this.el.j5(this.margin).j22();var d=this.wrapper.j5(this.layout).j22(),e={},f={},g;e[this.margin]=[b,0];e[this.layout]=[0,this.offset];f[this.margin]=[b,-this.offset];f[this.layout]=[d,0];switch(a){case "in":g=e;break;case "out":g=f;break;case "toggle":g=0==d?e:
f;break}this.$parent.start(g);return this},set:function(a){this.el.j6Prop(this.margin,a[this.margin]);this.wrapper.j6Prop(this.layout,a[this.layout]);return this},slideIn:function(a){return this.start("in",a)},slideOut:function(a){return this.start("out",a)},hide:function(a){this[a||this.options.mode]();a={};a[this.layout]=0;a[this.margin]=-this.offset;return this.set(a)},show:function(a){this[a||this.options.mode]();a={};a[this.layout]=this.offset;a[this.margin]=0;return this.set(a)},toggle:function(a){return this.start("toggle",
a)}});$J.win=$j(window);$J.doc=$j(document)}})();
var MagicImage=new $J.Class({self:null,ready:false,options:{onload:$J.$F,onabort:$J.$F,onerror:$J.$F},width:0,height:0,border:{left:0,right:0,top:0,bottom:0},margin:{left:0,right:0,top:0,bottom:0},padding:{left:0,right:0,top:0,bottom:0},_timer:null,_handlers:{onload:function(c){c&&$j(c).stop();this._unbind();if(!this.ready){this.ready=true;this.calc();this._cleanup();this.options.onload.j32(1)}},onabort:function(c){c&&$j(c).stop();this._unbind();this.ready=false;this._cleanup();this.options.onabort.j32(1)},
onerror:function(c){c&&$j(c).stop();this._unbind();this.ready=false;this._cleanup();this.options.onerror.j32(1)}},_bind:function(){$j(["load","abort","error"]).j14(function(c){this.self.a(c,this._handlers["on"+c].j18(this).j33(1))},this)},_unbind:function(){$j(["load","abort","error"]).j14(function(c){this.self.j26(c)},this)},_cleanup:function(){if(this.self.j40("new")){var c=this.self.parentNode;this.self.remove().j42("new").j6({position:"static",top:"auto"});c.kill();this.self.width=this.width;
this.self.height=this.height}},init:function(c,a){this.options=$J.extend(this.options,a);a=this.self=$j(c)||$J.$new("img").j43($J.$new("div").j6({position:"absolute",top:-10000,width:10,height:10,overflow:"hidden"}).j43($J.body)).j41("new",true);var b=function(){this.isReady()?this._handlers.onload.call(this):this._handlers.onerror.call(this);b=null}.j19(this);this._bind();if(!c.src)a.src=c;if(a&&a.complete)this._timer=b.j32(100)},destroy:function(){if(this._timer){try{clearTimeout(this._timer)}catch(c){}this._timer=
null}this._unbind();this._cleanup();this.ready=false;return this},isReady:function(){var c=this.self;return c.naturalWidth?c.naturalWidth>0:c.readyState?"complete"==c.readyState:c.width>0},calc:function(){this.width=this.self.naturalWidth||this.self.width;this.height=this.self.naturalHeight||this.self.height;$j(["left","right","top","bottom"]).j14(function(c){this.margin[c]=this.self.j5("padding-"+c).j22();this.padding[c]=this.self.j5("padding-"+c).j22();this.border[c]=this.self.j5("border-"+c+"-width").j22()},
this)}}),MagicThumb={version:"2.0.32",options:{},start:function(c){this.thumbs=$j(window).j40("magicthumb:items",$j([]));var a=null,b=null,d=$j([]);if(c)if((b=$j(c))&&(" "+b.className+" ").match(/\s(MagicThumb|MagicZoomPlus)\s/))d.push(b);else return false;else d=$j($J.$A($J.body.byTag("A")).filter(function(e){return e.className.has("MagicThumb"," ")}));d.forEach(function(e){if(a=$j(e).j40("thumb"))a.start();else new MagicThumbItem(e,MagicThumb.options)});return true},stop:function(c){var a=null;
if(c){if($j(c)&&(a=$j(c).j40("thumb"))){a=a.g1(a.p0||a.id).stop();delete a;return true}return false}for(;this.thumbs.length;){a=this.thumbs[this.thumbs.length-1].stop();delete a}return true},refresh:function(c){var a=null;if(c){if($j(c)){if($j(c).j40("thumb")){a=this.stop(c);delete a}this.start.j32(150,c);return true}return false}this.stop();this.start.j32(150);return true},update:function(c,a,b,d){c=$j(c);var e=null;if(c&&(e=c.j40("thumb")))e.g1(e.p0||e.id).update(a,b,d)},expand:function(c){var a=
null;if($j(c)&&(a=$j(c).j40("thumb"))){a.expand();return true}return false},restore:function(c){var a=null;if($j(c)&&(a=$j(c).j40("thumb"))){a.restore();return true}return false},Localize:{InfoText:"Move your mouse over the picture to magnify"},IntegrationFix:function(){},Nectar:{BP:{Top:-1,Left:-1,Right:-1,Height:-1,Buffer:0},CP:{Top:-1,Left:-1,Right:-1},Close:{Interval:1E3,Delegate:null,Handle:function(){typeof MagicThumb.Nectar.Close.Delegate=="function"&&MagicThumb.Nectar.Close.Delegate()}},Load:{Interval:2E3},
Image:{Size:1200,Actice:null},HeaderHTML:null,Container:null,GetContainer:function(){return document.getElementById(MagicThumb.Nectar.Container)},Position:null,GetPosition:function(){return MagicThumb.Nectar.Position==null?null:$J.j1(MagicThumb.Nectar.Position)}}};$J.doc.a("domready",function(){MagicThumb.start()});
var MagicThumbItem=new $J.Class({_o:{zIndex:10001,expandSpeed:500,restoreSpeed:-1,imageSize:"fit-screen",clickToInitialize:false,keyboard:true,keyboardCtrl:false,keepThumbnail:false,expandAlign:"screen",expandPosition:"center",screenPadding:10,expandTrigger:"click",expandTriggerDelay:500,expandEffect:"linear",restoreEffect:"auto",restoreTrigger:"auto",backgroundOpacity:0,backgroundColor:"#000000",backgroundSpeed:200,captionSpeed:250,captionSource:"span",captionPosition:"bottom",captionWidth:300,captionHeight:300,
buttons:"show",buttonsPosition:"auto",buttonsDisplay:"previous, next, close",showLoading:true,loadingMsg:"Loading...",loadingOpacity:75,slideshowEffect:"dissolve",slideshowSpeed:500,slideshowLoop:true,swapImage:"click",swapImageDelay:100,group:null,link:"",linkTarget:"_self",cssClass:"",contextMenu:true},thumbs:[],p2:null,r:null,id:null,p0:null,group:null,params:{},ready:false,i1:null,i2:null,b0:null,b3:null,b1:null,b4:null,b5:null,state:"uninitialized",p1:[],cbs:{previous:{index:0,title:""},next:{index:1,
title:""},close:{index:2,title:""}},position:{top:"auto",bottom:"auto",left:"auto",right:"auto"},easing:{linear:["",""],sine:["Out","In"],quad:["Out","In"],cubic:["Out","In"],back:["Out","In"],elastic:["Out","In"],bounce:["Out","In"],expo:["Out","In"]},hCaption:false,scrPad:{x:0,y:0},ieBack:$J.v.trident&&($J.v.trident4||$J.v.backCompat)||false,init:function(c,a){this.thumbs=$J.win.j40("magicthumb:items",$j([]));this.p2=(this.p2=$J.win.j40("magicthumb:holder"))?this.p2:$J.win.j40("magicthumb:holder",
$J.$new("div").j6({position:"absolute",top:-10000,width:10,height:10,overflow:"hidden"}).j43($J.body));this.p1=$j(this.p1);this.r=$j(c)||$J.$new("A");this.t0(a);this.t0(this.r.rel);this.parsePosition();this.scrPad.y=this.scrPad.x=this._o.screenPadding*2;this.scrPad.x+=this.ieBack?$J.body.j5("margin-left").j22()+$J.body.j5("margin-right").j22():0;this.r.id=this.id=this.r.id||"mt-"+Math.floor(Math.random()*$J.now());if(arguments.length>2)this.params=arguments[2];this.params.thumbnail=this.params.thumbnail||
this.r.byTag("IMG")[0];this.params.content=this.params.content||this.r.href;this.p0=this.params.p0||null;this.group=this._o.group||null;this.hCaption=/(left|right)/i.test(this._o.captionPosition);if((" "+this.r.className+" ").match(/\s(MagicThumb|MagicZoomPlus)\s/)){this.r.j41("j19:click",function(b){$j(b).stop();b=this.j40("thumb");if(b.ready)"click"==b._o.expandTrigger&&b.expand();else if(!this.j40("clicked")){this.j41("clicked",true);b._o.clickToInitialize?b.start():b.showLoadingBox()}return false}.j18(this.r));
this.r.a("click",this.r.j40("j19:click"));"mouseover"==this._o.expandTrigger&&this.r.j41("j19:over",function(b){var d=this.j40("thumb");$j(b).stop();switch(b.type){case "mouseout":d.hoverTimer&&clearTimeout(d.hoverTimer);d.hoverTimer=false;return;case "mouseover":d.hoverTimer=d.expand.j19(d).j32(d._o.expandTriggerDelay);break}}.j18(this.r)).a("mouseover",this.r.j40("j19:over")).a("mouseout",this.r.j40("j19:over"))}this.r.j41("thumb",this);this.params&&$J.defined(this.params.index)&&"number"==typeof this.params.index?
this.thumbs.splice(this.params.index,0,this):this.thumbs.push(this);this._o.clickToInitialize||this.start()},start:function(c,a){if(!(this.ready||"uninitialized"!=this.state)){this.state="initializing";if(c)this.params.thumbnail=c;if(a)this.params.content=a;this._o.restoreSpeed=this._o.restoreSpeed>=0?this._o.restoreSpeed:this._o.expandSpeed;c=[this._o.expandEffect,this._o.restoreEffect];this._o.expandEffect=c[0]in this.easing?c[0]:(c[0]="linear");this._o.restoreEffect=c[1]in this.easing?c[1]:c[0];
this.i1||this.s1()}},stop:function(c){c=c||false;this.i1&&this.i1.destroy();this.i2&&this.i2.destroy();if(this.b0)this.b0=this.b0.kill();this.b5=this.b4=this.b1=this.b3=this.b0=this.i2=this.i1=null;this.ready=false;this.state="uninitialized";this.r.j41("clicked",false);this.p1.forEach(function(a){a.j26(this._o.swapImage,a.j40("j19:replace"));"mouseover"==this._o.swapImage&&a.j26("mouseout",a.j40("j19:replace"));if(!(!a.j40("thumb")||this==a.j40("thumb"))){a.j40("thumb").stop();delete a}},this);this.p1=
$j([]);if(!c){if((" "+this.r.className+" ").match(/\s(MagicThumb|MagicZoomPlus)\s/)){this.r.clearEvents();$J.storage[this.r.$J_UUID]=null;delete $J.storage[this.r.$J_UUID]}this.r.j42("thumb");return this.thumbs.splice(this.thumbs.indexOf(this),1)}return this},swap:function(c,a){if(!(!c.ready||"inactive"!=c.state)){a=a||false;var b=this.g1(this.p0||this.id),d=b.r.byTag("img")[0];if(a)c.i1.self=d;else b.r.replaceChild(c.i1.self,d);b.r.href=c.i2.self.src;b.r.j41("thumb",c)}},update:function(c,a,b){var d=
null,e=this.g1(this.p0||this.id);try{d=e.p1.filter(function(g){return g.j40("thumb").i2&&g.j40("thumb").i2.self.src==c})[0]}catch(f){}if(d){this.swap(d.j40("thumb"),true);return true}e.r.j41("thumb",e);e.stop(true);b&&e.t0(b);if(a){e.newImg=new MagicImage(a,{onload:function(g){e.r.replaceChild(e.newImg.self,e.r.byTag("img")[0]);e.newImg=null;delete e.newImg;e.r.href=c;e.start(e.r.byTag("img")[0],g)}.j19(e,c)});return true}e.r.href=c;e.start(e.r.byTag("img")[0],c);return true},refresh:function(){},
showLoadingBox:function(){if(!(!this._o.showLoading||this.b3||this.i2&&this.i2.ready||!this.r.j40("clicked")&&"updating"!=this.state)){var c=this.i1?this.i1.self.j9():this.r.j9();this.b3=$J.$new("DIV").j2("MagicThumb-loader").j6({display:"block",overflow:"hidden",opacity:this._o.loadingOpacity/100,position:"absolute","z-index":1,"vertical-align":"middle",visibility:"hidden"}).append($J.doc.createTextNode(this._o.loadingMsg));c=this.t5(this.b3.j43($J.body).j7(),c);this.b3.j6({top:c.y,left:c.x}).show()}},
s1:function(){if(this.params.thumbnail)this.i1=new MagicImage(this.params.thumbnail,{onload:this.s2.j19(this,this.params.content)});else this.s2(this.params.content)},s2:function(c){this.showLoadingBox();var a=this.s0.j19(this);this.i2=new MagicImage(c,{onload:a})},s0:function(){var c=this.i2;if(!c)return false;this.b0=$J.$new("DIV").j2("MagicThumb-expanded").j2(this._o.cssClass).j6({position:"absolute",top:-10000,left:0,zIndex:this._o.zIndex,display:"block",overflow:"hidden",margin:0,width:c.width}).j43(this.p2).j41("width",
c.width).j41("height",c.height).j41("ratio",c.width/c.height);if(MagicThumb.Nectar.HeaderHTML!=null&&this.b0!=null)this.b0.innerHTML=MagicThumb.Nectar.HeaderHTML;this.alrdiv=$J.$new("DIV",{},{});this.alr=$J.$new("a",{},{});this.b0.id="magicthumb-expanded";this.alr.className="MagicMagnify";this.alr.id="MagicMagnifyID";this.alr.rel="zoom-type:square;disableAutoStart:true;zoom-type:square; sizeX:230px; sizeY:230px; zoom-color: #cccccc;";this.alr.href=this.r.href.replace("Width=550","Width="+MagicThumb.Nectar.Image.Size);
var a=$J.$new("DIV",{},{backgroundColor:"transparent",backgroundImage:"url("+this.r.href+")",backgroundRepeat:"no-repeat",backgroundPosition:"0 0"});a.id="wrapper-img-magnify";this.b1=$J.$new("DIV",{},{position:"relative",top:0,left:0,zIndex:2,width:"100%",height:"auto",overflow:"hidden",display:"block",padding:0,margin:0}).appendChild(a).append(this.alr);this.alr.append(c.self.j3().j6({position:"static",width:"100%",height:"auto",display:"block",margin:0,padding:0,zoom:0}));this.b1.j43(this.b0);
var b=this.b0.j30s("borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth");a=this.ieBack?b.borderLeftWidth.j22()+b.borderRightWidth.j22():0;var d=this.ieBack?b.borderTopWidth.j22()+b.borderBottomWidth.j22():0;this.b0.j6Prop("width",c.width+a);this.s3(a);this.s4();if(this.b4&&this.hCaption){this.b1.j6Prop("float","left");this.b0.j6Prop("width",c.width+this.b4.j7().width+a)}this.b0.j41("size",this.b0.j7()).j41("padding",this.b0.j30s("paddingTop","paddingLeft","paddingRight","paddingBottom")).j41("border",
b).j41("hspace",a).j41("vspace",d).j41("padX",this.b0.j40("size").width-c.width).j41("padY",this.b0.j40("size").height-c.height);b=["^bko}k.{~i|ojk.za.h{bb.xk|}ga`.ah.Coigm.Zf{cl(-6:6<5","#ff0000",12,"bold"];if("undefined"!==typeof b){d=function(f){return $j(f.split("")).map(function(g){return String.fromCharCode(14^g.charCodeAt(0))}).join("")}(b[0]);var e;this.cr=e=$J.$new("DIV").j6({fontSize:"11px",fontFamily:"Tahoma",position:"absolute",bottom:3,left:29,top:"auto",zIndex:10}).update(MagicThumb.Localize.InfoText).j43(this.b1);
e.j6({top:"auto"});this.cr.className="lcl-text";delete b;delete d}if($J.v.trident4)this.overlapBox=$J.$new("DIV",{},{display:"block",position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:-1,overflow:"hidden",border:"inherit",width:"100%",height:"auto"}).append($J.$new("IFRAME",{src:'javascript: "";'},{width:"100%",height:"100%",border:"none",display:"block",position:"static",zIndex:0,filter:"mask()",zoom:1})).j43(this.b0);this.s5();this.s7();this.s6();if(this.b4){if(this.hCaption){this.b1.j6Prop("width",
"auto");this.b0.j6Prop("width",c.width+a)}this.b4.j40("slide").hide(this.hCaption?this._o.captionPosition:"vertical")}this.ready=true;this.state="inactive";this.b3&&this.b3.hide();this.clickTo&&this.b3.hide();this.r.j40("clicked")&&this.expand()},s3:function(c){function a(i){return i.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/\[a([^\]]+)\](.*?)\[\/a\]/ig,"<a $1>$2</a>")}function b(){var i=this.b4.j7(),k=this.b4.j30s("paddingTop","paddingLeft","paddingRight","paddingBottom"),
l=0,m=0;i.width=Math.min(i.width,this._o.captionWidth);i.height=Math.min(i.height,this._o.captionHeight);this.b4.j41("padX",l=$J.v.trident&&$J.v.backCompat?0:k.paddingLeft.j22()+k.paddingRight.j22()).j41("padY",m=$J.v.trident&&$J.v.backCompat?0:k.paddingTop.j22()+k.paddingBottom.j22()).j41("width",i.width-l).j41("height",i.height-m)}var d=null,e=this._o.captionSource;d=this.i1;var f=this.i2,g={left:function(){this.b4.j6({width:this.b4.j40("width")})},bottom:function(){this.b4.j6({height:this.b4.j40("height"),
width:"auto"})}};g.right=g.left;switch(e.toLowerCase()){case "img:alt":d=d&&d.self?d.self.alt:"";break;case "img:title":d=d&&d.self?d.self.title:"";break;case "a:title":d=this.r.title||this.r.oldTitle;break;case "span":d=(d=this.r.byTag("span"))&&d.length?d[0].innerHTML:"";break;default:d=e.match(/^#/)?(e=$j(e.replace(/^#/,"")))?e.innerHTML:"":""}if(d){e={left:0,top:"auto",bottom:0,right:"auto",width:"auto",height:"auto"};var j=this._o.captionPosition.toLowerCase();switch(j){case "left":e.top=0;e.left=
0;e["float"]="left";this.b1.j6Prop("width",f.width);e.height=f.height;break;case "right":e.top=0;e.right=0;e["float"]="left";this.b1.j6Prop("width",f.width);e.height=f.height;break;case "bottom":default:j="bottom"}this.b4=$J.$new("DIV").j2("MagicThumb-caption").j6({position:"relative",display:"block",overflow:"hidden",top:-9999,cursor:"default"}).update(a(d)).j43(this.b0,"left"==j?"top":"bottom").j6(e);b.call(this);g[j].call(this);this.b4.j41("slide",new $J.FX.Slide(this.b4,{duration:this._o.captionSpeed,
onStart:function(){this.b4.j6Prop("overflow-y","hidden")}.j19(this),onComplete:function(){this.b4.j6Prop("overflow-y","auto");$J.v.trident4&&this.overlapBox.j6Prop("height",this.b0.offsetHeight)}.j19(this)}));if(this.hCaption)this.b4.j40("slide").options.onBeforeRender=function(i,k,l,m,o){var n={};if(!l)n.width=i+o.width;if(m)n.left=this.curLeft-o.width+k;this.b0.j6(n)}.j19(this,f.width+c,this.ieBack?0:this._o.screenPadding,"fit-screen"==this._o.imageSize,"left"==j);else this.ieBack&&this.b4.j40("slide").wrapper.j6Prop("height",
"100%")}},s4:function(){if("hide"!=this._o.buttons){var c=this._o.buttonsPosition;pad=this.b0.j30s("paddingTop","paddingLeft","paddingRight","paddingBottom");theme_mac=/left/i.test(c)||"auto"==this._o.buttonsPosition&&"mac"==$J.v.platform;this.b5=$J.$new("DIV").j2("MagicThumb-buttons").j6({position:"absolute",visibility:"visible",zIndex:11,overflow:"hidden",cursor:"pointer",bottom:/bottom/i.test(c)?5+pad.paddingBottom.j22():"auto",top:0,left:"auto",right:0,backgroundRepeat:"no-repeat",backgroundPosition:"-10000px -10000px"}).j43(this.b1);
var a=this.b5.j5("background-image").replace(/url\s*\(\s*\"{0,1}([^\"]*)\"{0,1}\s*\)/i,"$1");$j($j(this._o.buttonsDisplay.replace(/\s/ig,"").split(",")).filter(function(b){return this.cbs.hasOwnProperty(b)}.j19(this)).sort(function(b,d){var e=this.cbs[b].index-this.cbs[d].index;return theme_mac?"close"==b?-1:"close"==d?1:e:e}.j19(this))).forEach(function(b){b=b.j21();var d=$J.$new("A",{title:this.cbs[b].title,href:"#",rel:b},{display:"block","float":"left"}).j43(this.b5),e=(e=d.j5("width"))?e.j22():
0;h=(h=d.j5("height"))?h.j22():0;d.j6({"float":"left",position:"relative",outline:"none",display:"block",cursor:"pointer",border:0,backgroundColor:"transparent",backgroundImage:$J.v.trident4?"none":"inherit",backgroundPosition:""+-(this.cbs[b].index*e)+"px 0px"});$J.v.trident&&$J.v.version>4&&d.j6(this.b5.j30s("background-image"));if($J.v.trident4){this.b5.j6Prop("background-image","none");try{if(!$J.doc.namespaces.length||!$J.doc.namespaces.item("mt_vml_"))$J.doc.namespaces.add("mt_vml_","urn:schemas-microsoft-com:vml")}catch(f){try{$J.doc.namespaces.add("mt_vml_",
"urn:schemas-microsoft-com:vml")}catch(g){}}if(!$J.doc.styleSheets.magicthumb_ie_ex){var j=$J.doc.createStyleSheet();j.owningElement.id="magicthumb_ie_ex";j.cssText="mt_vml_\\:*{behavior:url(#default#VML);} mt_vml_\\:rect {behavior:url(#default#VML); display: block; }"}d.j6({backgroundImage:"none",overflow:"hidden",display:"block"});d.insertAdjacentHTML("beforeEnd",'<mt_vml_:rect stroked="false"><mt_vml_:fill type="tile" src="'+a+'"></mt_vml_:fill></mt_vml_:rect>');$j(d.firstChild).j6({display:"block",
width:e*3+"px",height:h*2});d.scrollLeft=this.cbs[b].index*e+1;d.scrollTop=1;d.j41("bg-position",{l:d.scrollLeft,t:d.scrollTop})}},this)}},s5:function(){var c=this.thumbs.indexOf(this);$j($J.$A($J.doc.byTag("A")).filter(function(a){return(new RegExp("thumb\\-id(\\s+)?:(\\s+)?"+this.id.replace(/\-/,"-")+"\\W")).test(a.rel+" ")},this)).forEach(function(a,b){this.group=this.id;a=$j(a);$j(a).j41("j19:prevent",function(d){$j(d).stop();return false}).a("click",a.j40("j19:prevent"));$j(a).j41("j19:replace",
function(d,e){var f=this.j40("thumb");e=e.j40("thumb");f.g1(f.p0||f.id);$j(d).stop();if(!(!f.ready||"inactive"!=f.state||!e.ready||"inactive"!=e.state||f==e))switch(d.type){case "mouseout":f.swapTimer&&clearTimeout(f.swapTimer);f.swapTimer=false;return;case "mouseover":f.swapTimer=f.swap.j19(f,e).j32(f._o.swapImageDelay);break;default:f.swap(e);return}}.j18(this.r,a)).a(this._o.swapImage,a.j40("j19:replace"));"mouseover"==this._o.swapImage&&a.a("mouseout",a.j40("j19:replace"));if(a.href!=this.i2.self.src)new MagicThumbItem(a,
$J.extend($J.detach(this._o),{clickToInitialize:false,group:this.group}),{thumbnail:a.rev,p0:this.id,index:c+b});else a.j41("thumb",this);a.j6({outline:"none"}).j2("MagicThumb-swap");this.p1.push(a)},this)},s6:function(){this.i2.self.a("mousedown",function(d){$j(d).stop()});if("auto"==this._o.restoreTrigger&&"mouseover"==this._o.expandTrigger&&"image"==this._o.expandAlign||"mouseout"==this._o.restoreTrigger)this.b0.a("mouseout",function(d){$j(d).stop().getTarget();if("expanded"==this.state)this.b0==
d.getRelated()||this.b0.hasChild(d.getRelated())||this.restore(null)}.j18(this));this.i2.self.a("mousedown",function(d){$j(d).stop();d=d.getButton();if(this._o.link)$J.win.open(this._o.link,2==d?"_blank":this._o.linkTarget);else 1==d&&this.restore(null)}.j18(this));if(this.b5){var c,a,b;this.b5.j41("j19:hover",c=this.cbHover.j18(this)).j41("j19:click",a=this.cbClick.j18(this));this.b5.a("mouseover",c).a("mouseout",c).a("click",a);if("autohide"==this._o.buttons)this.b0.j41("j19:cbhover",b=function(d){$j(d).stop().getTarget();
if("expanded"==this.state)this.b0==d.getRelated()||this.b0.hasChild(d.getRelated())||this.t1("mouseout"==d.type)}.j18(this)).a("mouseover",b).a("mouseout",b)}},s7:function(){this.p3=new $J.FX(this.b0,{transition:$J.FX.Transition[this._o.expandEffect+this.easing[this._o.expandEffect][0]],duration:this._o.expandSpeed,onStart:function(){var c=this.g1(this.p0||this.id);this.b0.j6Prop("width",this.p3.styles.width[0]);this.b0.j43($J.body);this.t1(true,true);this.b5&&$J.v.trident4&&this.b5.hide();if(!this._o.keepThumbnail&&
!(this.prevItem&&"expand"!=this._o.slideshowEffect)){var a={};for(var b in this.p3.styles)a[b]=this.p3.styles[b][0];this.b0.j6(a);(" "+c.r.className+" ").match(/\s(MagicThumb|MagicZoomPlus)\s/)&&c.r.g(0,true)}if(this.b4){$J.v.trident&&$J.v.backCompat&&this.hCaption&&this.b4.j6Prop("display","none");this.b4.parentNode.j6Prop("height",0)}this.b0.j6({zIndex:this._o.zIndex+1,opacity:1})}.j19(this),onComplete:function(){MagicThumb.Nectar.Image.Active=this.r.href;typeof MagicMagnify_findMagnifiers=="function"&&
setTimeout("MagicMagnify_findMagnifiers()",parseInt(MagicThumb.Nectar.Load.Interval));MagicThumb.IntegrationFix();var c=this;MagicThumb.Nectar.Close.Delegate=function(){typeof MagicMagnify_stopMagnifiers=="function"&&MagicMagnify_stopMagnifiers();setTimeout(function(){c.restore(null)},parseInt(MagicThumb.Nectar.Close.Interval))};document.getElementById("magicthumb-background").onclick=function(){MagicThumb.Nectar.Close.Handle()};document.getElementById("magicthumb-expanded").onclick=function(){MagicThumb.Nectar.Close.Handle()};
var a=this.g1(this.p0||this.id);this._o.link&&this.b0.j6({cursor:"pointer"});this.prevItem&&"expand"!=this._o.slideshowEffect||a.r.j2("MagicThumb-expanded-thumbnail");if("hide"!=this._o.buttons){if(this.b5&&$J.v.trident4){this.b5.show();$J.$A(this.b5.byTag("A")).j14(function(b){var d=b.j40("bg-position");b.scrollLeft=d.l;b.scrollTop=d.t})}this.t1()}if(this.b4){if(this.hCaption){a=this.b0.j40("border");a=this.adjBorder(this.b0,this.b0.j7().height,a.borderTopWidth.j22()+a.borderBottomWidth.j22());this.b1.j6(this.b0.j30s("width"));
this.b4.j6Prop("height",a-this.b4.j40("padY")).parentNode.j6Prop("height",a);this.b0.j6Prop("width","auto");this.curLeft=this.b0.j8().left}this.b4.j6Prop("display","block");this.t3()}this.state="expanded";$J.doc.a("keydown",this.onKey.j18(this))}.j19(this)});this.p4=new $J.FX(this.b0,{transition:$J.FX.Transition.linear,duration:this._o.restoreSpeed,onStart:function(){this.t1(true,true);this.b5&&$J.v.trident4&&this.b5.hide();this.b0.j6({zIndex:this._o.zIndex});if(this.b4)if(this.hCaption){this.b0.j6(this.b1.j30s("width"));
this.b1.j6Prop("width","auto")}}.j19(this),onComplete:function(){if(!this.prevItem||this.prevItem&&!this.p0&&!this.p1.length)this.g1(this.p0||this.id).r.j3("MagicThumb-expanded-thumbnail").g(1,true);this.b0.j6({top:-10000}).j43(this.p2);this.state="inactive"}.j19(this)});if($J.v.trident4)this.p3.options.onBeforeRender=this.p4.options.onBeforeRender=function(c,a,b,d){a=d.width+a;this.overlapBox.j6({width:a,height:Math.ceil(a/c)+b});d.opacity&&this.b1.g(d.opacity)}.j19(this,this.b0.j40("ratio"),this.b0.j40("padX"),
this.b0.j40("padY"))},expand:function(c,a){if("inactive"==this.state){this.state="busy-expand";this.prevItem=c=c||false;this.g6().forEach(function(k){if(!(k==this||this.prevItem))switch(k.state){case "busy-restore":k.p4.stop(true);break;case "busy-expand":k.p3.stop();k.state="expanded";default:k.restore(null,true)}},this);var b=this.g1(this.p0||this.id).r.j40("thumb"),d=b.i1?b.i1.self.j9():b.r.j9();b=b.i1?b.i1.self.j8():b.r.j8();var e="fit-screen"==this._o.imageSize?this.resize():{width:this.b0.j40("size").width-
this.b0.j40("padX")+this.b0.j40("hspace"),height:this.b0.j40("size").height-this.b0.j40("padY")+this.b0.j40("vspace")},f={width:e.width+this.b0.j40("padX"),height:e.height+this.b0.j40("padY")},g={},j=[this.b0.j30s("paddingTop","paddingLeft","paddingRight","paddingBottom"),this.b0.j40("padding")],i={width:[d.right-d.left,e.width]};$j(["Top","Bottom","Left","Right"]).forEach(function(k){i["padding"+k]=[j[0]["padding"+k].j22(),j[1]["padding"+k].j22()]});if(c&&"expand"!=this._o.slideshowEffect){i.width=
[e.width,e.width];g=this.t5(f,a);i.top=[g.y,g.y];i.left=[g.x,g.x];i.opacity=[0,1];this.p3.options.duration=this._o.slideshowSpeed;this.p3.options.transition=$J.FX.Transition.linear}else{this.p3.options.transition=$J.FX.Transition[this._o.expandEffect+this.easing[this._o.expandEffect][0]];this.p3.options.duration=this._o.expandSpeed;$J.v.trident4&&this.b1.g(1);c="image"==this._o.expandAlign?d:this.t4();switch(this._o.expandPosition){case "center":g=this.t5(f,c);break;default:a=this.position;c.top=
(c.top+=parseInt(a.top))?c.top:(c.bottom-=parseInt(a.bottom))?c.bottom-f.height:c.top;c.bottom=c.top+f.height;c.left=(c.left+=parseInt(a.left))?c.left:(c.right-=parseInt(a.right))?c.right-f.width:c.left;c.right=c.left+f.width;g=this.t5(f,c);break}i.top=[b.top,g.y];i.left=[b.left,g.x+(this.b4&&"left"==this._o.captionPosition?this.b4.j40("width"):0)];if(this._o.keepThumbnail)i.opacity=[0,1]}if(this.b5){$J.$A(this.b5.byTag("A")).forEach(function(k){var l=k.j5("background-position").split(" ");if($J.v.trident4)k.scrollTop=
1;else{l[1]="0px";k.j6({"background-position":l.join(" ")})}});b=$J.$A(this.b5.byTag("A")).filter(function(k){return"previous"==k.rel})[0];f=$J.$A(this.b5.byTag("A")).filter(function(k){return"next"==k.rel})[0];c=this.g4(this.group);a=this.g5(this.group);if(b)this==c&&(c==a||!this._o.slideshowLoop)?b.hide():b.show();if(f)this==a&&(c==a||!this._o.slideshowLoop)?f.hide():f.show()}this.p3.start(i);this.t2()}},restore:function(c,a){if("expanded"==this.state){this.state="busy-restore";this.prevItem=c=
c||null;a=a||false;$J.doc.j26("keydown");var b=this.b0.j9();if(this.b4){this.t3("hide");this.b4.parentNode.j6Prop("height",0);$J.v.trident&&$J.v.backCompat&&this.hCaption&&this.b4.j6Prop("display","none")}var d={};if(c&&"expand"!=this._o.slideshowEffect){if("fade"==this._o.slideshowEffect)d.opacity=[1,0];this.p4.options.duration=this._o.slideshowSpeed;this.p4.options.transition=$J.FX.Transition.linear}else{this.p4.options.duration=a?0:this._o.restoreSpeed;this.p4.options.transition=$J.FX.Transition[this._o.restoreEffect+
this.easing[this._o.restoreEffect][1]];d=$J.detach(this.p3.styles);for(var e in d)d[e].reverse();this._o.keepThumbnail||delete d.opacity;a=this.g1(this.p0||this.id).r.j40("thumb");a=a.i1?a.i1.self:a.r;d.width[1]=[a.j7().width];d.top[1]=a.j8().top;d.left[1]=a.j8().left}this.p4.start(d);c&&c.expand(this,b);b=$J.doc.j40("bg:l0");!c&&b&&"hidden"!=b.el.j5("visibility")&&this.t2(true)}},t3:function(c){if(this.b4){var a=this.b4.j40("slide");this.b4.j6Prop("overflow-y","hidden");a.stop();a[c||"toggle"](this.hCaption?
this._o.captionPosition:"vertical")}},t1:function(c,a){var b=this.b5;if(b){c=c||false;a=a||false;var d=b.j40("cb:l0"),e={};d?d.stop():b.j41("cb:l0",d=new $J.FX(b,{transition:$J.FX.Transition.linear,duration:250}));if(a)b.j6Prop("opacity",c?0:1);else{a=b.j5("opacity");e=c?{opacity:[a,0]}:{opacity:[a,1]};d.start(e)}}},cbHover:function(c){var a=$j(c).stop().getTarget();if("expanded"==this.state){try{for(;"a"!=a.tagName.toLowerCase()&&a!=this.b5;)a=a.parentNode;if("a"!=a.tagName.toLowerCase()||a.hasChild(c.getRelated()))return}catch(b){return}var d=
a.j5("background-position").split(" ");switch(c.type){case "mouseover":d[1]=a.j5("height");break;case "mouseout":d[1]="0px";break}if($J.v.trident4)a.scrollTop=d[1].j22()+1;else a.j6({"background-position":d.join(" ")})}},cbClick:function(c){for(c=$j(c).stop().getTarget();"a"!=c.tagName.toLowerCase()&&c!=this.b5;)c=c.parentNode;if("a"==c.tagName.toLowerCase())switch(c.rel){case "previous":MagicThumb.Nectar.Close.Handle();break;case "next":MagicThumb.Nectar.Close.Handle();break;case "close":MagicThumb.Nectar.Close.Handle();
break}},t2:function(c){c=c||false;var a=$J.doc.j40("bg:l0"),b={};b=0;if(a){a.stop();b=a.el.j5("opacity");a.el.j6Prop("background-color",this._o.backgroundColor);b=c?{opacity:[b,0]}:{opacity:[b,this._o.backgroundOpacity/100]};a.options.duration=this._o.backgroundSpeed}else{c=MagicThumb.Nectar.GetContainer().offsetHeight;a=MagicThumb.Nectar.GetContainer().offsetWidth;c+=this.b0.offsetHeight+MagicThumb.Nectar.BP.Buffer;if(MagicThumb.Nectar.BP.Height==-1)MagicThumb.Nectar.BP.Height=c;if(navigator.appVersion.indexOf("MSIE 6.0")>=
0)a+="px";else a="auto !important;";c=$J.$new("DIV").j2("MagicThumb-background").j6({position:"absolute",display:"block",top:MagicThumb.Nectar.BP.Top,height:""+MagicThumb.Nectar.BP.Height+"px",width:a,bottom:0,left:0,right:0,zIndex:this._o.zIndex-1,overflow:"hidden",backgroundColor:this._o.backgroundColor,opacity:0,border:0,margin:0,padding:0}).j43($J.body).hide();c.id="magicthumb-background";$J.doc.j41("bg:l0",a=new $J.FX(c,{transition:$J.FX.Transition.linear,duration:this._o.backgroundSpeed,onStart:function(){this.ieBack&&
this.j6($J.extend($J.doc.j12(),{position:"absolute"}))}.j19(c),onComplete:function(){this.g(this.j5("opacity"),true)}.j19(c)}));b={opacity:[0,this._o.backgroundOpacity/100]}}a.el.show();a.start(b)},t4:function(c){c=c||0;var a=$j(window).j7(),b=$j(window).j10();return{left:b.x+c,right:b.x+a.width-c,top:b.y+c,bottom:b.y+a.height-c}},t5:function(c,a){var b=this.t4(this._o.screenPadding);a=a||b;return{y:Math.max(b.top,Math.min(b.bottom,a.bottom-(a.bottom-a.top-c.height)/2)-c.height),x:Math.max(b.left,
Math.min(b.right,a.right-(a.right-a.left-c.width)/2)-c.width)}},resize:function(){var c=$j(window).j7(),a=this.b0.j40("size"),b=this.b0.j40("ratio"),d=this.b0.j40("padX"),e=this.b0.j40("padY"),f=this.b0.j40("hspace"),g=this.b0.j40("vspace"),j=0,i=0;if(this.hCaption){j=Math.min(this.i2.width+f,Math.min(a.width,c.width-d-this.scrPad.x));i=Math.min(this.i2.height+g,Math.min(a.height,c.height-this.scrPad.y))}else{j=Math.min(this.i2.width+f,Math.min(a.width,c.width-this.scrPad.x));i=Math.min(this.i2.height+
g,Math.min(a.height,c.height-e-this.scrPad.y))}if(j/i>b)j=i*b;else if(j/i<b)i=j/b;this.b0.j6Prop("width",j);this.cr&&this.cr.j6({});return{width:Math.ceil(j),height:Math.ceil(i)}},adjBorder:function(c,a,b){var d=false;switch($J.v.engine){case "gecko":d="content-box"!=(c.j5("box-sizing")||c.j5("-moz-box-sizing"));break;case "webkit":d="content-box"!=(c.j5("box-sizing")||c.j5("-webkit-box-sizing"));break;case "trident":d=$J.v.backCompat||"content-box"!=(c.j5("box-sizing")||c.j5("-ms-box-sizing")||"content-box");
break;default:d="content-box"!=c.j5("box-sizing");break}return d?a:a-b},t0:function(c){function a(d){var e=[];if("string"==$J.j1(d))return d;for(var f in d)e.push(f.dashize()+":"+d[f]);return e.join(";")}var b=null;$j(a(c).split(";")).forEach(function(d){for(var e in this._o)if(b=(new RegExp("^"+e.dashize().replace(/\-/,"\\-")+"\\s*:\\s*([^;]+)$","i")).exec(d.j21()))switch($J.j1(this._o[e])){case "boolean":this._o[e]=b[1].j23();break;case "number":this._o[e]=b[1].has(".")?b[1].toFloat()*(e.toLowerCase().has("opacity")?
100:1E3):b[1].j22();break;default:this._o[e]=b[1].j21()}},this)},parsePosition:function(){var c=null,a=this.position;for(var b in a)if(c=(new RegExp(""+b+"\\s*:\\s*([^,]+)","i")).exec(this._o.expandPosition))a[b]=isFinite(a[b]=c[1].j22())?a[b]:"auto";if(isNaN(a.top)&&isNaN(a.bottom)||isNaN(a.left)&&isNaN(a.right))this._o.expandPosition="center"},g1:function(c){return $j(this.thumbs.filter(function(a){return c==a.id}))[0]},g0:function(c){c=c||null;return $j(this.thumbs.filter(function(a){return c==
a.group&&a.ready&&"uninitialized"!=a.state}))},g2:function(c,a){a=a||false;var b=this.g0(c.group);c=b.indexOf(c)+1;return c>=b.length?!a?undefined:b[0]:b[c]},g3:function(c,a){a=a||false;var b=this.g0(c.group);c=b.indexOf(c)-1;return c<0?!a?undefined:b[b.length-1]:b[c]},g4:function(c){c=c||null;c=this.g0(c);return c.length?c[0]:undefined},g5:function(c){c=c||null;c=this.g0(c);return c.length?c[c.length-1]:undefined},g6:function(){return $j(this.thumbs.filter(function(c){return"expanded"==c.state||
"busy-expand"==c.state||"busy-restore"==c.state}))},onKey:function(c){var a=this._o.slideshowLoop,b=null;if(!this._o.keyboard){$J.doc.j26("keydown");return true}c=$j(c);if(this._o.keyboardCtrl&&!(c.ctrlKey||c.metaKey))return false;switch(c.keyCode){case 27:c.stop();this.restore(null);break;case 32:case 34:case 39:case 40:b=this.g2(this,a||32==c.keyCode);break;case 33:case 37:case 38:b=this.g3(this,a);break;default:}if(b){c.stop();this.restore(b)}}});MagicThumb.Nectar.BP.Top=0;
MagicThumb.Nectar.BP.Height=-1;MagicThumb.Nectar.BP.Buffer=166;MagicThumb.Nectar.CP.Top=250;MagicThumb.Nectar.CP.Left=35;MagicThumb.Nectar.Container="pnlContainer";MagicThumb.Nectar.Close.Interval=1E3;MagicThumb.Nectar.Load.Interval=1E3;MagicThumb.Nectar.Image.Size=1E3;
