//inizio di jquery
(function(j,s){function v(){if(!c.isReady){try{k.documentElement.doScroll("left")}catch(a){setTimeout(v,1);return}c.ready()}}function Q(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function M(a,b,e,g,f,o){var p=a.length;if(typeof b==="object"){for(var x in b)M(a,x,b[x],g,f,e);return a}if(e!==s){g=!o&&g&&c.isFunction(e);for(x=0;x<p;x++)f(a[x],b,g?e.call(a[x],x,f(a[x],b)):e,o);return a}return p?
f(a[0],b):s}function O(){return(new Date).getTime()}function Y(){return false}function da(){return true}function W(a,b,e){e[0].type=a;return c.event.handle.apply(b,e)}function Z(a){var b,e=[],g=[],f=arguments,o,p,x,t,y,K;p=c.data(this,"events");if(!(a.liveFired===this||!p||!p.live||a.button&&a.type==="click")){a.liveFired=this;var U=p.live.slice(0);for(t=0;t<U.length;t++){p=U[t];p.origType.replace(ua,"")===a.type?g.push(p.selector):U.splice(t--,1)}o=c(a.target).closest(g,a.currentTarget);y=0;for(K=
o.length;y<K;y++)for(t=0;t<U.length;t++){p=U[t];if(o[y].selector===p.selector){x=o[y].elem;g=null;if(p.preType==="mouseenter"||p.preType==="mouseleave")g=c(a.relatedTarget).closest(p.selector)[0];if(!g||g!==x)e.push({elem:x,handleObj:p})}}y=0;for(K=e.length;y<K;y++){o=e[y];a.currentTarget=o.elem;a.data=o.handleObj.data;a.handleObj=o.handleObj;if(o.handleObj.origHandler.apply(o.elem,f)===false){b=false;break}}return b}}function ha(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
"&")}function R(a,b){var e=0;b.each(function(){if(this.nodeName===(a[e]&&a[e].nodeName)){var g=c.data(a[e++]),f=c.data(this,g);if(g=g&&g.events){delete f.handle;f.events={};for(var o in g)for(var p in g[o])c.event.add(this,o,g[o][p],g[o][p].data)}}})}function ia(a,b,e){var g,f,o;b=b&&b[0]?b[0].ownerDocument||b[0]:k;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===k&&!Ja.test(a[0])&&(c.support.checkClone||!Ka.test(a[0]))){f=true;if(o=c.fragments[a[0]])if(o!==1)g=o}if(!g){g=b.createDocumentFragment();
c.clean(a,b,g,e)}if(f)c.fragments[a[0]]=o?g:1;return{fragment:g,cacheable:f}}function ga(a,b){var e={};c.each(La.concat.apply([],La.slice(0,b)),function(){e[this]=a});return e}function ka(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},aa=j.jQuery,S=j.$,k=j.document,ja,z=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,d=/^.[^:#\[\.,]*$/,h=/\S/,m=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,B=navigator.userAgent,
C=false,D=[],A,q=Object.prototype.toString,u=Object.prototype.hasOwnProperty,H=Array.prototype.push,N=Array.prototype.slice,J=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var e,g;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=k;this[0]=k.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((e=z.exec(a))&&(e[1]||!b))if(e[1]){g=b?b.ownerDocument||b:k;if(a=n.exec(a))if(c.isPlainObject(b)){a=[k.createElement(a[1])];
c.fn.attr.call(a,b,true)}else a=[g.createElement(a[1])];else{a=ia([e[1]],[g]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=k.getElementById(e[2])){if(b.id!==e[2])return ja.find(a);this.length=1;this[0]=b}this.context=k;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=k;a=k.getElementsByTagName(a);return c.merge(this,a)}else return!b||b.jquery?(b||ja).find(a):c(b).find(a);else if(c.isFunction(a))return ja.ready(a);
if(a.selector!==s){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return N.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,e){var g=c();c.isArray(a)?H.apply(g,a):c.merge(g,a);g.prevObject=this;g.context=this.context;if(b==="find")g.selector=this.selector+(this.selector?" ":"")+e;else if(b)g.selector=this.selector+"."+
b+"("+e+")";return g},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(k,c);else D&&D.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,e){return a.call(b,e,b)}))},end:function(){return this.prevObject||
c(null)},push:H,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,e=arguments.length,g=false,f,o,p,x;if(typeof a==="boolean"){g=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(e===b){a=this;--b}for(;b<e;b++)if((f=arguments[b])!=null)for(o in f){p=a[o];x=f[o];if(a!==x)if(g&&x&&(c.isPlainObject(x)||c.isArray(x))){p=p&&(c.isPlainObject(p)||c.isArray(p))?p:c.isArray(x)?[]:{};a[o]=c.extend(g,p,x)}else if(x!==s)a[o]=
x}return a};c.extend({noConflict:function(a){j.$=S;if(a)j.jQuery=aa;return c},isReady:false,ready:function(){if(!c.isReady){if(!k.body)return setTimeout(c.ready,13);c.isReady=true;if(D){for(var a,b=0;a=D[b++];)a.call(k,c);D=null}c.fn.triggerHandler&&c(k).triggerHandler("ready")}},bindReady:function(){if(!C){C=true;if(k.readyState==="complete")return c.ready();if(k.addEventListener){k.addEventListener("DOMContentLoaded",A,false);j.addEventListener("load",c.ready,false)}else if(k.attachEvent){k.attachEvent("onreadystatechange",
A);j.attachEvent("onload",c.ready);var a=false;try{a=j.frameElement==null}catch(b){}k.documentElement.doScroll&&a&&v()}}},isFunction:function(a){return q.call(a)==="[object Function]"},isArray:function(a){return q.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||q.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!u.call(a,"constructor")&&!u.call(a.constructor.prototype,"isPrototypeOf"))return false;for(var b in a);return b===s||u.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;
return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j.JSON&&j.JSON.parse?j.JSON.parse(a):(new Function("return "+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&h.test(a)){var b=k.getElementsByTagName("head")[0]||
k.documentElement,e=k.createElement("script");e.type="text/javascript";if(c.support.scriptEval)e.appendChild(k.createTextNode(a));else e.text=a;b.insertBefore(e,b.firstChild);b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,e){var g,f=0,o=a.length,p=o===s||c.isFunction(a);if(e)if(p)for(g in a){if(b.apply(a[g],e)===false)break}else for(;f<o;){if(b.apply(a[f++],e)===false)break}else if(p)for(g in a){if(b.call(a[g],g,a[g])===false)break}else for(e=
a[0];f<o&&b.call(e,f,e)!==false;e=a[++f]);return a},trim:function(a){return(a||"").replace(m,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?H.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var e=0,g=b.length;e<g;e++)if(b[e]===a)return e;return-1},merge:function(a,b){var e=a.length,g=0;if(typeof b.length==="number")for(var f=b.length;g<f;g++)a[e++]=b[g];else for(;b[g]!==
s;)a[e++]=b[g++];a.length=e;return a},grep:function(a,b,e){for(var g=[],f=0,o=a.length;f<o;f++)!e!==!b(a[f],f)&&g.push(a[f]);return g},map:function(a,b,e){for(var g=[],f,o=0,p=a.length;o<p;o++){f=b(a[o],o,e);if(f!=null)g[g.length]=f}return g.concat.apply([],g)},guid:1,proxy:function(a,b,e){if(arguments.length===2)if(typeof b==="string"){e=a;a=e[b];b=s}else if(b&&!c.isFunction(b)){e=b;b=s}if(!b&&a)b=function(){return a.apply(e||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},
uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});B=c.uaMatch(B);if(B.browser){c.browser[B.browser]=true;c.browser.version=B.version}if(c.browser.webkit)c.browser.safari=true;if(J)c.inArray=function(a,b){return J.call(b,a)};ja=c(k);if(k.addEventListener)A=function(){k.removeEventListener("DOMContentLoaded",
A,false);c.ready()};else if(k.attachEvent)A=function(){if(k.readyState==="complete"){k.detachEvent("onreadystatechange",A);c.ready()}};(function(){c.support={};var a=k.documentElement,b=k.createElement("script"),e=k.createElement("div"),g="script"+O();e.style.display="none";e.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=e.getElementsByTagName("*"),o=e.getElementsByTagName("a")[0];if(!(!f||!f.length||!o)){c.support=
{leadingWhitespace:e.firstChild.nodeType===3,tbody:!e.getElementsByTagName("tbody").length,htmlSerialize:!!e.getElementsByTagName("link").length,style:/red/.test(o.getAttribute("style")),hrefNormalized:o.getAttribute("href")==="/a",opacity:/^0.55$/.test(o.style.opacity),cssFloat:!!o.style.cssFloat,checkOn:e.getElementsByTagName("input")[0].value==="on",optSelected:k.createElement("select").appendChild(k.createElement("option")).selected,parentNode:e.removeChild(e.appendChild(k.createElement("div"))).parentNode===
null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(k.createTextNode("window."+g+"=1;"))}catch(p){}a.insertBefore(b,a.firstChild);if(j[g]){c.support.scriptEval=true;delete j[g]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(e.attachEvent&&e.fireEvent){e.attachEvent("onclick",function t(){c.support.noCloneEvent=false;e.detachEvent("onclick",t)});e.cloneNode(true).fireEvent("onclick")}e=k.createElement("div");
e.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=k.createDocumentFragment();a.appendChild(e.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var t=k.createElement("div");t.style.width=t.style.paddingLeft="1px";k.body.appendChild(t);c.boxModel=c.support.boxModel=t.offsetWidth===2;k.body.removeChild(t).style.display="none"});a=function(t){var y=k.createElement("div");t="on"+t;var K=t in y;if(!K){y.setAttribute(t,"return;");K=typeof y[t]===
"function"}return K};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=e=f=o=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var E="jQuery"+O(),L=0,X={};c.extend({cache:{},expando:E,noData:{embed:true,object:true,applet:true},data:function(a,b,e){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=
a==j?X:a;var g=a[E],f=c.cache;if(!g&&typeof b==="string"&&e===s)return null;g||(g=++L);if(typeof b==="object"){a[E]=g;f[g]=c.extend(true,{},b)}else if(!f[g]){a[E]=g;f[g]={}}a=f[g];if(e!==s)a[b]=e;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==j?X:a;var e=a[E],g=c.cache,f=g[e];if(b){if(f){delete f[b];c.isEmptyObject(f)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];else a.removeAttribute&&a.removeAttribute(c.expando);
delete g[e]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var e=a.split(".");e[1]=e[1]?"."+e[1]:"";if(b===s){var g=this.triggerHandler("getData"+e[1]+"!",[e[0]]);if(g===s&&this.length)g=c.data(this[0],a);return g===s&&e[1]?this.data(e[0]):g}else return this.trigger("setData"+e[1]+"!",[e[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,
a)})}});c.extend({queue:function(a,b,e){if(a){b=(b||"fx")+"queue";var g=c.data(a,b);if(!e)return g||[];if(!g||c.isArray(e))g=c.data(a,b,c.makeArray(e));else g.push(e);return g}},dequeue:function(a,b){b=b||"fx";var e=c.queue(a,b),g=e.shift();if(g==="inprogress")g=e.shift();if(g){b==="fx"&&e.unshift("inprogress");g.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===s)return c.queue(this[0],a);return this.each(function(){var e=c.queue(this,
a,b);a==="fx"&&e[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var e=this;setTimeout(function(){c.dequeue(e,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ba=/[\n\t]/g,la=/\s+/,ra=/\r/g,va=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,cb=/^(a|area)$/i,Ma=/radio|checkbox/;c.fn.extend({attr:function(a,
b){return M(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(y){var K=c(this);K.addClass(a.call(this,y,K.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(la),e=0,g=this.length;e<g;e++){var f=this[e];if(f.nodeType===1)if(f.className){for(var o=" "+f.className+" ",p=f.className,x=0,t=b.length;x<t;x++)if(o.indexOf(" "+b[x]+" ")<
0)p+=" "+b[x];f.className=c.trim(p)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(t){var y=c(this);y.removeClass(a.call(this,t,y.attr("class")))});if(a&&typeof a==="string"||a===s)for(var b=(a||"").split(la),e=0,g=this.length;e<g;e++){var f=this[e];if(f.nodeType===1&&f.className)if(a){for(var o=(" "+f.className+" ").replace(ba," "),p=0,x=b.length;p<x;p++)o=o.replace(" "+b[p]+" "," ");f.className=c.trim(o)}else f.className=""}return this},toggleClass:function(a,
b){var e=typeof a,g=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var o=c(this);o.toggleClass(a.call(this,f,o.attr("class"),b),b)});return this.each(function(){if(e==="string")for(var f,o=0,p=c(this),x=b,t=a.split(la);f=t[o++];){x=g?x:!p.hasClass(f);p[x?"addClass":"removeClass"](f)}else if(e==="undefined"||e==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=
" "+a+" ";for(var b=0,e=this.length;b<e;b++)if((" "+this[b].className+" ").replace(ba," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===s){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var e=b.selectedIndex,g=[],f=b.options;b=b.type==="select-one";if(e<0)return null;var o=b?e:0;for(e=b?e+1:f.length;o<e;o++){var p=f[o];if(p.selected){a=c(p).val();if(b)return a;g.push(a)}}return g}if(Ma.test(b.type)&&
!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(ra,"")}return s}var x=c.isFunction(a);return this.each(function(t){var y=c(this),K=a;if(this.nodeType===1){if(x)K=a.call(this,t,y.val());if(typeof K==="number")K+="";if(c.isArray(K)&&Ma.test(this.type))this.checked=c.inArray(y.val(),K)>=0;else if(c.nodeName(this,"select")){var U=c.makeArray(K);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),U)>=0});if(!U.length)this.selectedIndex=
-1}else this.value=K}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,e,g){if(!a||a.nodeType===3||a.nodeType===8)return s;if(g&&b in c.attrFn)return c(a)[b](e);g=a.nodeType!==1||!c.isXMLDoc(a);var f=e!==s;b=g&&c.props[b]||b;if(a.nodeType===1){var o=va.test(b);if(b in a&&g&&!o){if(f){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=e}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;
if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:s;return a[b]}if(!c.support.style&&g&&b==="style"){if(f)a.style.cssText=""+e;return a.style.cssText}f&&a.setAttribute(b,""+e);a=!c.support.hrefNormalized&&g&&o?a.getAttribute(b,2):a.getAttribute(b);return a===null?s:a}return c.style(a,b,e)}});var ua=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,e,g){if(!(a.nodeType===
3||a.nodeType===8)){if(a.setInterval&&a!==j&&!a.frameElement)a=j;var f,o;if(e.handler){f=e;e=f.handler}if(!e.guid)e.guid=c.guid++;if(o=c.data(a)){var p=o.events=o.events||{},x=o.handle;if(!x)o.handle=x=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(x.elem,arguments):s};x.elem=a;b=b.split(" ");for(var t,y=0,K;t=b[y++];){o=f?c.extend({},f):{handler:e,data:g};if(t.indexOf(".")>-1){K=t.split(".");t=K.shift();o.namespace=K.slice(0).sort().join(".")}else{K=[];o.namespace=
""}o.type=t;o.guid=e.guid;var U=p[t],ca=c.event.special[t]||{};if(!U){U=p[t]=[];if(!ca.setup||ca.setup.call(a,g,K,x)===false)if(a.addEventListener)a.addEventListener(t,x,false);else a.attachEvent&&a.attachEvent("on"+t,x)}if(ca.add){ca.add.call(a,o);if(!o.handler.guid)o.handler.guid=e.guid}U.push(o);c.event.global[t]=true}a=null}}},global:{},remove:function(a,b,e,g){if(!(a.nodeType===3||a.nodeType===8)){var f,o=0,p,x,t,y,K,U,ca=c.data(a),fa=ca&&ca.events;if(ca&&fa){if(b&&b.type){e=b.handler;b=b.type}if(!b||
typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in fa)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[o++];){y=f;p=f.indexOf(".")<0;x=[];if(!p){x=f.split(".");f=x.shift();t=RegExp("(^|\\.)"+c.map(x.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(K=fa[f])if(e){y=c.event.special[f]||{};for(ea=g||0;ea<K.length;ea++){U=K[ea];if(e.guid===U.guid){if(p||t.test(U.namespace)){g==null&&K.splice(ea--,1);y.remove&&y.remove.call(a,U)}if(g!=null)break}}if(K.length===0||g!=null&&K.length===1){if(!y.teardown||
y.teardown.call(a,x)===false)Na(a,f,ca.handle);delete fa[f]}}else for(var ea=0;ea<K.length;ea++){U=K[ea];if(p||t.test(U.namespace)){c.event.remove(a,y,U.handler,ea);K.splice(ea--,1)}}}if(c.isEmptyObject(fa)){if(b=ca.handle)b.elem=null;delete ca.events;delete ca.handle;c.isEmptyObject(ca)&&c.removeData(a)}}}}},trigger:function(a,b,e,g){var f=a.type||a;if(!g){a=typeof a==="object"?a[E]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!e){a.stopPropagation();
c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!e||e.nodeType===3||e.nodeType===8)return s;a.result=s;a.target=e;b=c.makeArray(b);b.unshift(a)}a.currentTarget=e;(g=c.data(e,"handle"))&&g.apply(e,b);g=e.parentNode||e.ownerDocument;try{if(!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()]))if(e["on"+f]&&e["on"+f].apply(e,b)===false)a.result=false}catch(o){}if(!a.isPropagationStopped()&&g)c.event.trigger(a,b,g,true);else if(!a.isDefaultPrevented()){g=
a.target;var p,x=c.nodeName(g,"a")&&f==="click",t=c.event.special[f]||{};if((!t._default||t._default.call(e,a)===false)&&!x&&!(g&&g.nodeName&&c.noData[g.nodeName.toLowerCase()])){try{if(g[f]){if(p=g["on"+f])g["on"+f]=null;c.event.triggered=true;g[f]()}}catch(y){}if(p)g["on"+f]=p;c.event.triggered=false}}},handle:function(a){var b,e,g,f;a=arguments[0]=c.event.fix(a||j.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();g=RegExp("(^|\\.)"+e.slice(0).sort().join("\\.(?:.*\\.)?")+
"(\\.|$)")}f=c.data(this,"events");e=f[a.type];if(f&&e){e=e.slice(0);f=0;for(var o=e.length;f<o;f++){var p=e[f];if(b||g.test(p.namespace)){a.handler=p.handler;a.data=p.data;a.handleObj=p;p=p.handler.apply(this,arguments);if(p!==s){a.result=p;if(p===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.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(a){if(a[E])return a;var b=a;a=c.Event(b);for(var e=this.props.length,g;e;){g=this.props[--e];a[g]=b[g]}if(!a.target)a.target=a.srcElement||k;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=k.documentElement;e=k.body;a.pageX=a.clientX+(b&&b.scrollLeft||e&&e.scrollLeft||0)-(b&&b.clientLeft||e&&e.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
e&&e.scrollTop||0)-(b&&b.clientTop||e&&e.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==s)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:Z}))},remove:function(a){var b=true,e=a.origType.replace(ua,"");c.each(c.data(this,
"events").live||[],function(){if(e===this.origType.replace(ua,""))return b=false});b&&c.event.remove(this,a.origType,Z)}},beforeunload:{setup:function(a,b,e){if(this.setInterval)this.onbeforeunload=e;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Na=k.removeEventListener?function(a,b,e){a.removeEventListener(b,e,false)}:function(a,b,e){a.detachEvent("on"+b,e)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
a;this.type=a.type}else this.type=a;this.timeStamp=O();this[E]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=da;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=da;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=da;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
isImmediatePropagationStopped:Y};var Oa=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(e){}},Pa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(e){c.event.add(this,b,e&&e.selector?Pa:Oa,a)},teardown:function(e){c.event.remove(this,b,e&&e.selector?Pa:Oa)}}});if(!c.support.submitBubbles)c.event.special.submit=
{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,e=b.type;if((e==="submit"||e==="image")&&c(b).closest("form").length)return W("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,e=b.type;if((e==="text"||e==="password")&&c(b).closest("form").length&&a.keyCode===13)return W("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var Aa=
/textarea|input|select/i,Ba,Qa=function(a){var b=a.type,e=a.value;if(b==="radio"||b==="checkbox")e=a.checked;else if(b==="select-multiple")e=a.selectedIndex>-1?c.map(a.options,function(g){return g.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")e=a.selectedIndex;return e},Ca=function(a,b){var e=a.target,g,f;if(!(!Aa.test(e.nodeName)||e.readOnly)){g=c.data(e,"_change_data");f=Qa(e);if(a.type!=="focusout"||e.type!=="radio")c.data(e,"_change_data",f);if(!(g===s||f===g))if(g!=null||
f){a.type="change";return c.event.trigger(a,b,e)}}};c.event.special.change={filters:{focusout:Ca,click:function(a){var b=a.target,e=b.type;if(e==="radio"||e==="checkbox"||b.nodeName.toLowerCase()==="select")return Ca.call(this,a)},keydown:function(a){var b=a.target,e=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(e==="checkbox"||e==="radio")||e==="select-multiple")return Ca.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",Qa(a))}},setup:function(){if(this.type===
"file")return false;for(var a in Ba)c.event.add(this,a+".specialChange",Ba[a]);return Aa.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return Aa.test(this.nodeName)}};Ba=c.event.special.change.filters}k.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function e(g){g=c.event.fix(g);g.type=b;return c.event.handle.call(this,g)}c.event.special[b]={setup:function(){this.addEventListener(a,e,true)},teardown:function(){this.removeEventListener(a,
e,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(e,g,f){if(typeof e==="object"){for(var o in e)this[b](o,g,e[o],f);return this}if(c.isFunction(g)){f=g;g=s}var p=b==="one"?c.proxy(f,function(t){c(this).unbind(t,p);return f.apply(this,arguments)}):f;if(e==="unload"&&b!=="one")this.one(e,g,f);else{o=0;for(var x=this.length;o<x;o++)c.event.add(this[o],e,p,g)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var e in a)this.unbind(e,a[e]);else{e=
0;for(var g=this.length;e<g;e++)c.event.remove(this[e],a,b)}return this},delegate:function(a,b,e,g){return this.live(b,e,g,a)},undelegate:function(a,b,e){return arguments.length===0?this.unbind("live"):this.die(b,null,e,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,e=1;e<b.length;)c.proxy(a,
b[e++]);return this.click(c.proxy(a,function(g){var f=(c.data(this,"lastToggle"+a.guid)||0)%e;c.data(this,"lastToggle"+a.guid,f+1);g.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ra={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(e,g,f,o){var p,x=0,t,y,K=o||this.selector,U=o?this:c(this.context);if(c.isFunction(g)){f=g;g=s}for(e=
(e||"").split(" ");(p=e[x++])!=null;){o=ua.exec(p);t="";if(o){t=o[0];p=p.replace(ua,"")}if(p==="hover")e.push("mouseenter"+t,"mouseleave"+t);else{y=p;if(p==="focus"||p==="blur"){e.push(Ra[p]+t);p+=t}else p=(Ra[p]||p)+t;b==="live"?U.each(function(){c.event.add(this,ha(p,K),{data:g,selector:K,handler:f,origType:p,origHandler:f,preType:y})}):U.unbind(ha(p,K),f)}}return this}});c.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(a,b){c.fn[b]=function(e){return e?this.bind(b,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});j.attachEvent&&!j.addEventListener&&j.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(i){for(var l="",r,w=0;i[w];w++){r=i[w];if(r.nodeType===3||r.nodeType===4)l+=r.nodeValue;else if(r.nodeType!==8)l+=a(r.childNodes)}return l}function b(i,l,r,w,I,F){I=0;for(var T=w.length;I<T;I++){var P=w[I];
if(P){P=P[i];for(var $=false;P;){if(P.sizcache===r){$=w[P.sizset];break}if(P.nodeType===1&&!F){P.sizcache=r;P.sizset=I}if(P.nodeName.toLowerCase()===l){$=P;break}P=P[i]}w[I]=$}}}function e(i,l,r,w,I,F){I=0;for(var T=w.length;I<T;I++){var P=w[I];if(P){P=P[i];for(var $=false;P;){if(P.sizcache===r){$=w[P.sizset];break}if(P.nodeType===1){if(!F){P.sizcache=r;P.sizset=I}if(typeof l!=="string"){if(P===l){$=true;break}}else if(t.filter(l,[P]).length>0){$=P;break}}P=P[i]}w[I]=$}}}var g=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
f=0,o=Object.prototype.toString,p=false,x=true;[0,0].sort(function(){x=false;return 0});var t=function(i,l,r,w){r=r||[];var I=l=l||k;if(l.nodeType!==1&&l.nodeType!==9)return[];if(!i||typeof i!=="string")return r;for(var F=[],T,P,$,wa,pa=true,sa=V(l),qa=i;(g.exec(""),T=g.exec(qa))!==null;){qa=T[3];F.push(T[1]);if(T[2]){wa=T[3];break}}if(F.length>1&&K.exec(i))if(F.length===2&&y.relative[F[0]])P=Da(F[0]+F[1],l);else for(P=y.relative[F[0]]?[l]:t(F.shift(),l);F.length;){i=F.shift();if(y.relative[i])i+=
F.shift();P=Da(i,P)}else{if(!w&&F.length>1&&l.nodeType===9&&!sa&&y.match.ID.test(F[0])&&!y.match.ID.test(F[F.length-1])){T=t.find(F.shift(),l,sa);l=T.expr?t.filter(T.expr,T.set)[0]:T.set[0]}if(l){T=w?{expr:F.pop(),set:ca(w)}:t.find(F.pop(),F.length===1&&(F[0]==="~"||F[0]==="+")&&l.parentNode?l.parentNode:l,sa);P=T.expr?t.filter(T.expr,T.set):T.set;if(F.length>0)$=ca(P);else pa=false;for(;F.length;){var ma=F.pop();T=ma;if(y.relative[ma])T=F.pop();else ma="";if(T==null)T=l;y.relative[ma]($,T,sa)}}else $=
[]}$||($=P);$||t.error(ma||i);if(o.call($)==="[object Array]")if(pa)if(l&&l.nodeType===1)for(i=0;$[i]!=null;i++){if($[i]&&($[i]===true||$[i].nodeType===1&&na(l,$[i])))r.push(P[i])}else for(i=0;$[i]!=null;i++)$[i]&&$[i].nodeType===1&&r.push(P[i]);else r.push.apply(r,$);else ca($,r);if(wa){t(wa,I,r,w);t.uniqueSort(r)}return r};t.uniqueSort=function(i){if(ea){p=x;i.sort(ea);if(p)for(var l=1;l<i.length;l++)i[l]===i[l-1]&&i.splice(l--,1)}return i};t.matches=function(i,l){return t(i,null,null,l)};t.find=
function(i,l,r){var w,I;if(!i)return[];for(var F=0,T=y.order.length;F<T;F++){var P=y.order[F];if(I=y.leftMatch[P].exec(i)){var $=I[1];I.splice(1,1);if($.substr($.length-1)!=="\\"){I[1]=(I[1]||"").replace(/\\/g,"");w=y.find[P](I,l,r);if(w!=null){i=i.replace(y.match[P],"");break}}}}w||(w=l.getElementsByTagName("*"));return{set:w,expr:i}};t.filter=function(i,l,r,w){for(var I=i,F=[],T=l,P,$,wa=l&&l[0]&&V(l[0]);i&&l.length;){for(var pa in y.filter)if((P=y.leftMatch[pa].exec(i))!=null&&P[2]){var sa=y.filter[pa],
qa,ma;ma=P[1];$=false;P.splice(1,1);if(ma.substr(ma.length-1)!=="\\"){if(T===F)F=[];if(y.preFilter[pa])if(P=y.preFilter[pa](P,T,r,F,w,wa)){if(P===true)continue}else $=qa=true;if(P)for(var xa=0;(ma=T[xa])!=null;xa++)if(ma){qa=sa(ma,P,xa,T);var Sa=w^!!qa;if(r&&qa!=null)if(Sa)$=true;else T[xa]=false;else if(Sa){F.push(ma);$=true}}if(qa!==s){r||(T=F);i=i.replace(y.match[pa],"");if(!$)return[];break}}}if(i===I)if($==null)t.error(i);else break;I=i}return T};t.error=function(i){throw"Syntax error, unrecognized expression: "+
i;};var y=t.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(i){return i.getAttribute("href")}},relative:{"+":function(i,l){var r=typeof l==="string",w=r&&!/\W/.test(l);r=r&&!w;if(w)l=l.toLowerCase();w=0;for(var I=i.length,F;w<I;w++)if(F=i[w]){for(;(F=F.previousSibling)&&F.nodeType!==1;);i[w]=r||F&&F.nodeName.toLowerCase()===l?F||false:F===l}r&&t.filter(l,i,true)},">":function(i,l){var r=typeof l==="string";if(r&&!/\W/.test(l)){l=l.toLowerCase();for(var w=0,I=i.length;w<I;w++){var F=
i[w];if(F){r=F.parentNode;i[w]=r.nodeName.toLowerCase()===l?r:false}}}else{w=0;for(I=i.length;w<I;w++)if(F=i[w])i[w]=r?F.parentNode:F.parentNode===l;r&&t.filter(l,i,true)}},"":function(i,l,r){var w=f++,I=e;if(typeof l==="string"&&!/\W/.test(l)){var F=l=l.toLowerCase();I=b}I("parentNode",l,w,i,F,r)},"~":function(i,l,r){var w=f++,I=e;if(typeof l==="string"&&!/\W/.test(l)){var F=l=l.toLowerCase();I=b}I("previousSibling",l,w,i,F,r)}},find:{ID:function(i,l,r){if(typeof l.getElementById!=="undefined"&&
!r)return(i=l.getElementById(i[1]))?[i]:[]},NAME:function(i,l){if(typeof l.getElementsByName!=="undefined"){var r=[];l=l.getElementsByName(i[1]);for(var w=0,I=l.length;w<I;w++)l[w].getAttribute("name")===i[1]&&r.push(l[w]);return r.length===0?null:r}},TAG:function(i,l){return l.getElementsByTagName(i[1])}},preFilter:{CLASS:function(i,l,r,w,I,F){i=" "+i[1].replace(/\\/g,"")+" ";if(F)return i;F=0;for(var T;(T=l[F])!=null;F++)if(T)if(I^(T.className&&(" "+T.className+" ").replace(/[\t\n]/g," ").indexOf(i)>=
0))r||w.push(T);else if(r)l[F]=false;return false},ID:function(i){return i[1].replace(/\\/g,"")},TAG:function(i){return i[1].toLowerCase()},CHILD:function(i){if(i[1]==="nth"){var l=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(i[2]==="even"&&"2n"||i[2]==="odd"&&"2n+1"||!/\D/.test(i[2])&&"0n+"+i[2]||i[2]);i[2]=l[1]+(l[2]||1)-0;i[3]=l[3]-0}i[0]=f++;return i},ATTR:function(i,l,r,w,I,F){l=i[1].replace(/\\/g,"");if(!F&&y.attrMap[l])i[1]=y.attrMap[l];if(i[2]==="~=")i[4]=" "+i[4]+" ";return i},PSEUDO:function(i,l,r,w,
I){if(i[1]==="not")if((g.exec(i[3])||"").length>1||/^\w/.test(i[3]))i[3]=t(i[3],null,null,l);else{i=t.filter(i[3],l,r,true^I);r||w.push.apply(w,i);return false}else if(y.match.POS.test(i[0])||y.match.CHILD.test(i[0]))return true;return i},POS:function(i){i.unshift(true);return i}},filters:{enabled:function(i){return i.disabled===false&&i.type!=="hidden"},disabled:function(i){return i.disabled===true},checked:function(i){return i.checked===true},selected:function(i){return i.selected===true},parent:function(i){return!!i.firstChild},
empty:function(i){return!i.firstChild},has:function(i,l,r){return!!t(r[3],i).length},header:function(i){return/h\d/i.test(i.nodeName)},text:function(i){return"text"===i.type},radio:function(i){return"radio"===i.type},checkbox:function(i){return"checkbox"===i.type},file:function(i){return"file"===i.type},password:function(i){return"password"===i.type},submit:function(i){return"submit"===i.type},image:function(i){return"image"===i.type},reset:function(i){return"reset"===i.type},button:function(i){return"button"===
i.type||i.nodeName.toLowerCase()==="button"},input:function(i){return/input|select|textarea|button/i.test(i.nodeName)}},setFilters:{first:function(i,l){return l===0},last:function(i,l,r,w){return l===w.length-1},even:function(i,l){return l%2===0},odd:function(i,l){return l%2===1},lt:function(i,l,r){return l<r[3]-0},gt:function(i,l,r){return l>r[3]-0},nth:function(i,l,r){return r[3]-0===l},eq:function(i,l,r){return r[3]-0===l}},filter:{PSEUDO:function(i,l,r,w){var I=l[1],F=y.filters[I];if(F)return F(i,
r,l,w);else if(I==="contains")return(i.textContent||i.innerText||a([i])||"").indexOf(l[3])>=0;else if(I==="not"){l=l[3];r=0;for(w=l.length;r<w;r++)if(l[r]===i)return false;return true}else t.error("Syntax error, unrecognized expression: "+I)},CHILD:function(i,l){var r=l[1],w=i;switch(r){case "only":case "first":for(;w=w.previousSibling;)if(w.nodeType===1)return false;if(r==="first")return true;w=i;case "last":for(;w=w.nextSibling;)if(w.nodeType===1)return false;return true;case "nth":r=l[2];var I=
l[3];if(r===1&&I===0)return true;l=l[0];var F=i.parentNode;if(F&&(F.sizcache!==l||!i.nodeIndex)){var T=0;for(w=F.firstChild;w;w=w.nextSibling)if(w.nodeType===1)w.nodeIndex=++T;F.sizcache=l}i=i.nodeIndex-I;return r===0?i===0:i%r===0&&i/r>=0}},ID:function(i,l){return i.nodeType===1&&i.getAttribute("id")===l},TAG:function(i,l){return l==="*"&&i.nodeType===1||i.nodeName.toLowerCase()===l},CLASS:function(i,l){return(" "+(i.className||i.getAttribute("class"))+" ").indexOf(l)>-1},ATTR:function(i,l){var r=
l[1];i=y.attrHandle[r]?y.attrHandle[r](i):i[r]!=null?i[r]:i.getAttribute(r);r=i+"";var w=l[2];l=l[4];return i==null?w==="!=":w==="="?r===l:w==="*="?r.indexOf(l)>=0:w==="~="?(" "+r+" ").indexOf(l)>=0:!l?r&&i!==false:w==="!="?r!==l:w==="^="?r.indexOf(l)===0:w==="$="?r.substr(r.length-l.length)===l:w==="|="?r===l||r.substr(0,l.length+1)===l+"-":false},POS:function(i,l,r,w){var I=y.setFilters[l[2]];if(I)return I(i,r,l,w)}}},K=y.match.POS,U;for(U in y.match){y.match[U]=RegExp(y.match[U].source+/(?![^\[]*\])(?![^\(]*\))/.source);
y.leftMatch[U]=RegExp(/(^(?:.|\r|\n)*?)/.source+y.match[U].source.replace(/\\(\d+)/g,function(i,l){return"\\"+(l-0+1)}))}var ca=function(i,l){i=Array.prototype.slice.call(i,0);if(l){l.push.apply(l,i);return l}return i};try{Array.prototype.slice.call(k.documentElement.childNodes,0)}catch(fa){ca=function(i,l){l=l||[];if(o.call(i)==="[object Array]")Array.prototype.push.apply(l,i);else if(typeof i.length==="number")for(var r=0,w=i.length;r<w;r++)l.push(i[r]);else for(r=0;i[r];r++)l.push(i[r]);return l}}var ea;
if(k.documentElement.compareDocumentPosition)ea=function(i,l){if(!i.compareDocumentPosition||!l.compareDocumentPosition){if(i==l)p=true;return i.compareDocumentPosition?-1:1}i=i.compareDocumentPosition(l)&4?-1:i===l?0:1;if(i===0)p=true;return i};else if("sourceIndex"in k.documentElement)ea=function(i,l){if(!i.sourceIndex||!l.sourceIndex){if(i==l)p=true;return i.sourceIndex?-1:1}i=i.sourceIndex-l.sourceIndex;if(i===0)p=true;return i};else if(k.createRange)ea=function(i,l){if(!i.ownerDocument||!l.ownerDocument){if(i==
l)p=true;return i.ownerDocument?-1:1}var r=i.ownerDocument.createRange(),w=l.ownerDocument.createRange();r.setStart(i,0);r.setEnd(i,0);w.setStart(l,0);w.setEnd(l,0);i=r.compareBoundaryPoints(Range.START_TO_END,w);if(i===0)p=true;return i};(function(){var i=k.createElement("div"),l="script"+(new Date).getTime();i.innerHTML="<a name='"+l+"'/>";var r=k.documentElement;r.insertBefore(i,r.firstChild);if(k.getElementById(l)){y.find.ID=function(w,I,F){if(typeof I.getElementById!=="undefined"&&!F)return(I=
I.getElementById(w[1]))?I.id===w[1]||typeof I.getAttributeNode!=="undefined"&&I.getAttributeNode("id").nodeValue===w[1]?[I]:s:[]};y.filter.ID=function(w,I){var F=typeof w.getAttributeNode!=="undefined"&&w.getAttributeNode("id");return w.nodeType===1&&F&&F.nodeValue===I}}r.removeChild(i);r=i=null})();(function(){var i=k.createElement("div");i.appendChild(k.createComment(""));if(i.getElementsByTagName("*").length>0)y.find.TAG=function(l,r){r=r.getElementsByTagName(l[1]);if(l[1]==="*"){l=[];for(var w=
0;r[w];w++)r[w].nodeType===1&&l.push(r[w]);r=l}return r};i.innerHTML="<a href='#'></a>";if(i.firstChild&&typeof i.firstChild.getAttribute!=="undefined"&&i.firstChild.getAttribute("href")!=="#")y.attrHandle.href=function(l){return l.getAttribute("href",2)};i=null})();k.querySelectorAll&&function(){var i=t,l=k.createElement("div");l.innerHTML="<p class='TEST'></p>";if(!(l.querySelectorAll&&l.querySelectorAll(".TEST").length===0)){t=function(w,I,F,T){I=I||k;if(!T&&I.nodeType===9&&!V(I))try{return ca(I.querySelectorAll(w),
F)}catch(P){}return i(w,I,F,T)};for(var r in i)t[r]=i[r];l=null}}();(function(){var i=k.createElement("div");i.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!i.getElementsByClassName||i.getElementsByClassName("e").length===0)){i.lastChild.className="e";if(i.getElementsByClassName("e").length!==1){y.order.splice(1,0,"CLASS");y.find.CLASS=function(l,r,w){if(typeof r.getElementsByClassName!=="undefined"&&!w)return r.getElementsByClassName(l[1])};i=null}}})();var na=k.compareDocumentPosition?
function(i,l){return!!(i.compareDocumentPosition(l)&16)}:function(i,l){return i!==l&&(i.contains?i.contains(l):true)},V=function(i){return(i=(i?i.ownerDocument||i:0).documentElement)?i.nodeName!=="HTML":false},Da=function(i,l){var r=[],w="",I;for(l=l.nodeType?[l]:l;I=y.match.PSEUDO.exec(i);){w+=I[0];i=i.replace(y.match.PSEUDO,"")}i=y.relative[i]?i+"*":i;I=0;for(var F=l.length;I<F;I++)t(i,l[I],r);return t.filter(w,r)};c.find=t;c.expr=t.selectors;c.expr[":"]=c.expr.filters;c.unique=t.uniqueSort;c.text=
a;c.isXMLDoc=V;c.contains=na})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,gb=/,/;N=Array.prototype.slice;var Ta=function(a,b,e){if(c.isFunction(b))return c.grep(a,function(f,o){return!!b.call(f,o,f)===e});else if(b.nodeType)return c.grep(a,function(f){return f===b===e});else if(typeof b==="string"){var g=c.grep(a,function(f){return f.nodeType===1});if(d.test(b))return c.filter(b,g,!e);else b=c.filter(b,g)}return c.grep(a,function(f){return c.inArray(f,b)>=0===e})};c.fn.extend({find:function(a){for(var b=
this.pushStack("","find",a),e=0,g=0,f=this.length;g<f;g++){e=b.length;c.find(a,this[g],b);if(g>0)for(var o=e;o<b.length;o++)for(var p=0;p<e;p++)if(b[p]===b[o]){b.splice(o--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var e=0,g=b.length;e<g;e++)if(c.contains(this,b[e]))return true})},not:function(a){return this.pushStack(Ta(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ta(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>
0},closest:function(a,b){if(c.isArray(a)){var e=[],g=this[0],f,o={},p;if(g&&a.length){f=0;for(var x=a.length;f<x;f++){p=a[f];o[p]||(o[p]=c.expr.match.POS.test(p)?c(p,b||this.context):p)}for(;g&&g.ownerDocument&&g!==b;){for(p in o){f=o[p];if(f.jquery?f.index(g)>-1:c(g).is(f)){e.push({selector:p,elem:g});delete o[p]}}g=g.parentNode}}return e}var t=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(y,K){for(;K&&K.ownerDocument&&K!==b;){if(t?t.index(K)>-1:c(K).is(a))return K;
K=K.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(!a[0]||!a[0].parentNode||a[0].parentNode.nodeType===11||!b[0]||!b[0].parentNode||b[0].parentNode.nodeType===11?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=
a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,e){return c.dir(a,"parentNode",e)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,e){return c.dir(a,"nextSibling",e)},prevUntil:function(a,b,e){return c.dir(a,"previousSibling",e)},siblings:function(a){return c.sibling(a.parentNode.firstChild,
a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(e,g){var f=c.map(this,b,e);eb.test(a)||(g=e);if(g&&typeof g==="string")f=c.filter(g,f);f=this.length>1?c.unique(f):f;if((this.length>1||gb.test(g))&&fb.test(a))f=f.reverse();return this.pushStack(f,a,N.call(arguments).join(","))}});c.extend({filter:function(a,b,e){if(e)a=":not("+a+")";return c.find.matches(a,
b)},dir:function(a,b,e){var g=[];for(a=a[b];a&&a.nodeType!==9&&(e===s||a.nodeType!==1||!c(a).is(e));){a.nodeType===1&&g.push(a);a=a[b]}return g},nth:function(a,b,e){b=b||1;for(var g=0;a;a=a[e])if(a.nodeType===1&&++g===b)break;return a},sibling:function(a,b){for(var e=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&e.push(a);return e}});var Ua=/ jQuery\d+="(?:\d+|null)"/g,ya=/^\s+/,Va=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Wa=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,
Ja=/<script|<object|<embed|<option|<style/i,Ka=/checked\s*(?:[^=]|=\s*.checked.)/i,Xa=function(a,b,e){return hb.test(e)?a:b+"></"+e+">"},oa={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,"",""]};oa.optgroup=oa.option;oa.tbody=
oa.tfoot=oa.colgroup=oa.caption=oa.thead;oa.th=oa.td;if(!c.support.htmlSerialize)oa._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var e=c(this);e.text(a.call(this,b,e.text()))});if(typeof a!=="object"&&a!==s)return this.empty().append((this[0]&&this[0].ownerDocument||k).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(e){c(this).wrapAll(a.call(this,e))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);
this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var e=this;e.firstChild&&e.firstChild.nodeType===1;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),e=b.contents();e.length?e.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,
"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());
return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var e=0,g;(g=this[e])!=null;e++)if(!a||c.filter(a,[g]).length){if(!b&&g.nodeType===1){c.cleanData(g.getElementsByTagName("*"));c.cleanData([g])}g.parentNode&&
g.parentNode.removeChild(g)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var e=this.outerHTML,g=this.ownerDocument;if(!e){e=g.createElement("div");e.appendChild(this.cloneNode(true));e=e.innerHTML}return c.clean([e.replace(Ua,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(ya,
"")],g)[0]}else return this.cloneNode(true)});if(a===true){R(this,b);R(this.find("*"),b.find("*"))}return b},html:function(a){if(a===s)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ua,""):null;else if(typeof a==="string"&&!Ja.test(a)&&(c.support.leadingWhitespace||!ya.test(a))&&!oa[(Wa.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Va,Xa);try{for(var b=0,e=this.length;b<e;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(g){this.empty().append(a)}}else c.isFunction(a)?
this.each(function(f){var o=c(this),p=o.html();o.empty().append(function(){return a.call(this,f,p)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var e=c(this),g=e.html();e.replaceWith(a.call(this,b,g))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,e=this.parentNode;c(this).remove();b?c(b).before(a):c(e).append(a)})}else return this.pushStack(c(c.isFunction(a)?
a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,e){var g,f,o=a[0],p=[],x;if(!c.support.checkClone&&arguments.length===3&&typeof o==="string"&&Ka.test(o))return this.each(function(){c(this).domManip(a,b,e,true)});if(c.isFunction(o))return this.each(function(y){var K=c(this);a[0]=o.call(this,y,b?K.html():s);K.domManip(a,b,e)});if(this[0]){g=o&&o.parentNode;g=c.support.parentNode&&g&&g.nodeType===11&&g.childNodes.length===this.length?{fragment:g}:ia(a,this,
p);x=g.fragment;if(f=x.childNodes.length===1?x=x.firstChild:x.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var t=this.length;f<t;f++)e.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):this[f]:this[f],f>0||g.cacheable||this.length>1?x.cloneNode(true):x)}p.length&&c.each(p,Q)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},
function(a,b){c.fn[a]=function(e){var g=[];e=c(e);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&e.length===1){e[b](this[0]);return this}else{f=0;for(var o=e.length;f<o;f++){var p=(f>0?this.clone(true):this).get();c.fn[b].apply(c(e[f]),p);g=g.concat(p)}return this.pushStack(g,a,e.selector)}}});c.extend({clean:function(a,b,e,g){b=b||k;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||k;for(var f=[],o=0,p;(p=a[o])!=null;o++){if(typeof p===
"number")p+="";if(p){if(typeof p==="string"&&!jb.test(p))p=b.createTextNode(p);else if(typeof p==="string"){p=p.replace(Va,Xa);var x=(Wa.exec(p)||["",""])[1].toLowerCase(),t=oa[x]||oa._default,y=t[0],K=b.createElement("div");for(K.innerHTML=t[1]+p+t[2];y--;)K=K.lastChild;if(!c.support.tbody){y=ib.test(p);x=x==="table"&&!y?K.firstChild&&K.firstChild.childNodes:t[1]==="<table>"&&!y?K.childNodes:[];for(t=x.length-1;t>=0;--t)c.nodeName(x[t],"tbody")&&!x[t].childNodes.length&&x[t].parentNode.removeChild(x[t])}!c.support.leadingWhitespace&&
ya.test(p)&&K.insertBefore(b.createTextNode(ya.exec(p)[0]),K.firstChild);p=K.childNodes}if(p.nodeType)f.push(p);else f=c.merge(f,p)}}if(e)for(o=0;f[o];o++)if(g&&c.nodeName(f[o],"script")&&(!f[o].type||f[o].type.toLowerCase()==="text/javascript"))g.push(f[o].parentNode?f[o].parentNode.removeChild(f[o]):f[o]);else{f[o].nodeType===1&&f.splice.apply(f,[o+1,0].concat(c.makeArray(f[o].getElementsByTagName("script"))));e.appendChild(f[o])}return f},cleanData:function(a){for(var b,e,g=c.cache,f=c.event.special,
o=c.support.deleteExpando,p=0,x;(x=a[p])!=null;p++)if(e=x[c.expando]){b=g[e];if(b.events)for(var t in b.events)f[t]?c.event.remove(x,t):Na(x,t,b.handle);if(o)delete x[c.expando];else x.removeAttribute&&x.removeAttribute(c.expando);delete g[e]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Ya=/alpha\([^)]*\)/,Za=/opacity=([^)]*)/,Ea=/float/i,Fa=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],
qb=["Top","Bottom"],rb=k.defaultView&&k.defaultView.getComputedStyle,$a=c.support.cssFloat?"cssFloat":"styleFloat",Ga=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return M(this,a,b,true,function(e,g,f){if(f===s)return c.curCSS(e,g);if(typeof f==="number"&&!kb.test(g))f+="px";c.style(e,g,f)})};c.extend({style:function(a,b,e){if(!a||a.nodeType===3||a.nodeType===8)return s;if((b==="width"||b==="height")&&parseFloat(e)<0)e=s;var g=a.style||a,f=e!==s;if(!c.support.opacity&&b==="opacity"){if(f){g.zoom=
1;b=parseInt(e,10)+""==="NaN"?"":"alpha(opacity="+e*100+")";a=g.filter||c.curCSS(a,"filter")||"";g.filter=Ya.test(a)?a.replace(Ya,b):b}return g.filter&&g.filter.indexOf("opacity=")>=0?parseFloat(Za.exec(g.filter)[1])/100+"":""}if(Ea.test(b))b=$a;b=b.replace(Fa,Ga);if(f)g[b]=e;return g[b]},css:function(a,b,e,g){if(b==="width"||b==="height"){var f,o=b==="width"?pb:qb;e=function(){f=b==="width"?a.offsetWidth:a.offsetHeight;g!=="border"&&c.each(o,function(){g||(f-=parseFloat(c.curCSS(a,"padding"+this,
true))||0);if(g==="margin")f+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else f-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})};a.offsetWidth!==0?e():c.swap(a,ob,e);return Math.max(0,Math.round(f))}return c.curCSS(a,b,e)},curCSS:function(a,b,e){var g,f=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){g=Za.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return g===""?"1":g}if(Ea.test(b))b=$a;if(!e&&f&&f[b])g=f[b];else if(rb){if(Ea.test(b))b="float";b=b.replace(lb,
"-$1").toLowerCase();f=a.ownerDocument.defaultView;if(!f)return null;if(a=f.getComputedStyle(a,null))g=a.getPropertyValue(b);if(b==="opacity"&&g==="")g="1"}else if(a.currentStyle){e=b.replace(Fa,Ga);g=a.currentStyle[b]||a.currentStyle[e];if(!mb.test(g)&&nb.test(g)){b=f.left;var o=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;f.left=e==="fontSize"?"1em":g||0;g=f.pixelLeft+"px";f.left=b;a.runtimeStyle.left=o}}return g},swap:function(a,b,e){var g={},f;for(f in b){g[f]=a.style[f];a.style[f]=
b[f]}e.call(a);for(f in b)a.style[f]=g[f]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,e=a.offsetHeight,g=a.nodeName.toLowerCase()==="tr";return b===0&&e===0&&!g?true:b>0&&e>0&&!g?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=O(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,ta=/=\?(&|$)/,
Ha=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,e){if(typeof a!=="string")return zb.call(this,a);else if(!this.length)return this;var g=a.indexOf(" ");if(g>=0){var f=a.slice(g,a.length);a=a.slice(0,g)}g="GET";if(b)if(c.isFunction(b)){e=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);g="POST"}var o=this;c.ajax({url:a,type:g,dataType:"html",data:b,complete:function(p,x){if(x==="success"||x==="notmodified")o.html(f?
c("<div />").append(p.responseText.replace(tb,"")).find(f):p.responseText);e&&o.each(e,[p.responseText,x,p])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(e){return{name:b.name,
value:e}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(e){return this.bind(b,e)}});c.extend({get:function(a,b,e,g){if(c.isFunction(b)){g=g||e;e=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:e,dataType:g})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,e){return c.get(a,b,e,"json")},post:function(a,b,e,g){if(c.isFunction(b)){g=g||e;e=b;b={}}return c.ajax({type:"POST",
url:a,data:b,success:e,dataType:g})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:j.XMLHttpRequest&&(j.location.protocol!=="file:"||!j.ActiveXObject)?function(){return new j.XMLHttpRequest}:function(){try{return new j.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},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(a){function b(){f.success&&f.success.call(t,x,p,V);f.global&&g("ajaxSuccess",[V,f])}function e(){f.complete&&f.complete.call(t,V,p);f.global&&g("ajaxComplete",[V,f]);f.global&&!--c.active&&c.event.trigger("ajaxStop")}function g(I,F){(f.context?c(f.context):c.event).trigger(I,F)}var f=c.extend(true,{},c.ajaxSettings,a),o,p,x,t=a&&a.context||f,y=f.type.toUpperCase();if(f.data&&f.processData&&
typeof f.data!=="string")f.data=c.param(f.data,f.traditional);if(f.dataType==="jsonp"){if(y==="GET")ta.test(f.url)||(f.url+=(Ha.test(f.url)?"&":"?")+(f.jsonp||"callback")+"=?");else if(!f.data||!ta.test(f.data))f.data=(f.data?f.data+"&":"")+(f.jsonp||"callback")+"=?";f.dataType="json"}if(f.dataType==="json"&&(f.data&&ta.test(f.data)||ta.test(f.url))){o=f.jsonpCallback||"jsonp"+sb++;if(f.data)f.data=(f.data+"").replace(ta,"="+o+"$1");f.url=f.url.replace(ta,"="+o+"$1");f.dataType="script";j[o]=j[o]||
function(I){x=I;b();e();j[o]=s;try{delete j[o]}catch(F){}ca&&ca.removeChild(fa)}}if(f.dataType==="script"&&f.cache===null)f.cache=false;if(f.cache===false&&y==="GET"){var K=O(),U=f.url.replace(wb,"$1_="+K+"$2");f.url=U+(U===f.url?(Ha.test(f.url)?"&":"?")+"_="+K:"")}if(f.data&&y==="GET")f.url+=(Ha.test(f.url)?"&":"?")+f.data;f.global&&!c.active++&&c.event.trigger("ajaxStart");K=(K=xb.exec(f.url))&&(K[1]&&K[1]!==location.protocol||K[2]!==location.host);if(f.dataType==="script"&&y==="GET"&&K){var ca=
k.getElementsByTagName("head")[0]||k.documentElement,fa=k.createElement("script");fa.src=f.url;if(f.scriptCharset)fa.charset=f.scriptCharset;if(!o){var ea=false;fa.onload=fa.onreadystatechange=function(){if(!ea&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){ea=true;b();e();fa.onload=fa.onreadystatechange=null;ca&&fa.parentNode&&ca.removeChild(fa)}}}ca.insertBefore(fa,ca.firstChild);return s}var na=false,V=f.xhr();if(V){f.username?V.open(y,f.url,f.async,f.username,f.password):
V.open(y,f.url,f.async);try{if(f.data||a&&a.contentType)V.setRequestHeader("Content-Type",f.contentType);if(f.ifModified){c.lastModified[f.url]&&V.setRequestHeader("If-Modified-Since",c.lastModified[f.url]);c.etag[f.url]&&V.setRequestHeader("If-None-Match",c.etag[f.url])}K||V.setRequestHeader("X-Requested-With","XMLHttpRequest");V.setRequestHeader("Accept",f.dataType&&f.accepts[f.dataType]?f.accepts[f.dataType]+", */*":f.accepts._default)}catch(Da){}if(f.beforeSend&&f.beforeSend.call(t,V,f)===false){f.global&&
!--c.active&&c.event.trigger("ajaxStop");V.abort();return false}f.global&&g("ajaxSend",[V,f]);var i=V.onreadystatechange=function(I){if(!V||V.readyState===0||I==="abort"){na||e();na=true;if(V)V.onreadystatechange=c.noop}else if(!na&&V&&(V.readyState===4||I==="timeout")){na=true;V.onreadystatechange=c.noop;p=I==="timeout"?"timeout":!c.httpSuccess(V)?"error":f.ifModified&&c.httpNotModified(V,f.url)?"notmodified":"success";var F;if(p==="success")try{x=c.httpData(V,f.dataType,f)}catch(T){p="parsererror";
F=T}if(p==="success"||p==="notmodified")o||b();else c.handleError(f,V,p,F);e();I==="timeout"&&V.abort();if(f.async)V=null}};try{var l=V.abort;V.abort=function(){V&&l.call(V);i("abort")}}catch(r){}f.async&&f.timeout>0&&setTimeout(function(){V&&!na&&i("timeout")},f.timeout);try{V.send(y==="POST"||y==="PUT"||y==="DELETE"?f.data:null)}catch(w){c.handleError(f,V,null,w);e()}f.async||i();return V}},handleError:function(a,b,e,g){if(a.error)a.error.call(a.context||a,b,e,g);if(a.global)(a.context?c(a.context):
c.event).trigger("ajaxError",[b,a,g])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var e=a.getResponseHeader("Last-Modified"),g=a.getResponseHeader("Etag");if(e)c.lastModified[b]=e;if(g)c.etag[b]=g;return a.status===304||a.status===0},httpData:function(a,b,e){var g=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&g.indexOf("xml")>=
0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(e&&e.dataFilter)a=e.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&g.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&g.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function e(p,x){if(c.isArray(x))c.each(x,function(t,y){b||/\[\]$/.test(p)?g(p,y):e(p+"["+(typeof y==="object"||c.isArray(y)?t:"")+"]",y)});else!b&&x!=null&&typeof x==="object"?c.each(x,
function(t,y){e(p+"["+t+"]",y)}):g(p,x)}function g(p,x){x=c.isFunction(x)?x():x;f[f.length]=encodeURIComponent(p)+"="+encodeURIComponent(x)}var f=[];if(b===s)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){g(this.name,this.value)});else for(var o in a)e(o,a[o]);return f.join("&").replace(yb,"+")}});var Ia={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,za,La=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft",
"paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(ga("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var e=c.data(this[a],"olddisplay");this[a].style.display=e||"";if(c.css(this[a],"display")==="none"){e=this[a].nodeName;var g;if(Ia[e])g=Ia[e];else{var f=c("<"+e+" />").appendTo("body");g=f.css("display");if(g==="none")g="block";f.remove();Ia[e]=g}c.data(this[a],"olddisplay",g)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||
"";return this}},hide:function(a,b){if(a||a===0)return this.animate(ga("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var e=c.data(this[a],"olddisplay");!e&&e!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var g=e?a:c(this).is(":hidden");
c(this)[g?"show":"hide"]()}):this.animate(ga("toggle",3),a,b);return this},fadeTo:function(a,b,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,e)},animate:function(a,b,e,g){var f=c.speed(b,e,g);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var o=c.extend({},f),p,x=this.nodeType===1&&c(this).is(":hidden"),t=this;for(p in a){var y=p.replace(Fa,Ga);if(p!==y){a[y]=a[p];delete a[p];p=y}if(a[p]==="hide"&&x||
a[p]==="show"&&!x)return o.complete.call(this);if((p==="height"||p==="width")&&this.style){o.display=c.css(this,"display");o.overflow=this.style.overflow}if(c.isArray(a[p])){(o.specialEasing=o.specialEasing||{})[p]=a[p][1];a[p]=a[p][0]}}if(o.overflow!=null)this.style.overflow="hidden";o.curAnim=c.extend({},a);c.each(a,function(K,U){var ca=new c.fx(t,o,K);if(Ab.test(U))ca[U==="toggle"?x?"show":"hide":U](a);else{var fa=Bb.exec(U),ea=ca.cur(true)||0;if(fa){U=parseFloat(fa[2]);var na=fa[3]||"px";if(na!==
"px"){t.style[K]=(U||1)+na;ea*=(U||1)/ca.cur(true);t.style[K]=ea+na}if(fa[1])U=(fa[1]==="-="?-1:1)*U+ea;ca.custom(ea,U,na)}else ca.custom(ea,U,"")}});return true})},stop:function(a,b){var e=c.timers;a&&this.queue([]);this.each(function(){for(var g=e.length-1;g>=0;g--)if(e[g].elem===this){b&&e[g](true);e.splice(g,1)}});b||this.dequeue();return this}});c.each({slideDown:ga("show",1),slideUp:ga("hide",1),slideToggle:ga("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=
function(e,g){return this.animate(b,e,g)}});c.extend({speed:function(a,b,e){var g=a&&typeof a==="object"?a:{complete:e||!e&&b||c.isFunction(a)&&a,duration:a,easing:e&&b||b&&!c.isFunction(b)&&b};g.duration=c.fx.off?0:typeof g.duration==="number"?g.duration:c.fx.speeds[g.duration]||c.fx.speeds._default;g.old=g.complete;g.complete=function(){g.queue!==false&&c(this).dequeue();c.isFunction(g.old)&&g.old.call(this)};return g},easing:{linear:function(a,b,e,g){return e+g*a},swing:function(a,b,e,g){return(-Math.cos(a*
Math.PI)/2+0.5)*g+e}},timers:[],fx:function(a,b,e){this.options=b;this.elem=a;this.prop=e;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,
this.prop,a)))&&a>-1E4?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,e){function g(o){return f.step(o)}this.startTime=O();this.start=a;this.end=b;this.unit=e||this.unit||"px";this.now=this.start;this.pos=this.state=0;var f=this;g.elem=this.elem;if(g()&&c.timers.push(g)&&!za)za=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},
hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=O(),e=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var g in this.options.curAnim)if(this.options.curAnim[g]!==true)e=false;if(e){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=
a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var f in this.options.curAnim)c.style(this.elem,f,this.options.orig[f]);this.options.complete.call(this.elem)}return false}else{f=b-this.startTime;this.state=f/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||
a](this.state,f,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(za);za=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?
Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in k.documentElement?function(a){var b=this[0];if(a)return this.each(function(f){c.offset.setOffset(this,a,f)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var e=b.getBoundingClientRect(),g=b.ownerDocument;b=g.body;g=g.documentElement;
return{top:e.top+(self.pageYOffset||c.support.boxModel&&g.scrollTop||b.scrollTop)-(g.clientTop||b.clientTop||0),left:e.left+(self.pageXOffset||c.support.boxModel&&g.scrollLeft||b.scrollLeft)-(g.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(K){c.offset.setOffset(this,a,K)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var e=b.offsetParent,g=b,f=b.ownerDocument,o,p=f.documentElement,x=f.body;
g=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;for(var t=b.offsetTop,y=b.offsetLeft;(b=b.parentNode)&&b!==x&&b!==p;){if(c.offset.supportsFixedPosition&&g.position==="fixed")break;o=f?f.getComputedStyle(b,null):b.currentStyle;t-=b.scrollTop;y-=b.scrollLeft;if(b===e){t+=b.offsetTop;y+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){t+=parseFloat(o.borderTopWidth)||0;y+=parseFloat(o.borderLeftWidth)||0}g=e;e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&
o.overflow!=="visible"){t+=parseFloat(o.borderTopWidth)||0;y+=parseFloat(o.borderLeftWidth)||0}g=o}if(g.position==="relative"||g.position==="static"){t+=x.offsetTop;y+=x.offsetLeft}if(c.offset.supportsFixedPosition&&g.position==="fixed"){t+=Math.max(p.scrollTop,x.scrollTop);y+=Math.max(p.scrollLeft,x.scrollLeft)}return{top:t,left:y}};c.offset={initialize:function(){var a=k.body,b=k.createElement("div"),e,g,f,o=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,
left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<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>";a.insertBefore(b,a.firstChild);e=b.firstChild;g=e.firstChild;f=e.nextSibling.firstChild.firstChild;this.doesNotAddBorder=g.offsetTop!==
5;this.doesAddBorderForTableAndCells=f.offsetTop===5;g.style.position="fixed";g.style.top="20px";this.supportsFixedPosition=g.offsetTop===20||g.offsetTop===15;g.style.position=g.style.top="";e.style.overflow="hidden";e.style.position="relative";this.subtractsBorderForOverflowNotVisible=g.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==o;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,e=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=
parseFloat(c.curCSS(a,"marginTop",true))||0;e+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:e}},setOffset:function(a,b,e){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var g=c(a),f=g.offset(),o=parseInt(c.curCSS(a,"top",true),10)||0,p=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,e,f);e={top:b.top-f.top+o,left:b.left-f.left+p};"using"in b?b.using.call(a,e):g.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],
b=this.offsetParent(),e=this.offset(),g=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();e.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;e.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;g.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;g.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:e.top-g.top,left:e.left-g.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||k.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,
"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var e="scroll"+b;c.fn[e]=function(g){var f=this[0],o;if(!f)return null;return g!==s?this.each(function(){if(o=ka(this))o.scrollTo(!a?g:c(o).scrollLeft(),a?g:c(o).scrollTop());else this[e]=g}):(o=ka(f))?"pageXOffset"in o?o[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&o.document.documentElement[e]||o.document.body[e]:f[e]}});c.each(["Height","Width"],function(a,b){var e=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?
c.css(this[0],e,false,"padding"):null};c.fn["outer"+b]=function(g){return this[0]?c.css(this[0],e,false,g?"margin":"border"):null};c.fn[e]=function(g){var f=this[0];if(!f)return g==null?null:this;if(c.isFunction(g))return this.each(function(o){var p=c(this);p[e](g.call(this,o,p[e]()))});return"scrollTo"in f&&f.document?f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b]:f.nodeType===9?Math.max(f.documentElement["client"+b],f.body["scroll"+b],f.documentElement["scroll"+
b],f.body["offset"+b],f.documentElement["offset"+b]):g===s?c.css(f,e):this.css(e,typeof g==="string"?g:g+"px")}});j.jQuery=j.$=c})(window);
//fine di jquery

/*
 Galleria v 1.2.4 2011-06-07
 http://galleria.aino.se

 Copyright (c) 2011, Aino
 Licensed under the MIT license.
*/
//inizio di galleria-1.2.4.js minimizzato
(function(j){var s=this,v=s.document,Q=j(v),M=j(s),O=true,Y=navigator.userAgent.toLowerCase(),da=s.location.hash.replace(/#\//,""),W=function(){var d=3,h=v.createElement("div"),m=h.getElementsByTagName("i");

do h.innerHTML="<\!--[if gt IE "+ ++d+"]><i></i><![endif]--\>";while(m[0]);return d>4?d:void 0}(),Z=function(){return{html:v.documentElement,body:v.body,head:v.getElementsByTagName("head")[0],title:v.title}},ha=function(){var d=[];j.each("data ready thumbnail loadstart loadfinish image play pause progress fullscreen_enter fullscreen_exit idle_enter idle_exit rescale lightbox_open lightbox_close lightbox_image".split(" "),
function(h,m){d.push(m);/_/.test(m)&&d.push(m.replace(/_/g,""))});return d}(),R=function(d){var h;if(typeof d!=="object")return d;j.each(d,function(m,n){if(/^[a-z]+_/.test(m)){h="";j.each(m.split("_"),function(B,C){h+=B>0?C.substr(0,1).toUpperCase()+C.substr(1):C});d[h]=n;delete d[m]}});return d},ia=function(d){if(j.inArray(d,ha)>-1)return z[d.toUpperCase()];return d},ga={trunk:{},add:function(d,h,m,n){n=n||false;this.clear(d);if(n){var B=h;h=function(){B();ga.add(d,h,m)}}this.trunk[d]=s.setTimeout(h,
m)},clear:function(d){var h=function(n){s.clearTimeout(this.trunk[n]);delete this.trunk[n]},m;if(d&&d in this.trunk)h.call(ga,d);else if(typeof d==="undefined")for(m in this.trunk)this.trunk.hasOwnProperty(m)&&h.call(ga,m)}},ka=[],c=[],aa=false,S=false,k=function(){return{array:function(d){return Array.prototype.slice.call(d)},create:function(d,h){var m=v.createElement(h||"div");m.className=d;return m},animate:function(){var d=function(J){var E="transition WebkitTransition MozTransition OTransition".split(" "),
L;for(L=0;E[L];L++)if(typeof J[E[L]]!=="undefined")return E[L];return false}((document.body||document.documentElement).style),h={MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[d],m={_default:[0.25,0.1,0.25,1],galleria:[0.645,0.045,0.355,1],galleriaIn:[0.55,0.085,0.68,0.53],galleriaOut:[0.25,0.46,0.45,0.94],ease:[0.25,0,0.25,1],linear:[0.25,0.25,0.75,0.75],"ease-in":[0.42,0,1,1],"ease-out":[0,0,0.58,1],"ease-in-out":[0.42,
0,0.58,1]},n=function(J,E,L){var X={};L=L||"transition";j.each("webkit moz ms o".split(" "),function(){X["-"+this+"-"+L]=E});J.css(X)},B=function(J){n(J,"none","transition");if(z.WEBKIT){n(J,"translate3d(0,0,0)","transform");if(J.data("revert")){J.css(J.data("revert"));J.data("revert",null)}}},C,D,A,q,u,H,N;return function(J,E,L){L=j.extend({duration:400,complete:function(){},stop:false},L);J=j(J);if(L.duration)if(d){if(L.stop){J.unbind(h);B(J)}C=false;j.each(E,function(X,ba){N=J.css(X);if(k.parseValue(N)!=
k.parseValue(ba))C=true;J.css(X,N)});if(C){D=[];A=L.easing in m?m[L.easing]:m._default;q=" "+L.duration+"ms cubic-bezier("+A.join(",")+")";s.setTimeout(function(){J.one(h,function(X){return function(){B(X);L.complete.call(X[0])}}(J));if(z.WEBKIT&&z.TOUCH){u={};H=[0,0,0];j.each(["left","top"],function(X,ba){if(ba in E){H[X]=k.parseValue(E[ba])-k.parseValue(J.css(ba))+"px";u[ba]=E[ba];delete E[ba]}});if(H[0]||H[1]){J.data("revert",u);D.push("-webkit-transform"+q);n(J,"translate3d("+H.join(",")+")",
"transform")}}j.each(E,function(X){D.push(X+q)});n(J,D.join(","));J.css(E)},1)}else s.setTimeout(function(){L.complete.call(J[0])},L.duration)}else J.animate(E,L);else{J.css(E);L.complete.call(J[0])}}}(),forceStyles:function(d,h){d=j(d);d.attr("style")&&d.data("styles",d.attr("style")).removeAttr("style");d.css(h)},revertStyles:function(){j.each(k.array(arguments),function(d,h){h=j(h);h.removeAttr("style");h.attr("style","");h.data("styles")&&h.attr("style",h.data("styles")).data("styles",null)})},
moveOut:function(d){k.forceStyles(d,{position:"absolute",left:-1E4})},moveIn:function(){k.revertStyles.apply(k,k.array(arguments))},hide:function(d,h,m){d=j(d);d.data("opacity")||d.data("opacity",d.css("opacity"));var n={opacity:0};h?k.animate(d,n,{duration:h,complete:m,stop:true}):d.css(n)},show:function(d,h,m){d=j(d);var n={opacity:parseFloat(d.data("opacity"))||1};h?k.animate(d,n,{duration:h,complete:m,stop:true}):d.css(n)},optimizeTouch:function(){var d,h,m,n,B={},C=function(q){q.preventDefault();
B=j.extend({},q,true)},D=function(){this.evt=B},A=function(){this.handler.call(d,this.evt)};return function(q){j(q).bind("touchstart",function(u){d=u.target;for(n=true;d.parentNode&&d!=u.currentTarget&&n;){h=j(d).data("events");m=j(d).data("fakes");if(h&&"click"in h){n=false;u.preventDefault();j(d).click(C).click();h.click.pop();j.each(h.click,D);j(d).data("fakes",h.click);delete h.click}else if(m){n=false;u.preventDefault();j.each(m,A)}d=d.parentNode}})}}(),addTimer:function(){ga.add.apply(ga,k.array(arguments));
return this},clearTimer:function(){ga.clear.apply(ga,k.array(arguments));return this},wait:function(d){d=j.extend({until:function(){return false},success:function(){},error:function(){z.raise("Could not complete wait function.")},timeout:3E3},d);var h=k.timestamp(),m,n,B=function(){n=k.timestamp();m=n-h;if(d.until(m)){d.success();return false}if(n>=h+d.timeout){d.error();return false}s.setTimeout(B,2)};s.setTimeout(B,2)},toggleQuality:function(d,h){if(!(W!==7&&W!==8||!d)){if(typeof h==="undefined")h=
d.style.msInterpolationMode==="nearest-neighbor";d.style.msInterpolationMode=h?"bicubic":"nearest-neighbor"}},insertStyleTag:function(d){var h=v.createElement("style");Z().head.appendChild(h);if(h.styleSheet)h.styleSheet.cssText=d;else{d=v.createTextNode(d);h.appendChild(d)}},loadScript:function(d,h){var m=false,n=j("<script>").attr({src:d,async:true}).get(0);n.onload=n.onreadystatechange=function(){if(!m&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){m=true;n.onload=
n.onreadystatechange=null;typeof h==="function"&&h.call(this,this)}};Z().head.appendChild(n)},parseValue:function(d){if(typeof d==="number")return d;else if(typeof d==="string")return(d=d.match(/\-?\d|\./g))&&d.constructor===Array?d.join("")*1:0;else return 0},timestamp:function(){return(new Date).getTime()},loadCSS:function(d,h,m){var n,B=false,C;j("link[rel=stylesheet]").each(function(){if(RegExp(d).test(this.href)){n=this;return false}});if(typeof h==="function"){m=h;h=void 0}m=m||function(){};
if(n){m.call(n,n);return n}C=v.styleSheets.length;if(O)d+="?"+k.timestamp();if(j("#"+h).length){j("#"+h).attr("href",d);C--;B=true}else{n=j("<link>").attr({rel:"stylesheet",href:d,id:h}).get(0);s.setTimeout(function(){var D=j('link[rel="stylesheet"], style');D.length?D.get(0).parentNode.insertBefore(n,D[0]):Z().head.appendChild(n);if(W)if(C>=31)z.raise("You have reached the browser stylesheet limit (31)",true);else n.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||
this.readyState==="complete"))B=true};else if(/file:\/\//i.test(d))B=true;else j.ajax({url:d,success:function(){B=true},error:function(A){if(A.isRejected()&&z.WEBKIT)B=true}})},10)}typeof m==="function"&&k.wait({until:function(){return B&&v.styleSheets.length>C},success:function(){s.setTimeout(function(){m.call(n,n)},100)},error:function(){z.raise("Theme CSS could not load",true)},timeout:1E4});return n}}}(),ja=function(){var d=function(h,m,n,B){var C=this.getOptions("easing"),D=this.getStageWidth(),
A={left:D*(h.rewind?-1:1)},q={left:0};if(n){A.opacity=0;q.opacity=1}j(h.next).css(A);k.animate(h.next,q,{duration:h.speed,complete:function(u){return function(){m();u.css({left:0})}}(j(h.next).add(h.prev)),queue:false,easing:C});if(B)h.rewind=!h.rewind;if(h.prev){A={left:0};q={left:D*(h.rewind?1:-1)};if(n){A.opacity=1;q.opacity=0}j(h.prev).css(A);k.animate(h.prev,q,{duration:h.speed,queue:false,easing:C,complete:function(){j(this).css("opacity",0)}})}};return{fade:function(h,m){j(h.next).css("opacity",
0).show();k.animate(h.next,{opacity:1},{duration:h.speed,complete:m});if(h.prev){j(h.prev).css("opacity",1).show();k.animate(h.prev,{opacity:0},{duration:h.speed})}},flash:function(h,m){j(h.next).css("opacity",0);h.prev?k.animate(h.prev,{opacity:0},{duration:h.speed/2,complete:function(){k.animate(h.next,{opacity:1},{duration:h.speed,complete:m})}}):k.animate(h.next,{opacity:1},{duration:h.speed,complete:m})},pulse:function(h,m){h.prev&&j(h.prev).hide();j(h.next).css("opacity",0).show();k.animate(h.next,
{opacity:1},{duration:h.speed,complete:m})},slide:function(){d.apply(this,k.array(arguments))},fadeslide:function(){d.apply(this,k.array(arguments).concat([true]))},doorslide:function(){d.apply(this,k.array(arguments).concat([false,true]))}}}(),z=function(){var d=this;this._theme=void 0;this._options={};this._playing=false;this._playtime=5E3;this._active=null;this._queue={length:0};this._data=[];this._dom={};this._thumbnails=[];this._firstrun=this._initialized=false;this._stageHeight=this._stageWidth=
0;this._target=void 0;this._id=Math.random();j.each("container stage images image-nav image-nav-left image-nav-right info info-text info-title info-description thumbnails thumbnails-list thumbnails-container thumb-nav-left thumb-nav-right loader counter tooltip".split(" "),function(q,u){d._dom[u]=k.create("galleria-"+u)});j.each("current total".split(" "),function(q,u){d._dom[u]=k.create("galleria-"+u,"span")});var h=this._keyboard={keys:{UP:38,DOWN:40,LEFT:37,RIGHT:39,RETURN:13,ESCAPE:27,BACKSPACE:8,
SPACE:32},map:{},bound:false,press:function(q){var u=q.keyCode||q.which;u in h.map&&typeof h.map[u]==="function"&&h.map[u].call(d,q)},attach:function(q){var u,H;for(u in q)if(q.hasOwnProperty(u)){H=u.toUpperCase();if(H in h.keys)h.map[h.keys[H]]=q[u];else h.map[H]=q[u]}if(!h.bound){h.bound=true;Q.bind("keydown",h.press)}},detach:function(){h.bound=false;h.map={};Q.unbind("keydown",h.press)}},m=this._controls={0:void 0,1:void 0,active:0,swap:function(){m.active=m.active?0:1},getActive:function(){return m[m.active]},
getNext:function(){return m[1-m.active]}},n=this._carousel={next:d.$("thumb-nav-right"),prev:d.$("thumb-nav-left"),width:0,current:0,max:0,hooks:[],update:function(){var q=0,u=0,H=[0];j.each(d._thumbnails,function(N,J){if(J.ready){q+=J.outerWidth||j(J.container).outerWidth(true);H[N+1]=q;u=Math.max(u,J.outerHeight||j(J.container).outerHeight(true))}});d.$("thumbnails").css({width:q,height:u});n.max=q;n.hooks=H;n.width=d.$("thumbnails-list").width();n.setClasses();d.$("thumbnails-container").toggleClass("galleria-carousel",
q>n.width);n.width=d.$("thumbnails-list").width()},bindControls:function(){var q;n.next.bind("click",function(u){u.preventDefault();if(d._options.carouselSteps==="auto")for(q=n.current;q<n.hooks.length;q++){if(n.hooks[q]-n.hooks[n.current]>n.width){n.set(q-2);break}}else n.set(n.current+d._options.carouselSteps)});n.prev.bind("click",function(u){u.preventDefault();if(d._options.carouselSteps==="auto")for(q=n.current;q>=0;q--)if(n.hooks[n.current]-n.hooks[q]>n.width){n.set(q+2);break}else{if(q===0){n.set(0);
break}}else n.set(n.current-d._options.carouselSteps)})},set:function(q){for(q=Math.max(q,0);n.hooks[q-1]+n.width>=n.max&&q>=0;)q--;n.current=q;n.animate()},getLast:function(q){return(q||n.current)-1},follow:function(q){if(q===0||q===n.hooks.length-2)n.set(q);else{for(var u=n.current;n.hooks[u]-n.hooks[n.current]<n.width&&u<=n.hooks.length;)u++;if(q-1<n.current)n.set(q-1);else q+2>u&&n.set(q-u+n.current+2)}},setClasses:function(){n.prev.toggleClass("disabled",!n.current);n.next.toggleClass("disabled",
n.hooks[n.current]+n.width>=n.max)},animate:function(){n.setClasses();var q=n.hooks[n.current]*-1;isNaN(q)||k.animate(d.get("thumbnails"),{left:q},{duration:d._options.carouselSpeed,easing:d._options.easing,queue:false})}},B=this._tooltip={initialized:false,open:false,init:function(){B.initialized=true;k.insertStyleTag(".galleria-tooltip{padding:3px 8px;max-width:50%;background:#ffe;color:#000;z-index:3;position:absolute;font-size:11px;line-height:1.3opacity:0;box-shadow:0 0 2px rgba(0,0,0,.4);-moz-box-shadow:0 0 2px rgba(0,0,0,.4);-webkit-box-shadow:0 0 2px rgba(0,0,0,.4);}");
d.$("tooltip").css("opacity",0.8);k.hide(d.get("tooltip"))},move:function(q){var u=d.getMousePosition(q).x;q=d.getMousePosition(q).y;var H=d.$("tooltip"),N=q,J=H.outerHeight(true)+1,E=H.outerWidth(true),L=J+15;E=d.$("container").width()-E-2;J=d.$("container").height()-J-2;if(!isNaN(u)&&!isNaN(N)){u+=10;N-=30;u=Math.max(0,Math.min(E,u));N=Math.max(0,Math.min(J,N));if(q<L)N=L;H.css({left:u,top:N})}},bind:function(q,u){if(!z.TOUCH){B.initialized||B.init();var H=function(N,J){B.define(N,J);j(N).hover(function(){k.clearTimer("switch_tooltip");
d.$("container").unbind("mousemove",B.move).bind("mousemove",B.move).trigger("mousemove");B.show(N);z.utils.addTimer("tooltip",function(){d.$("tooltip").stop().show().animate({opacity:1});B.open=true},B.open?0:500)},function(){d.$("container").unbind("mousemove",B.move);k.clearTimer("tooltip");d.$("tooltip").stop().animate({opacity:0},200,function(){d.$("tooltip").hide();k.addTimer("switch_tooltip",function(){B.open=false},1E3)})})};typeof u==="string"?H(q in d._dom?d.get(q):q,u):j.each(q,function(N,
J){H(d.get(N),J)})}},show:function(q){q=j(q in d._dom?d.get(q):q);var u=q.data("tt"),H=function(N){s.setTimeout(function(J){return function(){B.move(J)}}(N),10);q.unbind("mouseup",H)};if(u=typeof u==="function"?u():u){d.$("tooltip").html(u.replace(/\s/,"&nbsp;"));q.bind("mouseup",H)}},define:function(q,u){if(typeof u!=="function"){var H=u;u=function(){return H}}q=j(q in d._dom?d.get(q):q).data("tt",u);B.show(q)}},C=this._fullscreen={scrolled:0,active:false,keymap:d._keyboard.map,enter:function(q){C.active=
true;k.hide(d.getActiveImage());d.$("container").addClass("fullscreen");C.scrolled=M.scrollTop();k.forceStyles(d.get("container"),{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1E4});var u={height:"100%",overflow:"hidden",margin:0,padding:0},H=d.getData();k.forceStyles(Z().html,u);k.forceStyles(Z().body,u);C.keymap=j.extend({},d._keyboard.map);d.attachKeyboard({escape:d.exitFullscreen,right:d.next,left:d.prev});if(H&&H.big&&H.image!==H.big){u=new z.Picture;var N=u.isCached(H.big),
J=d.getIndex(),E=d._thumbnails[J];d.trigger({type:z.LOADSTART,cached:N,index:J,imageTarget:d.getActiveImage(),thumbTarget:E});u.load(H.big,function(L){d._scaleImage(L,{complete:function(X){d.trigger({type:z.LOADFINISH,cached:N,index:J,imageTarget:X.image,thumbTarget:E});var ba=d._controls.getActive().image;ba&&j(ba).width(X.image.width).height(X.image.height).attr("style",j(X.image).attr("style")).attr("src",X.image.src)}})})}d.rescale(function(){k.addTimer("fullscreen_enter",function(){k.show(d.getActiveImage());
typeof q==="function"&&q.call(d)},100);d.trigger(z.FULLSCREEN_ENTER)});M.resize(function(){C.scale()})},scale:function(){d.rescale()},exit:function(q){C.active=false;k.hide(d.getActiveImage());d.$("container").removeClass("fullscreen");k.revertStyles(d.get("container"),Z().html,Z().body);s.scrollTo(0,C.scrolled);d.detachKeyboard();d.attachKeyboard(C.keymap);d.rescale(function(){k.addTimer("fullscreen_exit",function(){k.show(d.getActiveImage());typeof q==="function"&&q.call(d)},50);d.trigger(z.FULLSCREEN_EXIT)});
M.unbind("resize",C.scale)}},D=this._idle={trunk:[],bound:false,add:function(q,u){if(q){D.bound||D.addEvent();q=j(q);var H={},N;for(N in u)if(u.hasOwnProperty(N))H[N]=q.css(N);q.data("idle",{from:H,to:u,complete:true,busy:false});D.addTimer();D.trunk.push(q)}},remove:function(q){q=jQuery(q);j.each(D.trunk,function(u,H){if(H.length&&!H.not(q).length){d._idle.show(q);d._idle.trunk.splice(u,1)}});if(!D.trunk.length){D.removeEvent();k.clearTimer("idle")}},addEvent:function(){D.bound=true;d.$("container").bind("mousemove click",
D.showAll)},removeEvent:function(){D.bound=false;d.$("container").unbind("mousemove click",D.showAll)},addTimer:function(){k.addTimer("idle",function(){d._idle.hide()},d._options.idleTime)},hide:function(){if(d._options.idleMode){d.trigger(z.IDLE_ENTER);j.each(D.trunk,function(q,u){var H=u.data("idle");if(H){u.data("idle").complete=false;k.animate(u,H.to,{duration:d._options.idleSpeed})}})}},showAll:function(){k.clearTimer("idle");j.each(d._idle.trunk,function(q,u){d._idle.show(u)})},show:function(q){var u=
q.data("idle");if(!u.busy&&!u.complete){u.busy=true;d.trigger(z.IDLE_EXIT);k.clearTimer("idle");k.animate(q,u.from,{duration:d._options.idleSpeed/2,complete:function(){j(this).data("idle").busy=false;j(this).data("idle").complete=true}})}D.addTimer()}},A=this._lightbox={width:0,height:0,initialized:false,active:null,image:null,elems:{},keymap:false,init:function(){d.trigger(z.LIGHTBOX_OPEN);if(!A.initialized){A.initialized=true;var q={},u=d._options,H="";u={overlay:"position:fixed;display:none;opacity:"+
u.overlayOpacity+";filter:alpha(opacity="+u.overlayOpacity*100+");top:0;left:0;width:100%;height:100%;background:"+u.overlayBackground+";z-index:99990",box:"position:fixed;display:none;width:400px;height:400px;top:50%;left:50%;margin-top:-200px;margin-left:-200px;z-index:99991",shadow:"position:absolute;background:#000;width:100%;height:100%;",content:"position:absolute;background-color:#fff;top:10px;left:10px;right:10px;bottom:10px;overflow:hidden",info:"position:absolute;bottom:10px;left:10px;right:10px;color:#444;font:11px/13px arial,sans-serif;height:13px",
close:"position:absolute;top:10px;right:10px;height:20px;width:20px;background:#fff;text-align:center;cursor:pointer;color:#444;font:16px/22px arial,sans-serif;z-index:99999",image:"position:absolute;top:10px;left:10px;right:10px;bottom:30px;overflow:hidden;display:block;",prevholder:"position:absolute;width:50%;top:0;bottom:40px;cursor:pointer;",nextholder:"position:absolute;width:50%;top:0;bottom:40px;right:-1px;cursor:pointer;",prev:"position:absolute;top:50%;margin-top:-20px;height:40px;width:30px;background:#fff;left:20px;display:none;text-align:center;color:#000;font:bold 16px/36px arial,sans-serif",
next:"position:absolute;top:50%;margin-top:-20px;height:40px;width:30px;background:#fff;right:20px;left:auto;display:none;font:bold 16px/36px arial,sans-serif;text-align:center;color:#000",title:"float:left",counter:"float:right;margin-left:8px;"};var N={};if(W===8){u.nextholder+="background:#000;filter:alpha(opacity=0);";u.prevholder+="background:#000;filter:alpha(opacity=0);"}j.each(u,function(J,E){H+=".galleria-lightbox-"+J+"{"+E+"}"});k.insertStyleTag(H);j.each("overlay box content shadow title info close prevholder prev nextholder next counter image".split(" "),
function(J,E){d.addElement("lightbox-"+E);q[E]=A.elems[E]=d.get("lightbox-"+E)});A.image=new z.Picture;j.each({box:"shadow content close prevholder nextholder",info:"title counter",content:"info image",prevholder:"prev",nextholder:"next"},function(J,E){var L=[];j.each(E.split(" "),function(X,ba){L.push("lightbox-"+ba)});N["lightbox-"+J]=L});d.append(N);j(q.image).append(A.image.container);j(Z().body).append(q.overlay,q.box);k.optimizeTouch(q.box);(function(J){return J.hover(function(){j(this).css("color",
"#bbb")},function(){j(this).css("color","#444")})})(j(q.close).bind("click",A.hide).html("&#215;"));j.each(["Prev","Next"],function(J,E){var L=j(q[E.toLowerCase()]).html(/v/.test(E)?"&#8249;&nbsp;":"&nbsp;&#8250;"),X=j(q[E.toLowerCase()+"holder"]);X.bind("click",function(){A["show"+E]()});W<8||z.TOUCH?L.show():X.hover(function(){L.show()},function(){L.stop().fadeOut(200)})});j(q.overlay).bind("click",A.hide);if(z.IPAD)d._options.lightboxTransitionSpeed=0}},rescale:function(q){var u=Math.min(M.width()-
40,A.width),H=Math.min(M.height()-60,A.height);H=Math.min(u/A.width,H/A.height);u=Math.round(A.width*H)+40;H=Math.round(A.height*H)+60;u={width:u,height:H,"margin-top":Math.ceil(H/2)*-1,"margin-left":Math.ceil(u/2)*-1};q?j(A.elems.box).css(u):j(A.elems.box).animate(u,{duration:d._options.lightboxTransitionSpeed,easing:d._options.easing,complete:function(){var N=A.image,J=d._options.lightboxFadeSpeed;d.trigger({type:z.LIGHTBOX_IMAGE,imageTarget:N.image});j(N.container).show();k.show(N.image,J);k.show(A.elems.info,
J)}})},hide:function(){A.image.image=null;M.unbind("resize",A.rescale);j(A.elems.box).hide();k.hide(A.elems.info);d.detachKeyboard();d.attachKeyboard(A.keymap);A.keymap=false;k.hide(A.elems.overlay,200,function(){j(this).hide().css("opacity",d._options.overlayOpacity);d.trigger(z.LIGHTBOX_CLOSE)})},showNext:function(){A.show(d.getNext(A.active))},showPrev:function(){A.show(d.getPrev(A.active))},show:function(q){A.active=q=typeof q==="number"?q:d.getIndex();A.initialized||A.init();if(!A.keymap){A.keymap=
j.extend({},d._keyboard.map);d.attachKeyboard({escape:A.hide,right:A.showNext,left:A.showPrev})}M.unbind("resize",A.rescale);var u=d.getData(q),H=d.getDataLength();k.hide(A.elems.info);A.image.load(u.big||u.image,function(N){A.width=N.original.width;A.height=N.original.height;j(N.image).css({width:"100.5%",height:"100.5%",top:0,zIndex:99998});k.hide(N.image);A.elems.title.innerHTML=u.title||"";A.elems.counter.innerHTML=q+1+" / "+H;M.resize(A.rescale);A.rescale()});j(A.elems.overlay).show();j(A.elems.box).show()}};
return this};z.prototype={constructor:z,init:function(d,h){var m=this;h=R(h);this._original={target:d,options:h,data:null};this._target=this._dom.target=d.nodeName?d:j(d).get(0);c.push(this);if(this._target){this._options={autoplay:false,carousel:true,carouselFollow:true,carouselSpeed:400,carouselSteps:"auto",clicknext:false,dataConfig:function(){return{}},dataSelector:"img",dataSource:this._target,debug:void 0,easing:"galleria",extend:function(){},fullscreenDoubleTap:true,height:"auto",idleMode:true,
idleTime:3E3,idleSpeed:200,imageCrop:false,imageMargin:0,imagePan:false,imagePanSmoothness:12,imagePosition:"50%",initialTransition:void 0,keepSource:false,lightbox:false,lightboxFadeSpeed:200,lightboxTransitionSpeed:200,linkSourceTmages:true,maxScaleRatio:void 0,minScaleRatio:void 0,overlayOpacity:0.85,overlayBackground:"#0b0b0b",pauseOnInteraction:true,popupLinks:false,preload:2,protect:false,queue:true,show:0,showInfo:true,showCounter:true,showImagenav:true,swipe:true,thumbCrop:true,thumbEventType:"click",
thumbFit:true,thumbMargin:0,thumbQuality:"auto",thumbnails:true,transition:"fade",transitionInitial:void 0,transitionSpeed:400,useCanvas:false,width:"auto"};this._options.initialTransition=this._options.initialTransition||this._options.transitionInitial;if(h&&h.debug===false)O=false;j(this._target).children().hide();typeof z.theme==="object"?this._init():k.wait({until:function(){return typeof z.theme==="object"},success:function(){m._init.call(m)},error:function(){z.raise("No theme found.",true)},
timeout:5E3})}else z.raise("Target not found.",true)},_init:function(){var d=this;if(this._initialized){z.raise("Init failed: Gallery instance already initialized.");return this}this._initialized=true;if(!z.theme){z.raise("Init failed: No theme found.");return this}j.extend(true,this._options,z.theme.defaults,this._original.options);(function(h){if("getContext"in h)S=S||{elem:h,context:h.getContext("2d"),cache:{},length:0}})(v.createElement("canvas"));this.bind(z.DATA,function(){this._original.data=
this._data;this.get("total").innerHTML=this.getDataLength();var h=this.$("container"),m={width:0,height:0},n=function(){return d.$("stage").height()};k.wait({until:function(){j.each(["width","height"],function(B,C){m[C]=d._options[C]&&typeof d._options[C]==="number"?d._options[C]:Math.max(k.parseValue(h.css(C)),k.parseValue(d.$("target").css(C)),h[C](),d.$("target")[C]());h[C](m[C])});return n()&&m.width&&m.height>10},success:function(){z.WEBKIT?s.setTimeout(function(){d._run()},1):d._run()},error:function(){n()?
z.raise("Could not extract sufficient width/height of the gallery container. Traced measures: width:"+m.width+"px, height: "+m.height+"px.",true):z.raise("Could not extract a stage height from the CSS. Traced height: "+n()+"px.",true)},timeout:2E3})});this.append({"info-text":["info-title","info-description"],info:["info-text"],"image-nav":["image-nav-right","image-nav-left"],stage:["images","loader","counter","image-nav"],"thumbnails-list":["thumbnails"],"thumbnails-container":["thumb-nav-left",
"thumbnails-list","thumb-nav-right"],container:["stage","thumbnails-container","info","tooltip"]});k.hide(this.$("counter").append(this.get("current")," / ",this.get("total")));this.setCounter("&#8211;");k.hide(d.get("tooltip"));this.$("container").addClass(z.TOUCH?"touch":"notouch");j.each(Array(2),function(h){var m=new z.Picture;j(m.container).css({position:"absolute",top:0,left:0});d.$("images").append(m.container);d._controls[h]=m});this.$("images").css({position:"relative",top:0,left:0,width:"100%",
height:"100%"});this.$("thumbnails, thumbnails-list").css({overflow:"hidden",position:"relative"});this.$("image-nav-right, image-nav-left").bind("click",function(h){d._options.clicknext&&h.stopPropagation();d._options.pauseOnInteraction&&d.pause();h=/right/.test(this.className)?"next":"prev";d[h]()});j.each(["info","counter","image-nav"],function(h,m){d._options["show"+m.substr(0,1).toUpperCase()+m.substr(1).replace(/-/,"")]===false&&k.moveOut(d.get(m.toLowerCase()))});this.load();if(!this._options.keep_source&&
!W)this._target.innerHTML="";this.$("target").append(this.get("container"));this._options.carousel&&this.bind(z.THUMBNAIL,function(){this.updateCarousel()});if(this._options.swipe){(function(h){var m=[0,0],n=[0,0],B=false,C=0,D,A={start:"touchstart",move:"touchmove",stop:"touchend"},q=function(H){if(!(H.originalEvent.touches&&H.originalEvent.touches.length>1)){D=H.originalEvent.touches?H.originalEvent.touches[0]:H;n=[D.pageX,D.pageY];m[0]||(m=n);Math.abs(m[0]-n[0])>10&&H.preventDefault()}},u=function(H){h.unbind(A.move,
q);if(H.originalEvent.touches&&H.originalEvent.touches.length||B)B=!B;else{if(k.timestamp()-C<1E3&&Math.abs(m[0]-n[0])>30&&Math.abs(m[1]-n[1])<100){H.preventDefault();d[m[0]>n[0]?"next":"prev"]()}m=n=[0,0]}};h.bind(A.start,function(H){if(!(H.originalEvent.touches&&H.originalEvent.touches.length>1)){D=H.originalEvent.touches?H.originalEvent.touches[0]:H;C=k.timestamp();m=n=[D.pageX,D.pageY];h.bind(A.move,q).one(A.stop,u)}})})(d.$("images"));this._options.fullscreenDoubleTap&&this.$("stage").bind("touchstart",
function(){var h,m,n,B,C,D;return function(A){D=z.utils.timestamp();m=(A.originalEvent.touches?A.originalEvent.touches[0]:A).pageX;n=(A.originalEvent.touches?A.originalEvent.touches[0]:A).pageY;if(D-h<500&&m-B<20&&n-C<20){d.toggleFullscreen();A.preventDefault();d.$("stage").unbind("touchend",arguments.callee)}else{h=D;B=m;C=n}}}())}k.optimizeTouch(this.get("container"));return this},_createThumbnails:function(){this.get("total").innerHTML=this.getDataLength();var d,h,m,n,B,C=this,D=this._options,
A=function(){var E=C.$("thumbnails").find(".active");if(!E.length)return false;return E.find("img").attr("src")}(),q=typeof D.thumbnails==="string"?D.thumbnails.toLowerCase():null,u=function(E){return v.defaultView&&v.defaultView.getComputedStyle?v.defaultView.getComputedStyle(m.container,null)[E]:B.css(E)},H=function(E,L,X){return function(){j(X).append(E);C.trigger({type:z.THUMBNAIL,thumbTarget:E,index:L})}},N=function(E){D.pauseOnInteraction&&C.pause();var L=j(E.currentTarget).data("index");C.getIndex()!==
L&&C.show(L);E.preventDefault()},J=function(E){E.scale({width:E.data.width,height:E.data.height,crop:D.thumbCrop,margin:D.thumbMargin,canvas:D.useCanvas,complete:function(L){var X=["left","top"],ba,la;j.each(["Width","Height"],function(ra,va){ba=va.toLowerCase();if((D.thumbCrop!==true||D.thumbCrop===ba)&&D.thumbFit){la={};la[ba]=L[ba];j(L.container).css(la);la={};la[X[ra]]=0;j(L.image).css(la)}L["outer"+va]=j(L.container)["outer"+va](true)});k.toggleQuality(L.image,D.thumbQuality===true||D.thumbQuality===
"auto"&&L.original.width<L.width*3);C.trigger({type:z.THUMBNAIL,thumbTarget:L.image,index:L.data.order})}})};this._thumbnails=[];this.$("thumbnails").empty();for(d=0;this._data[d];d++){n=this._data[d];if(D.thumbnails===true){m=new z.Picture(d);h=n.thumb||n.image;this.$("thumbnails").append(m.container);B=j(m.container);m.data={width:k.parseValue(u("width")),height:k.parseValue(u("height")),order:d};D.thumbFit&&D.thumbCrop!==true?B.css({width:0,height:0}):B.css({width:m.data.width,height:m.data.height});
m.load(h,J);D.preload==="all"&&m.add(n.image)}else if(q==="empty"||q==="numbers"){m={container:k.create("galleria-image"),image:k.create("img","span"),ready:true};q==="numbers"&&j(m.image).text(d+1);this.$("thumbnails").append(m.container);s.setTimeout(H(m.image,d,m.container),50+d*20)}else m={container:null,image:null};j(m.container).add(D.keepSource&&D.linkSourceImages?n.original:null).data("index",d).bind(D.thumbEventType,N);A===h&&j(m.container).addClass("active");this._thumbnails.push(m)}},_run:function(){var d=
this;d._createThumbnails();k.wait({until:function(){z.OPERA&&d.$("stage").css("display","inline-block");d._stageWidth=d.$("stage").width();d._stageHeight=d.$("stage").height();return d._stageWidth&&d._stageHeight>50},success:function(){ka.push(d);k.show(d.get("counter"));d._options.carousel&&d._carousel.bindControls();if(d._options.autoplay){d.pause();if(typeof d._options.autoplay==="number")d._playtime=d._options.autoplay;d.trigger(z.PLAY);d._playing=true}if(d._firstrun)typeof d._options.show===
"number"&&d.show(d._options.show);else{d._firstrun=true;if(d._options.clicknext&&!z.TOUCH){j.each(d._data,function(h,m){delete m.link});d.$("stage").css({cursor:"pointer"}).bind("click",function(){d._options.pauseOnInteraction&&d.pause();d.next()})}z.History&&z.History.change(function(h){h=parseInt(h.value.replace(/\//,""),10);isNaN(h)?s.history.go(-1):d.show(h,void 0,true)});j.each(z.ready.callbacks,function(){this.call(d,d._options)});d.trigger(z.READY);z.theme.init.call(d,d._options);d._options.extend.call(d,
d._options);if(/^[0-9]{1,4}$/.test(da)&&z.History)d.show(da,void 0,true);else d._data[d._options.show]&&d.show(d._options.show)}},error:function(){z.raise("Stage width or height is too small to show the gallery. Traced measures: width:"+d._stageWidth+"px, height: "+d._stageHeight+"px.",true)}})},load:function(d,h,m){var n=this;this._data=[];this._thumbnails=[];this.$("thumbnails").empty();if(typeof h==="function"){m=h;h=null}d=d||this._options.dataSource;h=h||this._options.dataSelector;m=m||this._options.dataConfig;
if(/^function Object/.test(d.constructor))d=[d];if(d.constructor===Array){if(this.validate(d)){this._data=d;this._parseData().trigger(z.DATA)}else z.raise("Load failed: JSON Array not valid.");return this}j(d).find(h).each(function(B,C){C=j(C);var D={},A=C.parent(),q=A.attr("href");A=A.attr("rel");var u=/\.(png|gif|jpg|jpeg)(\?.*)?$/i;if(u.test(q)){D.image=q;D.big=u.test(A)?A:q}else if(q)D.link=q;n._data.push(j.extend({title:C.attr("title")||"",thumb:C.attr("src"),image:C.attr("src"),big:C.attr("src"),
description:C.attr("alt")||"",link:C.attr("longdesc"),original:C.get(0)},D,m(C)))});this.getDataLength()?this.trigger(z.DATA):z.raise("Load failed: no data found.");return this},_parseData:function(){var d=this;j.each(this._data,function(h,m){if("thumb"in m===false)d._data[h].thumb=m.image;if(false in m)d._data[h].big=m.image});return this},splice:function(){Array.prototype.splice.apply(this._data,k.array(arguments));return this._parseData()._createThumbnails()},push:function(){Array.prototype.push.apply(this._data,
k.array(arguments));return this._parseData()._createThumbnails()},_getActive:function(){return this._controls.getActive()},validate:function(){return true},bind:function(d,h){d=ia(d);this.$("container").bind(d,this.proxy(h));return this},unbind:function(d){d=ia(d);this.$("container").unbind(d);return this},trigger:function(d){d=typeof d==="object"?j.extend(d,{scope:this}):{type:ia(d),scope:this};this.$("container").trigger(d);return this},addIdleState:function(){this._idle.add.apply(this._idle,k.array(arguments));
return this},removeIdleState:function(){this._idle.remove.apply(this._idle,k.array(arguments));return this},enterIdleMode:function(){this._idle.hide();return this},exitIdleMode:function(){this._idle.showAll();return this},enterFullscreen:function(){this._fullscreen.enter.apply(this,k.array(arguments));return this},exitFullscreen:function(){this._fullscreen.exit.apply(this,k.array(arguments));return this},toggleFullscreen:function(){this._fullscreen[this.isFullscreen()?"exit":"enter"].apply(this,k.array(arguments));
return this},bindTooltip:function(){this._tooltip.bind.apply(this._tooltip,k.array(arguments));return this},defineTooltip:function(){this._tooltip.define.apply(this._tooltip,k.array(arguments));return this},refreshTooltip:function(){this._tooltip.show.apply(this._tooltip,k.array(arguments));return this},openLightbox:function(){this._lightbox.show.apply(this._lightbox,k.array(arguments));return this},closeLightbox:function(){this._lightbox.hide.apply(this._lightbox,k.array(arguments));return this},
getActiveImage:function(){return this._getActive().image||void 0},getActiveThumb:function(){return this._thumbnails[this._active].image||void 0},getMousePosition:function(d){return{x:d.pageX-this.$("container").offset().left,y:d.pageY-this.$("container").offset().top}},addPan:function(d){if(this._options.imageCrop!==false){d=j(d||this.getActiveImage());var h=this,m=d.width()/2,n=d.height()/2,B=parseInt(d.css("left"),10),C=parseInt(d.css("top"),10),D=B||0,A=C||0,q=0,u=0,H=false,N=k.timestamp(),J=0,
E=0,L=function(ba,la,ra){if(ba>0){E=Math.round(Math.max(ba*-1,Math.min(0,la)));if(J!==E){J=E;if(W===8)d.parent()["scroll"+ra](E*-1);else{ba={};ba[ra.toLowerCase()]=E;d.css(ba)}}}},X=function(ba){if(!(k.timestamp()-N<50)){H=true;m=h.getMousePosition(ba).x;n=h.getMousePosition(ba).y}};if(W===8){d.parent().scrollTop(A*-1).scrollLeft(D*-1);d.css({top:0,left:0})}this.$("stage").unbind("mousemove",X).bind("mousemove",X);k.addTimer("pan",function(){if(H){q=d.width()-h._stageWidth;u=d.height()-h._stageHeight;
B=m/h._stageWidth*q*-1;C=n/h._stageHeight*u*-1;D+=(B-D)/h._options.imagePanSmoothness;A+=(C-A)/h._options.imagePanSmoothness;L(u,A,"Top");L(q,D,"Left")}},50,true);return this}},proxy:function(d,h){if(typeof d!=="function")return function(){};h=h||this;return function(){return d.apply(h,k.array(arguments))}},removePan:function(){this.$("stage").unbind("mousemove");k.clearTimer("pan");return this},addElement:function(){var d=this._dom;j.each(k.array(arguments),function(h,m){d[m]=k.create("galleria-"+
m)});return this},attachKeyboard:function(){this._keyboard.attach.apply(this._keyboard,k.array(arguments));return this},detachKeyboard:function(){this._keyboard.detach.apply(this._keyboard,k.array(arguments));return this},appendChild:function(d,h){this.$(d).append(this.get(h)||h);return this},prependChild:function(d,h){this.$(d).prepend(this.get(h)||h);return this},remove:function(){this.$(k.array(arguments).join(",")).remove();return this},append:function(d){var h,m;for(h in d)if(d.hasOwnProperty(h))if(d[h].constructor===
Array)for(m=0;d[h][m];m++)this.appendChild(h,d[h][m]);else this.appendChild(h,d[h]);return this},_scaleImage:function(d,h){h=j.extend({width:this._stageWidth,height:this._stageHeight,crop:this._options.imageCrop,max:this._options.maxScaleRatio,min:this._options.minScaleRatio,margin:this._options.imageMargin,position:this._options.imagePosition},h);(d||this._controls.getActive()).scale(h);return this},updateCarousel:function(){this._carousel.update();return this},rescale:function(d,h,m){var n=this;
if(typeof d==="function"){m=d;d=void 0}var B=function(){n._stageWidth=d||n.$("stage").width();n._stageHeight=h||n.$("stage").height();n._scaleImage();n._options.carousel&&n.updateCarousel();n.trigger(z.RESCALE);typeof m==="function"&&m.call(n)};z.WEBKIT&&!d&&!h?k.addTimer("scale",B,10):B.call(n);return this},refreshImage:function(){this._scaleImage();this._options.imagePan&&this.addPan();return this},show:function(d,h,m){if(!(d===false||!this._options.queue&&this._queue.stalled)){d=Math.max(0,Math.min(parseInt(d,
10),this.getDataLength()-1));h=typeof h!=="undefined"?!!h:d<this.getIndex();if(!m&&z.History)z.History.value(d.toString());else{this._active=d;Array.prototype.push.call(this._queue,{index:d,rewind:h});this._queue.stalled||this._show();return this}}},_show:function(){var d=this,h=this._queue[0],m=this.getData(h.index);if(m){var n=this.isFullscreen()&&"big"in m?m.big:m.image,B=this._controls.getActive(),C=this._controls.getNext(),D=C.isCached(n),A=this._thumbnails[h.index],q=function(E,L,X,ba,la){return function(){d._queue.stalled=
false;k.toggleQuality(L.image,d._options.imageQuality);j(X.container).css({zIndex:0,opacity:0}).show();j(L.container).css({zIndex:1,opacity:1}).show();d._controls.swap();d._options.imagePan&&d.addPan(L.image);if(E.link||d._options.lightbox)j(L.image).css({cursor:"pointer"}).bind("mouseup",function(){if(E.link)if(d._options.popupLinks)s.open(E.link,"_blank");else s.location.href=E.link;else d.openLightbox()});Array.prototype.shift.call(d._queue);d._queue.length&&d._show();d._playCheck();d.trigger({type:z.IMAGE,
index:ba.index,imageTarget:L.image,thumbTarget:la.image})}}(m,C,B,h,A);this._options.carousel&&this._options.carouselFollow&&this._carousel.follow(h.index);if(this._options.preload){var u,H;m=this.getNext();var N;try{for(H=this._options.preload;H>0;H--){u=new z.Picture;N=d.getData(m);u.add(this.isFullscreen()&&"big"in N?N.big:N.image);m=d.getNext(m)}}catch(J){}}k.show(C.container);j(d._thumbnails[h.index].container).addClass("active").siblings(".active").removeClass("active");d.trigger({type:z.LOADSTART,
cached:D,index:h.index,imageTarget:C.image,thumbTarget:A.image});C.load(n,function(E){d._scaleImage(E,{complete:function(L){"image"in B&&k.toggleQuality(B.image,false);k.toggleQuality(L.image,false);d._queue.stalled=true;d.removePan();d.setInfo(h.index);d.setCounter(h.index);d.trigger({type:z.LOADFINISH,cached:D,index:h.index,imageTarget:L.image,thumbTarget:d._thumbnails[h.index].image});var X=B.image===null&&d._options.initialTransition!==void 0?d._options.initialTransition:d._options.transition;
X in ja===false?q():ja[X].call(d,{prev:B.container,next:L.container,rewind:h.rewind,speed:d._options.transitionSpeed||400},q)}})})}},getNext:function(d){d=typeof d==="number"?d:this.getIndex();return d===this.getDataLength()-1?0:d+1},getPrev:function(d){d=typeof d==="number"?d:this.getIndex();return d===0?this.getDataLength()-1:d-1},next:function(){this.getDataLength()>1&&this.show(this.getNext(),false);return this},prev:function(){this.getDataLength()>1&&this.show(this.getPrev(),true);return this},
get:function(d){return d in this._dom?this._dom[d]:null},getData:function(d){return d in this._data?this._data[d]:this._data[this._active]},getDataLength:function(){return this._data.length},getIndex:function(){return typeof this._active==="number"?this._active:false},getStageHeight:function(){return this._stageHeight},getStageWidth:function(){return this._stageWidth},getOptions:function(d){return typeof d==="undefined"?this._options:this._options[d]},setOptions:function(d,h){if(typeof d==="object")j.extend(this._options,
d);else this._options[d]=h;return this},play:function(d){this._playing=true;this._playtime=d||this._playtime;this._playCheck();this.trigger(z.PLAY);return this},pause:function(){this._playing=false;this.trigger(z.PAUSE);return this},playToggle:function(d){return this._playing?this.pause():this.play(d)},isPlaying:function(){return this._playing},isFullscreen:function(){return this._fullscreen.active},_playCheck:function(){var d=this,h=0,m=k.timestamp(),n="play"+this._id;if(this._playing){k.clearTimer(n);
var B=function(){h=k.timestamp()-m;if(h>=d._playtime&&d._playing){k.clearTimer(n);d.next()}else if(d._playing){d.trigger({type:z.PROGRESS,percent:Math.ceil(h/d._playtime*100),seconds:Math.floor(h/1E3),milliseconds:h});k.addTimer(n,B,20)}};k.addTimer(n,B,20)}},setIndex:function(d){this._active=d;return this},setCounter:function(d){if(typeof d==="number")d++;else if(typeof d==="undefined")d=this.getIndex()+1;this.get("current").innerHTML=d;if(W){d=this.$("counter");var h=d.css("opacity"),m=d.attr("style");
m&&parseInt(h,10)===1?d.attr("style",m.replace(/filter[^\;]+\;/i,"")):this.$("counter").css("opacity",h)}return this},setInfo:function(d){var h=this,m=this.getData(d);j.each(["title","description"],function(n,B){var C=h.$("info-"+B);m[B]?C[m[B].length?"show":"hide"]().html(m[B]):C.empty().hide()});return this},hasInfo:function(d){var h="title description".split(" "),m;for(m=0;h[m];m++)if(this.getData(d)[h[m]])return true;return false},jQuery:function(d){var h=this,m=[];j.each(d.split(","),function(B,
C){C=j.trim(C);h.get(C)&&m.push(C)});var n=j(h.get(m.shift()));j.each(m,function(B,C){n=n.add(h.get(C))});return n},$:function(){return this.jQuery.apply(this,k.array(arguments))}};j.each(ha,function(d,h){var m=/_/.test(h)?h.replace(/_/g,""):h;z[h.toUpperCase()]="galleria."+m});j.extend(z,{IE9:W===9,IE8:W===8,IE7:W===7,IE6:W===6,IE:!!W,WEBKIT:/webkit/.test(Y),SAFARI:/safari/.test(Y),CHROME:/chrome/.test(Y),QUIRK:W&&v.compatMode&&v.compatMode==="BackCompat",MAC:/mac/.test(navigator.platform.toLowerCase()),
OPERA:!!s.opera,IPHONE:/iphone/.test(Y),IPAD:/ipad/.test(Y),ANDROID:/android/.test(Y),TOUCH:"ontouchstart"in document});z.addTheme=function(d){d.name||z.raise("No theme name specified");d.defaults=typeof d.defaults!=="object"?{}:R(d.defaults);var h=false,m;if(typeof d.css==="string"){j("link").each(function(n,B){m=RegExp(d.css);if(m.test(B.href)){h=true;z.theme=d;return false}});h||j("script").each(function(n,B){m=RegExp("galleria\\."+d.name.toLowerCase()+"\\.");if(m.test(B.src)){h=B.src.replace(/[^\/]*$/,
"")+d.css;k.addTimer("css",function(){k.loadCSS(h,"galleria-theme",function(){z.theme=d})},1)}});h||z.raise("No theme CSS loaded")}else z.theme=d;return d};z.loadTheme=function(d,h){var m=false,n=ka.length;z.theme=void 0;k.loadScript(d,function(){m=true});k.wait({until:function(){return m},error:function(){z.raise("Theme at "+d+" could not load, check theme path.",true)},success:function(){if(n){var B=[];j.each(z.get(),function(C,D){var A=j.extend(D._original.options,{data_source:D._data},h);D.$("container").remove();
var q=new z;q._id=D._id;q.init(D._original.target,A);B.push(q)});ka=B}},timeout:2E3})};z.get=function(d){if(c[d])return c[d];else if(typeof d!=="number")return c;else z.raise("Gallery index "+d+" not found")};z.addTransition=function(d,h){ja[d]=h};z.utils=k;z.log=function(){try{s.console.log.apply(s.console,k.array(arguments))}catch(d){try{s.opera.postError.apply(s.opera,arguments)}catch(h){s.alert(k.array(arguments).split(", "))}}};z.ready=function(d){z.ready.callbacks.push(d)};z.ready.callbacks=
[];z.raise=function(d,h){var m=h?"Fatal error":"Error",n=function(B){var C='<div style="padding:4px;margin:0 0 2px;background:#'+(h?"811":"222")+'";>'+(h?"<strong>"+m+": </strong>":"")+B+"</div>";j.each(c,function(){var D=this.$("errors"),A=this.$("target");if(!D.length){A.css("position","relative");D=this.addElement("errors").appendChild("target","errors").$("errors").css({color:"#fff",position:"absolute",top:0,left:0,zIndex:1E5})}D.append(C)})};if(O){n(d);if(h)throw Error(m+": "+d);}else if(h)if(!aa){aa=
true;h=false;n("Image gallery could not load.")}};z.Picture=function(d){this.id=d||null;this.image=null;this.container=k.create("galleria-image");j(this.container).css({overflow:"hidden",position:"relative"});this.original={width:0,height:0};this.loaded=this.ready=false};z.Picture.prototype={cache:{},add:function(d){var h=0,m=this,n=new Image,B=function(){if((!this.width||!this.height)&&h<1E3){h++;j(n).load(B).attr("src",d+"?"+(new Date).getTime())}m.original={height:this.height,width:this.width};
m.cache[d]=d;m.loaded=true};j(n).css("display","block");if(m.cache[d]){n.src=d;B.call(n);return n}j(n).load(B).error(function(){z.raise("image could not load: "+d)}).attr("src",d);return n},show:function(){k.show(this.image)},hide:function(){k.moveOut(this.image)},clear:function(){this.image=null},isCached:function(d){return!!this.cache[d]},load:function(d,h){var m=this;j(this.container).empty(true);this.image=this.add(d);k.hide(this.image);j(this.container).append(this.image);k.wait({until:function(){return m.loaded&&
m.image.complete&&m.original.width&&m.image.width},success:function(){s.setTimeout(function(){h.call(m,m)},1)},error:function(){s.setTimeout(function(){h.call(m,m)},1);z.raise("image not loaded in 30 seconds: "+d)},timeout:3E4});return this.container},scale:function(d){d=j.extend({width:0,height:0,min:void 0,max:void 0,margin:0,complete:function(){},position:"center",crop:false,canvas:false},d);if(!this.image)return this.container;var h,m,n=this,B=j(n.container),C;k.wait({until:function(){h=d.width||
B.width()||k.parseValue(B.css("width"));m=d.height||B.height()||k.parseValue(B.css("height"));return h&&m},success:function(){var D=(h-d.margin*2)/n.original.width,A=(m-d.margin*2)/n.original.height,q={"true":Math.max(D,A),width:D,height:A,"false":Math.min(D,A)}[d.crop.toString()];D="";if(d.max)q=Math.min(d.max,q);if(d.min)q=Math.max(d.min,q);j.each(["width","height"],function(J,E){j(n.image)[E](n[E]=n.image[E]=Math.round(n.original[E]*q))});j(n.container).width(h).height(m);if(d.canvas&&S){S.elem.width=
n.width;S.elem.height=n.height;D=n.image.src+":"+n.width+"x"+n.height;n.image.src=S.cache[D]||function(J){S.context.drawImage(n.image,0,0,n.original.width*q,n.original.height*q);try{C=S.elem.toDataURL();S.length+=C.length;return S.cache[J]=C}catch(E){return n.image.src}}(D)}var u={},H={};D=function(J,E,L){var X=0;if(/\%/.test(J)){J=parseInt(J,10)/100;E=n.image[E]||j(n.image)[E]();X=Math.ceil(E*-1*J+L*J)}else X=k.parseValue(J);return X};var N={top:{top:0},left:{left:0},right:{left:"100%"},bottom:{top:"100%"}};
j.each(d.position.toLowerCase().split(" "),function(J,E){if(E==="center")E="50%";u[J?"top":"left"]=E});j.each(u,function(J,E){N.hasOwnProperty(E)&&j.extend(H,N[E])});u=u.top?j.extend(u,H):H;u=j.extend({top:"50%",left:"50%"},u);j(n.image).css({position:"relative",top:D(u.top,"height",m),left:D(u.left,"width",h)});n.show();n.ready=true;d.complete.call(n,n)},error:function(){z.raise("Could not scale image: "+n.image.src)},timeout:1E3});return this}};j.extend(j.easing,{galleria:function(d,h,m,n,B){if((h/=
B/2)<1)return n/2*h*h*h+m;return n/2*((h-=2)*h*h+2)+m},galleriaIn:function(d,h,m,n,B){return n*(h/=B)*h+m},galleriaOut:function(d,h,m,n,B){return-n*(h/=B)*(h-2)+m}});j.fn.galleria=function(d){return this.each(function(){(new z).init(this,d)})};s.Galleria=z})(jQuery);(function(j){var s={prototyping:function(){j('img[src="#"]').attr("src","/media/i/placeholder.png").addClass("placeholder").each(function(){this.width-=2;this.height-=2});j('a[href="#"]').click(function(v){v.preventDefault()})},BROWSER:{IE:function(){for(var v=3,Q=document.createElement("div");Q.innerHTML="<\!--[if gt IE "+ ++v+"]><i></i><![endif]--\>",Q.getElementsByTagName("i")[0];);return v>4?v:void 0}()}};window.Aino=s;window.STATIC_URL="http://galleria.aino.se/static/";window.THEMES_URL=STATIC_URL+"themes/"})(jQuery);
//fine di galleria-1.2.4.js minimizzato
/**/
//lista delle immagini da utilizzare nella demo - inizio
var G_DEMO_IMAGES=[
{
 title:"Manzanar birds on wire",
 thumb:STATIC_URL+"i/sample/00_m.jpg",
 image:STATIC_URL+"i/sample/00.jpg",
 description:"Birds on wire, evening, Manzanar Relocation Center / photograph by Ansel Adams."
},

{
 title:"Antarctic Sunset",
 thumb:STATIC_URL+"i/sample/12_m.jpg",
 image:STATIC_URL+"i/sample/12.jpg",
 description:"An Antarctic Sunset, photo taken by Calee Allen on April 6th, 2008."
},
{title:"Locomotives Roundhouse",thumb:STATIC_URL+"i/sample/01_m.jpg",image:STATIC_URL+"i/sample/01.jpg",
description:"Steam locomotives of the Chicago & North Western Railway."},
{title:"Braunwald Alps",thumb:STATIC_URL+"i/sample/11_m.jpg",image:STATIC_URL+"i/sample/11.jpg",description:"View from Braunwald, Switzerland."},
{title:"Icebergs in the High Arctic",thumb:STATIC_URL+"i/sample/02_m.jpg",image:STATIC_URL+"i/sample/02.jpg",description:"\u201dThe debris loading isn't particularly extensive, but the color is usual.\u201d"},
{title:"Ara\u00f1a",thumb:STATIC_URL+"i/sample/03_m.jpg",image:STATIC_URL+"i/sample/03.jpg",description:"Xysticus cristatus, A Estrada, Galicia, Spain"},{title:"Museo storia naturale",thumb:STATIC_URL+"i/sample/04_m.jpg",image:STATIC_URL+"i/sample/04.jpg"},
{title:"Grj\u00f3tagj\u00e1 caves in summer 2009",thumb:STATIC_URL+"i/sample/05_m.jpg",image:STATIC_URL+"i/sample/05.jpg"},
{title:"Thermes",thumb:STATIC_URL+"i/sample/06_m.jpg",image:STATIC_URL+"i/sample/06.jpg",description:"Xanthi hot-spa springs, Xanthi Prefecture, Greece"},
{title:"Polish Army Ko\u0142obrzeg",thumb:STATIC_URL+"i/sample/07_m.jpg",image:STATIC_URL+"i/sample/07.jpg",description:"A display of the Polish Army. Both the soldier, and the vehicle belong to the 7th Pomeranian Coastal Defence Brigade, a part of the Szczecin-based 12th Mechanized Division \u201dBoles\u0142aw Krzywousty\u201d"},
{title:"Zlatograd Bulgaria",thumb:STATIC_URL+"i/sample/08_m.jpg",image:STATIC_URL+"i/sample/08.jpg"},
{title:"09-28-2001 in New York City",thumb:STATIC_URL+"i/sample/09_m.jpg",image:STATIC_URL+"i/sample/09.jpg",description:"New York, NY, September 28, 2001 -- Debris on surrounding roofs at the site of the World Trade Center. Photo by Andrea Booher/ FEMA News Photo"},
{thumb:STATIC_URL+"i/sample/10_m.jpg",image:STATIC_URL+"i/sample/10.jpg"}];
//lista delle immagini da utilizzare nella demo - fine

(function(j,s,v){var Q=[],M=j.G={init:function(O){this.views._global.call(this);for(var Y=document.body.className.split(" "),da=0;da<Y.length;da++)Y[da]in this.views&&this.views[Y[da]].call(this);typeof O==="number"&&M.run(O)},make:function(O,Y){Q[O]=Y},run:function(O,Y,da){Y=Y||"#demo";da=da||function(){};v.theme=Q[O];

/*
function dumpProps(obj, parent) {
   // Go through all the properties of the passed-in object
   for (var i in obj) {
      // if a parent (2nd parameter) was passed in, then use that to
      // build the message. Message includes i (the object's property name)
      // then the object's property value on a new line
      if (parent) { var msg = parent + "." + i + "\n" + obj[i]; } else { var msg = i + "\n" + obj[i]; }
      // Display the message. If the user clicks "OK", then continue. If they
      // click "CANCEL" then quit this level of recursion
      if (!confirm(msg)) { return; }
      // If this property (i) is an object, then recursively process the object
      if (typeof obj[i] == "object") {
         if (parent) { dumpProps(obj[i], parent + "." + i); } else { dumpProps(obj[i], i); }
      }
   }
}
dumpProps(v.theme);*/
//alert(j(S.thumbTarget));

v.utils.loadCSS(THEMES_URL+O+"/"+O+".css","galleria-theme",function(){s(Y).galleria({data_source:G_DEMO_IMAGES,extend:function(W){da.call(this,W)}})})},views:{_global:function(){s("a:path").addClass("active");

s(".secondary .box li:last").addClass("last")},home:function(){M.run(1,"#demo",function(){Galleria.TOUCH&&this.setOptions("transition","fadeslide")})},tp:function(){var O=s("#themes");s("#theme-switcher").click(function(){O.toggle()}).trigger("click")},docs:function(){},"theme-purchase":function(){s("input[type=image]").each(function(){var O=s("<a>",{href:"",html:"Buy Now <span>$"+s(this).siblings('[name|="amount"]').val()+"</span>",click:function(Y){Y.preventDefault();Y=s(this).closest("form");Y.length&&
Y.submit()}});s(this).replaceWith(O);O.wrap('<div class="btn" />')})}}};j.G=M})(window,jQuery,Galleria);(function(j){G.make(0,{defaults:{transition:"pulse",thumbCrop:true,imageCrop:true,carousel:false,imagePan:true,clicknext:true,_locale:{enter_fullscreen:"Enter fullscreen",exit_fullscreen:"Exit fullscreen",click_to_close:"Click to close",show_thumbnails:"Show thumbnails",show_info:"Show info"}},init:function(s){var v=this,Q=false,M;M=0;var O,Y,da;this.addElement("desc","dots","thumbs","fs","more");this.append({container:["desc","dots","thumbs","fs","info-description","more"]});da=this.$("thumbnails-container").hide().css("visibility",
"visible");var W=function(Z){return j("<div>").click(function(ha){return function(R){R.preventDefault();v.show(ha)}}(Z))};for(M=0;M<this.getDataLength();M++)this.$("dots").append(W(M));M=this.$("dots").outerWidth();O=this.$("desc").hide().hover(function(){j(this).addClass("hover")},function(){j(this).removeClass("hover")}).click(function(){j(this).hide()});Y=this.$("loader");this.bindTooltip({fs:function(){return Q?s._locale.exit_fullscreen:s._locale.enter_fullscreen},desc:s._locale.click_to_close,
more:s._locale.show_info,thumbs:s._locale.show_thumbnails});this.bind("loadstart",function(Z){Z.cached||this.$("loader").show().fadeTo(200,0.4)});this.bind("loadfinish",function(Z){var ha=v.getData().title,R=v.getData().description;O.hide();Y.fadeOut(200);this.$("dots").children("div").eq(Z.index).addClass("active").siblings(".active").removeClass("active");if(ha&&R){O.empty().append("<strong>"+ha+"</strong>","<p>"+R+"</p>").css({marginTop:this.$("desc").outerHeight()/-2});this.$("more").show()}else this.$("more").hide();
da.fadeOut(s.fadeSpeed);v.$("thumbs").removeClass("active")});this.bind("thumbnail",function(Z){j(Z.thumbTarget).hover(function(){v.setInfo(Z.index)},function(){v.setInfo()})});this.$("fs").click(function(){v.toggleFullscreen();Q=!Q});this.$("thumbs").click(function(Z){Z.preventDefault();da.toggle();j(this).toggleClass("active");O.hide()});this.$("more").click(function(){O.toggle()});this.$("info").css({width:this.getStageWidth()-M-30,left:M+10})}});G.make(1,{defaults:{transition:"pulse",transitionSpeed:500,
imageCrop:true,thumbCrop:true,carousel:false,_locale:{show_thumbnails:"Show thumbnails",hide_thumbnails:"Hide thumbnails",play:"Play slideshow",pause:"Pause slideshow",enter_fullscreen:"Enter fullscreen",exit_fullscreen:"Exit fullscreen",popout_image:"Popout image",showing_image:"Showing image %s of %s"},_showFullscreen:true,_showPopout:true,_showProgress:true,_showTooltip:true},init:function(s){this.addElement("bar","fullscreen","play","popout","thumblink","s1","s2","s3","s4","progress");this.append({stage:"progress",
container:["bar","tooltip"],bar:["fullscreen","play","popout","thumblink","info","s1","s2","s3","s4"]});this.prependChild("info","counter");var v=this,Q=this.$("thumbnails-container"),M=this.$("thumblink"),O=this.$("fullscreen"),Y=this.$("play"),da=this.$("popout"),W=this.$("bar"),Z=this.$("progress"),ha=s.transition,R=s._locale,ia=false,ga=false,ka=!!s.autoplay,c=false,aa=function(){Q.height(v.getStageHeight()).width(v.getStageWidth()).css("top",ia?0:v.getStageHeight()+30)};aa();s._showTooltip&&
v.bindTooltip({thumblink:R.show_thumbnails,fullscreen:R.enter_fullscreen,play:R.play,popout:R.popout_image,caption:function(){var S=v.getData(),k="";if(S){if(S.title&&S.title.length)k+="<strong>"+S.title+"</strong>";if(S.description&&S.description.length)k+="<br>"+S.description}return k},counter:function(){return R.showing_image.replace(/\%s/,v.getIndex()+1).replace(/\%s/,v.getDataLength())}});s.showInfo||this.$("info").hide();this.bind("play",function(){ka=true;Y.addClass("playing")});this.bind("pause",
function(){ka=false;Y.removeClass("playing");Z.width(0)});s._showProgress&&this.bind("progress",function(S){Z.width(S.percent/100*this.getStageWidth())});this.bind("loadstart",function(S){S.cached||this.$("loader").show()});this.bind("loadfinish",function(){Z.width(0);this.$("loader").hide();this.refreshTooltip("counter","caption")});this.bind("thumbnail",function(S){j(S.thumbTarget).hover(function(){v.setInfo(S.thumbOrder);v.setCounter(S.thumbOrder)},function(){v.setInfo();v.setCounter()}).click(function(){M.click()})});
this.bind("fullscreen_enter",function(){ga=true;v.setOptions("transition",false);O.addClass("open");W.css("bottom",0);this.defineTooltip("fullscreen",R.exit_fullscreen);this.addIdleState(W,{bottom:-31})});this.bind("fullscreen_exit",function(){ga=false;Galleria.utils.clearTimer("bar");v.setOptions("transition",ha);O.removeClass("open");W.css("bottom",0);this.defineTooltip("fullscreen",R.enter_fullscreen);this.removeIdleState(W,{bottom:-31})});this.bind("rescale",aa);this.addIdleState(this.get("image-nav-left"),
{left:-36});this.addIdleState(this.get("image-nav-right"),{right:-36});M.click(function(){if(ia&&c)v.play();else{c=ka;v.pause()}Q.animate({top:ia?v.getStageHeight()+30:0},{easing:"galleria",duration:400,complete:function(){v.defineTooltip("thumblink",ia?R.show_thumbnails:R.hide_thumbnails);M[ia?"removeClass":"addClass"]("open");ia=!ia}})});if(s._showPopout)da.click(function(S){v.openLightbox();S.preventDefault()});else{da.remove();if(s._showFullscreen){this.$("s4").remove();this.$("info").css("right",
40);O.css("right",0)}}Y.click(function(){v.defineTooltip("play",ka?R.play:R.pause);if(ka)v.pause();else{ia&&M.click();v.play()}});if(s._showFullscreen)O.click(function(){ga?v.exitFullscreen():v.enterFullscreen()});else{O.remove();if(s._show_popout){this.$("s4").remove();this.$("info").css("right",40);da.css("right",0)}}if(!s._showFullscreen&&!s._showPopout){this.$("s3,s4").remove();this.$("info").css("right",10)}s.autoplay&&this.trigger("play")}});G.make(2,{defaults:{transition:"none",imageCrop:true,
thumbCrop:"height",easing:"galleriaOut",_hideDock:Galleria.TOUCH?false:true,_closeOnClick:false},init:function(s){this.addElement("thumbnails-tab");this.appendChild("thumbnails-container","thumbnails-tab");var v=this.$("thumbnails-tab"),Q=this.$("loader"),M=this.$("thumbnails-container"),O=this.$("thumbnails-list"),Y=this.$("info-text"),da=this.$("info"),W=!s._hideDock,Z=0;if(Galleria.IE){this.addElement("iefix");this.appendChild("container","iefix");this.$("iefix").css({zIndex:3,position:"absolute",
backgroundColor:"#000",opacity:0.4,top:0})}s.thumbnails===false&&M.hide();var ha=this.proxy(function(R){if(R||R.width){R=Math.min(R.width,j(window).width());Y.width(R-40);Galleria.IE&&this.getOptions("showInfo")&&this.$("iefix").width(da.outerWidth()).height(da.outerHeight())}});this.bind("rescale",function(){Z=this.getStageHeight()-v.height()-2;M.css("top",W?Z-O.outerHeight()+2:Z);var R=this.getActiveImage();R&&ha(R)});this.bind("loadstart",function(R){R.cached||Q.show().fadeTo(100,1);j(R.thumbTarget).css("opacity",
1).parent().siblings().children().css("opacity",0.6)});this.bind("loadfinish",function(){Q.fadeOut(300);this.$("info, iefix").toggle(this.hasInfo())});this.bind("image",function(R){ha(R.imageTarget)});this.bind("thumbnail",function(R){j(R.thumbTarget).parent(":not(.active)").children().css("opacity",0.6);j(R.thumbTarget).click(function(){W&&s._closeOnClick&&v.click()})});this.trigger("rescale");if(!Galleria.TOUCH){this.addIdleState(M,{opacity:0});this.addIdleState(this.get("info"),{opacity:0})}Galleria.IE&&
this.addIdleState(this.get("iefix"),{opacity:0});this.$("image-nav-left, image-nav-right").css("opacity",0.01).hover(function(){j(this).animate({opacity:1},100)},function(){j(this).animate({opacity:0})}).show();if(s._hideDock)v.click(this.proxy(function(){v.toggleClass("open",!W);W?M.animate({top:Z},400,s.easing):M.animate({top:Z-O.outerHeight()+2},400,s.easing);W=!W}));else{this.bind("thumbnail",function(){M.css("top",Z-O.outerHeight()+2)});v.css("visibility","hidden")}this.$("thumbnails").children().hover(function(){j(this).not(".active").children().stop().fadeTo(100,
1)},function(){j(this).not(".active").children().stop().fadeTo(400,0.6)});this.enterFullscreen();this.attachKeyboard({escape:function(){return false},up:function(R){W||v.click();R.preventDefault()},down:function(R){W&&v.click();R.preventDefault()}})}});G.make(3,{defaults:{transition:"slide",thumbCrop:"height",_toggleInfo:true},init:function(s){this.addElement("info-link","info-close");this.append({info:["info-link","info-close"]});var v=this.$("info-link,info-close,info-text"),Q=Galleria.TOUCH,M=
Q?"touchstart":"click";this.$("loader,counter").show().css("opacity",0.4);if(!Q){this.addIdleState(this.get("image-nav-left"),{left:-50});this.addIdleState(this.get("image-nav-right"),{right:-50});this.addIdleState(this.get("counter"),{opacity:0})}if(s._toggleInfo===true)v.bind(M,function(){v.toggle()});else{v.show();this.$("info-link, info-close").hide()}this.bind("thumbnail",function(O){if(Q)j(O.thumbTarget).css("opacity",O.index==s.show?1:0.6);else{j(O.thumbTarget).css("opacity",0.6).parent().hover(function(){j(this).not(".active").children().stop().fadeTo(100,
1)},function(){j(this).not(".active").children().stop().fadeTo(400,0.6)});O.index===s.show&&j(O.thumbTarget).css("opacity",1)}});this.bind("loadstart",function(O){O.cached||this.$("loader").show().fadeTo(200,0.4);this.$("info").toggle(this.hasInfo());j(O.thumbTarget).css("opacity",1).parent().siblings().children().css("opacity",0.6)});this.bind("loadfinish",function(){this.$("loader").fadeOut(200)})}});G.make(4,{defaults:{transition:"pulse",thumbCrop:"width",imageCrop:false,carousel:false,show:false,
easing:"galleriaOut",fullscreenDoubleTap:false,_webkitCursor:true,_animate:true},init:function(s){this.addElement("preloader","loaded","close").append({container:"preloader",preloader:"loaded",stage:"close"});var v=this,Q=this.$("stage"),M=this.$("thumbnails"),O=this.$("images"),Y=this.$("info"),da=this.$("loader"),W=this.$("target"),Z=0,ha=W.width(),R=0,ia=s.show,ga=false,ka=function(aa){v.$("info").css({left:Math.max(20,j(window).width()/2-aa/2+10)})},c=function(aa,S){S=j.extend({speed:400,width:190,
onbrick:function(){},onheight:function(){},delay:0,debug:false},S);aa=j(aa);var k=aa.children(),ja=aa.width(),z=Math.floor(ja/S.width),d=[],h,m,n;ja={"float":"none",position:"absolute",display:j.browser.safari?"inline-block":"block"};if(aa.data("colCount")!==z){aa.data("colCount",z);if(k.length){for(h=0;h<z;h++)d[h]=0;aa.css("position","relative");k.css(ja).each(function(B,C){C=j(C);for(h=z-1;h>-1;h--)if(d[h]===Math.min.apply(window,d))m=h;n={top:d[m],left:S.width*m};if(!(typeof n.top!=="number"||
typeof n.left!=="number")){if(S.speed)window.setTimeout(function(D,A,q){return function(){Galleria.utils.animate(D,q,{easing:"galleriaOut",duration:A.speed,complete:A.onbrick})}}(C,S,n),B*S.delay);else{C.css(n);S.onbrick.call(C)}C.data("height")||C.data("height",C.outerHeight(true));d[m]+=C.data("height")}});k=Math.max.apply(window,d);if(!(k<0))if(typeof k==="number")if(S.speed)aa.animate({height:Math.max.apply(window,d)},S.speed,S.onheight);else{aa.height(Math.max.apply(window,d));S.onheight.call(aa)}}}};
Galleria.OPERA&&this.$("stage").css("display","none");this.bind("fullscreen_enter",function(){O.css("visibility","hidden");Q.show();this.$("container").css("height","100%");ga=true});this.bind("fullscreen_exit",function(){Q.hide();M.show();Y.hide();ga=false});this.bind("thumbnail",function(aa){this.addElement("plus");var S=aa.thumbTarget,k=this.$("plus").css({display:"block"}).insertAfter(S),ja=j(S).parent().data("index",aa.index);s.showInfo&&this.hasInfo(aa.index)&&k.append("<span>"+this.getData(aa.index).title+
"</span>");R=R||j(S).parent().outerWidth(true);j(S).css("opacity",0);ja.unbind(s.thumbEventType);Galleria.IE?k.hide():k.css("opacity",0);Galleria.TOUCH?ja.bind("touchstart",function(){k.css("opacity",1)}).bind("touchend",function(){k.hide()}):ja.hover(function(){Galleria.IE?k.show():k.stop().css("opacity",1)},function(){Galleria.IE?k.hide():k.stop().animate({opacity:0},300)});Z++;this.$("loaded").css("width",Z/this.getDataLength()*100+"%");if(Z===this.getDataLength()){this.$("preloader").fadeOut(100);
c(M,{width:R,speed:s._animate?400:0,onbrick:function(){var z=j(this).find("img");window.setTimeout(function(d){return function(){Galleria.utils.animate(d,{opacity:1},{duration:s.transition_speed});d.parent().bind(Galleria.TOUCH?"mouseup":"click",function(){M.hide();Y.hide();var h=j(this);v.enterFullscreen(function(){v.show(h.data("index"));if(h.data("index")===ia){O.css("visibility","visible");Y.toggle(v.hasInfo())}})})}}(z),s._animate?z.parent().data("index")*100:0)},onheight:function(){W.height(M.height())}})}});
this.bind("loadstart",function(aa){aa.cached||da.show()});this.bind("loadfinish",function(aa){Y.hide();ia=this.getIndex();O.css("visibility","visible");da.hide();if(this.hasInfo()&&s.showInfo)Y.fadeIn(s.transition?s.transitionSpeed:0);ka(aa.imageTarget.width)});if(!Galleria.TOUCH){this.addIdleState(this.get("image-nav-left"),{left:-100});this.addIdleState(this.get("image-nav-right"),{right:-100});this.addIdleState(this.get("info"),{opacity:0});this.addIdleState(this.get("close"),{top:-50})}this.$("container").css({width:s.width,
height:"auto"});s._webkitCursor&&Galleria.WEBKIT&&this.$("image-nav-right,image-nav-left").addClass("cur");if(Galleria.TOUCH){this.setOptions({transition:"fadeslide",initialTransition:false});this.$("image-nav").hide()}this.$("close").click(function(){v.exitFullscreen()});j(window).resize(function(){if(ga)v.getActiveImage()&&ka(v.getActiveImage().width);else{var aa=W.width();if(aa!==ha){ha=aa;c(M,{width:R,delay:50,debug:true,onheight:function(){W.height(M.height())}})}}})}})})(jQuery);(function(j){var s={ignoreFiles:["index.htm","index.html","index.shtml","index.cgi","index.php"],strictQuery:true,ignore:function(){return RegExp("("+this.ignoreFiles.join("|")+")","i")},window:function(){var v=window.location,Q=v.href.cleanPath(this.ignore()).split("/");v=v.search.substring(1).length>0?v.search.substring(1).split("&"):[];this.strictQuery||v.sort();return Q.concat(v)},anchor:function(v){var Q=v.getAttribute("href",1);if(!Q||v.nodeName!="A")return false;v=window.location;Q=Q.absUrl().cleanPath(this.ignore());
if(Q===(v.protocol+"//"+v.hostname).replace(/www\./,"").noSlash())return false;v=Q.split("?");Q=v[0].noSlash().split("/");v=v.length>1?v[1].split("&"):[];this.strictQuery||v.sort();return Q.concat(v)},compareArray:function(v,Q){if(v.length!=Q.length)return false;for(var M=0;M<Q.length;M++)if(v[M]!==Q[M])return false;return true},match:function(v){if(j(v).attr("href")=="#")return false;var Q=this.anchor(v),M=this.window();if(v.pathname.split("/").length<3)return this.compareArray(M,Q);return M.length<
Q.length?false:this.compareArray(M.slice(0,Q.length),Q)},current:function(v){if(j(v).attr("href")=="#")return false;v=this.anchor(v);return this.compareArray(this.window(),v)}};j.extend(j.expr[":"],{path:function(v){return s.match(v)}});j.extend(j.expr[":"],{current:function(v){return s.current(v)}});String.prototype.noSlash=function(){return this.lastIndexOf("/")===this.length-1||this.lastIndexOf("#")===this.length-1?this.substr(0,this.length-1):this.toString()};String.prototype.absUrl=function(){var v=
window.location,Q,M;if(/^\w+:/.test(this))return this.toString();Q=v.protocol+"//"+v.host;if(this.indexOf("/")===0)return Q+this.toString();v=v.pathname.replace(/\/[^\/]*$/,"");if(M=this.match(/\.\.\//g)){var O=this.substring(M.length*3);for(M=M.length;M--;)v=v.substring(0,v.lastIndexOf("/"))}else O=this.toString();return Q+v+"/"+O};String.prototype.cleanPath=function(v){return this.replace(/www\./i,"").replace(v,"").replace(/\.\//,"").noSlash().toString()}})(jQuery);
