var Prototype={Version:"1.5.1.1",Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:(document.createElement("div").__proto__!==document.createElement("form").__proto__)},ScriptFragment:"<script[^>]*>([\\S\\s]*?)</script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(a,c){for(var b in c){a[b]=c[b]}return a};Object.extend(Object,{inspect:function(b){try{if(b===undefined){return"undefined"}if(b===null){return"null"}return b.inspect?b.inspect():b.toString()}catch(a){if(a instanceof RangeError){return"..."}throw a}},toJSON:function(a){var d=typeof a;switch(d){case"undefined":case"function":case"unknown":return;case"boolean":return a.toString()}if(a===null){return"null"}if(a.toJSON){return a.toJSON()}if(a.ownerDocument===document){return}var c=[];for(var b in a){var e=Object.toJSON(a[b]);if(e!==undefined){c.push(b.toJSON()+": "+e)}}return"{"+c.join(", ")+"}"},keys:function(b){var a=[];for(var c in b){a.push(c)}return a},values:function(a){var c=[];for(var b in a){c.push(a[b])}return c},clone:function(a){return Object.extend({},a)}});Function.prototype.bind=function(){var a=this,b=$A(arguments),c=b.shift();return function(){return a.apply(c,b.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(c){var a=this,b=$A(arguments),c=b.shift();return function(d){return a.apply(c,[d||window.event].concat(b))}};Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(a){$R(0,this,true).each(a);return this},toPaddedString:function(a,b){var c=this.toString(b||10);return"0".times(a-c.length)+c},toJSON:function(){return isFinite(this)?this.toString():"null"}});Date.prototype.toJSON=function(){return'"'+this.getFullYear()+"-"+(this.getMonth()+1).toPaddedString(2)+"-"+this.getDate().toPaddedString(2)+"T"+this.getHours().toPaddedString(2)+":"+this.getMinutes().toPaddedString(2)+":"+this.getSeconds().toPaddedString(2)+'"'};var Try={these:function(){var f;for(var b=0,d=arguments.length;b<d;b++){var c=arguments[b];try{f=c();break}catch(a){}}return f}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(a,b){this.callback=a;this.frequency=b;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},stop:function(){if(!this.timer){return}clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback(this)}finally{this.currentlyExecuting=false}}}};Object.extend(String,{interpret:function(a){return a==null?"":String(a)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(b,c){var d="",e=this,a;c=arguments.callee.prepareReplacement(c);while(e.length>0){if(a=e.match(b)){d+=e.slice(0,a.index);d+=String.interpret(c(a));e=e.slice(a.index+a[0].length)}else{d+=e,e=""}}return d},sub:function(b,c,a){c=this.gsub.prepareReplacement(c);a=a===undefined?1:a;return this.gsub(b,function(d){if(--a<0){return d[0]}return c(d)})},scan:function(b,a){this.gsub(b,a);return this},truncate:function(a,b){a=a||30;b=b===undefined?"...":b;return this.length>a?this.slice(0,a-b.length)+b:this},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var a=new RegExp(Prototype.ScriptFragment,"img");var b=new RegExp(Prototype.ScriptFragment,"im");return(this.match(a)||[]).map(function(c){return(c.match(b)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var a=arguments.callee;a.text.data=this;return a.div.innerHTML},unescapeHTML:function(){var a=document.createElement("div");a.innerHTML=this.stripTags();return a.childNodes[0]?(a.childNodes.length>1?$A(a.childNodes).inject("",function(b,c){return b+c.nodeValue}):a.childNodes[0].nodeValue):""},toQueryParams:function(b){var a=this.strip().match(/([^?#]*)(#.*)?$/);if(!a){return{}}return a[1].split(b||"&").inject({},function(c,e){if((e=e.split("="))[0]){var d=decodeURIComponent(e.shift());var f=e.length>1?e.join("="):e[0];if(f!=undefined){f=decodeURIComponent(f)}if(d in c){if(c[d].constructor!=Array){c[d]=[c[d]]}c[d].push(f)}else{c[d]=f}}return c})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(a){var c="";for(var b=0;b<a;b++){c+=this}return c},camelize:function(){var d=this.split("-"),c=d.length;if(c==1){return d[0]}var a=this.charAt(0)=="-"?d[0].charAt(0).toUpperCase()+d[0].substring(1):d[0];for(var b=1;b<c;b++){a+=d[b].charAt(0).toUpperCase()+d[b].substring(1)}return a},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(b){var a=this.gsub(/[\x00-\x1f\\]/,function(d){var c=String.specialChar[d[0]];return c?c:"\\u00"+d[0].charCodeAt().toPaddedString(2,16)});if(b){return'"'+a.replace(/"/g,'\\"')+'"'}return"'"+a.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(a){return this.sub(a||Prototype.JSONFilter,"#{1}")},isJSON:function(){var a=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(a)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(a){return this.indexOf(a)>-1},startsWith:function(a){return this.indexOf(a)===0},endsWith:function(b){var a=this.length-b.length;return a>=0&&this.lastIndexOf(b)===a},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(a){if(typeof a=="function"){return a}var b=new Template(a);return function(c){return b.evaluate(c)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});with(String.prototype.escapeHTML){div.appendChild(text)}var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(b,a){this.template=b.toString();this.pattern=a||Template.Pattern},evaluate:function(a){return this.template.gsub(this.pattern,function(c){var b=c[1];if(b=="\\"){return c[2]}return b+String.interpret(a[c[3]])})}};var $break={},$continue=new Error('"throw $continue" is deprecated, use "return" instead');var Enumerable={each:function(c){var b=0;try{this._each(function(d){c(d,b++)})}catch(a){if(a!=$break){throw a}}return this},eachSlice:function(d,c){var b=-d,e=[],a=this.toArray();while((b+=d)<a.length){e.push(a.slice(b,b+d))}return e.map(c)},all:function(a){var b=true;this.each(function(d,c){b=b&&!!(a||Prototype.K)(d,c);if(!b){throw $break}});return b},any:function(a){var b=false;this.each(function(d,c){if(b=!!(a||Prototype.K)(d,c)){throw $break}});return b},collect:function(a){var b=[];this.each(function(d,c){b.push((a||Prototype.K)(d,c))});return b},detect:function(a){var b;this.each(function(d,c){if(a(d,c)){b=d;throw $break}});return b},findAll:function(a){var b=[];this.each(function(d,c){if(a(d,c)){b.push(d)}});return b},grep:function(b,a){var c=[];this.each(function(f,d){var e=f.toString();if(e.match(b)){c.push((a||Prototype.K)(f,d))}});return c},include:function(b){var a=false;this.each(function(c){if(c==b){a=true;throw $break}});return a},inGroupsOf:function(b,a){a=a===undefined?null:a;return this.eachSlice(b,function(c){while(c.length<b){c.push(a)}return c})},inject:function(b,a){this.each(function(d,c){b=a(b,d,c)});return b},invoke:function(b){var a=$A(arguments).slice(1);return this.map(function(c){return c[b].apply(c,a)})},max:function(a){var b;this.each(function(d,c){d=(a||Prototype.K)(d,c);if(b==undefined||d>=b){b=d}});return b},min:function(a){var b;this.each(function(d,c){d=(a||Prototype.K)(d,c);if(b==undefined||d<b){b=d}});return b},partition:function(b){var c=[],a=[];this.each(function(e,d){((b||Prototype.K)(e,d)?c:a).push(e)});return[c,a]},pluck:function(a){var b=[];this.each(function(d,c){b.push(d[a])});return b},reject:function(a){var b=[];this.each(function(d,c){if(!a(d,c)){b.push(d)}});return b},sortBy:function(a){return this.map(function(c,b){return{value:c,criteria:a(c,b)}}).sort(function(e,f){var c=e.criteria,d=f.criteria;return c<d?-1:c>d?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var c=Prototype.K,a=$A(arguments);if(typeof a.last()=="function"){c=a.pop()}var b=[this].concat(a).map($A);return this.map(function(e,d){return c(b.pluck(d))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(b){if(!b){return[]}if(b.toArray){return b.toArray()}else{var d=[];for(var a=0,c=b.length;a<c;a++){d.push(b[a])}return d}};if(Prototype.Browser.WebKit){$A=Array.from=function(b){if(!b){return[]}if(!(typeof b=="function"&&b=="[object NodeList]")&&b.toArray){return b.toArray()}else{var d=[];for(var a=0,c=b.length;a<c;a++){d.push(b[a])}return d}}}Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(b){for(var a=0,c=this.length;a<c;a++){b(this[a])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(a){return a!=null})},flatten:function(){return this.inject([],function(a,b){return a.concat(b&&b.constructor==Array?b.flatten():[b])})},without:function(){var a=$A(arguments);return this.select(function(b){return !a.include(b)})},indexOf:function(c){for(var a=0,b=this.length;a<b;a++){if(this[a]==c){return a}}return -1},reverse:function(a){return(a!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(a){return this.inject([],function(b,d,c){if(0==c||(a?b.last()!=d:!b.include(d))){b.push(d)}return b})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var a=[];this.each(function(b){var c=Object.toJSON(b);if(c!==undefined){a.push(c)}});return"["+a.join(", ")+"]"}});Array.prototype.toArray=Array.prototype.clone;function $w(a){a=a.strip();return a?a.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var a=[];for(var c=0,e=this.length;c<e;c++){a.push(this[c])}for(var c=0,e=arguments.length;c<e;c++){if(arguments[c].constructor==Array){for(var d=0,b=arguments[c].length;d<b;d++){a.push(arguments[c][d])}}else{a.push(arguments[c])}}return a}}var Hash=function(a){if(a instanceof Hash){this.merge(a)}else{Object.extend(this,a||{})}};Object.extend(Hash,{toQueryString:function(a){var b=[];b.add=arguments.callee.addPair;this.prototype._each.call(a,function(c){if(!c.key){return}var d=c.value;if(d&&typeof d=="object"){if(d.constructor==Array){d.each(function(e){b.add(c.key,e)})}return}b.add(c.key,d)});return b.join("&")},toJSON:function(a){var b=[];this.prototype._each.call(a,function(c){var d=Object.toJSON(c.value);if(d!==undefined){b.push(c.key.toJSON()+": "+d)}});return"{"+b.join(", ")+"}"}});Hash.toQueryString.addPair=function(a,c,b){a=encodeURIComponent(a);if(c===undefined){this.push(a)}else{this.push(a+"="+(c==null?"":encodeURIComponent(c)))}};Object.extend(Hash.prototype,Enumerable);Object.extend(Hash.prototype,{_each:function(a){for(var b in this){var d=this[b];if(d&&d==Hash.prototype[b]){continue}var c=[b,d];c.key=b;c.value=d;a(c)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(a){return $H(a).inject(this,function(b,c){b[c.key]=c.value;return b})},remove:function(){var c;for(var a=0,b=arguments.length;a<b;a++){var d=this[arguments[a]];if(d!==undefined){if(c===undefined){c=d}else{if(c.constructor!=Array){c=[c]}c.push(d)}}delete this[arguments[a]]}return c},toQueryString:function(){return Hash.toQueryString(this)},inspect:function(){return"#<Hash:{"+this.map(function(a){return a.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Hash.toJSON(this)}});function $H(a){if(a instanceof Hash){return a}return new Hash(a)}if(function(){var a=0,c=function(d){this.key=d};c.prototype.key="foo";for(var b in new c("bar")){a++}return a>1}()){Hash.prototype._each=function(b){var a=[];for(var c in this){var e=this[c];if((e&&e==Hash.prototype[c])||a.include(c)){continue}a.push(c);var d=[c,e];d.key=c;d.value=e;b(d)}}}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(c,a,b){this.start=c;this.end=a;this.exclusive=b},_each:function(a){var b=this.start;while(this.include(b)){a(b);b=b.succ()}},include:function(a){if(a<this.start){return false}if(this.exclusive){return a<this.end}return a<=this.end}});var $R=function(c,a,b){return new ObjectRange(c,a,b)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(a){this.responders._each(a)},register:function(a){if(!this.include(a)){this.responders.push(a)}},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(a,c,d,b){this.each(function(g){if(typeof g[a]=="function"){try{g[a].apply(g,[c,d,b])}catch(f){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(a){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};Object.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(typeof this.options.parameters=="string"){this.options.parameters=this.options.parameters.toQueryParams()}}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(b,a){this.transport=Ajax.getTransport();this.setOptions(a);this.request(b)},request:function(c){this.url=c;this.method=this.options.method;var b=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){b._method=this.method;this.method="post"}this.parameters=b;if(b=Hash.toQueryString(b)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+b}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){b+="&_="}}}try{if(this.options.onCreate){this.options.onCreate(this.transport)}Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){setTimeout(function(){this.respondToReadyState(1)}.bind(this),10)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||b):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(a){this.dispatchException(a)}},onStateChange:function(){var a=this.transport.readyState;if(a>1&&!((a==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var b={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){b["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){b.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var a=this.options.requestHeaders;if(typeof a.push=="function"){for(var c=0,d=a.length;c<d;c+=2){b[a[c]]=a[c+1]}}else{$H(a).each(function(f){b[f.key]=f.value})}}for(var e in b){this.transport.setRequestHeader(e,b[e])}},success:function(){return !this.transport.status||(this.transport.status>=200&&this.transport.status<300)},respondToReadyState:function(d){var f=Ajax.Request.Events[d];var g=this.transport,c=this.evalJSON();if(f=="Complete"){try{this._complete=true;(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(g,c)}catch(b){this.dispatchException(b)}var a=this.getHeader("Content-type");if(a&&a.strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){this.evalResponse()}}try{(this.options["on"+f]||Prototype.emptyFunction)(g,c);Ajax.Responders.dispatch("on"+f,this,g,c)}catch(b){this.dispatchException(b)}if(f=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},getHeader:function(b){try{return this.transport.getResponseHeader(b)}catch(a){return null}},evalJSON:function(){try{var b=this.getHeader("X-JSON");return b?b.evalJSON():null}catch(a){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(a,d,c){this.container={success:(a.success||a),failure:(a.failure||(a.success?null:a))};this.transport=Ajax.getTransport();this.setOptions(c);var b=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(f,e){this.updateContent();b(f,e)}).bind(this);this.request(d)},updateContent:function(){var a=this.container[this.success()?"success":"failure"];var b=this.transport.responseText;if(!this.options.evalScripts){b=b.stripScripts()}if(a=$(a)){if(this.options.insertion){new this.options.insertion(a,b)}else{a.update(b)}}if(this.success()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(a,c,b){this.setOptions(b);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=a;this.url=c;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(a){if(this.options.decay){this.decay=(a.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=a.responseText}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(a){if(arguments.length>1){for(var c=0,b=[],d=arguments.length;c<d;c++){b.push($(arguments[c]))}return b}if(typeof a=="string"){a=document.getElementById(a)}return Element.extend(a)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(a,d){var f=[];var e=document.evaluate(a,$(d)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=0,c=e.snapshotLength;b<c;b++){f.push(e.snapshotItem(b))}return f};document.getElementsByClassName=function(a,b){var c=".//*[contains(concat(' ', @class, ' '), ' "+a+" ')]";return document._getElementsByXPath(c,b)}}else{document.getElementsByClassName=function(c,h){var b=($(h)||document.body).getElementsByTagName("*");var e=[],a,j=new RegExp("(^|\\s)"+c+"(\\s|$)");for(var f=0,g=b.length;f<g;f++){a=b[f];var d=a.className;if(d.length==0){continue}if(d==c||d.match(j)){e.push(Element.extend(a))}}return e}}if(!window.Element){var Element={}}Element.extend=function(b){var c=Prototype.BrowserFeatures;if(!b||!b.tagName||b.nodeType==3||b._extended||c.SpecificElementExtensions||b==window){return b}var d={},g=b.tagName,a=Element.extend.cache,f=Element.Methods.ByTag;if(!c.ElementExtensions){Object.extend(d,Element.Methods),Object.extend(d,Element.Methods.Simulated)}if(f[g]){Object.extend(d,f[g])}for(var e in d){var h=d[e];if(typeof h=="function"&&!(e in b)){b[e]=a.findOrStore(h)}}b._extended=Prototype.emptyFunction;return b};Element.extend.cache={findOrStore:function(a){return this[a]=this[a]||function(){return a.apply(null,[this].concat($A(arguments)))}}};Element.Methods={visible:function(a){return $(a).style.display!="none"},toggle:function(a){a=$(a);Element[Element.visible(a)?"hide":"show"](a);return a},hide:function(a){$(a).style.display="none";return a},show:function(a){$(a).style.display="";return a},remove:function(a){a=$(a);a.parentNode.removeChild(a);return a},update:function(a,b){b=typeof b=="undefined"?"":b.toString();$(a).innerHTML=b.stripScripts();setTimeout(function(){b.evalScripts()},10);return a},replace:function(a,b){a=$(a);b=typeof b=="undefined"?"":b.toString();if(a.outerHTML){a.outerHTML=b.stripScripts()}else{var c=a.ownerDocument.createRange();c.selectNodeContents(a);a.parentNode.replaceChild(c.createContextualFragment(b.stripScripts()),a)}setTimeout(function(){b.evalScripts()},10);return a},inspect:function(a){a=$(a);var b="<"+a.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(d){var e=d.first(),c=d.last();var f=(a[e]||"").toString();if(f){b+=" "+c+"="+f.inspect(true)}});return b+">"},recursivelyCollect:function(a,c){a=$(a);var b=[];while(a=a[c]){if(a.nodeType==1){b.push(Element.extend(a))}}return b},ancestors:function(a){return $(a).recursivelyCollect("parentNode")},descendants:function(a){return $A($(a).getElementsByTagName("*")).each(Element.extend)},firstDescendant:function(a){a=$(a).firstChild;while(a&&a.nodeType!=1){a=a.nextSibling}return $(a)},immediateDescendants:function(a){if(!(a=$(a).firstChild)){return[]}while(a&&a.nodeType!=1){a=a.nextSibling}if(a){return[a].concat($(a).nextSiblings())}return[]},previousSiblings:function(a){return $(a).recursivelyCollect("previousSibling")},nextSiblings:function(a){return $(a).recursivelyCollect("nextSibling")},siblings:function(a){a=$(a);return a.previousSiblings().reverse().concat(a.nextSiblings())},match:function(a,b){if(typeof b=="string"){b=new Selector(b)}return b.match($(a))},up:function(b,c,d){b=$(b);if(arguments.length==1){return $(b.parentNode)}var a=b.ancestors();return c?Selector.findElement(a,c,d):a[d||0]},down:function(b,c,d){b=$(b);if(arguments.length==1){return b.firstDescendant()}var a=b.descendants();return c?Selector.findElement(a,c,d):a[d||0]},previous:function(a,b,c){a=$(a);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(a))}var d=a.previousSiblings();return b?Selector.findElement(d,b,c):d[c||0]},next:function(a,b,c){a=$(a);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(a))}var d=a.nextSiblings();return b?Selector.findElement(d,b,c):d[c||0]},getElementsBySelector:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b,a)},getElementsByClassName:function(b,a){return document.getElementsByClassName(a,b)},readAttribute:function(b,c){b=$(b);if(Prototype.Browser.IE){if(!b.attributes){return null}var d=Element._attributeTranslations;if(d.values[c]){return d.values[c](b,c)}if(d.names[c]){c=d.names[c]}var a=b.attributes[c];return a?a.nodeValue:null}return b.getAttribute(c)},getHeight:function(a){return $(a).getDimensions().height},getWidth:function(a){return $(a).getDimensions().width},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(b,a){if(!(b=$(b))){return}var c=b.className;if(c.length==0){return false}if(c==a||c.match(new RegExp("(^|\\s)"+a+"(\\s|$)"))){return true}return false},addClassName:function(b,a){if(!(b=$(b))){return}Element.classNames(b).add(a);return b},removeClassName:function(b,a){if(!(b=$(b))){return}Element.classNames(b).remove(a);return b},toggleClassName:function(b,a){if(!(b=$(b))){return}Element.classNames(b)[b.hasClassName(a)?"remove":"add"](a);return b},observe:function(){Event.observe.apply(Event,arguments);return $A(arguments).first()},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first()},cleanWhitespace:function(a){a=$(a);var c=a.firstChild;while(c){var b=c.nextSibling;if(c.nodeType==3&&!/\S/.test(c.nodeValue)){a.removeChild(c)}c=b}return a},empty:function(a){return $(a).innerHTML.blank()},descendantOf:function(b,a){b=$(b),a=$(a);while(b=b.parentNode){if(b==a){return true}}return false},scrollTo:function(a){a=$(a);var b=Position.cumulativeOffset(a);window.scrollTo(b[0],b[1]);return a},getStyle:function(b,c){b=$(b);c=c=="float"?"cssFloat":c.camelize();var d=b.style[c];if(!d){var a=document.defaultView.getComputedStyle(b,null);d=a?a[c]:null}if(c=="opacity"){return d?parseFloat(d):1}return d=="auto"?null:d},getOpacity:function(a){return $(a).getStyle("opacity")},setStyle:function(b,e,a){b=$(b);var c=b.style;for(var d in e){if(d=="opacity"){b.setOpacity(e[d])}else{c[(d=="float"||d=="cssFloat")?(c.styleFloat===undefined?"cssFloat":"styleFloat"):(a?d:d.camelize())]=e[d]}}return b},setOpacity:function(a,b){a=$(a);a.style.opacity=(b==1||b==="")?"":(b<1e-05)?0:b;return a},getDimensions:function(b){b=$(b);var a=$(b).getStyle("display");if(a!="none"&&a!=null){return{width:b.offsetWidth,height:b.offsetHeight}}var c=b.style;var g=c.visibility;var f=c.position;var d=c.display;c.visibility="hidden";c.position="absolute";c.display="block";var h=b.clientWidth;var e=b.clientHeight;c.display=d;c.position=f;c.visibility=g;return{width:h,height:e}},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,"position");if(b=="static"||!b){a._madePositioned=true;a.style.position="relative";if(window.opera){a.style.top=0;a.style.left=0}}return a},undoPositioned:function(a){a=$(a);if(a._madePositioned){a._madePositioned=undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=""}return a},makeClipping:function(a){a=$(a);if(a._overflow){return a}a._overflow=a.style.overflow||"auto";if((Element.getStyle(a,"overflow")||"visible")!="hidden"){a.style.overflow="hidden"}return a},undoClipping:function(a){a=$(a);if(!a._overflow){return a}a.style.overflow=a._overflow=="auto"?"":a._overflow;a._overflow=null;return a}};Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf,childElements:Element.Methods.immediateDescendants});if(Prototype.Browser.Opera){Element.Methods._getStyle=Element.Methods.getStyle;Element.Methods.getStyle=function(a,b){switch(b){case"left":case"top":case"right":case"bottom":if(Element._getStyle(a,"position")=="static"){return null}default:return Element._getStyle(a,b)}}}else{if(Prototype.Browser.IE){Element.Methods.getStyle=function(a,b){a=$(a);b=(b=="float"||b=="cssFloat")?"styleFloat":b.camelize();var c=a.style[b];if(!c&&a.currentStyle){c=a.currentStyle[b]}if(b=="opacity"){if(c=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(c[1]){return parseFloat(c[1])/100}}return 1}if(c=="auto"){if((b=="width"||b=="height")&&(a.getStyle("display")!="none")){return a["offset"+b.capitalize()]+"px"}return null}return c};Element.Methods.setOpacity=function(a,d){a=$(a);var b=a.getStyle("filter"),c=a.style;if(d==1||d===""){c.filter=b.replace(/alpha\([^\)]*\)/gi,"");return a}else{if(d<1e-05){d=0}}c.filter=b.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+(d*100)+")";return a};Element.Methods.update=function(b,c){b=$(b);c=typeof c=="undefined"?"":c.toString();var d=b.tagName.toUpperCase();if(["THEAD","TBODY","TR","TD"].include(d)){var a=document.createElement("div");switch(d){case"THEAD":case"TBODY":a.innerHTML="<table><tbody>"+c.stripScripts()+"</tbody></table>";depth=2;break;case"TR":a.innerHTML="<table><tbody><tr>"+c.stripScripts()+"</tr></tbody></table>";depth=3;break;case"TD":a.innerHTML="<table><tbody><tr><td>"+c.stripScripts()+"</td></tr></tbody></table>";depth=4}$A(b.childNodes).each(function(e){b.removeChild(e)});depth.times(function(){a=a.firstChild});$A(a.childNodes).each(function(e){b.appendChild(e)})}else{b.innerHTML=c.stripScripts()}setTimeout(function(){c.evalScripts()},10);return b}}else{if(Prototype.Browser.Gecko){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=(b==1)?0.999999:(b==="")?"":(b<1e-05)?0:b;return a}}}}Element._attributeTranslations={names:{colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"},values:{_getAttr:function(b,a){return b.getAttribute(a,2)},_flag:function(b,a){return $(b).hasAttribute(a)?a:null},style:function(a){return a.style.cssText.toLowerCase()},title:function(a){var b=a.getAttributeNode("title");return b.specified?b.nodeValue:null}}};(function(){Object.extend(this,{href:this._getAttr,src:this._getAttr,type:this._getAttr,disabled:this._flag,checked:this._flag,readonly:this._flag,multiple:this._flag})}).call(Element._attributeTranslations.values);Element.Methods.Simulated={hasAttribute:function(b,a){var d=Element._attributeTranslations,c;a=d.names[a]||a;c=$(b).getAttributeNode(a);return c&&c.specified}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div").__proto__){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div").__proto__;Prototype.BrowserFeatures.ElementExtensions=true}Element.hasAttribute=function(b,a){if(b.hasAttribute){return b.hasAttribute(a)}return Element.Methods.Simulated.hasAttribute(b,a)};Element.addMethods=function(f){var c=Prototype.BrowserFeatures,g=Element.Methods.ByTag;if(!f){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var i=f;f=arguments[1]}if(!i){Object.extend(Element.Methods,f||{})}else{if(i.constructor==Array){i.each(b)}else{b(i)}}function b(j){j=j.toUpperCase();if(!Element.Methods.ByTag[j]){Element.Methods.ByTag[j]={}}Object.extend(Element.Methods.ByTag[j],f)}function a(l,k,m){m=m||false;var j=Element.extend.cache;for(var n in l){var o=l[n];if(!m||!(n in k)){k[n]=j.findOrStore(o)}}}function d(k){var j;var l={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(l[k]){j="HTML"+l[k]+"Element"}if(window[j]){return window[j]}j="HTML"+k+"Element";if(window[j]){return window[j]}j="HTML"+k.capitalize()+"Element";if(window[j]){return window[j]}window[j]={};window[j].prototype=document.createElement(k).__proto__;return window[j]}if(c.ElementExtensions){a(Element.Methods,HTMLElement.prototype);a(Element.Methods.Simulated,HTMLElement.prototype,true)}if(c.SpecificElementExtensions){for(var h in Element.Methods.ByTag){var e=d(h);if(typeof e=="undefined"){continue}a(g[h],e.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag};var Toggle={display:Element.toggle};Abstract.Insertion=function(a){this.adjacency=a};Abstract.Insertion.prototype={initialize:function(c,a){this.element=$(c);this.content=a.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(b){var d=this.element.tagName.toUpperCase();if(["TBODY","TR"].include(d)){this.insertContent(this.contentFromAnonymousTable())}else{throw b}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){a.evalScripts()},10)},contentFromAnonymousTable:function(){var a=document.createElement("div");a.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(a.childNodes[0].childNodes[0].childNodes)}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(a){a.each((function(b){this.element.parentNode.insertBefore(b,this.element)}).bind(this))}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(a){a.reverse(false).each((function(b){this.element.insertBefore(b,this.element.firstChild)}).bind(this))}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(a){a.each((function(b){this.element.appendChild(b)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(a){a.each((function(b){this.element.parentNode.insertBefore(b,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(a){this.element.className.split(/\s+/).select(function(b){return b.length>0})._each(a)},set:function(a){this.element.className=a},add:function(a){if(this.include(a)){return}this.set($A(this).concat(a).join(" "))},remove:function(a){if(!this.include(a)){return}this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(a){this.expression=a.strip();this.compileMatcher()},compileMatcher:function(){if(Prototype.BrowserFeatures.XPath&&!(/\[[\w-]*?:/).test(this.expression)){return this.compileXPathMatcher()}var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return}this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(typeof c[i]=="function"?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var a=this.expression,f=Selector.patterns,g=Selector.xpath,c,d;if(Selector._cache[a]){this.xpath=Selector._cache[a];return}this.matcher=[".//*"];while(a&&c!=a&&(/\S/).test(a)){c=a;for(var b in f){if(d=a.match(f[b])){this.matcher.push(typeof g[b]=="function"?g[b](d):new Template(g[b]).evaluate(d));a=a.replace(d[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(a){a=a||document;if(this.xpath){return document._getElementsByXPath(this.xpath,a)}return this.matcher(a)},match:function(a){return this.findElements(document).include(a)},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}};Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(a){if(a[1]=="*"){return""}return"[local-name()='"+a[1].toLowerCase()+"' or local-name()='"+a[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:"[@#{1}]",attr:function(a){a[3]=a[5]||a[6];return new Template(Selector.xpath.operators[a[2]]).evaluate(a)},pseudo:function(b){var a=Selector.xpath.pseudos[b[1]];if(!a){return""}if(typeof a==="function"){return a(b)}return new Template(Selector.xpath.pseudos[b[1]]).evaluate(b)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",checked:"[@checked]",disabled:"[@disabled]",enabled:"[not(@disabled)]",not:function(f){var a=f[6],g=Selector.patterns,j=Selector.xpath,d,f,h;var b=[];while(a&&d!=a&&(/\S/).test(a)){d=a;for(var c in g){if(f=a.match(g[c])){h=typeof j[c]=="function"?j[c](f):new Template(j[c]).evaluate(f);b.push("("+h.substring(1,h.length-1)+")");a=a.replace(f[0],"");break}}}return"[not("+b.join(" and ")+")]"},"nth-child":function(a){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",a)},"nth-last-child":function(a){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",a)},"nth-of-type":function(a){return Selector.xpath.pseudos.nth("position() ",a)},"nth-last-of-type":function(a){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",a)},"first-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-of-type"](a)},"last-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](a)},"only-of-type":function(a){var b=Selector.xpath.pseudos;return b["first-of-type"](a)+b["last-of-type"](a)},nth:function(f,g){var h,e=g[6],i;if(e=="even"){e="2n+0"}if(e=="odd"){e="2n+1"}if(h=e.match(/^(\d+)$/)){return"["+f+"= "+h[1]+"]"}if(h=e.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(h[1]=="-"){h[1]=-1}var c=h[1]?Number(h[1]):1;var d=h[2]?Number(h[2]):0;i="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(i).evaluate({fragment:f,a:c,b:d})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);   c = false;',className:'n = h.className(n, r, "#{1}", c); c = false;',id:'n = h.id(n, r, "#{1}", c);        c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}"); c = false;',attr:function(a){a[3]=(a[5]||a[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(a)},pseudo:function(a){if(a[6]){a[6]=a[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(a)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|\s|(?=:))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\]]*?)\4|([^'"][^\]]*?)))?\]/},handlers:{concat:function(c,d){for(var e=0,f;f=d[e];e++){c.push(f)}return c},mark:function(c){for(var a=0,b;b=c[a];a++){b._counted=true}return c},unmark:function(c){for(var a=0,b;b=c[a];a++){b._counted=undefined}return c},index:function(e,f,d){e._counted=true;if(f){for(var c=e.childNodes,a=c.length-1,b=1;a>=0;a--){node=c[a];if(node.nodeType==1&&(!d||node._counted)){node.nodeIndex=b++}}}else{for(var a=0,b=1,c=e.childNodes;node=c[a];a++){if(node.nodeType==1&&(!d||node._counted)){node.nodeIndex=b++}}}},unique:function(d){if(d.length==0){return d}var e=[],c;for(var a=0,b=d.length;a<b;a++){if(!(c=d[a])._counted){c._counted=true;e.push(Element.extend(c))}}return Selector.handlers.unmark(e)},descendant:function(d){var a=Selector.handlers;for(var b=0,e=[],c;c=d[b];b++){a.concat(e,c.getElementsByTagName("*"))}return e},child:function(g){var c=Selector.handlers;for(var d=0,k=[],f;f=g[d];d++){for(var e=0,b=[],a;a=f.childNodes[e];e++){if(a.nodeType==1&&a.tagName!="!"){k.push(a)}}}return k},adjacent:function(d){for(var a=0,e=[],c;c=d[a];a++){var b=this.nextElementSibling(c);if(b){e.push(b)}}return e},laterSibling:function(d){var a=Selector.handlers;for(var b=0,e=[],c;c=d[b];b++){a.concat(e,Element.nextSiblings(c))}return e},nextElementSibling:function(a){while(a=a.nextSibling){if(a.nodeType==1){return a}}return null},previousElementSibling:function(a){while(a=a.previousSibling){if(a.nodeType==1){return a}}return null},tagName:function(e,g,j,a){j=j.toUpperCase();var f=[],b=Selector.handlers;if(e){if(a){if(a=="descendant"){for(var c=0,d;d=e[c];c++){b.concat(f,d.getElementsByTagName(j))}return f}else{e=this[a](e)}if(j=="*"){return e}}for(var c=0,d;d=e[c];c++){if(d.tagName.toUpperCase()==j){f.push(d)}}return f}else{return g.getElementsByTagName(j)}},id:function(f,g,d,a){var j=$(d),b=Selector.handlers;if(!f&&g==document){return j?[j]:[]}if(f){if(a){if(a=="child"){for(var c=0,e;e=f[c];c++){if(j.parentNode==e){return[j]}}}else{if(a=="descendant"){for(var c=0,e;e=f[c];c++){if(Element.descendantOf(j,e)){return[j]}}}else{if(a=="adjacent"){for(var c=0,e;e=f[c];c++){if(Selector.handlers.previousElementSibling(j)==e){return[j]}}}else{f=b[a](f)}}}}for(var c=0,e;e=f[c];c++){if(e==j){return[j]}}return[]}return(j&&Element.descendantOf(j,g))?[j]:[]},className:function(c,d,a,b){if(c&&b){c=this[b](c)}return Selector.handlers.byClassName(c,d,a)},byClassName:function(f,h,a){if(!f){f=Selector.handlers.descendant([h])}var c=" "+a+" ";for(var b=0,g=[],d,e;d=f[b];b++){e=d.className;if(e.length==0){continue}if(e==a||(" "+e+" ").include(c)){g.push(d)}}return g},attrPresence:function(d,f,a){var e=[];for(var b=0,c;c=d[b];b++){if(Element.hasAttribute(c,a)){e.push(c)}}return e},attr:function(e,j,a,k,g){if(!e){e=j.getElementsByTagName("*")}var b=Selector.operators[g],h=[];for(var c=0,d;d=e[c];c++){var f=Element.readAttribute(d,a);if(f===null){continue}if(b(f,k)){h.push(d)}}return h},pseudo:function(c,b,e,d,a){if(c&&a){c=this[a](c)}if(!c){c=d.getElementsByTagName("*")}return Selector.pseudos[b](c,e,d)}},pseudos:{"first-child":function(c,f,e){for(var a=0,d=[],b;b=c[a];a++){if(Selector.handlers.previousElementSibling(b)){continue}d.push(b)}return d},"last-child":function(c,f,e){for(var a=0,d=[],b;b=c[a];a++){if(Selector.handlers.nextElementSibling(b)){continue}d.push(b)}return d},"only-child":function(d,g,f){var a=Selector.handlers;for(var b=0,e=[],c;c=d[b];b++){if(!a.previousElementSibling(c)&&!a.nextElementSibling(c)){e.push(c)}}return e},"nth-child":function(b,a,c){return Selector.pseudos.nth(b,a,c)},"nth-last-child":function(b,a,c){return Selector.pseudos.nth(b,a,c,true)},"nth-of-type":function(b,a,c){return Selector.pseudos.nth(b,a,c,false,true)},"nth-last-of-type":function(b,a,c){return Selector.pseudos.nth(b,a,c,true,true)},"first-of-type":function(b,a,c){return Selector.pseudos.nth(b,"1",c,false,true)},"last-of-type":function(b,a,c){return Selector.pseudos.nth(b,"1",c,true,true)},"only-of-type":function(b,a,d){var c=Selector.pseudos;return c["last-of-type"](c["first-of-type"](b,a,d),a,d)},getIndices:function(c,d,e){if(c==0){return d>0?[d]:[]}return $R(1,e).inject([],function(b,a){if(0==(a-d)%c&&(a-d)/c>=0){b.push(a)}return b})},nth:function(s,e,w,v,t){if(s.length==0){return[]}if(e=="even"){e="2n+0"}if(e=="odd"){e="2n+1"}var f=Selector.handlers,u=[],k=[],q;f.mark(s);for(var g=0,r;r=s[g];g++){if(!r.parentNode._counted){f.index(r.parentNode,v,t);k.push(r.parentNode)}}if(e.match(/^\d+$/)){e=Number(e);for(var g=0,r;r=s[g];g++){if(r.nodeIndex==e){u.push(r)}}}else{if(q=e.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(q[1]=="-"){q[1]=-1}var c=q[1]?Number(q[1]):1;var d=q[2]?Number(q[2]):0;var n=Selector.pseudos.getIndices(c,d,s.length);for(var g=0,r,p=n.length;r=s[g];g++){for(var o=0;o<p;o++){if(r.nodeIndex==n[o]){u.push(r)}}}}}f.unmark(s);f.unmark(k);return u},empty:function(c,f,e){for(var a=0,d=[],b;b=c[a];a++){if(b.tagName=="!"||(b.firstChild&&!b.innerHTML.match(/^\s*$/))){continue}d.push(b)}return d},not:function(f,k,j){var b=Selector.handlers,l,d;var a=new Selector(k).findElements(j);b.mark(a);for(var c=0,g=[],e;e=f[c];c++){if(!e._counted){g.push(e)}}b.unmark(a);return g},enabled:function(c,f,e){for(var a=0,d=[],b;b=c[a];a++){if(!b.disabled){d.push(b)}}return d},disabled:function(c,f,e){for(var a=0,d=[],b;b=c[a];a++){if(b.disabled){d.push(b)}}return d},checked:function(c,f,e){for(var a=0,d=[],b;b=c[a];a++){if(b.checked){d.push(b)}}return d}},operators:{"=":function(a,b){return a==b},"!=":function(a,b){return a!=b},"^=":function(a,b){return a.startsWith(b)},"$=":function(a,b){return a.endsWith(b)},"*=":function(a,b){return a.include(b)},"~=":function(a,b){return(" "+a+" ").include(" "+b+" ")},"|=":function(a,b){return("-"+a.toUpperCase()+"-").include("-"+b.toUpperCase()+"-")}},matchElements:function(b,c){var f=new Selector(c).findElements(),d=Selector.handlers;d.mark(f);for(var e=0,g=[],a;a=b[e];e++){if(a._counted){g.push(a)}}d.unmark(f);return g},findElement:function(a,b,c){if(typeof b=="number"){c=b;b=false}return Selector.matchElements(a,b||"*")[c||0]},findChildElements:function(a,b){var c=b.join(","),b=[];c.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(h){b.push(h[1].strip())});var g=[],d=Selector.handlers;for(var e=0,f=b.length,j;e<f;e++){j=new Selector(b[e].strip());d.concat(g,j.findElements(a))}return(f>1)?d.unique(g):g}});function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(a){$(a).reset();return a},serializeElements:function(b,c){var a=b.inject({},function(f,d){if(!d.disabled&&d.name){var e=d.name,g=$(d).getValue();if(g!=null){if(e in f){if(f[e].constructor!=Array){f[e]=[f[e]]}f[e].push(g)}else{f[e]=g}}}return f});return c?a:Hash.toQueryString(a)}};Form.Methods={serialize:function(a,b){return Form.serializeElements(Form.getElements(a),b)},getElements:function(a){return $A($(a).getElementsByTagName("*")).inject([],function(c,b){if(Form.Element.Serializers[b.tagName.toLowerCase()]){c.push(Element.extend(b))}return c})},getInputs:function(a,h,g){a=$(a);var d=a.getElementsByTagName("input");if(!h&&!g){return $A(d).map(Element.extend)}for(var b=0,f=[],e=d.length;b<e;b++){var c=d[b];if((h&&c.type!=h)||(g&&c.name!=g)){continue}f.push(Element.extend(c))}return f},disable:function(a){a=$(a);Form.getElements(a).invoke("disable");return a},enable:function(a){a=$(a);Form.getElements(a).invoke("enable");return a},findFirstElement:function(a){return $(a).getElements().find(function(b){return b.type!="hidden"&&!b.disabled&&["input","select","textarea"].include(b.tagName.toLowerCase())})},focusFirstElement:function(a){a=$(a);a.findFirstElement().activate();return a},request:function(a,b){a=$(a),b=Object.clone(b||{});var c=b.parameters;b.parameters=a.serialize(true);if(c){if(typeof c=="string"){c=c.toQueryParams()}Object.extend(b.parameters,c)}if(a.hasAttribute("method")&&!b.method){b.method=a.method}return new Ajax.Request(a.readAttribute("action"),b)}};Form.Element={focus:function(a){$(a).focus();return a},select:function(a){$(a).select();return a}};Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var c=a.getValue();if(c!=undefined){var b={};b[a.name]=c;return Hash.toQueryString(b)}}return""},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},clear:function(a){$(a).value="";return a},present:function(a){return $(a).value!=""},activate:function(b){b=$(b);try{b.focus();if(b.select&&(b.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(b.type))){b.select()}}catch(a){}return b},disable:function(a){a=$(a);a.blur();a.disabled=true;return a},enable:function(a){a=$(a);a.disabled=false;return a}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(a){switch(a.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(a);default:return Form.Element.Serializers.textarea(a)}},inputSelector:function(a){return a.checked?a.value:null},textarea:function(a){return a.value},select:function(a){return this[a.type=="select-one"?"selectOne":"selectMany"](a)},selectOne:function(a){var b=a.selectedIndex;return b>=0?this.optionValue(a.options[b]):null},selectMany:function(a){var e,c=a.length;if(!c){return null}for(var b=0,e=[];b<c;b++){var d=a.options[b];if(d.selected){e.push(this.optionValue(d))}}return e},optionValue:function(a){return Element.extend(a).hasAttribute("value")?a.value:a.text}};Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(b,c,a){this.frequency=c;this.element=$(b);this.callback=a;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var b=this.getValue();var a=("string"==typeof this.lastValue&&"string"==typeof b?this.lastValue!=b:String(this.lastValue)!=String(b));if(a){this.callback(this.element,b);this.lastValue=b}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(b,a){this.element=$(b);this.callback=a;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback.bind(this))},registerCallback:function(a){if(a.type){switch(a.type.toLowerCase()){case"checkbox":case"radio":Event.observe(a,"click",this.onElementEvent.bind(this));break;default:Event.observe(a,"change",this.onElementEvent.bind(this));break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(a){return $(a.target||a.srcElement)},isLeftClick:function(a){return(((a.which)&&(a.which==1))||((a.button)&&(a.button==1)))},pointerX:function(a){return a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(a){return a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(a){if(a.preventDefault){a.preventDefault();a.stopPropagation()}else{a.returnValue=false;a.cancelBubble=true}},findElement:function(b,c){var a=Event.element(b);while(a.parentNode&&(!a.tagName||(a.tagName.toUpperCase()!=c.toUpperCase()))){a=a.parentNode}return a},observers:false,_observeAndCache:function(a,b,c,d){if(!this.observers){this.observers=[]}if(a.addEventListener){this.observers.push([a,b,c,d]);a.addEventListener(b,c,d)}else{if(a.attachEvent){this.observers.push([a,b,c,d]);a.attachEvent("on"+b,c)}}},unloadCache:function(){if(!Event.observers){return}for(var a=0,b=Event.observers.length;a<b;a++){Event.stopObserving.apply(this,Event.observers[a]);Event.observers[a][0]=null}Event.observers=false},observe:function(a,b,c,d){a=$(a);d=d||false;if(b=="keypress"&&(Prototype.Browser.WebKit||a.attachEvent)){b="keydown"}Event._observeAndCache(a,b,c,d)},stopObserving:function(b,c,d,f){b=$(b);f=f||false;if(c=="keypress"&&(Prototype.Browser.WebKit||b.attachEvent)){c="keydown"}if(b.removeEventListener){b.removeEventListener(c,d,f)}else{if(b.detachEvent){try{b.detachEvent("on"+c,d)}catch(a){}}}}});if(Prototype.Browser.IE){Event.observe(window,"unload",Event.unloadCache,false)}var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(a){var c=0,b=0;do{c+=a.scrollTop||0;b+=a.scrollLeft||0;a=a.parentNode}while(a);return[b,c]},cumulativeOffset:function(a){var c=0,b=0;do{c+=a.offsetTop||0;b+=a.offsetLeft||0;a=a.offsetParent}while(a);return[b,c]},positionedOffset:function(a){var d=0,c=0;do{d+=a.offsetTop||0;c+=a.offsetLeft||0;a=a.offsetParent;if(a){if(a.tagName=="BODY"){break}var b=Element.getStyle(a,"position");if(b=="relative"||b=="absolute"){break}}}while(a);return[c,d]},offsetParent:function(a){if(a.offsetParent){return a.offsetParent}if(a==document.body){return a}while((a=a.parentNode)&&a!=document.body){if(Element.getStyle(a,"position")!="static"){return a}}return document.body},within:function(a,b,c){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(a,b,c)}this.xcomp=b;this.ycomp=c;this.offset=this.cumulativeOffset(a);return(c>=this.offset[1]&&c<this.offset[1]+a.offsetHeight&&b>=this.offset[0]&&b<this.offset[0]+a.offsetWidth)},withinIncludingScrolloffsets:function(a,c,d){var b=this.realOffset(a);this.xcomp=c+b[0]-this.deltaX;this.ycomp=d+b[1]-this.deltaY;this.offset=this.cumulativeOffset(a);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+a.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+a.offsetWidth)},overlap:function(b,a){if(!b){return 0}if(b=="vertical"){return((this.offset[1]+a.offsetHeight)-this.ycomp)/a.offsetHeight}if(b=="horizontal"){return((this.offset[0]+a.offsetWidth)-this.xcomp)/a.offsetWidth}},page:function(b){var d=0,c=0;var a=b;do{d+=a.offsetTop||0;c+=a.offsetLeft||0;if(a.offsetParent==document.body){if(Element.getStyle(a,"position")=="absolute"){break}}}while(a=a.offsetParent);a=b;do{if(!window.opera||a.tagName=="BODY"){d-=a.scrollTop||0;c-=a.scrollLeft||0}}while(a=a.parentNode);return[c,d]},clone:function(e,f){var b=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});e=$(e);var c=Position.page(e);f=$(f);var a=[0,0];var d=null;if(Element.getStyle(f,"position")=="absolute"){d=Position.offsetParent(f);a=Position.page(d)}if(d==document.body){a[0]-=document.body.offsetLeft;a[1]-=document.body.offsetTop}if(b.setLeft){f.style.left=(c[0]-a[0]+b.offsetLeft)+"px"}if(b.setTop){f.style.top=(c[1]-a[1]+b.offsetTop)+"px"}if(b.setWidth){f.style.width=e.offsetWidth+"px"}if(b.setHeight){f.style.height=e.offsetHeight+"px"}},absolutize:function(a){a=$(a);if(a.style.position=="absolute"){return}Position.prepare();var d=Position.positionedOffset(a);var e=d[1];var c=d[0];var f=a.clientWidth;var b=a.clientHeight;a._originalLeft=c-parseFloat(a.style.left||0);a._originalTop=e-parseFloat(a.style.top||0);a._originalWidth=a.style.width;a._originalHeight=a.style.height;a.style.position="absolute";a.style.top=e+"px";a.style.left=c+"px";a.style.width=f+"px";a.style.height=b+"px"},relativize:function(a){a=$(a);if(a.style.position=="relative"){return}Position.prepare();a.style.position="relative";var c=parseFloat(a.style.top||0)-(a._originalTop||0);var b=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=c+"px";a.style.left=b+"px";a.style.height=a._originalHeight;a.style.width=a._originalWidth}};if(Prototype.Browser.WebKit){Position.cumulativeOffset=function(a){var c=0,b=0;do{c+=a.offsetTop||0;b+=a.offsetLeft||0;if(a.offsetParent==document.body){if(Element.getStyle(a,"position")=="absolute"){break}}a=a.offsetParent}while(a);return[b,c]}}Element.addMethods();String.prototype.parseColor=function(){var a="#";if(this.slice(0,4)=="rgb("){var b=this.slice(4,this.length-1).split(",");var c=0;do{a+=parseInt(b[c]).toColorPart()}while(++c<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var c=1;c<4;c++){a+=(this.charAt(c)+this.charAt(c)).toLowerCase()}}if(this.length==7){a=this.toLowerCase()}}}return(a.length==7?a:(arguments[0]||this))};Element.collectTextNodes=function(a){return $A($(a).childNodes).collect(function(b){return(b.nodeType==3?b.nodeValue:(b.hasChildNodes()?Element.collectTextNodes(b):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(b,a){return $A($(b).childNodes).collect(function(c){return(c.nodeType==3?c.nodeValue:((c.hasChildNodes()&&!Element.hasClassName(c,a))?Element.collectTextNodesIgnoreClass(c,a):""))}).flatten().join("")};Element.setContentZoom=function(a,b){a=$(a);a.setStyle({fontSize:(b/100)+"em"});if(Prototype.Browser.WebKit){window.scrollBy(0,0)}return a};Element.getInlineOpacity=function(a){return $(a).style.opacity||""};Element.forceRerendering=function(b){try{b=$(b);var c=document.createTextNode(" ");b.appendChild(c);b.removeChild(c)}catch(a){}};Array.prototype.call=function(){var a=arguments;this.each(function(b){b.apply(this,a)})};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},tagifyText:function(a){if(typeof Builder=="undefined"){throw ("Effect.tagifyText requires including script.aculo.us' builder.js library")}var b="position:relative";if(Prototype.Browser.IE){b+=";zoom:1"}a=$(a);$A(a.childNodes).each(function(c){if(c.nodeType==3){c.nodeValue.toArray().each(function(d){a.insertBefore(Builder.node("span",{style:b},d==" "?String.fromCharCode(160):d),c)});Element.remove(c)}})},multiple:function(b,a){var c;if(((typeof b=="object")||(typeof b=="function"))&&(b.length)){c=b}else{c=$(b).childNodes}var e=Object.extend({speed:0.1,delay:0},arguments[2]||{});var d=e.delay;$A(c).each(function(f,g){new a(f,Object.extend(e,{delay:g*e.speed+d}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(b,a){b=$(b);a=(a||"appear").toLowerCase();var c=Object.extend({queue:{position:"end",scope:(b.id||"global"),limit:1}},arguments[2]||{});Effect[b.visible()?Effect.PAIRS[a][1]:Effect.PAIRS[a][0]](b,c)}};var Effect2=Effect;Effect.Transitions={linear:Prototype.K,sinoidal:function(a){return(-Math.cos(a*Math.PI)/2)+0.5},reverse:function(a){return 1-a},flicker:function(a){var a=((-Math.cos(a*Math.PI)/4)+0.75)+Math.random()/4;return(a>1?1:a)},wobble:function(a){return(-Math.cos(a*Math.PI*(9*a))/2)+0.5},pulse:function(a,b){b=b||5;return(Math.round((a%(1/b))*b)==0?((a*b*2)-Math.floor(a*b*2)):1-((a*b*2)-Math.floor(a*b*2)))},none:function(a){return 0},full:function(a){return 1}};Effect.ScopedQueue=Class.create();Object.extend(Object.extend(Effect.ScopedQueue.prototype,Enumerable),{initialize:function(){this.effects=[];this.interval=null},_each:function(a){this.effects._each(a)},add:function(a){var c=new Date().getTime();var b=(typeof a.options.queue=="string")?a.options.queue:a.options.queue.position;switch(b){case"front":this.effects.findAll(function(d){return d.state=="idle"}).each(function(d){d.startOn+=a.finishOn;d.finishOn+=a.finishOn});break;case"with-last":c=this.effects.pluck("startOn").max()||c;break;case"end":c=this.effects.pluck("finishOn").max()||c;break}a.startOn+=c;a.finishOn+=c;if(!a.options.queue.limit||(this.effects.length<a.options.queue.limit)){this.effects.push(a)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(a){this.effects=this.effects.reject(function(b){return b==a});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var c=new Date().getTime();for(var a=0,b=this.effects.length;a<b;a++){this.effects[a]&&this.effects[a].loop(c)}}});Effect.Queues={instances:$H(),get:function(a){if(typeof a!="string"){return a}if(!this.instances[a]){this.instances[a]=new Effect.ScopedQueue()}return this.instances[a]}};Effect.Queue=Effect.Queues.get("global");Effect.DefaultOptions={transition:Effect.Transitions.sinoidal,duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"};Effect.Base=function(){};Effect.Base.prototype={position:null,start:function(options){function codeForEvent(options,eventName){return((options[eventName+"Internal"]?"this.options."+eventName+"Internal(this);":"")+(options[eventName]?"this.options."+eventName+"(this);":""))}if(options.transition===false){options.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),options||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;eval('this.render = function(pos){ if(this.state=="idle"){this.state="running";'+codeForEvent(options,"beforeSetup")+(this.setup?"this.setup();":"")+codeForEvent(options,"afterSetup")+'};if(this.state=="running"){pos=this.options.transition(pos)*'+this.fromToDelta+"+"+this.options.from+";this.position=pos;"+codeForEvent(options,"beforeUpdate")+(this.update?"this.update(pos);":"")+codeForEvent(options,"afterUpdate")+"}}");this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).add(this)}},loop:function(c){if(c>=this.startOn){if(c>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return}var b=(c-this.startOn)/this.totalTime,a=Math.round(b*this.totalFrames);if(a>this.currentFrame){this.render(b);this.currentFrame=a}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(a){if(this.options[a+"Internal"]){this.options[a+"Internal"](this)}if(this.options[a]){this.options[a](this)}},inspect:function(){var a=$H();for(property in this){if(typeof this[property]!="function"){a[property]=this[property]}}return"#<Effect:"+a.inspect()+",options:"+$H(this.options).inspect()+">"}};Effect.Parallel=Class.create();Object.extend(Object.extend(Effect.Parallel.prototype,Effect.Base.prototype),{initialize:function(a){this.effects=a||[];this.start(arguments[1])},update:function(a){this.effects.invoke("render",a)},finish:function(a){this.effects.each(function(b){b.render(1);b.cancel();b.event("beforeFinish");if(b.finish){b.finish(a)}b.event("afterFinish")})}});Effect.Event=Class.create();Object.extend(Object.extend(Effect.Event.prototype,Effect.Base.prototype),{initialize:function(){var a=Object.extend({duration:0},arguments[0]||{});this.start(a)},update:Prototype.emptyFunction});Effect.Opacity=Class.create();Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(a){this.element=$(a);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var b=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(b)},update:function(a){this.element.setOpacity(a)}});Effect.Move=Class.create();Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(a){this.element=$(a);if(!this.element){throw (Effect._elementDoesNotExistError)}var b=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(b)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(a){this.element.setStyle({left:Math.round(this.options.x*a+this.originalLeft)+"px",top:Math.round(this.options.y*a+this.originalTop)+"px"})}});Effect.MoveBy=function(a,c,b){return new Effect.Move(a,Object.extend({x:b,y:c},arguments[3]||{}))};Effect.Scale=Class.create();Object.extend(Object.extend(Effect.Scale.prototype,Effect.Base.prototype),{initialize:function(a,c){this.element=$(a);if(!this.element){throw (Effect._elementDoesNotExistError)}var b=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:c},arguments[2]||{});this.start(b)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(b){this.originalStyle[b]=this.element.style[b]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var a=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(b){if(a.indexOf(b)>0){this.fontSize=parseFloat(a);this.fontSizeType=b}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(b){var a=(this.options.scaleFrom/100)+(this.factor*b);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*a+this.fontSizeType})}this.setDimensions(this.dims[0]*a,this.dims[1]*a)},finish:function(a){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(b,f){var a={};if(this.options.scaleX){a.width=Math.round(f)+"px"}if(this.options.scaleY){a.height=Math.round(b)+"px"}if(this.options.scaleFromCenter){var e=(b-this.dims[0])/2;var c=(f-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){a.top=this.originalTop-e+"px"}if(this.options.scaleX){a.left=this.originalLeft-c+"px"}}else{if(this.options.scaleY){a.top=-e+"px"}if(this.options.scaleX){a.left=-c+"px"}}}this.element.setStyle(a)}});Effect.Highlight=Class.create();Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(a){this.element=$(a);if(!this.element){throw (Effect._elementDoesNotExistError)}var b=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(b)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return}this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(a){return parseInt(this.options.startcolor.slice(a*2+1,a*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(a){return parseInt(this.options.endcolor.slice(a*2+1,a*2+3),16)-this._base[a]}.bind(this))},update:function(a){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(c,d,b){return c+(Math.round(this._base[b]+(this._delta[b]*a)).toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=Class.create();Object.extend(Object.extend(Effect.ScrollTo.prototype,Effect.Base.prototype),{initialize:function(a){this.element=$(a);this.start(arguments[1]||{})},setup:function(){Position.prepare();var b=Position.cumulativeOffset(this.element);if(this.options.offset){b[1]+=this.options.offset}var a=window.innerHeight?window.height-window.innerHeight:document.body.scrollHeight-(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);this.scrollStart=Position.deltaY;this.delta=(b[1]>a?a:b[1])-this.scrollStart},update:function(a){Position.prepare();window.scrollTo(Position.deltaX,this.scrollStart+(a*this.delta))}});Effect.Fade=function(a){a=$(a);var b=a.getInlineOpacity();var c=Object.extend({from:a.getOpacity()||1,to:0,afterFinishInternal:function(d){if(d.options.to!=0){return}d.element.hide().setStyle({opacity:b})}},arguments[1]||{});return new Effect.Opacity(a,c)};Effect.Appear=function(a){a=$(a);var b=Object.extend({from:(a.getStyle("display")=="none"?0:a.getOpacity()||0),to:1,afterFinishInternal:function(c){c.element.forceRerendering()},beforeSetup:function(c){c.element.setOpacity(c.options.from).show()}},arguments[1]||{});return new Effect.Opacity(a,b)};Effect.Puff=function(a){a=$(a);var b={opacity:a.getInlineOpacity(),position:a.getStyle("position"),top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height};return new Effect.Parallel([new Effect.Scale(a,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(a,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(c){Position.absolutize(c.effects[0].element)},afterFinishInternal:function(c){c.effects[0].element.hide().setStyle(b)}},arguments[1]||{}))};Effect.BlindUp=function(a){a=$(a);a.makeClipping();return new Effect.Scale(a,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(b){b.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindDown=function(a){a=$(a);var b=a.getDimensions();return new Effect.Scale(a,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:b.height,originalWidth:b.width},restoreAfterFinish:true,afterSetup:function(c){c.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(c){c.element.undoClipping()}},arguments[1]||{}))};Effect.SwitchOff=function(a){a=$(a);var b=a.getInlineOpacity();return new Effect.Appear(a,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(c){new Effect.Scale(c.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(d){d.element.makePositioned().makeClipping()},afterFinishInternal:function(d){d.element.hide().undoClipping().undoPositioned().setStyle({opacity:b})}})}},arguments[1]||{}))};Effect.DropOut=function(a){a=$(a);var b={top:a.getStyle("top"),left:a.getStyle("left"),opacity:a.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(a,{x:0,y:100,sync:true}),new Effect.Opacity(a,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(c){c.effects[0].element.makePositioned()},afterFinishInternal:function(c){c.effects[0].element.hide().undoPositioned().setStyle(b)}},arguments[1]||{}))};Effect.Shake=function(a){a=$(a);var b={top:a.getStyle("top"),left:a.getStyle("left")};return new Effect.Move(a,{x:20,y:0,duration:0.05,afterFinishInternal:function(c){new Effect.Move(c.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(d){new Effect.Move(d.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(e){new Effect.Move(e.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(f){new Effect.Move(f.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(g){new Effect.Move(g.element,{x:-20,y:0,duration:0.05,afterFinishInternal:function(h){h.element.undoPositioned().setStyle(b)}})}})}})}})}})}})};Effect.SlideDown=function(a){a=$(a).cleanWhitespace();var c=a.down().getStyle("bottom");var b=a.getDimensions();return new Effect.Scale(a,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:b.height,originalWidth:b.width},restoreAfterFinish:true,afterSetup:function(d){d.element.makePositioned();d.element.down().makePositioned();if(window.opera){d.element.setStyle({top:""})}d.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(d){d.element.down().setStyle({bottom:(d.dims[0]-d.element.clientHeight)+"px"})},afterFinishInternal:function(d){d.element.undoClipping().undoPositioned();d.element.down().undoPositioned().setStyle({bottom:c})}},arguments[1]||{}))};Effect.SlideUp=function(a){a=$(a).cleanWhitespace();var b=a.down().getStyle("bottom");return new Effect.Scale(a,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(c){c.element.makePositioned();c.element.down().makePositioned();if(window.opera){c.element.setStyle({top:""})}c.element.makeClipping().show()},afterUpdateInternal:function(c){c.element.down().setStyle({bottom:(c.dims[0]-c.element.clientHeight)+"px"})},afterFinishInternal:function(c){c.element.hide().undoClipping().undoPositioned().setStyle({bottom:b});c.element.down().undoPositioned()}},arguments[1]||{}))};Effect.Squish=function(a){return new Effect.Scale(a,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(b){b.element.makeClipping()},afterFinishInternal:function(b){b.element.hide().undoClipping()}})};Effect.Grow=function(b){b=$(b);var h=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var g={top:b.style.top,left:b.style.left,height:b.style.height,width:b.style.width,opacity:b.getInlineOpacity()};var a=b.getDimensions();var c,d;var e,f;switch(h.direction){case"top-left":c=d=e=f=0;break;case"top-right":c=a.width;d=f=0;e=-a.width;break;case"bottom-left":c=e=0;d=a.height;f=-a.height;break;case"bottom-right":c=a.width;d=a.height;e=-a.width;f=-a.height;break;case"center":c=a.width/2;d=a.height/2;e=-a.width/2;f=-a.height/2;break}return new Effect.Move(b,{x:c,y:d,duration:0.01,beforeSetup:function(i){i.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(i){new Effect.Parallel([new Effect.Opacity(i.element,{sync:true,to:1,from:0,transition:h.opacityTransition}),new Effect.Move(i.element,{x:e,y:f,sync:true,transition:h.moveTransition}),new Effect.Scale(i.element,100,{scaleMode:{originalHeight:a.height,originalWidth:a.width},sync:true,scaleFrom:window.opera?1:0,transition:h.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(j){j.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(j){j.effects[0].element.undoClipping().undoPositioned().setStyle(g)}},h))}})};Effect.Shrink=function(b){b=$(b);var f=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var e={top:b.style.top,left:b.style.left,height:b.style.height,width:b.style.width,opacity:b.getInlineOpacity()};var a=b.getDimensions();var c,d;switch(f.direction){case"top-left":c=d=0;break;case"top-right":c=a.width;d=0;break;case"bottom-left":c=0;d=a.height;break;case"bottom-right":c=a.width;d=a.height;break;case"center":c=a.width/2;d=a.height/2;break}return new Effect.Parallel([new Effect.Opacity(b,{sync:true,to:0,from:1,transition:f.opacityTransition}),new Effect.Scale(b,window.opera?1:0,{sync:true,transition:f.scaleTransition,restoreAfterFinish:true}),new Effect.Move(b,{x:c,y:d,sync:true,transition:f.moveTransition})],Object.extend({beforeStartInternal:function(g){g.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(g){g.effects[0].element.hide().undoClipping().undoPositioned().setStyle(e)}},f))};Effect.Pulsate=function(a){a=$(a);var c=arguments[1]||{};var b=a.getInlineOpacity();var e=c.transition||Effect.Transitions.sinoidal;var d=function(f){return e(1-Effect.Transitions.pulse(f,c.pulses))};d.bind(e);return new Effect.Opacity(a,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(f){f.element.setStyle({opacity:b})}},c),{transition:d}))};Effect.Fold=function(a){a=$(a);var b={top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height};a.makeClipping();return new Effect.Scale(a,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(c){new Effect.Scale(a,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(d){d.element.hide().undoClipping().setStyle(b)}})}},arguments[1]||{}))};Effect.Morph=Class.create();Object.extend(Object.extend(Effect.Morph.prototype,Effect.Base.prototype),{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var c=Object.extend({style:{}},arguments[1]||{});if(typeof c.style=="string"){if(c.style.indexOf(":")==-1){var a="",d="."+c.style;$A(document.styleSheets).reverse().each(function(e){if(e.cssRules){cssRules=e.cssRules}else{if(e.rules){cssRules=e.rules}}$A(cssRules).reverse().each(function(f){if(d==f.selectorText){a=f.style.cssText;throw $break}});if(a){throw $break}});this.style=a.parseStyle();c.afterFinishInternal=function(e){e.element.addClassName(e.options.style);e.transforms.each(function(f){if(f.style!="opacity"){e.element.style[f.style]=""}})}}else{this.style=c.style.parseStyle()}}else{this.style=$H(c.style)}this.start(c)},setup:function(){function a(b){if(!b||["rgba(0, 0, 0, 0)","transparent"].include(b)){b="#ffffff"}b=b.parseColor();return $R(0,2).map(function(c){return parseInt(b.slice(c*2+1,c*2+3),16)})}this.transforms=this.style.map(function(d){var e=d[0],g=d[1],f=null;if(g.parseColor("#zzzzzz")!="#zzzzzz"){g=g.parseColor();f="color"}else{if(e=="opacity"){g=parseFloat(g);if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}}else{if(Element.CSS_LENGTH.test(g)){var b=g.match(/^([\+\-]?[0-9\.]+)(.*)$/);g=parseFloat(b[1]);f=(b.length==3)?b[2]:null}}}var c=this.element.getStyle(e);return{style:e.camelize(),originalValue:f=="color"?a(c):parseFloat(c||0),targetValue:f=="color"?a(g):g,unit:f}}.bind(this)).reject(function(b){return((b.originalValue==b.targetValue)||(b.unit!="color"&&(isNaN(b.originalValue)||isNaN(b.targetValue))))})},update:function(b){var c={},d,a=this.transforms.length;while(a--){c[(d=this.transforms[a]).style]=d.unit=="color"?"#"+(Math.round(d.originalValue[0]+(d.targetValue[0]-d.originalValue[0])*b)).toColorPart()+(Math.round(d.originalValue[1]+(d.targetValue[1]-d.originalValue[1])*b)).toColorPart()+(Math.round(d.originalValue[2]+(d.targetValue[2]-d.originalValue[2])*b)).toColorPart():d.originalValue+Math.round(((d.targetValue-d.originalValue)*b)*1000)/1000+d.unit}this.element.setStyle(c,true)}});Effect.Transform=Class.create();Object.extend(Effect.Transform.prototype,{initialize:function(a){this.tracks=[];this.options=arguments[1]||{};this.addTracks(a)},addTracks:function(a){a.each(function(c){var b=$H(c).values().first();this.tracks.push($H({ids:$H(c).keys().first(),effect:Effect.Morph,options:{style:b}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(b){var a=[$(b.ids)||$$(b.ids)].flatten();return a.map(function(c){return new b.effect(c,Object.extend({sync:true},b.options))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.prototype.parseStyle=function(){var a=document.createElement("div");a.innerHTML='<div style="'+this+'"></div>';var b=a.childNodes[0].style,c=$H();Element.CSS_PROPERTIES.each(function(d){if(b[d]){c[d]=b[d]}});if(Prototype.Browser.IE&&this.indexOf("opacity")>-1){c.opacity=this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]}return c};Element.morph=function(a,b){new Effect.Morph(a,Object.extend({style:b},arguments[2]||{}));return a};["getInlineOpacity","forceRerendering","setContentZoom","collectTextNodes","collectTextNodesIgnoreClass","morph"].each(function(a){Element.Methods[a]=Element[a]});Element.Methods.visualEffect=function(b,a,c){s=a.dasherize().camelize();effect_class=s.charAt(0).toUpperCase()+s.substring(1);new Effect[effect_class](b,c);return $(b)};Element.addMethods();if(typeof Effect=="undefined"){throw ("lightwindow.js requires including script.aculo.us' effects.js library!")}try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}var lightwindow=Class.create();lightwindow.prototype={element:null,contentToFetch:null,windowActive:false,dataEffects:[],dimensions:{cruft:null,container:null,viewport:{height:null,width:null,offsetTop:null,offsetLeft:null}},pagePosition:{x:0,y:0},pageDimensions:{width:null,height:null},preloadImage:[],preloadedImage:[],galleries:[],resizeTo:{height:null,heightPercent:null,width:null,widthPercent:null,fixedTop:null,fixedLeft:null},scrollbarOffset:18,navigationObservers:{previous:null,next:null},containerChange:{height:0,width:0},activeGallery:false,galleryLocation:{current:0,total:0},initialize:function(a){this.options=Object.extend({resizeSpeed:8,contentOffset:{height:20,width:20},dimensions:{image:{height:250,width:250},page:{height:250,width:250},inline:{height:250,width:250},media:{height:250,width:250},external:{height:250,width:250},titleHeight:25},classNames:{standard:"lightwindow",action:"lightwindow_action"},fileTypes:{page:["asp","aspx","cgi","cfm","htm","html","pl","php4","php3","php","php5","phtml","rhtml","shtml","txt","vbs","rb"],media:["aif","aiff","asf","avi","divx","m1v","m2a","m2v","m3u","mid","midi","mov","moov","movie","mp2","mp3","mpa","mpa","mpe","mpeg","mpg","mpg","mpga","pps","qt","rm","ram","swf","viv","vivo","wav"],image:["bmp","gif","jpg","png","tiff"]},mimeTypes:{avi:"video/avi",aif:"audio/aiff",aiff:"audio/aiff",gif:"image/gif",bmp:"image/bmp",jpeg:"image/jpeg",m1v:"video/mpeg",m2a:"audio/mpeg",m2v:"video/mpeg",m3u:"audio/x-mpequrl",mid:"audio/x-midi",midi:"audio/x-midi",mjpg:"video/x-motion-jpeg",moov:"video/quicktime",mov:"video/quicktime",movie:"video/x-sgi-movie",mp2:"audio/mpeg",mp3:"audio/mpeg3",mpa:"audio/mpeg",mpa:"video/mpeg",mpe:"video/mpeg",mpeg:"video/mpeg",mpg:"audio/mpeg",mpg:"video/mpeg",mpga:"audio/mpeg",pdf:"application/pdf",png:"image/png",pps:"application/mspowerpoint",qt:"video/quicktime",ram:"audio/x-pn-realaudio-plugin",rm:"application/vnd.rn-realmedia",swf:"application/x-shockwave-flash",tiff:"image/tiff",viv:"video/vivo",vivo:"video/vivo",wav:"audio/wav",wmv:"application/x-mplayer2"},classids:{mov:"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",swf:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",wmv:"clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"},codebases:{mov:"http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0",swf:"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0",wmv:"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"},viewportPadding:10,EOLASFix:"swf,wmv,fla,flv",overlay:{opacity:0.7,image:"/FCWSite/include/lightwindow/black.png",presetImage:"/FCWSite/include/lightwindow/black-70.png"},skin:{main:'<div id="lightwindow_container" ><div id="lightwindow_title_bar" ><div id="lightwindow_title_bar_inner" ><span id="lightwindow_title_bar_title"></span><a id="lightwindow_title_bar_close_link" >close</a></div></div><div id="lightwindow_stage" ><div id="lightwindow_contents" ></div><div id="lightwindow_navigation" ><a href="#" id="lightwindow_previous" ><span id="lightwindow_previous_title"></span></a><a href="#" id="lightwindow_next" ><span id="lightwindow_next_title"></span></a><iframe name="lightwindow_navigation_shim" id="lightwindow_navigation_shim" src="javascript:false;" frameBorder="0" scrolling="no"></iframe></div><div id="lightwindow_galleries"><div id="lightwindow_galleries_tab_container" ><a href="#" id="lightwindow_galleries_tab" ><span id="lightwindow_galleries_tab_span" class="up" >Galleries</span></a></div><div id="lightwindow_galleries_list" ></div></div></div><div id="lightwindow_data_slide" ><div id="lightwindow_data_slide_inner" ><div id="lightwindow_data_details" ><div id="lightwindow_data_gallery_container" ><span id="lightwindow_data_gallery_current"></span> of <span id="lightwindow_data_gallery_total"></span></div><div id="lightwindow_data_author_container" >by <span id="lightwindow_data_author"></span></div></div><div id="lightwindow_data_caption" ></div></div></div></div>',loading:'<div id="lightwindow_loading" ><img src="/FCWSite/include/lightwindow/ajax-loading.gif" alt="loading" /><span>Loading or <a href="javascript: myLightWindow.deactivate();">Cancel</a></span><iframe name="lightwindow_loading_shim" id="lightwindow_loading_shim" src="javascript:false;" frameBorder="0" scrolling="no"></iframe></div>',iframe:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><body>{body_replace}</body></html>',gallery:{top:'<div class="lightwindow_galleries_list"><h1>{gallery_title_replace}</h1><ul>',middle:"<li>{gallery_link_replace}</li>",bottom:"</ul></div>"}},formMethod:"get",hideFlash:false,hideGalleryTab:false,showTitleBar:true,animationHandler:false,navigationHandler:false,transitionHandler:false,finalAnimationHandler:false,formHandler:false,galleryAnimationHandler:false,showGalleryCount:true},a||{});this.duration=((11-this.options.resizeSpeed)*0.15);this._setupLinks();this._getScroll();this._getPageDimensions();this._browserDimensions();this._addLightWindowMarkup(false);this._setupDimensions();this.buildGalleryList()},activate:function(a,b){this._clearWindowContents(true);this._addLoadingWindowMarkup();this._setupWindowElements(b);this._getScroll();this._browserDimensions();this._setupDimensions();this._toggleTroubleElements("hidden",false);this._displayLightWindow("block","hidden");this._setStatus(true);this._monitorKeyboard(true);this._prepareIE(true);this._loadWindow()},deactivate:function(){this.windowActive=false;this.activeGallery=false;if(!this.options.hideGalleryTab){this._handleGalleryAnimation(false)}this.animating=false;this.element=null;this._displayLightWindow("none","visible");this._clearWindowContents(false);var a=Effect.Queues.get("lightwindowAnimation").each(function(b){b.cancel()});this._prepareIE(false);this._setupDimensions();this._toggleTroubleElements("visible",false);this._monitorKeyboard(false)},createWindow:function(b,a){this._processLink($(b))},activateWindow:function(a){this.element=Object.extend({href:null,title:null,author:null,caption:null,rel:null,top:null,left:null,type:null,showImages:null,height:null,width:null,loadingAnimation:null,iframeEmbed:null,form:null},a||{});this.contentToFetch=this.element.href;this.windowType=this.element.type?this.element.type:this._fileType(this.element.href);this._clearWindowContents(true);this._addLoadingWindowMarkup();this._getScroll();this._browserDimensions();this._setupDimensions();this._toggleTroubleElements("hidden",false);this._displayLightWindow("block","hidden");this._setStatus(true);this._monitorKeyboard(true);this._prepareIE(true);this._loadWindow()},submitForm:function(a){if(this.options.formHandler){this.options.formHandler(a)}else{this._defaultFormHandler(a)}},openWindow:function(a){var a=$(a);this.windowActive=true;this._clearWindowContents(true);this._addLoadingWindowMarkup();this._setupWindowElements(a);this._setStatus(true);this._handleTransition()},navigateWindow:function(a){this._handleNavigation(false);if(a=="previous"){this.openWindow(this.navigationObservers.previous)}else{if(a=="next"){this.openWindow(this.navigationObservers.next)}}},buildGalleryList:function(){var b="";var a;for(i in this.galleries){if(typeof this.galleries[i]=="object"){b+=(this.options.skin.gallery.top).replace("{gallery_title_replace}",unescape(i));for(j in this.galleries[i]){if(typeof this.galleries[i][j]=="object"){a='<a href="#" id="lightwindow_gallery_'+i+"_"+j+'" >'+unescape(j)+"</a>";b+=(this.options.skin.gallery.middle).replace("{gallery_link_replace}",a)}}b+=this.options.skin.gallery.bottom}}new Insertion.Top("lightwindow_galleries_list",b);for(i in this.galleries){if(typeof this.galleries[i]=="object"){for(j in this.galleries[i]){if(typeof this.galleries[i][j]=="object"){Event.observe($("lightwindow_gallery_"+i+"_"+j),"click",this.openWindow.bind(this,this.galleries[i][j][0]),false);$("lightwindow_gallery_"+i+"_"+j).onclick=function(){return false}}}}}},_setupLinks:function(){var a=$$("."+this.options.classNames.standard);a.each(function(b){this._processLink(b)}.bind(this))},_processLink:function(b){if((this._fileType(b.getAttribute("href"))=="image"||this._fileType(b.getAttribute("href"))=="media")){if(gallery=this._getGalleryInfo(b.rel)){if(!this.galleries[gallery[0]]){this.galleries[gallery[0]]=new Array()}if(!this.galleries[gallery[0]][gallery[1]]){this.galleries[gallery[0]][gallery[1]]=new Array()}this.galleries[gallery[0]][gallery[1]].push(b)}}var c=b.getAttribute("href");if(c.indexOf("?")>-1){c=c.substring(0,c.indexOf("?"))}var a=c.substring(c.indexOf("#")+1);if($(a)){$(a).setStyle({display:"none"})}Event.observe(b,"click",this.activate.bindAsEventListener(this,b),false);b.onclick=function(){return false}},_setupActions:function(){var a=$$("#lightwindow_container ."+this.options.classNames.action);a.each(function(b){Event.observe(b,"click",this[b.getAttribute("rel")].bindAsEventListener(this,b),false);b.onclick=function(){return false}}.bind(this))},_addLightWindowMarkup:function(d){var c=Element.extend(document.createElement("div"));c.setAttribute("id","lightwindow_overlay");if(Prototype.Browser.Gecko){c.setStyle({backgroundImage:"url("+this.options.overlay.presetImage+")",backgroundRepeat:"repeat",height:this.pageDimensions.height+"px"})}else{c.setStyle({opacity:this.options.overlay.opacity,backgroundImage:"url("+this.options.overlay.image+")",backgroundRepeat:"repeat",height:this.pageDimensions.height+"px"})}var b=document.createElement("div");b.setAttribute("id","lightwindow");b.innerHTML=this.options.skin.main;var a=document.getElementsByTagName("body")[0];a.appendChild(c);a.appendChild(b);if($("lightwindow_title_bar_close_link")){Event.observe("lightwindow_title_bar_close_link","click",this.deactivate.bindAsEventListener(this));$("lightwindow_title_bar_close_link").onclick=function(){return false}}Event.observe($("lightwindow_previous"),"click",this.navigateWindow.bind(this,"previous"),false);$("lightwindow_previous").onclick=function(){return false};Event.observe($("lightwindow_next"),"click",this.navigateWindow.bind(this,"next"),false);$("lightwindow_next").onclick=function(){return false};if(!this.options.hideGalleryTab){Event.observe($("lightwindow_galleries_tab"),"click",this._handleGalleryAnimation.bind(this,true),false);$("lightwindow_galleries_tab").onclick=function(){return false}}if(Prototype.Browser.IE){Event.observe(document,"mousewheel",this._stopScrolling.bindAsEventListener(this),false)}else{Event.observe(window,"DOMMouseScroll",this._stopScrolling.bindAsEventListener(this),false)}Event.observe(c,"click",this.deactivate.bindAsEventListener(this),false);c.onclick=function(){return false}},_addLoadingWindowMarkup:function(){$("lightwindow_contents").innerHTML+=this.options.skin.loading},_setupWindowElements:function(a){this.element=a;this.element.title=null?"":a.getAttribute("title");this.element.author=null?"":a.getAttribute("author");this.element.caption=null?"":a.getAttribute("caption");this.element.rel=null?"":a.getAttribute("rel");this.element.params=null?"":a.getAttribute("params");this.contentToFetch=this.element.href;this.windowType=this._getParameter("lightwindow_type")?this._getParameter("lightwindow_type"):this._fileType(this.contentToFetch)},_clearWindowContents:function(a){if($("lightwindow_iframe")){Element.remove($("lightwindow_iframe"))}if($("lightwindow_media_primary")){try{$("lightwindow_media_primary").Stop()}catch(b){}Element.remove($("lightwindow_media_primary"))}if($("lightwindow_media_secondary")){try{$("lightwindow_media_secondary").Stop()}catch(b){}Element.remove($("lightwindow_media_secondary"))}this.activeGallery=false;this._handleNavigation(this.activeGallery);if(a){$("lightwindow_contents").innerHTML="";$("lightwindow_contents").setStyle({overflow:"hidden"});if(!this.windowActive){$("lightwindow_data_slide_inner").setStyle({display:"none"});$("lightwindow_title_bar_title").innerHTML=""}$("lightwindow_data_slide").setStyle({height:"auto"})}this.resizeTo.height=null;this.resizeTo.width=null},_setStatus:function(a){this.animating=a;if(a){Element.show("lightwindow_loading")}if(!(/MSIE 6./i.test(navigator.userAgent))){this._fixedWindow(a)}},_fixedWindow:function(a){if(a){if(this.windowActive){this._getScroll();$("lightwindow").setStyle({position:"absolute",top:parseFloat($("lightwindow").getStyle("top"))+this.pagePosition.y+"px",left:parseFloat($("lightwindow").getStyle("left"))+this.pagePosition.x+"px"})}else{$("lightwindow").setStyle({position:"absolute"})}}else{if(this.windowActive){this._getScroll();$("lightwindow").setStyle({position:"fixed",top:parseFloat($("lightwindow").getStyle("top"))-this.pagePosition.y+"px",left:parseFloat($("lightwindow").getStyle("left"))-this.pagePosition.x+"px"})}else{if($("lightwindow_iframe")){this._browserDimensions()}$("lightwindow").setStyle({position:"fixed",top:(parseFloat(this._getParameter("lightwindow_top"))?parseFloat(this._getParameter("lightwindow_top"))+"px":this.dimensions.viewport.height/2+"px"),left:(parseFloat(this._getParameter("lightwindow_left"))?parseFloat(this._getParameter("lightwindow_left"))+"px":this.dimensions.viewport.width/2+"px")})}}},_prepareIE:function(g){if(Prototype.Browser.IE){var b,d,f;if(g){var b="100%"}else{var b="auto"}var a=document.getElementsByTagName("body")[0];var c=document.getElementsByTagName("html")[0];c.style.height=a.style.height=b}},_stopScrolling:function(a){if(this.animating){if(a.preventDefault){a.preventDefault()}a.returnValue=false}},_getScroll:function(){if(typeof(window.pageYOffset)=="number"){this.pagePosition.x=window.pageXOffset;this.pagePosition.y=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){this.pagePosition.x=document.body.scrollLeft;this.pagePosition.y=document.body.scrollTop}else{if(document.documentElement){this.pagePosition.x=document.documentElement.scrollLeft;this.pagePosition.y=document.documentElement.scrollTop}}}},_setScroll:function(a,b){document.documentElement.scrollLeft=a;document.documentElement.scrollTop=b},_toggleTroubleElements:function(h,a){var g=null;if(a){g=$("lightwindow_contents").getElementsByTagName("select")}else{g=document.getElementsByTagName("select")}for(var c=0;c<g.length;c++){if(g[c].getAttribute("hidden")==null||g[c].getAttribute("hidden")!="false"){if(!$("ctl00_Header1_navServices_ddlServRegion")){g[c].style.visibility=h}}}if(!a){if(this.options.hideFlash){var f=document.getElementsByTagName("object");for(c=0;c!=f.length;c++){f[c].style.visibility=h}var b=document.getElementsByTagName("embed");for(c=0;c!=b.length;c++){b[c].style.visibility=h}}var d=document.getElementsByTagName("iframe");for(c=0;c!=d.length;c++){d[c].style.visibility=h}}},_getPageDimensions:function(){var c,d;if(window.innerHeight&&window.scrollMaxY){c=document.body.scrollWidth;d=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){c=document.body.scrollWidth;d=document.body.scrollHeight}else{c=document.body.offsetWidth;d=document.body.offsetHeight}}var b,a;if(self.innerHeight){b=self.innerWidth;a=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;a=document.documentElement.clientHeight}else{if(document.body){b=document.body.clientWidth;a=document.body.clientHeight}}}if(d<a){this.pageDimensions.height=a}else{this.pageDimensions.height=d}if(c<b){this.pageDimensions.width=b}else{this.pageDimensions.width=c}},_displayLightWindow:function(a,b){$("lightwindow_overlay").style.display=$("lightwindow").style.display=$("lightwindow_container").style.display=a;$("lightwindow_overlay").style.visibility=$("lightwindow").style.visibility=$("lightwindow_container").style.visibility=b},_setupDimensions:function(){var c,d;switch(this.windowType){case"page":c=this.options.dimensions.page.height;d=this.options.dimensions.page.width;break;case"image":c=this.options.dimensions.image.height;d=this.options.dimensions.image.width;break;case"media":c=this.options.dimensions.media.height;d=this.options.dimensions.media.width;break;case"external":c=this.options.dimensions.external.height;d=this.options.dimensions.external.width;break;case"inline":c=this.options.dimensions.inline.height;d=this.options.dimensions.inline.width;break;default:c=this.options.dimensions.page.height;d=this.options.dimensions.page.width;break}var a=this._getParameter("lightwindow_top")?parseFloat(this._getParameter("lightwindow_top"))+this.pagePosition.y:this.dimensions.viewport.height/2+this.pagePosition.y;var b=this._getParameter("lightwindow_left")?parseFloat(this._getParameter("lightwindow_left"))+this.pagePosition.x:this.dimensions.viewport.width/2+this.pagePosition.x;$("lightwindow").setStyle({top:a+"px",left:b+"px"});$("lightwindow_container").setStyle({height:c+"px",width:d+"px",left:-(d/2)+"px",top:-(c/2)+"px"});$("lightwindow_contents").setStyle({height:c+"px",width:d+"px"})},_fileType:function(f){var a=new RegExp("[^.].("+this.options.fileTypes.image.join("|")+")s*$","i");if(a.test(f)){return"image"}if(f.indexOf("#")>-1&&(document.domain==this._getDomain(f))){return"inline"}if(f.indexOf("?")>-1){f=f.substring(0,f.indexOf("?"))}var d="unknown";var c=new RegExp("[^.].("+this.options.fileTypes.page.join("|")+")s*$","i");var b=new RegExp("[^.].("+this.options.fileTypes.media.join("|")+")s*$","i");if(document.domain!=this._getDomain(f)){d="external"}if(b.test(f)){d="media"}if(d=="external"||d=="media"){return d}if(c.test(f)||f.substr((f.length-1),f.length)=="/"){d="page"}return d},_fileExtension:function(b){if(b.indexOf("?")>-1){b=b.substring(0,b.indexOf("?"))}var a="";for(var c=(b.length-1);c>-1;c--){if(b.charAt(c)=="."){return a}a=b.charAt(c)+a}},_monitorKeyboard:function(a){if(a){document.onkeydown=this._eventKeypress.bind(this)}else{document.onkeydown=""}},_eventKeypress:function(a){if(a==null){var b=event.keyCode}else{var b=a.which}switch(b){case 27:this.deactivate();break;case 13:return;default:break}if(this.animating){return false}switch(String.fromCharCode(b).toLowerCase()){case"p":if(this.navigationObservers.previous){this.navigateWindow("previous")}break;case"n":if(this.navigationObservers.next){this.navigateWindow("next")}break;default:break}},_getGalleryInfo:function(a){if(!a){return false}if(a.indexOf("[")>-1){return new Array(escape(a.substring(0,a.indexOf("["))),escape(a.substring(a.indexOf("[")+1,a.indexOf("]"))))}else{return false}},_getDomain:function(g){var c=g.indexOf("//");var b=c+2;var h=g.substring(b,g.length);var d=h.indexOf("/");var a=h.substring(0,d);if(a.indexOf(":")>-1){var f=a.indexOf(":");a=a.substring(0,f)}return a},_getParameter:function(f,h){if(!this.element){return false}if(f=="lightwindow_top"&&this.element.top){return unescape(this.element.top)}else{if(f=="lightwindow_left"&&this.element.left){return unescape(this.element.left)}else{if(f=="lightwindow_type"&&this.element.type){return unescape(this.element.type)}else{if(f=="lightwindow_show_images"&&this.element.showImages){return unescape(this.element.showImages)}else{if(f=="lightwindow_height"&&this.element.height){return unescape(this.element.height)}else{if(f=="lightwindow_width"&&this.element.width){return unescape(this.element.width)}else{if(f=="lightwindow_loading_animation"&&this.element.loadingAnimation){return unescape(this.element.loadingAnimation)}else{if(f=="lightwindow_iframe_embed"&&this.element.iframeEmbed){return unescape(this.element.iframeEmbed)}else{if(f=="lightwindow_form"&&this.element.form){return unescape(this.element.form)}else{if(!h){if(this.element.params){h=this.element.params}else{return}}var k;var g=h.split(",");var b=f+"=";var a=b.length;for(var d=0;d<g.length;d++){if(g[d].substr(0,a)==b){var c=g[d].split("=");k=c[1];break}}if(!k){return false}else{return unescape(k)}}}}}}}}}}},_browserDimensions:function(){if(Prototype.Browser.IE){this.dimensions.viewport.height=document.documentElement.clientHeight;this.dimensions.viewport.width=document.documentElement.clientWidth}else{this.dimensions.viewport.height=window.innerHeight;this.dimensions.viewport.width=document.width||document.body.offsetWidth}},_getScrollerWidth:function(){var d=Element.extend(document.createElement("div"));d.setAttribute("id","lightwindow_scroll_div");d.setStyle({position:"absolute",top:"-10000px",left:"-10000px",width:"100px",height:"100px",overflow:"hidden"});var b=Element.extend(document.createElement("div"));b.setAttribute("id","lightwindow_content_scroll_div");b.setStyle({width:"100%",height:"200px"});d.appendChild(b);var a=document.getElementsByTagName("body")[0];a.appendChild(d);var c=$("lightwindow_content_scroll_div").offsetWidth;d.style.overflow="auto";var f=$("lightwindow_content_scroll_div").offsetWidth;Element.remove($("lightwindow_scroll_div"));this.scrollbarOffset=c-f},_addParamToObject:function(b,f,c,a){var d=document.createElement("param");d.setAttribute("value",f);d.setAttribute("name",b);if(a){d.setAttribute("id",a)}c.appendChild(d);return c},_outerHTML:function(c){if(Prototype.Browser.IE){return c.outerHTML}else{var a=c.cloneNode(true);var b=document.createElement("div");b.appendChild(a);return b.innerHTML}},_convertToMarkup:function(d,a){var c=this._outerHTML(d).replace("</"+a+">","");if(Prototype.Browser.IE){for(var b=0;b<d.childNodes.length;b++){c+=this._outerHTML(d.childNodes[b])}c+="</"+a+">"}return c},_appendObject:function(d,b,a){if(Prototype.Browser.IE){a.innerHTML+=this._convertToMarkup(d,b);if(this.options.EOLASFix.indexOf(this._fileType(this.element.href))>-1){var f=document.getElementsByTagName("object");for(var c=0;c<f.length;c++){if(f[c].getAttribute("data")){f[c].removeAttribute("data")}f[c].outerHTML=f[c].outerHTML;f[c].style.visibility="visible"}}}else{a.appendChild(d)}},_appendIframe:function(b){var a=document.createElement("iframe");a.setAttribute("id","lightwindow_iframe");a.setAttribute("name","lightwindow_iframe");a.setAttribute("src","about:blank");a.setAttribute("height","100%");a.setAttribute("width","100%");a.setAttribute("frameborder","0");a.setAttribute("marginwidth","0");a.setAttribute("marginheight","0");a.setAttribute("scrolling",b);this._appendObject(a,"iframe",$("lightwindow_contents"))},_writeToIframe:function(a){var b=this.options.skin.iframe;b=b.replace("{body_replace}",a);if($("lightwindow_iframe").contentWindow){$("lightwindow_iframe").contentWindow.document.open();$("lightwindow_iframe").contentWindow.document.write(b);$("lightwindow_iframe").contentWindow.document.close()}else{$("lightwindow_iframe").contentDocument.open();$("lightwindow_iframe").contentDocument.write(b);$("lightwindow_iframe").contentDocument.close()}},_loadWindow:function(){switch(this.windowType){case"image":var b=0;var d=[];this.checkImage=[];this.resizeTo.height=this.resizeTo.width=0;this.imageCount=this._getParameter("lightwindow_show_images")?parseInt(this._getParameter("lightwindow_show_images")):1;if(gallery=this._getGalleryInfo(this.element.rel)){for(b=0;b<this.galleries[gallery[0]][gallery[1]].length;b++){if(this.contentToFetch.indexOf(this.galleries[gallery[0]][gallery[1]][b].href)>-1){break}}if(this.galleries[gallery[0]][gallery[1]][b-this.imageCount]){this.navigationObservers.previous=this.galleries[gallery[0]][gallery[1]][b-this.imageCount]}else{this.navigationObservers.previous=false}if(this.galleries[gallery[0]][gallery[1]][b+this.imageCount]){this.navigationObservers.next=this.galleries[gallery[0]][gallery[1]][b+this.imageCount]}else{this.navigationObservers.next=false}this.activeGallery=true}else{this.navigationObservers.previous=false;this.navigationObservers.next=false;this.activeGallery=false}for(var c=b;c<(b+this.imageCount);c++){if(gallery&&this.galleries[gallery[0]][gallery[1]][c]){this.contentToFetch=this.galleries[gallery[0]][gallery[1]][c].href;this.galleryLocation={current:(c+1)/this.imageCount,total:(this.galleries[gallery[0]][gallery[1]].length)/this.imageCount};if(!this.galleries[gallery[0]][gallery[1]][c+this.imageCount]){$("lightwindow_next").setStyle({display:"none"})}else{$("lightwindow_next").setStyle({display:"block"});$("lightwindow_next_title").innerHTML=this.galleries[gallery[0]][gallery[1]][c+this.imageCount].title}if(!this.galleries[gallery[0]][gallery[1]][c-this.imageCount]){$("lightwindow_previous").setStyle({display:"none"})}else{$("lightwindow_previous").setStyle({display:"block"});$("lightwindow_previous_title").innerHTML=this.galleries[gallery[0]][gallery[1]][c-this.imageCount].title}}d[c]=document.createElement("img");d[c].setAttribute("id","lightwindow_image_"+c);d[c].setAttribute("border","0");d[c].setAttribute("src",this.contentToFetch);$("lightwindow_contents").appendChild(d[c]);this.checkImage[c]=new PeriodicalExecuter(function(g){if(!(typeof $("lightwindow_image_"+g).naturalWidth!="undefined"&&$("lightwindow_image_"+g).naturalWidth==0)){this.checkImage[g].stop();var h=$("lightwindow_image_"+g).getHeight();if(h>this.resizeTo.height){this.resizeTo.height=h}this.resizeTo.width+=$("lightwindow_image_"+g).getWidth();this.imageCount--;$("lightwindow_image_"+g).setStyle({height:"100%"});if(this.imageCount==0){this._processWindow()}}}.bind(this,c),1)}break;case"media":var b=0;this.resizeTo.height=this.resizeTo.width=0;if(gallery=this._getGalleryInfo(this.element.rel)){for(b=0;b<this.galleries[gallery[0]][gallery[1]].length;b++){if(this.contentToFetch.indexOf(this.galleries[gallery[0]][gallery[1]][b].href)>-1){break}}if(this.galleries[gallery[0]][gallery[1]][b-1]){this.navigationObservers.previous=this.galleries[gallery[0]][gallery[1]][b-1]}else{this.navigationObservers.previous=false}if(this.galleries[gallery[0]][gallery[1]][b+1]){this.navigationObservers.next=this.galleries[gallery[0]][gallery[1]][b+1]}else{this.navigationObservers.next=false}this.activeGallery=true}else{this.navigationObservers.previous=false;this.navigationObservers.next=false;this.activeGallery=false}if(gallery&&this.galleries[gallery[0]][gallery[1]][b]){this.contentToFetch=this.galleries[gallery[0]][gallery[1]][b].href;this.galleryLocation={current:b+1,total:this.galleries[gallery[0]][gallery[1]].length};if(!this.galleries[gallery[0]][gallery[1]][b+1]){$("lightwindow_next").setStyle({display:"none"})}else{$("lightwindow_next").setStyle({display:"block"});$("lightwindow_next_title").innerHTML=this.galleries[gallery[0]][gallery[1]][b+1].title}if(!this.galleries[gallery[0]][gallery[1]][b-1]){$("lightwindow_previous").setStyle({display:"none"})}else{$("lightwindow_previous").setStyle({display:"block"});$("lightwindow_previous_title").innerHTML=this.galleries[gallery[0]][gallery[1]][b-1].title}}if(this._getParameter("lightwindow_iframe_embed")){this.resizeTo.height=this.dimensions.viewport.height;this.resizeTo.width=this.dimensions.viewport.width}else{this.resizeTo.height=this._getParameter("lightwindow_height");this.resizeTo.width=this._getParameter("lightwindow_width")}this._processWindow();break;case"external":this._appendIframe("auto");this.resizeTo.height=this.dimensions.viewport.height;this.resizeTo.width=this.dimensions.viewport.width;this._processWindow();break;case"page":var f=new Ajax.Request(this.contentToFetch,{method:"get",parameters:"",onComplete:function(g){$("lightwindow_contents").innerHTML+=g.responseText;this.resizeTo.height=$("lightwindow_contents").scrollHeight+(this.options.contentOffset.height);this.resizeTo.width=$("lightwindow_contents").scrollWidth+(this.options.contentOffset.width);this._processWindow()}.bind(this)});break;case"inline":var a=this.contentToFetch;if(a.indexOf("?")>-1){a=a.substring(0,a.indexOf("?"))}a=a.substring(a.indexOf("#")+1);new Insertion.Top($("lightwindow_contents"),$(a).innerHTML);this.resizeTo.height=$("lightwindow_contents").scrollHeight+(this.options.contentOffset.height);this.resizeTo.width=$("lightwindow_contents").scrollWidth+(this.options.contentOffset.width);this._toggleTroubleElements("hidden",true);this._processWindow();break;default:throw ("Page Type could not be determined, please amend this lightwindow URL "+this.contentToFetch);break}},_resizeWindowToFit:function(){if(this.resizeTo.height+this.dimensions.cruft.height>this.dimensions.viewport.height){var a=this.resizeTo.height/this.resizeTo.width;this.resizeTo.height=this.dimensions.viewport.height-this.dimensions.cruft.height-(2*this.options.viewportPadding);if(this.windowType=="image"||(this.windowType=="media"&&!this._getParameter("lightwindow_iframe_embed"))){this.resizeTo.width=this.resizeTo.height/a;$("lightwindow_data_slide_inner").setStyle({width:this.resizeTo.width+"px"})}}if(this.resizeTo.width+this.dimensions.cruft.width>this.dimensions.viewport.width){var b=this.resizeTo.width/this.resizeTo.height;this.resizeTo.width=this.dimensions.viewport.width-2*this.dimensions.cruft.width-(2*this.options.viewportPadding);if(this.windowType=="image"||(this.windowType=="media"&&!this._getParameter("lightwindow_iframe_embed"))){this.resizeTo.height=this.resizeTo.width/b;$("lightwindow_data_slide_inner").setStyle({height:this.resizeTo.height+"px"})}}},_presetWindowSize:function(){if(this._getParameter("lightwindow_height")){this.resizeTo.height=parseFloat(this._getParameter("lightwindow_height"))}if(this._getParameter("lightwindow_width")){this.resizeTo.width=parseFloat(this._getParameter("lightwindow_width"))}},_processWindow:function(){this.dimensions.dataEffects=[];if(this.element.caption||this.element.author||(this.activeGallery&&this.options.showGalleryCount)){if(this.element.caption){$("lightwindow_data_caption").innerHTML=this.element.caption;$("lightwindow_data_caption").setStyle({display:"block"})}else{$("lightwindow_data_caption").setStyle({display:"none"})}if(this.element.author){$("lightwindow_data_author").innerHTML=this.element.author;$("lightwindow_data_author_container").setStyle({display:"block"})}else{$("lightwindow_data_author_container").setStyle({display:"none"})}if(this.activeGallery&&this.options.showGalleryCount){$("lightwindow_data_gallery_current").innerHTML=this.galleryLocation.current;$("lightwindow_data_gallery_total").innerHTML=this.galleryLocation.total;$("lightwindow_data_gallery_container").setStyle({display:"block"})}else{$("lightwindow_data_gallery_container").setStyle({display:"none"})}$("lightwindow_data_slide_inner").setStyle({width:this.resizeTo.width+"px",height:"auto",visibility:"visible",display:"block"});$("lightwindow_data_slide").setStyle({height:$("lightwindow_data_slide").getHeight()+"px",width:"1px",overflow:"hidden",display:"block"})}else{$("lightwindow_data_slide").setStyle({display:"none",width:"auto"});$("lightwindow_data_slide_inner").setStyle({display:"none",visibility:"hidden",width:this.resizeTo.width+"px",height:"0px"})}if(this.element.title!="null"){$("lightwindow_title_bar_title").innerHTML=this.element.title}else{$("lightwindow_title_bar_title").innerHTML=""}var b={height:$("lightwindow_container").getHeight(),width:$("lightwindow_container").getWidth()};$("lightwindow_container").setStyle({height:"auto",width:$("lightwindow_container").getWidth()+this.options.contentOffset.width-(this.windowActive?this.options.contentOffset.width:0)+"px"});var a={height:$("lightwindow_container").getHeight(),width:$("lightwindow_container").getWidth()};this.containerChange={height:b.height-a.height,width:b.width-a.width};this.dimensions.container={height:$("lightwindow_container").getHeight(),width:$("lightwindow_container").getWidth()};this.dimensions.cruft={height:this.dimensions.container.height-$("lightwindow_contents").getHeight()+this.options.contentOffset.height,width:this.dimensions.container.width-$("lightwindow_contents").getWidth()+this.options.contentOffset.width};this._presetWindowSize();this._resizeWindowToFit();if(!this.windowActive){$("lightwindow_container").setStyle({left:-(this.dimensions.container.width/2)+"px",top:-(this.dimensions.container.height/2)+"px"})}$("lightwindow_container").setStyle({height:this.dimensions.container.height+"px",width:this.dimensions.container.width+"px"});this._displayLightWindow("block","visible");this._animateLightWindow()},_animateLightWindow:function(){if(this.options.animationHandler){this.options.animationHandler().bind(this)}else{this._defaultAnimationHandler()}},_handleNavigation:function(a){if(this.options.navigationHandler){this.options.navigationHandler().bind(this,a)}else{this._defaultDisplayNavigation(a)}},_handleTransition:function(){if(this.options.transitionHandler){this.options.transitionHandler().bind(this)}else{this._defaultTransitionHandler()}},_handleFinalWindowAnimation:function(a){if(this.options.finalAnimationHandler){this.options.finalAnimationHandler().bind(this,a)}else{this._defaultfinalWindowAnimationHandler(a)}},_handleGalleryAnimation:function(a){if(this.options.galleryAnimationHandler){this.options.galleryAnimationHandler().bind(this,a)}else{this._defaultGalleryAnimationHandler(a)}},_defaultDisplayNavigation:function(a){if(a){$("lightwindow_navigation").setStyle({display:"block",height:$("lightwindow_contents").getHeight()+"px",width:"100%",marginTop:this.options.dimensions.titleHeight+"px"})}else{$("lightwindow_navigation").setStyle({display:"none",height:"auto",width:"auto"})}},_defaultAnimationHandler:function(){if(this.element.caption||this.element.author||(this.activeGallery&&this.options.showGalleryCount)){$("lightwindow_data_slide").setStyle({display:"none",width:"auto"});this.dimensions.dataEffects.push(new Effect.SlideDown("lightwindow_data_slide",{sync:true}),new Effect.Appear("lightwindow_data_slide",{sync:true,from:0,to:1}))}$("lightwindow_title_bar_inner").setStyle({height:"0px",marginTop:this.options.dimensions.titleHeight+"px"});this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_title_bar_inner",{sync:true,style:{height:this.options.dimensions.titleHeight+"px",marginTop:"0px"}}),new Effect.Appear("lightwindow_title_bar_inner",{sync:true,from:0,to:1}));if(!this.options.hideGalleryTab){this._handleGalleryAnimation(false);if($("lightwindow_galleries_tab_container").getHeight()==0){this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_galleries_tab_container",{sync:true,style:{height:"20px",marginTop:"0px"}}));$("lightwindow_galleries").setStyle({width:"0px"})}}var b=false;var a=this.dimensions.container.width-$("lightwindow_contents").getWidth()+this.resizeTo.width+this.options.contentOffset.width;if(a!=$("lightwindow_container").getWidth()){new Effect.Parallel([new Effect.Scale("lightwindow_contents",100*(this.resizeTo.width/$("lightwindow_contents").getWidth()),{scaleFrom:100*($("lightwindow_contents").getWidth()/($("lightwindow_contents").getWidth()+(this.options.contentOffset.width))),sync:true,scaleY:false,scaleContent:false}),new Effect.Scale("lightwindow_container",100*(a/(this.dimensions.container.width)),{sync:true,scaleY:false,scaleFromCenter:true,scaleContent:false})],{duration:this.duration,delay:0.25,queue:{position:"end",scope:"lightwindowAnimation"}})}a=this.dimensions.container.height-$("lightwindow_contents").getHeight()+this.resizeTo.height+this.options.contentOffset.height;if(a!=$("lightwindow_container").getHeight()){new Effect.Parallel([new Effect.Scale("lightwindow_contents",100*(this.resizeTo.height/$("lightwindow_contents").getHeight()),{scaleFrom:100*($("lightwindow_contents").getHeight()/($("lightwindow_contents").getHeight()+(this.options.contentOffset.height))),sync:true,scaleX:false,scaleContent:false}),new Effect.Scale("lightwindow_container",100*(a/(this.dimensions.container.height)),{sync:true,scaleX:false,scaleFromCenter:true,scaleContent:false})],{duration:this.duration,afterFinish:function(){if(this.dimensions.dataEffects.length>0){if(!this.options.hideGalleryTab){$("lightwindow_galleries").setStyle({width:this.resizeTo.width+"px"})}new Effect.Parallel(this.dimensions.dataEffects,{duration:this.duration,afterFinish:function(){this._finishWindow()}.bind(this),queue:{position:"end",scope:"lightwindowAnimation"}})}}.bind(this),queue:{position:"end",scope:"lightwindowAnimation"}});b=true}if(!b&&this.dimensions.dataEffects.length>0){new Effect.Parallel(this.dimensions.dataEffects,{duration:this.duration,beforeStart:function(){if(!this.options.hideGalleryTab){$("lightwindow_galleries").setStyle({width:this.resizeTo.width+"px"})}if(this.containerChange.height!=0||this.containerChange.width!=0){new Effect.MoveBy("lightwindow_container",this.containerChange.height,this.containerChange.width,{transition:Effect.Transitions.sinoidal})}}.bind(this),afterFinish:function(){this._finishWindow()}.bind(this),queue:{position:"end",scope:"lightwindowAnimation"}})}},_defaultfinalWindowAnimationHandler:function(a){if(this.windowType=="media"||this._getParameter("lightwindow_loading_animation")){Element.hide("lightwindow_loading");this._handleNavigation(this.activeGallery);this._setStatus(false)}else{Effect.Fade("lightwindow_loading",{duration:0.75,delay:1,afterFinish:function(){if(this.windowType!="image"&&this.windowType!="media"&&this.windowType!="external"){$("lightwindow_contents").setStyle({overflow:"auto"})}this._handleNavigation(this.activeGallery);this._defaultGalleryAnimationHandler();this._setStatus(false)}.bind(this),queue:{position:"end",scope:"lightwindowAnimation"}})}},_defaultGalleryAnimationHandler:function(b){if(this.activeGallery){$("lightwindow_galleries").setStyle({display:"block",marginBottom:$("lightwindow_data_slide").getHeight()+this.options.contentOffset.height/2+"px"});$("lightwindow_navigation").setStyle({height:$("lightwindow_contents").getHeight()-20+"px"})}else{$("lightwindow_galleries").setStyle({display:"none"});$("lightwindow_galleries_tab_container").setStyle({height:"0px",marginTop:"20px"});$("lightwindow_galleries_list").setStyle({height:"0px"});return false}if(b){if($("lightwindow_galleries_list").getHeight()==0){var a=$("lightwindow_contents").getHeight()*0.8;$("lightwindow_galleries_tab_span").className="down"}else{var a=0;$("lightwindow_galleries_tab_span").className="up"}new Effect.Morph("lightwindow_galleries_list",{duration:this.duration,transition:Effect.Transitions.sinoidal,style:{height:a+"px"},beforeStart:function(){$("lightwindow_galleries_list").setStyle({overflow:"hidden"})},afterFinish:function(){$("lightwindow_galleries_list").setStyle({overflow:"auto"})},queue:{position:"end",scope:"lightwindowAnimation"}})}},_defaultTransitionHandler:function(){this.dimensions.dataEffects=[];if($("lightwindow_data_slide").getStyle("display")!="none"){this.dimensions.dataEffects.push(new Effect.SlideUp("lightwindow_data_slide",{sync:true}),new Effect.Fade("lightwindow_data_slide",{sync:true,from:1,to:0}))}if(!this.options.hideGalleryTab){if($("lightwindow_galleries").getHeight()!=0&&!this.options.hideGalleryTab){this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_galleries_tab_container",{sync:true,style:{height:"0px",marginTop:"20px"}}))}if($("lightwindow_galleries_list").getHeight()!=0){$("lightwindow_galleries_tab_span").className="up";this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_galleries_list",{sync:true,style:{height:"0px"},transition:Effect.Transitions.sinoidal,beforeStart:function(){$("lightwindow_galleries_list").setStyle({overflow:"hidden"})},afterFinish:function(){$("lightwindow_galleries_list").setStyle({overflow:"auto"})}}))}}this.dimensions.dataEffects.push(new Effect.Morph("lightwindow_title_bar_inner",{sync:true,style:{height:"0px",marginTop:this.options.dimensions.titleHeight+"px"}}),new Effect.Fade("lightwindow_title_bar_inner",{sync:true,from:1,to:0}));new Effect.Parallel(this.dimensions.dataEffects,{duration:this.duration,afterFinish:function(){this._loadWindow()}.bind(this),queue:{position:"end",scope:"lightwindowAnimation"}})},_defaultFormHandler:function(a){var b=Event.element(a).parentNode;var d=Form.serialize(this._getParameter("lightwindow_form",b.getAttribute("params")));if(this.options.formMethod=="post"){var c=new Ajax.Request(b.href,{method:"post",postBody:d,onComplete:this.openWindow.bind(this,b)})}else{if(this.options.formMethod=="get"){var c=new Ajax.Request(b.href,{method:"get",parameters:d,onComplete:this.openWindow.bind(this,b)})}}},_finishWindow:function(){if(this.windowType=="external"){$("lightwindow_iframe").setAttribute("src",this.element.href);this._handleFinalWindowAnimation(1)}else{if(this.windowType=="media"){var b=document.createElement("object");b.setAttribute("classid",this.options.classids[this._fileExtension(this.contentToFetch)]);b.setAttribute("codebase",this.options.codebases[this._fileExtension(this.contentToFetch)]);b.setAttribute("id","lightwindow_media_primary");b.setAttribute("name","lightwindow_media_primary");b.setAttribute("width",this.resizeTo.width);b.setAttribute("height",this.resizeTo.height);b=this._addParamToObject("movie",this.contentToFetch,b);b=this._addParamToObject("src",this.contentToFetch,b);b=this._addParamToObject("controller","true",b);b=this._addParamToObject("wmode","transparent",b);b=this._addParamToObject("cache","false",b);b=this._addParamToObject("quality","high",b);if(!Prototype.Browser.IE){var a=document.createElement("object");a.setAttribute("type",this.options.mimeTypes[this._fileExtension(this.contentToFetch)]);a.setAttribute("data",this.contentToFetch);a.setAttribute("id","lightwindow_media_secondary");a.setAttribute("name","lightwindow_media_secondary");a.setAttribute("width",this.resizeTo.width);a.setAttribute("height",this.resizeTo.height);a=this._addParamToObject("controller","true",a);a=this._addParamToObject("wmode","transparent",a);a=this._addParamToObject("cache","false",a);a=this._addParamToObject("quality","high",a);b.appendChild(a)}if(this._getParameter("lightwindow_iframe_embed")){this._appendIframe("no");this._writeToIframe(this._convertToMarkup(b,"object"))}else{this._appendObject(b,"object",$("lightwindow_contents"))}this._handleFinalWindowAnimation(0)}else{this._handleFinalWindowAnimation(0)}}this._setupActions()}};Event.observe(window,"load",lightwindowInit,false);var myLightWindow=null;function lightwindowInit(){myLightWindow=new lightwindow()};function MM_swapImgRestore(){var c,d,b=document.MM_sr;for(c=0;b&&c<b.length&&(d=b[c])&&d.oSrc;c++){d.src=d.oSrc}}function MM_preloadImages(){var c=document;if(c.images){if(!c.MM_p){c.MM_p=new Array()}var e,f=c.MM_p.length,b=MM_preloadImages.arguments;for(e=0;e<b.length;e++){if(b[e].indexOf("#")!=0){c.MM_p[f]=new Image;c.MM_p[f++].src=b[e]}}}}function MM_findObj(c,a){var e,b,f;if(!a){a=document}if((e=c.indexOf("?"))>0&&parent.frames.length){a=parent.frames[c.substring(e+1)].document;c=c.substring(0,e)}if(!(f=a[c])&&a.all){f=a.all[c]}for(b=0;!f&&b<a.forms.length;b++){f=a.forms[b][c]}for(b=0;!f&&a.layers&&b<a.layers.length;b++){f=MM_findObj(c,a.layers[b].document)}if(!f&&a.getElementById){f=a.getElementById(c)}return f}function MM_swapImage(){var c,d=0,e,b=MM_swapImage.arguments;document.MM_sr=new Array;for(c=0;c<(b.length-2);c+=3){if((e=MM_findObj(b[c]))!=null){document.MM_sr[d++]=e;if(!e.oSrc){e.oSrc=e.src}e.src=b[c+2]}}}var gType="all";function Show(a){gType=a;switch(a){case"events":document.getElementById("panelNews").style.display="none";document.getElementById("panelEvents").style.display="";document.getElementById("panelAttorneys").style.display="";document.getElementById("panelsAll").style.display="";break;case"news":document.getElementById("panelNews").style.display="";document.getElementById("panelEvents").style.display="none";document.getElementById("panelAttorneys").style.display="";document.getElementById("panelsAll").style.display="";break;case"publications":document.getElementById("panelNews").style.display="none";document.getElementById("panelEvents").style.display="none";document.getElementById("panelAttorneys").style.display="";document.getElementById("panelsAll").style.display="none";break;case"all":document.getElementById("panelNews").style.display="none";document.getElementById("panelEvents").style.display="none";document.getElementById("panelAttorneys").style.display="none";document.getElementById("panelsAll").style.display="none";break}}function submitClicked(){var c=document.getElementById(keywordControl).value;var d=document.getElementById(newsTypeControl).value;var a=document.getElementById(attorneyControl).value;var g=document.getElementById(serviceControl).value;var b=document.getElementById(countryControl).value;var e=document.getElementById(officeControl).value;var h=culture;var f="";if(c==keywordText){c=""}if(b.length>0){f=Append(f,"Regions",b)}if(g.length>0){f=Append(f,"Services",g)}if(a.length>0){f=Append(f,"Attorneys",a)}switch(gType){case"events":h+="global/events/list.aspx";if(c.length>0){f=Append(f,"Title",c)}if(a.length>0){f=Append(f,"Speakers",a)}if(e.length>0){f=Append(f,"Offices",e)}break;case"news":h+="global/media/list.aspx";if(c.length>0){f=Append(f,"KeywordPhrase",c)}if(d.length>0){f=Append(f,"NewsTypes",d)}if(a.length>0){f=Append(f,"Authors",a)}break;case"publications":h+="global/publications/list.aspx";if(c.length>0){f=Append(f,"Title",c)}if(a.length>0){f=Append(f,"Authors",a)}break;case"all":h+="global/media/newsinsightslist.aspx";if(c.length>0){f=Append(f,"KeywordPhrase",c)}break}window.location=h+f}function Append(b,a,c){if(b.length==0){return"?"+a+"="+c}else{return b+"&"+a+"="+c}};if(!SiteRoot||SiteRoot==null){var SiteRoot=""}compat=false;if(parseInt(navigator.appVersion)>=3){compat=true}if(compat){l_tools=new Image();l_tools.src=ImageRoot+"/tools/l_tools.gif";lo_print=new Image();lo_print.src=ImageRoot+"/tools/lo_print.gif";lo_email=new Image();lo_email.src=ImageRoot+"/tools/lo_email.gif";lo_snapshot=new Image();lo_snapshot.src=ImageRoot+"/tools/lo_snapshot.gif";lo_mysnapshots=new Image();lo_mysnapshots.src=ImageRoot+"/tools/lo_mysnapshots.gif";lo_contact=new Image();lo_contact.src=ImageRoot+"/tools/lo_contact.gif";lo_help=new Image();lo_help.src=ImageRoot+"/tools/lo_help.gif"}function changeImg(x,y){if(compat){document.images[x].src=eval(y+".src")}}function changeText(a,b){if(compat){getobject(a).innerHTML=b.replace("***","'")}}function getobject(a){if(document.getElementById){return document.getElementById(a)}else{if(document.all){return document.all[a]}}}var f;function resizeField(b,g){f=g;if(b=="max"){var a=6.5;var h=0;for(var c=0;c<g.options.length;c++){if(g.options[c].text.length>h){h=g.options[c].text.length}}if(h>70){h=70}g.style.width=g.getAttribute("width");var e;if(g.getAttribute("width")==null){e=parseInt(getStyle(g,"width"))}else{e=g.getAttribute("width")}var d=h*a;g.style.position="absolute";if(e<d){g.style.width=d}g.style.posLeft=0;g.selectedIndex=0}else{g.style.position="relative";g.style.width=g.getAttribute("width");g.style.posLeft=0}}function resizeFieldLeft(b,g){if(b=="max"){var a=6.5;var h=0;for(var c=0;c<g.options.length;c++){if(g.options[c].text.length>h){h=g.options[c].text.length}}g.style.width=g.getAttribute("width");var e;if(g.getAttribute("width")==null){e=parseInt(getStyle(g,"width"))}else{e=g.getAttribute("width")}var d=h*a;g.style.position="relative";if(e<d){g.style.width=d}g.selectedIndex=0;g.style.posLeft=0}else{g.style.position="relative";g.style.width=g.getAttribute("width");g.style.posLeft=0}}function resizeFieldDifferent(b,g){f=g;if(b=="max"){var a=5.3;var h=0;for(var c=0;c<g.options.length;c++){if(g.options[c].text.length>h){h=g.options[c].text.length}}if(h>70){h=70}g.style.width=g.getAttribute("width");var e;if(g.getAttribute("width")==null){e=parseInt(getStyle(g,"width"))}else{e=g.getAttribute("width")}var d=h*a;g.style.position="relative";if(e<d){g.style.width=d}g.style.posLeft=0-(d-e);g.style.posRight=0}else{g.style.position="relative";g.style.width=g.getAttribute("width");g.style.posLeft=0}}function getStyle(b,a){if(b.currentStyle){var c=b.currentStyle[a]}else{if(window.getComputedStyle){var c=document.defaultView.getComputedStyle(b,null).getPropertyValue(a)}}return c}function erecruit(){erecruit("")}function erecruit(a){alert("You are now entering DLA Piper's secure online recruitment site.");window.open("https://careers.dlapiper.com/"+a,"newwindow",config="height=657, width=800, toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=no, directories=no, status=no, top=0, left=0","hotkeys=no")}function siteSearch(){location.href=CultureRoot+"/global/sitesearch/sitesearch.aspx?qu="+encodeURIComponent(document.getElementById("qu").value)}function fnTrapKD(a,b){btn=document.getElementById(a);if(btn){if(document.all){if(b.keyCode==13){b.returnValue=false;b.cancel=true;btn.focus();btn.click()}}else{if(document.getElementById){if(b.which==13){b.returnValue=false;b.cancel=true;b.cancel=true;btn.focus();btn.click()}}else{if(document.layers){if(b.which==13){b.returnValue=false;b.cancel=true;b.cancel=true}}}}return false}}window.onerror=handleError;var WM_startTagFix="</";var msie_windows=0;if((navigator.userAgent.indexOf("MSIE")!=-1)&&(navigator.userAgent.indexOf("Win")!=-1)){msie_windows=1;document.writeln('<script language="VBscript">');document.writeln("'This will scan for plugins for all versions of Internet Explorer that have a VBscript engine version 2 or greater.");document.writeln("'This includes all versions of IE4 and beyond and some versions of IE 3.");document.writeln("Dim WM_detect_through_vb");document.writeln("WM_detect_through_vb = 0");document.writeln("If ScriptEngineMajorVersion >= 2 then");document.writeln("  WM_detect_through_vb = 1");document.writeln("End If");document.writeln("Function WM_activeXDetect(activeXname)");document.writeln("  on error resume next");document.writeln("  If ScriptEngineMajorVersion >= 2 then");document.writeln("     WM_activeXDetect = False");document.writeln("     WM_activeXDetect = IsObject(CreateObject(activeXname))");document.writeln("     If (err) then");document.writeln("        WM_activeXDetect = False");document.writeln("     End If");document.writeln("   Else");document.writeln("     WM_activeXDetect = False");document.writeln("   End If");document.writeln("End Function");document.writeln(WM_startTagFix+"script>")}function WM_pluginDetect(g,j,h,a){var d,e=0,c=0,b=new Object();if(msie_windows&&WM_detect_through_vb){e=0}else{e=1}if(navigator.plugins){numPlugins=navigator.plugins.length;if(numPlugins>1){if(navigator.mimeTypes&&navigator.mimeTypes[h]&&navigator.mimeTypes[h].enabledPlugin&&(navigator.mimeTypes[h].suffixes.indexOf(j)!=-1)){if((navigator.appName=="Netscape")&&(navigator.appVersion.indexOf("4.0")!=-1)){for(d in navigator.plugins){if((navigator.plugins[d].description.indexOf(g)!=-1)||(d.indexOf(g)!=-1)){c=1;break}}}else{for(d=0;d<numPlugins;d++){b=navigator.plugins[d];if((b.description.indexOf(g)!=-1)||(b.name.indexOf(g)!=-1)){c=1;break}}}if(navigator.mimeTypes[h]==null){c=0}}else{if(parseInt(navigator.appVersion)>4){for(var d=0;d<numPlugins;d++){if((navigator.plugins[d].description.indexOf(g)!=-1)){c=1;break}}}}return c}else{if((msie_windows==1)&&!e){return WM_activeXDetect(a)}else{return 0}}}else{return 0}}function WM_easyDetect(b){var a=0;if((b=="flash")||(b=="Flash")){a=WM_pluginDetect("Flash","swf","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash")}else{if((b=="director")||(b=="Director")){a=WM_pluginDetect("Shockwave","dcr","application/x-director","SWCtl.SWCtl.1")}else{if((b=="quicktime")||(b=="Quicktime")||(b=="QuickTime")){a=WM_pluginDetect("QuickTime","mov","video/quicktime","")}else{if((b=="realaudio")||(b=="Realaudio")||(b=="RealAudio")){a=(WM_pluginDetect("RealPlayer","rpm","audio/x-pn-realaudio-plugin","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)"))||(WM_pluginDetect("RealPlayer","rpm","audio/x-pn-realaudio-plugin","rmocx.RealPlayer G2 Control"))||(WM_pluginDetect("RealPlayer","rpm","audio/x-pn-realaudio-plugin","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)"))||(WM_pluginDetect("RealPlayer","rpm","audio/x-pn-realaudio-plugin","RealVideo.RealVideo(tm) ActiveX Control (32-bit)"))}else{alert("You need to tell me which plug-in to look for, like so:\n\n          WM_easyDetect('flash')\n\n          WM_easyDetect('director')\n\n          WM_easyDetect('quicktime')\n\n          WM_easyDetect('realaudio')")}}}}return a}function handleError(b,c,a){blnHasFlash=false;return true}function outputFlash(b,a){document.getElementById(b).innerHTML=a};var disappeardelay=250;var enableanchorlink=1;var hidemenu_onclick=1;var ie5=document.all;var ns6=document.getElementById&&!document.all;function getposOffset(d,a){var c=(a=="left")?d.offsetLeft:d.offsetTop;var b=d.offsetParent;while(b!=null){c=(a=="left")?c+b.offsetLeft:c+b.offsetTop;b=b.offsetParent}return c}function showhide(c,a,d,b){if(ie5||ns6){dropmenuobj.style.left=dropmenuobj.style.top=-500}if(a.type=="click"&&c.visibility==b||a.type=="mouseover"){c.visibility=d}else{if(a.type=="click"){c.visibility=b}}}function iecompattest(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}function clearbrowseredge(b,c){var a=0;if(c=="rightedge"){var d=ie5&&!window.opera?iecompattest().scrollLeft+iecompattest().clientWidth-15:window.pageXOffset+window.innerWidth-15;dropmenuobj.contentmeasure=dropmenuobj.offsetWidth;if(d-dropmenuobj.x<dropmenuobj.contentmeasure){a=dropmenuobj.contentmeasure-b.offsetWidth}}else{var d=ie5&&!window.opera?iecompattest().scrollTop+iecompattest().clientHeight-15:window.pageYOffset+window.innerHeight-18;dropmenuobj.contentmeasure=dropmenuobj.offsetHeight;if(d-dropmenuobj.y<dropmenuobj.contentmeasure){a=dropmenuobj.contentmeasure+b.offsetHeight}}return a}function dropdownmenu(c,b,a){if(window.event){event.cancelBubble=true}else{if(b.stopPropagation){b.stopPropagation()}}if(typeof dropmenuobj!="undefined"){dropmenuobj.style.visibility="hidden"}clearhidemenu();if(ie5||ns6){c.onmouseout=delayhidemenu;dropmenuobj=document.getElementById(a);if(hidemenu_onclick){dropmenuobj.onclick=function(){dropmenuobj.style.visibility="hidden"}}dropmenuobj.onmouseover=clearhidemenu;dropmenuobj.onmouseout=ie5?function(){dynamichide(event)}:function(d){dynamichide(d)};showhide(dropmenuobj.style,b,"visible","hidden");dropmenuobj.x=getposOffset(c,"left");dropmenuobj.y=getposOffset(c,"top");dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(c,"rightedge")+"px";dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(c,"bottomedge")+c.offsetHeight+"px"}return clickreturnvalue()}function clickreturnvalue(){if((ie5||ns6)&&!enableanchorlink){return false}else{return true}}function contains_ns6(c,d){while(d.parentNode){if((d=d.parentNode)==c){return true}}return false}function dynamichide(a){if(ie5&&!dropmenuobj.contains(a.toElement)){delayhidemenu()}else{if(ns6&&a.currentTarget!=a.relatedTarget&&!contains_ns6(a.currentTarget,a.relatedTarget)){delayhidemenu()}}}function delayhidemenu(){delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)}function clearhidemenu(){if(typeof delayhide!="undefined"){clearTimeout(delayhide)}};var head="display:''";img1=new Image();img2=new Image();img1.src=ImageRoot+"/plus.gif";img2.src=ImageRoot+"/minus.gif";var ns6=document.getElementById&&!document.all;var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1;function checkcontained(a){var c=0;cur=ns6?a.target:event.srcElement;i=0;if(cur.id=="foldheader"){c=1}else{var d=cur.getElementsByTagName("LI")[0];if(d!=null){cur=d}while(ns6&&cur.parentNode||(ie4&&cur.parentElement)){if(cur.id=="foldheader"||cur.id=="foldinglist"){c=(cur.id=="foldheader")?1:0;break}cur=ns6?cur.parentNode:cur.parentElement}}if(c){var b=ns6?cur.nextSibling:cur.all.tags("UL")[0];if(b.style.display=="none"){b.style.display="";cur.style.listStyleImage="url("+ImageRoot+"/minus.gif)"}else{b.style.display="none";cur.style.listStyleImage="url("+ImageRoot+"/plus.gif)"}}}if(ie4||ns6){document.onclick=checkcontained};function getElement(a){return document.getElementById?document.getElementById(a):document.all?document.all(a):null}function getIFRAME_doc_height(a){return document.body&&document.body.scrollHeight?a.document.body.scrollHeight:a.document.height?a.document.height:null}function IFRAME_size_to_content(b){var c=frames[b];if(typeof c!="undefined"){var d=getElement(b).offsetWidth;var a=getIFRAME_doc_height(c);if(d&&a){c.resizeTo(d,a)}}}function resetAllIframes(){try{if(document.getElementById("snap1")){IFRAME_size_to_content("snap1")}if(document.getElementById("snap2")){IFRAME_size_to_content("snap2")}if(document.getElementById("snap3")){IFRAME_size_to_content("snap3")}if(document.getElementById("snap4")){IFRAME_size_to_content("snap4")}if(document.getElementById("snap5")){IFRAME_size_to_content("snap5")}if(document.getElementById("snap6")){IFRAME_size_to_content("snap6")}if(document.getElementById("snap7")){IFRAME_size_to_content("snap7")}if(document.getElementById("snap8")){IFRAME_size_to_content("snap8")}if(document.getElementById("snap9")){IFRAME_size_to_content("snap9")}if(document.getElementById("snap10")){IFRAME_size_to_content("snap10")}if(document.getElementById("snap11")){IFRAME_size_to_content("snap11")}if(document.getElementById("snap12")){IFRAME_size_to_content("snap12")}if(document.getElementById("snap13")){IFRAME_size_to_content("snap13")}if(document.getElementById("snap14")){IFRAME_size_to_content("snap14")}if(document.getElementById("snap15")){IFRAME_size_to_content("snap15")}if(document.getElementById("snap16")){IFRAME_size_to_content("snap16")}if(document.getElementById("snap17")){IFRAME_size_to_content("snap17")}if(document.getElementById("snap18")){IFRAME_size_to_content("snap18")}if(document.getElementById("snap19")){IFRAME_size_to_content("snap19")}if(document.getElementById("snap20")){IFRAME_size_to_content("snap20")}if(document.getElementById("snap21")){IFRAME_size_to_content("snap21")}if(document.getElementById("snap22")){IFRAME_size_to_content("snap22")}if(document.getElementById("snap23")){IFRAME_size_to_content("snap23")}if(document.getElementById("snap24")){IFRAME_size_to_content("snap24")}if(document.getElementById("snap25")){IFRAME_size_to_content("snap25")}}catch(a){return}}function resetIframe(a){IFRAME_size_to_content(a)}var canrun=false;try{var obj=new XMLHttpRequest();canrun=true}catch(ex){}function GoURL(b){if(canrun){var a=new XMLHttpRequest();a.open("GET",b,false);a.send(null);return a.responseText}else{return""}}var indexors=new Object;function NL(ctlname,fwd){var divname=ctlname;var arr=eval("arr"+ctlname);var indexor=indexors[ctlname];if(fwd&&indexor!=arr.length-1){indexor++}if(!fwd&&indexor!=0){indexor--}var d=document;var o,nb,pb,snp,img;if(d.all){o=d.all[divname];nb=d.all[ctlname+"N"];pb=d.all[ctlname+"P"];snp=d.all[ctlname+"SNP"]}else{o=d.getElementById(divname);nb=d.getElementById(ctlname+"N");pb=d.getElementById(ctlname+"P");snp=d.getElementById(ctlname+"SNP")}o.innerHTML=arr[indexor].replace("$atemail$","@");indexors[ctlname]=indexor;pb.disabled=(HP(ctlname))?"":"true";pb.style.cursor=(HP(ctlname))?"hand":"default";pb.style.textDecoration=(HP(ctlname))?"underline":"none";nb.disabled=(HN(ctlname))?"":"true";nb.style.cursor=(HN(ctlname))?"hand":"default";nb.style.textDecoration=(HN(ctlname))?"underline":"none";if(pb.style.display=="none"||nb.style.display=="none"){snp.style.display="none"}else{snp.style.display=""}setTimeout("SetSnapImage('img_"+ctlname+"_"+indexor+"')",1)}function SetSnapImage(b){var a;if(document.all){a=document.all[b]}else{a=document.getElementById(b)}if(a!=null){a.src=ImageRoot+"/btn/takesnapshot.gif"}}function ShowCurrent(ctlname,fwd){var divname=ctlname;var arr=eval("arr"+ctlname);var indexor=indexors[ctlname];var d=document;var o,nb,pb,snp;if(d.all){o=d.all[divname];nb=d.all[ctlname+"N"];pb=d.all[ctlname+"P"];snp=d.all[ctlname+"SNP"]}else{o=d.getElementById(divname);nb=d.getElementById(ctlname+"N");pb=d.getElementById(ctlname+"P");snp=d.getElementById(ctlname+"SNP")}o.innerHTML=arr[indexor].replace("$atemail$","@");o.innerHTML=o.innerHTML.replace("$atemail$","@");o.innerHTML=o.innerHTML.replace("$atemail$","@");o.innerHTML=o.innerHTML.replace("$atemail$","@");o.innerHTML=o.innerHTML.replace("$atemail$","@");indexors[ctlname]=indexor;if(HP(ctlname)==false&&HN(ctlname)==false){pb.style.display="none";nb.style.display="none"}if(HP(ctlname)==false){pb.style.textDecoration="none";pb.style.cursor="default";pb.disabled=true}else{pb.style.textDecoration="underline";pb.style.cursor="hand";pb.disabled=false}if(HN(ctlname)==false){nb.style.textDecoration="none";nb.style.cursor="default";nb.disabled=true}else{nb.style.textDecoration="underline";nb.style.cursor="hand";nb.disabled=false}if(pb.style.display=="none"||nb.style.display=="none"){snp.style.display="none"}else{snp.style.display=""}}function HN(ctlname){var arr=eval("arr"+ctlname);var indexor=indexors[ctlname];if(indexor<arr.length-1){return true}else{return false}}function HP(a){var b=indexors[a];if(b>0){return true}else{return false}}function sendssreq(f,e,a,b){e.style.cursor="progress";if(GoURL(f)!=""){e.style.display="none";var c=a[b];var g=c.indexOf("<img");var d=c.indexOf(">",g)+1;c=c.substr(0,g)+c.substr(d);a[b]=c}else{window.location=f}};var enabletabpersistence=0;var tabcontentIDs=new Object();function expandcontent(b){var c=b.parentNode.parentNode.id;var d=document.getElementById(c).getElementsByTagName("li");for(var a=0;a<d.length;a++){d[a].className="";if(typeof tabcontentIDs[c][a]!="undefined"){document.getElementById(tabcontentIDs[c][a]).style.display="none"}}b.parentNode.className="selected";document.getElementById(b.getAttribute("rel")).style.display="block";saveselectedtabcontentid(c,b.getAttribute("rel"))}function expandtab(a,b){var c=document.getElementById(a).getElementsByTagName("a")[b];if(c.getAttribute("rel")){expandcontent(c)}}function savetabcontentids(b,a){if(typeof tabcontentIDs[b]=="undefined"){tabcontentIDs[b]=new Array()}tabcontentIDs[b][tabcontentIDs[b].length]=a}function saveselectedtabcontentid(b,a){if(enabletabpersistence==1){setCookie(b,a)}}function getullistlinkbyId(c,b){var d=document.getElementById(c).getElementsByTagName("li");for(var a=0;a<d.length;a++){if(d[a].getElementsByTagName("a")[0].getAttribute("rel")==b){return d[a].getElementsByTagName("a")[0];break}}}function initializetabcontent(){for(var c=0;c<arguments.length;c++){if(enabletabpersistence==0&&getCookie(arguments[c])!=""){setCookie(arguments[c],"")}var a=getCookie(arguments[c]);var f=document.getElementById(arguments[c]);var d=f.getElementsByTagName("li");for(var g=0;g<d.length;g++){var e=d[g].getElementsByTagName("a")[0];if(e.getAttribute("rel")){savetabcontentids(arguments[c],e.getAttribute("rel"));e.onclick=function(){expandcontent(this);return false};if(g==0){expandcontent(e)}}}if(a!=""){var b=getullistlinkbyId(arguments[c],a);if(typeof b!="undefined"){expandcontent(b)}else{expandcontent(d[0].getElementsByTagName("a")[0])}}}}function getCookie(a){var b=new RegExp(a+"=[^;]+","i");if(document.cookie.match(b)){return document.cookie.match(b)[0].split("=")[1]}return""}function setCookie(a,b){document.cookie=a+"="+b};var gotHere=0;var AllowIn=0;function tabControl(a){var b=0;for(b=1;b<=maxtabs;b++){if(document.getElementById(("tab_"+b))!=null){document.getElementById(("tab_"+b)).className=""}}a.className="on"}function toggleServices(a){tabControl(a);if(this.ID=="tab_1"){document.getElementById("maincontent").style.display="block";document.getElementById("div_other").style.display="none";document.getElementById("related_stuff").style.display="none"}else{document.getElementById("maincontent").style.display="none";document.getElementById("div_other").style.display="block";document.getElementById("related_stuff").style.display="none"}}function FilterList(a){if(a=="reset"){document.getElementById("maincontent").style.display="block";document.getElementById(div_name).innerHTML=""}else{document.getElementById("maincontent").style.display="none";FCWSite.FCWSite.DlaPiperWS.Services.GetFilteredList(region,a.value,culturepath,OnRequestComplete)}}function getCategory(b,a){document.getElementById("nations").style.display="block";document.getElementById("nations").style.backgroundColor="white";document.getElementById("nations_hdr").style.display="block";document.getElementById("nations_hdr").style.visibility="visible";if(gotHere!=0){document.getElementById("children").innerHTML=""}div_name="nations";globalid=b;for(x=0;x<globalcount;x++){document.getElementById(("a_global_"+x)).className=""}globalelement=document.getElementById(("a_global_"+a));globalelement.className="on";FCWSite.FCWSite.DlaPiperWS.Services.GetCountries(b,language,OnRequestComplete)}function getServiceFromGlobal(b,c,a){globalid=b;getService(c,a)}function getService(c,a){document.getElementById("children").style.display="block";document.getElementById("children").style.backgroundColor="white";document.getElementById("children_hdr").style.display="block";document.getElementById("children_hdr").style.visibility="visible";div_name="children";gotHere=1;var b=0;var d=0;while(b==0){if(document.getElementById(("a_nation_"+d))!=null){document.getElementById(("a_nation_"+d)).className=""}else{b=1}d++}nationelement=document.getElementById(("a_nation_"+a));if(nationelement){nationelement.className="on"}FCWSite.FCWSite.DlaPiperWS.Services.GetServices(globalid,c,isattorney,language,culturepath,OnRequestComplete)}function GetExperience(a){div_name="div_other";FCWSite.FCWSite.DlaPiperWS.Services.GetRepExperience(a,language,OnRequestComplete)}function GetExtensions(b,a){div_name="div_other";FCWSite.FCWSite.DlaPiperWS.Services.GetCoreExtension(b,a,language,OnRequestComplete)}function OnRequestComplete(a){$j("#"+div_name).html(a)};function MM_reloadPage(init){if(init==true){with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage}}}else{if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH){location.reload()}}}MM_reloadPage(true);function MM_findObj(c,a){var e,b,f;if(!a){a=document}if((e=c.indexOf("?"))>0&&parent.frames.length){a=parent.frames[c.substring(e+1)].document;c=c.substring(0,e)}if(!(f=a[c])&&a.all){f=a.all[c]}for(b=0;!f&&b<a.forms.length;b++){f=a.forms[b][c]}for(b=0;!f&&a.layers&&b<a.layers.length;b++){f=MM_findObj(c,a.layers[b].document)}if(!f&&a.getElementById){f=a.getElementById(c)}return f}function MM_showHideLayers(){var b,d,e,c,a=MM_showHideLayers.arguments;for(b=0;b<(a.length-2);b+=3){if((c=MM_findObj(a[b]))!=null){e=a[b+2];if(c.style){c=c.style;e=(e=="show")?"visible":(e=="hide")?"hidden":e}c.visibility=e}}};function MM_reloadPage(init){if(init==true){with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage}}}else{if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH){location.reload()}}}MM_reloadPage(true);function MM_findObj(c,a){var e,b,f;if(!a){a=document}if((e=c.indexOf("?"))>0&&parent.frames.length){a=parent.frames[c.substring(e+1)].document;c=c.substring(0,e)}if(!(f=a[c])&&a.all){f=a.all[c]}for(b=0;!f&&b<a.forms.length;b++){f=a.forms[b][c]}for(b=0;!f&&a.layers&&b<a.layers.length;b++){f=MM_findObj(c,a.layers[b].document)}if(!f&&a.getElementById){f=a.getElementById(c)}return f}function MM_changeProp(objName,x,theProp,theValue){var obj=MM_findObj(objName);if(obj&&(theProp.indexOf("style.")==-1||obj.style)){if(theValue==true||theValue==false){eval("obj."+theProp+"="+theValue)}else{eval("obj."+theProp+"='"+theValue+"'")}}};function ContinentChanged(c){var b=document.getElementById("asia");var d=document.getElementById("europe");var e=document.getElementById("northamerica");var a=document.getElementById("all");switch(c){case"asia":b.className="on";d.className="";e.className="";a.className="";break;case"europe":b.className="";d.className="on";e.className="";a.className="";break;case"northamerica":b.className="";d.className="";e.className="on";a.className="";break;case"all":b.className="";d.className="";e.className="";a.className="on";break}gContinent=c;FCWSite.FCWSite.DlaPiperWS.Locations.GetRegions(gContinent,siteId,currentLanguage,RegionRequestComplete);gRegion="";FCWSite.FCWSite.DlaPiperWS.Locations.GetOffices(gRegion,gContinent,siteId,currentLanguage,root,gSort,countryPath,navId,OnLocationRequestComplete)}function Sort(a){gSort=a;FCWSite.FCWSite.DlaPiperWS.Locations.GetOffices(gRegion,gContinent,siteId,currentLanguage,root,gSort,countryPath,navId,OnLocationRequestComplete)}function RegionChanged(a){gRegion=a;FCWSite.FCWSite.DlaPiperWS.Locations.GetOffices(a,gContinent,siteId,currentLanguage,root,gSort,countryPath,navId,OnLocationRequestComplete)}function ClearDropDown(b){for(var a=(b.options.length-1);a>=0;a--){b.options[a]=null}}function OnLocationRequestComplete(a){document.getElementById(div).innerHTML=a}function RegionRequestComplete(f){var d=document.getElementById(regionDropDown);var c=null;if(d.options.length>0){c=d.options[0]}ClearDropDown(d);var a=f.split("||");if(c!=null){d.options[0]=c}else{d.options[0]=new Option("","")}for(var b=0;b<a.length;b++){var e=a[b].split(",");d.options[b+1]=new Option(e[1],e[0])}}var OfficeGuid="";function PeopleSearchRegionChanged(a){if(a==""){OfficeGuid="";document.getElementById(officeDropDown).selectedIndex=0}FCWSite.FCWSite.DlaPiperWS.Locations.GetOfficesByRegion(a,currentLanguage,OfficeRegionRequestComplete);FCWSite.FCWSite.DlaPiperWS.Services.GetServicesByRegion(a,currentLanguage,ServiceRegionRequestComplete)}function PeopleSearchOfficeChanged(a){document.getElementById("<%=servicesDropDown.ClientID %>").selectedIndex=document.getElementById("<%=servicesDropDown.ClientID %>").selectedIndex;if(a!=""){OfficeGuid=a;FCWSite.FCWSite.DlaPiperWS.Locations.GetRegionByOffice(a,currentLanguage,RegionOfficeRequestComplete)}}function RegionOfficeRequestComplete(b){var a=document.getElementById(countryDropDown);for(optionCounter=0;optionCounter<a.length;optionCounter++){if(a.options[optionCounter].value==b){a.selectedIndex=optionCounter}}PeopleSearchRegionChanged(b);CountryChanged(document.getElementById(countryDropDown))}function OfficeRegionRequestComplete(g){var d=document.getElementById(officeDropDown);var c=d.selectedIndex;var h=d.selectedValue;var f=d.options[0];ClearDropDown(d);var a=g.split("||");d.options[0]=f;for(var b=0;b<a.length;b++){var e=a[b].split(",");d.options[b+1]=new Option(e[1],e[0]);if(OfficeGuid!=""&&e[0]==OfficeGuid){d.selectedIndex=b+1}}if(c>0){d.selectedValue=h}if(g.length>0){d.style.display="block"}else{d.style.display="none"}d.setAttribute("name","officedropdown")}function ServiceRegionRequestComplete(h){var f=document.getElementById(serviceDropDown);var g=f.options[0];var e=f.selectedIndex;ClearDropDown(f);var a=h.split("||");var c=0;f.options[0]=g;var b=1;for(var d=0;d<a.length;d++){var j=a[d].split(",");if(j[0]!=""){c=1;f.options[b]=new Option(j[1],j[0]);b++}}if(c==0){document.getElementById(serviceRow).style.display="none"}else{document.getElementById(serviceRow).style.display="block"}f.selectedIndex=0}function resetSearch(){if(document.getElementById(serviceDropDown)){document.getElementById(serviceDropDown).selectedIndex=0}alert(document.getElementById(officeDropDown));if(document.getElementById(officeDropDown)){alert(document.getElementById(officeDropDown).selectedIndex);document.getElementById(officeDropDown).selectedIndex=-1}};function StringBuilder(a){this.strings=new Array("");this.append(a)}StringBuilder.prototype.append=function(a){if(a){this.strings.push(a)}};StringBuilder.prototype.clear=function(){this.strings.length=1};StringBuilder.prototype.toString=function(){return this.strings.join("")};(function(){var R=this,M,ad=R.jQuery,U=R.$,T=R.jQuery=R.$=function(a,b){return new T.fn.init(a,b)},I=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,L=/^.[^:#\[\.,]*$/;T.fn=T.prototype={init:function(a,d){a=a||document;if(a.nodeType){this[0]=a;this.length=1;this.context=a;return this}if(typeof a==="string"){var c=I.exec(a);if(c&&(c[1]||!d)){if(c[1]){a=T.clean([c[1]],d)}else{var e=document.getElementById(c[3]);if(e){if(e.id!=c[3]){return T().find(a)}var b=T(e);b.context=document;b.selector=a;return b}a=[]}}else{return T(d).find(a)}}else{if(T.isFunction(a)){return T(document).ready(a)}}if(a.selector&&a.context){this.selector=a.selector;this.context=a.context}return this.setArray(T.makeArray(a))},selector:"",jquery:"1.3",size:function(){return this.length},get:function(a){return a===M?T.makeArray(this):this[a]},pushStack:function(b,d,a){var c=T(b);c.prevObject=this;c.context=this.context;if(d==="find"){c.selector=this.selector+(this.selector?" ":"")+a}else{if(d){c.selector=this.selector+"."+d+"("+a+")"}}return c},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this},each:function(b,a){return T.each(this,b,a)},index:function(a){return T.inArray(a&&a.jquery?a[0]:a,this)},attr:function(b,d,c){var a=b;if(typeof b==="string"){if(d===M){return this[0]&&T[c||"attr"](this[0],b)}else{a={};a[b]=d}}return this.each(function(e){for(b in a){T.attr(c?this.style:this,b,T.prop(this,a[b],c,e,b))}})},css:function(a,b){if((a=="width"||a=="height")&&parseFloat(b)<0){b=M}return this.attr(a,b,"curCSS")},text:function(b){if(typeof b!=="object"&&b!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(b))}var a="";T.each(b||this,function(){T.each(this.childNodes,function(){if(this.nodeType!=8){a+=this.nodeType!=1?this.nodeValue:T.fn.text([this])}})});return a},wrapAll:function(a){if(this[0]){var b=T(a,this[0].ownerDocument).clone();if(this[0].parentNode){b.insertBefore(this[0])}b.map(function(){var c=this;while(c.firstChild){c=c.firstChild}return c}).append(this)}return this},wrapInner:function(a){return this.each(function(){T(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){T(this).wrapAll(a)})},append:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.appendChild(a)}})},prepend:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.insertBefore(a,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||T([])},push:[].push,find:function(a){if(this.length===1&&!/,/.test(a)){var c=this.pushStack([],"find",a);c.length=0;T.find(a,this[0],c);return c}else{var b=T.map(this,function(d){return T.find(a,d)});return this.pushStack(/[^+>] [^+>]/.test(a)?T.unique(b):b,"find",a)}},clone:function(b){var a=this.map(function(){if(!T.support.noCloneEvent&&!T.isXMLDoc(this)){var e=this.cloneNode(true),d=document.createElement("div");d.appendChild(e);return T.clean([d.innerHTML])[0]}else{return this.cloneNode(true)}});var c=a.find("*").andSelf().each(function(){if(this[N]!==M){this[N]=null}});if(b===true){this.find("*").andSelf().each(function(e){if(this.nodeType==3){return}var d=T.data(this,"events");for(var g in d){for(var f in d[g]){T.event.add(c[e],g,d[g][f],d[g][f].data)}}})}return a},filter:function(a){return this.pushStack(T.isFunction(a)&&T.grep(this,function(c,b){return a.call(c,b)})||T.multiFilter(a,T.grep(this,function(b){return b.nodeType===1})),"filter",a)},closest:function(a){var b=T.expr.match.POS.test(a)?T(a):null;return this.map(function(){var c=this;while(c&&c.ownerDocument){if(b?b.index(c)>-1:T(c).is(a)){return c}c=c.parentNode}})},not:function(a){if(typeof a==="string"){if(L.test(a)){return this.pushStack(T.multiFilter(a,this,true),"not",a)}else{a=T.multiFilter(a,this)}}var b=a.length&&a[a.length-1]!==M&&!a.nodeType;return this.filter(function(){return b?T.inArray(this,a)<0:this!=a})},add:function(a){return this.pushStack(T.unique(T.merge(this.get(),typeof a==="string"?T(a):T.makeArray(a))))},is:function(a){return !!a&&T.multiFilter(a,this).length>0},hasClass:function(a){return !!a&&this.is("."+a)},val:function(g){if(g===M){var a=this[0];if(a){if(T.nodeName(a,"option")){return(a.attributes.value||{}).specified?a.value:a.text}if(T.nodeName(a,"select")){var e=a.selectedIndex,h=[],i=a.options,d=a.type=="select-one";if(e<0){return null}for(var b=d?e:0,f=d?e+1:i.length;b<f;b++){var c=i[b];if(c.selected){g=T(c).val();if(d){return g}h.push(g)}}return h}return(a.value||"").replace(/\r/g,"")}return M}if(typeof g==="number"){g+=""}return this.each(function(){if(this.nodeType!=1){return}if(T.isArray(g)&&/radio|checkbox/.test(this.type)){this.checked=(T.inArray(this.value,g)>=0||T.inArray(this.name,g)>=0)}else{if(T.nodeName(this,"select")){var j=T.makeArray(g);T("option",this).each(function(){this.selected=(T.inArray(this.value,j)>=0||T.inArray(this.text,j)>=0)});if(!j.length){this.selectedIndex=-1}}else{this.value=g}}})},html:function(a){return a===M?(this[0]?this[0].innerHTML:null):this.empty().append(a)},replaceWith:function(a){return this.after(a).remove()},eq:function(a){return this.slice(a,+a+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(a){return this.pushStack(T.map(this,function(c,b){return a.call(c,b,c)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(g,j,i){if(this[0]){var f=(this[0].ownerDocument||this[0]).createDocumentFragment(),c=T.clean(g,(this[0].ownerDocument||this[0]),f),e=f.firstChild,a=this.length>1?f.cloneNode(true):f;if(e){for(var d=0,b=this.length;d<b;d++){i.call(h(this[d],e),d>0?a.cloneNode(true):f)}}if(c){T.each(c,ae)}}return this;function h(k,l){return j&&T.nodeName(k,"table")&&T.nodeName(l,"tr")?(k.getElementsByTagName("tbody")[0]||k.appendChild(k.ownerDocument.createElement("tbody"))):k}}};T.fn.init.prototype=T.fn;function ae(a,b){if(b.src){T.ajax({url:b.src,async:false,dataType:"script"})}else{T.globalEval(b.text||b.textContent||b.innerHTML||"")}if(b.parentNode){b.parentNode.removeChild(b)}}function K(){return +new Date}T.extend=T.fn.extend=function(){var f=arguments[0]||{},d=1,e=arguments.length,a=false,c;if(typeof f==="boolean"){a=f;f=arguments[1]||{};d=2}if(typeof f!=="object"&&!T.isFunction(f)){f={}}if(e==d){f=this;--d}for(;d<e;d++){if((c=arguments[d])!=null){for(var b in c){var g=f[b],h=c[b];if(f===h){continue}if(a&&h&&typeof h==="object"&&!h.nodeType){f[b]=T.extend(a,g||(h.length!=null?[]:{}),h)}else{if(h!==M){f[b]=h}}}}}return f};var F=/z-?index|font-?weight|opacity|zoom|line-?height/i,V=document.defaultView||{},X=Object.prototype.toString;T.extend({noConflict:function(a){R.$=U;if(a){R.jQuery=ad}return T},isFunction:function(a){return X.call(a)==="[object Function]"},isArray:function(a){return X.call(a)==="[object Array]"},isXMLDoc:function(a){return a.documentElement&&!a.body||a.tagName&&a.ownerDocument&&!a.ownerDocument.body},globalEval:function(c){c=T.trim(c);if(c){var b=document.getElementsByTagName("head")[0]||document.documentElement,a=document.createElement("script");a.type="text/javascript";if(T.support.scriptEval){a.appendChild(document.createTextNode(c))}else{a.text=c}b.insertBefore(a,b.firstChild);b.removeChild(a)}},nodeName:function(b,a){return b.nodeName&&b.nodeName.toUpperCase()==a.toUpperCase()},each:function(c,g,b){var a,d=0,e=c.length;if(b){if(e===M){for(a in c){if(g.apply(c[a],b)===false){break}}}else{for(;d<e;){if(g.apply(c[d++],b)===false){break}}}}else{if(e===M){for(a in c){if(g.call(c[a],a,c[a])===false){break}}}else{for(var f=c[0];d<e&&g.call(f,d,f)!==false;f=c[++d]){}}}return c},prop:function(d,e,c,b,a){if(T.isFunction(e)){e=e.call(d,b)}return typeof e==="number"&&c=="curCSS"&&!F.test(a)?e+"px":e},className:{add:function(a,b){T.each((b||"").split(/\s+/),function(c,d){if(a.nodeType==1&&!T.className.has(a.className,d)){a.className+=(a.className?" ":"")+d}})},remove:function(a,b){if(a.nodeType==1){a.className=b!==M?T.grep(a.className.split(/\s+/),function(c){return !T.className.has(b,c)}).join(" "):""}},has:function(b,a){return T.inArray(a,(b.className||b).toString().split(/\s+/))>-1}},swap:function(d,c,e){var a={};for(var b in c){a[b]=d.style[b];d.style[b]=c[b]}e.call(d);for(var b in c){d.style[b]=a[b]}},css:function(c,a,e){if(a=="width"||a=="height"){var g,b={position:"absolute",visibility:"hidden",display:"block"},f=a=="width"?["Left","Right"]:["Top","Bottom"];function d(){g=a=="width"?c.offsetWidth:c.offsetHeight;var i=0,h=0;T.each(f,function(){i+=parseFloat(T.curCSS(c,"padding"+this,true))||0;h+=parseFloat(T.curCSS(c,"border"+this+"Width",true))||0});g-=Math.round(i+h)}if(T(c).is(":visible")){d()}else{T.swap(c,b,d)}return Math.max(0,g)}return T.curCSS(c,a,e)},curCSS:function(e,b,c){var h,a=e.style;if(b=="opacity"&&!T.support.opacity){h=T.attr(a,"opacity");return h==""?"1":h}if(b.match(/float/i)){b=ab}if(!c&&a&&a[b]){h=a[b]}else{if(V.getComputedStyle){if(b.match(/float/i)){b="float"}b=b.replace(/([A-Z])/g,"-$1").toLowerCase();var i=V.getComputedStyle(e,null);if(i){h=i.getPropertyValue(b)}if(b=="opacity"&&h==""){h="1"}}else{if(e.currentStyle){var f=b.replace(/\-(\w)/g,function(j,k){return k.toUpperCase()});h=e.currentStyle[b]||e.currentStyle[f];if(!/^\d+(px)?$/i.test(h)&&/^\d/.test(h)){var d=a.left,g=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left;a.left=h||0;h=a.pixelLeft+"px";a.left=d;e.runtimeStyle.left=g}}}}return h},clean:function(b,g,e){g=g||document;if(typeof g.createElement==="undefined"){g=g.ownerDocument||g[0]&&g[0].ownerDocument||document}if(!e&&b.length===1&&typeof b[0]==="string"){var d=/^<(\w+)\s*\/?>$/.exec(b[0]);if(d){return[g.createElement(d[1])]}}var c=[],a=[],h=g.createElement("div");T.each(b,function(l,n){if(typeof n==="number"){n+=""}if(!n){return}if(typeof n==="string"){n=n.replace(/(<(\w+)[^>]*?)\/>/g,function(p,q,o){return o.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?p:q+"></"+o+">"});var k=T.trim(n).toLowerCase();var m=!k.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!k.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||k.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!k.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!k.indexOf("<td")||!k.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!k.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!T.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];h.innerHTML=m[1]+n+m[2];while(m[0]--){h=h.lastChild}if(!T.support.tbody){var j=!k.indexOf("<table")&&k.indexOf("<tbody")<0?h.firstChild&&h.firstChild.childNodes:m[1]=="<table>"&&k.indexOf("<tbody")<0?h.childNodes:[];for(var i=j.length-1;i>=0;--i){if(T.nodeName(j[i],"tbody")&&!j[i].childNodes.length){j[i].parentNode.removeChild(j[i])}}}if(!T.support.leadingWhitespace&&/^\s/.test(n)){h.insertBefore(g.createTextNode(n.match(/^\s*/)[0]),h.firstChild)}n=T.makeArray(h.childNodes)}if(n.nodeType){c.push(n)}else{c=T.merge(c,n)}});if(e){for(var f=0;c[f];f++){if(T.nodeName(c[f],"script")&&(!c[f].type||c[f].type.toLowerCase()==="text/javascript")){a.push(c[f].parentNode?c[f].parentNode.removeChild(c[f]):c[f])}else{if(c[f].nodeType===1){c.splice.apply(c,[f+1,0].concat(T.makeArray(c[f].getElementsByTagName("script"))))}e.appendChild(c[f])}}return a}return c},attr:function(f,c,g){if(!f||f.nodeType==3||f.nodeType==8){return M}var d=!T.isXMLDoc(f),h=g!==M;c=d&&T.props[c]||c;if(f.tagName){var b=/href|src|style/.test(c);if(c=="selected"&&f.parentNode){f.parentNode.selectedIndex}if(c in f&&d&&!b){if(h){if(c=="type"&&T.nodeName(f,"input")&&f.parentNode){throw"type property can't be changed"}f[c]=g}if(T.nodeName(f,"form")&&f.getAttributeNode(c)){return f.getAttributeNode(c).nodeValue}if(c=="tabIndex"){var e=f.getAttributeNode("tabIndex");return e&&e.specified?e.value:f.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)?0:M}return f[c]}if(!T.support.style&&d&&c=="style"){return T.attr(f.style,"cssText",g)}if(h){f.setAttribute(c,""+g)}var a=!T.support.hrefNormalized&&d&&b?f.getAttribute(c,2):f.getAttribute(c);return a===null?M:a}if(!T.support.opacity&&c=="opacity"){if(h){f.zoom=1;f.filter=(f.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(g)+""=="NaN"?"":"alpha(opacity="+g*100+")")}return f.filter&&f.filter.indexOf("opacity=")>=0?(parseFloat(f.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}c=c.replace(/-([a-z])/ig,function(i,j){return j.toUpperCase()});if(h){f[c]=g}return f[c]},trim:function(a){return(a||"").replace(/^\s+|\s+$/g,"")},makeArray:function(c){var a=[];if(c!=null){var b=c.length;if(b==null||typeof c==="string"||T.isFunction(c)||c.setInterval){a[0]=c}else{while(b){a[--b]=c[b]}}}return a},inArray:function(c,d){for(var a=0,b=d.length;a<b;a++){if(d[a]===c){return a}}return -1},merge:function(d,a){var b=0,c,e=d.length;if(!T.support.getAll){while((c=a[b++])!=null){if(c.nodeType!=8){d[e++]=c}}}else{while((c=a[b++])!=null){d[e++]=c}}return d},unique:function(g){var b=[],a={};try{for(var c=0,d=g.length;c<d;c++){var f=T.data(g[c]);if(!a[f]){a[f]=true;b.push(g[c])}}}catch(e){b=g}return b},grep:function(b,f,a){var c=[];for(var d=0,e=b.length;d<e;d++){if(!a!=!f(b[d],d)){c.push(b[d])}}return c},map:function(a,f){var b=[];for(var c=0,d=a.length;c<d;c++){var e=f(a[c],c);if(e!=null){b[b.length]=e}}return b.concat.apply([],b)}});var G=navigator.userAgent.toLowerCase();T.browser={version:(G.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(G),opera:/opera/.test(G),msie:/msie/.test(G)&&!/opera/.test(G),mozilla:/mozilla/.test(G)&&!/(compatible|webkit)/.test(G)};T.each({parent:function(a){return a.parentNode},parents:function(a){return T.dir(a,"parentNode")},next:function(a){return T.nth(a,2,"nextSibling")},prev:function(a){return T.nth(a,2,"previousSibling")},nextAll:function(a){return T.dir(a,"nextSibling")},prevAll:function(a){return T.dir(a,"previousSibling")},siblings:function(a){return T.sibling(a.parentNode.firstChild,a)},children:function(a){return T.sibling(a.firstChild)},contents:function(a){return T.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:T.makeArray(a.childNodes)}},function(a,b){T.fn[a]=function(c){var d=T.map(this,b);if(c&&typeof c=="string"){d=T.multiFilter(c,d)}return this.pushStack(T.unique(d),a,c)}});T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){T.fn[a]=function(){var c=arguments;return this.each(function(){for(var d=0,e=c.length;d<e;d++){T(c[d])[b](this)}})}});T.each({removeAttr:function(a){T.attr(this,a,"");if(this.nodeType==1){this.removeAttribute(a)}},addClass:function(a){T.className.add(this,a)},removeClass:function(a){T.className.remove(this,a)},toggleClass:function(b,a){if(typeof a!=="boolean"){a=!T.className.has(this,b)}T.className[a?"add":"remove"](this,b)},remove:function(a){if(!a||T.filter(a,[this]).length){T("*",this).add([this]).each(function(){T.event.remove(this);T.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){T(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(a,b){T.fn[a]=function(){return this.each(b,arguments)}});function P(a,b){return a[0]&&parseInt(T.curCSS(a[0],b,true),10)||0}var N="jQuery"+K(),aa=0,af={};T.extend({cache:{},data:function(b,a,c){b=b==R?af:b;var d=b[N];if(!d){d=b[N]=++aa}if(a&&!T.cache[d]){T.cache[d]={}}if(c!==M){T.cache[d][a]=c}return a?T.cache[d][a]:d},removeData:function(b,a){b=b==R?af:b;var d=b[N];if(a){if(T.cache[d]){delete T.cache[d][a];a="";for(a in T.cache[d]){break}if(!a){T.removeData(b)}}}else{try{delete b[N]}catch(c){if(b.removeAttribute){b.removeAttribute(N)}}delete T.cache[d]}},queue:function(b,a,d){if(b){a=(a||"fx")+"queue";var c=T.data(b,a);if(!c||T.isArray(d)){c=T.data(b,a,T.makeArray(d))}else{if(d){c.push(d)}}}return c},dequeue:function(d,c){var a=T.queue(d,c),b=a.shift();if(!c||c==="fx"){b=a[0]}if(b!==M){b.call(d)}}});T.fn.extend({data:function(a,c){var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(c===M){var b=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(b===M&&this.length){b=T.data(this[0],a)}return b===M&&d[1]?this.data(d[0]):b}else{return this.trigger("setData"+d[1]+"!",[d[0],c]).each(function(){T.data(this,a,c)})}},removeData:function(a){return this.each(function(){T.removeData(this,a)})},queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===M){return T.queue(this[0],a)}return this.each(function(){var c=T.queue(this,a,b);if(a=="fx"&&c.length==1){c[0].call(this)}})},dequeue:function(a){return this.each(function(){T.dequeue(this,a)})}});(function(){var k=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,f=0,c=Object.prototype.toString;var b=function(q,y,m,B){m=m||[];y=y||document;if(y.nodeType!==1&&y.nodeType!==9){return[]}if(!q||typeof q!=="string"){return m}var n=[],o,ah,t,s,ai,x,w=true;k.lastIndex=0;while((o=k.exec(q))!==null){n.push(o[1]);if(o[2]){x=RegExp.rightContext;break}}if(n.length>1&&d.match.POS.exec(q)){if(n.length===2&&d.relative[n[0]]){var A="",ag;while((ag=d.match.POS.exec(q))){A+=ag[0];q=q.replace(d.match.POS,"")}ah=b.filter(A,b(/\s$/.test(q)?q+"*":q,y))}else{ah=d.relative[n[0]]?[y]:b(n.shift(),y);while(n.length){var v=[];q=n.shift();if(d.relative[q]){q+=n.shift()}for(var r=0,p=ah.length;r<p;r++){b(q,ah[r],v)}ah=v}}}else{var u=B?{expr:n.pop(),set:a(B)}:b.find(n.pop(),n.length===1&&y.parentNode?y.parentNode:y);ah=b.filter(u.expr,u.set);if(n.length>0){t=a(ah)}else{w=false}while(n.length){var z=n.pop(),C=z;if(!d.relative[z]){z=""}else{C=n.pop()}if(C==null){C=y}d.relative[z](t,C,j(y))}}if(!t){t=ah}if(!t){throw"Syntax error, unrecognized expression: "+(z||q)}if(c.call(t)==="[object Array]"){if(!w){m.push.apply(m,t)}else{if(y.nodeType===1){for(var r=0;t[r]!=null;r++){if(t[r]&&(t[r]===true||t[r].nodeType===1&&e(y,t[r]))){m.push(ah[r])}}}else{for(var r=0;t[r]!=null;r++){if(t[r]&&t[r].nodeType===1){m.push(ah[r])}}}}}else{a(t,m)}if(x){b(x,y,m,B)}return m};b.matches=function(m,n){return b(m,null,null,n)};b.find=function(s,p){var t,n;if(!s){return[]}for(var o=0,m=d.order.length;o<m;o++){var q=d.order[o],n;if((n=d.match[q].exec(s))){var r=RegExp.leftContext;if(r.substr(r.length-1)!=="\\"){n[1]=(n[1]||"").replace(/\\/g,"");t=d.find[q](n,p);if(t!=null){s=s.replace(d.match[q],"");break}}}}if(!t){t=p.getElementsByTagName("*")}return{set:t,expr:s}};b.filter=function(x,o,p,y){var v=x,ag=[],t=o,A,n;while(x&&o.length){for(var z in d.filter){if((A=d.match[z].exec(x))!=null){var ah=d.filter[z],w=null,C=0,m,s;n=false;if(t==ag){ag=[]}if(d.preFilter[z]){A=d.preFilter[z](A,t,p,ag,y);if(!A){n=m=true}else{if(A===true){continue}else{if(A[0]===true){w=[];var B=null,r;for(var q=0;(r=t[q])!==M;q++){if(r&&B!==r){w.push(r);B=r}}}}}}if(A){for(var q=0;(s=t[q])!==M;q++){if(s){if(w&&s!=w[C]){C++}m=ah(s,A,C,w);var u=y^!!m;if(p&&m!=null){if(u){n=true}else{t[q]=false}}else{if(u){ag.push(s);n=true}}}}}if(m!==M){if(!p){t=ag}x=x.replace(d.match[z],"");if(!n){return[]}break}}}x=x.replace(/\s*,\s*/,"");if(x==v){if(n==null){throw"Syntax error, unrecognized expression: "+x}else{break}}v=x}return t};var d=b.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(m){return m.getAttribute("href")}},relative:{"+":function(q,n){for(var o=0,m=q.length;o<m;o++){var p=q[o];if(p){var r=p.previousSibling;while(r&&r.nodeType!==1){r=r.previousSibling}q[o]=typeof n==="string"?r||false:r===n}}if(typeof n==="string"){b.filter(n,q,true)}},">":function(r,n,s){if(typeof n==="string"&&!/\W/.test(n)){n=s?n:n.toUpperCase();for(var o=0,m=r.length;o<m;o++){var q=r[o];if(q){var p=q.parentNode;r[o]=p.nodeName===n?p:false}}}else{for(var o=0,m=r.length;o<m;o++){var q=r[o];if(q){r[o]=typeof n==="string"?q.parentNode:q.parentNode===n}}if(typeof n==="string"){b.filter(n,r,true)}}},"":function(p,n,r){var o="done"+(f++),m=l;if(!n.match(/\W/)){var q=n=r?n:n.toUpperCase();m=i}m("parentNode",n,o,p,q,r)},"~":function(p,n,r){var o="done"+(f++),m=l;if(typeof n==="string"&&!n.match(/\W/)){var q=n=r?n:n.toUpperCase();m=i}m("previousSibling",n,o,p,q,r)}},find:{ID:function(n,o){if(o.getElementById){var m=o.getElementById(n[1]);return m?[m]:[]}},NAME:function(m,n){return n.getElementsByName?n.getElementsByName(m[1]):null},TAG:function(m,n){return n.getElementsByTagName(m[1])}},preFilter:{CLASS:function(p,n,o,m,r){p=" "+p[1].replace(/\\/g,"")+" ";for(var q=0;n[q];q++){if(r^(" "+n[q].className+" ").indexOf(p)>=0){if(!o){m.push(n[q])}}else{if(o){n[q]=false}}}return false},ID:function(m){return m[1].replace(/\\/g,"")},TAG:function(n,m){for(var o=0;!m[o];o++){}return j(m[o])?n[1]:n[1].toUpperCase()},CHILD:function(m){if(m[1]=="nth"){var n=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[2]=="even"&&"2n"||m[2]=="odd"&&"2n+1"||!/\D/.test(m[2])&&"0n+"+m[2]||m[2]);m[2]=(n[1]+(n[2]||1))-0;m[3]=n[3]-0}m[0]="done"+(f++);return m},ATTR:function(n){var m=n[1];if(d.attrMap[m]){n[1]=d.attrMap[m]}if(n[2]==="~="){n[4]=" "+n[4]+" "}return n},PSEUDO:function(q,n,o,m,r){if(q[1]==="not"){if(q[3].match(k).length>1){q[3]=b(q[3],null,null,n)}else{var p=b.filter(q[3],n,o,true^r);if(!o){m.push.apply(m,p)}return false}}else{if(d.match.POS.test(q[0])){return true}}return q},POS:function(m){m.unshift(true);return m}},filters:{enabled:function(m){return m.disabled===false&&m.type!=="hidden"},disabled:function(m){return m.disabled===true},checked:function(m){return m.checked===true},selected:function(m){m.parentNode.selectedIndex;return m.selected===true},parent:function(m){return !!m.firstChild},empty:function(m){return !m.firstChild},has:function(o,n,m){return !!b(m[3],o).length},header:function(m){return/h\d/i.test(m.nodeName)},text:function(m){return"text"===m.type},radio:function(m){return"radio"===m.type},checkbox:function(m){return"checkbox"===m.type},file:function(m){return"file"===m.type},password:function(m){return"password"===m.type},submit:function(m){return"submit"===m.type},image:function(m){return"image"===m.type},reset:function(m){return"reset"===m.type},button:function(m){return"button"===m.type||m.nodeName.toUpperCase()==="BUTTON"},input:function(m){return/input|select|textarea|button/i.test(m.nodeName)}},setFilters:{first:function(n,m){return m===0},last:function(o,n,m,p){return n===p.length-1},even:function(n,m){return m%2===0},odd:function(n,m){return m%2===1},lt:function(o,n,m){return n<m[3]-0},gt:function(o,n,m){return n>m[3]-0},nth:function(o,n,m){return m[3]-0==n},eq:function(o,n,m){return m[3]-0==n}},filter:{CHILD:function(m,p){var s=p[1],t=m.parentNode;var r="child"+t.childNodes.length;if(t&&(!t[r]||!m.nodeIndex)){var q=1;for(var n=t.firstChild;n;n=n.nextSibling){if(n.nodeType==1){n.nodeIndex=q++}}t[r]=q-1}if(s=="first"){return m.nodeIndex==1}else{if(s=="last"){return m.nodeIndex==t[r]}else{if(s=="only"){return t[r]==1}else{if(s=="nth"){var v=false,o=p[2],u=p[3];if(o==1&&u==0){return true}if(o==0){if(m.nodeIndex==u){v=true}}else{if((m.nodeIndex-u)%o==0&&(m.nodeIndex-u)/o>=0){v=true}}return v}}}}},PSEUDO:function(s,o,p,t){var n=o[1],q=d.filters[n];if(q){return q(s,p,o,t)}else{if(n==="contains"){return(s.textContent||s.innerText||"").indexOf(o[3])>=0}else{if(n==="not"){var r=o[3];for(var p=0,m=r.length;p<m;p++){if(r[p]===s){return false}}return true}}}},ID:function(n,m){return n.nodeType===1&&n.getAttribute("id")===m},TAG:function(n,m){return(m==="*"&&n.nodeType===1)||n.nodeName===m},CLASS:function(n,m){return m.test(n.className)},ATTR:function(q,o){var m=d.attrHandle[o[1]]?d.attrHandle[o[1]](q):q[o[1]]||q.getAttribute(o[1]),r=m+"",p=o[2],n=o[4];return m==null?false:p==="="?r===n:p==="*="?r.indexOf(n)>=0:p==="~="?(" "+r+" ").indexOf(n)>=0:!o[4]?m:p==="!="?r!=n:p==="^="?r.indexOf(n)===0:p==="$="?r.substr(r.length-n.length)===n:p==="|="?r===n||r.substr(0,n.length+1)===n+"-":false},POS:function(q,n,o,r){var m=n[2],p=d.setFilters[m];if(p){return p(q,o,n,r)}}}};for(var h in d.match){d.match[h]=RegExp(d.match[h].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var a=function(n,m){n=Array.prototype.slice.call(n);if(m){m.push.apply(m,n);return m}return n};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(g){a=function(q,p){var n=p||[];if(c.call(q)==="[object Array]"){Array.prototype.push.apply(n,q)}else{if(typeof q.length==="number"){for(var o=0,m=q.length;o<m;o++){n.push(q[o])}}else{for(var o=0;q[o];o++){n.push(q[o])}}}return n}}(function(){var n=document.createElement("form"),o="script"+(new Date).getTime();n.innerHTML="<input name='"+o+"'/>";var m=document.documentElement;m.insertBefore(n,m.firstChild);if(!!document.getElementById(o)){d.find.ID=function(q,r){if(r.getElementById){var p=r.getElementById(q[1]);return p?p.id===q[1]||p.getAttributeNode&&p.getAttributeNode("id").nodeValue===q[1]?[p]:M:[]}};d.filter.ID=function(r,p){var q=r.getAttributeNode&&r.getAttributeNode("id");return r.nodeType===1&&q&&q.nodeValue===p}}m.removeChild(n)})();(function(){var m=document.createElement("div");m.appendChild(document.createComment(""));if(m.getElementsByTagName("*").length>0){d.find.TAG=function(n,r){var q=r.getElementsByTagName(n[1]);if(n[1]==="*"){var p=[];for(var o=0;q[o];o++){if(q[o].nodeType===1){p.push(q[o])}}q=p}return q}}m.innerHTML="<a href='#'></a>";if(m.firstChild.getAttribute("href")!=="#"){d.attrHandle.href=function(n){return n.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var m=b;b=function(q,p,n,o){p=p||document;if(!o&&p.nodeType===9){try{return a(p.querySelectorAll(q),n)}catch(r){}}return m(q,p,n,o)};b.find=m.find;b.filter=m.filter;b.selectors=m.selectors;b.matches=m.matches})()}if(document.documentElement.getElementsByClassName){d.order.splice(1,0,"CLASS");d.find.CLASS=function(m,n){return n.getElementsByClassName(m[1])}}function i(n,t,s,w,u,v){for(var q=0,o=w.length;q<o;q++){var m=w[q];if(m){m=m[n];var r=false;while(m&&m.nodeType){var p=m[s];if(p){r=w[p];break}if(m.nodeType===1&&!v){m[s]=q}if(m.nodeName===t){r=m;break}m=m[n]}w[q]=r}}}function l(n,s,r,v,t,u){for(var p=0,o=v.length;p<o;p++){var m=v[p];if(m){m=m[n];var q=false;while(m&&m.nodeType){if(m[r]){q=v[m[r]];break}if(m.nodeType===1){if(!u){m[r]=p}if(typeof s!=="string"){if(m===s){q=true;break}}else{if(b.filter(s,[m]).length>0){q=m;break}}}m=m[n]}v[p]=q}}}var e=document.compareDocumentPosition?function(n,m){return n.compareDocumentPosition(m)&16}:function(n,m){return n!==m&&(n.contains?n.contains(m):true)};var j=function(m){return m.documentElement&&!m.body||m.tagName&&m.ownerDocument&&!m.ownerDocument.body};T.find=b;T.filter=b.filter;T.expr=b.selectors;T.expr[":"]=T.expr.filters;b.selectors.filters.hidden=function(m){return"hidden"===m.type||T.css(m,"display")==="none"||T.css(m,"visibility")==="hidden"};b.selectors.filters.visible=function(m){return"hidden"!==m.type&&T.css(m,"display")!=="none"&&T.css(m,"visibility")!=="hidden"};b.selectors.filters.animated=function(m){return T.grep(T.timers,function(n){return m===n.elem}).length};T.multiFilter=function(o,m,n){if(n){o=":not("+o+")"}return b.matches(o,m)};T.dir=function(o,n){var m=[],p=o[n];while(p&&p!=document){if(p.nodeType==1){m.push(p)}p=p[n]}return m};T.nth=function(q,m,o,p){m=m||1;var n=0;for(;q;q=q[o]){if(q.nodeType==1&&++n==m){break}}return q};T.sibling=function(o,n){var m=[];for(;o;o=o.nextSibling){if(o.nodeType==1&&o!=n){m.push(o)}}return m};return;R.Sizzle=b})();T.event={add:function(e,b,d,g){if(e.nodeType==3||e.nodeType==8){return}if(e.setInterval&&e!=R){e=R}if(!d.guid){d.guid=this.guid++}if(g!==M){var c=d;d=this.proxy(c);d.data=g}var a=T.data(e,"events")||T.data(e,"events",{}),f=T.data(e,"handle")||T.data(e,"handle",function(){return typeof T!=="undefined"&&!T.event.triggered?T.event.handle.apply(arguments.callee.elem,arguments):M});f.elem=e;T.each(b.split(/\s+/),function(i,j){var k=j.split(".");j=k.shift();d.type=k.slice().sort().join(".");var h=a[j];if(T.event.specialAll[j]){T.event.specialAll[j].setup.call(e,g,k)}if(!h){h=a[j]={};if(!T.event.special[j]||T.event.special[j].setup.call(e,g,k)===false){if(e.addEventListener){e.addEventListener(j,f,false)}else{if(e.attachEvent){e.attachEvent("on"+j,f)}}}}h[d.guid]=d;T.event.global[j]=true});e=null},guid:1,global:{},remove:function(g,d,f){if(g.nodeType==3||g.nodeType==8){return}var c=T.data(g,"events"),b,a;if(c){if(d===M||(typeof d==="string"&&d.charAt(0)==".")){for(var e in c){this.remove(g,e+(d||""))}}else{if(d.type){f=d.handler;d=d.type}T.each(d.split(/\s+/),function(i,k){var m=k.split(".");k=m.shift();var j=RegExp("(^|\\.)"+m.slice().sort().join(".*\\.")+"(\\.|$)");if(c[k]){if(f){delete c[k][f.guid]}else{for(var l in c[k]){if(j.test(c[k][l].type)){delete c[k][l]}}}if(T.event.specialAll[k]){T.event.specialAll[k].teardown.call(g,m)}for(b in c[k]){break}if(!b){if(!T.event.special[k]||T.event.special[k].teardown.call(g,m)===false){if(g.removeEventListener){g.removeEventListener(k,T.data(g,"handle"),false)}else{if(g.detachEvent){g.detachEvent("on"+k,T.data(g,"handle"))}}}b=null;delete c[k]}}})}for(b in c){break}if(!b){var h=T.data(g,"handle");if(h){h.elem=null}T.removeData(g,"events");T.removeData(g,"handle")}}},trigger:function(e,g,d,a){var c=e.type||e;if(!a){e=typeof e==="object"?e[N]?e:T.extend(T.Event(c),e):T.Event(c);if(c.indexOf("!")>=0){e.type=c=c.slice(0,-1);e.exclusive=true}if(!d){e.stopPropagation();if(this.global[c]){T.each(T.cache,function(){if(this.events&&this.events[c]){T.event.trigger(e,g,this.handle.elem)}})}}if(!d||d.nodeType==3||d.nodeType==8){return M}e.result=M;e.target=d;g=T.makeArray(g);g.unshift(e)}e.currentTarget=d;var f=T.data(d,"handle");if(f){f.apply(d,g)}if((!d[c]||(T.nodeName(d,"a")&&c=="click"))&&d["on"+c]&&d["on"+c].apply(d,g)===false){e.result=false}if(!a&&d[c]&&!e.isDefaultPrevented()&&!(T.nodeName(d,"a")&&c=="click")){this.triggered=true;try{d[c]()}catch(h){}}this.triggered=false;if(!e.isPropagationStopped()){var b=d.parentNode||d.ownerDocument;if(b){T.event.trigger(e,g,b,true)}}},handle:function(g){var f,a;g=arguments[0]=T.event.fix(g||R.event);var h=g.type.split(".");g.type=h.shift();f=!h.length&&!g.exclusive;var e=RegExp("(^|\\.)"+h.slice().sort().join(".*\\.")+"(\\.|$)");a=(T.data(this,"events")||{})[g.type];for(var c in a){var d=a[c];if(f||e.test(d.type)){g.handler=d;g.data=d.data;var b=d.apply(this,arguments);if(b!==M){g.result=b;if(b===false){g.preventDefault();g.stopPropagation()}}if(g.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(d){if(d[N]){return d}var b=d;d=T.Event(b);for(var c=this.props.length,f;c;){f=this.props[--c];d[f]=b[f]}if(!d.target){d.target=d.srcElement||document}if(d.target.nodeType==3){d.target=d.target.parentNode}if(!d.relatedTarget&&d.fromElement){d.relatedTarget=d.fromElement==d.target?d.toElement:d.fromElement}if(d.pageX==null&&d.clientX!=null){var e=document.documentElement,a=document.body;d.pageX=d.clientX+(e&&e.scrollLeft||a&&a.scrollLeft||0)-(e.clientLeft||0);d.pageY=d.clientY+(e&&e.scrollTop||a&&a.scrollTop||0)-(e.clientTop||0)}if(!d.which&&((d.charCode||d.charCode===0)?d.charCode:d.keyCode)){d.which=d.charCode||d.keyCode}if(!d.metaKey&&d.ctrlKey){d.metaKey=d.ctrlKey}if(!d.which&&d.button){d.which=(d.button&1?1:(d.button&2?3:(d.button&4?2:0)))}return d},proxy:function(b,a){a=a||function(){return b.apply(this,arguments)};a.guid=b.guid=b.guid||a.guid||this.guid++;return a},special:{ready:{setup:E,teardown:function(){}}},specialAll:{live:{setup:function(a,b){T.event.add(this,b[0],H)},teardown:function(c){if(c.length){var a=0,b=RegExp("(^|\\.)"+c[0]+"(\\.|$)");T.each((T.data(this,"events").live||{}),function(){if(b.test(this.type)){a++}});if(a<1){T.event.remove(this,c[0],H)}}}}}};T.Event=function(a){if(!this.preventDefault){return new T.Event(a)}if(a&&a.type){this.originalEvent=a;this.type=a.type;this.timeStamp=a.timeStamp}else{this.type=a}if(!this.timeStamp){this.timeStamp=K()}this[N]=true};function Q(){return false}function Z(){return true}T.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(!a){return}if(a.preventDefault){a.preventDefault()}a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(!a){return}if(a.stopPropagation){a.stopPropagation()}a.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Q,isPropagationStopped:Q,isImmediatePropagationStopped:Q};var D=function(b){var a=b.relatedTarget;while(a&&a!=this){try{a=a.parentNode}catch(c){a=this}}if(a!=this){b.type=b.data;T.event.handle.apply(this,arguments)}};T.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(b,a){T.event.special[a]={setup:function(){T.event.add(this,b,D,a)},teardown:function(){T.event.remove(this,b,D)}}});T.fn.extend({bind:function(b,c,a){return b=="unload"?this.one(b,c,a):this.each(function(){T.event.add(this,b,a||c,a&&c)})},one:function(c,d,b){var a=T.event.proxy(b||d,function(e){T(this).unbind(e,a);return(b||d).apply(this,arguments)});return this.each(function(){T.event.add(this,c,a,b&&d)})},unbind:function(b,a){return this.each(function(){T.event.remove(this,b,a)})},trigger:function(a,b){return this.each(function(){T.event.trigger(a,b,this)})},triggerHandler:function(a,c){if(this[0]){var b=T.Event(a);b.preventDefault();b.stopPropagation();T.event.trigger(b,c,this[0]);return b.result}},toggle:function(c){var a=arguments,b=1;while(b<a.length){T.event.proxy(c,a[b++])}return this.click(T.event.proxy(c,function(d){this.lastToggle=(this.lastToggle||0)%b;d.preventDefault();return a[this.lastToggle++].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b)},ready:function(a){E();if(T.isReady){a.call(document,T)}else{T.readyList.push(a)}return this},live:function(c,b){var a=T.event.proxy(b);a.guid+=this.selector+c;T(document).bind(O(c,this.selector),this.selector,a);return this},die:function(b,a){T(document).unbind(O(b,this.selector),a?{guid:a.guid+this.selector+b}:null);return this}});function H(d){var a=RegExp("(^|\\.)"+d.type+"(\\.|$)"),c=true,b=[];T.each(T.data(this,"events").live||[],function(e,f){if(a.test(f.type)){var g=T(d.target).closest(f.data)[0];if(g){b.push({elem:g,fn:f})}}});T.each(b,function(){if(!d.isImmediatePropagationStopped()&&this.fn.call(this.elem,d,this.fn.data)===false){c=false}});return c}function O(b,a){return["live",b,a.replace(/\./g,"`").replace(/ /g,"|")].join(".")}T.extend({isReady:false,readyList:[],ready:function(){if(!T.isReady){T.isReady=true;if(T.readyList){T.each(T.readyList,function(){this.call(document,T)});T.readyList=null}T(document).triggerHandler("ready")}}});var ac=false;function E(){if(ac){return}ac=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);T.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);T.ready()}});if(document.documentElement.doScroll&&!R.frameElement){(function(){if(T.isReady){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}T.ready()})()}}}T.event.add(R,"load",T.ready)}T.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(b,a){T.fn[a]=function(c){return c?this.bind(a,c):this.trigger(a)}});T(R).bind("unload",function(){for(var a in T.cache){if(a!=1&&T.cache[a].handle){T.event.remove(T.cache[a].handle.elem)}}});(function(){T.support={};var b=document.documentElement,c=document.createElement("script"),g=document.createElement("div"),f="script"+(new Date).getTime();g.style.display="none";g.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var d=g.getElementsByTagName("*"),a=g.getElementsByTagName("a")[0];if(!d||!d.length||!a){return}T.support={leadingWhitespace:g.firstChild.nodeType==3,tbody:!g.getElementsByTagName("tbody").length,objectAll:!!g.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!g.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};c.type="text/javascript";try{c.appendChild(document.createTextNode("window."+f+"=1;"))}catch(e){}b.insertBefore(c,b.firstChild);if(R[f]){T.support.scriptEval=true;delete R[f]}b.removeChild(c);if(g.attachEvent&&g.fireEvent){g.attachEvent("onclick",function(){T.support.noCloneEvent=false;g.detachEvent("onclick",arguments.callee)});g.cloneNode(true).fireEvent("onclick")}T(function(){var h=document.createElement("div");h.style.width="1px";h.style.paddingLeft="1px";document.body.appendChild(h);T.boxModel=T.support.boxModel=h.offsetWidth===2;document.body.removeChild(h)})})();var ab=T.support.cssFloat?"cssFloat":"styleFloat";T.props={"for":"htmlFor","class":"className","float":ab,cssFloat:ab,styleFloat:ab,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};T.fn.extend({_load:T.fn.load,load:function(c,f,g){if(typeof c!=="string"){return this._load(c)}var e=c.indexOf(" ");if(e>=0){var a=c.slice(e,c.length);c=c.slice(0,e)}var d="GET";if(f){if(T.isFunction(f)){g=f;f=null}else{if(typeof f==="object"){f=T.param(f);d="POST"}}}var b=this;T.ajax({url:c,type:d,dataType:"html",data:f,complete:function(i,h){if(h=="success"||h=="notmodified"){b.html(a?T("<div/>").append(i.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(a):i.responseText)}if(g){b.each(g,[i.responseText,h,i])}}});return this},serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?T.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(a,b){var c=T(this).val();return c==null?null:T.isArray(c)?T.map(c,function(e,d){return{name:b.name,value:e}}):{name:b.name,value:c}}).get()}});T.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(a,b){T.fn[b]=function(c){return this.bind(b,c)}});var W=K();T.extend({get:function(a,c,d,b){if(T.isFunction(c)){d=c;c=null}return T.ajax({type:"GET",url:a,data:c,success:d,dataType:b})},getScript:function(a,b){return T.get(a,null,b,"script")},getJSON:function(a,b,c){return T.get(a,b,c,"json")},post:function(a,c,d,b){if(T.isFunction(c)){d=c;c={}}return T.ajax({type:"POST",url:a,data:c,success:d,dataType:b})},ajaxSetup:function(a){T.extend(T.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return R.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(i){i=T.extend(true,i,T.extend(true,{},T.ajaxSettings,i));var s,b=/=\?(&|$)/g,n,r,c=i.type.toUpperCase();if(i.data&&i.processData&&typeof i.data!=="string"){i.data=T.param(i.data)}if(i.dataType=="jsonp"){if(c=="GET"){if(!i.url.match(b)){i.url+=(i.url.match(/\?/)?"&":"?")+(i.jsonp||"callback")+"=?"}}else{if(!i.data||!i.data.match(b)){i.data=(i.data?i.data+"&":"")+(i.jsonp||"callback")+"=?"}}i.dataType="json"}if(i.dataType=="json"&&(i.data&&i.data.match(b)||i.url.match(b))){s="jsonp"+W++;if(i.data){i.data=(i.data+"").replace(b,"="+s+"$1")}i.url=i.url.replace(b,"="+s+"$1");i.dataType="script";R[s]=function(t){r=t;e();h();R[s]=M;try{delete R[s]}catch(u){}if(d){d.removeChild(p)}}}if(i.dataType=="script"&&i.cache==null){i.cache=false}if(i.cache===false&&c=="GET"){var a=K();var q=i.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+a+"$2");i.url=q+((q==i.url)?(i.url.match(/\?/)?"&":"?")+"_="+a:"")}if(i.data&&c=="GET"){i.url+=(i.url.match(/\?/)?"&":"?")+i.data;i.data=null}if(i.global&&!T.active++){T.event.trigger("ajaxStart")}var m=/^(\w+:)?\/\/([^\/?#]+)/.exec(i.url);if(i.dataType=="script"&&c=="GET"&&m&&(m[1]&&m[1]!=location.protocol||m[2]!=location.host)){var d=document.getElementsByTagName("head")[0];var p=document.createElement("script");p.src=i.url;if(i.scriptCharset){p.charset=i.scriptCharset}if(!s){var k=false;p.onload=p.onreadystatechange=function(){if(!k&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){k=true;e();h();d.removeChild(p)}}}d.appendChild(p);return M}var g=false;var f=i.xhr();if(i.username){f.open(c,i.url,i.async,i.username,i.password)}else{f.open(c,i.url,i.async)}try{if(i.data){f.setRequestHeader("Content-Type",i.contentType)}if(i.ifModified){f.setRequestHeader("If-Modified-Since",T.lastModified[i.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}f.setRequestHeader("X-Requested-With","XMLHttpRequest");f.setRequestHeader("Accept",i.dataType&&i.accepts[i.dataType]?i.accepts[i.dataType]+", */*":i.accepts._default)}catch(o){}if(i.beforeSend&&i.beforeSend(f,i)===false){if(i.global&&!--T.active){T.event.trigger("ajaxStop")}f.abort();return false}if(i.global){T.event.trigger("ajaxSend",[f,i])}var j=function(t){if(f.readyState==0){if(l){clearInterval(l);l=null;if(i.global&&!--T.active){T.event.trigger("ajaxStop")}}}else{if(!g&&f&&(f.readyState==4||t=="timeout")){g=true;if(l){clearInterval(l);l=null}n=t=="timeout"?"timeout":!T.httpSuccess(f)?"error":i.ifModified&&T.httpNotModified(f,i.url)?"notmodified":"success";if(n=="success"){try{r=T.httpData(f,i.dataType,i)}catch(v){n="parsererror"}}if(n=="success"){var u;try{u=f.getResponseHeader("Last-Modified")}catch(v){}if(i.ifModified&&u){T.lastModified[i.url]=u}if(!s){e()}}else{T.handleError(i,f,n)}h();if(i.async){f=null}}}};if(i.async){var l=setInterval(j,13);if(i.timeout>0){setTimeout(function(){if(f){if(!g){j("timeout")}if(f){f.abort()}}},i.timeout)}}try{f.send(i.data)}catch(o){T.handleError(i,f,null,o)}if(!i.async){j()}function e(){if(i.success){i.success(r,n)}if(i.global){T.event.trigger("ajaxSuccess",[f,i])}}function h(){if(i.complete){i.complete(f,n)}if(i.global){T.event.trigger("ajaxComplete",[f,i])}if(i.global&&!--T.active){T.event.trigger("ajaxStop")}}return f},handleError:function(b,d,a,c){if(b.error){b.error(d,a,c)}if(b.global){T.event.trigger("ajaxError",[d,b,c])}},active:0,httpSuccess:function(b){try{return !b.status&&location.protocol=="file:"||(b.status>=200&&b.status<300)||b.status==304||b.status==1223}catch(a){}return false},httpNotModified:function(c,a){try{var d=c.getResponseHeader("Last-Modified");return c.status==304||d==T.lastModified[a]}catch(b){}return false},httpData:function(f,d,c){var b=f.getResponseHeader("content-type"),a=d=="xml"||!d&&b&&b.indexOf("xml")>=0,e=a?f.responseXML:f.responseText;if(a&&e.documentElement.tagName=="parsererror"){throw"parsererror"}if(c&&c.dataFilter){e=c.dataFilter(e,d)}if(typeof e==="string"){if(d=="script"){T.globalEval(e)}if(d=="json"){e=R["eval"]("("+e+")")}}return e},param:function(a){var c=[];function d(e,f){c[c.length]=encodeURIComponent(e)+"="+encodeURIComponent(f)}if(T.isArray(a)||a.jquery){T.each(a,function(){d(this.name,this.value)})}else{for(var b in a){if(T.isArray(a[b])){T.each(a[b],function(){d(b,this)})}else{d(b,T.isFunction(a[b])?a[b]():a[b])}}}return c.join("&").replace(/%20/g,"+")}});var S={},J=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function Y(b,a){var c={};T.each(J.concat.apply([],J.slice(0,a)),function(){c[this]=b});return c}T.fn.extend({show:function(f,h){if(f){return this.animate(Y("show",3),f,h)}else{for(var d=0,b=this.length;d<b;d++){var a=T.data(this[d],"olddisplay");this[d].style.display=a||"";if(T.css(this[d],"display")==="none"){var c=this[d].tagName,g;if(S[c]){g=S[c]}else{var e=T("<"+c+" />").appendTo("body");g=e.css("display");if(g==="none"){g="block"}e.remove();S[c]=g}this[d].style.display=T.data(this[d],"olddisplay",g)}}return this}},hide:function(d,e){if(d){return this.animate(Y("hide",3),d,e)}else{for(var c=0,b=this.length;c<b;c++){var a=T.data(this[c],"olddisplay");if(!a&&a!=="none"){T.data(this[c],"olddisplay",T.css(this[c],"display"))}this[c].style.display="none"}return this}},_toggle:T.fn.toggle,toggle:function(c,b){var a=typeof c==="boolean";return T.isFunction(c)&&T.isFunction(b)?this._toggle.apply(this,arguments):c==null||a?this.each(function(){var d=a?c:T(this).is(":hidden");T(this)[d?"show":"hide"]()}):this.animate(Y("toggle",3),c,b)},fadeTo:function(a,c,b){return this.animate({opacity:c},a,b)},animate:function(e,b,d,c){var a=T.speed(b,d,c);return this[a.queue===false?"each":"queue"](function(){var g=T.extend({},a),i,h=this.nodeType==1&&T(this).is(":hidden"),f=this;for(i in e){if(e[i]=="hide"&&h||e[i]=="show"&&!h){return g.complete.call(this)}if((i=="height"||i=="width")&&this.style){g.display=T.css(this,"display");g.overflow=this.style.overflow}}if(g.overflow!=null){this.style.overflow="hidden"}g.curAnim=T.extend({},e);T.each(e,function(k,o){var n=new T.fx(f,g,k);if(/toggle|show|hide/.test(o)){n[o=="toggle"?h?"show":"hide":o](e)}else{var m=o.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),p=n.cur(true)||0;if(m){var j=parseFloat(m[2]),l=m[3]||"px";if(l!="px"){f.style[k]=(j||1)+l;p=((j||1)/n.cur(true))*p;f.style[k]=p+l}if(m[1]){j=((m[1]=="-="?-1:1)*j)+p}n.custom(p,j,l)}else{n.custom(p,o,"")}}});return true})},stop:function(b,a){var c=T.timers;if(b){this.queue([])}this.each(function(){for(var d=c.length-1;d>=0;d--){if(c[d].elem==this){if(a){c[d](true)}c.splice(d,1)}}});if(!a){this.dequeue()}return this}});T.each({slideDown:Y("show",1),slideUp:Y("hide",1),slideToggle:Y("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){T.fn[a]=function(c,d){return this.animate(b,c,d)}});T.extend({speed:function(c,d,b){var a=typeof c==="object"?c:{complete:b||!b&&d||T.isFunction(c)&&c,duration:c,easing:b&&d||d&&!T.isFunction(d)&&d};a.duration=T.fx.off?0:typeof a.duration==="number"?a.duration:T.fx.speeds[a.duration]||T.fx.speeds._default;a.old=a.complete;a.complete=function(){if(a.queue!==false){T(this).dequeue()}if(T.isFunction(a.old)){a.old.call(this)}};return a},easing:{linear:function(c,d,a,b){return a+b*c},swing:function(c,d,a,b){return((-Math.cos(c*Math.PI)/2)+0.5)*b+a}},timers:[],timerId:null,fx:function(b,a,c){this.options=a;this.elem=b;this.prop=c;if(!a.orig){a.orig={}}}});T.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(T.fx.step[this.prop]||T.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(b){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var a=parseFloat(T.css(this.elem,this.prop,b));return a&&a>-10000?a:parseFloat(T.curCSS(this.elem,this.prop))||0},custom:function(e,d,c){this.startTime=K();this.start=e;this.end=d;this.unit=c||this.unit||"px";this.now=this.start;this.pos=this.state=0;var a=this;function b(f){return a.step(f)}b.elem=this.elem;T.timers.push(b);if(b()&&T.timerId==null){T.timerId=setInterval(function(){var g=T.timers;for(var f=0;f<g.length;f++){if(!g[f]()){g.splice(f--,1)}}if(!g.length){clearInterval(T.timerId);T.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());T(this.elem).show()},hide:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(d){var c=K();if(d||c>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var a=true;for(var b in this.options.curAnim){if(this.options.curAnim[b]!==true){a=false}}if(a){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(T.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){T(this.elem).hide()}if(this.options.hide||this.options.show){for(var e in this.options.curAnim){T.attr(this.elem.style,e,this.options.orig[e])}}}if(a){this.options.complete.call(this.elem)}return false}else{var f=c-this.startTime;this.state=f/this.options.duration;this.pos=T.easing[this.options.easing||(T.easing.swing?"swing":"linear")](this.state,f,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};T.extend(T.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){T.attr(a.elem.style,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null){a.elem.style[a.prop]=a.now+a.unit}else{a.elem[a.prop]=a.now}}}});if(document.documentElement.getBoundingClientRect){T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}var c=this[0].getBoundingClientRect(),f=this[0].ownerDocument,b=f.body,a=f.documentElement,h=a.clientTop||b.clientTop||0,g=a.clientLeft||b.clientLeft||0,e=c.top+(self.pageYOffset||T.boxModel&&a.scrollTop||b.scrollTop)-h,d=c.left+(self.pageXOffset||T.boxModel&&a.scrollLeft||b.scrollLeft)-g;return{top:e,left:d}}}else{T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}T.offset.initialized||T.offset.initialize();var f=this[0],c=f.offsetParent,b=f,k=f.ownerDocument,i,d=k.documentElement,g=k.body,h=k.defaultView,a=h.getComputedStyle(f,null),j=f.offsetTop,e=f.offsetLeft;while((f=f.parentNode)&&f!==g&&f!==d){i=h.getComputedStyle(f,null);j-=f.scrollTop,e-=f.scrollLeft;if(f===c){j+=f.offsetTop,e+=f.offsetLeft;if(T.offset.doesNotAddBorder&&!(T.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(f.tagName))){j+=parseInt(i.borderTopWidth,10)||0,e+=parseInt(i.borderLeftWidth,10)||0}b=c,c=f.offsetParent}if(T.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){j+=parseInt(i.borderTopWidth,10)||0,e+=parseInt(i.borderLeftWidth,10)||0}a=i}if(a.position==="relative"||a.position==="static"){j+=g.offsetTop,e+=g.offsetLeft}if(a.position==="fixed"){j+=Math.max(d.scrollTop,g.scrollTop),e+=Math.max(d.scrollLeft,g.scrollLeft)}return{top:j,left:e}}}T.offset={initialize:function(){if(this.initialized){return}var h=document.body,b=document.createElement("div"),d,c,j,e,i,a,f=h.style.marginTop,g='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>';i={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(a in i){b.style[a]=i[a]}b.innerHTML=g;h.insertBefore(b,h.firstChild);d=b.firstChild,c=d.firstChild,e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(c.offsetTop!==5);this.doesAddBorderForTableAndCells=(e.offsetTop===5);d.style.overflow="hidden",d.style.position="relative";this.subtractsBorderForOverflowNotVisible=(c.offsetTop===-5);h.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(h.offsetTop===0);h.style.marginTop=f;h.removeChild(b);this.initialized=true},bodyOffset:function(a){T.offset.initialized||T.offset.initialize();var c=a.offsetTop,b=a.offsetLeft;if(T.offset.doesNotIncludeMarginInBodyOffset){c+=parseInt(T.curCSS(a,"marginTop",true),10)||0,b+=parseInt(T.curCSS(a,"marginLeft",true),10)||0}return{top:c,left:b}}};T.fn.extend({position:function(){var e=0,d=0,b;if(this[0]){var c=this.offsetParent(),f=this.offset(),a=/^body|html$/i.test(c[0].tagName)?{top:0,left:0}:c.offset();f.top-=P(this,"marginTop");f.left-=P(this,"marginLeft");a.top+=P(c,"borderTopWidth");a.left+=P(c,"borderLeftWidth");b={top:f.top-a.top,left:f.left-a.left}}return b},offsetParent:function(){var a=this[0].offsetParent||document.body;while(a&&(!/^body|html$/i.test(a.tagName)&&T.css(a,"position")=="static")){a=a.offsetParent}return T(a)}});T.each(["Left","Top"],function(b,a){var c="scroll"+a;T.fn[c]=function(d){if(!this[0]){return null}return d!==M?this.each(function(){this==R||this==document?R.scrollTo(!b?d:T(R).scrollLeft(),b?d:T(R).scrollTop()):this[c]=d}):this[0]==R||this[0]==document?self[b?"pageYOffset":"pageXOffset"]||T.boxModel&&document.documentElement[c]||document.body[c]:this[0][c]}});T.each(["Height","Width"],function(d,b){var a=d?"Left":"Top",c=d?"Right":"Bottom";T.fn["inner"+b]=function(){return this[b.toLowerCase()]()+P(this,"padding"+a)+P(this,"padding"+c)};T.fn["outer"+b]=function(f){return this["inner"+b]()+P(this,"border"+a+"Width")+P(this,"border"+c+"Width")+(f?P(this,"margin"+a)+P(this,"margin"+c):0)};var e=b.toLowerCase();T.fn[e]=function(f){return this[0]==R?document.compatMode=="CSS1Compat"&&document.documentElement["client"+b]||document.body["client"+b]:this[0]==document?Math.max(document.documentElement["client"+b],document.body["scroll"+b],document.documentElement["scroll"+b],document.body["offset"+b],document.documentElement["offset"+b]):f===M?(this.length?T.css(this[0],e):null):this.css(e,typeof f==="string"?f:f+"px")}})})();(function(e){e.tools=e.tools||{version:{}};e.tools.version.expose="1.0.3";function d(){var b=e(window).width();if(e.browser.mozilla){return b}var a;if(window.innerHeight&&window.scrollMaxY){a=window.innerWidth+window.scrollMaxX}else{if(document.body.scrollHeight>document.body.offsetHeight){a=document.body.scrollWidth}else{a=document.body.offsetWidth}}return a<b?a+20:b}function f(k,l){var b=this,a=null,c=false,m=0;function n(g,h){e(b).bind(g,function(j,i){if(h&&h.call(this)===false&&i){i.proceed=false}});return b}e.each(l,function(g,h){if(e.isFunction(h)){n(g,h)}});e(window).bind("resize.expose",function(){if(a){a.css({width:d(),height:e(document).height()})}});e.extend(this,{getMask:function(){return a},getExposed:function(){return k},getConf:function(){return l},isLoaded:function(){return c},load:function(){if(c){return b}m=k.eq(0).css("zIndex");if(l.maskId){a=e("#"+l.maskId)}if(!a||!a.length){a=e("<div/>").css({position:"absolute",top:0,left:0,width:d(),height:e(document).height(),display:"none",opacity:0,zIndex:l.zIndex});if(l.maskId){a.attr("id",l.maskId)}e("body").append(a);var g=a.css("backgroundColor");if(!g||g=="transparent"||g=="rgba(0, 0, 0, 0)"){a.css("backgroundColor",l.color)}if(l.closeOnEsc){e(document).bind("keydown.unexpose",function(j){if(j.keyCode==27){b.close()}})}if(l.closeOnClick){a.bind("click.unexpose",function(){b.close()})}}var i={proceed:true};e(b).trigger("onBeforeLoad",i);if(!i.proceed){return b}e.each(k,function(){var j=e(this);if(!/relative|absolute|fixed/i.test(j.css("position"))){j.css("position","relative")}});k.css({zIndex:l.zIndex+1});var h=a.height();if(!this.isLoaded()){a.css({opacity:0,display:"block"}).fadeTo(l.loadSpeed,l.opacity,function(){if(a.height()!=h){a.css("height",h)}e(b).trigger("onLoad")})}c=true;return b},close:function(){if(!c){return b}var g={proceed:true};e(b).trigger("onBeforeClose",g);if(g.proceed===false){return b}a.fadeOut(l.closeSpeed,function(){e(b).trigger("onClose");k.css({zIndex:e.browser.msie?m:null})});c=false;return b},onBeforeLoad:function(g){return n("onBeforeLoad",g)},onLoad:function(g){return n("onLoad",g)},onBeforeClose:function(g){return n("onBeforeClose",g)},onClose:function(g){return n("onClose",g)}})}e.fn.expose=function(a){var b=this.eq(typeof a=="number"?a:0).data("expose");if(b){return b}var c={maskId:null,loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,color:"#456",api:false};if(typeof a=="string"){a={color:a}}e.extend(c,a);this.each(function(){b=new f(e(this),c);e(this).data("expose",b)});return c.api?b:this}})(jQuery);/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2009 M. Alsup
 * Version: 2.71 (11-AUG-2009)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires: jQuery v1.2.6 or later
 *
 * Originally based on the work of:
 *	1) Matt Oakes
 *	2) Torsten Baldes (http://medienfreunde.com/lab/innerfade/)
 *	3) Benjamin Sterling (http://www.benjaminsterling.com/experiments/jqShuffle/)
 */
(function(a){var n="2.71";if(a.support==undefined){a.support={opacity:!(a.browser.msie)}}function j(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}}a.fn.cycle=function(s,q){var r={s:this.selector,c:this.context};if(this.length===0&&s!="stop"){if(!a.isReady&&r.s){j("DOM not ready, queuing slideshow");a(function(){a(r.s,r.c).cycle(s,q)});return this}j("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var v=i(this,s,q);if(v===false){return}if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var o=a(this);var t=v.slideExpr?a(v.slideExpr,this):o.children();var u=t.get();if(u.length<2){j("terminating; too few slides: "+u.length);return}var w=c(o,t,u,v,r);if(w===false){return}if(w.timeout||w.continuous){this.cycleTimeout=setTimeout(function(){h(u,w,0,!w.rev)},w.continuous?10:w.timeout+(w.delay||0))}})};function i(q,s,o){if(q.cycleStop==undefined){q.cycleStop=0}if(s===undefined||s===null){s={}}if(s.constructor==String){switch(s){case"stop":q.cycleStop++;if(q.cycleTimeout){clearTimeout(q.cycleTimeout)}q.cycleTimeout=0;a(q).removeData("cycle.opts");return false;case"pause":q.cyclePause=1;return false;case"resume":q.cyclePause=0;if(o===true){s=a(q).data("cycle.opts");if(!s){j("options not found, can not resume");return false}if(q.cycleTimeout){clearTimeout(q.cycleTimeout);q.cycleTimeout=0}h(s.elements,s,1,1)}return false;case"prev":case"next":var t=a(q).data("cycle.opts");if(!t){j('options not found, "prev/next" ignored');return false}a.fn.cycle[s](t);return false;default:s={fx:s}}return s}else{if(s.constructor==Number){var r=s;s=a(q).data("cycle.opts");if(!s){j("options not found, can not advance slide");return false}if(r<0||r>=s.elements.length){j("invalid slide index: "+r);return false}s.nextSlide=r;if(q.cycleTimeout){clearTimeout(q.cycleTimeout);q.cycleTimeout=0}if(typeof o=="string"){s.oneTimeFx=o}h(s.elements,s,1,r>=s.currSlide);return false}}return s}function k(o,q){if(!a.support.opacity&&q.cleartype&&o.style.filter){try{o.style.removeAttribute("filter")}catch(r){}}}function c(q,s,x,G,F){var H=a.extend({},a.fn.cycle.defaults,G||{},a.metadata?q.metadata():a.meta?q.data():{});if(H.autostop){H.countdown=H.autostopCount||x.length}var t=q[0];q.data("cycle.opts",H);H.$cont=q;H.stopCount=t.cycleStop;H.elements=x;H.before=H.before?[H.before]:[];H.after=H.after?[H.after]:[];H.after.unshift(function(){H.busy=0});if(!a.support.opacity&&H.cleartype){H.after.push(function(){k(this,H)})}if(H.continuous){H.after.push(function(){h(x,H,0,!H.rev)})}l(H);if(!a.support.opacity&&H.cleartype&&!H.cleartypeNoBg){e(s)}if(q.css("position")=="static"){q.css("position","relative")}if(H.width){q.width(H.width)}if(H.height&&H.height!="auto"){q.height(H.height)}if(H.startingSlide){H.startingSlide=parseInt(H.startingSlide)}if(H.random){H.randomMap=[];for(var A=0;A<x.length;A++){H.randomMap.push(A)}H.randomMap.sort(function(o,w){return Math.random()-0.5});H.randomIndex=0;H.startingSlide=H.randomMap[0]}else{if(H.startingSlide>=x.length){H.startingSlide=0}}H.currSlide=H.startingSlide=H.startingSlide||0;var y=H.startingSlide;s.css({position:"absolute",top:0,left:0}).hide().each(function(o){var w=y?o>=y?x.length-(o-y):y-o:x.length-o;a(this).css("z-index",w)});a(x[y]).css("opacity",1).show();k(x[y],H);if(H.fit&&H.width){s.width(H.width)}if(H.fit&&H.height&&H.height!="auto"){s.height(H.height)}var J=H.containerResize&&!q.innerHeight();if(J){var E=0,D=0;for(var C=0;C<x.length;C++){var r=a(x[C]),u=r[0],K=r.outerWidth(),z=r.outerHeight();if(!K){K=u.offsetWidth}if(!z){z=u.offsetHeight}E=K>E?K:E;D=z>D?z:D}if(E>0&&D>0){q.css({width:E+"px",height:D+"px"})}}if(H.pause){q.hover(function(){this.cyclePause++},function(){this.cyclePause--})}if(m(H)===false){return false}if(!H.multiFx){var B=a.fn.cycle.transitions[H.fx];if(a.isFunction(B)){B(q,s,H)}else{if(H.fx!="custom"&&!H.multiFx){j("unknown transition: "+H.fx,"; slideshow terminating");return false}}}var I=false;G.requeueAttempts=G.requeueAttempts||0;s.each(function(){var o=a(this);this.cycleH=(H.fit&&H.height)?H.height:o.height();this.cycleW=(H.fit&&H.width)?H.width:o.width();if(o.is("img")){var L=(a.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var w=(a.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var M=(a.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var N=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(L||w||M||N){if(F.s&&H.requeueOnImageNotLoaded&&++G.requeueAttempts<100){j(G.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){a(F.s,F.c).cycle(G)},H.requeueTimeout);I=true;return false}else{j("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(I){return false}H.cssBefore=H.cssBefore||{};H.animIn=H.animIn||{};H.animOut=H.animOut||{};s.not(":eq("+y+")").css(H.cssBefore);if(H.cssFirst){a(s[y]).css(H.cssFirst)}if(H.timeout){H.timeout=parseInt(H.timeout);if(H.speed.constructor==String){H.speed=a.fx.speeds[H.speed]||parseInt(H.speed)}if(!H.sync){H.speed=H.speed/2}while((H.timeout-H.speed)<250){H.timeout+=H.speed}}if(H.easing){H.easeIn=H.easeOut=H.easing}if(!H.speedIn){H.speedIn=H.speed}if(!H.speedOut){H.speedOut=H.speed}H.slideCount=x.length;H.currSlide=H.lastSlide=y;if(H.random){H.nextSlide=H.currSlide;if(++H.randomIndex==x.length){H.randomIndex=0}H.nextSlide=H.randomMap[H.randomIndex]}else{H.nextSlide=H.startingSlide>=(x.length-1)?0:H.startingSlide+1}var v=s[y];if(H.before.length){H.before[0].apply(v,[v,v,H,true])}if(H.after.length>1){H.after[1].apply(v,[v,v,H,true])}if(H.next){a(H.next).bind(H.prevNextEvent,function(){return b(H,H.rev?-1:1)})}if(H.prev){a(H.prev).bind(H.prevNextEvent,function(){return b(H,H.rev?1:-1)})}if(H.pager){d(x,H)}f(H,x);return H}function l(o){o.original={before:[],after:[]};o.original.cssBefore=a.extend({},o.cssBefore);o.original.cssAfter=a.extend({},o.cssAfter);o.original.animIn=a.extend({},o.animIn);o.original.animOut=a.extend({},o.animOut);a.each(o.before,function(){o.original.before.push(this)});a.each(o.after,function(){o.original.after.push(this)})}function m(r){var q,u,v=a.fn.cycle.transitions;if(r.fx.indexOf(",")>0){r.multiFx=true;r.fxs=r.fx.replace(/\s*/g,"").split(",");for(q=0;q<r.fxs.length;q++){var o=r.fxs[q];u=v[o];if(!u||!v.hasOwnProperty(o)||!a.isFunction(u)){j("discarding unknown transition: ",o);r.fxs.splice(q,1);q--}}if(!r.fxs.length){j("No valid transitions named; slideshow terminating.");return false}}else{if(r.fx=="all"){r.multiFx=true;r.fxs=[];for(p in v){u=v[p];if(v.hasOwnProperty(p)&&a.isFunction(u)){r.fxs.push(p)}}}}if(r.multiFx&&r.randomizeEffects){var s=Math.floor(Math.random()*20)+30;for(q=0;q<s;q++){var t=Math.floor(Math.random()*r.fxs.length);r.fxs.push(r.fxs.splice(t,1)[0])}j("randomized fx sequence: ",r.fxs)}return true}function f(q,o){q.addSlide=function(t,u){var r=a(t),v=r[0];if(!q.autostopCount){q.countdown++}o[u?"unshift":"push"](v);if(q.els){q.els[u?"unshift":"push"](v)}q.slideCount=o.length;r.css("position","absolute");r[u?"prependTo":"appendTo"](q.$cont);if(u){q.currSlide++;q.nextSlide++}if(!a.support.opacity&&q.cleartype&&!q.cleartypeNoBg){e(r)}if(q.fit&&q.width){r.width(q.width)}if(q.fit&&q.height&&q.height!="auto"){$slides.height(q.height)}v.cycleH=(q.fit&&q.height)?q.height:r.height();v.cycleW=(q.fit&&q.width)?q.width:r.width();r.css(q.cssBefore);if(q.pager){a.fn.cycle.createPagerAnchor(o.length-1,v,a(q.pager),o,q)}if(a.isFunction(q.onAddSlide)){q.onAddSlide(r)}else{r.hide()}}}a.fn.cycle.resetState=function(r,o){o=o||r.fx;r.before=[];r.after=[];r.cssBefore=a.extend({},r.original.cssBefore);r.cssAfter=a.extend({},r.original.cssAfter);r.animIn=a.extend({},r.original.animIn);r.animOut=a.extend({},r.original.animOut);r.fxFn=null;a.each(r.original.before,function(){r.before.push(this)});a.each(r.original.after,function(){r.after.push(this)});var q=a.fn.cycle.transitions[o];if(a.isFunction(q)){q(r.$cont,a(r.elements),r)}};function h(r,x,u,s){if(u&&x.busy&&x.manualTrump){a(r).stop(true,true);x.busy=false}if(x.busy){return}var y=x.$cont[0],q=r[x.currSlide],w=r[x.nextSlide];if(y.cycleStop!=x.stopCount||y.cycleTimeout===0&&!u){return}if(!u&&!y.cyclePause&&((x.autostop&&(--x.countdown<=0))||(x.nowrap&&!x.random&&x.nextSlide<x.currSlide))){if(x.end){x.end(x)}return}if(u||!y.cyclePause){var t=x.fx;q.cycleH=q.cycleH||a(q).height();q.cycleW=q.cycleW||a(q).width();w.cycleH=w.cycleH||a(w).height();w.cycleW=w.cycleW||a(w).width();if(x.multiFx){if(x.lastFx==undefined||++x.lastFx>=x.fxs.length){x.lastFx=0}t=x.fxs[x.lastFx];x.currFx=t}if(x.oneTimeFx){t=x.oneTimeFx;x.oneTimeFx=null}a.fn.cycle.resetState(x,t);if(x.before.length){a.each(x.before,function(A,B){if(y.cycleStop!=x.stopCount){return}B.apply(w,[q,w,x,s])})}var o=function(){a.each(x.after,function(A,B){if(y.cycleStop!=x.stopCount){return}B.apply(w,[q,w,x,s])})};if(x.nextSlide!=x.currSlide){x.busy=1;if(x.fxFn){x.fxFn(q,w,x,o,s)}else{if(a.isFunction(a.fn.cycle[x.fx])){a.fn.cycle[x.fx](q,w,x,o)}else{a.fn.cycle.custom(q,w,x,o,u&&x.fastOnEvent)}}}x.lastSlide=x.currSlide;if(x.random){x.currSlide=x.nextSlide;if(++x.randomIndex==r.length){x.randomIndex=0}x.nextSlide=x.randomMap[x.randomIndex]}else{var z=(x.nextSlide+1)==r.length;x.nextSlide=z?0:x.nextSlide+1;x.currSlide=z?r.length-1:x.nextSlide-1}if(x.pager){a.fn.cycle.updateActivePagerLink(x.pager,x.currSlide)}}var v=0;if(x.timeout&&!x.continuous){v=g(q,w,x,s)}else{if(x.continuous&&y.cyclePause){v=10}}if(v>0){y.cycleTimeout=setTimeout(function(){h(r,x,0,!x.rev)},v)}}a.fn.cycle.updateActivePagerLink=function(q,o){a(q).find("a").removeClass("activeSlide").filter("a:eq("+o+")").addClass("activeSlide")};function g(o,r,s,q){if(s.timeoutFn){var u=s.timeoutFn(o,r,s,q);if(u!==false){return u}}return s.timeout}a.fn.cycle.next=function(o){b(o,o.rev?-1:1)};a.fn.cycle.prev=function(o){b(o,o.rev?1:-1)};function b(q,t){var o=q.elements;var r=q.$cont[0],s=r.cycleTimeout;if(s){clearTimeout(s);r.cycleTimeout=0}if(q.random&&t<0){q.randomIndex--;if(--q.randomIndex==-2){q.randomIndex=o.length-2}else{if(q.randomIndex==-1){q.randomIndex=o.length-1}}q.nextSlide=q.randomMap[q.randomIndex]}else{if(q.random){if(++q.randomIndex==o.length){q.randomIndex=0}q.nextSlide=q.randomMap[q.randomIndex]}else{q.nextSlide=q.currSlide+t;if(q.nextSlide<0){if(q.nowrap){return false}q.nextSlide=o.length-1}else{if(q.nextSlide>=o.length){if(q.nowrap){return false}q.nextSlide=0}}}}if(a.isFunction(q.prevNextClick)){q.prevNextClick(t>0,q.nextSlide,o[q.nextSlide])}h(o,q,1,t>=0);return false}function d(q,r){var o=a(r.pager);a.each(q,function(s,t){a.fn.cycle.createPagerAnchor(s,t,o,q,r)});a.fn.cycle.updateActivePagerLink(r.pager,r.startingSlide)}a.fn.cycle.createPagerAnchor=function(v,t,q,u,w){var r;if(a.isFunction(w.pagerAnchorBuilder)){r=w.pagerAnchorBuilder(v,t)}else{r='<a href="#">'+(v+1)+"</a>"}if(!r){return}var o=a(r);if(o.parents("body").length===0){var s=[];if(q.length>1){q.each(function(){var x=o.clone(true);a(this).append(x);s.push(x)});o=a(s)}else{o.appendTo(q)}}o.bind(w.pagerEvent,function(x){x.preventDefault();w.nextSlide=v;var y=w.$cont[0],z=y.cycleTimeout;if(z){clearTimeout(z);y.cycleTimeout=0}if(a.isFunction(w.pagerClick)){w.pagerClick(w.nextSlide,u[w.nextSlide])}h(u,w,1,w.currSlide<v);return false});if(w.pagerEvent!="click"){o.click(function(){return false})}if(w.pauseOnPagerHover){o.hover(function(){w.$cont[0].cyclePause++},function(){w.$cont[0].cyclePause--})}};a.fn.cycle.hopsFromLast=function(t,q){var r,s=t.lastSlide,o=t.currSlide;if(q){r=o>s?o-s:t.slideCount-s}else{r=o<s?s-o:s+t.slideCount-o}return r};function e(o){function r(t){t=parseInt(t).toString(16);return t.length<2?"0"+t:t}function q(s){for(;s&&s.nodeName.toLowerCase()!="html";s=s.parentNode){var u=a.css(s,"background-color");if(u.indexOf("rgb")>=0){var t=u.match(/\d+/g);return"#"+r(t[0])+r(t[1])+r(t[2])}if(u&&u!="transparent"){return u}}return"#ffffff"}o.each(function(){a(this).css("background-color",q(this))})}a.fn.cycle.commonReset=function(o,r,s,u,q,t){a(s.elements).not(o).hide();s.cssBefore.opacity=1;s.cssBefore.display="block";if(u!==false&&r.cycleW>0){s.cssBefore.width=r.cycleW}if(q!==false&&r.cycleH>0){s.cssBefore.height=r.cycleH}s.cssAfter=s.cssAfter||{};s.cssAfter.display="none";a(o).css("zIndex",s.slideCount+(t===true?1:0));a(r).css("zIndex",s.slideCount+(t===true?0:1))};a.fn.cycle.custom=function(s,w,x,r,A){var o=a(s),q=a(w);var y=x.speedIn,z=x.speedOut,t=x.easeIn,u=x.easeOut;q.css(x.cssBefore);if(A){if(typeof A=="number"){y=z=A}else{y=z=1}t=u=null}var v=function(){q.animate(x.animIn,y,t,r)};o.animate(x.animOut,z,u,function(){if(x.cssAfter){o.css(x.cssAfter)}if(!x.sync){v()}});if(x.sync){v()}};a.fn.cycle.transitions={fade:function(o,q,r){q.not(":eq("+r.currSlide+")").css("opacity",0);r.before.push(function(s,t,u){a.fn.cycle.commonReset(s,t,u);u.cssBefore.opacity=0});r.animIn={opacity:1};r.animOut={opacity:0};r.cssBefore={top:0,left:0}}};a.fn.cycle.ver=function(){return n};a.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,prevNextEvent:"click",pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!a.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250}})(jQuery);
/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version:	 2.52
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function(a){a.fn.cycle.transitions.scrollUp=function(b,c,e){b.css("overflow","hidden");e.before.push(a.fn.cycle.commonReset);var d=b.height();e.cssBefore={top:d,left:0};e.cssFirst={top:0};e.animIn={top:0};e.animOut={top:-d}};a.fn.cycle.transitions.scrollDown=function(b,c,e){b.css("overflow","hidden");e.before.push(a.fn.cycle.commonReset);var d=b.height();e.cssFirst={top:0};e.cssBefore={top:-d,left:0};e.animIn={top:0};e.animOut={top:d}};a.fn.cycle.transitions.scrollLeft=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst={left:0};d.cssBefore={left:e,top:0};d.animIn={left:0};d.animOut={left:0-e}};a.fn.cycle.transitions.scrollRight=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst={left:0};d.cssBefore={left:-e,top:0};d.animIn={left:0};d.animOut={left:e}};a.fn.cycle.transitions.scrollHorz=function(b,c,d){b.css("overflow","hidden").width();d.before.push(function(e,g,h,f){a.fn.cycle.commonReset(e,g,h);h.cssBefore.left=f?(g.cycleW-1):(1-g.cycleW);h.animOut.left=f?-e.cycleW:e.cycleW});d.cssFirst={left:0};d.cssBefore={top:0};d.animIn={left:0};d.animOut={top:0}};a.fn.cycle.transitions.scrollVert=function(b,c,d){b.css("overflow","hidden");d.before.push(function(e,g,h,f){a.fn.cycle.commonReset(e,g,h);h.cssBefore.top=f?(1-g.cycleH):(g.cycleH-1);h.animOut.top=f?e.cycleH:-e.cycleH});d.cssFirst={top:0};d.cssBefore={left:0};d.animIn={top:0};d.animOut={left:0}};a.fn.cycle.transitions.slideX=function(b,c,d){d.before.push(function(e,f,g){a(g.elements).not(e).hide();a.fn.cycle.commonReset(e,f,g,false,true);g.animIn.width=f.cycleW});d.cssBefore={left:0,top:0,width:0};d.animIn={width:"show"};d.animOut={width:0}};a.fn.cycle.transitions.slideY=function(b,c,d){d.before.push(function(e,f,g){a(g.elements).not(e).hide();a.fn.cycle.commonReset(e,f,g,true,false);g.animIn.height=f.cycleH});d.cssBefore={left:0,top:0,height:0};d.animIn={height:"show"};d.animOut={height:0}};a.fn.cycle.transitions.shuffle=function(b,c,e){var d,f=b.css("overflow","visible").width();c.css({left:0,top:0});e.before.push(function(g,h,i){a.fn.cycle.commonReset(g,h,i,true,true,true)});e.speed=e.speed/2;e.random=0;e.shuffle=e.shuffle||{left:-f,top:15};e.els=[];for(d=0;d<c.length;d++){e.els.push(c[d])}for(d=0;d<e.currSlide;d++){e.els.push(e.els.shift())}e.fxFn=function(j,l,m,h,k){var g=k?a(j):a(l);a(l).css(m.cssBefore);var i=m.slideCount;g.animate(m.shuffle,m.speedIn,m.easeIn,function(){var n=a.fn.cycle.hopsFromLast(m,k);for(var q=0;q<n;q++){k?m.els.push(m.els.shift()):m.els.unshift(m.els.pop())}if(k){for(var o=0,r=m.els.length;o<r;o++){a(m.els[o]).css("z-index",r-o+i)}}else{var s=a(j).css("z-index");g.css("z-index",parseInt(s)+1+i)}g.animate({left:0,top:0},m.speedOut,m.easeOut,function(){a(k?this:j).hide();if(h){h()}})})};e.cssBefore={display:"block",opacity:1,top:0,left:0}};a.fn.cycle.transitions.turnUp=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,true,false);g.cssBefore.top=f.cycleH;g.animIn.height=f.cycleH});d.cssFirst={top:0};d.cssBefore={left:0,height:0};d.animIn={top:0};d.animOut={height:0}};a.fn.cycle.transitions.turnDown=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,true,false);g.animIn.height=f.cycleH;g.animOut.top=e.cycleH});d.cssFirst={top:0};d.cssBefore={left:0,top:0,height:0};d.animOut={height:0}};a.fn.cycle.transitions.turnLeft=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,true);g.cssBefore.left=f.cycleW;g.animIn.width=f.cycleW});d.cssBefore={top:0,width:0};d.animIn={left:0};d.animOut={width:0}};a.fn.cycle.transitions.turnRight=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,true);g.animIn.width=f.cycleW;g.animOut.left=e.cycleW});d.cssBefore={top:0,left:0,width:0};d.animIn={left:0};d.animOut={width:0}};a.fn.cycle.transitions.zoom=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,false,true);g.cssBefore.top=f.cycleH/2;g.cssBefore.left=f.cycleW/2;g.animIn={top:0,left:0,width:f.cycleW,height:f.cycleH};g.animOut={width:0,height:0,top:e.cycleH/2,left:e.cycleW/2}});d.cssFirst={top:0,left:0};d.cssBefore={width:0,height:0}};a.fn.cycle.transitions.fadeZoom=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,false);g.cssBefore.left=f.cycleW/2;g.cssBefore.top=f.cycleH/2;g.animIn={top:0,left:0,width:f.cycleW,height:f.cycleH}});d.cssBefore={width:0,height:0};d.animOut={opacity:0}};a.fn.cycle.transitions.blindX=function(b,c,d){var e=b.css("overflow","hidden").width();d.before.push(function(f,g,h){a.fn.cycle.commonReset(f,g,h);h.animIn.width=g.cycleW;h.animOut.left=f.cycleW});d.cssBefore={left:e,top:0};d.animIn={left:0};d.animOut={left:e}};a.fn.cycle.transitions.blindY=function(b,c,e){var d=b.css("overflow","hidden").height();e.before.push(function(f,g,h){a.fn.cycle.commonReset(f,g,h);h.animIn.height=g.cycleH;h.animOut.top=f.cycleH});e.cssBefore={top:d,left:0};e.animIn={top:0};e.animOut={top:d}};a.fn.cycle.transitions.blindZ=function(b,c,e){var d=b.css("overflow","hidden").height();var f=b.width();e.before.push(function(g,h,i){a.fn.cycle.commonReset(g,h,i);i.animIn.height=h.cycleH;i.animOut.top=g.cycleH});e.cssBefore={top:d,left:f};e.animIn={top:0,left:0};e.animOut={top:d,left:f}};a.fn.cycle.transitions.growX=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,true);g.cssBefore.left=this.cycleW/2;g.animIn={left:0,width:this.cycleW};g.animOut={left:0}});d.cssBefore={width:0,top:0}};a.fn.cycle.transitions.growY=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,true,false);g.cssBefore.top=this.cycleH/2;g.animIn={top:0,height:this.cycleH};g.animOut={top:0}});d.cssBefore={height:0,left:0}};a.fn.cycle.transitions.curtainX=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,true,true);g.cssBefore.left=f.cycleW/2;g.animIn={left:0,width:this.cycleW};g.animOut={left:e.cycleW/2,width:0}});d.cssBefore={top:0,width:0}};a.fn.cycle.transitions.curtainY=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,true,false,true);g.cssBefore.top=f.cycleH/2;g.animIn={top:0,height:f.cycleH};g.animOut={top:e.cycleH/2,height:0}});d.cssBefore={left:0,height:0}};a.fn.cycle.transitions.cover=function(b,c,g){var e=g.direction||"left";var i=b.css("overflow","hidden").width();var f=b.height();g.before.push(function(d,h,j){a.fn.cycle.commonReset(d,h,j);if(e=="right"){j.cssBefore.left=-i}else{if(e=="up"){j.cssBefore.top=f}else{if(e=="down"){j.cssBefore.top=-f}else{j.cssBefore.left=i}}}});g.animIn={left:0,top:0};g.animOut={opacity:1};g.cssBefore={top:0,left:0}};a.fn.cycle.transitions.uncover=function(b,c,g){var e=g.direction||"left";var i=b.css("overflow","hidden").width();var f=b.height();g.before.push(function(d,h,j){a.fn.cycle.commonReset(d,h,j,true,true,true);if(e=="right"){j.animOut.left=i}else{if(e=="up"){j.animOut.top=-f}else{if(e=="down"){j.animOut.top=f}else{j.animOut.left=-i}}}});g.animIn={left:0,top:0};g.animOut={opacity:1};g.cssBefore={top:0,left:0}};a.fn.cycle.transitions.toss=function(b,c,e){var f=b.css("overflow","visible").width();var d=b.height();e.before.push(function(g,h,i){a.fn.cycle.commonReset(g,h,i,true,true,true);if(!i.animOut.left&&!i.animOut.top){i.animOut={left:f*2,top:-d/2,opacity:0}}else{i.animOut.opacity=0}});e.cssBefore={left:0,top:0};e.animIn={left:0}};a.fn.cycle.transitions.wipe=function(c,e,n){var u=c.css("overflow","hidden").width();var j=c.height();n.cssBefore=n.cssBefore||{};var g;if(n.clip){if(/l2r/.test(n.clip)){g="rect(0px 0px "+j+"px 0px)"}else{if(/r2l/.test(n.clip)){g="rect(0px "+u+"px "+j+"px "+u+"px)"}else{if(/t2b/.test(n.clip)){g="rect(0px "+u+"px 0px 0px)"}else{if(/b2t/.test(n.clip)){g="rect("+j+"px "+u+"px "+j+"px 0px)"}else{if(/zoom/.test(n.clip)){var s=parseInt(j/2);var m=parseInt(u/2);g="rect("+s+"px "+m+"px "+s+"px "+m+"px)"}}}}}}n.cssBefore.clip=n.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var i=n.cssBefore.clip.match(/(\d+)/g);var q=parseInt(i[0]),o=parseInt(i[1]),f=parseInt(i[2]),k=parseInt(i[3]);n.before.push(function(l,t,v){if(l==t){return}var b=a(l),d=a(t);a.fn.cycle.commonReset(l,t,v,true,true,false);v.cssAfter.display="block";var w=1,h=parseInt((v.speedIn/13))-1;(function r(){var A=q?q-parseInt(w*(q/h)):0;var y=k?k-parseInt(w*(k/h)):0;var x=f<j?f+parseInt(w*((j-f)/h||1)):j;var z=o<u?o+parseInt(w*((u-o)/h||1)):u;d.css({clip:"rect("+A+"px "+z+"px "+x+"px "+y+"px)"});(w++<=h)?setTimeout(r,13):b.css("display","none")})()});n.cssBefore={display:"block",opacity:1,top:0,left:0};n.animIn={left:0};n.animOut={left:0}}})(jQuery);
