(function(window,undefined){var jQuery=function(selector,context){return new jQuery.fn.init(selector,context);},_jQuery=window.jQuery,_$=window.$,document=window.document,rootjQuery,quickExpr=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/,rnotwhite=/\S/,rtrim=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,userAgent=navigator.userAgent,browserMatch,readyBound=false,readyList=[],DOMContentLoaded,toString=Object.prototype.toString,hasOwnProperty=Object.prototype.hasOwnProperty,push=Array.prototype.push,slice=Array.prototype.slice,indexOf=Array.prototype.indexOf;jQuery.fn=jQuery.prototype={init:function(selector,context){var match,elem,ret,doc;if(!selector){return this;}
if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this;}
if(selector==="body"&&!context){this.context=document;this[0]=document.body;this.selector="body";this.length=1;return this;}
if(typeof selector==="string"){match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){doc=(context?context.ownerDocument||context:document);ret=rsingleTag.exec(selector);if(ret){if(jQuery.isPlainObject(context)){selector=[document.createElement(ret[1])];jQuery.fn.attr.call(selector,context,true);}else{selector=[doc.createElement(ret[1])];}}else{ret=buildFragment([match[1]],[doc]);selector=(ret.cacheable?ret.fragment.cloneNode(true):ret.fragment).childNodes;}
return jQuery.merge(this,selector);}else{elem=document.getElementById(match[2]);if(elem){if(elem.id!==match[2]){return rootjQuery.find(selector);}
this.length=1;this[0]=elem;}
this.context=document;this.selector=selector;return this;}}else if(!context&&/^\w+$/.test(selector)){this.selector=selector;this.context=document;selector=document.getElementsByTagName(selector);return jQuery.merge(this,selector);}else if(!context||context.jquery){return(context||rootjQuery).find(selector);}else{return jQuery(context).find(selector);}}else if(jQuery.isFunction(selector)){return rootjQuery.ready(selector);}
if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context;}
return jQuery.makeArray(selector,this);},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length;},toArray:function(){return slice.call(this,0);},get:function(num){return num==null?this.toArray():(num<0?this.slice(num)[0]:this[num]);},pushStack:function(elems,name,selector){var ret=jQuery();if(jQuery.isArray(elems)){push.apply(ret,elems);}else{jQuery.merge(ret,elems);}
ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector;}else if(name){ret.selector=this.selector+"."+name+"("+selector+")";}
return ret;},each:function(callback,args){return jQuery.each(this,callback,args);},ready:function(fn){jQuery.bindReady();if(jQuery.isReady){fn.call(document,jQuery);}else if(readyList){readyList.push(fn);}
return this;},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},slice:function(){return this.pushStack(slice.apply(this,arguments),"slice",slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},end:function(){return this.prevObject||jQuery(null);},push:push,sort:[].sort,splice:[].splice};jQuery.fn.init.prototype=jQuery.fn;jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options,name,src,copy;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}
if(typeof target!=="object"&&!jQuery.isFunction(target)){target={};}
if(length===i){target=this;--i;}
for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue;}
if(deep&&copy&&(jQuery.isPlainObject(copy)||jQuery.isArray(copy))){var clone=src&&(jQuery.isPlainObject(src)||jQuery.isArray(src))?src:jQuery.isArray(copy)?[]:{};target[name]=jQuery.extend(deep,clone,copy);}else if(copy!==undefined){target[name]=copy;}}}}
return target;};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery;}
return jQuery;},isReady:false,ready:function(){if(!jQuery.isReady){if(!document.body){return setTimeout(jQuery.ready,13);}
jQuery.isReady=true;if(readyList){var fn,i=0;while((fn=readyList[i++])){fn.call(document,jQuery);}
readyList=null;}
if(jQuery.fn.triggerHandler){jQuery(document).triggerHandler("ready");}}},bindReady:function(){if(readyBound){return;}
readyBound=true;if(document.readyState==="complete"){return jQuery.ready();}
if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",jQuery.ready,false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",jQuery.ready);var toplevel=false;try{toplevel=window.frameElement==null;}catch(e){}
if(document.documentElement.doScroll&&toplevel){doScrollCheck();}}},isFunction:function(obj){return toString.call(obj)==="[object Function]";},isArray:function(obj){return toString.call(obj)==="[object Array]";},isPlainObject:function(obj){if(!obj||toString.call(obj)!=="[object Object]"||obj.nodeType||obj.setInterval){return false;}
if(obj.constructor&&!hasOwnProperty.call(obj,"constructor")&&!hasOwnProperty.call(obj.constructor.prototype,"isPrototypeOf")){return false;}
var key;for(key in obj){}
return key===undefined||hasOwnProperty.call(obj,key);},isEmptyObject:function(obj){for(var name in obj){return false;}
return true;},error:function(msg){throw msg;},parseJSON:function(data){if(typeof data!=="string"||!data){return null;}
data=jQuery.trim(data);if(/^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return window.JSON&&window.JSON.parse?window.JSON.parse(data):(new Function("return "+data))();}else{jQuery.error("Invalid JSON: "+data);}},noop:function(){},globalEval:function(data){if(data&&rnotwhite.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(data));}else{script.text=data;}
head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()===name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length,isObj=length===undefined||jQuery.isFunction(object);if(args){if(isObj){for(name in object){if(callback.apply(object[name],args)===false){break;}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break;}}}}else{if(isObj){for(name in object){if(callback.call(object[name],name,object[name])===false){break;}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}
return object;},trim:function(text){return(text||"").replace(rtrim,"");},makeArray:function(array,results){var ret=results||[];if(array!=null){if(array.length==null||typeof array==="string"||jQuery.isFunction(array)||(typeof array!=="function"&&array.setInterval)){push.call(ret,array);}else{jQuery.merge(ret,array);}}
return ret;},inArray:function(elem,array){if(array.indexOf){return array.indexOf(elem);}
for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i;}}
return-1;},merge:function(first,second){var i=first.length,j=0;if(typeof second.length==="number"){for(var l=second.length;j<l;j++){first[i++]=second[j];}}else{while(second[j]!==undefined){first[i++]=second[j++];}}
first.length=i;return first;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!==!callback(elems[i],i)){ret.push(elems[i]);}}
return ret;},map:function(elems,callback,arg){var ret=[],value;for(var i=0,length=elems.length;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret[ret.length]=value;}}
return ret.concat.apply([],ret);},guid:1,proxy:function(fn,proxy,thisObject){if(arguments.length===2){if(typeof proxy==="string"){thisObject=fn;fn=thisObject[proxy];proxy=undefined;}else if(proxy&&!jQuery.isFunction(proxy)){thisObject=proxy;proxy=undefined;}}
if(!proxy&&fn){proxy=function(){return fn.apply(thisObject||this,arguments);};}
if(fn){proxy.guid=fn.guid=fn.guid||proxy.guid||jQuery.guid++;}
return proxy;},uaMatch:function(ua){ua=ua.toLowerCase();var match=/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||!/compatible/.test(ua)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};},browser:{}});browserMatch=jQuery.uaMatch(userAgent);if(browserMatch.browser){jQuery.browser[browserMatch.browser]=true;jQuery.browser.version=browserMatch.version;}
if(jQuery.browser.webkit){jQuery.browser.safari=true;}
if(indexOf){jQuery.inArray=function(elem,array){return indexOf.call(array,elem);};}
rootjQuery=jQuery(document);if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false);jQuery.ready();};}else if(document.attachEvent){DOMContentLoaded=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded);jQuery.ready();}};}
function doScrollCheck(){if(jQuery.isReady){return;}
try{document.documentElement.doScroll("left");}catch(error){setTimeout(doScrollCheck,1);return;}
jQuery.ready();}
function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"});}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");}
if(elem.parentNode){elem.parentNode.removeChild(elem);}}
function access(elems,key,value,exec,fn,pass){var length=elems.length;if(typeof key==="object"){for(var k in key){access(elems,k,key[k],exec,fn,value);}
return elems;}
if(value!==undefined){exec=!pass&&exec&&jQuery.isFunction(value);for(var i=0;i<length;i++){fn(elems[i],key,exec?value.call(elems[i],i,fn(elems[i],key)):value,pass);}
return elems;}
return length?fn(elems[0],key):undefined;}
function now(){return(new Date).getTime();}
(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+now();div.style.display="none";div.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return;}
jQuery.support={leadingWhitespace:div.firstChild.nodeType===3,tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:/^0.55$/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:div.getElementsByTagName("input")[0].value==="on",optSelected:document.createElement("select").appendChild(document.createElement("option")).selected,parentNode:div.removeChild(div.appendChild(document.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){}
root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id];}
try{delete script.test;}catch(e){jQuery.support.deleteExpando=false;}
root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function click(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",click);});div.cloneNode(true).fireEvent("onclick");}
div=document.createElement("div");div.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var fragment=document.createDocumentFragment();fragment.appendChild(div.firstChild);jQuery.support.checkClone=fragment.cloneNode(true).cloneNode(true).lastChild.checked;jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display='none';div=null;});var eventSupported=function(eventName){var el=document.createElement("div");eventName="on"+eventName;var isSupported=(eventName in el);if(!isSupported){el.setAttribute(eventName,"return;");isSupported=typeof el[eventName]==="function";}
el=null;return isSupported;};jQuery.support.submitBubbles=eventSupported("submit");jQuery.support.changeBubbles=eventSupported("change");root=script=div=all=a=null;})();jQuery.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},expando:expando,noData:{"embed":true,"object":true,"applet":true},data:function(elem,name,data){if(elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()]){return;}
elem=elem==window?windowData:elem;var id=elem[expando],cache=jQuery.cache,thisCache;if(!id&&typeof name==="string"&&data===undefined){return null;}
if(!id){id=++uuid;}
if(typeof name==="object"){elem[expando]=id;thisCache=cache[id]=jQuery.extend(true,{},name);}else if(!cache[id]){elem[expando]=id;cache[id]={};}
thisCache=cache[id];if(data!==undefined){thisCache[name]=data;}
return typeof name==="string"?thisCache[name]:thisCache;},removeData:function(elem,name){if(elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()]){return;}
elem=elem==window?windowData:elem;var id=elem[expando],cache=jQuery.cache,thisCache=cache[id];if(name){if(thisCache){delete thisCache[name];if(jQuery.isEmptyObject(thisCache)){jQuery.removeData(elem);}}}else{if(jQuery.support.deleteExpando){delete elem[jQuery.expando];}else if(elem.removeAttribute){elem.removeAttribute(jQuery.expando);}
delete cache[id];}}});jQuery.fn.extend({data:function(key,value){if(typeof key==="undefined"&&this.length){return jQuery.data(this[0]);}else if(typeof key==="object"){return this.each(function(){jQuery.data(this,key);});}
var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key);}
return data===undefined&&parts[1]?this.data(parts[0]):data;}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});}});jQuery.extend({queue:function(elem,type,data){if(!elem){return;}
type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!data){return q||[];}
if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data));}else{q.push(data);}
return q;},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),fn=queue.shift();if(fn==="inprogress"){fn=queue.shift();}
if(fn){if(type==="fx"){queue.unshift("inprogress");}
fn.call(elem,function(){jQuery.dequeue(elem,type);});}}});jQuery.fn.extend({queue:function(type,data){if(typeof type!=="string"){data=type;type="fx";}
if(data===undefined){return jQuery.queue(this[0],type);}
return this.each(function(i,elem){var queue=jQuery.queue(this,type,data);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type);}});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});},delay:function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(){var elem=this;setTimeout(function(){jQuery.dequeue(elem,type);},time);});},clearQueue:function(type){return this.queue(type||"fx",[]);}});var rclass=/[\n\t]/g,rspace=/\s+/,rreturn=/\r/g,rspecialurl=/href|src|style/,rtype=/(button|input)/i,rfocusable=/(button|input|object|select|textarea)/i,rclickable=/^(a|area)$/i,rradiocheck=/radio|checkbox/;jQuery.fn.extend({attr:function(name,value){return access(this,name,value,true,jQuery.attr);},removeAttr:function(name,fn){return this.each(function(){jQuery.attr(this,name,"");if(this.nodeType===1){this.removeAttribute(name);}});},addClass:function(value){if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);self.addClass(value.call(this,i,self.attr("class")));});}
if(value&&typeof value==="string"){var classNames=(value||"").split(rspace);for(var i=0,l=this.length;i<l;i++){var elem=this[i];if(elem.nodeType===1){if(!elem.className){elem.className=value;}else{var className=" "+elem.className+" ",setClass=elem.className;for(var c=0,cl=classNames.length;c<cl;c++){if(className.indexOf(" "+classNames[c]+" ")<0){setClass+=" "+classNames[c];}}
elem.className=jQuery.trim(setClass);}}}}
return this;},removeClass:function(value){if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);self.removeClass(value.call(this,i,self.attr("class")));});}
if((value&&typeof value==="string")||value===undefined){var classNames=(value||"").split(rspace);for(var i=0,l=this.length;i<l;i++){var elem=this[i];if(elem.nodeType===1&&elem.className){if(value){var className=(" "+elem.className+" ").replace(rclass," ");for(var c=0,cl=classNames.length;c<cl;c++){className=className.replace(" "+classNames[c]+" "," ");}
elem.className=jQuery.trim(className);}else{elem.className="";}}}}
return this;},toggleClass:function(value,stateVal){var type=typeof value,isBool=typeof stateVal==="boolean";if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);self.toggleClass(value.call(this,i,self.attr("class"),stateVal),stateVal);});}
return this.each(function(){if(type==="string"){var className,i=0,self=jQuery(this),state=stateVal,classNames=value.split(rspace);while((className=classNames[i++])){state=isBool?state:!self.hasClass(className);self[state?"addClass":"removeClass"](className);}}else if(type==="undefined"||type==="boolean"){if(this.className){jQuery.data(this,"__className__",this.className);}
this.className=this.className||value===false?"":jQuery.data(this,"__className__")||"";}});},hasClass:function(selector){var className=" "+selector+" ";for(var i=0,l=this.length;i<l;i++){if((" "+this[i].className+" ").replace(rclass," ").indexOf(className)>-1){return true;}}
return false;},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text;}
if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type==="select-one";if(index<0){return null;}
for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one){return value;}
values.push(value);}}
return values;}
if(rradiocheck.test(elem.type)&&!jQuery.support.checkOn){return elem.getAttribute("value")===null?"on":elem.value;}
return(elem.value||"").replace(rreturn,"");}
return undefined;}
var isFunction=jQuery.isFunction(value);return this.each(function(i){var self=jQuery(this),val=value;if(this.nodeType!==1){return;}
if(isFunction){val=value.call(this,i,self.val());}
if(typeof val==="number"){val+="";}
if(jQuery.isArray(val)&&rradiocheck.test(this.type)){this.checked=jQuery.inArray(self.val(),val)>=0;}else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(val);jQuery("option",this).each(function(){this.selected=jQuery.inArray(jQuery(this).val(),values)>=0;});if(!values.length){this.selectedIndex=-1;}}else{this.value=val;}});}});jQuery.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(elem,name,value,pass){if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;}
if(pass&&name in jQuery.attrFn){return jQuery(elem)[name](value);}
var notxml=elem.nodeType!==1||!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.nodeType===1){var special=rspecialurl.test(name);if(name==="selected"&&!jQuery.support.optSelected){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}}
if(name in elem&&notxml&&!special){if(set){if(name==="type"&&rtype.test(elem.nodeName)&&elem.parentNode){jQuery.error("type property can't be changed");}
elem[name]=value;}
if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue;}
if(name==="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined;}
return elem[name];}
if(!jQuery.support.style&&notxml&&name==="style"){if(set){elem.style.cssText=""+value;}
return elem.style.cssText;}
if(set){elem.setAttribute(name,""+value);}
var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}
return jQuery.style(elem,name,value);}});var rnamespaces=/\.(.*)$/,fcleanup=function(nm){return nm.replace(/[^\w\s\.\|`]/g,function(ch){return"\\"+ch;});};jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType===3||elem.nodeType===8){return;}
if(elem.setInterval&&(elem!==window&&!elem.frameElement)){elem=window;}
var handleObjIn,handleObj;if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;}
if(!handler.guid){handler.guid=jQuery.guid++;}
var elemData=jQuery.data(elem);if(!elemData){return;}
var events=elemData.events=elemData.events||{},eventHandle=elemData.handle,eventHandle;if(!eventHandle){elemData.handle=eventHandle=function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(eventHandle.elem,arguments):undefined;};}
eventHandle.elem=elem;types=types.split(" ");var type,i=0,namespaces;while((type=types[i++])){handleObj=handleObjIn?jQuery.extend({},handleObjIn):{handler:handler,data:data};if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();handleObj.namespace=namespaces.slice(0).sort().join(".");}else{namespaces=[];handleObj.namespace="";}
handleObj.type=type;handleObj.guid=handler.guid;var handlers=events[type],special=jQuery.event.special[type]||{};if(!handlers){handlers=events[type]=[];if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false);}else if(elem.attachEvent){elem.attachEvent("on"+type,eventHandle);}}}
if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}}
handlers.push(handleObj);jQuery.event.global[type]=true;}
elem=null;},global:{},remove:function(elem,types,handler,pos){if(elem.nodeType===3||elem.nodeType===8){return;}
var ret,type,fn,i=0,all,namespaces,namespace,special,eventType,handleObj,origType,elemData=jQuery.data(elem),events=elemData&&elemData.events;if(!elemData||!events){return;}
if(types&&types.type){handler=types.handler;types=types.type;}
if(!types||typeof types==="string"&&types.charAt(0)==="."){types=types||"";for(type in events){jQuery.event.remove(elem,type+types);}
return;}
types=types.split(" ");while((type=types[i++])){origType=type;handleObj=null;all=type.indexOf(".")<0;namespaces=[];if(!all){namespaces=type.split(".");type=namespaces.shift();namespace=new RegExp("(^|\\.)"+
jQuery.map(namespaces.slice(0).sort(),fcleanup).join("\\.(?:.*\\.)?")+"(\\.|$)")}
eventType=events[type];if(!eventType){continue;}
if(!handler){for(var j=0;j<eventType.length;j++){handleObj=eventType[j];if(all||namespace.test(handleObj.namespace)){jQuery.event.remove(elem,origType,handleObj.handler,j);eventType.splice(j--,1);}}
continue;}
special=jQuery.event.special[type]||{};for(var j=pos||0;j<eventType.length;j++){handleObj=eventType[j];if(handler.guid===handleObj.guid){if(all||namespace.test(handleObj.namespace)){if(pos==null){eventType.splice(j--,1);}
if(special.remove){special.remove.call(elem,handleObj);}}
if(pos!=null){break;}}}
if(eventType.length===0||pos!=null&&eventType.length===1){if(!special.teardown||special.teardown.call(elem,namespaces)===false){removeEvent(elem,type,elemData.handle);}
ret=null;delete events[type];}}
if(jQuery.isEmptyObject(events)){var handle=elemData.handle;if(handle){handle.elem=null;}
delete elemData.events;delete elemData.handle;if(jQuery.isEmptyObject(elemData)){jQuery.removeData(elem);}}},trigger:function(event,data,elem){var type=event.type||event,bubbling=arguments[3];if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;}
if(!elem){event.stopPropagation();if(jQuery.event.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem);}});}}
if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;}
event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event);}
event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data);}
var parent=elem.parentNode||elem.ownerDocument;try{if(!(elem&&elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()])){if(elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false;}}}catch(e){}
if(!event.isPropagationStopped()&&parent){jQuery.event.trigger(event,data,parent,true);}else if(!event.isDefaultPrevented()){var target=event.target,old,isClick=jQuery.nodeName(target,"a")&&type==="click",special=jQuery.event.special[type]||{};if((!special._default||special._default.call(elem,event)===false)&&!isClick&&!(target&&target.nodeName&&jQuery.noData[target.nodeName.toLowerCase()])){try{if(target[type]){old=target["on"+type];if(old){target["on"+type]=null;}
jQuery.event.triggered=true;target[type]();}}catch(e){}
if(old){target["on"+type]=old;}
jQuery.event.triggered=false;}}},handle:function(event){var all,handlers,namespaces,namespace,events;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;all=event.type.indexOf(".")<0&&!event.exclusive;if(!all){namespaces=event.type.split(".");event.type=namespaces.shift();namespace=new RegExp("(^|\\.)"+namespaces.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");}
var events=jQuery.data(this,"events"),handlers=events[event.type];if(events&&handlers){handlers=handlers.slice(0);for(var j=0,l=handlers.length;j<l;j++){var handleObj=handlers[j];if(all||namespace.test(handleObj.namespace)){event.handler=handleObj.handler;event.data=handleObj.data;event.handleObj=handleObj;var ret=handleObj.handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}
if(event.isImmediatePropagationStopped()){break;}}}}
return event.result;},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event;}
var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}
if(!event.target){event.target=event.srcElement||document;}
if(event.target.nodeType===3){event.target=event.target.parentNode;}
if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement===event.target?event.toElement:event.fromElement;}
if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0);}
if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode;}
if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey;}

if(!event.which&&event.button!==undefined){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));}
return event;},guid:1E8,proxy:jQuery.proxy,special:{ready:{setup:jQuery.bindReady,teardown:jQuery.noop},live:{add:function(handleObj){jQuery.event.add(this,handleObj.origType,jQuery.extend({},handleObj,{handler:liveHandler}));},remove:function(handleObj){var remove=true,type=handleObj.origType.replace(rnamespaces,"");jQuery.each(jQuery.data(this,"events").live||[],function(){if(type===this.origType.replace(rnamespaces,"")){remove=false;return false;}});if(remove){jQuery.event.remove(this,handleObj.origType,liveHandler);}}},beforeunload:{setup:function(data,namespaces,eventHandle){if(this.setInterval){this.onbeforeunload=eventHandle;}
return false;},teardown:function(namespaces,eventHandle){if(this.onbeforeunload===eventHandle){this.onbeforeunload=null;}}}}};var removeEvent=document.removeEventListener?function(elem,type,handle){elem.removeEventListener(type,handle,false);}:function(elem,type,handle){elem.detachEvent("on"+type,handle);};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src);}
if(src&&src.type){this.originalEvent=src;this.type=src.type;}else{this.type=src;}
this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;}
function returnTrue(){return true;}
jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return;}
if(e.preventDefault){e.preventDefault();}
e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return;}
if(e.stopPropagation){e.stopPropagation();}
e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;try{while(parent&&parent!==this){parent=parent.parentNode;}
if(parent!==this){event.type=event.data;jQuery.event.handle.apply(this,arguments);}}catch(e){}},delegate=function(event){event.type=event.data;jQuery.event.handle.apply(this,arguments);};jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){jQuery.event.special[orig]={setup:function(data){jQuery.event.add(this,fix,data&&data.selector?delegate:withinElement,orig);},teardown:function(data){jQuery.event.remove(this,fix,data&&data.selector?delegate:withinElement);}};});if(!jQuery.support.submitBubbles){jQuery.event.special.submit={setup:function(data,namespaces){if(this.nodeName.toLowerCase()!=="form"){jQuery.event.add(this,"click.specialSubmit",function(e){var elem=e.target,type=elem.type;if((type==="submit"||type==="image")&&jQuery(elem).closest("form").length){return trigger("submit",this,arguments);}});jQuery.event.add(this,"keypress.specialSubmit",function(e){var elem=e.target,type=elem.type;if((type==="text"||type==="password")&&jQuery(elem).closest("form").length&&e.keyCode===13){return trigger("submit",this,arguments);}});}else{return false;}},teardown:function(namespaces){jQuery.event.remove(this,".specialSubmit");}};}
if(!jQuery.support.changeBubbles){var formElems=/textarea|input|select/i,changeFilters,getVal=function(elem){var type=elem.type,val=elem.value;if(type==="radio"||type==="checkbox"){val=elem.checked;}else if(type==="select-multiple"){val=elem.selectedIndex>-1?jQuery.map(elem.options,function(elem){return elem.selected;}).join("-"):"";}else if(elem.nodeName.toLowerCase()==="select"){val=elem.selectedIndex;}
return val;},testChange=function testChange(e){var elem=e.target,data,val;if(!formElems.test(elem.nodeName)||elem.readOnly){return;}
data=jQuery.data(elem,"_change_data");val=getVal(elem);if(e.type!=="focusout"||elem.type!=="radio"){jQuery.data(elem,"_change_data",val);}
if(data===undefined||val===data){return;}
if(data!=null||val){e.type="change";return jQuery.event.trigger(e,arguments[1],elem);}};jQuery.event.special.change={filters:{focusout:testChange,click:function(e){var elem=e.target,type=elem.type;if(type==="radio"||type==="checkbox"||elem.nodeName.toLowerCase()==="select"){return testChange.call(this,e);}},keydown:function(e){var elem=e.target,type=elem.type;if((e.keyCode===13&&elem.nodeName.toLowerCase()!=="textarea")||(e.keyCode===32&&(type==="checkbox"||type==="radio"))||type==="select-multiple"){return testChange.call(this,e);}},beforeactivate:function(e){var elem=e.target;jQuery.data(elem,"_change_data",getVal(elem));}},setup:function(data,namespaces){if(this.type==="file"){return false;}
for(var type in changeFilters){jQuery.event.add(this,type+".specialChange",changeFilters[type]);}
return formElems.test(this.nodeName);},teardown:function(namespaces){jQuery.event.remove(this,".specialChange");return formElems.test(this.nodeName);}};changeFilters=jQuery.event.special.change.filters;}
function trigger(type,elem,args){args[0].type=type;return jQuery.event.handle.apply(elem,args);}
if(document.addEventListener){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){jQuery.event.special[fix]={setup:function(){this.addEventListener(orig,handler,true);},teardown:function(){this.removeEventListener(orig,handler,true);}};function handler(e){e=jQuery.event.fix(e);e.type=fix;return jQuery.event.handle.call(this,e);}});}
jQuery.each(["bind","one"],function(i,name){jQuery.fn[name]=function(type,data,fn){if(typeof type==="object"){for(var key in type){this[name](key,data,type[key],fn);}
return this;}
if(jQuery.isFunction(data)){fn=data;data=undefined;}
var handler=name==="one"?jQuery.proxy(fn,function(event){jQuery(this).unbind(event,handler);return fn.apply(this,arguments);}):fn;if(type==="unload"&&name!=="one"){this.one(type,data,fn);}else{for(var i=0,l=this.length;i<l;i++){jQuery.event.add(this[i],type,handler,data);}}
return this;};});jQuery.fn.extend({unbind:function(type,fn){if(typeof type==="object"&&!type.preventDefault){for(var key in type){this.unbind(key,type[key]);}}else{for(var i=0,l=this.length;i<l;i++){jQuery.event.remove(this[i],type,fn);}}
return this;},delegate:function(selector,types,data,fn){return this.live(types,data,fn,selector);},undelegate:function(selector,types,fn){if(arguments.length===0){return this.unbind("live");}else{return this.die(types,null,fn,selector);}},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result;}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.proxy(fn,args[i++]);}
return this.click(jQuery.proxy(fn,function(event){var lastToggle=(jQuery.data(this,"lastToggle"+fn.guid)||0)%i;jQuery.data(this,"lastToggle"+fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);}});var liveMap={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};jQuery.each(["live","die"],function(i,name){jQuery.fn[name]=function(types,data,fn,origSelector){var type,i=0,match,namespaces,preType,selector=origSelector||this.selector,context=origSelector?this:jQuery(this.context);if(jQuery.isFunction(data)){fn=data;data=undefined;}
types=(types||"").split(" ");while((type=types[i++])!=null){match=rnamespaces.exec(type);namespaces="";if(match){namespaces=match[0];type=type.replace(rnamespaces,"");}
if(type==="hover"){types.push("mouseenter"+namespaces,"mouseleave"+namespaces);continue;}
preType=type;if(type==="focus"||type==="blur"){types.push(liveMap[type]+namespaces);type=type+namespaces;}else{type=(liveMap[type]||type)+namespaces;}
if(name==="live"){context.each(function(){jQuery.event.add(this,liveConvert(type,selector),{data:data,selector:selector,handler:fn,origType:type,origHandler:fn,preType:preType});});}else{context.unbind(liveConvert(type,selector),fn);}}
return this;}});function liveHandler(event){var stop,elems=[],selectors=[],args=arguments,related,match,handleObj,elem,j,i,l,data,events=jQuery.data(this,"events");if(event.liveFired===this||!events||!events.live||event.button&&event.type==="click"){return;}
event.liveFired=this;var live=events.live.slice(0);for(j=0;j<live.length;j++){handleObj=live[j];if(handleObj.origType.replace(rnamespaces,"")===event.type){selectors.push(handleObj.selector);}else{live.splice(j--,1);}}
match=jQuery(event.target).closest(selectors,event.currentTarget);for(i=0,l=match.length;i<l;i++){for(j=0;j<live.length;j++){handleObj=live[j];if(match[i].selector===handleObj.selector){elem=match[i].elem;related=null;if(handleObj.preType==="mouseenter"||handleObj.preType==="mouseleave"){related=jQuery(event.relatedTarget).closest(handleObj.selector)[0];}
if(!related||related!==elem){elems.push({elem:elem,handleObj:handleObj});}}}}
for(i=0,l=elems.length;i<l;i++){match=elems[i];event.currentTarget=match.elem;event.data=match.handleObj.data;event.handleObj=match.handleObj;if(match.handleObj.origHandler.apply(match.elem,args)===false){stop=false;break;}}
return stop;}
function liveConvert(type,selector){return"live."+(type&&type!=="*"?type+".":"")+selector.replace(/\./g,"`").replace(/ /g,"&");}
jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error").split(" "),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};if(jQuery.attrFn){jQuery.attrFn[name]=true;}});if(window.attachEvent&&!window.addEventListener){window.attachEvent("onunload",function(){for(var id in jQuery.cache){if(jQuery.cache[id].handle){try{jQuery.event.remove(jQuery.cache[id].handle.elem);}catch(e){}}}});}
(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;[0,0].sort(function(){baseHasDuplicate=false;return 0;});var Sizzle=function(selector,context,results,seed){results=results||[];var origContext=context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[];}
if(!selector||typeof selector!=="string"){return results;}
var parts=[],m,set,checkSet,extra,prune=true,contextXML=isXML(context),soFar=selector;while((chunker.exec(""),m=chunker.exec(soFar))!==null){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break;}}
if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift();}
set=posProcess(selector,set);}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){var ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];}
if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}
while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}
if(pop==null){pop=context;}
Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=parts=[];}}
if(!checkSet){checkSet=set;}
if(!checkSet){Sizzle.error(cur||selector);}
if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context&&context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}
if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results);}
return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}
return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];}
for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.leftMatch[type].exec(expr))){var left=match[1];match.splice(1,1);if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}
if(!set){set=context.getElementsByTagName("*");}
return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.leftMatch[type].exec(expr))!=null&&match[2]){var filter=Expr.filter[type],found,item,left=match[1];anyFound=false;match.splice(1,1);if(left.substr(left.length-1)==="\\"){continue;}
if(curLoop===result){result=[];}
if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}}
if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}}
if(found!==undefined){if(!inplace){curLoop=result;}
expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}
break;}}}
if(expr===old){if(anyFound==null){Sizzle.error(expr);}else{break;}}
old=expr;}
return curLoop;};Sizzle.error=function(msg){throw"Syntax error, unrecognized expression: "+msg;};var Expr=Sizzle.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\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag){part=part.toLowerCase();}
for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}
checkSet[i]=isPartStrNotTag||elem&&elem.nodeName.toLowerCase()===part?elem||false:elem===part;}}
if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=part.toLowerCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName.toLowerCase()===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}
if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=part.toLowerCase();checkFn=dirNodeCheck;}
checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=part.toLowerCase();checkFn=dirNodeCheck;}
checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}
return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;}
for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").replace(/[\t\n]/g," ").indexOf(match)>=0)){if(!inplace){result.push(elem);}}else if(inplace){curLoop[i]=false;}}}
return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){return match[1].toLowerCase();},CHILD:function(match){if(match[1]==="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]==="even"&&"2n"||match[2]==="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}
match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}
if(match[2]==="~="){match[4]=" "+match[4]+" ";}
return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}
return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}
return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toLowerCase()==="button";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3]-0;},gt:function(elem,i,match){return i>match[3]-0;},nth:function(elem,i,match){return match[3]-0===i;},eq:function(elem,i,match){return match[3]-0===i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||getText([elem])||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false;}}
return true;}else{Sizzle.error("Syntax error, unrecognized expression: "+name);}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while((node=node.previousSibling)){if(node.nodeType===1){return false;}}
if(type==="first"){return true;}
node=elem;case'last':while((node=node.nextSibling)){if(node.nodeType===1){return false;}}
return true;case'nth':var first=match[2],last=match[3];if(first===1&&last===0){return true;}
var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}}
parent.sizcache=doneName;}
var diff=elem.nodeIndex-last;if(first===0){return diff===0;}else{return(diff%first===0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName.toLowerCase()===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!==check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)/g,function(all,num){return"\\"+(num-0+1);}));}
var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results;}
return array;};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}}
return ret;};}
var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition){if(a==b){hasDuplicate=true;}
return a.compareDocumentPosition?-1:1;}
var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true;}
return ret;};}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){if(!a.sourceIndex||!b.sourceIndex){if(a==b){hasDuplicate=true;}
return a.sourceIndex?-1:1;}
var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true;}
return ret;};}else if(document.createRange){sortOrder=function(a,b){if(!a.ownerDocument||!b.ownerDocument){if(a==b){hasDuplicate=true;}
return a.ownerDocument?-1:1;}
var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.setStart(a,0);aRange.setEnd(a,0);bRange.setStart(b,0);bRange.setEnd(b,0);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;}
return ret;};}
function getText(elems){var ret="",elem;for(var i=0;elems[i];i++){elem=elems[i];if(elem.nodeType===3||elem.nodeType===4){ret+=elem.nodeValue;}else if(elem.nodeType!==8){ret+=getText(elem.childNodes);}}
return ret;}
(function(){var form=document.createElement("div"),id="script"+(new Date).getTime();form.innerHTML="<a name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}
root.removeChild(form);root=form=null;})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}
results=tmp;}
return results;};}
div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}
div=null;})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}
Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}
return oldSizzle(query,context,extra,seed);};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop];}
div=null;})();}
(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){return;}
div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return;}
Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};div=null;})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(elem.nodeName.toLowerCase()===cur){match=elem;break;}
elem=elem[dir];}
checkSet[i]=match;}}}
function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}}
elem=elem[dir];}
checkSet[i]=match;}}}
var contains=document.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16);}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){var documentElement=(elem?elem.ownerDocument||elem:0).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}
selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);}
return Sizzle.filter(later,tmpSet);};jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;jQuery.unique=Sizzle.uniqueSort;jQuery.text=getText;jQuery.isXMLDoc=isXML;jQuery.contains=contains;return;window.Sizzle=Sizzle;})();var runtil=/Until$/,rparentsprev=/^(?:parents|prevUntil|prevAll)/,rmultiselector=/,/,slice=Array.prototype.slice;var winnow=function(elements,qualifier,keep){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)===keep;});}else if(qualifier.nodeType){return jQuery.grep(elements,function(elem,i){return(elem===qualifier)===keep;});}else if(typeof qualifier==="string"){var filtered=jQuery.grep(elements,function(elem){return elem.nodeType===1;});if(isSimple.test(qualifier)){return jQuery.filter(qualifier,filtered,!keep);}else{qualifier=jQuery.filter(qualifier,filtered);}}
return jQuery.grep(elements,function(elem,i){return(jQuery.inArray(elem,qualifier)>=0)===keep;});};jQuery.fn.extend({find:function(selector){var ret=this.pushStack("","find",selector),length=0;for(var i=0,l=this.length;i<l;i++){length=ret.length;jQuery.find(selector,this[i],ret);if(i>0){for(var n=length;n<ret.length;n++){for(var r=0;r<length;r++){if(ret[r]===ret[n]){ret.splice(n--,1);break;}}}}}
return ret;},has:function(target){var targets=jQuery(target);return this.filter(function(){for(var i=0,l=targets.length;i<l;i++){if(jQuery.contains(this,targets[i])){return true;}}});},not:function(selector){return this.pushStack(winnow(this,selector,false),"not",selector);},filter:function(selector){return this.pushStack(winnow(this,selector,true),"filter",selector);},is:function(selector){return!!selector&&jQuery.filter(selector,this).length>0;},closest:function(selectors,context){if(jQuery.isArray(selectors)){var ret=[],cur=this[0],match,matches={},selector;if(cur&&selectors.length){for(var i=0,l=selectors.length;i<l;i++){selector=selectors[i];if(!matches[selector]){matches[selector]=jQuery.expr.match.POS.test(selector)?jQuery(selector,context||this.context):selector;}}
while(cur&&cur.ownerDocument&&cur!==context){for(selector in matches){match=matches[selector];if(match.jquery?match.index(cur)>-1:jQuery(cur).is(match)){ret.push({selector:selector,elem:cur});delete matches[selector];}}
cur=cur.parentNode;}}
return ret;}
var pos=jQuery.expr.match.POS.test(selectors)?jQuery(selectors,context||this.context):null;return this.map(function(i,cur){while(cur&&cur.ownerDocument&&cur!==context){if(pos?pos.index(cur)>-1:jQuery(cur).is(selectors)){return cur;}
cur=cur.parentNode;}
return null;});},index:function(elem){if(!elem||typeof elem==="string"){return jQuery.inArray(this[0],elem?jQuery(elem):this.parent().children());}
return jQuery.inArray(elem.jquery?elem[0]:elem,this);},add:function(selector,context){var set=typeof selector==="string"?jQuery(selector,context||this.context):jQuery.makeArray(selector),all=jQuery.merge(this.get(),set);return this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])?all:jQuery.unique(all));},andSelf:function(){return this.add(this.prevObject);}});function isDisconnected(node){return!node||!node.parentNode||node.parentNode.nodeType===11;}
jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return jQuery.dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until);},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until);},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until);if(!runtil.test(name)){selector=until;}
if(selector&&typeof selector==="string"){ret=jQuery.filter(selector,ret);}
ret=this.length>1?jQuery.unique(ret):ret;if((this.length>1||rmultiselector.test(selector))&&rparentsprev.test(name)){ret=ret.reverse();}
return this.pushStack(ret,name,slice.call(arguments).join(","));};});jQuery.extend({filter:function(expr,elems,not){if(not){expr=":not("+expr+")";}
return jQuery.find.matches(expr,elems);},dir:function(elem,dir,until){var matched=[],cur=elem[dir];while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!jQuery(cur).is(until))){if(cur.nodeType===1){matched.push(cur);}
cur=cur[dir];}
return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType===1&&++num===result){break;}}
return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){r.push(n);}}
return r;}});var rinlinejQuery=/ jQuery\d+="(?:\d+|null)"/g,rleadingWhitespace=/^\s+/,rxhtmlTag=/(<([\w:]+)[^>]*?)\/>/g,rselfClosing=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnocache=/<script|<object|<embed|<option|<style/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,fcloseTag=function(all,front,tag){return rselfClosing.test(tag)?all:front+"></"+tag+">";},wrapMap={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;if(!jQuery.support.htmlSerialize){wrapMap._default=[1,"div<div>","</div>"];}
jQuery.fn.extend({text:function(text){if(jQuery.isFunction(text)){return this.each(function(i){var self=jQuery(this);self.text(text.call(this,i,self.text()));});}
if(typeof text!=="object"&&text!==undefined){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));}
return jQuery.text(this);},wrapAll:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i));});}
if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);}
wrap.map(function(){var elem=this;while(elem.firstChild&&elem.firstChild.nodeType===1){elem=elem.firstChild;}
return elem;}).append(this);}
return this;},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});}
return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes);}}).end();},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.insertBefore(elem,this.firstChild);}});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});}else if(arguments.length){var set=jQuery(arguments[0]);set.push.apply(set,this.toArray());return this.pushStack(set,"before",arguments);}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});}else if(arguments.length){var set=this.pushStack(this,"after",arguments);set.push.apply(set,jQuery(arguments[0]).toArray());return set;}},remove:function(selector,keepData){for(var i=0,elem;(elem=this[i])!=null;i++){if(!selector||jQuery.filter(selector,[elem]).length){if(!keepData&&elem.nodeType===1){jQuery.cleanData(elem.getElementsByTagName("*"));jQuery.cleanData([elem]);}
if(elem.parentNode){elem.parentNode.removeChild(elem);}}}
return this;},empty:function(){for(var i=0,elem;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(elem.getElementsByTagName("*"));}
while(elem.firstChild){elem.removeChild(elem.firstChild);}}
return this;},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML,ownerDocument=this.ownerDocument;if(!html){var div=ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}
return jQuery.clean([html.replace(rinlinejQuery,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(rleadingWhitespace,"")],ownerDocument)[0];}else{return this.cloneNode(true);}});if(events===true){cloneCopyEvent(this,ret);cloneCopyEvent(this.find("*"),ret.find("*"));}
return ret;},html:function(value){if(value===undefined){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(rinlinejQuery,""):null;}else if(typeof value==="string"&&!rnocache.test(value)&&(jQuery.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,fcloseTag);try{for(var i=0,l=this.length;i<l;i++){if(this[i].nodeType===1){jQuery.cleanData(this[i].getElementsByTagName("*"));this[i].innerHTML=value;}}}catch(e){this.empty().append(value);}}else if(jQuery.isFunction(value)){this.each(function(i){var self=jQuery(this),old=self.html();self.empty().append(function(){return value.call(this,i,old);});});}else{this.empty().append(value);}
return this;},replaceWith:function(value){if(this[0]&&this[0].parentNode){if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this),old=self.html();self.replaceWith(value.call(this,i,old));});}
if(typeof value!=="string"){value=jQuery(value).detach();}
return this.each(function(){var next=this.nextSibling,parent=this.parentNode;jQuery(this).remove();if(next){jQuery(next).before(value);}else{jQuery(parent).append(value);}});}else{return this.pushStack(jQuery(jQuery.isFunction(value)?value():value),"replaceWith",value);}},detach:function(selector){return this.remove(selector,true);},domManip:function(args,table,callback){var results,first,value=args[0],scripts=[],fragment,parent;if(!jQuery.support.checkClone&&arguments.length===3&&typeof value==="string"&&rchecked.test(value)){return this.each(function(){jQuery(this).domManip(args,table,callback,true);});}
if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);args[0]=value.call(this,i,table?self.html():undefined);self.domManip(args,table,callback);});}
if(this[0]){parent=value&&value.parentNode;if(jQuery.support.parentNode&&parent&&parent.nodeType===11&&parent.childNodes.length===this.length){results={fragment:parent};}else{results=buildFragment(args,this,scripts);}
fragment=results.fragment;if(fragment.childNodes.length===1){first=fragment=fragment.firstChild;}else{first=fragment.firstChild;}
if(first){table=table&&jQuery.nodeName(first,"tr");for(var i=0,l=this.length;i<l;i++){callback.call(table?root(this[i],first):this[i],i>0||results.cacheable||this.length>1?fragment.cloneNode(true):fragment);}}
if(scripts.length){jQuery.each(scripts,evalScript);}}
return this;function root(elem,cur){return jQuery.nodeName(elem,"table")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}});function cloneCopyEvent(orig,ret){var i=0;ret.each(function(){if(this.nodeName!==(orig[i]&&orig[i].nodeName)){return;}
var oldData=jQuery.data(orig[i++]),curData=jQuery.data(this,oldData),events=oldData&&oldData.events;if(events){delete curData.handle;curData.events={};for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}}});}
function buildFragment(args,nodes,scripts){var fragment,cacheable,cacheresults,doc=(nodes&&nodes[0]?nodes[0].ownerDocument||nodes[0]:document);if(args.length===1&&typeof args[0]==="string"&&args[0].length<512&&doc===document&&!rnocache.test(args[0])&&(jQuery.support.checkClone||!rchecked.test(args[0]))){cacheable=true;cacheresults=jQuery.fragments[args[0]];if(cacheresults){if(cacheresults!==1){fragment=cacheresults;}}}
if(!fragment){fragment=doc.createDocumentFragment();jQuery.clean(args,doc,fragment,scripts);}
if(cacheable){jQuery.fragments[args[0]]=cacheresults?fragment:1;}
return{fragment:fragment,cacheable:cacheable};}
jQuery.fragments={};jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector),parent=this.length===1&&this[0].parentNode;if(parent&&parent.nodeType===11&&parent.childNodes.length===1&&insert.length===1){insert[original](this[0]);return this;}else{for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems);}
return this.pushStack(ret,name,insert.selector);}};});jQuery.extend({clean:function(elems,context,fragment,scripts){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;}
var ret=[];for(var i=0,elem;(elem=elems[i])!=null;i++){if(typeof elem==="number"){elem+="";}
if(!elem){continue;}
if(typeof elem==="string"&&!rhtml.test(elem)){elem=context.createTextNode(elem);}else if(typeof elem==="string"){elem=elem.replace(rxhtmlTag,fcloseTag);var tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,depth=wrap[0],div=context.createElement("div");div.innerHTML=wrap[1]+elem+wrap[2];while(depth--){div=div.lastChild;}
if(!jQuery.support.tbody){var hasBody=rtbody.test(elem),tbody=tag==="table"&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]==="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}}
if(!jQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem)){div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div.firstChild);}
elem=div.childNodes;}
if(elem.nodeType){ret.push(elem);}else{ret=jQuery.merge(ret,elem);}}
if(fragment){for(var i=0;ret[i];i++){if(scripts&&jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));}
fragment.appendChild(ret[i]);}}}
return ret;},cleanData:function(elems){var data,id,cache=jQuery.cache,special=jQuery.event.special,deleteExpando=jQuery.support.deleteExpando;for(var i=0,elem;(elem=elems[i])!=null;i++){id=elem[jQuery.expando];if(id){data=cache[id];if(data.events){for(var type in data.events){if(special[type]){jQuery.event.remove(elem,type);}else{removeEvent(elem,type,data.handle);}}}
if(deleteExpando){delete elem[jQuery.expando];}else if(elem.removeAttribute){elem.removeAttribute(jQuery.expando);}
delete cache[id];}}}});var rexclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,ralpha=/alpha\([^)]*\)/,ropacity=/opacity=([^)]*)/,rfloat=/float/i,rdashAlpha=/-([a-z])/ig,rupper=/([A-Z])/g,rnumpx=/^-?\d+(?:px)?$/i,rnum=/^-?\d/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssWidth=["Left","Right"],cssHeight=["Top","Bottom"],getComputedStyle=document.defaultView&&document.defaultView.getComputedStyle,styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat",fcamelCase=function(all,letter){return letter.toUpperCase();};jQuery.fn.css=function(name,value){return access(this,name,value,true,function(elem,name,value){if(value===undefined){return jQuery.curCSS(elem,name);}
if(typeof value==="number"&&!rexclude.test(name)){value+="px";}
jQuery.style(elem,name,value);});};jQuery.extend({style:function(elem,name,value){if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;}
if((name==="width"||name==="height")&&parseFloat(value)<0){value=undefined;}
var style=elem.style||elem,set=value!==undefined;if(!jQuery.support.opacity&&name==="opacity"){if(set){style.zoom=1;var opacity=parseInt(value,10)+""==="NaN"?"":"alpha(opacity="+value*100+")";var filter=style.filter||jQuery.curCSS(elem,"filter")||"";style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):opacity;}
return style.filter&&style.filter.indexOf("opacity=")>=0?(parseFloat(ropacity.exec(style.filter)[1])/100)+"":"";}
if(rfloat.test(name)){name=styleFloat;}
name=name.replace(rdashAlpha,fcamelCase);if(set){style[name]=value;}
return style[name];},css:function(elem,name,force,extra){if(name==="width"||name==="height"){var val,props=cssShow,which=name==="width"?cssWidth:cssHeight;function getWH(){val=name==="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return;}
jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;}
if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;}});}
if(elem.offsetWidth!==0){getWH();}else{jQuery.swap(elem,props,getWH);}
return Math.max(0,Math.round(val));}
return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style,filter;if(!jQuery.support.opacity&&name==="opacity"&&elem.currentStyle){ret=ropacity.test(elem.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";return ret===""?"1":ret;}
if(rfloat.test(name)){name=styleFloat;}
if(!force&&style&&style[name]){ret=style[name];}else if(getComputedStyle){if(rfloat.test(name)){name="float";}
name=name.replace(rupper,"-$1").toLowerCase();var defaultView=elem.ownerDocument.defaultView;if(!defaultView){return null;}
var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name);}
if(name==="opacity"&&ret===""){ret="1";}}else if(elem.currentStyle){var camelCase=name.replace(rdashAlpha,fcamelCase);ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!rnumpx.test(ret)&&rnum.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=camelCase==="fontSize"?"1em":(ret||0);ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}
return ret;},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
callback.call(elem);for(var name in options){elem.style[name]=old[name];}}});if(jQuery.expr&&jQuery.expr.filters){jQuery.expr.filters.hidden=function(elem){var width=elem.offsetWidth,height=elem.offsetHeight,skip=elem.nodeName.toLowerCase()==="tr";return width===0&&height===0&&!skip?true:width>0&&height>0&&!skip?false:jQuery.curCSS(elem,"display")==="none";};jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem);};}
var jsc=now(),rscript=/<script(.|\s)*?\/script>/gi,rselectTextarea=/select|textarea/i,rinput=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,jsre=/=\?(&|$)/,rquery=/\?/,rts=/(\?|&)_=.*?(&|$)/,rurl=/^(\w+:)?\/\/([^\/?#]+)/,r20=/%20/g,_load=jQuery.fn.load;jQuery.fn.extend({load:function(url,params,callback){if(typeof url!=="string"){return _load.call(this,url);}else if(!this.length){return this;}
var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}
var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null;}else if(typeof params==="object"){params=jQuery.param(params,jQuery.ajaxSettings.traditional);type="POST";}}
var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status==="success"||status==="notmodified"){self.html(selector?jQuery("<div />").append(res.responseText.replace(rscript,"")).find(selector):res.responseText);}
if(callback){self.each(callback,[res.responseText,status,res]);}}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||rselectTextarea.test(this.nodeName)||rinput.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=null;}
return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data={};}
return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:window.XMLHttpRequest&&(window.location.protocol!=="file:"||!window.ActiveXObject)?function(){return new window.XMLHttpRequest();}:function(){try{return new window.ActiveXObject("Microsoft.XMLHTTP");}catch(e){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(origSettings){var s=jQuery.extend(true,{},jQuery.ajaxSettings,origSettings);var jsonp,status,data,callbackContext=origSettings&&origSettings.context||s,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);}
if(s.dataType==="jsonp"){if(type==="GET"){if(!jsre.test(s.url)){s.url+=(rquery.test(s.url)?"&":"?")+(s.jsonp||"callback")+"=?";}}else if(!s.data||!jsre.test(s.data)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";}
s.dataType="json";}
if(s.dataType==="json"&&(s.data&&jsre.test(s.data)||jsre.test(s.url))){jsonp=s.jsonpCallback||("jsonp"+jsc++);if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");}
s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=window[jsonp]||function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}
if(head){head.removeChild(script);}};}
if(s.dataType==="script"&&s.cache===null){s.cache=false;}
if(s.cache===false&&type==="GET"){var ts=now();var ret=s.url.replace(rts,"$1_="+ts+"$2");s.url=ret+((ret===s.url)?(rquery.test(s.url)?"&":"?")+"_="+ts:"");}
if(s.data&&type==="GET"){s.url+=(rquery.test(s.url)?"&":"?")+s.data;}
if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart");}
var parts=rurl.exec(s.url),remote=parts&&(parts[1]&&parts[1]!==location.protocol||parts[2]!==location.host);if(s.dataType==="script"&&type==="GET"&&remote){var head=document.getElementsByTagName("head")[0]||document.documentElement;var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset;}
if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;if(head&&script.parentNode){head.removeChild(script);}}};}
head.insertBefore(script,head.firstChild);return undefined;}
var requestDone=false;var xhr=s.xhr();if(!xhr){return;}
if(s.username){xhr.open(type,s.url,s.async,s.username,s.password);}else{xhr.open(type,s.url,s.async);}
try{if(s.data||origSettings&&origSettings.contentType){xhr.setRequestHeader("Content-Type",s.contentType);}
if(s.ifModified){if(jQuery.lastModified[s.url]){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]);}
if(jQuery.etag[s.url]){xhr.setRequestHeader("If-None-Match",jQuery.etag[s.url]);}}
if(!remote){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}
xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}
if(s.beforeSend&&s.beforeSend.call(callbackContext,xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}
xhr.abort();return false;}
if(s.global){trigger("ajaxSend",[xhr,s]);}
var onreadystatechange=xhr.onreadystatechange=function(isTimeout){if(!xhr||xhr.readyState===0||isTimeout==="abort"){if(!requestDone){complete();}
requestDone=true;if(xhr){xhr.onreadystatechange=jQuery.noop;}}else if(!requestDone&&xhr&&(xhr.readyState===4||isTimeout==="timeout")){requestDone=true;xhr.onreadystatechange=jQuery.noop;status=isTimeout==="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";var errMsg;if(status==="success"){try{data=jQuery.httpData(xhr,s.dataType,s);}catch(err){status="parsererror";errMsg=err;}}
if(status==="success"||status==="notmodified"){if(!jsonp){success();}}else{jQuery.handleError(s,xhr,status,errMsg);}
complete();if(isTimeout==="timeout"){xhr.abort();}
if(s.async){xhr=null;}}};try{var oldAbort=xhr.abort;xhr.abort=function(){if(xhr){oldAbort.call(xhr);}
onreadystatechange("abort");};}catch(e){}
if(s.async&&s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout");}},s.timeout);}
try{xhr.send(type==="POST"||type==="PUT"||type==="DELETE"?s.data:null);}catch(e){jQuery.handleError(s,xhr,null,e);complete();}
if(!s.async){onreadystatechange();}
function success(){if(s.success){s.success.call(callbackContext,data,status,xhr);}
if(s.global){trigger("ajaxSuccess",[xhr,s]);}}
function complete(){if(s.complete){s.complete.call(callbackContext,xhr,status);}
if(s.global){trigger("ajaxComplete",[xhr,s]);}
if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}}
function trigger(type,args){(s.context?jQuery(s.context):jQuery.event).trigger(type,args);}
return xhr;},handleError:function(s,xhr,status,e){if(s.error){s.error.call(s.context||s,xhr,status,e);}
if(s.global){(s.context?jQuery(s.context):jQuery.event).trigger("ajaxError",[xhr,s,e]);}},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol==="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status===304||xhr.status===1223||xhr.status===0;}catch(e){}
return false;},httpNotModified:function(xhr,url){var lastModified=xhr.getResponseHeader("Last-Modified"),etag=xhr.getResponseHeader("Etag");if(lastModified){jQuery.lastModified[url]=lastModified;}
if(etag){jQuery.etag[url]=etag;}
return xhr.status===304||xhr.status===0;},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type")||"",xml=type==="xml"||!type&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==="parsererror"){jQuery.error("parsererror");}
if(s&&s.dataFilter){data=s.dataFilter(data,type);}
if(typeof data==="string"){if(type==="json"||!type&&ct.indexOf("json")>=0){data=jQuery.parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){jQuery.globalEval(data);}}
return data;},param:function(a,traditional){var s=[];if(traditional===undefined){traditional=jQuery.ajaxSettings.traditional;}
if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value);});}else{for(var prefix in a){buildParams(prefix,a[prefix]);}}
return s.join("&").replace(r20,"+");function buildParams(prefix,obj){if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||/\[\]$/.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"||jQuery.isArray(v)?i:"")+"]",v);}});}else if(!traditional&&obj!=null&&typeof obj==="object"){jQuery.each(obj,function(k,v){buildParams(prefix+"["+k+"]",v);});}else{add(prefix,obj);}}
function add(key,value){value=jQuery.isFunction(value)?value():value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);}}});var elemdisplay={},rfxtypes=/toggle|show|hide/,rfxnum=/^([+-]=)?([\d+-.]+)(.*)$/,timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];jQuery.fn.extend({show:function(speed,callback){if(speed||speed===0){return this.animate(genFx("show",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var nodeName=this[i].nodeName,display;if(elemdisplay[nodeName]){display=elemdisplay[nodeName];}else{var elem=jQuery("<"+nodeName+" />").appendTo("body");display=elem.css("display");if(display==="none"){display="block";}
elem.remove();elemdisplay[nodeName]=display;}
jQuery.data(this[i],"olddisplay",display);}}
for(var j=0,k=this.length;j<k;j++){this[j].style.display=jQuery.data(this[j],"olddisplay")||"";}
return this;}},hide:function(speed,callback){if(speed||speed===0){return this.animate(genFx("hide",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none"){jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"));}}
for(var j=0,k=this.length;j<k;j++){this[j].style.display="none";}
return this;}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";if(jQuery.isFunction(fn)&&jQuery.isFunction(fn2)){this._toggle.apply(this,arguments);}else if(fn==null||bool){this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]();});}else{this.animate(genFx("toggle",3),fn,fn2);}
return this;},fadeTo:function(speed,to,callback){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);if(jQuery.isEmptyObject(prop)){return this.each(optall.complete);}
return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType===1&&jQuery(this).is(":hidden"),self=this;for(p in prop){var name=p.replace(rdashAlpha,fcamelCase);if(p!==name){prop[name]=prop[p];delete prop[p];p=name;}
if(prop[p]==="hide"&&hidden||prop[p]==="show"&&!hidden){return opt.complete.call(this);}
if((p==="height"||p==="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}
if(jQuery.isArray(prop[p])){(opt.specialEasing=opt.specialEasing||{})[p]=prop[p][1];prop[p]=prop[p][0];}}
if(opt.overflow!=null){this.style.overflow="hidden";}
opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(rfxtypes.test(val)){e[val==="toggle"?hidden?"show":"hide":val](prop);}else{var parts=rfxnum.exec(val),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!=="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}
if(parts[1]){end=((parts[1]==="-="?-1:1)*end)+start;}
e.custom(start,end,unit);}else{e.custom(start,val,"");}}});return true;});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([]);}
this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem===this){if(gotoEnd){timers[i](true);}
timers.splice(i,1);}}});if(!gotoEnd){this.dequeue();}
return this;}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback);};});jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue();}
if(jQuery.isFunction(opt.old)){opt.old.call(this);}};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={};}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);}
(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block";}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];}
var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd);}
t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(jQuery.fx.tick,13);}},show:function(){this.options.orig[this.prop]=jQuery.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now(),done=true;if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false;}}
if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;var old=jQuery.data(this.elem,"olddisplay");this.elem.style.display=old?old:this.options.display;if(jQuery.css(this.elem,"display")==="none"){this.elem.style.display="block";}}
if(this.options.hide){jQuery(this.elem).hide();}
if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.style(this.elem,p,this.options.orig[p]);}}
this.options.complete.call(this.elem);}
return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;var specialEasing=this.options.specialEasing&&this.options.specialEasing[this.prop];var defaultEasing=this.options.easing||(jQuery.easing.swing?"swing":"linear");this.pos=jQuery.easing[specialEasing||defaultEasing](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}
return true;}};jQuery.extend(jQuery.fx,{tick:function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1);}}
if(!timers.length){jQuery.fx.stop();}},stop:function(){clearInterval(timerId);timerId=null;},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.style(fx.elem,"opacity",fx.now);},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=(fx.prop==="width"||fx.prop==="height"?Math.max(0,fx.now):fx.now)+fx.unit;}else{fx.elem[fx.prop]=fx.now;}}}});if(jQuery.expr&&jQuery.expr.filters){jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};}
function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;}
if("getBoundingClientRect"in document.documentElement){jQuery.fn.offset=function(options){var elem=this[0];if(options){return this.each(function(i){jQuery.offset.setOffset(this,options,i);});}
if(!elem||!elem.ownerDocument){return null;}
if(elem===elem.ownerDocument.body){return jQuery.offset.bodyOffset(elem);}
var box=elem.getBoundingClientRect(),doc=elem.ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.support.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.support.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left};};}else{jQuery.fn.offset=function(options){var elem=this[0];if(options){return this.each(function(i){jQuery.offset.setOffset(this,options,i);});}
if(!elem||!elem.ownerDocument){return null;}
if(elem===elem.ownerDocument.body){return jQuery.offset.bodyOffset(elem);}
jQuery.offset.initialize();var offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle,top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){if(jQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){break;}
computedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle;top-=elem.scrollTop;left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.nodeName))){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;}
prevOffsetParent=offsetParent,offsetParent=elem.offsetParent;}
if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;}
prevComputedStyle=computedStyle;}
if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop;left+=body.offsetLeft;}
if(jQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop);left+=Math.max(docElem.scrollLeft,body.scrollLeft);}
return{top:top,left:left};};}
jQuery.offset={initialize:function(){var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,bodyMarginTop=parseFloat(jQuery.curCSS(body,"marginTop",true))||0,html="<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>";jQuery.extend(container.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild;checkDiv=innerDiv.firstChild;td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);checkDiv.style.position="fixed",checkDiv.style.top="20px";this.supportsFixedPosition=(checkDiv.offsetTop===20||checkDiv.offsetTop===15);checkDiv.style.position=checkDiv.style.top="";innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(body.offsetTop!==bodyMarginTop);body.removeChild(container);body=container=innerDiv=checkDiv=table=td=null;jQuery.offset.initialize=jQuery.noop;},bodyOffset:function(body){var top=body.offsetTop,left=body.offsetLeft;jQuery.offset.initialize();if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseFloat(jQuery.curCSS(body,"marginTop",true))||0;left+=parseFloat(jQuery.curCSS(body,"marginLeft",true))||0;}
return{top:top,left:left};},setOffset:function(elem,options,i){if(/static/.test(jQuery.curCSS(elem,"position"))){elem.style.position="relative";}
var curElem=jQuery(elem),curOffset=curElem.offset(),curTop=parseInt(jQuery.curCSS(elem,"top",true),10)||0,curLeft=parseInt(jQuery.curCSS(elem,"left",true),10)||0;if(jQuery.isFunction(options)){options=options.call(elem,i,curOffset);}
var props={top:(options.top-curOffset.top)+curTop,left:(options.left-curOffset.left)+curLeft};if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};jQuery.fn.extend({position:function(){if(!this[0]){return null;}
var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset();offset.top-=parseFloat(jQuery.curCSS(elem,"marginTop",true))||0;offset.left-=parseFloat(jQuery.curCSS(elem,"marginLeft",true))||0;parentOffset.top+=parseFloat(jQuery.curCSS(offsetParent[0],"borderTopWidth",true))||0;parentOffset.left+=parseFloat(jQuery.curCSS(offsetParent[0],"borderLeftWidth",true))||0;return{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.nodeName)&&jQuery.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent;}
return offsetParent;});}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){var elem=this[0],win;if(!elem){return null;}
if(val!==undefined){return this.each(function(){win=getWindow(this);if(win){win.scrollTo(!i?val:jQuery(win).scrollLeft(),i?val:jQuery(win).scrollTop());}else{this[method]=val;}});}else{win=getWindow(elem);return win?("pageXOffset"in win)?win[i?"pageYOffset":"pageXOffset"]:jQuery.support.boxModel&&win.document.documentElement[method]||win.document.body[method]:elem[method];}};});function getWindow(elem){return("scrollTo"in elem&&elem.document)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false;}
jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],type,false,"padding"):null;};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],type,false,margin?"margin":"border"):null;};jQuery.fn[type]=function(size){var elem=this[0];if(!elem){return size==null?null:this;}
if(jQuery.isFunction(size)){return this.each(function(i){var self=jQuery(this);self[type](size.call(this,i,self[type]()));});}
return("scrollTo"in elem&&elem.document)?elem.document.compatMode==="CSS1Compat"&&elem.document.documentElement["client"+name]||elem.document.body["client"+name]:(elem.nodeType===9)?Math.max(elem.documentElement["client"+name],elem.body["scroll"+name],elem.documentElement["scroll"+name],elem.body["offset"+name],elem.documentElement["offset"+name]):size===undefined?jQuery.css(elem,type):this.css(type,typeof size==="string"?size:size+"px");};});window.jQuery=window.$=jQuery;})(window);(function($){$.fn.colour=function(){return this.each(function(){var $this=$(this);$this.hover(function(){$this.find("a:last").show();},function(){$this.find("a:last").hide();});});};$(function(){$(".colour").colour();});})(jQuery);;(function($){var ver='Lite-1.0';$.fn.cycle=function(options){return this.each(function(){options=options||{};if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=0;this.cyclePause=0;var $cont=$(this);var $slides=options.slideExpr?$(options.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){if(window.console&&window.console.log)
window.console.log('terminating; too few slides: '+els.length);return;}
var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});var cls=this.className;opts.width=parseInt((cls.match(/w:(\d+)/)||[])[1])||opts.width;opts.height=parseInt((cls.match(/h:(\d+)/)||[])[1])||opts.height;opts.timeout=parseInt((cls.match(/t:(\d+)/)||[])[1])||opts.timeout;if($cont.css('position')=='static')
$cont.css('position','relative');if(opts.width)
$cont.width(opts.width);if(opts.height&&opts.height!='auto')
$cont.height(opts.height);var first=0;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){$(this).css('z-index',els.length-i)});$(els[first]).css('opacity',1).show();if($.browser.msie)els[first].style.removeAttribute('filter');if(opts.fit&&opts.width)
$slides.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')
$slides.height(opts.height);if(opts.pause)
$cont.hover(function(){this.cyclePause=1;},function(){this.cyclePause=0;});$.fn.cycle.transitions.fade($cont,$slides,opts);$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width();});$slides.not(':eq('+first+')').css({opacity:0});if(opts.cssFirst)
$($slides[first]).css(opts.cssFirst);if(opts.timeout){if(opts.speed.constructor==String)
opts.speed={slow:600,fast:200}[opts.speed]||400;if(!opts.sync)
opts.speed=opts.speed/2;while((opts.timeout-opts.speed)<250)
opts.timeout+=opts.speed;}
opts.speedIn=opts.speed;opts.speedOut=opts.speed;opts.slideCount=els.length;opts.currSlide=first;opts.nextSlide=1;var e0=$slides[first];if(opts.before.length)
opts.before[0].apply(e0,[e0,e0,opts,true]);if(opts.after.length>1)
opts.after[1].apply(e0,[e0,e0,opts,true]);if(opts.click&&!opts.next)
opts.next=opts.click;if(opts.next)
$(opts.next).bind('click',function(){return advance(els,opts,opts.rev?-1:1)});if(opts.prev)
$(opts.prev).bind('click',function(){return advance(els,opts,opts.rev?1:-1)});if(opts.timeout)
this.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},opts.timeout+(opts.delay||0));});};function go(els,opts,manual,fwd){if(opts.busy)return;var p=els[0].parentNode,curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleTimeout===0&&!manual)
return;if(manual||!p.cyclePause){if(opts.before.length)
$.each(opts.before,function(i,o){o.apply(next,[curr,next,opts,fwd]);});var after=function(){if($.browser.msie)
this.style.removeAttribute('filter');$.each(opts.after,function(i,o){o.apply(next,[curr,next,opts,fwd]);});};if(opts.nextSlide!=opts.currSlide){opts.busy=1;$.fn.cycle.custom(curr,next,opts,after);}
var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}
if(opts.timeout)
p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},opts.timeout);};function advance(els,opts,val){var p=els[0].parentNode,timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}
opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){opts.nextSlide=els.length-1;}
else if(opts.nextSlide>=els.length){opts.nextSlide=0;}
go(els,opts,1,val>=0);return false;};$.fn.cycle.custom=function(curr,next,opts,cb){var $l=$(curr),$n=$(next);$n.css({opacity:0});var fn=function(){$n.animate({opacity:1},opts.speedIn,opts.easeIn,cb)};$l.animate({opacity:0},opts.speedOut,opts.easeOut,function(){$l.css({display:'none'});if(!opts.sync)fn();});if(opts.sync)fn();};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq(0)').css('opacity',0);opts.before.push(function(){$(this).show()});}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:'auto',sync:1,fit:0,pause:0,delay:0,slideExpr:null};})(jQuery);(function($){$.fn.jclock=function(options){var version='2.3.0';var opts=$.extend({},$.fn.jclock.defaults,options);return this.each(function(){$this=$(this);$this.timerID=null;$this.running=false;$this.increment=0;$this.lastCalled=new Date().getTime();var o=$.meta?$.extend({},opts,$this.data()):opts;$this.format=o.format;$this.utc=o.utc;$this.utcOffset=(o.utc_offset!=null)?o.utc_offset:o.utcOffset;$this.seedTime=o.seedTime;$this.timeout=o.timeout;$this.css({fontFamily:o.fontFamily,fontSize:o.fontSize,backgroundColor:o.background,color:o.foreground});$this.daysAbbrvNames=new Array(7);$this.daysAbbrvNames[0]="Sun";$this.daysAbbrvNames[1]="Mon";$this.daysAbbrvNames[2]="Tue";$this.daysAbbrvNames[3]="Wed";$this.daysAbbrvNames[4]="Thu";$this.daysAbbrvNames[5]="Fri";$this.daysAbbrvNames[6]="Sat";$this.daysFullNames=new Array(7);$this.daysFullNames[0]="Sunday";$this.daysFullNames[1]="Monday";$this.daysFullNames[2]="Tuesday";$this.daysFullNames[3]="Wednesday";$this.daysFullNames[4]="Thursday";$this.daysFullNames[5]="Friday";$this.daysFullNames[6]="Saturday";$this.monthsAbbrvNames=new Array(12);$this.monthsAbbrvNames[0]="Jan";$this.monthsAbbrvNames[1]="Feb";$this.monthsAbbrvNames[2]="Mar";$this.monthsAbbrvNames[3]="Apr";$this.monthsAbbrvNames[4]="May";$this.monthsAbbrvNames[5]="Jun";$this.monthsAbbrvNames[6]="Jul";$this.monthsAbbrvNames[7]="Aug";$this.monthsAbbrvNames[8]="Sep";$this.monthsAbbrvNames[9]="Oct";$this.monthsAbbrvNames[10]="Nov";$this.monthsAbbrvNames[11]="Dec";$this.monthsFullNames=new Array(12);$this.monthsFullNames[0]="January";$this.monthsFullNames[1]="February";$this.monthsFullNames[2]="March";$this.monthsFullNames[3]="April";$this.monthsFullNames[4]="May";$this.monthsFullNames[5]="June";$this.monthsFullNames[6]="July";$this.monthsFullNames[7]="August";$this.monthsFullNames[8]="September";$this.monthsFullNames[9]="October";$this.monthsFullNames[10]="November";$this.monthsFullNames[11]="December";$.fn.jclock.startClock($this);});};$.fn.jclock.startClock=function(el){$.fn.jclock.stopClock(el);$.fn.jclock.displayTime(el);};$.fn.jclock.stopClock=function(el){if(el.running){clearTimeout(el.timerID);}
el.running=false;};$.fn.jclock.displayTime=function(el){var time=$.fn.jclock.getTime(el);el.html(time);el.timerID=setTimeout(function(){$.fn.jclock.displayTime(el);},el.timeout);};$.fn.jclock.getTime=function(el){if(typeof(el.seedTime)=='undefined'){var now=new Date();}else{el.increment+=new Date().getTime()-el.lastCalled;var now=new Date(el.seedTime+el.increment);el.lastCalled=new Date().getTime();}
if(el.utc==true){var localTime=now.getTime();var localOffset=now.getTimezoneOffset()*60000;var utc=localTime+localOffset;var utcTime=utc+(3600000*el.utcOffset);now=new Date(utcTime);}
var timeNow="";var i=0;var index=0;while((index=el.format.indexOf("%",i))!=-1){timeNow+=el.format.substring(i,index);index++;var property=$.fn.jclock.getProperty(now,el,el.format.charAt(index));index++;timeNow+=property;i=index;}
timeNow+=el.format.substring(i);return timeNow;};$.fn.jclock.getProperty=function(dateObject,el,property){switch(property){case"a":return(el.daysAbbrvNames[dateObject.getDay()]);case"A":return(el.daysFullNames[dateObject.getDay()]);case"b":return(el.monthsAbbrvNames[dateObject.getMonth()]);case"B":return(el.monthsFullNames[dateObject.getMonth()]);case"d":return((dateObject.getDate()<10)?"0":"")+dateObject.getDate();case"H":return((dateObject.getHours()<10)?"0":"")+dateObject.getHours();case"I":var hours=(dateObject.getHours()%12||12);return((hours<10)?"0":"")+hours;case"m":return(((dateObject.getMonth()+1)<10)?"0":"")+(dateObject.getMonth()+1);case"M":return((dateObject.getMinutes()<10)?"0":"")+dateObject.getMinutes();case"p":return(dateObject.getHours()<12?"am":"pm");case"P":return(dateObject.getHours()<12?"AM":"PM");case"S":return((dateObject.getSeconds()<10)?"0":"")+dateObject.getSeconds();case"y":return dateObject.getFullYear().toString().substring(2);case"Y":return(dateObject.getFullYear());case"%":return"%";}};$.fn.jclock.defaults={format:'%H:%M:%S',utcOffset:0,utc:false,fontFamily:'',fontSize:'',foreground:'',background:'',seedTime:undefined,timeout:1000};})(jQuery);(function($){$.fn.itemSelect=function(){return this.each(function(){var $this=$(this),items=itemData[$this.attr("id")],selections=[];renderProperties(items);function renderProperties(properties){if(properties[1].image){renderIcons(properties);}else{renderSelect(properties);}}
function renderIcons(properties){var html="";html="<div class='properties'>";html+="<div><h3>"+_('choose a {{thing}}',properties[0])+"</h3><div class='property_icons'>";for(var a=1;a<properties.length;a++){html+="<div class='property'> \
                     <img class='property_"+a+" bordered' src='"+properties[a].image+"' /> \
                     <div class='property_label'>"+properties[a].name+"</div> \
                    </div>";};html+="</div></div></div>";$this.append(html);$this.find(".properties:last .property_label").hide();$this.find(".properties:last .property_icons img").hover(function(){$(this).next().show();},function(){$(this).next().hide();});$this.find(".property_icons:last img").click(selectionMade);$this.find(".property_icons:last img").click(showSelection);}
function showSelection(){var $properties=$(this).closest(".properties"),html="<div class='selection'> \
                  <img class='bordered' src='"+$(this).attr("src")+"' /> \
                 <p>"+$(this).next().text()+"<a style='font-size:9px;' href='javascript: void(0);'>&nbsp; "+_("change")+"</a></p> \
                </div>";$properties.html(html);$properties.find(".selection a").click(function(){$properties.remove();selections=selections.slice(0,$this.find(".properties").length);var properties=items;for(var i=0;i<selections.length;i++){properties=properties[parseInt(selections[i],10)]["next"];};if(typeof(properties)=="number"){$this.append("<input type='hidden' class='item_id_hidden_field' name='cart[item_ids][]' value='"+properties+"'>");}else{renderProperties(properties);}});}
function renderSelect(properties){var html="";html="<div class='properties'>";html+="<select><option class='instruction'>"+_('choose a {{thing}}',properties[0])+"</option>";for(var i=1;i<properties.length;i++){html+="<option class='property_"+i+"'>"+properties[i].name+"</option>";};html+="</select></div>";$this.append(html);$this.find("select:last").change(selectionMade);}
function selectionMade(){$this.find(".item_id_hidden_field").remove();$(this).closest(".properties").nextAll(".properties").remove();if($(this).find("option:selected").hasClass("instruction")){return false;}
selections=selections.slice(0,$this.find(".properties").length-1);if(this.tagName.match(/img/i)){selections.push($(this).attr("class").match(/property_(\d*)/)[1]);}else if(this.tagName.match(/select/i)){selections.push($(this).find("option:selected").attr("class").match(/property_(\d*)/)[1]);}
var properties=items;for(var i=0;i<selections.length;i++){properties=properties[parseInt(selections[i],10)]["next"];};if(typeof(properties)=="number"){$this.append("<input type='hidden' class='item_id_hidden_field' name='cart[item_ids][]' value='"+properties+"'>");}else{renderProperties(properties);}
return true;}});};$(function(){$(".item_selector").itemSelect();$("#buy_page_buttons input.cart_button, #buy_page_buttons input.wishlist_button").click(function(event){var $this=$(event.target),$form=$this.closest("form");if($form.find('.item_id_hidden_field').length<1){alert(_("Please select all the options for at least one of the items on this page."));return false;}else{if($form.find('.item_selector').length>$form.find('.item_id_hidden_field').length){if(!confirm(_("You have not selected all options for one or more of the items on this page. Do you want to continue and only add the selected items to the cart?"))){return false;}}}
return true;});$(".detail_images_wrapper .captions .next, .detail_images_wrapper .captions .previous, .detail_images_wrapper .captions .caption").hide();$(".detail_images_wrapper .captions").find(".caption:last").show();});})(jQuery);(function($){$(function(){$('.tabs').tabify();$('.mini_tabs').tabify();$('#shop_tabs').tabify();$('#product_viewer_tabs').tabify();});$.fn.tabify=function(){return this.each(function(){$(this).find('a[rel]').click(function(){var $tab=$(this);if($tab.attr('rel')=='none'){window.location=$tab.attr('href').gsub(/_(path|url)$/,'');}else{var $list=$tab.parents('ul:first');$list.children('li').removeClass('selected');$tab.parents('li').addClass('selected');if($list.attr('id')=='shop_tabs'){$list.attr('class',$tab.parents('li').attr('id')+'_selected');}
$list.find('li a').each(function(){$contents=$('#'+$(this).attr('rel'));this==$tab.get(0)?$contents.show():$contents.hide();});}
return false;});});};})(jQuery);$.fn.carousel=function(options){var opts=$.extend({},{elementSize:142,visible:4,increment:4},options);return this.each(function(){var $this=$(this),$window=$this.find('.window:first'),$slider=$this.find('.slider:first'),$carousel_table=$this.find('.carousel_table:first'),$carousel_row=$this.find('.carousel_tr:first'),size=$carousel_row.find('td').length,currentId=0,moving=false;$slider.css("position","relative");$("#prev_carousel_arrow").click(prevScroll);$("#next_carousel_arrow").click(nextScroll);function prevScroll(){if(currentId!=0){scroll("prev");}}
scroll("last");
function nextScroll(){if(currentId<(size-opts.visible)){scroll("next");}}
function scroll(direction){if(moving){return;}
var offset,newLeft,delta=opts.increment;
if(direction=="last"){delta=20;	delta=-delta;} else if(direction=="next"){offset=size-currentId-opts.visible;if(offset<delta){delta=offset;}delta=-delta;}else{offset=currentId-delta;	if(offset<0){delta=currentId;}}
currentId-=delta;newLeft=$slider.css("left")=="auto"?"0":$slider.css("left");newLeft=parseInt(newLeft,10)+(delta*opts.elementSize);moving=true;$slider.animate({left:newLeft},500,function(){moving=false;});}});};(function($,window){'$:nomunge';var undefined,aps=Array.prototype.slice,decode=decodeURIComponent,jq_param=$.param,jq_param_fragment,jq_deparam,jq_deparam_fragment,jq_bbq=$.bbq=$.bbq||{},jq_bbq_pushState,jq_bbq_getState,jq_elemUrlAttr,jq_event_special=$.event.special,str_hashchange='hashchange',str_querystring='querystring',str_fragment='fragment',str_elemUrlAttr='elemUrlAttr',str_location='location',str_href='href',str_src='src',re_trim_querystring=/^.*\?|#.*$/g,re_trim_fragment=/^.*\#/,re_no_escape,elemUrlAttr_cache={};function is_string(arg){return typeof arg==='string';};function curry(func){var args=aps.call(arguments,1);return function(){return func.apply(this,args.concat(aps.call(arguments)));};};function get_fragment(url){return url.replace(/^[^#]*#?(.*)$/,'$1');};function get_querystring(url){return url.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,'$1');};function jq_param_sub(is_fragment,get_func,url,params,merge_mode){var result,qs,matches,url_params,hash;if(params!==undefined){matches=url.match(is_fragment?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);hash=matches[3]||'';if(merge_mode===2&&is_string(params)){qs=params.replace(is_fragment?re_trim_fragment:re_trim_querystring,'');}else{url_params=jq_deparam(matches[2]);params=is_string(params)?jq_deparam[is_fragment?str_fragment:str_querystring](params):params;qs=merge_mode===2?params:merge_mode===1?$.extend({},params,url_params):$.extend({},url_params,params);qs=jq_param(qs);if(is_fragment){qs=qs.replace(re_no_escape,decode);}}
result=matches[1]+(is_fragment?'#':qs||!matches[1]?'?':'')+qs+hash;}else{result=get_func(url!==undefined?url:window[str_location][str_href]);}
return result;};jq_param[str_querystring]=curry(jq_param_sub,0,get_querystring);jq_param[str_fragment]=jq_param_fragment=curry(jq_param_sub,1,get_fragment);jq_param_fragment.noEscape=function(chars){chars=chars||'';var arr=$.map(chars.split(''),encodeURIComponent);re_no_escape=new RegExp(arr.join('|'),'g');};jq_param_fragment.noEscape(',/');$.deparam=jq_deparam=function(params,coerce){var obj={},coerce_types={'true':!0,'false':!1,'null':null};$.each(params.replace(/\+/g,' ').split('&'),function(j,v){var param=v.split('='),key=decode(param[0]),val,cur=obj,i=0,keys=key.split(']['),keys_last=keys.length-1;if(/\[/.test(keys[0])&&/\]$/.test(keys[keys_last])){keys[keys_last]=keys[keys_last].replace(/\]$/,'');keys=keys.shift().split('[').concat(keys);keys_last=keys.length-1;}else{keys_last=0;}
if(param.length===2){val=decode(param[1]);if(coerce){val=val&&!isNaN(val)?+val:val==='undefined'?undefined:coerce_types[val]!==undefined?coerce_types[val]:val;}
if(keys_last){for(;i<=keys_last;i++){key=keys[i]===''?cur.length:keys[i];cur=cur[key]=i<keys_last?cur[key]||(keys[i+1]&&isNaN(keys[i+1])?{}:[]):val;}}else{if($.isArray(obj[key])){obj[key].push(val);}else if(obj[key]!==undefined){obj[key]=[obj[key],val];}else{obj[key]=val;}}}else if(key){obj[key]=coerce?undefined:'';}});return obj;};function jq_deparam_sub(is_fragment,url_or_params,coerce){if(url_or_params===undefined||typeof url_or_params==='boolean'){coerce=url_or_params;url_or_params=jq_param[is_fragment?str_fragment:str_querystring]();}else{url_or_params=is_string(url_or_params)?url_or_params.replace(is_fragment?re_trim_fragment:re_trim_querystring,''):url_or_params;}
return jq_deparam(url_or_params,coerce);};jq_deparam[str_querystring]=curry(jq_deparam_sub,0);jq_deparam[str_fragment]=jq_deparam_fragment=curry(jq_deparam_sub,1);$[str_elemUrlAttr]||($[str_elemUrlAttr]=function(obj){return $.extend(elemUrlAttr_cache,obj);})({a:str_href,base:str_href,iframe:str_src,img:str_src,input:str_src,form:'action',link:str_href,script:str_src});jq_elemUrlAttr=$[str_elemUrlAttr];function jq_fn_sub(mode,force_attr,params,merge_mode){if(!is_string(params)&&typeof params!=='object'){merge_mode=params;params=force_attr;force_attr=undefined;}
return this.each(function(){var that=$(this),attr=force_attr||jq_elemUrlAttr()[(this.nodeName||'').toLowerCase()]||'',url=attr&&that.attr(attr)||'';that.attr(attr,jq_param[mode](url,params,merge_mode));});};$.fn[str_querystring]=curry(jq_fn_sub,str_querystring);$.fn[str_fragment]=curry(jq_fn_sub,str_fragment);jq_bbq.pushState=jq_bbq_pushState=function(params,merge_mode){if(is_string(params)&&/^#/.test(params)&&merge_mode===undefined){merge_mode=2;}
var has_args=params!==undefined,url=jq_param_fragment(window[str_location][str_href],has_args?params:{},has_args?merge_mode:2);window[str_location][str_href]=url+(/#/.test(url)?'':'#');};jq_bbq.getState=jq_bbq_getState=function(key,coerce){return key===undefined||typeof key==='boolean'?jq_deparam_fragment(key):jq_deparam_fragment(coerce)[key];};jq_bbq.removeState=function(arr){var state={};if(arr!==undefined){state=jq_bbq_getState();$.each($.isArray(arr)?arr:arguments,function(i,v){delete state[v];});}
jq_bbq_pushState(state,2);};jq_event_special[str_hashchange]=$.extend(jq_event_special[str_hashchange],{add:function(handleObj){var old_handler;function new_handler(e){var hash=e[str_fragment]=jq_param_fragment();e.getState=function(key,coerce){return key===undefined||typeof key==='boolean'?jq_deparam(hash,key):jq_deparam(hash,coerce)[key];};old_handler.apply(this,arguments);};if($.isFunction(handleObj)){old_handler=handleObj;return new_handler;}else{old_handler=handleObj.handler;handleObj.handler=new_handler;}}});})(jQuery,this);(function($,window,undefined){'$:nomunge';var fake_onhashchange,jq_event_special=$.event.special,str_location='location',str_hashchange='hashchange',str_href='href',browser=$.browser,mode=document.documentMode,is_old_ie=browser.msie&&(mode===undefined||mode<8),supports_onhashchange='on'+str_hashchange in window&&!is_old_ie;function get_fragment(url){url=url||window[str_location][str_href];return url.replace(/^[^#]*#?(.*)$/,'$1');};$[str_hashchange+'Delay']=100;jq_event_special[str_hashchange]=$.extend(jq_event_special[str_hashchange],{setup:function(){if(supports_onhashchange){return false;}
$(fake_onhashchange.start);},teardown:function(){if(supports_onhashchange){return false;}
$(fake_onhashchange.stop);}});fake_onhashchange=(function(){var self={},timeout_id,iframe,set_history,get_history;function init(){set_history=get_history=function(val){return val;};if(is_old_ie){iframe=$('<iframe src="javascript:0"/>').hide().insertAfter('body')[0].contentWindow;get_history=function(){return get_fragment(iframe.document[str_location][str_href]);};set_history=function(hash,history_hash){if(hash!==history_hash){var doc=iframe.document;doc.open().close();doc[str_location].hash='#'+hash;}};set_history(get_fragment());}};self.start=function(){if(timeout_id){return;}
var last_hash=get_fragment();set_history||init();(function loopy(){var hash=get_fragment(),history_hash=get_history(last_hash);if(hash!==last_hash){set_history(last_hash=hash,history_hash);$(window).trigger(str_hashchange);}else if(history_hash!==last_hash){window[str_location][str_href]=window[str_location][str_href].replace(/#.*/,'')+'#'+history_hash;}
timeout_id=setTimeout(loopy,$[str_hashchange+'Delay']);})();};self.stop=function(){if(!iframe){timeout_id&&clearTimeout(timeout_id);timeout_id=0;}};return self;})();})(jQuery,this);(function($){$.facebox=function(data,klass){$.facebox.loading();if(data.ajax)fillFaceboxFromAjax(data.ajax);else if(data.image)fillFaceboxFromImage(data.image);else if(data.div)fillFaceboxFromHref(data.div);else if($.isFunction(data))data.call($);else $.facebox.reveal(data,klass);};$.extend($.facebox,{settings:{opacity:0,overlay:true,loadingImage:'/images/facebox/loading.gif',closeImage:'/images/facebox/closelabel.gif',imageTypes:['png','jpg','jpeg','gif'],faceboxHtml:'\
    <div id="facebox" style="display:none;"> \
      <div class="popup"> \
        <table> \
          <tbody> \
            <tr> \
              <td class="tl"/><td class="b"/><td class="tr"/> \
            </tr> \
            <tr> \
              <td class="b"/> \
              <td class="body"> \
                <div class="content"> \
                </div> \
                <div class="footer"> \
                  <a href="#" class="close"> \
                    <img src="/images/facebox/closelabel.gif" title="close" class="close_image" /> \
                  </a> \
                </div> \
              </td> \
              <td class="b"/> \
            </tr> \
            <tr> \
              <td class="bl"/><td class="b"/><td class="br"/> \
            </tr> \
          </tbody> \
        </table> \
      </div> \
    </div>'},loading:function(){init();if($('#facebox .loading').length==1)return true;showOverlay();$('#facebox .content').empty();$('#facebox .body').children().hide().end().append('<div class="loading"><img src="'+$.facebox.settings.loadingImage+'"/></div>');$('#facebox').css({top:getPageScroll()[1]+(getPageHeight()/10),left:$(window).width()/2-520/2}).show();$(document).bind('keydown.facebox',function(e){if(e.keyCode==27)$.facebox.close();return true;});},reveal:function(data,klass){$(document).trigger('beforeReveal.facebox');if(klass)$('#facebox .content').addClass(klass);$('#facebox .content').append(data);$('#facebox .loading').remove();$('#facebox .body').children().fadeIn('normal');$('#facebox').css('left',$(window).width()/2-($('#facebox table').width()/2));$(document).trigger('reveal.facebox').trigger('afterReveal.facebox');},close:function(){$(document).trigger('close.facebox');return false;}});$.fn.facebox=function(settings){init(settings);function clickHandler(){$.facebox.loading(true);var klass=this.rel.match(/facebox\[?\.(\w+)\]?/);if(klass)klass=klass[1];fillFaceboxFromHref(this.href,klass);return false;}
return this.click(clickHandler);};function init(settings){if($.facebox.settings.inited)return true;else $.facebox.settings.inited=true;$(document).trigger('init.facebox');makeCompatible();var imageTypes=$.facebox.settings.imageTypes.join('|');$.facebox.settings.imageTypesRegexp=new RegExp('\.'+imageTypes+'$','i');if(settings)$.extend($.facebox.settings,settings);$('body').append($.facebox.settings.faceboxHtml);var preload=[new Image(),new Image()];preload[0].src=$.facebox.settings.closeImage;preload[1].src=$.facebox.settings.loadingImage;$('#facebox').find('.b:first, .bl, .br, .tl, .tr').each(function(){preload.push(new Image());preload.slice(-1).src=$(this).css('background-image').replace(/url\((.+)\)/,'$1');});$('#facebox .close').click($.facebox.close);$('#facebox .close_image').attr('src',$.facebox.settings.closeImage);}
function getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
return new Array(xScroll,yScroll);}
function getPageHeight(){var windowHeight;if(self.innerHeight){windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;}else if(document.body){windowHeight=document.body.clientHeight;}
return windowHeight;}
function makeCompatible(){var $s=$.facebox.settings;$s.loadingImage=$s.loading_image||$s.loadingImage;$s.closeImage=$s.close_image||$s.closeImage;$s.imageTypes=$s.image_types||$s.imageTypes;$s.faceboxHtml=$s.facebox_html||$s.faceboxHtml;}
function fillFaceboxFromHref(href,klass){if(href.match(/#/)){var url=window.location.href.split('#')[0];var target=href.replace(url,'');$.facebox.reveal($(target).clone().show(),klass);}else if(href.match($.facebox.settings.imageTypesRegexp)){fillFaceboxFromImage(href,klass);}else{fillFaceboxFromAjax(href,klass);}}
function fillFaceboxFromImage(href,klass){var image=new Image();image.onload=function(){$.facebox.reveal('<div class="image"><img src="'+image.src+'" /></div>',klass);};image.src=href;}
function fillFaceboxFromAjax(href,klass){$.get(href,function(data){$.facebox.reveal(data,klass);},"html");}
function skipOverlay(){return $.facebox.settings.overlay==false||$.facebox.settings.opacity===null;}
function showOverlay(){if(skipOverlay())return;if($('facebox_overlay').length==0)
$("body").append('<div id="facebox_overlay" class="facebox_hide"></div>');$('#facebox_overlay').hide().addClass("facebox_overlayBG").css('opacity',$.facebox.settings.opacity).click(function(){$(document).trigger('close.facebox');}).fadeIn(200);return false;}
function hideOverlay(){if(skipOverlay())return;$('#facebox_overlay').fadeOut(200,function(){$("#facebox_overlay").removeClass("facebox_overlayBG");$("#facebox_overlay").addClass("facebox_hide");$("#facebox_overlay").remove();});return false;}
$(document).bind('close.facebox',function(){$(document).unbind('keydown.facebox');$('#facebox').fadeOut(function(){$('#facebox .content').removeClass().addClass('content');hideOverlay();$('#facebox .loading').remove();});});})(jQuery);var slideSpeed=400;var fadeSpeed=300;var executeOnChange=true;$(function(){$('a.cust_link').click(function(){if($(this).next().css('display')=='none'&&(!confirm(custFeeMsg)))return;$(this).next().toggle();});if($("#cart").length>0){setupFreightQuoteSelects();$("#cart_and_freight a.toggle").live("click",changeSelection);setupCheckoutButton();setupFaceboxes();$(window).bind("hashchange",function(e){var state=$.bbq.getState();if(state.page=="cart"){$("#payment").slideUp(slideSpeed);$("#cart_summary").slideUp(slideSpeed);$("#checkout_summary").slideUp(slideSpeed);$("#checkout").slideUp(slideSpeed,function(){$("#cart_and_freight").slideDown(slideSpeed);resetButtonSpinners();});}else if(state.page=="addresses"){$("#cart_and_freight").slideUp(slideSpeed,function(){$("#payment").slideUp(slideSpeed);$("#cart_summary").slideDown(slideSpeed);$("#checkout").slideDown(slideSpeed,function(){$('#session_email').focus();resetButtonSpinners();});});}});if(typeof($.bbq.getState().page)=="undefined"||$.bbq.getState().page=="payment"){$.bbq.pushState("page=cart");}
$(window).trigger("hashchange");}});function setupFreightQuoteSelects(){$("#cart_and_freight .country_select").change(makeCountrySelection);$("#freight input[type='radio']").click(makeFreightSelection);}
function setupFaceboxes(){$(".shipping_and_handling").click(function(){jQuery.facebox($("#shipping_and_handling_text").html());return false;});$(".privacy_policy").show().click(function(){jQuery.facebox($("#privacy_policy_text").html());return false;});}
var editedShippingFullName=false,editedBillingFullName=false,editedNotificationEmail=false;function setupAutoPopulation(){$('#cart_shipping_address_attributes_full_name').blur(function(){editedShippingFullName=true;});$('#cart_billing_address_attributes_full_name').blur(function(){editedBillingFullName=true;});$('#cart_notification_email').blur(function(){editedNotificationEmail=true;});$('#cart_user_attributes_first_name, #cart_user_attributes_last_name').blur(function(){var firstNameValue=$('#cart_user_attributes_first_name').attr('value'),lastNameValue=$('#cart_user_attributes_last_name').attr('value'),fullName=$.trim(firstNameValue+' '+lastNameValue),shippingFullName=$('#cart_shipping_address_attributes_full_name'),billingFullName=$('#cart_billing_address_attributes_full_name');if(!editedShippingFullName){shippingFullName.attr('value',fullName);}
if(!editedBillingFullName){billingFullName.attr('value',fullName);}});$('#cart_user_attributes_email').blur(function(){if(!editedNotificationEmail){$('#cart_notification_email').attr('value',$('#cart_user_attributes_email').attr('value'));}});}
function setupCountrySelect(id){$("select[name*=country_code]").each(function(){var $countrySelect=$(this);if($countrySelect.parents("fieldset:first").find("input[name*=state_name]").length>0){$countrySelect.change(updateStateSelect);}});$("#cart_shipping_address_attributes_country_code").change(function(){$("#shipping_address table.freight_method_radio_buttons").replaceWith("<img src='/images/gears_spinner.gif' id='freight_method_spinner'/>");var params={"authenticity_token":authenticityToken,"code":this.value};$.post("/"+locale+"/cart/freight_methods",params,function(data){$("#freight_method_spinner").replaceWith(data.html);},"json");});}
function updateStateSelect(){var useSelect=false,$countrySelect=$(this),$stateInput=$countrySelect.parents("fieldset").find("input[name*=state_name], select[name*=state_id]"),fieldPrefix=$stateInput.attr("name").match(/^(.*)(\[state_name\]|\[state_id\])/)[1],stateId=$stateInput.attr('id'),html="",removeOtherStateHTML='<input type="hidden" name="'+fieldPrefix+'[state_id]" value="" id="'+stateId+'_remove_other_state">',state,selected;for(country in country_states){if(country==this.value){useSelect=true;}}
$("#"+stateId+"_remove_other_state").remove();if(useSelect){html='<select id="'+stateId+'" name="'+fieldPrefix+'[state_id]">';html+='<option></option>';for(i=0;i<country_states[this.value].length;i++){state=country_states[this.value][i];selected=(state['name']==$stateInput.attr('value'))?' selected':'';html+='<option value="'+state['id']+'"'+selected+'>'+state['name']+'</option>\n';}
html+='</select>';$stateInput.replaceWith(html);}else{if($stateInput.get(0).tagName.toLowerCase()=="select"){html='<input id="'+stateId+'" type="text" name="'+fieldPrefix+'[state_name]" value="">';html+=removeOtherStateHTML;$stateInput.replaceWith(html);}else{$stateInput.after(removeOtherStateHTML);}}}
function makeCountrySelection(){var $this=$(this),$parent=$this.parents("td:first");if($this.val().length>0){$parent.find('.selection').html($this.find('option:selected').text());$parent.find('a.toggle:first').click();$parent.find(".freight_method").html("<img src='/images/gears_spinner.gif' />");var params={"authenticity_token":authenticityToken,"_method":"put","cart[freight_quote_attributes][country_code]":$this.val()};$.post("/"+locale+"/cart",params,function(data){updateCart(data);$("#cart_shipping_address_attributes_country_code").find("option:selected").removeAttr("selected").end().find("option[value='"+$this.val()+"']").attr("selected","selected");$("#cart_shipping_address_attributes_country_code").change();$("#cart_billing_address_attributes_country_code").change();},"json");}}
function makeFreightSelection(){var $parent=$(this).parents("div.freight_method:first"),$countrySelect=$parent.parents("td.freight:first").find(".country_select");$parent.find('.selection').html($(this).parents("td:first").next().find("label").text());$parent.find('a.toggle:first').click();$("#freight_price").html($(this).parents("td:first").next().next().next().find("label").text());$("#total_price").html('<img src="/images/gears_spinner.gif" />');var params={"authenticity_token":authenticityToken,"_method":"put","cart[freight_quote_attributes][freight_method_id]":this.value,"cart[freight_quote_attributes][country_code]":$countrySelect.val()};$.post("/"+locale+"/cart",params,function(data){updateCart(data);$("#cart_shipping_address_attributes_country_code").change();$("#cart_billing_address_attributes_country_code").change();});}
function updateCart(data){tmp=data;$('#cart_and_freight .freight').html(data.freight_html);$("#freight_price").html(data.freight);$("#total_price").html(data.total);setupFaceboxes();setupFreightQuoteSelects();}
function changeSelection(){$(this).parents("div.country, div.freight_method").find("div.toggle").toggle().end();return false;}
function setupCheckoutButton(){$("input[name='checkout']").click(function(event){if(!checkMaxStringLength()||!cartItemsAvailable()){event.stopPropagation();return false;}
$('table.flash').fadeOut();var $checkout=$("#checkout");$checkout.hide();if(freeStickers!=$("#free_stickers").attr("checked")||freeCatalogue!=$("#free_catalogue").attr("checked")){executeOnChange=false;freeStickers=$("#free_stickers").attr("checked");freeCatalogue=$("#free_catalogue").attr("checked");$.post($(this).parents("form").attr('action')+"/update_offers",{"free_catalogue":$("#free_catalogue").attr("checked")?"1":"0","free_stickers":$("#free_stickers").attr("checked")?"1":"0","checkout":"checkout"},function(){$("#cart_shipping_address_attributes_country_code").change();$("#cart_billing_address_attributes_country_code").change();executeOnChange=true;});}
if(checkoutHTML.length==0){$.bbq.pushState("page=addresses");}else{$checkout.append(checkoutHTML);checkoutHTML="";setTimeout(function(){$.bbq.pushState("page=addresses");},100);setupCheckoutForm();}
return false;});}
function cartItemsAvailable(){if($(".cart tr.unavailable").length>0){alert(_("One of the items in your cart is currently unavailable."));return false;}
return true;}
function setupCheckoutForm(){if(typeof(userAddresses)!="undefined"){setupSavedAddresses(userAddresses);if(sameAddresses){$("#cart_same_billing_address").attr("checked",true);$("#billing_address").hide();}}
if($(".new_customer").length>0){$("#cart_same_billing_address").attr("checked",true);selectCountryBasedOnFreightQuote();}
setupBillingAddressVisibility();updateBillingAddressVisibility();insertLoginForm();setupPayNowButton();setupKeyPress();setupAutoPopulation();setupCountrySelect();setupEditLinks();setupButtonSpinners();setupFaceboxes();if(executeOnChange){$("#cart_shipping_address_attributes_country_code").change();$("#cart_billing_address_attributes_country_code").change();}
buttonReplacer.init();Nifty("div.round","big");Nifty("div.shaded","big");}
function removeCheckoutErrors(){$("#checkout li.error ul.errors").remove();$("#checkout li.error").removeClass("error");}
function selectCountryBasedOnFreightQuote(){var $addressCountry=$("#cart_shipping_address_attributes_country_code"),$freightQuoteCountry=$("#cart_freight_quote_attributes_country_code");if($addressCountry.find("option[selected='selected']").length==0){if($freightQuoteCountry.find("option[selected]").length>0){$addressCountry.find("option[value='"+$freightQuoteCountry.find("option:selected").val()+"']").attr("selected","selected");}}}
function insertLoginForm(){var $target=$(".returning_customer .pad");$target.html(returningCustomerHTML);var $loginForm=$target.find("form:first");$loginForm.submit(function(){$.post($loginForm.attr('action'),$loginForm.serialize(),function(data){if(data.error_message){$target.find(".error").remove().end().prepend("<div class='error pad margin'>"+data.error_message+"</div>");}else{updateShopNav();removeCheckoutErrors();$(".returning_customer_heading, .returning_customer, .new_customer").slideUp(slideSpeed,function(){$(this).remove();});populateDefaultAddresses(data.default_billing,data.default_shipping);$("#billing_address .pad").prepend(data.billing_select);$("#shipping_address .pad").prepend(data.shipping_select);if(data.default_shipping){$("#shipping_address select.saved_addresses option[value='"+data.default_shipping['id']+"']").attr("selected","selected");}
if(data.default_billing){$("#billing_address select.saved_addresses option[value='"+data.default_billing['id']+"']").attr("selected","selected");}
if(data.default_shipping&&data.default_billing&&data.default_shipping['id']!=data.default_billing['id']){$("#cart_same_billing_address").attr("checked",false);$("#billing_address").show();}else{$("#cart_same_billing_address").attr("checked",true);$("#billing_address").hide();}
$("#cart_notification_email").attr("value",data.notification_email);setupSavedAddresses(data.addresses);}},"json");return false;});var $passwordForm=$target.find("form:last");$passwordForm.submit(function(){$.post($passwordForm.attr('action'),$passwordForm.serialize(),function(data){if(data.error_message){$passwordForm.prepend(data.error_message);}else{$passwordForm.prepend(data.message);}},"json");return false;});}
function populateDefaultAddresses(default_billing,default_shipping){populateAddressFields($("#shipping_address"),default_shipping);populateAddressFields($("#billing_address"),default_billing);if(default_billing&&default_shipping&&default_billing["id"]==default_shipping["id"]){$("#cart_same_billing_address").attr("checked",true);}else{$("#cart_same_billing_address").attr("checked",false);}
setupBillingAddressVisibility();return true;}
function setupBillingAddressVisibility(){$("#cart_same_billing_address").click(function(){updateBillingAddressVisibility();});}
function updateBillingAddressVisibility(){if($("#cart_same_billing_address").attr("checked")==true){$("#billing_address").hide();}else{$("#billing_address").show();setTimeout(function(){var target_offset=$("#billing_address").offset();var target_top=target_offset.top;$("html, body").animate({scrollTop:target_top},500);},400);}}
function setupSavedAddresses(addresses){$("#shipping_address select.saved_addresses, #billing_address select.saved_addresses").change(function(){for(var i=0;i<addresses.length;i++){if(addresses[i]["id"]==$(this).find('option[selected]').attr('value')){populateAddressFields($(this).parents(".address"),addresses[i]);}};});}
function setupPayNowButton(){$("input[name='pay']").click(validateCheckoutForm);}
function setupKeyPress(){$(".new_customer input, #shipping_address input, #billing_address input").live('keypress',function(e){if(e.keyCode==13){$("input[name='pay']").click();return false;}});}
function validateCheckoutForm(){var $form=$(this).parents("form"),fields=$form.serializeArray(),formattedFields=[];for(var i=0;i<fields.length;i++){if(!fields[i]['name'].match(/freight_quote/)){formattedFields.push(fields[i]);}};showModalProgress();$.post($form.attr('action'),$.param(formattedFields)+"&pay=true",function(data){closeModalProgress();if(data.proceed_to_payment=="true"){$.bbq.pushState("page=payment");$("#payment").hide().html(data.payment_html);$("#cart_summary .info").html(data.cart_html);updateCart(data.freight_quote);setTimeout(function(){$("#cart_summary").slideUp(slideSpeed);$("#checkout_summary").slideUp(slideSpeed);$(".returning_customer_heading, .returning_customer, .new_customer").slideUp(slideSpeed,function(){$(this).remove();});$("#checkout").slideUp(slideSpeed,function(){$("#payment").slideDown();resetButtonSpinners();setupButtonSpinners();removeCheckoutErrors();setupEditLinks();setupPaymentForm();setupGiftVoucherForm();setupCreditCardForm();buttonReplacer.init();Nifty("div.round","big");Nifty("div.shaded","big");});},50);}else{resetButtonSpinners();setupButtonSpinners();insertErrors(data.errors);}},"json");return false;}
function insertErrors(errors){var $listItem;removeCheckoutErrors();for(object in errors){for(field in errors[object]){if(object.match(/address|user/)){$listItem=$("#cart_"+object+"_attributes_"+field+"_input");}else if(object.match(/freight_selection|cart/)){$listItem=$("#cart_freight_method_input");}
$listItem.addClass("error").find("ul.errors").remove().end().append("<ul class='errors'><li>"+errors[object][field]+"</li></ul>");}}}
function setupPaymentForm(){$('#order_summary a.toggle').click(function(){$('#order_summary .toggle').toggle();return false;});if(!navigator.userAgent.match(/iphone/i)){$('.non_js').remove();$('.js').show();}
$(".payment .edit_items a").click(function(){$("#cart_summary a.edit").click();return false;});$(".payment .addresses h3 a").click(function(){var $contents=$("#checkout");$("#payment").slideUp(slideSpeed,function(){$.bbq.pushState("page=addresses");$("#cart_summary").slideDown(slideSpeed);$contents.slideDown(slideSpeed);resetButtonSpinners();});return false;});setupModalProgress();}
function setupGiftVoucherForm(){var $validateVoucherForm=$("#gift_voucher_use_form form:first");$validateVoucherForm.submit(function(){showModalProgress();$.post($validateVoucherForm.attr('action'),$validateVoucherForm.serialize(),function(data){var $giftVoucherInput;if(data.html){closeModalProgress();$("#gift_voucher_use_form").replaceWith("<div id='gift_voucher_use_form'>"+data.html+"</div>");setupGiftVoucherForm();buttonReplacer.init();}else if(data.proceed_to_placed){window.location=data.proceed_to_placed;}else{closeModalProgress();$("#gift_voucher_use_form").replaceWith("<div id='gift_voucher_use_form'>"+data.form_html+"</div>");$("#total_remaining").html(data.total_remaining);$(".summary_total_remaining").html(data.total_remaining);$(".summary_total_remaining_aud").html(data.total_remaining_in_aud);$("#summary_body tr:last").before(data.use_html);setupGiftVoucherForm();buttonReplacer.init();}
resetButtonSpinners();setupButtonSpinners();},"json");return false;});$("#redeemed_vouchers a").click(function(){var $link=$(this);if(confirm(_("Are you sure you want to remove this gift voucher?"))){$link.replaceWith("<img src='/images/gears_spinner.gif'/>");$("#total_remaining").html("<img src='/images/gears_spinner.gif'/>");$.post($link.attr("href"),{"_method":"delete"},function(data){$("#gift_voucher_use_form").replaceWith("<div id='gift_voucher_use_form'>"+data.form_html+"</div>");$("#total_remaining").html(data.total_remaining);$(".summary_total_remaining").html(data.total_remaining);$(".summary_total_remaining_aud").html(data.total_remaining_in_aud);$("#gift_voucher_use_"+data.use_id).remove();setupGiftVoucherForm();buttonReplacer.init();resetButtonSpinners();setupButtonSpinners();},"json");}
return false;});}
function setupCreditCardForm(){var $ccForm=$("#new_credit_card_payment");$ccForm.submit(function(){if(creditCardFormOK()){showModalProgress();$("table.payment p.error").remove();$.post($ccForm.attr("action"),$ccForm.serialize(),function(data){if(data.redirect_to){window.location=data.redirect_to;}else{closeModalProgress();$("#credit_card_form").html(data.form_html);setupCreditCardForm();buttonReplacer.init();resetButtonSpinners();setupButtonSpinners();}},"json");}else{setTimeout(function(){resetButtonSpinners();setupButtonSpinners();},5);}
return false;});function creditCardFormOK(){if($('#credit_card_payment_card_type').val()==""){alert(_('Please select a credit card type'));return false;}
if($('#credit_card_payment_card_type').attr('value').match(/(visa|master)/i)&&$('#credit_card_payment_number').attr('value').replace(/[^\d]/,'').length!=16){alert(_('The credit card number should be 16 digits. Please check your card number.'));return false;}
if(jQuery('#credit_card_payment_card_type').attr('value').match(/amex/i)&&jQuery('#credit_card_payment_number').attr('value').replace(/[^\d]/,'').length!=15){alert(_('The credit card number should be 15 digits. Please check your card number.'));return false;}
var d=new Date();var year=$('#credit_card_payment_expiry_year').attr('value');var month=jQuery('#credit_card_payment_expiry_month').attr('value');if(parseInt(year,10)<d.getFullYear()||(parseInt(year,10)==d.getFullYear()&&parseInt(month,10)<d.getMonth()+1)){alert(_('The expiry date should be in the future.'));return false;}
if(confirm(_("Please do not click any buttons until the next page is displayed. It may take up to 60 seconds to complete your payment. Please be patient. Click on the 'OK' button to proceed."))){return true;}else{return false;}}}
function setupEditLinks(){$("#cart_summary a.edit").click(function(){var $summary=$(this).parents(".summary:first"),$contents=$("#cart_and_freight");$("#payment").slideUp(slideSpeed);$("#cart_summary").slideUp(slideSpeed);$("#checkout_summary").slideUp(slideSpeed);$("#checkout").slideUp(slideSpeed,function(){$.bbq.pushState("page=cart");$contents.slideDown(slideSpeed);resetButtonSpinners();});return false;});}
function populateAddressFields($target,address,updateBilling){if(address==null||address==undefined){return false;}
if(updateBilling==undefined){updateBilling=true;}
var $stateSelect=$target.find("select[name*=state_id]");if($stateSelect.length>0){var fieldPrefix=$stateSelect.attr("name").match(/^(.*)(\[state_name\]|\[state_id\])/)[1],stateId=$stateSelect.attr('id'),html='<input id="'+stateId+'" type="text" name="'+fieldPrefix+'[state_name]" value="">';html+='<input type="hidden" name="'+fieldPrefix+'[state_id]" value="" id="'+stateId+'_remove_other_state">';$stateSelect.replaceWith(html);}
removeCheckoutErrors();$target.find("input[type='text']").not("input[name*='[notification_email]']").attr("value","");$target.find("select").not(".saved_addresses").find("option:selected").removeAttr("selected");var $field;for(field in address){$field=$target.find("input[name*='["+field+"]'], select[name*='["+field+"]']");if($field.length>0){if($field.get(0).tagName.toLowerCase()=="select"){$field.find("option:selected").removeAttr("selected");$field.find("option").each(function(){if($(this).text()==address[field]){$(this).attr("selected","selected");}});}else{$field.attr("value",address[field]);}}}
$("#cart_"+$target.attr("id")+"_attributes_country_code").change();if(updateBilling&&$("#cart_same_billing_address").attr("checked")==true&&$target.attr("id")=="shipping_address"){$("#billing_address .saved_addresses option:selected").removeAttr("selected");$("#billing_address .saved_addresses option[value='"+address["id"]+"']").attr("selected","selected");populateAddressFields($("#billing_address"),address,false);}
return true;}
function updateCheckoutSummary(){var billingSummary=summariseAddress("#shipping_address"),shippingSummary=summariseAddress("#billing_address");if(billingSummary==shippingSummary){$("#checkout_summary div").html("bill/ship to: "+billingSummary);}else{$("#checkout_summary div:first").html("bill to: "+billingSummary);$("#checkout_summary div:last").html("ship to: "+shippingSummary);}}
function summariseAddress(id){var $target=$(id),values=[],localityString="";localityString=compactArray([valueFor("locality"),stateName(),valueFor("postcode")]).join(" ");values.push(valueFor("full_name"));values.push(valueFor("company"));values.push(valueFor("line_1"));values.push(valueFor("line_2"));values.push(valueFor("line_3"));values.push(localityString);values.push($target.find("select[name*='[country_code]'] option:selected").text());function valueFor(fieldName){return $target.find("input[name*='["+fieldName+"]']").attr('value');}
function compactArray(array){var compactedArray=[];for(var i=0;i<array.length;i++){if($.trim(array[i])!=""){compactedArray.push(array[i]);}};return compactedArray;}
function stateName(){var $stateName=$target.find("input[name*='[state_name]']");if($stateName.length>0){return $stateName.attr('value');}else{return $target.find("select[name*='[state_id]'] option:selected").text();}}
return compactArray(values).join(", ");}
$(function(){$("#change_region_link").toggle(function(){$("#change_region, #change_region_background").fadeIn();},function(){$("#change_region, #change_region_background").fadeOut();});$(document).click(function(){var $element=$(this);if($('#change_region')&&$element.parents('#change_region').length==0&&$('#change_region:visible').length>0){$("#change_region").fadeOut();$("#change_region_background").fadeOut();}});if(!navigator.userAgent.match(/iphone/i)){$('.non_js').remove();$('.js').show();}
$('.flash_close').append("<div><a href='javascript:void(0)' onclick='jQuery(this).parents(\".flash\").remove()'>"+_('close message')+"</a></div>");if($('#shop_links')){updateShopNav();}
if($('.colour img').length>0){setupColourHover();}
setupButtonSpinners();$('a[rel*=facebox]').facebox();$('#slideshow').cycle();setupModalProgress();});function setupColourHover(){$(".colour img").each(function(){var $this=$(this),$colour=$this.closest(".colour"),offset=$colour.position();$("#galleries_and_colours").append("<div class='fabric_colour_frame' id='"+$colour.attr("id")+"_full'><img src='"+$this.attr("src")+"'></div>");$("#galleries_and_colours").find(".fabric_colour_frame:last").css({"top":offset.top-140+"px","left":offset.left+100+"px"});});$(".colour").hover(function(){$("#"+$(this).attr("id")+"_full").show();},function(){$("#"+$(this).attr("id")+"_full").hide();});}
function formatLinkForPaginationURL(){$("div.pagination").find("a").each(function(){var $this=$(this),url=$this.attr("href");if(url!="#"){$this.attr({"url":url,"href":"#"}).click(function(){var targetId=$(this).closest("div.pagination").attr("rel");$("#"+targetId+"_search_loading").show();$.ajax({url:$(this).attr('url')+"&partial="+targetId,dataType:"GET",beforeSend:function(xhr){xhr.setRequestHeader("Accept","text/javascript");},success:function(data){$("#"+targetId).html(data);formatLinkForPaginationURL();$("#"+targetId+"_search_loading").hide();}});return false;});}});}
function setupModalProgress(){$('.modal_progress').click(function(){showModalProgress();});}
function showModalProgress(){$('#modal_progress').css('left',($(window).width()-66)/2);$('#modal_progress,#black_overlay').css("height",$(document).height()).fadeTo("fast",0.8);}
function closeModalProgress(){$('#modal_progress,#black_overlay').fadeOut();}
function customisationToggle(element,prefix){var value,disabled;if(element.checked){value=_('tie sides');disabled=true;}else{value=_('enter extra length here');disabled=false;}
$("#"+prefix+"_vary_length_to_side_straps").attr({"value":value,"disabled":disabled});}
function setupButtonSpinners(){var $spinners=$("input.spinner");if($spinners!=null&&$spinners.length>0){$spinners.click(function(event){if(event.isPropagationStopped()){return false;}
var $this=$(this),$wrapper;$wrapper=$this.parents(".button_wrapper:first");if($wrapper.length>0){if($wrapper.next(".spinner").length==0){$wrapper.after("<img src='/images/gears_spinner.gif' class='spinner' />");$this.removeClass("spinner").addClass("set_spinner");}}
if(jQuery.browser.mozilla){$this.attr("disabled",true);}else{setTimeout(function(){$this.attr("disabled",true);},5);}
return true;});}}
function resetButtonSpinners(){var $this;$("input.set_spinner").each(function(){$this=$(this);$wrapper=$this.parents(".button_wrapper:first");if($wrapper.length>0){$wrapper.next(".spinner").remove();}
$this.attr("disabled",false);});}
function updateShopNav(){var cartCount=JSON.parse(unescape(Cookie.get("nav_cart")));var wishlistCount=JSON.parse(unescape(Cookie.get("nav_wishlist")));var loggedIn=JSON.parse(unescape(Cookie.get("nav_logged_in")));var userId=JSON.parse(unescape(Cookie.get("nav_user_id")));insertItemCount(jQuery('#cart_link'),cartCount);insertItemCount(jQuery('#wishlist_link'),wishlistCount);if(loggedIn){jQuery('#login_link').hide();jQuery('#logout_link').show();jQuery('#account_link').show();}else{jQuery('#account_link').hide();jQuery('#logout_link').hide();}}
function insertItemCount($element,count){if(!parseInt(count,10)||parseInt(count,10)<=0)return;text=count>1?_("items"):_("item");$element.find('span').remove();$element.append(" <span class='small' style='color:#999'> "+count+" "+text+"</span>");}
function displayFreightQuote(data){var freightMethods=JSON.parse(data);if(freightMethods.length==0){jQuery("#freight_quotes").html("<p>"+_("freight is not available for that country")+"</p><p>"+_("contact_customer_service")+"</p>");}else{var html="<table class='list margin_top'> \
                  <thead> \
                    <tr> \
                      <th class='right'>"+_("freight method")+"</th> \
                      <th>"+_("price")+"</th> \
                    </tr> \
                  </thead> \
                  <tbody>";for(var i=0;i<freightMethods.length;i++){html+="<tr> \
                 <td class='right pad_right'>"+freightMethods[i].name+"</td> \
                 <td>"+freightMethods[i].price+"</td> \
               </tr>";};html+="</tbody></table>";jQuery("#freight_quotes").html(html);}}
function stripHTML(text){var re=/<\S[^><]*>/g;return text.replace(re,"");}
function nl2br(str,is_xhtml){breakTag='<br />';if(typeof is_xhtml!='undefined'&&!is_xhtml){breakTag='<br>';}
return(str+'').replace(/([^>]?)\n/g,'$1'+breakTag+'\n');}
function checkMaxStringLength(){var success=true;jQuery('.centre_string').each(function(){if(!checkLength(this,10))success=false;});return success;}
function checkLength(input,max_inches){var value=parseFloat(input.value);var $input=jQuery(input);input.value=isNaN(value)?"":value;var $parent=$input.parents('.customisations');var $checked=$parent.find('input[name*=custom_length_units]:checked');if($checked.length==0){$checked=$parent.find('input[name*=custom_length_units]:first');$checked.attr('checked',true);}
if($checked.attr('value')=="in"&&input.value>max_inches){alert(_("One of the custom lengths you entered is too long."));input.value=max_inches;return false;}
if($checked.attr("value")=="cm"&&input.value>(max_inches*2.54)){alert(_("One of the custom lengths you entered is too long"));input.value=max_inches*2.54;return false;}
return true;}
function localised_path(path){return"/"+currency+path;}
function _(key,value){if(typeof(locale)=='undefined'||typeof(I18n)=='undefined'||!I18n[key]){return insertOptions(key,value);}else{var language=locale.substring(0,2);return insertOptions(I18n[key][language]||key,_(value));}}
function insertOptions(key,value){return value?key.replace(/\{\{([^\}]+)\}\}/,_(value)):key;}
function _en(translation){var english="";$H(I18n).each(function(pair){if(pair.value[locale]==translation){english=pair.key;throw $break;}});if(english.length>0){return english;}else{return translation;}}
function stopAllLinks(){jQuery('a').click(function(){$link=jQuery(this);$link.attr({"onclick":"","href":'javascript:void(0);'});$link.click(function(){return false;});});}
function updateBuyPageGalleryHeight(){$("#galleries_and_colours").css("height",$("#buy_page_form").height()-parseInt($("#galleries_and_colours").parent().css("padding-top"),10)-3);}
function updateStateInput(country_code,state_input_eid,field_prefix,initial_state_id,initial_state_name){if(jQuery("#"+state_input_eid+'_remove_other_state').length>0){jQuery("#"+state_input_eid+'_remove_other_state').remove();}
var useSelect=false;for(country in country_states){if(country==country_code){useSelect=true;}}
if(useSelect){var html='<select id="'+state_input_eid+'" name="'+field_prefix+'[state_id]">';html+='<option></option>';var state,selected;for(i=0;i<country_states[country_code].length;i++){state=country_states[country_code][i];selected=(state['id']==initial_state_id)?' selected':'';html+='<option value="'+state['id']+'"'+selected+'>'+state['name']+'</option>\n';}
html+='</select>';html+='<input type="hidden" name="'+field_prefix+'[state_name]" value="" id="'+state_input_eid+'_remove_other_state">';}else{html='<input id="'+state_input_eid+'" name="'+field_prefix+'[state_name]" value="'+initial_state_name+'">';html+='<input type="hidden" name="'+field_prefix+'[state_id]" value="" id="'+state_input_eid+'"_remove_other_state">';}
jQuery("#"+state_input_eid).replaceWith(html);}
function toggleDisplay(eid,bool){jQuery("#"+eid)[0].style.display=bool?'block':'none';}
function show_spinner(id){if(jQuery('#loading_spinner').length>0){return;}
var $element=jQuery("#"+id);$element.hide();var $wrapper=$element.parents('.button_wrapper');var html="<img src='/images/small_spinner.gif' id='loading_spinner'>";if($wrapper.length>0){$wrapper.hide();$wrapper.after(html);}else{$element.after(html);}}
function hide_spinner(id){var $element=jQuery("#"+id);$element.show();var $wrapper=$element.parents('.button_wrapper');if($wrapper){wrapper.show();}
jQuery('#loading_spinner').remove();}
var country_states={"CA":[{"name":"Alberta","code":"AB","id":74},{"name":"British Columbia","code":"BC","id":75},{"name":"Manitoba","code":"MB","id":76},{"name":"New Brunswick","code":"NB","id":77},{"name":"Newfoundland and Labrador","code":"NL","id":78},{"name":"Nova Scotia","code":"NS","id":79},{"name":"Ontario","code":"ON","id":80},{"name":"Prince Edward Island","code":"PE","id":81},{"name":"Quebec","code":"QC","id":82},{"name":"Saskatchewan","code":"SK","id":83},{"name":"Northwest Territories","code":"NT","id":84},{"name":"Nunavut","code":"NU","id":85},{"name":"Yukon Territory","code":"YT","id":86}],"US":[{"name":"Alaska","code":"AK","id":1},{"name":"Alabama","code":"AL","id":2},{"name":"American Samoa","code":"AS","id":3},{"name":"Arizona","code":"AZ","id":4},{"name":"Arkansas","code":"AR","id":5},{"name":"California","code":"CA","id":6},{"name":"Colorado","code":"CO","id":7},{"name":"Connecticut","code":"CT","id":8},{"name":"Delaware","code":"DE","id":9},{"name":"District of Columbia","code":"DC","id":10},{"name":"Federated States of Micronesia","code":"FM","id":11},{"name":"Florida","code":"FL","id":12},{"name":"Georgia","code":"GA","id":13},{"name":"Guam","code":"GU","id":14},{"name":"Hawaii","code":"HI","id":15},{"name":"Idaho","code":"ID","id":16},{"name":"Illinois","code":"IL","id":17},{"name":"Indiana","code":"IN","id":18},{"name":"Iowa","code":"IA","id":19},{"name":"Kansas","code":"KS","id":20},{"name":"Kentucky","code":"KY","id":21},{"name":"Louisiana","code":"LA","id":22},{"name":"Maine","code":"ME","id":23},{"name":"Marshall Islands","code":"MH","id":24},{"name":"Maryland","code":"MD","id":25},{"name":"Massachusetts","code":"MA","id":26},{"name":"Michigan","code":"MI","id":27},{"name":"Minnesota","code":"MN","id":28},{"name":"Mississippi","code":"MS","id":29},{"name":"Missouri","code":"MO","id":30},{"name":"Montana","code":"MT","id":31},{"name":"Nebraska","code":"NE","id":32},{"name":"Nevada","code":"NV","id":33},{"name":"New Hampshire","code":"NH","id":34},{"name":"New Jersey","code":"NJ","id":35},{"name":"New Mexico","code":"NM","id":36},{"name":"New York","code":"NY","id":37},{"name":"North Carolina","code":"NC","id":38},{"name":"North Dakota","code":"ND","id":39},{"name":"Northern Mariana Islands","code":"MP","id":40},{"name":"Ohio","code":"OH","id":41},{"name":"Oklahoma","code":"OK","id":42},{"name":"Oregon","code":"OR","id":43},{"name":"Palau","code":"PW","id":44},{"name":"Pennsylvania","code":"PA","id":45},{"name":"Puerto Rico","code":"PR","id":46},{"name":"Rhode Island","code":"RI","id":47},{"name":"South Carolina","code":"SC","id":48},{"name":"South Dakota","code":"SD","id":49},{"name":"Tennessee","code":"TN","id":50},{"name":"Texas","code":"TX","id":51},{"name":"Utah","code":"UT","id":52},{"name":"Vermont","code":"VT","id":53},{"name":"Virgin Islands","code":"VI","id":54},{"name":"Virginia","code":"VA","id":55},{"name":"Washington","code":"WA","id":56},{"name":"West Virginia","code":"WV","id":57},{"name":"Wisconsin","code":"WI","id":58},{"name":"Wyoming","code":"WY","id":59},{"name":"Armed Forces Africa","code":"AE","id":60},{"name":"Armed Forces Americas (except Canada)","code":"AA","id":61},{"name":"Armed Forces Canada","code":"AE","id":62},{"name":"Armed Forces Europe","code":"AE","id":63},{"name":"Armed Forces Middle East","code":"AE","id":64},{"name":"Armed Forces Pacific","code":"AP","id":65}],"AU":[{"name":"New South Wales","code":"NSW","id":66},{"name":"Australian Capital Territory","code":"ACT","id":67},{"name":"Victoria","code":"VIC","id":68},{"name":"Queensland","code":"QLD","id":69},{"name":"South Australia","code":"SA","id":70},{"name":"Northern Territory","code":"NT","id":71},{"name":"Western Australia","code":"WA","id":72},{"name":"Tasmania","code":"TAS","id":73}]};var I18n={"Are you sure you want to remove this gift voucher?":{'it':'Sei sicuro di voler eliminare questo buono regalo?\n','ja':'ã‚®ãƒ•ãƒˆåˆ¸ã‚’ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã—ã¾ã™ã‹ï¼Ÿ','de':'Willst Du wirklich diesen Geschenkgutschein entfernen?','fr':'Etes-vous certain de vouloir supprimer ce chÃ¨que-cadeau ?','es':'Â¿EstÃ¡ usted seguro que quiere quitar este vale obsequio?','ru':'Ð’Ñ‹ ÑƒÐ²ÐµÑ€ÐµÐ½Ñ‹, Ñ‡Ñ‚Ð¾ Ñ…Ð¾Ñ‚Ð¸Ñ‚Ðµ ÑƒÐ´Ð°Ð»Ð¸Ñ‚ÑŒ Ð¿Ð¾Ð´Ð°Ñ€Ð¾Ñ‡Ð½Ñ‹Ð¹ ÑÐµÑ€Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ‚?','pt':'Tem certeza que deseja remover este vale-presente? \n','en':'Are you sure you want to remove this gift voucher?'},"back style":{'it':'Retro del modello','fr':'ModÃ¨le de dos','de':'Variation','ja':'ã‚¹ã‚¿ã‚¤ãƒ«ï¼ˆå¾Œï¼‰','ru':'Ñ„Ð°ÑÐ¾Ð½ ÑÐ·Ð°Ð´Ð¸','es':'Estilo de espalda','pt':'Modelo das costas','en':'back style'},"change":{'it':'cambia','ja':'å¤‰æ›´','de':'Ã¤ndern','fr':'changer','es':'cambio\n','ru':'ÑÐ¼ÐµÐ½Ð¸Ñ‚ÑŒ','pt':'alterar','en':'change'},"choose a {{thing}}":{'it':'scegli un {{thing}}','ja':'{{thing}} ã‚’é¸æŠžã—ã¦ãã ã•ã„ã€‚','de':'{{thing}} wÃ¤hlen','fr':'choisir une taille {{thing}}','es':'elija una {{thing}}','ru':'Ð²Ñ‹Ð±ÐµÑ€Ð¸Ñ‚Ðµ {{thing}}','pt':'escolha um {{thing}}','en':'choose a {{thing}}'},"click here to remove this item":{'it':'Clicca qui per eliminare questo articolo\n','ja':'ã“ã“ã‚’ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã€å•†å“ã‚’ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã™ã‚‹','de':'Um den Posten zu entfernen, klicke bitte hier.','fr':'cliquer ici pour supprimer cet article','es':'cliquee aquÃ­ para quitar este artÃ­culo','ru':'Ð½Ð°Ð¶Ð¼Ð¸Ñ‚Ðµ ÑÑŽÐ´Ð°, Ñ‡Ñ‚Ð¾Ð±Ñ‹ ÑƒÐ´Ð°Ð»Ð¸Ñ‚ÑŒ ÑÑ‚Ð¾Ñ‚ Ñ‚Ð¾Ð²Ð°Ñ€','pt':'clique aqui para remover este item ','en':'click here to remove this item'},"close message":{'it':'Chiudi messaggio','ja':'ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’é–‰ã˜ã‚‹ã€‚','de':'Mitteilung schliessen','fr':'fermer le message','es':'cierre el mensaje','ru':'Ð·Ð°ÐºÑ€Ñ‹Ñ‚ÑŒ ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ðµ','pt':'fechar mensagem','en':'close message'},"colour":{'it':'colore','fr':'couleur','de':'Farbe','ja':'è‰²å½©','ru':'Ñ†Ð²ÐµÑ‚Ð°','es':'color','pt':'cor','en':'colour'},"contact_customer_service":{'it':'Si prega di contattare il servizio clienti per ricevere assistenza','de':'Bitte kontaktiere unseren Kundenservice fÃ¼r UnterstÃ¼tzung.','fr':'Câ€™est ici que nos clientes du monde entier peuvent montrer leur maillot de bain sexy Wicked Weasel. Chaque photo sÃ©lectionnÃ©e vous fait gagner un chÃ¨que-cadeau de {{amount}}. Vous pouvez participez aussi souvent que vous voulez. Nâ€™hÃ©sitez pas, envoyez-nous vos photosÂ !','ja':'ãŠå•ã„åˆã‚ã›ã¯ã‚«ã‚¹ã‚¿ãƒžãƒ¼ãƒ»ã‚µãƒ¼ãƒ“ã‚¹ã¾ã§ã€‚','es':'Para mÃ¡s datos contÃ¡ctese con servicios al cliente.','ru':'ÐžÑ‚Ð´ÐµÐ» Ð¾Ð±ÑÐ»ÑƒÐ¶Ð¸Ð²Ð°Ð½Ð¸Ñ ÐºÐ»Ð¸ÐµÐ½Ñ‚Ð¾Ð² Ð±ÑƒÐ´ÐµÑ‚ Ñ€Ð°Ð´ Ð’Ð°Ð¼ Ð¿Ð¾Ð¼Ð¾Ñ‡ÑŒ.','pt':'Em caso de dÃºvida, favor contatar o serviÃ§o de atendimento ao cliente.','jp':'ãŠå•ã„åˆã‚ã›ã¯ã‚«ã‚¹ã‚¿ãƒžãƒ¼ãƒ»ã‚µãƒ¼ãƒ“ã‚¹ã¾ã§ã€‚','en':'Please contact customer service for assistance.'},"enter extra length here":{'it':'Inserisci qui la lunghezza extra','fr':'Iindiquer la longueur supplÃ©mentaire ici','de':'Gib die ZusatzlÃ¤nge hier an.','ja':'è¿½åŠ ã®é•·ã•ã‚’ã“ã“ã«å…¥åŠ›ã—ã¦ãã ã•ã„ã€‚','ru':'Ð²Ð²ÐµÐ´Ð¸Ñ‚Ðµ Ð·Ð´ÐµÑÑŒ Ñ‚Ð¾, Ñ‡Ñ‚Ð¾ Ð½Ðµ ÑƒÐ¼ÐµÑÑ‚Ð¸Ð»Ð¾ÑÑŒ','es':'Ingrese el largo adicional aquÃ­','pt':'Insira um comprimento extra aqui ','en':'enter extra length here'},"freight is not available for that country":{'it':'il trasporto non Ã¨ disponibile per quel paese','ja':'è²¨ç‰©é‹é€ã¯ãã®å›½ã«åˆ©ç”¨å¯èƒ½ã§ã¯ã‚ã‚Šã¾ã›ã‚“ã€‚','de':'Versandart ist nicht verfÃ¼gbar fÃ¼r das Land','fr':'non livrable dans ce pays','es':'no estÃ¡ disponible el flete para ese paÃ­s','ru':'Ð² ÑÑ‚Ñƒ ÑÑ‚Ñ€Ð°Ð½Ñƒ Ð½ÐµÑ‚ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸','pt':'remessa indisponÃ­vel para este paÃ­s','en':'freight is not available for that country'},"freight method":{'it':'metodo di spedizione','ja':'é…é€æ–¹æ³•','de':'Versandart','fr':'mÃ©thode d\'expÃ©dition','es':'mÃ©todo de transporte','ru':'Ð¼ÐµÑ‚Ð¾Ð´ Ð´Ð¾ÑÑ‚Ð°Ð²ÐºÐ¸','pt':'forma de remessa','en':'freight method'},"item":{'it':'articolo\n','ja':'å•†å“','de':'Artikel','fr':'article','es':'artÃ­culo','ru':'Ñ‚Ð¾Ð²Ð°Ñ€','pt':'item','en':'item'},"items":{'it':'articoli\n','ja':'å•†å“','de':'Artikel','fr':'articles','es':'artÃ­culo','ru':'Ñ‚Ð¾Ð²Ð°Ñ€Ñ‹','pt':'items\n','en':'items'},"One of the items in your cart is currently unavailable.":{'it':'Uno degli articoli nel carrello non e\' disponibile al momento.','ja':'ãŠå®¢æ§˜ã®ã‚«ãƒ¼ãƒˆå†…ã®ã‚¢ã‚¤ãƒ†ãƒ ã«ã€ç¾åœ¨ã€åœ¨åº«åˆ‡ã‚Œã®å•†å“ãŒã”ã–ã„ã¾ã™ã€‚','de':'Ein Artikel in Ihrem Warenkorb ist zurzeit nicht erhÃ¤ltlich.','fr':'L\'un des articles de votre panier n\'est pas disponible actuellement.','es':'Uno de los artÃ­culos en su carro no estÃ¡ disponible en este momento.','ru':'ÐžÐ´Ð½Ð¾Ð³Ð¾ Ð¸Ð· Ñ‚Ð¾Ð²Ð°Ñ€Ð¾Ð² Ð² Ð’Ð°ÑˆÐµÐ¹ ÐºÐ¾Ñ€Ð·Ð¸Ð½Ðµ ÑÐµÐ¹Ñ‡Ð°Ñ Ð½ÐµÑ‚ Ð² Ð½Ð°Ð»Ð¸Ñ‡Ð¸Ð¸.','pt':'Um dos itens em seu carrinho estÃ¡ indisponÃ­vel no momento.','en':'One of the items in your cart is currently unavailable.'},"only available in {{thing}}":{'it':'disponibile solo in {{thing}}','ja':'{{thing}}ã ã‘ã§å…¥æ‰‹å¯èƒ½','de':'Nur in/mit \" {{thing}} \" erhÃ¤ltlich','fr':'disponible seulement en {{thing}}','es':'sÃ³lo disponible en {{thing}}','ru':'Ð² Ð½Ð°Ð»Ð¸Ñ‡Ð¸Ð¸ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ {{thing}}','pt':'disponÃ­vel apenas em {{thing}}','en':'only available in {{thing}}'},"Please do not click any buttons until the next page is displayed. It may take up to 60 seconds to complete your payment. Please be patient. Click on the \'OK\' button to proceed.":{'it':'Si prega di non cliccare su altri pulsanti finchÃ© non appare la pagina. Ci potrebbero volere fino a 60 secondi per completare il pagamento. Si prega di pazientare. Cliccare sul pulsante \'OK\' per procedere.','ja':'æ¬¡ã®ãƒšãƒ¼ã‚¸ã‚’è¡¨ç¤ºã™ã‚‹ã¾ã§ã©ã‚“ãªãƒœã‚¿ãƒ³ã‚‚ã‚¯ãƒªãƒƒã‚¯ã—ãªã„ã§ãã ã•ã„ã€‚ãŠæ”¯æ‰•ã„ã‚’çµ‚äº†ã™ã‚‹ã«ã¯60ç§’ã¾ã§ã‹ã‹ã‚‹ã‹ã‚‚ã—ã‚Œãªã„ã€‚ æˆ‘æ…¢ã—ã¦ãã ã•ã„ã€‚ç¶šãã‚ˆã†ã«\'OK\'ãƒœã‚¿ãƒ³ã‚’ã‚¯ãƒªãƒƒã‚¯ã—ã¦ãã ã•ã„ã€‚','de':'Bitte klicke keine Taste bis die nÃ¤chste Seite angezeigt wird. Es kann etwa 60 Sekunden dauern, um die Zahlung zu bearbeiten. Bitte hab etwas Geduld. Klicke die \"OK\" Taste um fortzufahren.','fr':'Ne pas cliquez sur un bouton tant que la page suivante n\'est pas affichÃ©e. Le traitement de votre paiement peut prendre jusqu\'Ã  60 secondes. Merci de votre patience. Cliquez sur le bouton \"OK\" pour commencer. ','es':'Haga el favor de no cliquear ningÃºn botÃ³n hasta que aparezca la prÃ³xiima pÃ¡gina. Puede llevar unos 60 segundos completar su pago. Tenga paciencia. Cliquee el botÃ³n \'OK\' para continuar.','ru':'ÐŸÐ¾Ð¶Ð°Ð»ÑƒÐ¹ÑÑ‚Ð°, Ð½Ðµ Ð½Ð°Ð¶Ð¸Ð¼Ð°Ð¹Ñ‚Ðµ Ð½Ð¸ÐºÐ°ÐºÐ¸Ðµ ÐºÐ½Ð¾Ð¿ÐºÐ¸, Ð¿Ð¾ÐºÐ° Ð½Ðµ Ð¿Ð¾ÑÐ²Ð¸Ñ‚ÑÑ ÑÐ»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ ÑÑ‚Ñ€Ð°Ð½Ð¸Ñ†Ð°. ÐžÐ±Ñ€Ð°Ð±Ð¾Ñ‚ÐºÐ° Ð¿Ð»Ð°Ñ‚ÐµÐ¶Ð° Ð¼Ð¾Ð¶ÐµÑ‚ Ð·Ð°Ð½ÑÑ‚ÑŒ Ð´Ð¾ 60 ÑÐµÐºÑƒÐ½Ð´. ÐŸÐ¾Ð¶Ð°Ð»ÑƒÐ¹ÑÑ‚Ð°, Ð¿Ð¾Ð´Ð¾Ð¶Ð´Ð¸Ñ‚Ðµ. ÐÐ°Ð¶Ð¼Ð¸Ñ‚Ðµ ÐºÐ½Ð¾Ð¿ÐºÑƒ \"OK\" Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð´Ð¾Ð»Ð¶ÐµÐ½Ð¸Ñ.','pt':'Por favor, nÃ£o clique em nada atÃ© que a prÃ³xima pÃ¡gina seja exibida. A finalizaÃ§Ã£o do seu pagamento pode levar atÃ© 60 segundos. Seja paciente. Cique no botÃ£o \'OK\' para prosseguir.','en':'Please do not click any buttons until the next page is displayed. It may take up to 60 seconds to complete your payment. Please be patient. Click on the \'OK\' button to proceed.'},"Please select a credit card type":{'it':'Ti preghiamo di selezionare un tipo di carta di credito','fr':'Veuillez choisir un type de carte de crÃ©dit','de':'WÃ¤hle bitte eine Kreditkartenart aus.','ja':'ã‚¯ãƒ¬ã‚¸ãƒƒãƒˆã‚«ãƒ¼ãƒ‰ã®ç¨®é¡žã‚’é¸æŠžã—ã¦ãã ã•ã„ã€‚','ru':'ÐŸÐ¾Ð¶Ð°Ð»ÑƒÐ¹ÑÑ‚Ð°, Ð²Ñ‹Ð±ÐµÑ€Ð¸Ñ‚Ðµ Ñ‚Ð¸Ð¿ ÐºÑ€ÐµÐ´Ð¸Ñ‚Ð½Ð¾Ð¹ ÐºÐ°Ñ€Ñ‚Ñ‹','es':'Seleccionar un tipo de tarjeta de crÃ©dito','pt':'Selecione um tipo de cartÃ£o de crÃ©dito','en':'Please select a credit card type'},"Please select all the options for at least one of the items on this page.":{'it':'Per favore seleziona tutte le opzioni per almeno uno degli articoli di questa pagina.\n','ja':'ã“ã®ãƒšãƒ¼ã‚¸ã®å•†å“ã«å¯¾ã—ã™ã¹ã¦ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã¦ãã ã•ã„ã€‚','de':'Bitte wÃ¤hle alle Optionen fÃ¼r wenigstens einen der Artikel auf dieser Seite aus.','fr':'Veuillez choisir toutes les options pour au moins un article de cette page.','es':'Haga el favor de seleccionar todas las opciones para al menos uno de los artÃ­culos de esta pÃ¡gina.','ru':'ÐŸÐ¾Ð¶Ð°Ð»ÑƒÐ¹ÑÑ‚Ð°, ÑƒÐºÐ°Ð¶Ð¸Ñ‚Ðµ Ð²ÑÐµ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ‹ Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ Ð´Ð»Ñ Ð¾Ð´Ð½Ð¾Ð³Ð¾ Ñ‚Ð¾Ð²Ð°Ñ€Ð° Ð½Ð° ÑÑ‚Ð¾Ð¹ ÑÑ‚Ñ€Ð°Ð½Ð¸Ñ†Ðµ.','pt':'Favor selecionar todas as opÃ§Ãµes para pelo menos um dos itens nesta pÃ¡gina.\n','en':'Please select all the options for at least one of the items on this page.'},"price":{'it':'prezzo','de':'Preis','fr':'prix','ja':'ä¾¡æ ¼','es':'precio','ru':'Ñ†ÐµÐ½Ð°','pt':'preÃ§o','en':'price'},"size":{'it':'taglia','ja':'ã‚µã‚¤ã‚º','de':'GrÃ¶sse','fr':'taille','es':'talle','ru':'Ñ€Ð°Ð·Ð¼ÐµÑ€','pt':'tamanho','en':'size'},"standard":{'it':'standard','ja':'æ¨™æº–','de':'Standard','fr':'standard','es':'estÃ¡ndar','ru':'ÑÑ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚','pt':'padrÃ£o \n','en':'standard'},"tie sides":{'it':'laccetti annodabili','ja':'ã‚¿ã‚¤ãƒ»ã‚µã‚¤ãƒ‰','de':'SchnÃ¼rbare SeitenbÃ¤nder','fr':'nouÃ© sur le cÃ´tÃ©','es':'costados acordonados','ru':'Ð±Ð¾ÐºÐ¾Ð²Ñ‹Ðµ Ð·Ð°Ð²ÑÐ·ÐºÐ¸','pt':'laterais de amarrar','en':'tie sides'},"trouser length":{'it':'lunghezza pantaloni','ja':'ã‚ºãƒœãƒ³ã®é•·ã•','de':'HosenlÃ¤nge','fr':'longueur de pantalon','es':'longitud del pantalÃ³n','ru':'Ð´Ð»Ð¸Ð½Ð° Ð±Ñ€ÑŽÐº','pt':'comprimento da calÃ§a','en':'trouser length'},"variation":{'it':'variazione\n','ja':'ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³','de':'Variation','fr':'variation','es':'variaciÃ³n','ru':'Ð²Ð°Ñ€Ð¸Ð°Ð½Ñ‚','pt':'variaÃ§Ã£o\n','en':'variation'},"You have not selected all options for one or more of the items on this page. Do you want to continue and only add the selected items to the cart?":{'it':'Non hai selezionato tutte le opzioni per uno o piÃ¹ articoli di questa pagina. Vuoi continuare e aggiungere al carrello solo gli articoli selezionati?\n','ja':'ã“ã®ãƒšãƒ¼ã‚¸ã®å•†å“ã®ã™ã¹ã¦ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒé¸æŠžã•ã‚Œã¦ã„ã¾ã›ã‚“ã€‚é¸æŠžã—ãŸå•†å“ã®ã¿ã‚’ã‚«ãƒ¼ãƒˆã«è¿½åŠ ã—ã€ã‚·ãƒ§ãƒƒãƒ”ãƒ³ã‚°ã‚’ç¶šã‘ã¾ã™ã‹ï¼Ÿ','de':'Du hast nicht alle Optionen fÃ¼r einen oder mehrere der Artikel auf dieser Seite ausgewÃ¤hlt. MÃ¶chtest Du fortfahren und nur die gewÃ¤hlten Artikel zum Warenkorb hinzufÃ¼gen?','fr':'Vous n\'avez pas sÃ©lectionnÃ© toutes le options pour au moins un article de cette page. Voulez-vous continuer et ajouter uniquement les articles choisis dans la panier ?','es':'Usted no ha seleccionado todas las opciones para uno o mÃ¡s de los artÃ­culos de esta pÃ¡gina. Â¿Desea continuar y sÃ³lo agregar los artÃ­culos seleccionados al carrito?','ru':'Ð’Ñ‹ Ð½Ðµ ÑƒÐºÐ°Ð·Ð°Ð»Ð¸ Ð²ÑÐµ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ‹ Ð´Ð»Ñ Ð¾Ð´Ð½Ð¾Ð³Ð¾ Ð¸Ð»Ð¸ Ð±Ð¾Ð»ÐµÐµ Ñ‚Ð¾Ð²Ð°Ñ€Ð¾Ð² Ð½Ð° ÑÑ‚Ð¾Ð¹ ÑÑ‚Ñ€Ð°Ð½Ð¸Ñ†Ðµ. Ð’Ñ‹ Ñ…Ð¾Ñ‚Ð¸Ñ‚Ðµ Ð¿Ñ€Ð¾Ð´Ð¾Ð»Ð¶Ð¸Ñ‚ÑŒ Ð¸ Ð»Ð¸ÑˆÑŒ Ð´Ð¾Ð±Ð°Ð²Ð¸Ñ‚ÑŒ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ñ‹Ðµ Ñ‚Ð¾Ð²Ð°Ñ€Ñ‹ Ð² ÐºÐ¾Ñ€Ð·Ð¸Ð½Ñƒ?','pt':'VocÃª nÃ£o selecionou todas as opÃ§Ãµes para um ou mais itens nesta pÃ¡gina. VocÃª quer continuar e adicionar apenas os itens selecionados ao carrinho?\n','en':'You have not selected all options for one or more of the items on this page. Do you want to continue and only add the selected items to the cart?'}}
var JSON=function(){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},s={'boolean':function(x){return String(x);},number:function(x){return isFinite(x)?String(x):'null';},string:function(x){if(/["\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}
c=b.charCodeAt();return'\\u00'+
Math.floor(c/16).toString(16)+
(c%16).toString(16);});}
return'"'+x+'"';},object:function(x){if(x){var a=[],b,f,i,l,v;if(x instanceof Array){a[0]='[';l=x.length;for(i=0;i<l;i+=1){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=='string'){if(b){a[a.length]=',';}
a[a.length]=v;b=true;}}}
a[a.length]=']';}else if(x instanceof Object){a[0]='{';for(i in x){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=='string'){if(b){a[a.length]=',';}
a.push(s.string(i),':',v);b=true;}}}
a[a.length]='}';}else{return;}
return a.join('');}
return'null';}};return{copyright:'(c)2005 JSON.org',license:'http://www.JSON.org/license.html',stringify:function(v){var f=s[typeof v];if(f){v=f(v);if(typeof v=='string'){return v;}}
return null;},parse:function(text){try{return!(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g,'')))&&eval('('+text+')');}catch(e){return false;}}};}();var Flash=new Object();Flash.data={};Flash.transferFromCookies=function(){var data=JSON.parse(unescape((Cookie.get("flash")||'').replace(/\+/g,'%20')));if(!data)data={};Flash.data=data;Cookie.erase("flash");};Flash.writeDataTo=function(name,elementId,wrapperId){var content="";if(Flash.data[name]){content=Flash.data[name].toString().replace(/\+/g,' ');if(typeof(jQuery)==undefined||typeof(jQuery)=="function"){jQuery("#"+elementId).html(unescape(content));jQuery("#"+wrapperId).css("display","");}else if(typeof($)==undefined||typeof($)=="function"){$(elementId).update(unescape(content));$(wrapperId).setStyle({display:""});}else{el(elementId).innerHTML=unescape(content);show(elementId);}}};var Cookie={set:function(name,value,daysToExpire){var expire='';if(!daysToExpire)daysToExpire=365;var d=new Date();d.setTime(d.getTime()+(86400000*parseFloat(daysToExpire)));expire='expires='+d.toGMTString();var path="path=/";var cookieValue=escape(name)+'='+escape(value||'')+'; '+path+'; '+expire+';';return document.cookie=cookieValue;},get:function(name){var cookie=document.cookie.match(new RegExp('(^|;)\\s*'+escape(name)+'=([^;\\s]+)'));return(cookie?unescape(cookie[2]):null);},erase:function(name){var cookie=Cookie.get(name)||true;Cookie.set(name,'',-1);return cookie;},eraseAll:function(){var cookieString=""+document.cookie;var cookieArray=cookieString.split("; ");for(var i=0;i<cookieArray.length;++i)
{var singleCookie=cookieArray[i].split("=");if(singleCookie.length!=2)
continue;var name=unescape(singleCookie[0]);Cookie.erase(name);}},accept:function(){if(typeof navigator.cookieEnabled=='boolean'){return navigator.cookieEnabled;}
Cookie.set('_test','1');return(Cookie.erase('_test')==='1');},exists:function(cookieName){var cookieValue=Cookie.get(cookieName);if(!cookieValue)return false;return cookieValue.toString()!="";}};function printStackTrace(options){var ex=(options&&options.e)?options.e:null;var guess=(options&&options.guess)?options.guess:false;var p=new printStackTrace.implementation();var result=p.run(ex);return(guess)?p.guessFunctions(result):result;}
printStackTrace.implementation=function(){};printStackTrace.implementation.prototype={run:function(ex){var mode=this._mode||this.mode();if(mode==='other'){return this.other(arguments.callee);}
else{ex=ex||(function(){try{(0)();}catch(e){return e;}})();return this[mode](ex);}},mode:function(){try{(0)();}catch(e){if(e.arguments){return(this._mode='chrome');}
if(e.stack){return(this._mode='firefox');}
if(window.opera&&!('stacktrace'in e)){return(this._mode='opera');}}
return(this._mode='other');},chrome:function(e){return e.stack.replace(/^.*?\n/,'').replace(/^.*?\n/,'').replace(/^.*?\n/,'').replace(/^[^\(]+?[\n$]/gm,'').replace(/^\s+at\s+/gm,'').replace(/^Object.<anonymous>\s*\(/gm,'{anonymous}()@').split("\n");},firefox:function(e){return e.stack.replace(/^.*?\n/,'').replace(/(?:\n@:0)?\s+$/m,'').replace(/^\(/gm,'{anonymous}(').split("\n");},opera:function(e){var lines=e.message.split("\n"),ANON='{anonymous}',lineRE=/Line\s+(\d+).*?script\s+(http\S+)(?:.*?in\s+function\s+(\S+))?/i,i,j,len;for(i=4,j=0,len=lines.length;i<len;i+=2){if(lineRE.test(lines[i])){lines[j++]=(RegExp.$3?RegExp.$3+'()@'+RegExp.$2+RegExp.$1:ANON+'()@'+RegExp.$2+':'+RegExp.$1)+' -- '+
lines[i+1].replace(/^\s+/,'');}}
lines.splice(j,lines.length-j);return lines;},other:function(curr){var ANON="{anonymous}",fnRE=/function\s*([\w\-$]+)?\s*\(/i,stack=[],j=0,fn,args;var maxStackSize=10;while(curr&&stack.length<maxStackSize){fn=fnRE.test(curr.toString())?RegExp.$1||ANON:ANON;args=Array.prototype.slice.call(curr['arguments']);stack[j++]=fn+'('+printStackTrace.implementation.prototype.stringifyArguments(args)+')';if(curr===curr.caller&&window.opera){break;}
curr=curr.caller;}
return stack;},stringifyArguments:function(args){for(var i=0;i<args.length;++i){var argument=args[i];if(typeof argument=='object'){args[i]='#object';}else if(typeof argument=='function'){args[i]='#function';}else if(typeof argument=='string'){args[i]='"'+argument+'"';}}
return args.join(',');},sourceCache:{},ajax:function(url){var req=this.createXMLHTTPObject();if(!req){return;}
req.open('GET',url,false);req.setRequestHeader("User-Agent","XMLHTTP/1.0");req.send('');return req.responseText;},createXMLHTTPObject:function(){var xmlhttp,XMLHttpFactories=[function(){return new XMLHttpRequest();},function(){return new ActiveXObject("Msxml2.XMLHTTP");},function(){return new ActiveXObject("Msxml3.XMLHTTP");},function(){return new ActiveXObject("Microsoft.XMLHTTP");}];for(var i=0;i<XMLHttpFactories.length;i++){try{xmlhttp=XMLHttpFactories[i]();this.createXMLHTTPObject=XMLHttpFactories[i];return xmlhttp;}catch(e){}}},getSource:function(url){if(!(url in this.sourceCache)){this.sourceCache[url]=this.ajax(url).split("\n");}
return this.sourceCache[url];},guessFunctions:function(stack){for(var i=0;i<stack.length;++i){var reStack=/{anonymous}\(.*\)@(\w+:\/\/([-\w\.]+)+(:\d+)?[^:]+):(\d+):?(\d+)?/;var frame=stack[i],m=reStack.exec(frame);if(m){var file=m[1],lineno=m[4];if(file&&lineno){var functionName=this.guessFunctionName(file,lineno);stack[i]=frame.replace('{anonymous}',functionName);}}}
return stack;},guessFunctionName:function(url,lineNo){try{return this.guessFunctionNameFromLines(lineNo,this.getSource(url));}catch(e){return'getSource failed with url: '+url+', exception: '+e.toString();}},guessFunctionNameFromLines:function(lineNo,source){var reFunctionArgNames=/function ([^(]*)\(([^)]*)\)/;var reGuessFunction=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*(function|eval|new Function)/;var line="",maxLines=10;for(var i=0;i<maxLines;++i){line=source[lineNo-i]+line;if(line!==undefined){var m=reGuessFunction.exec(line);if(m){return m[1];}
else{m=reFunctionArgNames.exec(line);}
if(m&&m[1]){return m[1];}}}
return"(?)";}};$(function(){buttonReplacer.init();});var buttonReplacer={init:function(){this.formatInput(jQuery('input[type="submit"]'));this.formatLink(jQuery('a.button'));},formatInput:function($elements){$elements.each(function(){var $button=jQuery(this);if($button.parents('.button_wrapper').length>0)return;$button.removeClass('replace');if(ie){var hiddenAncestors=$button.parents("div:hidden"),wrapperWidth;if($button.hasClass("cart_button")||$button.hasClass("continue")){wrapperWidth=$button.outerWidth()+45;}else{wrapperWidth=$button.outerWidth()+25;}
$button.wrap("<div style='width:"+wrapperWidth+"px' class='button_wrapper "+$button.attr("class")+"'><div></div></div>");$button.css("color",$button.css("color"));}else{$button.wrapAll("<div class='button_wrapper "+$button.attr("class")+"'><div></div></div>");}
if($button.hasClass('single_click')){button.onclick=function(){this.onclick=function(event){};return true;};}});},formatLink:function($elements){$elements.each(function(){var $button=jQuery(this);if($button.parents('.button_wrapper').length>0)return;if(ie){var hiddenAncestors=$button.parents("div:hidden");if(hiddenAncestors.length>0){hiddenAncestors.show();}
var wrapperWidth=$button.outerWidth()+30;if(hiddenAncestors.length>0){hiddenAncestors.hide();}
$button.wrap("<div style='width:"+wrapperWidth+"px' class='button_wrapper'><div></div></div>");}else{$button.wrap("<div class='button_wrapper'><div></div></div>");}
$button.removeClass('button');});}};var checkboxHeight="25";var radioHeight="25";var selectWidth="190";document.write('<style type="text/css">input.styled { display: none; } select.styled { position: relative; width: '+selectWidth+'px; opacity: 0; z-index: 5; }</style>');var Custom={init:function(){var inputs=document.getElementsByTagName("input"),span=Array(),textnode,option,active;for(a=0;a<inputs.length;a++){if((inputs[a].type=="checkbox"||inputs[a].type=="radio")&&inputs[a].className=="styled"){span[a]=document.createElement("span");span[a].className=inputs[a].type;if(inputs[a].checked==true){if(inputs[a].type=="checkbox"){position="0 -"+(checkboxHeight*2)+"px";span[a].style.backgroundPosition=position;}else{position="0 -"+(radioHeight*2)+"px";span[a].style.backgroundPosition=position;}}
inputs[a].parentNode.insertBefore(span[a],inputs[a]);inputs[a].onchange=Custom.clear;span[a].onmousedown=Custom.pushed;span[a].onmouseup=Custom.check;document.onmouseup=Custom.clear;}}
inputs=document.getElementsByTagName("select");for(a=0;a<inputs.length;a++){if(inputs[a].className=="styled"){option=inputs[a].getElementsByTagName("option");active=option[0].childNodes[0].nodeValue;textnode=document.createTextNode(active);for(b=0;b<option.length;b++){if(option[b].selected==true){textnode=document.createTextNode(option[b].childNodes[0].nodeValue);}}
span[a]=document.createElement("span");span[a].className="select";span[a].id="select"+inputs[a].name;span[a].appendChild(textnode);inputs[a].parentNode.insertBefore(span[a],inputs[a]);inputs[a].onchange=Custom.choose;}}},pushed:function(){element=this.nextSibling;if(element.checked==true&&element.type=="checkbox"){this.style.backgroundPosition="0 -"+checkboxHeight*3+"px";}else if(element.checked==true&&element.type=="radio"){this.style.backgroundPosition="0 -"+radioHeight*3+"px";}else if(element.checked!=true&&element.type=="checkbox"){this.style.backgroundPosition="0 -"+checkboxHeight+"px";}else{this.style.backgroundPosition="0 -"+radioHeight+"px";}},check:function(){element=this.nextSibling;if(element.checked==true&&element.type=="checkbox"){this.style.backgroundPosition="0 0";element.checked=false;}else{if(element.type=="checkbox"){this.style.backgroundPosition="0 -"+checkboxHeight*2+"px";}else{this.style.backgroundPosition="0 -"+radioHeight*2+"px";group=this.nextSibling.name;inputs=document.getElementsByTagName("input");for(a=0;a<inputs.length;a++){if(inputs[a].name==group&&inputs[a]!=this.nextSibling){inputs[a].previousSibling.style.backgroundPosition="0 0";}}}
element.checked=true;}},clear:function(){inputs=document.getElementsByTagName("input");for(var b=0;b<inputs.length;b++){if(inputs[b].type=="checkbox"&&inputs[b].checked==true&&inputs[b].className=="styled"){inputs[b].previousSibling.style.backgroundPosition="0 -"+checkboxHeight*2+"px";}else if(inputs[b].type=="checkbox"&&inputs[b].className=="styled"){inputs[b].previousSibling.style.backgroundPosition="0 0";}else if(inputs[b].type=="radio"&&inputs[b].checked==true&&inputs[b].className=="styled"){inputs[b].previousSibling.style.backgroundPosition="0 -"+radioHeight*2+"px";}else if(inputs[b].type=="radio"&&inputs[b].className=="styled"){inputs[b].previousSibling.style.backgroundPosition="0 0";}}},choose:function(){option=this.getElementsByTagName("option");for(d=0;d<option.length;d++){if(option[d].selected==true){document.getElementById("select"+this.name).childNodes[0].nodeValue=option[d].childNodes[0].nodeValue;}}}};window.onload=Custom.init;(function($){$(function(){Nifty("div.round","big");Nifty("div.shaded","big");});})(jQuery);var niftyOk=(document.getElementById&&document.createElement&&Array.prototype.push);var niftyCss=false;String.prototype.find=function(what){return(this.indexOf(what)>=0?true:false);};var oldonload=window.onload;if(typeof(NiftyLoad)!='function')NiftyLoad=function(){};if(typeof(oldonload)=='function')
window.onload=function(){oldonload();AddCss();NiftyLoad();};else window.onload=function(){AddCss();NiftyLoad();};function AddCss(){niftyCss=true;var l=CreateEl("link");l.setAttribute("type","text/css");l.setAttribute("rel","stylesheet");l.setAttribute("href","niftyCorners.css");l.setAttribute("media","screen");}
function Nifty(selector,options){if(niftyOk==false)return;if(niftyCss==false)AddCss();var i,v=selector.split(","),h=0;if(options==null)options="";if(options.find("fixed-height"))
h=getElementsBySelector(v[0])[0].offsetHeight;for(i=0;i<v.length;i++)
Rounded(v[i],options);if(options.find("height"))SameHeight(selector,h);}
function Rounded(selector,options){var i,top="",bottom="",v=new Array();if(options!=""){options=options.replace("left","tl bl");options=options.replace("right","tr br");options=options.replace("top","tr tl");options=options.replace("bottom","br bl");options=options.replace("transparent","alias");if(options.find("tl")){top="both";if(!options.find("tr"))top="left";}
else if(options.find("tr"))top="right";if(options.find("bl")){bottom="both";if(!options.find("br"))bottom="left";}
else if(options.find("br"))bottom="right";}
if(top==""&&bottom==""&&!options.find("none")){top="both";bottom="both";}
v=getElementsBySelector(selector);for(i=0;i<v.length;i++){FixIE(v[i]);if(top!="")AddTop(v[i],top,options);if(bottom!="")AddBottom(v[i],bottom,options);}}
function AddTop(el,side,options){var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;d.style.marginLeft="-"+getPadding(el,"Left")+"px";d.style.marginRight="-"+getPadding(el,"Right")+"px";if(options.find("alias")||(color=getBk(el))=="transparent"){color="transparent";bk="transparent";border=getParentBk(el);btype="t";}
else{bk=getParentBk(el);border=Mix(color,bk);}
d.style.background=bk;d.className="niftycorners";p=getPadding(el,"Top");if(options.find("small")){d.style.marginBottom=(p-2)+"px";btype+="s";lim=2;}
else if(options.find("big")){d.style.marginBottom=(p-10)+"px";btype+="b";lim=8;}
else d.style.marginBottom=(p-5)+"px";for(i=1;i<=lim;i++)
d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingTop="0";el.insertBefore(d,el.firstChild);}
function AddBottom(el,side,options){var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;d.style.marginLeft="-"+getPadding(el,"Left")+"px";d.style.marginRight="-"+getPadding(el,"Right")+"px";if(options.find("alias")||(color=getBk(el))=="transparent"){color="transparent";bk="transparent";border=getParentBk(el);btype="t";}
else{bk=getParentBk(el);border=Mix(color,bk);}
d.style.background=bk;d.className="niftycorners";p=getPadding(el,"Bottom");if(options.find("small")){d.style.marginTop=(p-2)+"px";btype+="s";lim=2;}
else if(options.find("big")){d.style.marginTop=(p-10)+"px";btype+="b";lim=8;}
else d.style.marginTop=(p-5)+"px";for(i=lim;i>0;i--)
d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingBottom=0;el.appendChild(d);}
function CreateStrip(index,side,color,border,btype){var x=CreateEl("b");x.className=btype+index;x.style.backgroundColor=color;x.style.borderColor=border;if(side=="left"){x.style.borderRightWidth="0";x.style.marginRight="0";}
else if(side=="right"){x.style.borderLeftWidth="0";x.style.marginLeft="0";}
return(x);}
function CreateEl(x){return(document.createElement(x));}
function FixIE(el){if(el.currentStyle!=null&&el.currentStyle.hasLayout!=null&&el.currentStyle.hasLayout==false)
el.style.display="inline-block";}
function SameHeight(selector,maxh){var i,v=selector.split(","),t,j,els=[],gap;for(i=0;i<v.length;i++){t=getElementsBySelector(v[i]);els=els.concat(t);}
for(i=0;i<els.length;i++){if(els[i].offsetHeight>maxh)maxh=els[i].offsetHeight;els[i].style.height="auto";}
for(i=0;i<els.length;i++){gap=maxh-els[i].offsetHeight;if(gap>0){t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px";nc=els[i].lastChild;if(nc.className=="niftycorners")
els[i].insertBefore(t,nc);else els[i].appendChild(t);}}}
function getElementsBySelector(selector){var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c;if(selector.find("#")){if(selector.find(" ")){s=selector.split(" ");var fs=s[0].split("#");if(fs.length==1)return(objlist);f=document.getElementById(fs[1]);if(f){v=f.getElementsByTagName(s[1]);for(i=0;i<v.length;i++)objlist.push(v[i]);}
return(objlist);}
else{s=selector.split("#");tag=s[0];selid=s[1];if(selid!=""){f=document.getElementById(selid);if(f)objlist.push(f);return(objlist);}}}
if(selector.find(".")){s=selector.split(".");tag=s[0];selclass=s[1];if(selclass.find(" ")){s=selclass.split(" ");selclass=s[0];tag2=s[1];}}
var v=document.getElementsByTagName(tag);if(selclass==""){for(i=0;i<v.length;i++)objlist.push(v[i]);return(objlist);}
for(i=0;i<v.length;i++){c=v[i].className.split(" ");for(j=0;j<c.length;j++){if(c[j]==selclass){if(tag2=="")objlist.push(v[i]);else{v2=v[i].getElementsByTagName(tag2);for(k=0;k<v2.length;k++)objlist.push(v2[k]);}}}}
return(objlist);}
function getParentBk(x){var el=x.parentNode,c;while(el.tagName.toUpperCase()!="HTML"&&(c=getBk(el))=="transparent")
el=el.parentNode;if(c=="transparent")c="#FFFFFF";return(c);}
function getBk(x){var c=getStyleProp(x,"backgroundColor");if(c==null||c=="transparent"||c.find("rgba(0, 0, 0, 0)"))
return("transparent");if(c.find("rgb"))c=rgb2hex(c);return(c);}
function getPadding(x,side){var p=getStyleProp(x,"padding"+side);if(p==null||!p.find("px"))return(0);return(parseInt(p,10));}
function getStyleProp(x,prop){if(x.currentStyle)
return(x.currentStyle[prop]);if(document.defaultView.getComputedStyle)
return(document.defaultView.getComputedStyle(x,'')[prop]);return(null);}
function rgb2hex(value){var hex="",v,h,i;var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var h=regexp.exec(value);for(i=1;i<4;i++){v=parseInt(h[i],10).toString(16);if(v.length==1)hex+="0"+v;else hex+=v;}
return("#"+hex);}
function Mix(c1,c2){var i,step1,step2,x,y,r=new Array(3);if(c1.length==4)step1=1;else step1=2;if(c2.length==4)step2=1;else step2=2;for(i=0;i<3;i++){x=parseInt(c1.substr(1+step1*i,step1),16);if(step1==1)x=16*x+x;y=parseInt(c2.substr(1+step2*i,step2),16);if(step2==1)y=16*y+y;r[i]=Math.floor((x*50+y*50)/100);r[i]=r[i].toString(16);if(r[i].length==1)r[i]="0"+r[i];}
return("#"+r[0]+r[1]+r[2]);}
if(!hs){var hs={lang:{cssDirection:'ltr',loadingText:'Loading...',loadingTitle:'Click to cancel',focusTitle:'Click to bring to front',fullExpandTitle:'Expand to actual size (f)',creditsText:'Powered by <i>Highslide JS</i>',creditsTitle:'Go to the Highslide JS homepage',previousText:'Previous',nextText:'Next',moveText:'Move',closeText:'Close',closeTitle:'Close (esc)',resizeTitle:'Resize',playText:'Play',playTitle:'Play slideshow (spacebar)',pauseText:'Pause',pauseTitle:'Pause slideshow (spacebar)',previousTitle:'Previous (arrow left)',nextTitle:'Next (arrow right)',moveTitle:'Move',fullExpandText:'1:1',number:'Image %1 of %2',restoreTitle:'Click to close image, click and drag to move. Use arrow keys for next and previous.'},graphicsDir:'highslide/graphics/',expandCursor:'zoomin.cur',restoreCursor:'zoomout.cur',expandDuration:250,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,loadingOpacity:0.75,allowMultipleInstances:true,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,padToMinWidth:false,fullExpandPosition:'bottom right',fullExpandOpacity:1,showCredits:true,creditsHref:'http://highslide.com/',creditsTarget:'_self',enableKeyListener:true,openerTagNames:['a','area'],transitions:[],transitionDuration:250,dimmingOpacity:0,dimmingDuration:50,allowWidthReduction:false,allowHeightReduction:true,preserveContent:true,objectLoadTime:'before',cacheAjax:true,anchor:'auto',align:'auto',targetX:null,targetY:null,dragByHeading:true,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:'drop-shadow',skin:{controls:'<div class="highslide-controls"><ul>'+'<li class="highslide-previous">'+'<a href="#" title="{hs.lang.previousTitle}">'+'<span>{hs.lang.previousText}</span></a>'+'</li>'+'<li class="highslide-play">'+'<a href="#" title="{hs.lang.playTitle}">'+'<span>{hs.lang.playText}</span></a>'+'</li>'+'<li class="highslide-pause">'+'<a href="#" title="{hs.lang.pauseTitle}">'+'<span>{hs.lang.pauseText}</span></a>'+'</li>'+'<li class="highslide-next">'+'<a href="#" title="{hs.lang.nextTitle}">'+'<span>{hs.lang.nextText}</span></a>'+'</li>'+'<li class="highslide-move">'+'<a href="#" title="{hs.lang.moveTitle}">'+'<span>{hs.lang.moveText}</span></a>'+'</li>'+'<li class="highslide-full-expand">'+'<a href="#" title="{hs.lang.fullExpandTitle}">'+'<span>{hs.lang.fullExpandText}</span></a>'+'</li>'+'<li class="highslide-close">'+'<a href="#" title="{hs.lang.closeTitle}" >'+'<span>{hs.lang.closeText}</span></a>'+'</li>'+'</ul></div>',contentWrapper:'<div class="highslide-header"><ul>'+'<li class="highslide-previous">'+'<a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)">'+'<span>{hs.lang.previousText}</span></a>'+'</li>'+'<li class="highslide-next">'+'<a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)">'+'<span>{hs.lang.nextText}</span></a>'+'</li>'+'<li class="highslide-move">'+'<a href="#" title="{hs.lang.moveTitle}" onclick="return false">'+'<span>{hs.lang.moveText}</span></a>'+'</li>'+'<li class="highslide-close">'+'<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">'+'<span>{hs.lang.closeText}</span></a>'+'</li>'+'</ul></div>'+'<div class="highslide-body"></div>'+'<div class="highslide-footer"><div>'+'<span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span>'+'</div></div>'},preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:['allowSizeReduction','useBox','anchor','align','targetX','targetY','outlineType','outlineWhileAnimating','captionId','captionText','captionEval','captionOverlay','headingId','headingText','headingEval','headingOverlay','creditsPosition','dragByHeading','autoplay','numberPosition','transitions','dimmingOpacity','width','height','contentId','allowWidthReduction','allowHeightReduction','preserveContent','maincontentId','maincontentText','maincontentEval','objectType','cacheAjax','objectWidth','objectHeight','objectLoadTime','swfOptions','wrapperClassName','minWidth','minHeight','maxWidth','maxHeight','slideshowGroup','easing','easingClose','fadeInOut','src'],overlays:[],idCounter:0,oPos:{x:['leftpanel','left','center','right','rightpanel'],y:['above','top','middle','bottom','below']},mouse:{},headingOverlay:{},captionOverlay:{},swfOptions:{flashvars:{},params:{},attributes:{}},timers:[],slideshows:[],pendingOutlines:{},sleeping:[],preloadTheseAjax:[],cacheBindings:[],cachedGets:{},clones:{},onReady:[],uaVersion:/Trident\/4\.0/.test(navigator.userAgent)?8:parseFloat((navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,'0'])[1]),ie:(document.all&&!window.opera),safari:/Safari/.test(navigator.userAgent),geckoMac:/Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),$:function(id){if(id)return document.getElementById(id);},push:function(arr,val){arr[arr.length]=val;},createElement:function(tag,attribs,styles,parent,nopad){var el=document.createElement(tag);if(attribs)hs.extend(el,attribs);if(nopad)hs.setStyles(el,{padding:0,border:'none',margin:0});if(styles)hs.setStyles(el,styles);if(parent)parent.appendChild(el);return el;},extend:function(el,attribs){for(var x in attribs)el[x]=attribs[x];return el;},setStyles:function(el,styles){for(var x in styles){if(hs.ie&&x=='opacity'){if(styles[x]>0.99)el.style.removeAttribute('filter');else el.style.filter='alpha(opacity='+(styles[x]*100)+')';}
else el.style[x]=styles[x];}},animate:function(el,prop,opt){var start,end,unit;if(typeof opt!='object'||opt===null){var args=arguments;opt={duration:args[2],easing:args[3],complete:args[4]};}
if(typeof opt.duration!='number')opt.duration=250;opt.easing=Math[opt.easing]||Math.easeInQuad;opt.curAnim=hs.extend({},prop);for(var name in prop){var e=new hs.fx(el,opt,name);start=parseFloat(hs.css(el,name))||0;end=parseFloat(prop[name]);unit=name!='opacity'?'px':'';e.custom(start,end,unit);}},css:function(el,prop){if(document.defaultView){return document.defaultView.getComputedStyle(el,null).getPropertyValue(prop);}else{if(prop=='opacity')prop='filter';var val=el.currentStyle[prop.replace(/\-(\w)/g,function(a,b){return b.toUpperCase();})];if(prop=='filter')
val=val.replace(/alpha\(opacity=([0-9]+)\)/,function(a,b){return b/100});return val===''?1:val;}},getPageSize:function(){var d=document,w=window,iebody=d.compatMode&&d.compatMode!='BackCompat'?d.documentElement:d.body;var width=hs.ie?iebody.clientWidth:(d.documentElement.clientWidth||self.innerWidth),height=hs.ie?iebody.clientHeight:self.innerHeight;hs.page={width:width,height:height,scrollLeft:hs.ie?iebody.scrollLeft:pageXOffset,scrollTop:hs.ie?iebody.scrollTop:pageYOffset}},getPosition:function(el){if(/area/i.test(el.tagName)){var imgs=document.getElementsByTagName('img');for(var i=0;i<imgs.length;i++){var u=imgs[i].useMap;if(u&&u.replace(/^.*?#/,'')==el.parentNode.name){el=imgs[i];break;}}}
var p={x:el.offsetLeft,y:el.offsetTop};while(el.offsetParent){el=el.offsetParent;p.x+=el.offsetLeft;p.y+=el.offsetTop;if(el!=document.body&&el!=document.documentElement){p.x-=el.scrollLeft;p.y-=el.scrollTop;}}
return p;},expand:function(a,params,custom,type){if(!a)a=hs.createElement('a',null,{display:'none'},hs.container);if(typeof a.getParams=='function')return params;if(type=='html'){for(var i=0;i<hs.sleeping.length;i++){if(hs.sleeping[i]&&hs.sleeping[i].a==a){hs.sleeping[i].awake();hs.sleeping[i]=null;return false;}}
hs.hasHtmlExpanders=true;}
try{new hs.Expander(a,params,custom,type);return false;}catch(e){return true;}},htmlExpand:function(a,params,custom){return hs.expand(a,params,custom,'html');},getSelfRendered:function(){return hs.createElement('div',{className:'highslide-html-content',innerHTML:hs.replaceLang(hs.skin.contentWrapper)});},getElementByClass:function(el,tagName,className){var els=el.getElementsByTagName(tagName);for(var i=0;i<els.length;i++){if((new RegExp(className)).test(els[i].className)){return els[i];}}
return null;},replaceLang:function(s){s=s.replace(/\s/g,' ');var re=/{hs\.lang\.([^}]+)\}/g,matches=s.match(re),lang;if(matches)for(var i=0;i<matches.length;i++){lang=matches[i].replace(re,"$1");if(typeof hs.lang[lang]!='undefined')s=s.replace(matches[i],hs.lang[lang]);}
return s;},setClickEvents:function(){var els=document.getElementsByTagName('a');for(var i=0;i<els.length;i++){var type=hs.isUnobtrusiveAnchor(els[i]);if(type&&!els[i].hsHasSetClick){(function(){var t=type;if(hs.fireEvent(hs,'onSetClickEvent',{element:els[i],type:t})){els[i].onclick=(type=='image')?function(){return hs.expand(this)}:function(){return hs.htmlExpand(this,{objectType:t});};}})();els[i].hsHasSetClick=true;}}
hs.getAnchors();},isUnobtrusiveAnchor:function(el){if(el.rel=='highslide')return'image';else if(el.rel=='highslide-ajax')return'ajax';else if(el.rel=='highslide-iframe')return'iframe';else if(el.rel=='highslide-swf')return'swf';},getCacheBinding:function(a){for(var i=0;i<hs.cacheBindings.length;i++){if(hs.cacheBindings[i][0]==a){var c=hs.cacheBindings[i][1];hs.cacheBindings[i][1]=c.cloneNode(1);return c;}}
return null;},preloadAjax:function(e){var arr=hs.getAnchors();for(var i=0;i<arr.htmls.length;i++){var a=arr.htmls[i];if(hs.getParam(a,'objectType')=='ajax'&&hs.getParam(a,'cacheAjax'))
hs.push(hs.preloadTheseAjax,a);}
hs.preloadAjaxElement(0);},preloadAjaxElement:function(i){if(!hs.preloadTheseAjax[i])return;var a=hs.preloadTheseAjax[i];var cache=hs.getNode(hs.getParam(a,'contentId'));if(!cache)cache=hs.getSelfRendered();var ajax=new hs.Ajax(a,cache,1);ajax.onError=function(){};ajax.onLoad=function(){hs.push(hs.cacheBindings,[a,cache]);hs.preloadAjaxElement(i+1);};ajax.run();},focusTopmost:function(){var topZ=0,topmostKey=-1,expanders=hs.expanders,exp,zIndex;for(var i=0;i<expanders.length;i++){exp=expanders[i];if(exp){zIndex=exp.wrapper.style.zIndex;if(zIndex&&zIndex>topZ){topZ=zIndex;topmostKey=i;}}}
if(topmostKey==-1)hs.focusKey=-1;else expanders[topmostKey].focus();},getParam:function(a,param){a.getParams=a.onclick;var p=a.getParams?a.getParams():null;a.getParams=null;return(p&&typeof p[param]!='undefined')?p[param]:(typeof hs[param]!='undefined'?hs[param]:null);},getSrc:function(a){var src=hs.getParam(a,'src');if(src)return src;return a.href;},getNode:function(id){var node=hs.$(id),clone=hs.clones[id],a={};if(!node&&!clone)return null;if(!clone){clone=node.cloneNode(true);clone.id='';hs.clones[id]=clone;return node;}else{return clone.cloneNode(true);}},discardElement:function(d){if(d)hs.garbageBin.appendChild(d);hs.garbageBin.innerHTML='';},dim:function(exp){if(!hs.dimmer){hs.dimmer=hs.createElement('div',{className:'highslide-dimming highslide-viewport-size',owner:'',onclick:function(){if(hs.fireEvent(hs,'onDimmerClick'))
hs.close();}},{visibility:'visible',opacity:0},hs.container,true);}
hs.dimmer.style.display='';hs.dimmer.owner+='|'+exp.key;if(hs.geckoMac&&hs.dimmingGeckoFix)
hs.setStyles(hs.dimmer,{background:'url('+hs.graphicsDir+'geckodimmer.png)',opacity:1});else
hs.animate(hs.dimmer,{opacity:exp.dimmingOpacity},hs.dimmingDuration);},undim:function(key){if(!hs.dimmer)return;if(typeof key!='undefined')hs.dimmer.owner=hs.dimmer.owner.replace('|'+key,'');if((typeof key!='undefined'&&hs.dimmer.owner!='')||(hs.upcoming&&hs.getParam(hs.upcoming,'dimmingOpacity')))return;if(hs.geckoMac&&hs.dimmingGeckoFix)hs.dimmer.style.display='none';else hs.animate(hs.dimmer,{opacity:0},hs.dimmingDuration,null,function(){hs.dimmer.style.display='none';});},transit:function(adj,exp){var last=exp=exp||hs.getExpander();if(hs.upcoming)return false;else hs.last=last;try{hs.upcoming=adj;adj.onclick();}catch(e){hs.last=hs.upcoming=null;}
try{if(!adj||exp.transitions[1]!='crossfade')
exp.close();}catch(e){}
return false;},previousOrNext:function(el,op){var exp=hs.getExpander(el);if(exp)return hs.transit(exp.getAdjacentAnchor(op),exp);else return false;},previous:function(el){return hs.previousOrNext(el,-1);},next:function(el){return hs.previousOrNext(el,1);},keyHandler:function(e){if(!e)e=window.event;if(!e.target)e.target=e.srcElement;if(typeof e.target.form!='undefined')return true;if(!hs.fireEvent(hs,'onKeyDown',e))return true;var exp=hs.getExpander();var op=null;switch(e.keyCode){case 70:if(exp)exp.doFullExpand();return true;case 32:op=2;break;case 34:case 39:case 40:op=1;break;case 8:case 33:case 37:case 38:op=-1;break;case 27:case 13:op=0;}
if(op!==null){if(op!=2)hs.removeEventListener(document,window.opera?'keypress':'keydown',hs.keyHandler);if(!hs.enableKeyListener)return true;if(e.preventDefault)e.preventDefault();else e.returnValue=false;if(exp){if(op==0){exp.close();}else if(op==2){if(exp.slideshow)exp.slideshow.hitSpace();}else{if(exp.slideshow)exp.slideshow.pause();hs.previousOrNext(exp.key,op);}
return false;}}
return true;},registerOverlay:function(overlay){hs.push(hs.overlays,hs.extend(overlay,{hsId:'hsId'+hs.idCounter++}));},addSlideshow:function(options){var sg=options.slideshowGroup;if(typeof sg=='object'){for(var i=0;i<sg.length;i++){var o={};for(var x in options)o[x]=options[x];o.slideshowGroup=sg[i];hs.push(hs.slideshows,o);}}else{hs.push(hs.slideshows,options);}},getWrapperKey:function(element,expOnly){var el,re=/^highslide-wrapper-([0-9]+)$/;el=element;while(el.parentNode){if(el.hsKey!==undefined)return el.hsKey;if(el.id&&re.test(el.id))return el.id.replace(re,"$1");el=el.parentNode;}
if(!expOnly){el=element;while(el.parentNode){if(el.tagName&&hs.isHsAnchor(el)){for(var key=0;key<hs.expanders.length;key++){var exp=hs.expanders[key];if(exp&&exp.a==el)return key;}}
el=el.parentNode;}}
return null;},getExpander:function(el,expOnly){if(typeof el=='undefined')return hs.expanders[hs.focusKey]||null;if(typeof el=='number')return hs.expanders[el]||null;if(typeof el=='string')el=hs.$(el);return hs.expanders[hs.getWrapperKey(el,expOnly)]||null;},isHsAnchor:function(a){return(a.onclick&&a.onclick.toString().replace(/\s/g,' ').match(/hs.(htmlE|e)xpand/));},reOrder:function(){for(var i=0;i<hs.expanders.length;i++)
if(hs.expanders[i]&&hs.expanders[i].isExpanded)hs.focusTopmost();},fireEvent:function(obj,evt,args){return obj&&obj[evt]?(obj[evt](obj,args)!==false):true;},mouseClickHandler:function(e)
{if(!e)e=window.event;if(e.button>1)return true;if(!e.target)e.target=e.srcElement;var el=e.target;while(el.parentNode&&!(/highslide-(image|move|html|resize)/.test(el.className)))
{el=el.parentNode;}
var exp=hs.getExpander(el);if(exp&&(exp.isClosing||!exp.isExpanded))return true;if(exp&&e.type=='mousedown'){if(e.target.form)return true;var match=el.className.match(/highslide-(image|move|resize)/);if(match){hs.dragArgs={exp:exp,type:match[1],left:exp.x.pos,width:exp.x.size,top:exp.y.pos,height:exp.y.size,clickX:e.clientX,clickY:e.clientY};hs.addEventListener(document,'mousemove',hs.dragHandler);if(e.preventDefault)e.preventDefault();if(/highslide-(image|html)-blur/.test(exp.content.className)){exp.focus();hs.hasFocused=true;}
return false;}
else if(/highslide-html/.test(el.className)&&hs.focusKey!=exp.key){exp.focus();exp.doShowHide('hidden');}}else if(e.type=='mouseup'){hs.removeEventListener(document,'mousemove',hs.dragHandler);if(hs.dragArgs){if(hs.styleRestoreCursor&&hs.dragArgs.type=='image')
hs.dragArgs.exp.content.style.cursor=hs.styleRestoreCursor;var hasDragged=hs.dragArgs.hasDragged;if(!hasDragged&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type)){if(hs.fireEvent(exp,'onImageClick'))
exp.close();}
else if(hasDragged||(!hasDragged&&hs.hasHtmlExpanders)){hs.dragArgs.exp.doShowHide('hidden');}
if(hs.dragArgs.exp.releaseMask)
hs.dragArgs.exp.releaseMask.style.display='none';if(hasDragged)hs.fireEvent(hs.dragArgs.exp,'onDrop',hs.dragArgs);hs.hasFocused=false;hs.dragArgs=null;}else if(/highslide-image-blur/.test(el.className)){el.style.cursor=hs.styleRestoreCursor;}}
return false;},dragHandler:function(e)
{if(!hs.dragArgs)return true;if(!e)e=window.event;var a=hs.dragArgs,exp=a.exp;if(exp.iframe){if(!exp.releaseMask)exp.releaseMask=hs.createElement('div',null,{position:'absolute',width:exp.x.size+'px',height:exp.y.size+'px',left:exp.x.cb+'px',top:exp.y.cb+'px',zIndex:4,background:(hs.ie?'white':'none'),opacity:.01},exp.wrapper,true);if(exp.releaseMask.style.display=='none')
exp.releaseMask.style.display='';}
a.dX=e.clientX-a.clickX;a.dY=e.clientY-a.clickY;var distance=Math.sqrt(Math.pow(a.dX,2)+Math.pow(a.dY,2));if(!a.hasDragged)a.hasDragged=(a.type!='image'&&distance>0)||(distance>(hs.dragSensitivity||5));if(a.hasDragged&&e.clientX>5&&e.clientY>5){if(!hs.fireEvent(exp,'onDrag',a))return false;if(a.type=='resize')exp.resize(a);else{exp.moveTo(a.left+a.dX,a.top+a.dY);if(a.type=='image')exp.content.style.cursor='move';}}
return false;},wrapperMouseHandler:function(e){try{if(!e)e=window.event;var over=/mouseover/i.test(e.type);if(!e.target)e.target=e.srcElement;if(hs.ie)e.relatedTarget=over?e.fromElement:e.toElement;var exp=hs.getExpander(e.target);if(!exp.isExpanded)return;if(!exp||!e.relatedTarget||hs.getExpander(e.relatedTarget,true)==exp||hs.dragArgs)return;hs.fireEvent(exp,over?'onMouseOver':'onMouseOut',e);for(var i=0;i<exp.overlays.length;i++)(function(){var o=hs.$('hsId'+exp.overlays[i]);if(o&&o.hideOnMouseOut){if(over)hs.setStyles(o,{visibility:'visible',display:''});hs.animate(o,{opacity:over?o.opacity:0},o.dur);}})();}catch(e){}},addEventListener:function(el,event,func){if(el==document&&event=='ready')hs.push(hs.onReady,func);try{el.addEventListener(event,func,false);}catch(e){try{el.detachEvent('on'+event,func);el.attachEvent('on'+event,func);}catch(e){el['on'+event]=func;}}},removeEventListener:function(el,event,func){try{el.removeEventListener(event,func,false);}catch(e){try{el.detachEvent('on'+event,func);}catch(e){el['on'+event]=null;}}},preloadFullImage:function(i){if(hs.continuePreloading&&hs.preloadTheseImages[i]&&hs.preloadTheseImages[i]!='undefined'){var img=document.createElement('img');img.onload=function(){img=null;hs.preloadFullImage(i+1);};img.src=hs.preloadTheseImages[i];}},preloadImages:function(number){if(number&&typeof number!='object')hs.numberOfImagesToPreload=number;var arr=hs.getAnchors();for(var i=0;i<arr.images.length&&i<hs.numberOfImagesToPreload;i++){hs.push(hs.preloadTheseImages,hs.getSrc(arr.images[i]));}
if(hs.outlineType)new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)});else
hs.preloadFullImage(0);if(hs.restoreCursor)var cur=hs.createElement('img',{src:hs.graphicsDir+hs.restoreCursor});},init:function(){if(!hs.container){hs.getPageSize();hs.ieLt7=hs.ie&&hs.uaVersion<7;hs.ie6SSL=hs.ieLt7&&location.protocol=='https:';for(var x in hs.langDefaults){if(typeof hs[x]!='undefined')hs.lang[x]=hs[x];else if(typeof hs.lang[x]=='undefined'&&typeof hs.langDefaults[x]!='undefined')
hs.lang[x]=hs.langDefaults[x];}
hs.container=hs.createElement('div',{className:'highslide-container'},{position:'absolute',left:0,top:0,width:'100%',zIndex:hs.zIndexCounter,direction:'ltr'},document.body,true);hs.loading=hs.createElement('a',{className:'highslide-loading',title:hs.lang.loadingTitle,innerHTML:hs.lang.loadingText,href:'javascript:;'},{position:'absolute',top:'-9999px',opacity:hs.loadingOpacity,zIndex:1},hs.container);hs.garbageBin=hs.createElement('div',null,{display:'none'},hs.container);hs.viewport=hs.createElement('div',{className:'highslide-viewport highslide-viewport-size'},{visibility:(hs.safari&&hs.uaVersion<525)?'visible':'hidden'},hs.container,1);hs.clearing=hs.createElement('div',null,{clear:'both',paddingTop:'1px'},null,true);Math.linearTween=function(t,b,c,d){return c*t/d+b;};Math.easeInQuad=function(t,b,c,d){return c*(t/=d)*t+b;};Math.easeOutQuad=function(t,b,c,d){return-c*(t/=d)*(t-2)+b;};hs.hideSelects=hs.ieLt7;hs.hideIframes=((window.opera&&hs.uaVersion<9)||navigator.vendor=='KDE'||(hs.ie&&hs.uaVersion<5.5));hs.fireEvent(this,'onActivate');}},ready:function(){if(hs.isReady)return;hs.isReady=true;for(var i=0;i<hs.onReady.length;i++)hs.onReady[i]();},updateAnchors:function(){var el,els,all=[],images=[],htmls=[],groups={},re;for(var i=0;i<hs.openerTagNames.length;i++){els=document.getElementsByTagName(hs.openerTagNames[i]);for(var j=0;j<els.length;j++){el=els[j];re=hs.isHsAnchor(el);if(re){hs.push(all,el);if(re[0]=='hs.expand')hs.push(images,el);else if(re[0]=='hs.htmlExpand')hs.push(htmls,el);var g=hs.getParam(el,'slideshowGroup')||'none';if(!groups[g])groups[g]=[];hs.push(groups[g],el);}}}
hs.anchors={all:all,groups:groups,images:images,htmls:htmls};return hs.anchors;},getAnchors:function(){return hs.anchors||hs.updateAnchors();},close:function(el){var exp=hs.getExpander(el);if(exp)exp.close();return false;}};hs.fx=function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};};hs.fx.prototype={update:function(){(hs.fx.step[this.prop]||hs.fx.step._default)(this);if(this.options.step)
this.options.step.call(this.elem,this.now,this);},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit;this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd);}
t.elem=this.elem;if(t()&&hs.timers.push(t)==1){hs.timerId=setInterval(function(){var timers=hs.timers;for(var i=0;i<timers.length;i++)
if(!timers[i]())
timers.splice(i--,1);if(!timers.length){clearInterval(hs.timerId);}},13);}},step:function(gotoEnd){var t=(new Date()).getTime();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)
if(this.options.curAnim[i]!==true)
done=false;if(done){if(this.options.complete)this.options.complete.call(this.elem);}
return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=this.options.easing(n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}
return true;}};hs.extend(hs.fx,{step:{opacity:function(fx){hs.setStyles(fx.elem,{opacity:fx.now});},_default:function(fx){try{if(fx.elem.style&&fx.elem.style[fx.prop]!=null)
fx.elem.style[fx.prop]=fx.now+fx.unit;else
fx.elem[fx.prop]=fx.now;}catch(e){}}}});hs.Outline=function(outlineType,onLoad){this.onLoad=onLoad;this.outlineType=outlineType;var v=hs.uaVersion,tr;this.hasAlphaImageLoader=hs.ie&&v>=5.5&&v<7;if(!outlineType){if(onLoad)onLoad();return;}
hs.init();this.table=hs.createElement('table',{cellSpacing:0},{visibility:'hidden',position:'absolute',borderCollapse:'collapse',width:0},hs.container,true);var tbody=hs.createElement('tbody',null,null,this.table,1);this.td=[];for(var i=0;i<=8;i++){if(i%3==0)tr=hs.createElement('tr',null,{height:'auto'},tbody,true);this.td[i]=hs.createElement('td',null,null,tr,true);var style=i!=4?{lineHeight:0,fontSize:0}:{position:'relative'};hs.setStyles(this.td[i],style);}
this.td[4].className=outlineType+' highslide-outline';this.preloadGraphic();};hs.Outline.prototype={preloadGraphic:function(){var src=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png";var appendTo=hs.safari?hs.container:null;this.graphic=hs.createElement('img',null,{position:'absolute',top:'-9999px'},appendTo,true);var pThis=this;this.graphic.onload=function(){pThis.onGraphicLoad();};this.graphic.src=src;},onGraphicLoad:function(){var o=this.offset=this.graphic.width/4,pos=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],dim={height:(2*o)+'px',width:(2*o)+'px'};for(var i=0;i<=8;i++){if(pos[i]){if(this.hasAlphaImageLoader){var w=(i==1||i==7)?'100%':this.graphic.width+'px';var div=hs.createElement('div',null,{width:'100%',height:'100%',position:'relative',overflow:'hidden'},this.td[i],true);hs.createElement('div',null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:'absolute',width:w,height:this.graphic.height+'px',left:(pos[i][0]*o)+'px',top:(pos[i][1]*o)+'px'},div,true);}else{hs.setStyles(this.td[i],{background:'url('+this.graphic.src+') '+(pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'});}
if(window.opera&&(i==3||i==5))
hs.createElement('div',null,dim,this.td[i],true);hs.setStyles(this.td[i],dim);}}
this.graphic=null;if(hs.pendingOutlines[this.outlineType])hs.pendingOutlines[this.outlineType].destroy();hs.pendingOutlines[this.outlineType]=this;if(this.onLoad)this.onLoad();},setPosition:function(pos,offset,vis,dur,easing){var exp=this.exp,stl=exp.wrapper.style,offset=offset||0,pos=pos||{x:exp.x.pos+offset,y:exp.y.pos+offset,w:exp.x.get('wsize')-2*offset,h:exp.y.get('wsize')-2*offset};if(vis)this.table.style.visibility=(pos.h>=4*this.offset)?'visible':'hidden';hs.setStyles(this.table,{left:(pos.x-this.offset)+'px',top:(pos.y-this.offset)+'px',width:(pos.w+2*this.offset)+'px'});pos.w-=2*this.offset;pos.h-=2*this.offset;hs.setStyles(this.td[4],{width:pos.w>=0?pos.w+'px':0,height:pos.h>=0?pos.h+'px':0});if(this.hasAlphaImageLoader)this.td[3].style.height=this.td[5].style.height=this.td[4].style.height;},destroy:function(hide){if(hide)this.table.style.visibility='hidden';else hs.discardElement(this.table);}};hs.Dimension=function(exp,dim){this.exp=exp;this.dim=dim;this.ucwh=dim=='x'?'Width':'Height';this.wh=this.ucwh.toLowerCase();this.uclt=dim=='x'?'Left':'Top';this.lt=this.uclt.toLowerCase();this.ucrb=dim=='x'?'Right':'Bottom';this.rb=this.ucrb.toLowerCase();this.p1=this.p2=0;};hs.Dimension.prototype={get:function(key){switch(key){case'loadingPos':return this.tpos+this.tb+(this.t-hs.loading['offset'+this.ucwh])/2;case'loadingPosXfade':return this.pos+this.cb+this.p1+(this.size-hs.loading['offset'+this.ucwh])/2;case'wsize':return this.size+2*this.cb+this.p1+this.p2;case'fitsize':return this.clientSize-this.marginMin-this.marginMax;case'maxsize':return this.get('fitsize')-2*this.cb-this.p1-this.p2;case'opos':return this.pos-(this.exp.outline?this.exp.outline.offset:0);case'osize':return this.get('wsize')+(this.exp.outline?2*this.exp.outline.offset:0);case'imgPad':return this.imgSize?Math.round((this.size-this.imgSize)/2):0;}},calcBorders:function(){this.cb=(this.exp.content['offset'+this.ucwh]-this.t)/2;this.marginMax=hs['margin'+this.ucrb];},calcThumb:function(){this.t=this.exp.el[this.wh]?parseInt(this.exp.el[this.wh]):this.exp.el['offset'+this.ucwh];this.tpos=this.exp.tpos[this.dim];this.tb=(this.exp.el['offset'+this.ucwh]-this.t)/2;if(this.tpos==0||this.tpos==-1){this.tpos=(hs.page[this.wh]/2)+hs.page['scroll'+this.uclt];};},calcExpanded:function(){var exp=this.exp;this.justify='auto';if(exp.align=='center')this.justify='center';else if(new RegExp(this.lt).test(exp.anchor))this.justify=null;else if(new RegExp(this.rb).test(exp.anchor))this.justify='max';this.pos=this.tpos-this.cb+this.tb;if(this.maxHeight&&this.dim=='x')
exp.maxWidth=Math.min(exp.maxWidth||this.full,exp.maxHeight*this.full/exp.y.full);this.size=Math.min(this.full,exp['max'+this.ucwh]||this.full);this.minSize=exp.allowSizeReduction?Math.min(exp['min'+this.ucwh],this.full):this.full;if(exp.isImage&&exp.useBox){this.size=exp[this.wh];this.imgSize=this.full;}
if(this.dim=='x'&&hs.padToMinWidth)this.minSize=exp.minWidth;this.target=exp['target'+this.dim.toUpperCase()];this.marginMin=hs['margin'+this.uclt];this.scroll=hs.page['scroll'+this.uclt];this.clientSize=hs.page[this.wh];},setSize:function(i){var exp=this.exp;if(exp.isImage&&(exp.useBox||hs.padToMinWidth)){this.imgSize=i;this.size=Math.max(this.size,this.imgSize);exp.content.style[this.lt]=this.get('imgPad')+'px';}else
this.size=i;exp.content.style[this.wh]=i+'px';exp.wrapper.style[this.wh]=this.get('wsize')+'px';if(exp.outline)exp.outline.setPosition();if(exp.releaseMask)exp.releaseMask.style[this.wh]=i+'px';if(this.dim=='y'&&exp.iDoc&&exp.body.style.height!='auto')try{exp.iDoc.body.style.overflow='auto';}catch(e){}
if(exp.isHtml){var d=exp.scrollerDiv;if(this.sizeDiff===undefined)
this.sizeDiff=exp.innerContent['offset'+this.ucwh]-d['offset'+this.ucwh];d.style[this.wh]=(this.size-this.sizeDiff)+'px';if(this.dim=='x')exp.mediumContent.style.width='auto';if(exp.body)exp.body.style[this.wh]='auto';}
if(this.dim=='x'&&exp.overlayBox)exp.sizeOverlayBox(true);if(this.dim=='x'&&exp.slideshow&&exp.isImage){if(i==this.full)exp.slideshow.disable('full-expand');else exp.slideshow.enable('full-expand');}},setPos:function(i){this.pos=i;this.exp.wrapper.style[this.lt]=i+'px';if(this.exp.outline)this.exp.outline.setPosition();}};hs.Expander=function(a,params,custom,contentType){if(document.readyState&&hs.ie&&!hs.isReady){hs.addEventListener(document,'ready',function(){new hs.Expander(a,params,custom,contentType);});return;}
this.a=a;this.custom=custom;this.contentType=contentType||'image';this.isHtml=(contentType=='html');this.isImage=!this.isHtml;hs.continuePreloading=false;this.overlays=[];this.last=hs.last;hs.last=null;hs.init();var key=this.key=hs.expanders.length;for(var i=0;i<hs.overrides.length;i++){var name=hs.overrides[i];this[name]=params&&typeof params[name]!='undefined'?params[name]:hs[name];}
if(!this.src)this.src=a.href;var el=(params&&params.thumbnailId)?hs.$(params.thumbnailId):a;el=this.thumb=el.getElementsByTagName('img')[0]||el;this.thumbsUserSetId=el.id||a.id;if(!hs.fireEvent(this,'onInit'))return true;for(var i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].a==a&&!(this.last&&this.transitions[1]=='crossfade')){hs.expanders[i].focus();return false;}}
if(!hs.allowSimultaneousLoading)for(var i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb!=el&&!hs.expanders[i].onLoadStarted){hs.expanders[i].cancelLoading();}}
hs.expanders[key]=this;if(!hs.allowMultipleInstances&&!hs.upcoming){if(hs.expanders[key-1])hs.expanders[key-1].close();if(typeof hs.focusKey!='undefined'&&hs.expanders[hs.focusKey])
hs.expanders[hs.focusKey].close();}
this.el=el;this.tpos=hs.getPosition(el);hs.getPageSize();var x=this.x=new hs.Dimension(this,'x');x.calcThumb();var y=this.y=new hs.Dimension(this,'y');y.calcThumb();if(/area/i.test(el.tagName))this.getImageMapAreaCorrection(el);this.wrapper=hs.createElement('div',{id:'highslide-wrapper-'+this.key,className:'highslide-wrapper '+this.wrapperClassName},{visibility:'hidden',position:'absolute',zIndex:hs.zIndexCounter+=2},null,true);this.wrapper.onmouseover=this.wrapper.onmouseout=hs.wrapperMouseHandler;if(this.contentType=='image'&&this.outlineWhileAnimating==2)
this.outlineWhileAnimating=0;if(!this.outlineType||(this.last&&this.isImage&&this.transitions[1]=='crossfade')){this[this.contentType+'Create']();}else if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+'Create']();}else{this.showLoading();var exp=this;new hs.Outline(this.outlineType,function(){exp.connectOutline();exp[exp.contentType+'Create']();});}
return true;};hs.Expander.prototype={error:function(e){window.location.href=this.src;},connectOutline:function(){var outline=this.outline=hs.pendingOutlines[this.outlineType];outline.exp=this;outline.table.style.zIndex=this.wrapper.style.zIndex-1;hs.pendingOutlines[this.outlineType]=null;},showLoading:function(){if(this.onLoadStarted||this.loading)return;this.loading=hs.loading;var exp=this;this.loading.onclick=function(){exp.cancelLoading();};if(!hs.fireEvent(this,'onShowLoading'))return;var exp=this,l=this.x.get('loadingPos')+'px',t=this.y.get('loadingPos')+'px';if(!tgt&&this.last&&this.transitions[1]=='crossfade')
var tgt=this.last;if(tgt){l=tgt.x.get('loadingPosXfade')+'px';t=tgt.y.get('loadingPosXfade')+'px';this.loading.style.zIndex=hs.zIndexCounter++;}
setTimeout(function(){if(exp.loading)hs.setStyles(exp.loading,{left:l,top:t,zIndex:hs.zIndexCounter++})},100);},imageCreate:function(){var exp=this;var img=document.createElement('img');this.content=img;img.onload=function(){if(hs.expanders[exp.key])exp.contentLoaded();};if(hs.blockRightClick)img.oncontextmenu=function(){return false;};img.className='highslide-image';hs.setStyles(img,{visibility:'hidden',display:'block',position:'absolute',maxWidth:'9999px',zIndex:3});img.title=hs.lang.restoreTitle;if(hs.safari)hs.container.appendChild(img);if(hs.ie&&hs.flushImgSize)img.src=null;img.src=this.src;this.showLoading();},htmlCreate:function(){if(!hs.fireEvent(this,'onBeforeGetContent'))return;this.content=hs.getCacheBinding(this.a);if(!this.content)
this.content=hs.getNode(this.contentId);if(!this.content)
this.content=hs.getSelfRendered();this.getInline(['maincontent']);if(this.maincontent){var body=hs.getElementByClass(this.content,'div','highslide-body');if(body)body.appendChild(this.maincontent);this.maincontent.style.display='block';}
hs.fireEvent(this,'onAfterGetContent');var innerContent=this.innerContent=this.content;if(/(swf|iframe)/.test(this.objectType))this.setObjContainerSize(innerContent);hs.container.appendChild(this.wrapper);hs.setStyles(this.wrapper,{position:'static',padding:'0 '+hs.marginRight+'px 0 '+hs.marginLeft+'px'});this.content=hs.createElement('div',{className:'highslide-html'},{position:'relative',zIndex:3,overflow:'hidden'},this.wrapper);this.mediumContent=hs.createElement('div',null,null,this.content,1);this.mediumContent.appendChild(innerContent);hs.setStyles(innerContent,{position:'relative',display:'block',direction:hs.lang.cssDirection||''});if(this.width)innerContent.style.width=this.width+'px';if(this.height)hs.setStyles(innerContent,{height:this.height+'px',overflow:'hidden'});if(innerContent.offsetWidth<this.minWidth)
innerContent.style.width=this.minWidth+'px';if(this.objectType=='ajax'&&!hs.getCacheBinding(this.a)){this.showLoading();var exp=this;var ajax=new hs.Ajax(this.a,innerContent);ajax.src=this.src;ajax.onLoad=function(){if(hs.expanders[exp.key])exp.contentLoaded();};ajax.onError=function(){location.href=exp.src;};ajax.run();}
else
if(this.objectType=='iframe'&&this.objectLoadTime=='before'){this.writeExtendedContent();}
else
this.contentLoaded();},contentLoaded:function(){try{if(!this.content)return;this.content.onload=null;if(this.onLoadStarted)return;else this.onLoadStarted=true;var x=this.x,y=this.y;if(this.loading){hs.setStyles(this.loading,{top:'-9999px'});this.loading=null;hs.fireEvent(this,'onHideLoading');}
if(this.isImage){x.full=this.content.width;y.full=this.content.height;hs.setStyles(this.content,{width:x.t+'px',height:y.t+'px'});this.wrapper.appendChild(this.content);hs.container.appendChild(this.wrapper);}else if(this.htmlGetSize)this.htmlGetSize();x.calcBorders();y.calcBorders();hs.setStyles(this.wrapper,{left:(x.tpos+x.tb-x.cb)+'px',top:(y.tpos+x.tb-y.cb)+'px'});this.initSlideshow();this.getOverlays();var ratio=x.full/y.full;x.calcExpanded();this.justify(x);y.calcExpanded();this.justify(y);if(this.isHtml)this.htmlSizeOperations();if(this.overlayBox)this.sizeOverlayBox(0,1);if(this.allowSizeReduction){if(this.isImage)
this.correctRatio(ratio);else this.fitOverlayBox();var ss=this.slideshow;if(ss&&this.last&&ss.controls&&ss.fixedControls){var pos=ss.overlayOptions.position||'',p;for(var dim in hs.oPos)for(var i=0;i<5;i++){p=this[dim];if(pos.match(hs.oPos[dim][i])){p.pos=this.last[dim].pos
+(this.last[dim].p1-p.p1)
+(this.last[dim].size-p.size)*[0,0,.5,1,1][i];if(ss.fixedControls=='fit'){if(p.pos+p.size+p.p1+p.p2>p.scroll+p.clientSize-p.marginMax)
p.pos=p.scroll+p.clientSize-p.size-p.marginMin-p.marginMax-p.p1-p.p2;if(p.pos<p.scroll+p.marginMin)p.pos=p.scroll+p.marginMin;}}}}
if(this.isImage&&this.x.full>(this.x.imgSize||this.x.size)){this.createFullExpand();if(this.overlays.length==1)this.sizeOverlayBox();}}
this.show();}catch(e){this.error(e);}},setObjContainerSize:function(parent,auto){var c=hs.getElementByClass(parent,'DIV','highslide-body');if(/(iframe|swf)/.test(this.objectType)){if(this.objectWidth)c.style.width=this.objectWidth+'px';if(this.objectHeight)c.style.height=this.objectHeight+'px';}},writeExtendedContent:function(){if(this.hasExtendedContent)return;var exp=this;this.body=hs.getElementByClass(this.innerContent,'DIV','highslide-body');if(this.objectType=='iframe'){this.showLoading();var ruler=hs.clearing.cloneNode(1);this.body.appendChild(ruler);this.newWidth=this.innerContent.offsetWidth;if(!this.objectWidth)this.objectWidth=ruler.offsetWidth;var hDiff=this.innerContent.offsetHeight-this.body.offsetHeight,h=this.objectHeight||hs.page.height-hDiff-hs.marginTop-hs.marginBottom,onload=this.objectLoadTime=='before'?' onload="if (hs.expanders['+this.key+']) hs.expanders['+this.key+'].contentLoaded()" ':'';this.body.innerHTML+='<iframe name="hs'+(new Date()).getTime()+'" frameborder="0" key="'+this.key+'" '
+' style="width:'+this.objectWidth+'px; height:'+h+'px" '
+onload+' src="'+this.src+'" ></iframe>';this.ruler=this.body.getElementsByTagName('div')[0];this.iframe=this.body.getElementsByTagName('iframe')[0];if(this.objectLoadTime=='after')this.correctIframeSize();}
if(this.objectType=='swf'){this.body.id=this.body.id||'hs-flash-id-'+this.key;var a=this.swfOptions;if(!a.params)a.params={};if(typeof a.params.wmode=='undefined')a.params.wmode='transparent';if(swfobject)swfobject.embedSWF(this.src,this.body.id,this.objectWidth,this.objectHeight,a.version||'7',a.expressInstallSwfurl,a.flashvars,a.params,a.attributes);}
this.hasExtendedContent=true;},htmlGetSize:function(){if(this.iframe&&!this.objectHeight){this.iframe.style.height=this.body.style.height=this.getIframePageHeight()+'px';}
this.innerContent.appendChild(hs.clearing);if(!this.x.full)this.x.full=this.innerContent.offsetWidth;this.y.full=this.innerContent.offsetHeight;this.innerContent.removeChild(hs.clearing);if(hs.ie&&this.newHeight>parseInt(this.innerContent.currentStyle.height)){this.newHeight=parseInt(this.innerContent.currentStyle.height);}
hs.setStyles(this.wrapper,{position:'absolute',padding:'0'});hs.setStyles(this.content,{width:this.x.t+'px',height:this.y.t+'px'});},getIframePageHeight:function(){var h;try{var doc=this.iDoc=this.iframe.contentDocument||this.iframe.contentWindow.document;var clearing=doc.createElement('div');clearing.style.clear='both';doc.body.appendChild(clearing);h=clearing.offsetTop;if(hs.ie)h+=parseInt(doc.body.currentStyle.marginTop)
+parseInt(doc.body.currentStyle.marginBottom)-1;}catch(e){h=300;}
return h;},correctIframeSize:function(){var wDiff=this.innerContent.offsetWidth-this.ruler.offsetWidth;hs.discardElement(this.ruler);if(wDiff<0)wDiff=0;var hDiff=this.innerContent.offsetHeight-this.iframe.offsetHeight;if(this.iDoc&&!this.objectHeight&&!this.height&&this.y.size==this.y.full)try{this.iDoc.body.style.overflow='hidden';}catch(e){}
hs.setStyles(this.iframe,{width:Math.abs(this.x.size-wDiff)+'px',height:Math.abs(this.y.size-hDiff)+'px'});hs.setStyles(this.body,{width:this.iframe.style.width,height:this.iframe.style.height});this.scrollingContent=this.iframe;this.scrollerDiv=this.scrollingContent;},htmlSizeOperations:function(){this.setObjContainerSize(this.innerContent);if(this.objectType=='swf'&&this.objectLoadTime=='before')this.writeExtendedContent();if(this.x.size<this.x.full&&!this.allowWidthReduction)this.x.size=this.x.full;if(this.y.size<this.y.full&&!this.allowHeightReduction)this.y.size=this.y.full;this.scrollerDiv=this.innerContent;hs.setStyles(this.mediumContent,{position:'relative',width:this.x.size+'px'});hs.setStyles(this.innerContent,{border:'none',width:'auto',height:'auto'});var node=hs.getElementByClass(this.innerContent,'DIV','highslide-body');if(node&&!/(iframe|swf)/.test(this.objectType)){var cNode=node;node=hs.createElement(cNode.nodeName,null,{overflow:'hidden'},null,true);cNode.parentNode.insertBefore(node,cNode);node.appendChild(hs.clearing);node.appendChild(cNode);var wDiff=this.innerContent.offsetWidth-node.offsetWidth;var hDiff=this.innerContent.offsetHeight-node.offsetHeight;node.removeChild(hs.clearing);var kdeBugCorr=hs.safari||navigator.vendor=='KDE'?1:0;hs.setStyles(node,{width:(this.x.size-wDiff-kdeBugCorr)+'px',height:(this.y.size-hDiff)+'px',overflow:'auto',position:'relative'});if(kdeBugCorr&&cNode.offsetHeight>node.offsetHeight){node.style.width=(parseInt(node.style.width)+kdeBugCorr)+'px';}
this.scrollingContent=node;this.scrollerDiv=this.scrollingContent;}
if(this.iframe&&this.objectLoadTime=='before')this.correctIframeSize();if(!this.scrollingContent&&this.y.size<this.mediumContent.offsetHeight)this.scrollerDiv=this.content;if(this.scrollerDiv==this.content&&!this.allowWidthReduction&&!/(iframe|swf)/.test(this.objectType)){this.x.size+=17;}
if(this.scrollerDiv&&this.scrollerDiv.offsetHeight>this.scrollerDiv.parentNode.offsetHeight){setTimeout("try { hs.expanders["+this.key+"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",hs.expandDuration);}},getImageMapAreaCorrection:function(area){var c=area.coords.split(',');for(var i=0;i<c.length;i++)c[i]=parseInt(c[i]);if(area.shape.toLowerCase()=='circle'){this.x.tpos+=c[0]-c[2];this.y.tpos+=c[1]-c[2];this.x.t=this.y.t=2*c[2];}else{var maxX,maxY,minX=maxX=c[0],minY=maxY=c[1];for(var i=0;i<c.length;i++){if(i%2==0){minX=Math.min(minX,c[i]);maxX=Math.max(maxX,c[i]);}else{minY=Math.min(minY,c[i]);maxY=Math.max(maxY,c[i]);}}
this.x.tpos+=minX;this.x.t=maxX-minX;this.y.tpos+=minY;this.y.t=maxY-minY;}},justify:function(p,moveOnly){var tgtArr,tgt=p.target,dim=p==this.x?'x':'y';if(tgt&&tgt.match(/ /)){tgtArr=tgt.split(' ');tgt=tgtArr[0];}
if(tgt&&hs.$(tgt)){p.pos=hs.getPosition(hs.$(tgt))[dim];if(tgtArr&&tgtArr[1]&&tgtArr[1].match(/^[-]?[0-9]+px$/))
p.pos+=parseInt(tgtArr[1]);if(p.size<p.minSize)p.size=p.minSize;}else if(p.justify=='auto'||p.justify=='center'){var hasMovedMin=false;var allowReduce=p.exp.allowSizeReduction;if(p.justify=='center')
p.pos=Math.round(p.scroll+(p.clientSize+p.marginMin-p.marginMax-p.get('wsize'))/2);else
p.pos=Math.round(p.pos-((p.get('wsize')-p.t)/2));if(p.pos<p.scroll+p.marginMin){p.pos=p.scroll+p.marginMin;hasMovedMin=true;}
if(!moveOnly&&p.size<p.minSize){p.size=p.minSize;allowReduce=false;}
if(p.pos+p.get('wsize')>p.scroll+p.clientSize-p.marginMax){if(!moveOnly&&hasMovedMin&&allowReduce){p.size=Math.min(p.size,p.get(dim=='y'?'fitsize':'maxsize'));}else if(p.get('wsize')<p.get('fitsize')){p.pos=p.scroll+p.clientSize-p.marginMax-p.get('wsize');}else{p.pos=p.scroll+p.marginMin;if(!moveOnly&&allowReduce)p.size=p.get(dim=='y'?'fitsize':'maxsize');}}
if(!moveOnly&&p.size<p.minSize){p.size=p.minSize;allowReduce=false;}}else if(p.justify=='max'){p.pos=Math.floor(p.pos-p.size+p.t);}
if(p.pos<p.marginMin){var tmpMin=p.pos;p.pos=p.marginMin;if(allowReduce&&!moveOnly)p.size=p.size-(p.pos-tmpMin);}},correctRatio:function(ratio){var x=this.x,y=this.y,changed=false,xSize=Math.min(x.full,x.size),ySize=Math.min(y.full,y.size),useBox=(this.useBox||hs.padToMinWidth);if(xSize/ySize>ratio){xSize=ySize*ratio;if(xSize<x.minSize){xSize=x.minSize;ySize=xSize/ratio;}
changed=true;}else if(xSize/ySize<ratio){ySize=xSize/ratio;changed=true;}
if(hs.padToMinWidth&&x.full<x.minSize){x.imgSize=x.full;y.size=y.imgSize=y.full;}else if(this.useBox){x.imgSize=xSize;y.imgSize=ySize;}else{x.size=xSize;y.size=ySize;}
changed=this.fitOverlayBox(useBox?null:ratio,changed);if(useBox&&y.size<y.imgSize){y.imgSize=y.size;x.imgSize=y.size*ratio;}
if(changed||useBox){x.pos=x.tpos-x.cb+x.tb;x.minSize=x.size;this.justify(x,true);y.pos=y.tpos-y.cb+y.tb;y.minSize=y.size;this.justify(y,true);if(this.overlayBox)this.sizeOverlayBox();}},fitOverlayBox:function(ratio,changed){var x=this.x,y=this.y;if(this.overlayBox&&(this.isImage||this.allowHeightReduction)){while(y.size>this.minHeight&&x.size>this.minWidth&&y.get('wsize')>y.get('fitsize')){y.size-=10;if(ratio)x.size=y.size*ratio;this.sizeOverlayBox(0,1);changed=true;}}
return changed;},reflow:function(){if(this.scrollerDiv){var h=/iframe/i.test(this.scrollerDiv.tagName)?(this.getIframePageHeight()+1)+'px':'auto';if(this.body)this.body.style.height=h;this.scrollerDiv.style.height=h;this.y.setSize(this.innerContent.offsetHeight);}},show:function(){var x=this.x,y=this.y;this.doShowHide('hidden');hs.fireEvent(this,'onBeforeExpand');if(this.slideshow&&this.slideshow.thumbstrip)this.slideshow.thumbstrip.selectThumb();this.changeSize(1,{wrapper:{width:x.get('wsize'),height:y.get('wsize'),left:x.pos,top:y.pos},content:{left:x.p1+x.get('imgPad'),top:y.p1+y.get('imgPad'),width:x.imgSize||x.size,height:y.imgSize||y.size}},hs.expandDuration);},changeSize:function(up,to,dur){var trans=this.transitions,other=up?(this.last?this.last.a:null):hs.upcoming,t=(trans[1]&&other&&hs.getParam(other,'transitions')[1]==trans[1])?trans[1]:trans[0];if(this[t]&&t!='expand'){this[t](up,to);return;}
if(this.outline&&!this.outlineWhileAnimating){if(up)this.outline.setPosition();else this.outline.destroy((this.isHtml&&this.preserveContent));}
if(!up)this.destroyOverlays();var exp=this,x=exp.x,y=exp.y,easing=this.easing;if(!up)easing=this.easingClose||easing;var after=up?function(){if(exp.outline)exp.outline.table.style.visibility="visible";setTimeout(function(){exp.afterExpand();},50);}:function(){exp.afterClose();};if(up)hs.setStyles(this.wrapper,{width:x.t+'px',height:y.t+'px'});if(up&&this.isHtml){hs.setStyles(this.wrapper,{left:(x.tpos-x.cb+x.tb)+'px',top:(y.tpos-y.cb+y.tb)+'px'});}
if(this.fadeInOut){hs.setStyles(this.wrapper,{opacity:up?0:1});hs.extend(to.wrapper,{opacity:up});}
hs.animate(this.wrapper,to.wrapper,{duration:dur,easing:easing,step:function(val,args){if(exp.outline&&exp.outlineWhileAnimating&&args.prop=='top'){var fac=up?args.pos:1-args.pos;var pos={w:x.t+(x.get('wsize')-x.t)*fac,h:y.t+(y.get('wsize')-y.t)*fac,x:x.tpos+(x.pos-x.tpos)*fac,y:y.tpos+(y.pos-y.tpos)*fac};exp.outline.setPosition(pos,0,1);}
if(exp.isHtml){if(args.prop=='left')
exp.mediumContent.style.left=(x.pos-val)+'px';if(args.prop=='top')
exp.mediumContent.style.top=(y.pos-val)+'px';}}});hs.animate(this.content,to.content,dur,easing,after);if(up){this.wrapper.style.visibility='visible';this.content.style.visibility='visible';if(this.isHtml)this.innerContent.style.visibility='visible';this.a.className+=' highslide-active-anchor';}},fade:function(up,to){this.outlineWhileAnimating=false;var exp=this,t=up?hs.expandDuration:0;if(up){hs.animate(this.wrapper,to.wrapper,0);hs.setStyles(this.wrapper,{opacity:0,visibility:'visible'});hs.animate(this.content,to.content,0);this.content.style.visibility='visible';hs.animate(this.wrapper,{opacity:1},t,null,function(){exp.afterExpand();});}
if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex;var dir=up||-1,offset=this.outline.offset,startOff=up?3:offset,endOff=up?offset:3;for(var i=startOff;dir*i<=dir*endOff;i+=dir,t+=25){(function(){var o=up?endOff-i:startOff-i;setTimeout(function(){exp.outline.setPosition(0,o,1);},t);})();}}
if(up){}
else{setTimeout(function(){if(exp.outline)exp.outline.destroy(exp.preserveContent);exp.destroyOverlays();hs.animate(exp.wrapper,{opacity:0},hs.restoreDuration,null,function(){exp.afterClose();});},t);}},crossfade:function(up,to,from){if(!up)return;var exp=this,last=this.last,x=this.x,y=this.y,lastX=last.x,lastY=last.y,wrapper=this.wrapper,content=this.content,overlayBox=this.overlayBox;hs.removeEventListener(document,'mousemove',hs.dragHandler);hs.setStyles(content,{width:(x.imgSize||x.size)+'px',height:(y.imgSize||y.size)+'px'});if(overlayBox)overlayBox.style.overflow='visible';this.outline=last.outline;if(this.outline)this.outline.exp=exp;last.outline=null;var fadeBox=hs.createElement('div',{className:'highslide-image'},{position:'absolute',zIndex:4,overflow:'hidden',display:'none'});var names={oldImg:last,newImg:this};for(var n in names){this[n]=names[n].content.cloneNode(1);hs.setStyles(this[n],{position:'absolute',border:0,visibility:'visible'});fadeBox.appendChild(this[n]);}
wrapper.appendChild(fadeBox);if(this.isHtml)hs.setStyles(this.mediumContent,{left:0,top:0});if(overlayBox){overlayBox.className='';wrapper.appendChild(overlayBox);}
fadeBox.style.display='';last.content.style.display='none';if(hs.safari){var match=navigator.userAgent.match(/Safari\/([0-9]{3})/);if(match&&parseInt(match[1])<525)this.wrapper.style.visibility='visible';}
hs.animate(wrapper,{width:x.size},{duration:hs.transitionDuration,step:function(val,args){var pos=args.pos,invPos=1-pos;var prop,size={},props=['pos','size','p1','p2'];for(var n in props){prop=props[n];size['x'+prop]=Math.round(invPos*lastX[prop]+pos*x[prop]);size['y'+prop]=Math.round(invPos*lastY[prop]+pos*y[prop]);size.ximgSize=Math.round(invPos*(lastX.imgSize||lastX.size)+pos*(x.imgSize||x.size));size.ximgPad=Math.round(invPos*lastX.get('imgPad')+pos*x.get('imgPad'));size.yimgSize=Math.round(invPos*(lastY.imgSize||lastY.size)+pos*(y.imgSize||y.size));size.yimgPad=Math.round(invPos*lastY.get('imgPad')+pos*y.get('imgPad'));}
if(exp.outline)exp.outline.setPosition({x:size.xpos,y:size.ypos,w:size.xsize+size.xp1+size.xp2+2*x.cb,h:size.ysize+size.yp1+size.yp2+2*y.cb});last.wrapper.style.clip='rect('
+(size.ypos-lastY.pos)+'px, '
+(size.xsize+size.xp1+size.xp2+size.xpos+2*lastX.cb-lastX.pos)+'px, '
+(size.ysize+size.yp1+size.yp2+size.ypos+2*lastY.cb-lastY.pos)+'px, '
+(size.xpos-lastX.pos)+'px)';hs.setStyles(content,{top:(size.yp1+y.get('imgPad'))+'px',left:(size.xp1+x.get('imgPad'))+'px',marginTop:(y.pos-size.ypos)+'px',marginLeft:(x.pos-size.xpos)+'px'});hs.setStyles(wrapper,{top:size.ypos+'px',left:size.xpos+'px',width:(size.xp1+size.xp2+size.xsize+2*x.cb)+'px',height:(size.yp1+size.yp2+size.ysize+2*y.cb)+'px'});hs.setStyles(fadeBox,{width:(size.ximgSize||size.xsize)+'px',height:(size.yimgSize||size.ysize)+'px',left:(size.xp1+size.ximgPad)+'px',top:(size.yp1+size.yimgPad)+'px',visibility:'visible'});hs.setStyles(exp.oldImg,{top:(lastY.pos-size.ypos+lastY.p1-size.yp1+lastY.get('imgPad')-size.yimgPad)+'px',left:(lastX.pos-size.xpos+lastX.p1-size.xp1+lastX.get('imgPad')-size.ximgPad)+'px'});hs.setStyles(exp.newImg,{opacity:pos,top:(y.pos-size.ypos+y.p1-size.yp1+y.get('imgPad')-size.yimgPad)+'px',left:(x.pos-size.xpos+x.p1-size.xp1+x.get('imgPad')-size.ximgPad)+'px'});if(overlayBox)hs.setStyles(overlayBox,{width:size.xsize+'px',height:size.ysize+'px',left:(size.xp1+x.cb)+'px',top:(size.yp1+y.cb)+'px'});},complete:function(){wrapper.style.visibility=content.style.visibility='visible';content.style.display='block';fadeBox.style.display='none';exp.a.className+=' highslide-active-anchor';exp.afterExpand();last.afterClose();exp.last=null;}});},reuseOverlay:function(o,el){if(!this.last)return false;for(var i=0;i<this.last.overlays.length;i++){var oDiv=hs.$('hsId'+this.last.overlays[i]);if(oDiv&&oDiv.hsId==o.hsId){this.genOverlayBox();oDiv.reuse=this.key;hs.push(this.overlays,this.last.overlays[i]);return true;}}
return false;},afterExpand:function(){this.isExpanded=true;this.focus();if(this.isHtml&&this.objectLoadTime=='after')this.writeExtendedContent();if(this.iframe){try{var exp=this,doc=this.iframe.contentDocument||this.iframe.contentWindow.document;hs.addEventListener(doc,'mousedown',function(){if(hs.focusKey!=exp.key)exp.focus();});}catch(e){}
if(hs.ie&&typeof this.isClosing!='boolean')
this.iframe.style.width=(this.objectWidth-1)+'px';}
if(this.dimmingOpacity)hs.dim(this);if(hs.upcoming&&hs.upcoming==this.a)hs.upcoming=null;this.prepareNextOutline();var p=hs.page,mX=hs.mouse.x+p.scrollLeft,mY=hs.mouse.y+p.scrollTop;this.mouseIsOver=this.x.pos<mX&&mX<this.x.pos+this.x.get('wsize')&&this.y.pos<mY&&mY<this.y.pos+this.y.get('wsize');if(this.overlayBox)this.showOverlays();hs.fireEvent(this,'onAfterExpand');},prepareNextOutline:function(){var key=this.key;var outlineType=this.outlineType;new hs.Outline(outlineType,function(){try{hs.expanders[key].preloadNext();}catch(e){}});},preloadNext:function(){var next=this.getAdjacentAnchor(1);if(next&&next.onclick.toString().match(/hs\.expand/))
var img=hs.createElement('img',{src:hs.getSrc(next)});},getAdjacentAnchor:function(op){var current=this.getAnchorIndex(),as=hs.anchors.groups[this.slideshowGroup||'none'];if(!as[current+op]&&this.slideshow&&this.slideshow.repeat){if(op==1)return as[0];else if(op==-1)return as[as.length-1];}
return as[current+op]||null;},getAnchorIndex:function(){var arr=hs.getAnchors().groups[this.slideshowGroup||'none'];if(arr)for(var i=0;i<arr.length;i++){if(arr[i]==this.a)return i;}
return null;},getNumber:function(){if(this[this.numberPosition]){var arr=hs.anchors.groups[this.slideshowGroup||'none'];if(arr){var s=hs.lang.number.replace('%1',this.getAnchorIndex()+1).replace('%2',arr.length);this[this.numberPosition].innerHTML='<div class="highslide-number">'+s+'</div>'+this[this.numberPosition].innerHTML;}}},initSlideshow:function(){if(!this.last){for(var i=0;i<hs.slideshows.length;i++){var ss=hs.slideshows[i],sg=ss.slideshowGroup;if(typeof sg=='undefined'||sg===null||sg===this.slideshowGroup)
this.slideshow=new hs.Slideshow(this.key,ss);}}else{this.slideshow=this.last.slideshow;}
var ss=this.slideshow;if(!ss)return;var key=ss.expKey=this.key;ss.checkFirstAndLast();ss.disable('full-expand');if(ss.controls){var o=ss.overlayOptions||{};o.overlayId=ss.controls;o.hsId='controls';this.createOverlay(o);}
if(ss.thumbstrip)ss.thumbstrip.add(this);if(!this.last&&this.autoplay)ss.play(true);if(ss.autoplay){ss.autoplay=setTimeout(function(){hs.next(key);},(ss.interval||500));}},cancelLoading:function(){hs.discardElement(this.wrapper);hs.expanders[this.key]=null;if(hs.upcoming==this.a)hs.upcoming=null;hs.undim(this.key);if(this.loading)hs.loading.style.left='-9999px';hs.fireEvent(this,'onHideLoading');},writeCredits:function(){if(this.credits)return;this.credits=hs.createElement('a',{href:hs.creditsHref,target:hs.creditsTarget,className:'highslide-credits',innerHTML:hs.lang.creditsText,title:hs.lang.creditsTitle});this.createOverlay({overlayId:this.credits,position:this.creditsPosition||'top left',hsId:'credits'});},getInline:function(types,addOverlay){for(var i=0;i<types.length;i++){var type=types[i],s=null;if(type=='caption'&&!hs.fireEvent(this,'onBeforeGetCaption'))return;else if(type=='heading'&&!hs.fireEvent(this,'onBeforeGetHeading'))return;if(!this[type+'Id']&&this.thumbsUserSetId)
this[type+'Id']=type+'-for-'+this.thumbsUserSetId;if(this[type+'Id'])this[type]=hs.getNode(this[type+'Id']);if(!this[type]&&!this[type+'Text']&&this[type+'Eval'])try{s=eval(this[type+'Eval']);}catch(e){}
if(!this[type]&&this[type+'Text']){s=this[type+'Text'];}
if(!this[type]&&!s){this[type]=hs.getNode(this.a['_'+type+'Id']);if(!this[type]){var next=this.a.nextSibling;while(next&&!hs.isHsAnchor(next)){if((new RegExp('highslide-'+type)).test(next.className||null)){if(!next.id)this.a['_'+type+'Id']=next.id='hsId'+hs.idCounter++;this[type]=hs.getNode(next.id);break;}
next=next.nextSibling;}}}
if(!this[type]&&!s&&this.numberPosition==type)s='\n';if(!this[type]&&s)this[type]=hs.createElement('div',{className:'highslide-'+type,innerHTML:s});if(addOverlay&&this[type]){var o={position:(type=='heading')?'above':'below'};for(var x in this[type+'Overlay'])o[x]=this[type+'Overlay'][x];o.overlayId=this[type];this.createOverlay(o);}}},doShowHide:function(visibility){if(hs.hideSelects)this.showHideElements('SELECT',visibility);if(hs.hideIframes)this.showHideElements('IFRAME',visibility);if(hs.geckoMac)this.showHideElements('*',visibility);},showHideElements:function(tagName,visibility){var els=document.getElementsByTagName(tagName);var prop=tagName=='*'?'overflow':'visibility';for(var i=0;i<els.length;i++){if(prop=='visibility'||(document.defaultView.getComputedStyle(els[i],"").getPropertyValue('overflow')=='auto'||els[i].getAttribute('hidden-by')!=null)){var hiddenBy=els[i].getAttribute('hidden-by');if(visibility=='visible'&&hiddenBy){hiddenBy=hiddenBy.replace('['+this.key+']','');els[i].setAttribute('hidden-by',hiddenBy);if(!hiddenBy)els[i].style[prop]=els[i].origProp;}else if(visibility=='hidden'){var elPos=hs.getPosition(els[i]);elPos.w=els[i].offsetWidth;elPos.h=els[i].offsetHeight;if(!this.dimmingOpacity){var clearsX=(elPos.x+elPos.w<this.x.get('opos')||elPos.x>this.x.get('opos')+this.x.get('osize'));var clearsY=(elPos.y+elPos.h<this.y.get('opos')||elPos.y>this.y.get('opos')+this.y.get('osize'));}
var wrapperKey=hs.getWrapperKey(els[i]);if(!clearsX&&!clearsY&&wrapperKey!=this.key){if(!hiddenBy){els[i].setAttribute('hidden-by','['+this.key+']');els[i].origProp=els[i].style[prop];els[i].style[prop]='hidden';}else if(hiddenBy.indexOf('['+this.key+']')==-1){els[i].setAttribute('hidden-by',hiddenBy+'['+this.key+']');}}else if((hiddenBy=='['+this.key+']'||hs.focusKey==wrapperKey)&&wrapperKey!=this.key){els[i].setAttribute('hidden-by','');els[i].style[prop]=els[i].origProp||'';}else if(hiddenBy&&hiddenBy.indexOf('['+this.key+']')>-1){els[i].setAttribute('hidden-by',hiddenBy.replace('['+this.key+']',''));}}}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter+=2;for(var i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&i==hs.focusKey){var blurExp=hs.expanders[i];blurExp.content.className+=' highslide-'+blurExp.contentType+'-blur';if(blurExp.isImage){blurExp.content.style.cursor=hs.ie?'hand':'pointer';blurExp.content.title=hs.lang.focusTitle;}
hs.fireEvent(blurExp,'onBlur');}}
if(this.outline)this.outline.table.style.zIndex=this.wrapper.style.zIndex-1;this.content.className='highslide-'+this.contentType;if(this.isImage){this.content.title=hs.lang.restoreTitle;if(hs.restoreCursor){hs.styleRestoreCursor=window.opera?'pointer':'url('+hs.graphicsDir+hs.restoreCursor+'), pointer';if(hs.ie&&hs.uaVersion<6)hs.styleRestoreCursor='hand';this.content.style.cursor=hs.styleRestoreCursor;}}
hs.focusKey=this.key;hs.addEventListener(document,window.opera?'keypress':'keydown',hs.keyHandler);hs.fireEvent(this,'onFocus');},moveTo:function(x,y){this.x.setPos(x);this.y.setPos(y);},resize:function(e){var w,h,r=e.width/e.height;w=Math.max(e.width+e.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(w-this.x.full)<12)w=this.x.full;h=this.isHtml?e.height+e.dY:w/r;if(h<Math.min(this.minHeight,this.y.full)){h=Math.min(this.minHeight,this.y.full);if(this.isImage)w=h*r;}
this.resizeTo(w,h);},resizeTo:function(w,h){this.y.setSize(h);this.x.setSize(w);this.wrapper.style.height=this.y.get('wsize')+'px';},close:function(){if(this.isClosing||!this.isExpanded)return;if(this.transitions[1]=='crossfade'&&hs.upcoming){hs.getExpander(hs.upcoming).cancelLoading();hs.upcoming=null;}
if(!hs.fireEvent(this,'onBeforeClose'))return;this.isClosing=true;if(this.slideshow&&!hs.upcoming)this.slideshow.pause();hs.removeEventListener(document,window.opera?'keypress':'keydown',hs.keyHandler);try{if(this.isHtml)this.htmlPrepareClose();this.content.style.cursor='default';this.changeSize(0,{wrapper:{width:this.x.t,height:this.y.t,left:this.x.tpos-this.x.cb+this.x.tb,top:this.y.tpos-this.y.cb+this.y.tb},content:{left:0,top:0,width:this.x.t,height:this.y.t}},hs.restoreDuration);}catch(e){this.afterClose();}},htmlPrepareClose:function(){if(hs.geckoMac){if(!hs.mask)hs.mask=hs.createElement('div',null,{position:'absolute'},hs.container);hs.setStyles(hs.mask,{width:this.x.size+'px',height:this.y.size+'px',left:this.x.pos+'px',top:this.y.pos+'px',display:'block'});}
if(this.objectType=='swf')try{hs.$(this.body.id).StopPlay();}catch(e){}
if(this.objectLoadTime=='after'&&!this.preserveContent)this.destroyObject();if(this.scrollerDiv&&this.scrollerDiv!=this.scrollingContent)
this.scrollerDiv.style.overflow='hidden';},destroyObject:function(){if(hs.ie&&this.iframe)
try{this.iframe.contentWindow.document.body.innerHTML='';}catch(e){}
if(this.objectType=='swf')swfobject.removeSWF(this.body.id);this.body.innerHTML='';},sleep:function(){if(this.outline)this.outline.table.style.display='none';this.releaseMask=null;this.wrapper.style.display='none';hs.push(hs.sleeping,this);},awake:function(){try{hs.expanders[this.key]=this;if(!hs.allowMultipleInstances&&hs.focusKey!=this.key){try{hs.expanders[hs.focusKey].close();}catch(e){}}
var z=hs.zIndexCounter++,stl={display:'',zIndex:z};hs.setStyles(this.wrapper,stl);this.isClosing=false;var o=this.outline||0;if(o){if(!this.outlineWhileAnimating)stl.visibility='hidden';hs.setStyles(o.table,stl);}
if(this.slideshow){this.initSlideshow();}
this.show();}catch(e){}},createOverlay:function(o){var el=o.overlayId,relToVP=(o.relativeTo=='viewport'&&!/panel$/.test(o.position));if(typeof el=='string')el=hs.getNode(el);if(o.html)el=hs.createElement('div',{innerHTML:o.html});if(!el||typeof el=='string')return;if(!hs.fireEvent(this,'onCreateOverlay',{overlay:el}))return;el.style.display='block';o.hsId=o.hsId||o.overlayId;if(this.transitions[1]=='crossfade'&&this.reuseOverlay(o,el))return;this.genOverlayBox();var width=o.width&&/^[0-9]+(px|%)$/.test(o.width)?o.width:'auto';if(/^(left|right)panel$/.test(o.position)&&!/^[0-9]+px$/.test(o.width))width='200px';var overlay=hs.createElement('div',{id:'hsId'+hs.idCounter++,hsId:o.hsId},{position:'absolute',visibility:'hidden',width:width,direction:hs.lang.cssDirection||'',opacity:0},relToVP?hs.viewport:this.overlayBox,true);if(relToVP)overlay.hsKey=this.key;overlay.appendChild(el);hs.extend(overlay,{opacity:1,offsetX:0,offsetY:0,dur:(o.fade===0||o.fade===false||(o.fade==2&&hs.ie))?0:250});hs.extend(overlay,o);if(this.gotOverlays){this.positionOverlay(overlay);if(!overlay.hideOnMouseOut||this.mouseIsOver)
hs.animate(overlay,{opacity:overlay.opacity},overlay.dur);}
hs.push(this.overlays,hs.idCounter-1);},positionOverlay:function(overlay){var p=overlay.position||'middle center',relToVP=(overlay.relativeTo=='viewport'),offX=overlay.offsetX,offY=overlay.offsetY;if(relToVP){hs.viewport.style.display='block';overlay.hsKey=this.key;if(overlay.offsetWidth>overlay.parentNode.offsetWidth)
overlay.style.width='100%';}else
if(overlay.parentNode!=this.overlayBox)this.overlayBox.appendChild(overlay);if(/left$/.test(p))overlay.style.left=offX+'px';if(/center$/.test(p))hs.setStyles(overlay,{left:'50%',marginLeft:(offX-Math.round(overlay.offsetWidth/2))+'px'});if(/right$/.test(p))overlay.style.right=-offX+'px';if(/^leftpanel$/.test(p)){hs.setStyles(overlay,{right:'100%',marginRight:this.x.cb+'px',top:-this.y.cb+'px',bottom:-this.y.cb+'px',overflow:'auto'});this.x.p1=overlay.offsetWidth;}else if(/^rightpanel$/.test(p)){hs.setStyles(overlay,{left:'100%',marginLeft:this.x.cb+'px',top:-this.y.cb+'px',bottom:-this.y.cb+'px',overflow:'auto'});this.x.p2=overlay.offsetWidth;}
var parOff=overlay.parentNode.offsetHeight;overlay.style.height='auto';if(relToVP&&overlay.offsetHeight>parOff)
overlay.style.height=hs.ieLt7?parOff+'px':'100%';if(/^top/.test(p))overlay.style.top=offY+'px';if(/^middle/.test(p))hs.setStyles(overlay,{top:'50%',marginTop:(offY-Math.round(overlay.offsetHeight/2))+'px'});if(/^bottom/.test(p))overlay.style.bottom=-offY+'px';if(/^above$/.test(p)){hs.setStyles(overlay,{left:(-this.x.p1-this.x.cb)+'px',right:(-this.x.p2-this.x.cb)+'px',bottom:'100%',marginBottom:this.y.cb+'px',width:'auto'});this.y.p1=overlay.offsetHeight;}else if(/^below$/.test(p)){hs.setStyles(overlay,{position:'relative',left:(-this.x.p1-this.x.cb)+'px',right:(-this.x.p2-this.x.cb)+'px',top:'100%',marginTop:this.y.cb+'px',width:'auto'});this.y.p2=overlay.offsetHeight;overlay.style.position='absolute';}},getOverlays:function(){this.getInline(['heading','caption'],true);this.getNumber();if(this.caption)hs.fireEvent(this,'onAfterGetCaption');if(this.heading)hs.fireEvent(this,'onAfterGetHeading');if(this.heading&&this.dragByHeading)this.heading.className+=' highslide-move';if(hs.showCredits)this.writeCredits();for(var i=0;i<hs.overlays.length;i++){var o=hs.overlays[i],tId=o.thumbnailId,sg=o.slideshowGroup;if((!tId&&!sg)||(tId&&tId==this.thumbsUserSetId)||(sg&&sg===this.slideshowGroup)){if(this.isImage||(this.isHtml&&o.useOnHtml))
this.createOverlay(o);}}
var os=[];for(var i=0;i<this.overlays.length;i++){var o=hs.$('hsId'+this.overlays[i]);if(/panel$/.test(o.position))this.positionOverlay(o);else hs.push(os,o);}
for(var i=0;i<os.length;i++)this.positionOverlay(os[i]);this.gotOverlays=true;},genOverlayBox:function(){if(!this.overlayBox)this.overlayBox=hs.createElement('div',{className:this.wrapperClassName},{position:'absolute',width:(this.x.size||(this.useBox?this.width:null)||this.x.full)+'px',height:(this.y.size||this.y.full)+'px',visibility:'hidden',overflow:'hidden',zIndex:hs.ie?4:'auto'},hs.container,true);},sizeOverlayBox:function(doWrapper,doPanels){var overlayBox=this.overlayBox,x=this.x,y=this.y;hs.setStyles(overlayBox,{width:x.size+'px',height:y.size+'px'});if(doWrapper||doPanels){for(var i=0;i<this.overlays.length;i++){var o=hs.$('hsId'+this.overlays[i]);var ie6=(hs.ieLt7||document.compatMode=='BackCompat');if(o&&/^(above|below)$/.test(o.position)){if(ie6){o.style.width=(overlayBox.offsetWidth+2*x.cb
+x.p1+x.p2)+'px';}
y[o.position=='above'?'p1':'p2']=o.offsetHeight;}
if(o&&ie6&&/^(left|right)panel$/.test(o.position)){o.style.height=(overlayBox.offsetHeight+2*y.cb)+'px';}}}
if(doWrapper){hs.setStyles(this.content,{top:y.p1+'px'});hs.setStyles(overlayBox,{top:(y.p1+y.cb)+'px'});}},showOverlays:function(){var b=this.overlayBox;b.className='';hs.setStyles(b,{top:(this.y.p1+this.y.cb)+'px',left:(this.x.p1+this.x.cb)+'px',overflow:'visible'});if(hs.safari)b.style.visibility='visible';this.wrapper.appendChild(b);for(var i=0;i<this.overlays.length;i++){var o=hs.$('hsId'+this.overlays[i]);o.style.zIndex=o.hsId=='controls'?5:4;if(!o.hideOnMouseOut||this.mouseIsOver){o.style.visibility='visible';hs.setStyles(o,{visibility:'visible',display:''});hs.animate(o,{opacity:o.opacity},o.dur);}}},destroyOverlays:function(){if(!this.overlays.length)return;if(this.slideshow){var c=this.slideshow.controls;if(c&&hs.getExpander(c)==this)c.parentNode.removeChild(c);}
for(var i=0;i<this.overlays.length;i++){var o=hs.$('hsId'+this.overlays[i]);if(o&&o.parentNode==hs.viewport&&hs.getExpander(o)==this)hs.discardElement(o);}
if(this.isHtml&&this.preserveContent){this.overlayBox.style.top='-9999px';hs.container.appendChild(this.overlayBox);}else
hs.discardElement(this.overlayBox);},createFullExpand:function(){if(this.slideshow&&this.slideshow.controls){this.slideshow.enable('full-expand');return;}
this.fullExpandLabel=hs.createElement('a',{href:'javascript:hs.expanders['+this.key+'].doFullExpand();',title:hs.lang.fullExpandTitle,className:'highslide-full-expand'});if(!hs.fireEvent(this,'onCreateFullExpand'))return;this.createOverlay({overlayId:this.fullExpandLabel,position:hs.fullExpandPosition,hideOnMouseOut:true,opacity:hs.fullExpandOpacity});},doFullExpand:function(){try{if(!hs.fireEvent(this,'onDoFullExpand'))return;if(this.fullExpandLabel)hs.discardElement(this.fullExpandLabel);this.focus();var xSize=this.x.size;this.resizeTo(this.x.full,this.y.full);var xpos=this.x.pos-(this.x.size-xSize)/2;if(xpos<hs.marginLeft)xpos=hs.marginLeft;this.moveTo(xpos,this.y.pos);this.doShowHide('hidden');}catch(e){this.error(e);}},afterClose:function(){this.a.className=this.a.className.replace('highslide-active-anchor','');this.doShowHide('visible');if(this.isHtml&&this.preserveContent&&this.transitions[1]!='crossfade'){this.sleep();}else{if(this.outline&&this.outlineWhileAnimating)this.outline.destroy();hs.discardElement(this.wrapper);}
if(hs.mask)hs.mask.style.display='none';this.destroyOverlays();if(!hs.viewport.childNodes.length)hs.viewport.style.display='none';if(this.dimmingOpacity)hs.undim(this.key);hs.fireEvent(this,'onAfterClose');hs.expanders[this.key]=null;hs.reOrder();}};hs.Ajax=function(a,content,pre){this.a=a;this.content=content;this.pre=pre;};hs.Ajax.prototype={run:function(){var xhr;if(!this.src)this.src=hs.getSrc(this.a);if(this.src.match('#')){var arr=this.src.split('#');this.src=arr[0];this.id=arr[1];}
if(hs.cachedGets[this.src]){this.cachedGet=hs.cachedGets[this.src];if(this.id)this.getElementContent();else this.loadHTML();return;}
try{xhr=new XMLHttpRequest();}
catch(e){try{xhr=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{xhr=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){this.onError();}}}
var pThis=this;xhr.onreadystatechange=function(){if(pThis.xhr.readyState==4){if(pThis.id)pThis.getElementContent();else pThis.loadHTML();}};var src=this.src;this.xhr=xhr;if(hs.forceAjaxReload)
src=src.replace(/$/,(/\?/.test(src)?'&':'?')+'dummy='+(new Date()).getTime());xhr.open('GET',src,true);xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.send(null);},getElementContent:function(){hs.init();var attribs=window.opera||hs.ie6SSL?{src:'about:blank'}:null;this.iframe=hs.createElement('iframe',attribs,{position:'absolute',top:'-9999px'},hs.container);this.loadHTML();},loadHTML:function(){var s=this.cachedGet||this.xhr.responseText,regBody;if(this.pre)hs.cachedGets[this.src]=s;if(!hs.ie||hs.uaVersion>=5.5){s=s.replace(new RegExp('<link[^>]*>','gi'),'').replace(new RegExp('<script[^>]*>.*?</script>','gi'),'');if(this.iframe){var doc=this.iframe.contentDocument;if(!doc&&this.iframe.contentWindow)doc=this.iframe.contentWindow.document;if(!doc){var pThis=this;setTimeout(function(){pThis.loadHTML();},25);return;}
doc.open();doc.write(s);doc.close();try{s=doc.getElementById(this.id).innerHTML;}catch(e){try{s=this.iframe.document.getElementById(this.id).innerHTML;}catch(e){}}
hs.discardElement(this.iframe);}else{regBody=/(<body[^>]*>|<\/body>)/ig;if(regBody.test(s))s=s.split(regBody)[hs.ie?1:2];}}
hs.getElementByClass(this.content,'DIV','highslide-body').innerHTML=s;this.onLoad();for(var x in this)this[x]=null;}};hs.Slideshow=function(expKey,options){if(hs.dynamicallyUpdateAnchors!==false)hs.updateAnchors();this.expKey=expKey;for(var x in options)this[x]=options[x];if(this.useControls)this.getControls();if(this.thumbstrip)this.thumbstrip=hs.Thumbstrip(this);};hs.Slideshow.prototype={getControls:function(){this.controls=hs.createElement('div',{innerHTML:hs.replaceLang(hs.skin.controls)},null,hs.container);var buttons=['play','pause','previous','next','move','full-expand','close'];this.btn={};var pThis=this;for(var i=0;i<buttons.length;i++){this.btn[buttons[i]]=hs.getElementByClass(this.controls,'li','highslide-'+buttons[i]);this.enable(buttons[i]);}
this.btn.pause.style.display='none';},checkFirstAndLast:function(){if(this.repeat||!this.controls)return;var exp=hs.expanders[this.expKey],cur=exp.getAnchorIndex(),re=/disabled$/;if(cur==0)
this.disable('previous');else if(re.test(this.btn.previous.getElementsByTagName('a')[0].className))
this.enable('previous');if(cur+1==hs.anchors.groups[exp.slideshowGroup||'none'].length){this.disable('next');this.disable('play');}else if(re.test(this.btn.next.getElementsByTagName('a')[0].className)){this.enable('next');this.enable('play');}},enable:function(btn){if(!this.btn)return;var sls=this,a=this.btn[btn].getElementsByTagName('a')[0],re=/disabled$/;a.onclick=function(){sls[btn]();return false;};if(re.test(a.className))a.className=a.className.replace(re,'');},disable:function(btn){if(!this.btn)return;var a=this.btn[btn].getElementsByTagName('a')[0];a.onclick=function(){return false;};if(!/disabled$/.test(a.className))a.className+=' disabled';},hitSpace:function(){if(this.autoplay)this.pause();else this.play();},play:function(wait){if(this.btn){this.btn.play.style.display='none';this.btn.pause.style.display='';}
this.autoplay=true;if(!wait)hs.next(this.expKey);},pause:function(){if(this.btn){this.btn.pause.style.display='none';this.btn.play.style.display='';}
clearTimeout(this.autoplay);this.autoplay=null;},previous:function(){this.pause();hs.previous(this.btn.previous);},next:function(){this.pause();hs.next(this.btn.next);},move:function(){},'full-expand':function(){hs.getExpander().doFullExpand();},close:function(){hs.close(this.btn.close);}};hs.Thumbstrip=function(slideshow){function add(exp){hs.extend(options||{},{overlayId:dom,hsId:'thumbstrip',className:'highslide-thumbstrip-'+mode+'-overlay '+(options.className||'')});if(hs.ieLt7)options.fade=0;exp.createOverlay(options);hs.setStyles(dom.parentNode,{overflow:'hidden'});};function scroll(delta){selectThumb(undefined,Math.round(delta*dom[isX?'offsetWidth':'offsetHeight']*0.7));};function selectThumb(i,scrollBy){if(i===undefined)for(var j=0;j<group.length;j++){if(group[j]==hs.expanders[slideshow.expKey].a){i=j;break;}}
if(i===undefined)return;var as=dom.getElementsByTagName('a'),active=as[i],cell=active.parentNode,left=isX?'Left':'Top',right=isX?'Right':'Bottom',width=isX?'Width':'Height',offsetLeft='offset'+left,offsetWidth='offset'+width,overlayWidth=div.parentNode.parentNode[offsetWidth],minTblPos=overlayWidth-table[offsetWidth],curTblPos=parseInt(table.style[isX?'left':'top'])||0,tblPos=curTblPos,mgnRight=20;if(scrollBy!==undefined){tblPos=curTblPos-scrollBy;if(minTblPos>0)minTblPos=0;if(tblPos>0)tblPos=0;if(tblPos<minTblPos)tblPos=minTblPos;}else{for(var j=0;j<as.length;j++)as[j].className='';active.className='highslide-active-anchor';var activeLeft=i>0?as[i-1].parentNode[offsetLeft]:cell[offsetLeft],activeRight=cell[offsetLeft]+cell[offsetWidth]+
(as[i+1]?as[i+1].parentNode[offsetWidth]:0);if(activeRight>overlayWidth-curTblPos)tblPos=overlayWidth-activeRight;else if(activeLeft<-curTblPos)tblPos=-activeLeft;}
var markerPos=cell[offsetLeft]+(cell[offsetWidth]-marker[offsetWidth])/2+tblPos;hs.animate(table,isX?{left:tblPos}:{top:tblPos},null,'easeOutQuad');hs.animate(marker,isX?{left:markerPos}:{top:markerPos},null,'easeOutQuad');scrollUp.style.display=tblPos<0?'block':'none';scrollDown.style.display=(tblPos>minTblPos)?'block':'none';};var group=hs.anchors.groups[hs.expanders[slideshow.expKey].slideshowGroup||'none'],options=slideshow.thumbstrip,mode=options.mode||'horizontal',floatMode=(mode=='float'),tree=floatMode?['div','ul','li','span']:['table','tbody','tr','td'],isX=(mode=='horizontal'),dom=hs.createElement('div',{className:'highslide-thumbstrip highslide-thumbstrip-'+mode,innerHTML:'<div class="highslide-thumbstrip-inner">'+'<'+tree[0]+'><'+tree[1]+'></'+tree[1]+'></'+tree[0]+'></div>'+'<div class="highslide-scroll-up"><div></div></div>'+'<div class="highslide-scroll-down"><div></div></div>'+'<div class="highslide-marker"><div></div></div>'},{display:'none'},hs.container),domCh=dom.childNodes,div=domCh[0],scrollUp=domCh[1],scrollDown=domCh[2],marker=domCh[3],table=div.firstChild,tbody=dom.getElementsByTagName(tree[1])[0],tr;for(var i=0;i<group.length;i++){if(i==0||!isX)tr=hs.createElement(tree[2],null,null,tbody);(function(){var a=group[i],cell=hs.createElement(tree[3],null,null,tr),pI=i;hs.createElement('a',{href:a.href,onclick:function(){hs.getExpander(this).focus();return hs.transit(a);},innerHTML:hs.stripItemFormatter?hs.stripItemFormatter(a):a.innerHTML},null,cell);})();}
if(!floatMode){scrollUp.onclick=function(){scroll(-1);};scrollDown.onclick=function(){scroll(1);};hs.addEventListener(tbody,document.onmousewheel!==undefined?'mousewheel':'DOMMouseScroll',function(e){var delta=0;e=e||window.event;if(e.wheelDelta){delta=e.wheelDelta/120;if(hs.opera)delta=-delta;}else if(e.detail){delta=-e.detail/3;}
if(delta)scroll(-delta*0.2);if(e.preventDefault)e.preventDefault();e.returnValue=false;});}
return{add:add,selectThumb:selectThumb}};hs.langDefaults=hs.lang;var HsExpander=hs.Expander;if(hs.ie){(function(){try{document.documentElement.doScroll('left');}catch(e){setTimeout(arguments.callee,50);return;}
hs.ready();})();}
hs.addEventListener(document,'DOMContentLoaded',hs.ready);hs.addEventListener(window,'load',hs.ready);hs.addEventListener(document,'ready',function(){if(hs.expandCursor||hs.dimmingOpacity){var style=hs.createElement('style',{type:'text/css'},null,document.getElementsByTagName('HEAD')[0]);function addRule(sel,dec){if(!hs.ie){style.appendChild(document.createTextNode(sel+" {"+dec+"}"));}else{var last=document.styleSheets[document.styleSheets.length-1];if(typeof(last.addRule)=="object")last.addRule(sel,dec);}}
function fix(prop){return'expression( ( ( ignoreMe = document.documentElement.'+prop+' ? document.documentElement.'+prop+' : document.body.'+prop+' ) ) + \'px\' );';}
if(hs.expandCursor)addRule('.highslide img','cursor: url('+hs.graphicsDir+hs.expandCursor+'), pointer !important;');addRule('.highslide-viewport-size',hs.ie&&(hs.uaVersion<7||document.compatMode=='BackCompat')?'position: absolute; '+'left:'+fix('scrollLeft')+'top:'+fix('scrollTop')+'width:'+fix('clientWidth')+'height:'+fix('clientHeight'):'position: fixed; width: 100%; height: 100%; left: 0; top: 0');}});hs.addEventListener(window,'resize',function(){hs.getPageSize();if(hs.viewport)for(var i=0;i<hs.viewport.childNodes.length;i++){var node=hs.viewport.childNodes[i],exp=hs.getExpander(node);exp.positionOverlay(node);if(node.hsId=='thumbstrip')exp.slideshow.thumbstrip.selectThumb();}});hs.addEventListener(document,'mousemove',function(e){hs.mouse={x:e.clientX,y:e.clientY};});hs.addEventListener(document,'mousedown',hs.mouseClickHandler);hs.addEventListener(document,'mouseup',hs.mouseClickHandler);hs.addEventListener(document,'ready',hs.setClickEvents);hs.addEventListener(window,'load',hs.preloadImages);hs.addEventListener(window,'load',hs.preloadAjax);}
hs.graphicsDir='/images/highslide/';hs.showCredits=false;hs.align='center';hs.transitions=['fade','crossfade'];hs.outlineType='rounded-white';hs.fadeInOut=true;hs.allowMultipleInstances=false;hs.addSlideshow({slideshowGroup:'slideshow_img',interval:5000,repeat:true,useControls:true,fixedControls:false,overlayOptions:{opacity:0.5,hideOnMouseOut:false,position:'bottom right',hideOnMouseOut:true}});
