/* jQuery v1.7.1 jquery.com | jquery.org/license */
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+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(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.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 contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={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,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof(r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);jQuery.noConflict();;function loadCurrentWeather()
{var wurl=the_ajax_script.ajaxurl;jQuery.ajax({type:"POST",url:wurl,data:"&action=wupdate",dataType:"text",cache:false,success:function(xml){jQuery('#m_updated').html('Oppdatert: '+jQuery(xml).find('oppdatert').text());jQuery('#m_icon').html(getTendencyImg(parseInt(jQuery(xml).find('tendency').text()),parseInt(jQuery(xml).find('picture').text()),parseInt(jQuery(xml).find('temp').text())));jQuery('#m_tekst').html(getTendencyTekst(parseInt(jQuery(xml).find('tendency').text()),parseInt(jQuery(xml).find('picture').text()),parseInt(jQuery(xml).find('temp').text()),parseInt(jQuery(xml).find('temptrend').text())));jQuery('#r_time').html(jQuery(xml).find('regn1').text()+' mm');jQuery('#r_dag').html(jQuery(xml).find('regn24').text()+' mm');jQuery('#r_mnd').html(jQuery(xml).find('regnmnd').text()+' mm');jQuery('#r_aar').html(jQuery(xml).find('regnaar').text()+' mm');comp=getWinddir(jQuery(xml).find('winddirection').text());var wspeed=parseInt(jQuery(xml).find('windspeed').text());dig=parseInt(wspeed);jQuery('#w_speed').html(jQuery(xml).find('windspeed').text()+' m/s ('+jQuery(xml).find('bftwind').text()+' '+jQuery(xml).find('bft').text()+')'+getTrendArrow(parseInt(jQuery(xml).find('windtrend').text())));jQuery('#w_gust').html(jQuery(xml).find('windgust').text()+' m/s i vindkasta');jQuery('#w_chill').html('F&oslash;lest som '+jQuery(xml).find('windchill').text()+'&degC');jQuery('#w_wind').html('Vind fr&aring; '+getWinddirTekst(jQuery(xml).find('winddirection').text()));jQuery('#w_avg').html(jQuery(xml).find('averagewind').text()+' m/s');jQuery('#w_max').html(jQuery(xml).find('maxwind').text()+' m/s - kl. '+jQuery(xml).find('maxwindtime').text());temp=parseInt(jQuery(xml).find('temp').text());jQuery('#t_cur').html(jQuery(xml).find('temp').text()+'&degC');jQuery('#t_avg').html(jQuery(xml).find('averagetemp').text()+'&degC '+getTrendArrow(parseInt(jQuery(xml).find('temptrend').text())));jQuery('#t_max').html(jQuery(xml).find('maxtemp').text()+'&degC - kl. '+jQuery(xml).find('maxtemptime').text());jQuery('#t_min').html(jQuery(xml).find('mintemp').text()+'&degC - kl. '+jQuery(xml).find('mintemptime').text());var pressure=parseFloat(jQuery(xml).find('barometer').text());jQuery('#p_dugg').html(jQuery(xml).find('duggpunkt').text()+'&degC '+getTrendArrow(parseInt(jQuery(xml).find('duggtrend').text())));jQuery('#p_fukt').html(jQuery(xml).find('fukt').text()+' % '+getTrendArrow(parseInt(jQuery(xml).find('fukttrend').text())));jQuery('#p_baro').html(pressure+' hPa '+getTrendArrow(parseInt(jQuery(xml).find('barotrend').text())));var timestamp=new Date().getTime();var wci='http://www.janroger.net/wp-content/plugins/weatherstation/webcamera/stardalen_webcam000M.jpg?time='+timestamp;var wchist1='http://www.janroger.net/wp-content/plugins/weatherstation/history.php?time='+timestamp+'&type=hours';var wchist2='http://www.janroger.net/wp-content/plugins/weatherstation/history.php?time='+timestamp+'&type=month';var wchist3='http://www.janroger.net/wp-content/plugins/weatherstation/history.php?time='+timestamp+'&type=year';jQuery("#wc_link").attr("href",wci);jQuery("#wc_image").html("<img  src='"+wci+"' alt='Klikk for stort bilde' width='200'/>");jQuery("#wc_hist_link_hours").attr("href",wchist1);jQuery("#wc_hist_link_month").attr("href",wchist2);jQuery("#wc_hist_link_year").attr("href",wchist3);}});}
function getTendencyImg(tendency,picture,temp)
{var img="";if(picture==0)
{if(tendency==0)
{if(temp>0)
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_17.png'/>";else
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_20.png'/>";}
else if(tendency==1)
{if(temp>0)
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_15.png'/>";else
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_15.png'/>";}
else
{if(temp>0)
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_17.png'/>";else
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_20.png'/>";}}
else if(picture==1)
{if(tendency==0)
{if(temp>0)
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_26.png'/>";else
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_26.png'/>";}
else if(tendency==1)
{if(temp>0)
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_2.png'/>";else
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_2.png'/>";}
else
{if(temp>0)
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_17.png'/>";else
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_20.png'/>";}}
else
{if(tendency==0)
{if(temp>0)
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_21.png'/>";else
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_21.png'/>";}
else if(tendency==1)
{if(temp>0)
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_21.png'/>";else
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_21.png'/>";}
else
{if(temp>0)
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_10.png'/>";else
img="<img src='/wp-content/plugins/weatherstation/img/BigImage_10.png'/>";}}
return img;}
function getTendencyTekst(tendency,picture,temp,temptrend)
{var img="TOM";if(picture==0)
{if(tendency==0)
{if(temp>0)
img="Regn og regnbyger. Stabilt.";else
img="Snø og snøbyger. Stabilt.";}
else if(tendency==1)
{if(temp>0)
img="Regn og regnbyger. Etterkvart betre ver.";else
img="Snø og snøbyger. Etterkvart betre ver.";}
else
{if(temp>0)
img="Aukande regn.";else
img="Aukande snø.";}}
else if(picture==1)
{if(tendency==0)
{if(temp>0)
img="Skya. Stabilt.";else
img="Skya. Stabilt.";}
else if(tendency==1)
{if(temp>0)
img="Skya. Etterkvart betre ver.";else
img="Skya. Etterkvart betre ver.";}
else
{if(temp>0)
img="Skya. Etterkvart regnbyger.";else
img="Skya. Etterkvart snsnøbyger.";}}
else
{if(tendency==0)
{if(temp>0)
img="Klarvêr. Stabilt.";else
img="Klarvêr. Stabilt.";}
else if(tendency==1)
{if(temp>0)
img="Klarvêret held fram.";else
img="Klarvêret held fram.";}
else
{if(temp>0)
img="Klarvêr. Etterkvart tilskyande.";else
img="Klarvêr. Etterkvart tilskyande.";}}
if(temptrend>0)
{img=img+' Varmare.';}
else if(temptrend<0)
{img=img+' Kaldare.';}
return img;}
function getTrendArrow(temptrend)
{var img="";if(temptrend>0)
{img="<img src='/wp-content/plugins/weatherstation/img/up.png' width='10px'/>";}
else if(temptrend<0)
{img="<img src='/wp-content/plugins/weatherstation/img/down.png'  width='10px'/>";}
else
{img="<img src='/wp-content/plugins/weatherstation/img/stable.png'  width='10px'/>";}
return img;}
function getWinddir(w)
{var dir=0;if(w=="N")
dir=0;else if(w=="NNE")
dir=22;else if(w=="NE")
dir=45;else if(w=="ENE")
dir=67;else if(w=="E")
dir=90;else if(w=="ESE")
dir=112;else if(w=="SE")
dir=134;else if(w=="SSE")
dir=157;else if(w=="S")
dir=180;else if(w=="SSW")
dir=202;else if(w=="SW")
dir=224;else if(w=="WSW")
dir=246;else if(w=="W")
dir=269;else if(w=="WNW")
dir=291;else if(w=="NW")
dir=314;else if(w=="NNW")
dir=337;return dir;}
function getWinddirTekst(w)
{var dir="";if(w=="N")
dir="nord";else if(w=="NNE")
dir="nord nordaust";else if(w=="NE")
dir="nordaust";else if(w=="ENE")
dir="aust nordaust";else if(w=="E")
dir="aust";else if(w=="ESE")
dir="aust s&oslash;raust";else if(w=="SE")
dir="s&oslash;raust";else if(w=="SSE")
dir="s&oslash;r s&oslash;aust";else if(w=="S")
dir="s&oslash;r";else if(w=="SSW")
dir="s&oslash;r s&oslash;rvest";else if(w=="SW")
dir="s&oslash;rvest";else if(w=="WSW")
dir="vest s&oslash;rvest";else if(w=="W")
dir="vest";else if(w=="WNW")
dir="vest nordvest";else if(w=="NW")
dir="nordvest";else if(w=="NNW")
dir="nord nordvest";return dir;};if(typeof(RGraph)=='undefined')RGraph={isRGraph:true,type:'common'};RGraph.Registry={};RGraph.Registry.store=[];RGraph.Registry.store['chart.event.handlers']=[];RGraph.background={};RGraph.objects=[];RGraph.Resizing={};RGraph.events=[];RGraph.getScale=function(max,obj)
{if(max==0){return['0.2','0.4','0.6','0.8','1.0'];}
var original_max=max;if(max<=1){if(max>0.5){return[0.2,0.4,0.6,0.8,Number(1).toFixed(1)];}else if(max>=0.1){return obj.Get('chart.scale.round')?[0.2,0.4,0.6,0.8,1]:[0.1,0.2,0.3,0.4,0.5];}else{var tmp=max;var exp=0;while(tmp<1.01){exp+=1;tmp*=10;}
var ret=['2e-'+exp,'4e-'+exp,'6e-'+exp,'8e-'+exp,'10e-'+exp];if(max<=('5e-'+exp)){ret=['1e-'+exp,'2e-'+exp,'3e-'+exp,'4e-'+exp,'5e-'+exp];}
return ret;}}
if(String(max).indexOf('.')>0){max=String(max).replace(/\.\d+$/,'');}
var interval=Math.pow(10,Number(String(Number(max)).length-1));var topValue=interval;while(topValue<max){topValue+=(interval/2);}
if(Number(original_max)>Number(topValue)){topValue+=(interval/2);}
if(max<10){topValue=(Number(original_max)<=5?5:10);}
if(obj&&typeof(obj.Get('chart.scale.round'))=='boolean'&&obj.Get('chart.scale.round')){topValue=10*interval;}
return[topValue*0.2,topValue*0.4,topValue*0.6,topValue*0.8,topValue];}
RGraph.array_max=function(arr)
{var max=null;if(typeof(arr)=='number'){return arr;}
for(var i=0;i<arr.length;++i){if(typeof(arr[i])=='number'){var val=arguments[1]?Math.abs(arr[i]):arr[i];if(typeof(max)=='number'){max=Math.max(max,val);}else{max=val;}}}
return max;}
RGraph.array_pad=function(arr,len)
{if(arr.length<len){var val=arguments[2]?arguments[2]:null;for(var i=arr.length;i<len;++i){arr[i]=val;}}
return arr;}
RGraph.array_sum=function(arr)
{if(typeof(arr)=='number'){return arr;}
var i,sum;var len=arr.length;for(i=0,sum=0;i<len;sum+=arr[i++]);return sum;}
RGraph.is_array=function(obj)
{return obj!=null&&obj.constructor.toString().indexOf('Array')!=-1;}
RGraph.degrees2Radians=function(degrees)
{return degrees*(Math.PI/180);}
RGraph.lineByAngle=function(context,x,y,angle,length)
{context.arc(x,y,length,angle,angle,false);context.lineTo(x,y);context.arc(x,y,length,angle,angle,false);}
RGraph.Text=function(context,font,size,x,y,text)
{if(typeof(text)=='string'&&text.match(/\r\n/)){var arr=text.split('\r\n');text=arr[0];arr=RGraph.array_shift(arr);var nextline=arr.join('\r\n')
RGraph.Text(context,font,size,arguments[9]==-90?(x+(size*1.5)):x,y+(size*1.5),nextline,arguments[6]?arguments[6]:null,'center',arguments[8],arguments[9],arguments[10],arguments[11],arguments[12]);}
if(RGraph.isIE8()){y+=2;}
context.font=(arguments[11]?'Bold ':'')+size+'pt '+font;var i;var origX=x;var origY=y;var originalFillStyle=context.fillStyle;var originalLineWidth=context.lineWidth;if(typeof(arguments[6])==null)arguments[6]='bottom';if(typeof(arguments[7])==null)arguments[7]='left';if(typeof(arguments[8])==null)arguments[8]=null;if(typeof(arguments[9])==null)arguments[9]=0;if(typeof(arguments[12])==null)arguments[12]=true;if(navigator.userAgent.indexOf('Opera')!=-1){context.canvas.__rgraph_valign__=arguments[6];context.canvas.__rgraph_halign__=arguments[7];}
context.save();context.canvas.__rgraph_originalx__=x;context.canvas.__rgraph_originaly__=y;context.translate(x,y);x=0;y=0;if(arguments[9]){context.rotate(arguments[9]/57.3);}
if(arguments[6]){var vAlign=arguments[6];if(vAlign=='center'){context.translate(0,size/2);}else if(vAlign=='top'){context.translate(0,size);}}
if(arguments[7]){var hAlign=arguments[7];var width=context.measureText(text).width;if(hAlign){if(hAlign=='center'){context.translate(-1*(width/2),0)}else if(hAlign=='right'){context.translate(-1*width,0)}}}
context.fillStyle=originalFillStyle;context.save();context.fillText(text,0,0);context.lineWidth=0.5;if(arguments[8]){var width=context.measureText(text).width;var ieOffset=RGraph.isIE8()?2:0;context.translate(x,y);context.strokeRect(0-3,0-3-size-ieOffset,width+6,0+size+6);if(arguments[10]){var offset=3;var ieOffset=RGraph.isIE8()?2:0;var width=context.measureText(text).width
context.fillStyle=arguments[10];context.fillRect(x-offset,y-size-offset-ieOffset,width+(2*offset),size+(2*offset));}
context.fillStyle=originalFillStyle;context.fillText(text,0,0);if(arguments[12]){context.fillRect(arguments[7]=='left'?0:(arguments[7]=='center'?width/2:width)-2,arguments[6]=='bottom'?0:(arguments[6]=='center'?(0-size)/2:0-size)-2,4,4);}}
context.restore();context.lineWidth=originalLineWidth;context.restore();}
RGraph.Clear=function(canvas)
{var context=canvas.getContext('2d');var color=arguments[1];if(RGraph.isIE8()&&!color){color='white';}
if(!color||(color&&color=='transparent')){context.clearRect(0,0,canvas.width,canvas.height);context.globalCompositeOperation='source-over';}else{context.fillStyle=color;context=canvas.getContext('2d');context.beginPath();if(RGraph.isIE8()){context.fillRect(0,0,canvas.width,canvas.height);}else{context.fillRect(-10,-10,canvas.width+20,canvas.height+20);}
context.fill();}
if(RGraph.ClearAnnotations){RGraph.ClearAnnotations(canvas.id);}
RGraph.FireCustomEvent(canvas.__object__,'onclear');}
RGraph.DrawTitle=function(canvas,text,gutterTop)
{var obj=canvas.__object__;var context=canvas.getContext('2d');var gutterLeft=obj.Get('chart.gutter.left');var gutterRight=obj.Get('chart.gutter.right');var gutterBottom=obj.Get('chart.gutter.bottom');var size=arguments[4]?arguments[4]:12;var bold=obj.Get('chart.title.bold');var centerx=(arguments[3]?arguments[3]:((obj.canvas.width-gutterLeft-gutterRight)/2)+gutterLeft);var keypos=obj.Get('chart.key.position');var vpos=obj.Get('chart.title.vpos');var hpos=obj.Get('chart.title.hpos');var bgcolor=obj.Get('chart.title.background');if(obj.type=='bar'&&obj.Get('chart.variant')=='3d'){keypos='gutter';}
context.beginPath();context.fillStyle=obj.Get('chart.text.color')?obj.Get('chart.text.color'):'black';if(keypos&&keypos!='gutter'){var vCenter='center';}else if(!keypos){var vCenter='center';}else{var vCenter='bottom';}
if(typeof(obj.Get('chart.title.vpos'))=='number'){vpos=obj.Get('chart.title.vpos')*gutterTop;if(obj.Get('chart.xaxispos')=='top'){vpos=obj.Get('chart.title.vpos')*gutterBottom+gutterTop+(obj.canvas.height-gutterTop-gutterBottom);}}else{vpos=gutterTop-size-5;if(obj.Get('chart.xaxispos')=='top'){vpos=obj.canvas.height-gutterBottom+size+5;}}
if(typeof(hpos)=='number'){centerx=hpos*canvas.width;}
if(typeof(obj.Get('chart.title.color')!=null)){var oldColor=context.fillStyle
var newColor=obj.Get('chart.title.color')
context.fillStyle=newColor?newColor:'black';}
var font=obj.Get('chart.text.font');if(typeof(obj.Get('chart.title.font'))=='string'){font=obj.Get('chart.title.font');}
RGraph.Text(context,font,size,centerx,vpos,text,vCenter,'center',bgcolor!=null,null,bgcolor,bold);context.fillStyle=oldColor;}
RGraph.getMouseXY=function(e)
{var obj=(RGraph.isIE8()?event.srcElement:e.target);var x;var y;if(RGraph.isIE8())e=event;if(typeof(e.offsetX)=='number'&&typeof(e.offsetY)=='number'){x=e.offsetX;y=e.offsetY;}else{x=0;y=0;while(obj!=document.body&&obj){x+=obj.offsetLeft;y+=obj.offsetTop;obj=obj.offsetParent;}
x=e.pageX-x;y=e.pageY-y;}
return[x,y];}
RGraph.getCanvasXY=function(canvas)
{var x=0;var y=0;var obj=canvas;do{x+=obj.offsetLeft;y+=obj.offsetTop;obj=obj.offsetParent;}while(obj&&obj.tagName.toLowerCase()!='body');return[x,y];}
RGraph.Register=function(obj)
{var key=obj.id+'_'+obj.type;RGraph.objects[key]=obj;}
RGraph.Redraw=function()
{for(i in RGraph.objects){if(typeof(i)=='string'&&typeof(RGraph.objects[i])=='object'&&typeof(RGraph.objects[i].type)=='string'&&RGraph.objects[i].isRGraph){if(!arguments[0]||arguments[0]!=RGraph.objects[i].id){RGraph.Clear(RGraph.objects[i].canvas,arguments[1]?arguments[1]:null);RGraph.objects[i].Draw();}}}}
RGraph.pr=function(obj)
{var str='';var indent=(arguments[2]?arguments[2]:'');switch(typeof(obj)){case'number':if(indent==''){str+='Number: '}
str+=String(obj);break;case'string':if(indent==''){str+='String ('+obj.length+'):'}
str+='"'+String(obj)+'"';break;case'object':if(obj==null){str+='null';break;}
str+='Object\n'+indent+'(\n';for(var i in obj){if(typeof(i)=='string'||typeof(i)=='number'){str+=indent+' '+i+' => '+RGraph.pr(obj[i],true,indent+'    ')+'\n';}}
var str=str+indent+')';break;case'function':str+=obj;break;case'boolean':str+='Boolean: '+(obj?'true':'false');break;}
if(arguments[1]){return str;}else{alert(str);}}
RGraph.Registry.Set=function(name,value)
{RGraph.Registry.store[name]=value;return value;}
RGraph.Registry.Get=function(name)
{return RGraph.Registry.store[name];}
RGraph.background.Draw=function(obj)
{var canvas=obj.canvas;var context=obj.context;var height=0;var gutterLeft=obj.Get('chart.gutter.left');var gutterRight=obj.Get('chart.gutter.right');var gutterTop=obj.Get('chart.gutter.top');var gutterBottom=obj.Get('chart.gutter.bottom');var variant=obj.Get('chart.variant');context.fillStyle=obj.Get('chart.text.color');if(variant=='3d'){context.save();context.translate(10,-5);}
if(typeof(obj.Get('chart.title.xaxis'))=='string'&&obj.Get('chart.title.xaxis').length){var size=obj.Get('chart.text.size')+2;var font=obj.Get('chart.text.font');var bold=obj.Get('chart.title.xaxis.bold');if(typeof(obj.Get('chart.title.xaxis.size'))=='number'){size=obj.Get('chart.title.xaxis.size');}
if(typeof(obj.Get('chart.title.xaxis.font'))=='string'){font=obj.Get('chart.title.xaxis.font');}
var hpos=((obj.canvas.width-obj.gutterLeft-obj.gutterRight)/2)+obj.gutterLeft;var vpos=obj.canvas.height-obj.Get('chart.gutter.bottom')+25;if(typeof(obj.Get('chart.title.xaxis.pos'))=='number'){vpos=obj.canvas.height-(gutterBottom*obj.Get('chart.title.xaxis.pos'));}
context.beginPath();RGraph.Text(context,font,size,hpos,vpos,obj.Get('chart.title.xaxis'),'center','center',false,false,false,bold);context.fill();}
if(typeof(obj.Get('chart.title.yaxis'))=='string'&&obj.Get('chart.title.yaxis').length){var size=obj.Get('chart.text.size')+2;var font=obj.Get('chart.text.font');var angle=270;var bold=obj.Get('chart.title.yaxis.bold');if(typeof(obj.Get('chart.title.yaxis.pos'))=='number'){var yaxis_title_pos=obj.Get('chart.title.yaxis.pos')*obj.Get('chart.gutter.left');}else{var yaxis_title_pos=((obj.Get('chart.gutter.left')-25)/obj.Get('chart.gutter.left'))*obj.Get('chart.gutter.left');}
if(typeof(obj.Get('chart.title.yaxis.size'))=='number'){size=obj.Get('chart.title.yaxis.size');}
if(typeof(obj.Get('chart.title.yaxis.font'))=='string'){font=obj.Get('chart.title.yaxis.font');}
if(obj.Get('chart.title.yaxis.align')=='right'||obj.Get('chart.title.yaxis.position')=='right'){angle=90;yaxis_title_pos=obj.canvas.width-yaxis_title_pos;}else{yaxis_title_pos=yaxis_title_pos;}
context.beginPath();RGraph.Text(context,font,size,yaxis_title_pos,((obj.canvas.height-obj.gutterTop-obj.gutterBottom)/2)+obj.gutterTop,obj.Get('chart.title.yaxis'),'center','center',false,angle,false,bold);context.fill();}
obj.context.beginPath();context.fillStyle=obj.Get('chart.background.barcolor1');height=(RGraph.GetHeight(obj)-gutterBottom);for(var i=gutterTop;i<height;i+=80){obj.context.fillRect(gutterLeft,i,RGraph.GetWidth(obj)-gutterLeft-gutterRight,Math.min(40,RGraph.GetHeight(obj)-gutterBottom-i));}
context.fillStyle=obj.Get('chart.background.barcolor2');height=(RGraph.GetHeight(obj)-gutterBottom);for(var i=(40+gutterTop);i<height;i+=80){obj.context.fillRect(gutterLeft,i,RGraph.GetWidth(obj)-gutterLeft-gutterRight,i+40>(RGraph.GetHeight(obj)-gutterBottom)?RGraph.GetHeight(obj)-(gutterBottom+i):40);}
context.stroke();if(obj.Get('chart.background.grid')){if(obj.Get('chart.background.grid.autofit')){if(obj.Get('chart.background.grid.autofit.align')){obj.Set('chart.background.grid.autofit.numhlines',obj.Get('chart.ylabels.count'));if(obj.type=='line'){if(obj.Get('chart.labels')&&obj.Get('chart.labels').length){obj.Set('chart.background.grid.autofit.numvlines',obj.Get('chart.labels').length-1);}else{obj.Set('chart.background.grid.autofit.numvlines',obj.data[0].length-1);}}else if(obj.type=='bar'&&obj.Get('chart.labels')&&obj.Get('chart.labels').length){obj.Set('chart.background.grid.autofit.numvlines',obj.Get('chart.labels').length);}}
var vsize=((RGraph.GetWidth(obj)-gutterLeft-gutterRight))/obj.Get('chart.background.grid.autofit.numvlines');var hsize=(RGraph.GetHeight(obj)-gutterTop-gutterBottom)/obj.Get('chart.background.grid.autofit.numhlines');obj.Set('chart.background.grid.vsize',vsize);obj.Set('chart.background.grid.hsize',hsize);}
context.beginPath();context.lineWidth=obj.Get('chart.background.grid.width')?obj.Get('chart.background.grid.width'):1;context.strokeStyle=obj.Get('chart.background.grid.color');if(obj.Get('chart.background.grid.hlines')){height=(RGraph.GetHeight(obj)-gutterBottom)
for(y=gutterTop;y<height;y+=obj.Get('chart.background.grid.hsize')){context.moveTo(gutterLeft,y);context.lineTo(RGraph.GetWidth(obj)-gutterRight,y);}}
if(obj.Get('chart.background.grid.vlines')){var width=(RGraph.GetWidth(obj)-gutterRight)
for(x=gutterLeft;x<=width;x+=obj.Get('chart.background.grid.vsize')){context.moveTo(x,gutterTop);context.lineTo(x,RGraph.GetHeight(obj)-gutterBottom);}}
if(obj.Get('chart.background.grid.border')){context.strokeStyle=obj.Get('chart.background.grid.color');context.strokeRect(gutterLeft,gutterTop,RGraph.GetWidth(obj)-gutterLeft-gutterRight,RGraph.GetHeight(obj)-gutterTop-gutterBottom);}}
context.stroke();if(variant=='3d'){context.restore();}
if(typeof(obj.Get('chart.title'))=='string'){if(obj.type=='gantt'){gutterTop-=10;}
RGraph.DrawTitle(canvas,obj.Get('chart.title'),gutterTop,null,obj.Get('chart.title.size')?obj.Get('chart.title.size'):obj.Get('chart.text.size')+2);}
context.stroke();}
RGraph.GetDays=function(obj)
{var year=obj.getFullYear();var days=obj.getDate();var month=obj.getMonth();if(month==0)return days;if(month>=1)days+=31;if(month>=2)days+=28;if(year>=2008&&year%4==0)days+=1;if(month>=3)days+=31;if(month>=4)days+=30;if(month>=5)days+=31;if(month>=6)days+=30;if(month>=7)days+=31;if(month>=8)days+=31;if(month>=9)days+=30;if(month>=10)days+=31;if(month>=11)days+=30;return days;}
RGraph.DrawKey=function(obj,key,colors)
{var canvas=obj.canvas;var context=obj.context;context.lineWidth=1;context.beginPath();var keypos=obj.Get('chart.key.position');var textsize=obj.Get('chart.text.size');if(typeof(obj.Get('chart.key.vpos'))=='number'){obj.Set('chart.key.position.y',obj.Get('chart.key.vpos')*this.Get('chart.gutter.top'));}
var key_non_null=[];var colors_non_null=[];for(var i=0;i<key.length;++i){if(key[i]!=null){colors_non_null.push(colors[i]);key_non_null.push(key[i]);}}
key=key_non_null;colors=colors_non_null;if(keypos&&keypos=='gutter'){RGraph.DrawKey_gutter(obj,key,colors);}else if(keypos&&keypos=='graph'){RGraph.DrawKey_graph(obj,key,colors);}else{alert('[COMMON] ('+obj.id+') Unknown key position: '+keypos);}}
RGraph.DrawKey_graph=function(obj,key,colors)
{var canvas=obj.canvas;var context=obj.context;var text_size=typeof(obj.Get('chart.key.text.size'))=='number'?obj.Get('chart.key.text.size'):obj.Get('chart.text.size');var text_font=obj.Get('chart.text.font');var gutterLeft=obj.Get('chart.gutter.left');var gutterRight=obj.Get('chart.gutter.right');var gutterTop=obj.Get('chart.gutter.top');var gutterBottom=obj.Get('chart.gutter.bottom');var hpos=obj.Get('chart.yaxispos')=='right'?gutterLeft+10:RGraph.GetWidth(obj)-gutterRight-10;var vpos=gutterTop+10;var title=obj.Get('chart.title');var blob_size=text_size;var hmargin=8;var vmargin=4;var fillstyle=obj.Get('chart.key.background');var strokestyle='#333';var height=0;var width=0;obj.coordsKey=[];context.font=text_size+'pt '+obj.Get('chart.text.font');for(i=0;i<key.length;++i){width=Math.max(width,context.measureText(key[i]).width);}
width+=5;width+=blob_size;width+=5;width+=5;width+=5;if(obj.Get('chart.yaxispos')=='left'||(obj.type=='pie'&&!obj.Get('chart.yaxispos'))||(obj.type=='hbar'&&!obj.Get('chart.yaxispos'))||(obj.type=='hbar'&&obj.Get('chart.yaxispos')=='center')||(obj.type=='rscatter'&&!obj.Get('chart.yaxispos'))||(obj.type=='radar'&&!obj.Get('chart.yaxispos'))||(obj.type=='rose'&&!obj.Get('chart.yaxispos'))||(obj.type=='funnel'&&!obj.Get('chart.yaxispos'))||(obj.type=='vprogress'&&!obj.Get('chart.yaxispos'))||(obj.type=='hprogress'&&!obj.Get('chart.yaxispos'))){hpos-=width;}
if(typeof(obj.Get('chart.key.halign'))=='string'){if(obj.Get('chart.key.halign')=='left'){hpos=gutterLeft+10;}else if(obj.Get('chart.key.halign')=='right'){hpos=RGraph.GetWidth(obj)-gutterRight-width;}}
if(typeof(obj.Get('chart.key.position.x'))=='number'){hpos=obj.Get('chart.key.position.x');}
if(typeof(obj.Get('chart.key.position.y'))=='number'){vpos=obj.Get('chart.key.position.y');}
if(obj.Get('chart.key.shadow')){context.shadowColor=obj.Get('chart.key.shadow.color');context.shadowBlur=obj.Get('chart.key.shadow.blur');context.shadowOffsetX=obj.Get('chart.key.shadow.offsetx');context.shadowOffsetY=obj.Get('chart.key.shadow.offsety');}
context.beginPath();context.fillStyle=obj.Get('chart.key.background');context.strokeStyle='black';if(arguments[3]!=false){context.lineWidth=obj.Get('chart.key.linewidth')?obj.Get('chart.key.linewidth'):1;if(obj.Get('chart.key.rounded')==true){context.beginPath();context.strokeStyle=strokestyle;RGraph.strokedCurvyRect(context,hpos,vpos,width-5,5+((text_size+5)*RGraph.getKeyLength(key)),4);context.stroke();context.fill();RGraph.NoShadow(obj);}else{context.strokeRect(hpos,vpos,width-5,5+((text_size+5)*RGraph.getKeyLength(key)));context.fillRect(hpos,vpos,width-5,5+((text_size+5)*RGraph.getKeyLength(key)));}}
RGraph.NoShadow(obj);context.beginPath();if(obj.Get('chart.key.colors')){colors=obj.Get('chart.key.colors');}
for(var i=key.length-1;i>=0;i--){var j=Number(i)+1;if(obj.Get('chart.key.color.shape')=='circle'){context.beginPath();context.strokeStyle='rgba(0,0,0,0)';context.fillStyle=colors[i];context.arc(hpos+5+(blob_size/2),vpos+(5*j)+(text_size*j)-text_size+(blob_size/2),blob_size/2,0,6.26,0);context.fill();}else if(obj.Get('chart.key.color.shape')=='line'){context.beginPath();context.strokeStyle=colors[i];context.moveTo(hpos+5,vpos+(5*j)+(text_size*j)-text_size+(blob_size/2));context.lineTo(hpos+blob_size+5,vpos+(5*j)+(text_size*j)-text_size+(blob_size/2));context.stroke();}else{context.fillStyle=colors[i];context.fillRect(hpos+5,vpos+(5*j)+(text_size*j)-text_size,text_size,text_size+1);}
context.beginPath();context.fillStyle='black';RGraph.Text(context,text_font,text_size,hpos+blob_size+5+5,vpos+(5*j)+(text_size*j),key[i]);if(obj.Get('chart.key.interactive')){var px=hpos+5;var py=vpos+(5*j)+(text_size*j)-text_size;var pw=width-5-5-5;var ph=text_size;obj.coordsKey.push([px,py,pw,ph]);}}
context.fill();if(obj.Get('chart.key.interactive')){RGraph.Register(obj);var key_mousemove=function(e)
{var obj=e.target.__object__;var canvas=obj.canvas;var context=obj.context;var mouseCoords=RGraph.getMouseXY(e);var mouseX=mouseCoords[0];var mouseY=mouseCoords[1];for(var i=0;i<obj.coordsKey.length;++i){var px=obj.coordsKey[i][0];var py=obj.coordsKey[i][1];var pw=obj.coordsKey[i][2];var ph=obj.coordsKey[i][3];if(mouseX>(px-2)&&mouseX<(px+pw+2)&&mouseY>(py-2)&&mouseY<(py+ph+2)){canvas.style.cursor='pointer';return;}
canvas.style.cursor='default';if(typeof(obj.Get('chart.tooltips'))=='object'&&typeof(canvas_onmousemove_func)=='function'){canvas_onmousemove_func(e);}}}
canvas.addEventListener('mousemove',key_mousemove,false);RGraph.AddEventListener(canvas.id,'mousemove',key_mousemove);var key_click=function(e)
{RGraph.Redraw();var obj=e.target.__object__;var canvas=obj.canvas;var context=obj.context;var mouseCoords=RGraph.getMouseXY(e);var mouseX=mouseCoords[0];var mouseY=mouseCoords[1];if(obj.type=='pie'){return key_onclick_pie(e);}
RGraph.DrawKey(obj,obj.Get('chart.key'),obj.Get('chart.colors'));for(var i=0;i<obj.coordsKey.length;++i){var px=obj.coordsKey[i][0];var py=obj.coordsKey[i][1];var pw=obj.coordsKey[i][2];var ph=obj.coordsKey[i][3];if(mouseX>px&&mouseX<(px+pw)&&mouseY>py&&mouseY<(py+ph)){for(j in RGraph.objects){if(RGraph.objects[j]&&RGraph.objects[j].Get&&RGraph.objects[j].Get('chart.key.interactive')){if(RGraph.objects[j].Get('chart.exploded')){RGraph.objects[j].Set('chart.exploded',[]);}
RGraph.Clear(RGraph.objects[j].canvas);RGraph.objects[j].Draw();}}
var index=obj.coordsKey.length-i-1;context.beginPath();context.fillStyle='rgba(255,255,255,0.9)';context.fillRect(obj.Get('chart.gutter.left'),obj.Get('chart.gutter.top'),canvas.width-obj.Get('chart.gutter.left')-obj.Get('chart.gutter.right'),canvas.height-obj.Get('chart.gutter.top')-obj.Get('chart.gutter.bottom'));context.fill();context.beginPath();context.strokeStyle=obj.Get('chart.colors')[index];context.lineWidth=obj.Get('chart.linewidth');if(obj.coords2&&obj.coords2[index]&&obj.coords2[index].length){for(var j=0;j<obj.coords2[index].length;++j){var x=obj.coords2[index][j][0];var y=obj.coords2[index][j][1];if(j==0){context.moveTo(x,y);}else{context.lineTo(x,y);}}}
context.stroke();context.lineWidth=1;context.beginPath();context.strokeStyle='black';context.fillStyle='white';RGraph.SetShadow(obj,'rgba(0,0,0,0.5)',0,0,10);context.strokeRect(px-2,py-2,pw+4,ph+4);context.fillRect(px-2,py-2,pw+4,ph+4);context.stroke();context.fill();RGraph.NoShadow(obj);context.beginPath();context.fillStyle=obj.Get('chart.colors')[index];context.fillRect(px,py,blob_size,blob_size);context.fill();context.beginPath();context.fillStyle=obj.Get('chart.text.color');RGraph.Text(context,obj.Get('chart.text.font'),obj.Get('chart.text.size'),px+5+blob_size,py+ph,obj.Get('chart.key')[obj.Get('chart.key').length-i-1]);context.fill();canvas.style.cursor='pointer';e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();}
canvas.style.cursor='default';}}
canvas.addEventListener('click',key_click,false);RGraph.AddEventListener(canvas.id,'click',key_click);var key_onclick_pie=function(e)
{var canvas=e.target;var context=canvas.getContext('2d');var obj=e.target.__object__;var mouseCoords=RGraph.getMouseXY(e);var mouseX=mouseCoords[0];var mouseY=mouseCoords[1];for(var i=0;i<obj.coordsKey.length;++i){var px=obj.coordsKey[i][0];var py=obj.coordsKey[i][1];var pw=obj.coordsKey[i][2];var ph=obj.coordsKey[i][3];if(mouseX>(px-2)&&mouseX<(px+pw+2)&&mouseY>(py-2)&&mouseY<(py+ph+2)){var index=obj.coordsKey.length-i-1;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();var highlight_key=function()
{context.lineWidth=1;context.beginPath();context.strokeStyle='black';context.fillStyle='white';RGraph.SetShadow(obj,'rgba(0,0,0,0.5)',0,0,10);context.strokeRect(px-2,py-2,pw+4,ph+4);context.fillRect(px-2,py-2,pw+4,ph+4);context.stroke();context.fill();RGraph.NoShadow(obj);context.beginPath();context.fillStyle=obj.Get('chart.colors')[index];context.fillRect(px,py,blob_size,blob_size);context.fill();context.beginPath();context.fillStyle=obj.Get('chart.text.color');RGraph.Text(context,obj.Get('chart.text.font'),obj.Get('chart.text.size'),px+5+blob_size,py+ph,obj.Get('chart.key')[obj.Get('chart.key').length-i-1]);context.fill();}
setTimeout(function(){obj.Get('chart.exploded')[index]=2;RGraph.Clear(obj.canvas);obj.Draw();highlight_key();},20);setTimeout(function(){obj.Get('chart.exploded')[index]=4;RGraph.Clear(obj.canvas);obj.Draw();highlight_key();},40);setTimeout(function(){obj.Get('chart.exploded')[index]=6;RGraph.Clear(obj.canvas);obj.Draw();highlight_key();},60);setTimeout(function(){obj.Get('chart.exploded')[index]=8;RGraph.Clear(obj.canvas);obj.Draw();highlight_key();},80);setTimeout(function(){obj.Get('chart.exploded')[index]=10;RGraph.Clear(obj.canvas);obj.Draw();highlight_key();},100);setTimeout(function(){obj.Get('chart.exploded')[index]=12;RGraph.Clear(obj.canvas);obj.Draw();highlight_key();},120);setTimeout(function(){obj.Get('chart.exploded')[index]=14;RGraph.Clear(obj.canvas);obj.Draw();highlight_key();},140);setTimeout(function(){obj.Get('chart.exploded')[index]=16;RGraph.Clear(obj.canvas);obj.Draw();highlight_key();},160);setTimeout(function(){obj.Get('chart.exploded')[index]=18;RGraph.Clear(obj.canvas);obj.Draw();highlight_key();},180);setTimeout(function(){obj.Get('chart.exploded')[index]=20;RGraph.Clear(obj.canvas);obj.Draw();highlight_key();},200);setTimeout(function(){obj.Get('chart.exploded')[index]=0;},250);return;}else{e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();}}
RGraph.Clear(obj.canvas);obj.Draw();}
var key_interactive_click=function(e)
{if(obj&&obj.type=='pie'){obj.Set('chart.exploded',[]);}
RGraph.Clear(obj.canvas);obj.Draw();}
window.addEventListener('click',key_interactive_click,false);RGraph.AddEventListener('window_'+canvas.id,'click',key_interactive_click);}}
RGraph.DrawKey_gutter=function(obj,key,colors)
{var canvas=obj.canvas;var context=obj.context;var text_size=typeof(obj.Get('chart.key.text.size'))=='number'?obj.Get('chart.key.text.size'):obj.Get('chart.text.size');var text_font=obj.Get('chart.text.font');var gutterLeft=obj.Get('chart.gutter.left');var gutterRight=obj.Get('chart.gutter.right');var gutterTop=obj.Get('chart.gutter.top');var gutterBottom=obj.Get('chart.gutter.bottom');var hpos=RGraph.GetWidth(obj)/2;var vpos=(gutterTop/2)-5;var title=obj.Get('chart.title');var blob_size=text_size;var hmargin=8;var vmargin=4;var fillstyle=obj.Get('chart.key.background');var strokestyle='black';var length=0;context.font=text_size+'pt '+text_font;for(i=0;i<key.length;++i){length+=hmargin;length+=blob_size;length+=hmargin;length+=context.measureText(key[i]).width;}
length+=hmargin;if(obj.type=='pie'){if(obj.Get('chart.align')=='left'){var hpos=obj.radius+gutterLeft;}else if(obj.Get('chart.align')=='right'){var hpos=obj.canvas.width-obj.radius-gutterRight;}else{hpos=canvas.width/2;}}
hpos-=(length/2);if(typeof(obj.Get('chart.key.position.x'))=='number'){hpos=obj.Get('chart.key.position.x');}
if(typeof(obj.Get('chart.key.position.y'))=='number'){vpos=obj.Get('chart.key.position.y');}
if(obj.Get('chart.key.position.gutter.boxed')){if(obj.Get('chart.key.shadow')){context.shadowColor=obj.Get('chart.key.shadow.color');context.shadowBlur=obj.Get('chart.key.shadow.blur');context.shadowOffsetX=obj.Get('chart.key.shadow.offsetx');context.shadowOffsetY=obj.Get('chart.key.shadow.offsety');}
context.beginPath();context.fillStyle=fillstyle;context.strokeStyle=strokestyle;if(obj.Get('chart.key.rounded')){RGraph.strokedCurvyRect(context,hpos,vpos-vmargin,length,text_size+vmargin+vmargin)}else{context.strokeRect(hpos,vpos-vmargin,length,text_size+vmargin+vmargin);context.fillRect(hpos,vpos-vmargin,length,text_size+vmargin+vmargin);}
context.stroke();context.fill();RGraph.NoShadow(obj);}
if(obj.Get('chart.key.colors')){colors=obj.Get('chart.key.colors');}
for(var i=0,pos=hpos;i<key.length;++i){pos+=hmargin;if(obj.Get('chart.key.color.shape')=='line'){context.beginPath();context.strokeStyle=colors[i];context.moveTo(pos,vpos+(blob_size/2));context.lineTo(pos+blob_size,vpos+(blob_size/2));context.stroke();}else if(obj.Get('chart.key.color.shape')=='circle'){context.beginPath();context.fillStyle=colors[i];context.moveTo(pos,vpos+(blob_size/2));context.arc(pos+(blob_size/2),vpos+(blob_size/2),(blob_size/2),0,6.28,0);context.fill();}else{context.beginPath();context.fillStyle=colors[i];context.fillRect(pos,vpos,blob_size,blob_size);context.fill();}
pos+=blob_size;pos+=hmargin;context.beginPath();context.fillStyle='black';RGraph.Text(context,text_font,text_size,pos,vpos+text_size-1,key[i]);context.fill();pos+=context.measureText(key[i]).width;}}
RGraph.getKeyLength=function(key)
{var len=0;for(var i=0;i<key.length;++i){if(key[i]!=null){++len;}}
return len;}
function pd(variable)
{RGraph.pr(variable);}
function p(variable)
{RGraph.pr(variable);}
function cl(variable)
{return console.log(variable);}
RGraph.array_clone=function(obj)
{if(obj==null||typeof(obj)!='object'){return obj;}
var temp=[];for(var i=0;i<obj.length;++i){if(typeof(obj[i])=='number'){temp[i]=(function(arg){return Number(arg);})(obj[i]);}else if(typeof(obj[i])=='string'){temp[i]=(function(arg){return String(arg);})(obj[i]);}else{temp[i]=RGraph.array_clone(obj[i]);}}
return temp;}
RGraph.array_reverse=function(arr)
{var newarr=[];for(var i=arr.length-1;i>=0;i--){newarr.push(arr[i]);}
return newarr;}
RGraph.number_format=function(obj,num)
{var i;var prepend=arguments[2]?String(arguments[2]):'';var append=arguments[3]?String(arguments[3]):'';var output='';var decimal='';var decimal_seperator=obj.Get('chart.scale.point')?obj.Get('chart.scale.point'):'.';var thousand_seperator=obj.Get('chart.scale.thousand')?obj.Get('chart.scale.thousand'):',';RegExp.$1='';var i,j;if(typeof(obj.Get('chart.scale.formatter'))=='function'){return obj.Get('chart.scale.formatter')(obj,num);}
if(String(num).indexOf('e')>0){return String(prepend+String(num)+append);}
num=String(num);if(num.indexOf('.')>0){num=num.replace(/\.(.*)/,'');decimal=RegExp.$1;}
var seperator=thousand_seperator;var foundPoint;for(i=(num.length-1),j=0;i>=0;j++,i--){var character=num.charAt(i);if(j%3==0&&j!=0){output+=seperator;}
output+=character;}
var rev=output;output='';for(i=(rev.length-1);i>=0;i--){output+=rev.charAt(i);}
output=output.replace(/^-,/,'-');if(decimal.length){output=output+decimal_seperator+decimal;decimal='';RegExp.$1='';}
if(output.charAt(0)=='-'){output=output.replace(/-/,'');prepend='-'+prepend;}
return prepend+output+append;}
RGraph.DrawBars=function(obj)
{var hbars=obj.Get('chart.background.hbars');obj.context.beginPath();for(i=0;i<hbars.length;++i){if(hbars[i][1]==null){hbars[i][1]=obj.max;}else if(hbars[i][0]+hbars[i][1]>obj.max){hbars[i][1]=obj.max-hbars[i][0];}
if(Math.abs(hbars[i][1])>obj.max){hbars[i][1]=-1*obj.max;}
if(Math.abs(hbars[i][0])>obj.max){hbars[i][0]=obj.max;}
if(hbars[i][0]+hbars[i][1]<(-1*obj.max)){hbars[i][1]=-1*(obj.max+hbars[i][0]);}
if(obj.Get('chart.xaxispos')=='bottom'&&(hbars[i][0]<0||(hbars[i][1]+hbars[i][1]<0))){alert('['+obj.type.toUpperCase()+' (ID: '+obj.id+') BACKGROUND HBARS] You have a negative value in one of your background hbars values, whilst the X axis is in the center');}
var ystart=(obj.grapharea-((hbars[i][0]/obj.max)*obj.grapharea));var height=(Math.min(hbars[i][1],obj.max-hbars[i][0])/obj.max)*obj.grapharea;if(obj.Get('chart.xaxispos')=='center'){ystart/=2;height/=2;}
ystart+=obj.Get('chart.gutter.top')
var x=obj.Get('chart.gutter.left');var y=ystart-height;var w=obj.canvas.width-obj.Get('chart.gutter.left')-obj.Get('chart.gutter.right');var h=height;if(navigator.userAgent.indexOf('Opera')!=-1&&obj.Get('chart.xaxispos')=='center'&&h<0){h*=-1;y=y-h;}
if(obj.Get('chart.xaxispos')=='top'){y=obj.canvas.height-y;h*=-1;}
obj.context.fillStyle=hbars[i][2];obj.context.fillRect(x,y,w,h);}
obj.context.fill();}
RGraph.DrawInGraphLabels=function(obj)
{var canvas=obj.canvas;var context=obj.context;var labels=obj.Get('chart.labels.ingraph');var labels_processed=[];var fgcolor='black';var bgcolor='white';var direction=1;if(!labels){return;}
for(var i=0;i<labels.length;++i){if(typeof(labels[i])=='number'){for(var j=0;j<labels[i];++j){labels_processed.push(null);}}else if(typeof(labels[i])=='string'||typeof(labels[i])=='object'){labels_processed.push(labels[i]);}else{labels_processed.push('');}}
RGraph.NoShadow(obj);if(labels_processed&&labels_processed.length>0){for(var i=0;i<labels_processed.length;++i){if(labels_processed[i]){var coords=obj.coords[i];if(coords&&coords.length>0){var x=(obj.type=='bar'?coords[0]+(coords[2]/2):coords[0]);var y=(obj.type=='bar'?coords[1]+(coords[3]/2):coords[1]);var length=typeof(labels_processed[i][4])=='number'?labels_processed[i][4]:25;context.beginPath();context.fillStyle='black';context.strokeStyle='black';if(obj.type=='bar'){if(obj.Get('chart.xaxispos')=='top'){length*=-1;}
if(obj.Get('chart.variant')=='dot'){context.moveTo(x,obj.coords[i][1]-5);context.lineTo(x,obj.coords[i][1]-5-length);var text_x=x;var text_y=obj.coords[i][1]-5-length;}else if(obj.Get('chart.variant')=='arrow'){context.moveTo(x,obj.coords[i][1]-5);context.lineTo(x,obj.coords[i][1]-5-length);var text_x=x;var text_y=obj.coords[i][1]-5-length;}else{context.arc(x,y,2.5,0,6.28,0);context.moveTo(x,y);context.lineTo(x,y-length);var text_x=x;var text_y=y-length;}
context.stroke();context.fill();}else if(obj.type=='line'){if(typeof(labels_processed[i])=='object'&&typeof(labels_processed[i][3])=='number'&&labels_processed[i][3]==-1){context.moveTo(x,y+5);context.lineTo(x,y+5+length);context.stroke();context.beginPath();context.moveTo(x,y+5);context.lineTo(x-3,y+10);context.lineTo(x+3,y+10);context.closePath();var text_x=x;var text_y=y+5+length;}else{var text_x=x;var text_y=y-5-length;context.moveTo(x,y-5);context.lineTo(x,y-5-length);context.stroke();context.beginPath();context.moveTo(x,y-5);context.lineTo(x-3,y-10);context.lineTo(x+3,y-10);context.closePath();}
context.fill();}
context.beginPath();context.fillStyle=(typeof(labels_processed[i])=='object'&&typeof(labels_processed[i][1])=='string')?labels_processed[i][1]:'black';RGraph.Text(context,obj.Get('chart.text.font'),obj.Get('chart.text.size'),text_x,text_y,(typeof(labels_processed[i])=='object'&&typeof(labels_processed[i][0])=='string')?labels_processed[i][0]:labels_processed[i],'bottom','center',true,null,(typeof(labels_processed[i])=='object'&&typeof(labels_processed[i][2])=='string')?labels_processed[i][2]:'white');context.fill();}}}}}
RGraph.FixEventObject=function(e)
{if(RGraph.isIE8()){var e=event;e.pageX=(event.clientX+document.body.scrollLeft);e.pageY=(event.clientY+document.body.scrollTop);e.target=event.srcElement;if(!document.body.scrollTop&&document.documentElement.scrollTop){e.pageX+=parseInt(document.documentElement.scrollLeft);e.pageY+=parseInt(document.documentElement.scrollTop);}}
if(typeof(e.offsetX)=='undefined'&&typeof(e.offsetY)=='undefined'){var coords=RGraph.getMouseXY(e);e.offsetX=coords[0];e.offsetY=coords[1];}
if(!e.stopPropagation){e.stopPropagation=function(){window.event.cancelBubble=true;}}
return e;}
RGraph.DrawCrosshairs=function(obj)
{if(obj.Get('chart.crosshairs')){var canvas=obj.canvas;var context=obj.context;var crosshairs_mousemove=function(e)
{var e=RGraph.FixEventObject(e);var canvas=obj.canvas;var context=obj.context;var width=canvas.width;var height=canvas.height;var adjustments=obj.Get('chart.tooltips.coords.adjust');var gutterLeft=obj.Get('chart.gutter.left');var gutterRight=obj.Get('chart.gutter.right');var gutterTop=obj.Get('chart.gutter.top');var gutterBottom=obj.Get('chart.gutter.bottom');var mouseCoords=RGraph.getMouseXY(e);var x=mouseCoords[0];var y=mouseCoords[1];if(typeof(adjustments)=='object'&&adjustments[0]&&adjustments[1]){x=x-adjustments[0];y=y-adjustments[1];}
RGraph.Clear(canvas);obj.Draw();if(x>=gutterLeft&&y>=gutterTop&&x<=(width-gutterRight)&&y<=(height-gutterBottom)){var linewidth=obj.Get('chart.crosshairs.linewidth');context.lineWidth=linewidth?linewidth:1;context.beginPath();context.strokeStyle=obj.Get('chart.crosshairs.color');if(obj.Get('chart.crosshairs.vline')){context.moveTo(x,gutterTop);context.lineTo(x,height-gutterBottom);}
if(obj.Get('chart.crosshairs.hline')){context.moveTo(gutterLeft,y);context.lineTo(width-gutterRight,y);}
context.stroke();if(obj.Get('chart.crosshairs.coords')){if(obj.type=='scatter'){var xCoord=(((x-obj.Get('chart.gutter.left'))/(obj.canvas.width-gutterLeft-gutterRight))*(obj.Get('chart.xmax')-obj.Get('chart.xmin')))+obj.Get('chart.xmin');xCoord=xCoord.toFixed(obj.Get('chart.scale.decimals'));var yCoord=obj.max-(((y-obj.Get('chart.gutter.top'))/(obj.canvas.height-gutterTop-gutterBottom))*obj.max);if(obj.type=='scatter'&&obj.Get('chart.xaxispos')=='center'){yCoord=(yCoord-(obj.max/2))*2;}
yCoord=yCoord.toFixed(obj.Get('chart.scale.decimals'));var div=RGraph.Registry.Get('chart.coordinates.coords.div');var mouseCoords=RGraph.getMouseXY(e);var canvasXY=RGraph.getCanvasXY(canvas);if(!div){div=document.createElement('DIV');div.__object__=obj;div.style.position='absolute';div.style.backgroundColor='white';div.style.border='1px solid black';div.style.fontFamily='Arial, Verdana, sans-serif';div.style.fontSize='10pt'
div.style.padding='2px';div.style.opacity=1;div.style.WebkitBorderRadius='3px';div.style.borderRadius='3px';div.style.MozBorderRadius='3px';document.body.appendChild(div);RGraph.Registry.Set('chart.coordinates.coords.div',div);}
div.style.opacity=1;div.style.display='inline';if(!obj.Get('chart.crosshairs.coords.fixed')){div.style.left=Math.max(2,(e.pageX-div.offsetWidth-3))+'px';div.style.top=Math.max(2,(e.pageY-div.offsetHeight-3))+'px';}else{div.style.left=canvasXY[0]+gutterLeft+3+'px';div.style.top=canvasXY[1]+gutterTop+3+'px';}
div.innerHTML='<span style="color: #666">'+obj.Get('chart.crosshairs.coords.labels.x')+':</span> '+xCoord+'<br><span style="color: #666">'+obj.Get('chart.crosshairs.coords.labels.y')+':</span> '+yCoord;canvas.addEventListener('mouseout',RGraph.HideCrosshairCoords,false);obj.canvas.__crosshairs_labels__=div;obj.canvas.__crosshairs_x__=xCoord;obj.canvas.__crosshairs_y__=yCoord;}else{alert('[RGRAPH] Showing crosshair coordinates is only supported on the Scatter chart');}}
RGraph.FireCustomEvent(obj,'oncrosshairs');}else{RGraph.HideCrosshairCoords();}}
canvas.addEventListener('mousemove',crosshairs_mousemove,false);RGraph.AddEventListener(obj.id,'mousemove',crosshairs_mousemove);}}
RGraph.HideCrosshairCoords=function()
{var div=RGraph.Registry.Get('chart.coordinates.coords.div');if(div&&div.style.opacity==1&&div.__object__.Get('chart.crosshairs.coords.fadeout')){setTimeout(function(){RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity=0.9;},50);setTimeout(function(){RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity=0.8;},100);setTimeout(function(){RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity=0.7;},150);setTimeout(function(){RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity=0.6;},200);setTimeout(function(){RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity=0.5;},250);setTimeout(function(){RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity=0.4;},300);setTimeout(function(){RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity=0.3;},350);setTimeout(function(){RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity=0.2;},400);setTimeout(function(){RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity=0.1;},450);setTimeout(function(){RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity=0;},500);setTimeout(function(){RGraph.Registry.Get('chart.coordinates.coords.div').style.display='none';},550);}}
RGraph.rtrim=function(str)
{return str.replace(/( |\n|\r|\t)+$/,'');}
RGraph.Draw3DAxes=function(obj)
{var gutterLeft=obj.Get('chart.gutter.left');var gutterRight=obj.Get('chart.gutter.right');var gutterTop=obj.Get('chart.gutter.top');var gutterBottom=obj.Get('chart.gutter.bottom');var context=obj.context;var canvas=obj.canvas;context.strokeStyle='#aaa';context.fillStyle='#ddd';context.beginPath();context.moveTo(gutterLeft,gutterTop);context.lineTo(gutterLeft+10,gutterTop-5);context.lineTo(gutterLeft+10,canvas.height-gutterBottom-5);context.lineTo(gutterLeft,canvas.height-gutterBottom);context.closePath();context.stroke();context.fill();context.beginPath();context.moveTo(gutterLeft,canvas.height-gutterBottom);context.lineTo(gutterLeft+10,canvas.height-gutterBottom-5);context.lineTo(canvas.width-gutterRight+10,canvas.height-gutterBottom-5);context.lineTo(canvas.width-gutterRight,canvas.height-gutterBottom);context.closePath();context.stroke();context.fill();}
RGraph.NoShadow=function(obj)
{obj.context.shadowColor='rgba(0,0,0,0)';obj.context.shadowBlur=0;obj.context.shadowOffsetX=0;obj.context.shadowOffsetY=0;}
RGraph.SetShadow=function(obj,color,offsetx,offsety,blur)
{obj.context.shadowColor=color;obj.context.shadowOffsetX=offsetx;obj.context.shadowOffsetY=offsety;obj.context.shadowBlur=blur;}
RGraph.OldBrowserCompat=function(context)
{if(!context.measureText){context.measureText=function(text)
{var textObj=document.createElement('DIV');textObj.innerHTML=text;textObj.style.backgroundColor='white';textObj.style.position='absolute';textObj.style.top=-100
textObj.style.left=0;document.body.appendChild(textObj);var width={width:textObj.offsetWidth};textObj.style.display='none';return width;}}
if(!context.fillText){context.fillText=function(text,targetX,targetY)
{return false;}}
if(!context.canvas.addEventListener){window.addEventListener=function(ev,func,bubble)
{return this.attachEvent('on'+ev,func);}
context.canvas.addEventListener=function(ev,func,bubble)
{return this.attachEvent('on'+ev,func);}}}
RGraph.Async=function(func)
{return setTimeout(func,arguments[1]?arguments[1]:1);}
RGraph.random=function(min,max)
{var dp=arguments[2]?arguments[2]:0;var r=Math.random();return Number((((max-min)*r)+min).toFixed(dp));}
RGraph.strokedCurvyRect=function(context,x,y,w,h)
{var r=arguments[5]?arguments[5]:3;var corner_tl=(arguments[6]||arguments[6]==null)?true:false;var corner_tr=(arguments[7]||arguments[7]==null)?true:false;var corner_br=(arguments[8]||arguments[8]==null)?true:false;var corner_bl=(arguments[9]||arguments[9]==null)?true:false;context.beginPath();context.moveTo(x+(corner_tl?r:0),y);context.lineTo(x+w-(corner_tr?r:0),y);if(corner_tr){context.arc(x+w-r,y+r,r,Math.PI*1.5,Math.PI*2,false);}
context.lineTo(x+w,y+h-(corner_br?r:0));if(corner_br){context.arc(x+w-r,y-r+h,r,Math.PI*2,Math.PI*0.5,false);}
context.lineTo(x+(corner_bl?r:0),y+h);if(corner_bl){context.arc(x+r,y-r+h,r,Math.PI*0.5,Math.PI,false);}
context.lineTo(x,y+(corner_tl?r:0));if(corner_tl){context.arc(x+r,y+r,r,Math.PI,Math.PI*1.5,false);}
context.stroke();}
RGraph.filledCurvyRect=function(context,x,y,w,h)
{var r=arguments[5]?arguments[5]:3;var corner_tl=(arguments[6]||arguments[6]==null)?true:false;var corner_tr=(arguments[7]||arguments[7]==null)?true:false;var corner_br=(arguments[8]||arguments[8]==null)?true:false;var corner_bl=(arguments[9]||arguments[9]==null)?true:false;context.beginPath();if(corner_tl){context.moveTo(x+r,y+r);context.arc(x+r,y+r,r,Math.PI,1.5*Math.PI,false);}else{context.fillRect(x,y,r,r);}
if(corner_tr){context.moveTo(x+w-r,y+r);context.arc(x+w-r,y+r,r,1.5*Math.PI,0,false);}else{context.moveTo(x+w-r,y);context.fillRect(x+w-r,y,r,r);}
if(corner_br){context.moveTo(x+w-r,y+h-r);context.arc(x+w-r,y-r+h,r,0,Math.PI/2,false);}else{context.moveTo(x+w-r,y+h-r);context.fillRect(x+w-r,y+h-r,r,r);}
if(corner_bl){context.moveTo(x+r,y+h-r);context.arc(x+r,y-r+h,r,Math.PI/2,Math.PI,false);}else{context.moveTo(x,y+h-r);context.fillRect(x,y+h-r,r,r);}
context.fillRect(x+r,y,w-r-r,h);context.fillRect(x,y+r,r+1,h-r-r);context.fillRect(x+w-r-1,y+r,r+1,h-r-r);context.fill();}
RGraph.Timer=function(label)
{var d=new Date();console.log(label+': '+d.getSeconds()+'.'+d.getMilliseconds());}
RGraph.HidePalette=function()
{var div=RGraph.Registry.Get('palette');if(typeof(div)=='object'&&div){div.style.visibility='hidden';div.style.display='none';RGraph.Registry.Set('palette',null);}}
RGraph.HideZoomedCanvas=function()
{var interval=15;var frames=10;if(typeof(__zoomedimage__)=='object'){obj=__zoomedimage__.obj;}else{return;}
if(obj.Get('chart.zoom.fade.out')){for(var i=frames,j=1;i>=0;--i,++j){if(typeof(__zoomedimage__)=='object'){setTimeout("__zoomedimage__.style.opacity = "+String(i/10),j*interval);}}
if(typeof(__zoomedbackground__)=='object'){setTimeout("__zoomedbackground__.style.opacity = "+String(i/frames),j*interval);}}
if(typeof(__zoomedimage__)=='object'){setTimeout("__zoomedimage__.style.display = 'none'",obj.Get('chart.zoom.fade.out')?(frames*interval)+10:0);}
if(typeof(__zoomedbackground__)=='object'){setTimeout("__zoomedbackground__.style.display = 'none'",obj.Get('chart.zoom.fade.out')?(frames*interval)+10:0);}}
RGraph.AddCustomEventListener=function(obj,name,func)
{if(typeof(RGraph.events[obj.id])=='undefined'){RGraph.events[obj.id]=[];}
RGraph.events[obj.id].push([obj,name,func]);return RGraph.events[obj.id].length-1;}
RGraph.FireCustomEvent=function(obj,name)
{if(obj&&obj.isRGraph){var id=obj.id;if(typeof(id)=='string'&&typeof(RGraph.events)=='object'&&typeof(RGraph.events[id])=='object'&&RGraph.events[id].length>0){for(var j=0;j<RGraph.events[id].length;++j){if(RGraph.events[id][j]&&RGraph.events[id][j][1]==name){RGraph.events[id][j][2](obj);}}}}}
RGraph.isIE8=function()
{return navigator.userAgent.indexOf('MSIE 8')>0;}
RGraph.isIE9=function()
{return navigator.userAgent.indexOf('MSIE 9')>0;}
RGraph.isIE9up=function()
{navigator.userAgent.match(/MSIE (\d+)/);return Number(RegExp.$1)>=9;}
RGraph.ClearEventListeners=function(id)
{for(var i=0;i<RGraph.Registry.Get('chart.event.handlers').length;++i){var el=RGraph.Registry.Get('chart.event.handlers')[i];if(el&&(el[0]==id||el[0]==('window_'+id))){if(el[0].substring(0,7)=='window_'){window.removeEventListener(el[1],el[2],false);}else{if(document.getElementById(id)){document.getElementById(id).removeEventListener(el[1],el[2],false);}}
RGraph.Registry.Get('chart.event.handlers')[i]=null;}}}
RGraph.AddEventListener=function(id,e,func)
{var type=arguments[3]?arguments[3]:'unknown';RGraph.Registry.Get('chart.event.handlers').push([id,e,func,type]);}
RGraph.getGutterSuggest=function(obj,data)
{var str=RGraph.number_format(obj,RGraph.array_max(RGraph.getScale(RGraph.array_max(data),obj)),obj.Get('chart.units.pre'),obj.Get('chart.units.post'));if(obj.type=='hbar'){var str='';var len=0;for(var i=0;i<obj.Get('chart.labels').length;++i){str=(obj.Get('chart.labels').length>str.length?obj.Get('chart.labels')[i]:str);}}
obj.context.font=obj.Get('chart.text.size')+'pt '+obj.Get('chart.text.font');len=obj.context.measureText(str).width+5;return(obj.type=='hbar'?len/3:len);}
RGraph.array_shift=function(arr)
{var ret=[];for(var i=1;i<arr.length;++i)ret.push(arr[i]);return ret;}
RGraph.SetConfig=function(obj,c)
{for(i in c){if(typeof(i)=='string'){obj.Set(i,c[i]);}}
return obj;}
RGraph.GetHeight=function(obj)
{return obj.canvas.height;}
RGraph.GetWidth=function(obj)
{return obj.canvas.width;}
RGraph.RemoveAllCustomEventListeners=function()
{var id=arguments[0];if(id&&RGraph.events[id]){RGraph.events[id]=[];}else{RGraph.events=[];}}
RGraph.RemoveCustomEventListener=function(obj,i)
{if(typeof(RGraph.events)=='object'&&typeof(RGraph.events[obj.id])=='object'&&typeof(RGraph.events[obj.id][i])=='object'){RGraph.events[obj.id][i]=null;}}
RGraph.DrawBackgroundImage=function(obj)
{var img=new Image();img.__object__=obj;img.__canvas__=obj.canvas;img.__context__=obj.context;img.src=obj.Get('chart.background.image');obj.__background_image__=img;img.onload=function()
{var obj=this.__object__;var gutterLeft=obj.Get('chart.gutter.left');var gutterRight=obj.Get('chart.gutter.right');var gutterTop=obj.Get('chart.gutter.top');var gutterBottom=obj.Get('chart.gutter.bottom');RGraph.Clear(obj.canvas);obj.context.drawImage(this,gutterLeft,gutterTop,RGraph.GetWidth(obj)-gutterLeft-gutterRight,RGraph.GetHeight(obj)-gutterTop-gutterBottom);obj.Draw();}
img.onerror=function()
{var obj=this.__canvas__.__object__;alert('[ERROR] There was an error with the background image that you specified: '+img.src);obj.Draw();}}
RGraph.Reset=function(canvas)
{canvas.width=canvas.width;};if(typeof(RGraph)=='undefined')RGraph={isRGraph:true,type:'common'};RGraph.Effects={}
RGraph.Effects.Fade={}
RGraph.Effects.jQuery={}
RGraph.Effects.jQuery.HBlinds={}
RGraph.Effects.jQuery.VBlinds={}
RGraph.Effects.jQuery.Slide={}
RGraph.Effects.Pie={}
RGraph.Effects.Bar={}
RGraph.Effects.Line={}
RGraph.Effects.Line.jQuery={}
RGraph.Effects.Fuel={}
RGraph.Effects.Rose={}
RGraph.Effects.Odo={}
RGraph.Effects.Gauge={}
RGraph.Effects.Meter={}
RGraph.Effects.HBar={}
RGraph.Effects.Radar={}
RGraph.Effects.Waterfall={}
RGraph.Effects.Fade.In=function(obj)
{var canvas=obj.canvas;canvas.style.opacity=0;RGraph.Clear(obj.canvas);obj.Draw();for(var i=1;i<=10;++i){setTimeout('document.getElementById("'+canvas.id+'").style.opacity = '+(i*0.1),i*50);}
if(typeof(arguments[2])=='function'){setTimeout(arguments[2],500);}}
RGraph.Effects.Fade.Out=function(obj)
{var canvas=obj.canvas;RGraph.Clear(obj.canvas);obj.Draw();for(var i=10;i>=0;--i){setTimeout('document.getElementById("'+canvas.id+'").style.opacity = '+(i*0.1),(10-i)*50);}
if(typeof(arguments[2])=='function'){setTimeout(arguments[2],500);}}
RGraph.Effects.jQuery.Expand=function(obj)
{if(typeof(jQuery)=='undefined'){alert('[ERROR] Could not find jQuery object - have you included the jQuery file?');}
var canvas=obj.canvas;if(!canvas.__rgraph_div_placeholder__){var div=RGraph.Effects.ReplaceCanvasWithDIV(canvas);canvas.__rgraph_div_placeholder__=div;}else{div=canvas.__rgraph_div_placeholder__;}
canvas.style.position='relative';canvas.style.top=(canvas.height/2)+'px';canvas.style.left=(canvas.width/2)+'px';canvas.style.width=0;canvas.style.height=0;canvas.style.opacity=0;RGraph.Clear(obj.canvas);obj.Draw();$('#'+obj.id).animate({opacity:1,width:parseInt(div.style.width)+'px',height:parseInt(div.style.height)+'px',left:'-='+(obj.canvas.width/2)+'px',top:'-='+(obj.canvas.height/2)+'px'},1000);if(typeof(arguments[2])=='function'){setTimeout(arguments[2],1000);}}
RGraph.Effects.ReplaceCanvasWithDIV=function(canvas)
{if(!canvas.replacementDIV){var div=document.createElement('DIV');div.style.width=canvas.width+'px';div.style.height=canvas.height+'px';div.style.cssFloat=canvas.style.cssFloat;div.style.left=canvas.style.left;div.style.top=canvas.style.top;div.style.display='inline-block';canvas.parentNode.insertBefore(div,canvas);canvas.parentNode.removeChild(canvas);div.appendChild(canvas);canvas.style.position='relative';canvas.style.left=(div.offsetWidth/2)+'px';canvas.style.top=(div.offsetHeight/2)+'px';canvas.style.cssFloat='';canvas.replacementDIV=div;}else{var div=canvas.replacementDIV;}
return div;}
RGraph.Effects.jQuery.Snap=function(obj)
{var delay=500;var div=RGraph.Effects.ReplaceCanvasWithDIV(obj.canvas);obj.canvas.style.position='absolute';obj.canvas.style.top=0;obj.canvas.style.left=0;obj.canvas.style.width=0;obj.canvas.style.height=0;obj.canvas.style.opacity=0;var targetLeft=div.offsetLeft;var targetTop=div.offsetTop;var targetWidth=div.offsetWidth;var targetHeight=div.offsetHeight;RGraph.Clear(obj.canvas);obj.Draw();$('#'+obj.id).animate({opacity:1,width:targetWidth+'px',height:targetHeight+'px',left:targetLeft+'px',top:targetTop+'px'},delay);if(typeof(arguments[2])=='function'){setTimeout(arguments[2],delay+50);}}
RGraph.Effects.jQuery.Reveal=function(obj)
{var opts=arguments[1]?arguments[1]:null;var delay=1000;var canvas=obj.canvas;var xy=RGraph.getCanvasXY(obj.canvas);obj.canvas.style.visibility='hidden';RGraph.Clear(obj.canvas);obj.Draw();var divs=[['reveal_left',xy[0],xy[1],obj.canvas.width/2,obj.canvas.height],['reveal_right',(xy[0]+(obj.canvas.width/2)),xy[1],(obj.canvas.width/2),obj.canvas.height],['reveal_top',xy[0],xy[1],obj.canvas.width,(obj.canvas.height/2)],['reveal_bottom',xy[0],(xy[1]+(obj.canvas.height/2)),obj.canvas.width,(obj.canvas.height/2)]];for(var i=0;i<divs.length;++i){var div=document.createElement('DIV');div.id=divs[i][0];div.style.width=divs[i][3]+'px';div.style.height=divs[i][4]+'px';div.style.left=divs[i][1]+'px';div.style.top=divs[i][2]+'px';div.style.position='absolute';div.style.backgroundColor=opts&&typeof(opts['color'])=='string'?opts['color']:'white';document.body.appendChild(div);}
obj.canvas.style.visibility='visible';$('#reveal_left').animate({width:0},delay);$('#reveal_right').animate({left:'+='+(obj.canvas.width/2),width:0},delay);$('#reveal_top').animate({height:0},delay);$('#reveal_bottom').animate({top:'+='+(obj.canvas.height/2),height:0},delay);setTimeout(function()
{document.body.removeChild(document.getElementById("reveal_top"))
document.body.removeChild(document.getElementById("reveal_bottom"))
document.body.removeChild(document.getElementById("reveal_left"))
document.body.removeChild(document.getElementById("reveal_right"))},delay);if(typeof(arguments[2])=='function'){setTimeout(arguments[2],delay);}}
RGraph.Effects.jQuery.HBlinds.Open=function(obj)
{var canvas=obj.canvas;var opts=arguments[1]?arguments[1]:[];var delay=1000;var color=opts['color']?opts['color']:'white';var xy=RGraph.getCanvasXY(canvas);var height=canvas.height/5;RGraph.Clear(obj.canvas);obj.Draw();for(var i=0;i<5;++i){var div=document.createElement('DIV');div.id='blinds_'+i;div.style.width=canvas.width+'px';div.style.height=height+'px';div.style.left=xy[0]+'px';div.style.top=(xy[1]+(canvas.height*(i/5)))+'px';div.style.position='absolute';div.style.backgroundColor=color;document.body.appendChild(div);$('#blinds_'+i).animate({height:0},delay);}
setTimeout(function(){document.body.removeChild(document.getElementById('blinds_0'));},delay);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_1'));},delay);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_2'));},delay);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_3'));},delay);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_4'));},delay);if(typeof(arguments[2])=='function'){setTimeout(arguments[2],delay);}}
RGraph.Effects.jQuery.HBlinds.Close=function(obj)
{var canvas=obj.canvas;var opts=arguments[1]?arguments[1]:[];var delay=1000;var color=opts['color']?opts['color']:'white';var xy=RGraph.getCanvasXY(canvas);var height=canvas.height/5;for(var i=0;i<5;++i){var div=document.createElement('DIV');div.id='blinds_'+i;div.style.width=canvas.width+'px';div.style.height=0;div.style.left=xy[0]+'px';div.style.top=(xy[1]+(canvas.height*(i/5)))+'px';div.style.position='absolute';div.style.backgroundColor=color;document.body.appendChild(div);$('#blinds_'+i).animate({height:height+'px'},delay);}
setTimeout(function(){RGraph.Clear(obj.canvas);},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_0'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_1'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_2'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_3'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_4'));},delay+100);if(typeof(arguments[2])=='function'){setTimeout(arguments[2],delay);}}
RGraph.Effects.jQuery.VBlinds.Open=function(obj)
{var canvas=obj.canvas;var opts=arguments[1]?arguments[1]:[];var delay=1000;var color=opts['color']?opts['color']:'white';var xy=RGraph.getCanvasXY(canvas);var width=canvas.width/10;RGraph.Clear(obj.canvas);obj.Draw();for(var i=0;i<10;++i){var div=document.createElement('DIV');div.id='blinds_'+i;div.style.width=width+'px';div.style.height=canvas.height+'px';div.style.left=(xy[0]+(canvas.width*(i/10)))+'px';div.style.top=(xy[1])+'px';div.style.position='absolute';div.style.backgroundColor=color;document.body.appendChild(div);$('#blinds_'+i).animate({width:0},delay);}
setTimeout(function(){document.body.removeChild(document.getElementById('blinds_0'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_1'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_2'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_3'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_4'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_5'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_6'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_7'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_8'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_9'));},delay+100);if(typeof(arguments[2])=='function'){setTimeout(arguments[2],delay);}}
RGraph.Effects.jQuery.VBlinds.Close=function(obj)
{var canvas=obj.canvas;var opts=arguments[1]?arguments[1]:[];var delay=1000;var color=opts['color']?opts['color']:'white';var xy=RGraph.getCanvasXY(canvas);var width=canvas.width/10;for(var i=0;i<10;++i){var div=document.createElement('DIV');div.id='blinds_'+i;div.style.width=0;div.style.height=canvas.height+'px';div.style.left=(xy[0]+(canvas.width*(i/10)))+'px';div.style.top=(xy[1])+'px';div.style.position='absolute';div.style.backgroundColor=color;document.body.appendChild(div);$('#blinds_'+i).animate({width:width},delay);}
setTimeout(function(){RGraph.Clear(obj.canvas,color);},delay+100);if(opts['remove']){setTimeout(function(){document.body.removeChild(document.getElementById('blinds_0'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_1'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_2'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_3'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_4'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_5'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_6'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_7'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_8'));},delay+100);setTimeout(function(){document.body.removeChild(document.getElementById('blinds_9'));},delay+100);}
if(typeof(arguments[2])=='function'){setTimeout(arguments[2],delay);}}
RGraph.Effects.Pie.Grow=function(obj)
{var canvas=obj.canvas;var opts=arguments[1]?arguments[1]:[];var color=opts['color']?opts['color']:'white';var xy=RGraph.getCanvasXY(canvas);canvas.style.visibility='hidden';obj.Draw();var radius=obj.getRadius();RGraph.Clear(obj.canvas);canvas.style.visibility='visible';obj.Set('chart.radius',0);RGraph.Effects.Animate(obj,{'chart.radius':radius},arguments[2]);}
RGraph.Effects.Bar.Grow=function(obj)
{obj.original_data=RGraph.array_clone(obj.data);obj.__animation_frame__=0;if(obj.Get('chart.ymax')==null){var ymax=0;for(var i=0;i<obj.data.length;++i){if(RGraph.is_array(obj.data[i])&&obj.Get('chart.grouping')=='stacked'){ymax=Math.max(ymax,RGraph.array_sum(obj.data[i]));}else{ymax=Math.max(ymax,obj.data[i]);}}
ymax=RGraph.getScale(ymax)[4];obj.Set('chart.ymax',ymax);}
function Grow()
{var numFrames=30;if(!obj.__animation_frame__){obj.__animation_frame__=0;obj.__original_hmargin__=obj.Get('chart.hmargin');obj.__hmargin__=((obj.canvas.width-obj.Get('chart.gutter.left')-obj.Get('chart.gutter.right'))/obj.data.length)/2;obj.Set('chart.hmargin',obj.__hmargin__);}
for(var j=0;j<obj.original_data.length;++j){if(typeof(obj.data[j])=='object'){for(var k=0;k<obj.data[j].length;++k){obj.data[j][k]=(obj.__animation_frame__/numFrames)*obj.original_data[j][k];}}else{obj.data[j]=(obj.__animation_frame__/numFrames)*obj.original_data[j];}}
obj.Set('chart.hmargin',((1-(obj.__animation_frame__/numFrames))*(obj.__hmargin__-obj.__original_hmargin__))+obj.__original_hmargin__);RGraph.Clear(obj.canvas);obj.Draw();if(obj.__animation_frame__<numFrames){obj.__animation_frame__+=1;if(location.href.indexOf('?settimeout')>0){setTimeout(Grow,40);}else{RGraph.Effects.UpdateCanvas(Grow);}}}
RGraph.Effects.UpdateCanvas(Grow);}
RGraph.Effects.UpdateCanvas=function(func)
{if(typeof(window.requestAnimationFrame)=='function'){window.requestAnimationFrame(func);}else if(typeof(window.msRequestAnimationFrame)=='function'){window.msRequestAnimationFrame(func);}else if(typeof(window.webkitRequestAnimationFrame)=='function'){window.webkitRequestAnimationFrame(func);}else if(window.mozRequestAnimationFrame&&0){window.mozRequestAnimationFrame(func);}else{setTimeout(func,16.666);}}
RGraph.Effects.Fuel.Grow=function(fuelObj)
{function Grow()
{var numFrames=35;if(!fuelObj.__animation_frame__){fuelObj.__animation_frame__=0;fuelObj.__min__=fuelObj.min;fuelObj.__value__=fuelObj.value;}
fuelObj.value=fuelObj.__min__+(((fuelObj.__value__-fuelObj.__min__)/numFrames)*fuelObj.__animation_frame__);RGraph.Clear(fuelObj.canvas);fuelObj.Draw();if(fuelObj.__animation_frame__<numFrames){fuelObj.__animation_frame__+=1;RGraph.Effects.UpdateCanvas(Grow);}}
RGraph.Effects.UpdateCanvas(Grow);}
RGraph.Effects.Animate=function(obj,map)
{obj.Draw();RGraph.Effects.__total_frames__=(map&&map['frames'])?map['frames']:30;function Animate_Iterator(func)
{var id=[obj.id+'_'+obj.type];if(typeof(RGraph.Effects.__current_frame__)=='undefined'){RGraph.Effects.__current_frame__=new Array();RGraph.Effects.__original_values__=new Array();RGraph.Effects.__diffs__=new Array();RGraph.Effects.__steps__=new Array();RGraph.Effects.__callback__=new Array();}
if(!RGraph.Effects.__current_frame__[id]){RGraph.Effects.__current_frame__[id]=RGraph.Effects.__total_frames__;RGraph.Effects.__original_values__[id]={};RGraph.Effects.__diffs__[id]={};RGraph.Effects.__steps__[id]={};RGraph.Effects.__callback__[id]=func;}
for(var i in map){if(typeof(map[i])=='string'||typeof(map[i])=='number'){if(RGraph.Effects.__current_frame__[id]==RGraph.Effects.__total_frames__){RGraph.Effects.__original_values__[id][i]=obj.Get(i);RGraph.Effects.__diffs__[id][i]=map[i]-RGraph.Effects.__original_values__[id][i];RGraph.Effects.__steps__[id][i]=RGraph.Effects.__diffs__[id][i]/RGraph.Effects.__total_frames__;}
obj.Set(i,obj.Get(i)+RGraph.Effects.__steps__[id][i]);RGraph.Clear(obj.canvas);obj.Draw();}}
if(--RGraph.Effects.__current_frame__[id]>0){RGraph.Effects.UpdateCanvas(Animate_Iterator);}else{if(typeof(RGraph.Effects.__callback__[id])=='function'){(RGraph.Effects.__callback__[id])(obj);}
RGraph.Effects.__current_frame__[id]=null;RGraph.Effects.__original_values__[id]=null;RGraph.Effects.__diffs__[id]=null;RGraph.Effects.__steps__[id]=null;RGraph.Effects.__callback__[id]=null;}}
Animate_Iterator(arguments[2]);}
RGraph.Effects.jQuery.Slide.In=function(obj)
{RGraph.Clear(obj.canvas);obj.Draw();var canvas=obj.canvas;var div=RGraph.Effects.ReplaceCanvasWithDIV(obj.canvas);var delay=1000;div.style.overflow='hidden';var direction=typeof(arguments[1])=='object'&&typeof(arguments[1]['direction'])=='string'?arguments[1]['direction']:'left';canvas.style.position='relative';if(direction=='left'){canvas.style.left=(0-div.offsetWidth)+'px';canvas.style.top=0;}else if(direction=='top'){canvas.style.left=0;canvas.style.top=(0-div.offsetHeight)+'px';}else if(direction=='bottom'){canvas.style.left=0;canvas.style.top=div.offsetHeight+'px';}else{canvas.style.left=div.offsetWidth+'px';canvas.style.top=0;}
$('#'+obj.id).animate({left:0,top:0},delay);if(typeof(arguments[2])=='function'){setTimeout(arguments[2],delay);}}
RGraph.Effects.jQuery.Slide.Out=function(obj)
{var canvas=obj.canvas;var div=RGraph.Effects.ReplaceCanvasWithDIV(obj.canvas);var delay=1000;div.style.overflow='hidden';var direction=typeof(arguments[1])=='object'&&typeof(arguments[1]['direction'])=='string'?arguments[1]['direction']:'left';canvas.style.position='relative';canvas.style.left=0;canvas.style.top=0;if(direction=='left'){$('#'+obj.id).animate({left:(0-canvas.width)+'px'},delay);}else if(direction=='top'){$('#'+obj.id).animate({left:0,top:(0-div.offsetHeight)+'px'},delay);}else if(direction=='bottom'){$('#'+obj.id).animate({top:(0+div.offsetHeight)+'px'},delay);}else{$('#'+obj.id).animate({left:(0+canvas.width)+'px'},delay);}
if(typeof(arguments[2])=='function'){setTimeout(arguments[2],delay);}}
RGraph.Effects.Line.Unfold=function(obj)
{obj.Set('chart.animation.factor',obj.Get('chart.animation.unfold.initial'));RGraph.Effects.Animate(obj,{'chart.animation.factor':1},arguments[2]);}
RGraph.Effects.Rose.Grow=function(obj)
{var numFrames=60;var currentFrame=0;var original_margin=obj.Get('chart.margin');var margin=(360/obj.data.length)/2;var callback=arguments[2];obj.Set('chart.margin',margin);obj.Set('chart.animation.grow.factor',0);function Grow_inner()
{if(currentFrame++<numFrames){obj.Set('chart.animation.grow.factor',currentFrame/numFrames);obj.Set('chart.margin',(currentFrame/numFrames)*original_margin);RGraph.Clear(obj.canvas);obj.Draw();RGraph.Effects.UpdateCanvas(Grow_inner);}else{obj.Set('chart.animation.grow.factor',1);obj.Set('chart.margin',original_margin);RGraph.Clear(obj.canvas);obj.Draw();if(typeof(callback)=='function'){callback(obj);}}}
RGraph.Effects.UpdateCanvas(Grow_inner);}
RGraph.Effects.Line.UnfoldFromCenter=function(obj)
{var numFrames=30;var original_opacity=obj.canvas.style.opacity;obj.canvas.style.opacity=0;obj.Draw();var center_value=obj.scale[4]/2;obj.Set('chart.ymax',Number(obj.scale[4]));RGraph.Clear(obj.canvas);obj.canvas.style.opacity=original_opacity;var original_data=RGraph.array_clone(obj.original_data);var original_blur=obj.Get('chart.shadow.blur');obj.Set('chart.shadow.blur',0);var callback=arguments[2];if(!obj.__increments__){obj.__increments__=new Array();for(var dataset=0;dataset<original_data.length;++dataset){obj.__increments__[dataset]=new Array();for(var i=0;i<original_data[dataset].length;++i){obj.__increments__[dataset][i]=(original_data[dataset][i]-center_value)/numFrames;obj.original_data[dataset][i]=center_value;}}}
function UnfoldFromCenter()
{RGraph.Clear(obj.canvas);obj.Draw();for(var dataset=0;dataset<original_data.length;++dataset){for(var i=0;i<original_data[dataset].length;++i){obj.original_data[dataset][i]+=obj.__increments__[dataset][i];}}
if(--numFrames>0){RGraph.Effects.UpdateCanvas(UnfoldFromCenter);}else{obj.original_data=RGraph.array_clone(original_data);obj.__increments__=null;obj.Set('chart.shadow.blur',original_blur);RGraph.Clear(obj.canvas);obj.Draw();if(typeof(callback)=='function'){callback(obj);}}}
UnfoldFromCenter();}
RGraph.Effects.Line.FoldToCenter=function(obj)
{var totalFrames=30;var numFrame=totalFrames;obj.Draw();var center_value=obj.scale[4]/2;obj.Set('chart.ymax',Number(obj.scale[4]));RGraph.Clear(obj.canvas);var original_data=RGraph.array_clone(obj.original_data);obj.Set('chart.shadow.blur',0);var callback=arguments[2];function FoldToCenter()
{for(var i=0;i<obj.data.length;++i){if(obj.data[i].length){for(var j=0;j<obj.data[i].length;++j){if(obj.original_data[i][j]>center_value){obj.original_data[i][j]=((original_data[i][j]-center_value)*(numFrame/totalFrames))+center_value;}else{obj.original_data[i][j]=center_value-((center_value-original_data[i][j])*(numFrame/totalFrames));}}}}
RGraph.Clear(obj.canvas);obj.Draw();if(numFrame-->0){RGraph.Effects.UpdateCanvas(FoldToCenter);}else if(typeof(callback)=='function'){callback(obj);}}
RGraph.Effects.UpdateCanvas(FoldToCenter);}
RGraph.Effects.Odo.Grow=function(obj)
{var numFrames=30;var origValue=Number(obj.currentValue);var newValue=obj.value;var diff=newValue-origValue;var step=(diff/numFrames);var callback=arguments[2];function Grow_inner()
{if(obj.currentValue!=newValue){obj.value=Number(obj.currentValue)+step;}
RGraph.Clear(obj.canvas);obj.Draw();if(numFrames-->0){RGraph.Effects.UpdateCanvas(Grow_inner);}else if(callback){callback(obj);}}
RGraph.Effects.UpdateCanvas(Grow_inner);}
RGraph.Effects.Meter.Grow=function(obj)
{if(!obj.currentValue){obj.currentValue=obj.min;}
var totalFrames=60;var numFrame=0;var diff=obj.value-obj.currentValue;var step=diff/totalFrames
var callback=arguments[2];function Grow_meter_inner()
{obj.value=obj.currentValue+step;RGraph.Clear(obj.canvas);obj.Draw();if(numFrame++<totalFrames){RGraph.Effects.UpdateCanvas(Grow_meter_inner);}else if(typeof(callback)=='function'){callback(obj);}}
RGraph.Effects.UpdateCanvas(Grow_meter_inner);}
RGraph.Effects.HBar.Grow=function(obj)
{obj.original_data=RGraph.array_clone(obj.data);obj.__animation_frame__=0;if(obj.Get('chart.xmax')==0){var xmax=0;for(var i=0;i<obj.data.length;++i){if(RGraph.is_array(obj.data[i])&&obj.Get('chart.grouping')=='stacked'){xmax=Math.max(xmax,RGraph.array_sum(obj.data[i]));}else if(RGraph.is_array(obj.data[i])&&obj.Get('chart.grouping')=='grouped'){xmax=Math.max(xmax,RGraph.array_max(obj.data[i]));}else{xmax=Math.max(xmax,RGraph.array_max(obj.data[i]));}}
xmax=RGraph.getScale(xmax)[4];obj.Set('chart.xmax',xmax);}
if(obj.Get('chart.shadow.blur')>0){var __original_shadow_blur__=obj.Get('chart.shadow.blur');obj.Set('chart.shadow.blur',0);}
function Grow()
{var numFrames=30;if(!obj.__animation_frame__){obj.__animation_frame__=0;obj.__original_vmargin__=obj.Get('chart.vmargin');obj.__vmargin__=((obj.canvas.height-obj.Get('chart.gutter.top')-obj.Get('chart.gutter.bottom'))/obj.data.length)/2;obj.Set('chart.vmargin',obj.__vmargin__);}
for(var j=0;j<obj.original_data.length;++j){var easing=Math.pow(Math.sin((obj.__animation_frame__*(90/numFrames))/(180/Math.PI)),4);if(typeof(obj.data[j])=='object'){for(var k=0;k<obj.data[j].length;++k){obj.data[j][k]=(obj.__animation_frame__/numFrames)*obj.original_data[j][k]*easing;}}else{obj.data[j]=(obj.__animation_frame__/numFrames)*obj.original_data[j]*easing;}}
obj.Set('chart.vmargin',((1-(obj.__animation_frame__/numFrames))*(obj.__vmargin__-obj.__original_vmargin__))+obj.__original_vmargin__);RGraph.Clear(obj.canvas);obj.Draw();if(obj.__animation_frame__<numFrames){obj.__animation_frame__+=1;RGraph.Effects.UpdateCanvas(Grow);}else{if(typeof(__original_shadow_blur__)=='number'&&__original_shadow_blur__>0){obj.Set('chart.shadow.blur',__original_shadow_blur__);RGraph.Clear(obj.canvas);obj.Draw();}}}
RGraph.Effects.UpdateCanvas(Grow);}
RGraph.Effects.Line.jQuery.Trace=function(obj)
{RGraph.Clear(obj.canvas);obj.Draw();var div=document.createElement('DIV');var xy=RGraph.getCanvasXY(obj.canvas);div.id='__rgraph_trace_animation_'+RGraph.random(0,4351623)+'__';div.style.left=xy[0]+'px';div.style.top=xy[1]+'px';div.style.width=obj.Get('chart.gutter.left');div.style.height=obj.canvas.height+'px';div.style.position='absolute';div.style.overflow='hidden';document.body.appendChild(div);var id='__rgraph_line_reveal_animation_'+RGraph.random(0,99999999)+'__';var canvas2=document.createElement('CANVAS');canvas2.width=obj.canvas.width;canvas2.height=obj.canvas.height;canvas2.style.position='absolute';canvas2.style.left=0;canvas2.style.top=0;canvas2.id=id;div.appendChild(canvas2);var reposition_canvas2=function(e)
{var xy=RGraph.getCanvasXY(obj.canvas);div.style.left=xy[0]+'px';div.style.top=xy[1]+'px';}
window.addEventListener('resize',reposition_canvas2,false)
var obj2=new RGraph.Line(id,RGraph.array_clone(obj.original_data));for(i in obj.properties){if(typeof(i)=='string'&&obj.properties[i]){obj2.Set(i,obj.properties[i]);}}
obj2.Set('chart.labels',[]);obj2.Set('chart.background.grid',false);obj2.Set('chart.ylabels',false);obj2.Set('chart.noaxes',true);obj2.Set('chart.title','');obj2.Set('chart.title.xaxis','');obj2.Set('chart.title.yaxis','');obj2.Set('chart.filled.accumulative',obj.Get('chart.filled.accumulative'));obj2.Set('chart.key.shadow',false);obj2.Set('chart.key.position.gutter.boxed',obj.Get('chart.key.position.gutter.boxed'));obj2.Draw();obj.Set('chart.line.visible',false);obj.Set('chart.colors',['rgba(0,0,0,0)']);if(obj.Get('chart.filled')){obj.Set('chart.fillstyle','rgba(0,0,0,0)');}
RGraph.Clear(obj.canvas);obj.Draw();RGraph.Effects.Line.Trace_callback=function()
{window.removeEventListener('resize',reposition_canvas2,false);div.parentNode.removeChild(div);div.removeChild(canvas2);obj.Set('chart.line.visible',true);obj.Set('chart.filled',RGraph.array_clone(obj2.Get('chart.filled')));obj.Set('chart.fillstyle',RGraph.array_clone(obj2.Get('chart.fillstyle')));obj.Set('chart.colors',RGraph.array_clone(obj2.Get('chart.colors')));obj.Set('chart.key',RGraph.array_clone(obj2.Get('chart.key')));RGraph.Clear(obj.canvas);obj.Draw();}
$('#'+div.id).animate({width:obj.canvas.width+'px'},arguments[2]?arguments[2]:1500,RGraph.Effects.Line.Trace_callback);}
RGraph.Effects.Pie.RoundRobin=function(obj)
{var callback=arguments[2]?arguments[2]:null;var opt=arguments[1];obj.canvas.style.visibility='hidden';obj.Draw();obj.__animation_frame__=0;var targetRadius=typeof(obj.Get('chart.radius'))=='number'?obj.Get('chart.radius'):obj.getRadius();RGraph.Clear(obj.canvas);obj.canvas.style.visibility='visible';function RoundRobin_inner()
{var numFrames=90;obj.Set('chart.effect.roundrobin.multiplier',Math.pow(Math.sin((obj.__animation_frame__*(90/numFrames))/(180/Math.PI)),2)*(obj.__animation_frame__/numFrames));if(!opt||opt['radius']){obj.Set('chart.radius',targetRadius*obj.Get('chart.effect.roundrobin.multiplier'));}
RGraph.Clear(obj.canvas)
obj.Draw();if(obj.__animation_frame__<numFrames){obj.__animation_frame__+=1;RGraph.Effects.UpdateCanvas(RoundRobin_inner);}else if(callback){callback(obj);}}
RGraph.Effects.UpdateCanvas(RoundRobin_inner);}
RGraph.Effects.Pie.Implode=function(obj)
{var numFrames=90;var distance=Math.min(obj.canvas.width,obj.canvas.height);function Implode_inner()
{obj.Set('chart.exploded',Math.sin(numFrames/57.3)*distance);RGraph.Clear(obj.canvas)
obj.Draw();if(numFrames>0){numFrames--;RGraph.Effects.UpdateCanvas(Implode_inner);}else{obj.Set('chart.exploded',0);RGraph.Clear(obj.canvas);obj.Draw();}}
RGraph.Effects.UpdateCanvas(Implode_inner);}
RGraph.Effects.Gauge.Grow=function(obj)
{var numFrames=30;var origValue=Number(obj.currentValue);if(obj.currentValue==null){obj.currentValue=obj.min;origValue=obj.min;}
var newValue=obj.value;var diff=newValue-origValue;var step=(diff/numFrames);function Grow()
{if(obj.currentValue!=newValue){obj.value=Number(obj.currentValue)+step;}
if(obj.value>obj.max){obj.value=obj.max;}
if(obj.value<obj.min){obj.value=obj.min;}
RGraph.Clear(obj.canvas);obj.Draw();if(numFrames-->0){RGraph.Effects.UpdateCanvas(Grow);}}
RGraph.Effects.UpdateCanvas(Grow);}
RGraph.Effects.Radar.Grow=function(obj)
{var totalframes=30;var framenum=totalframes;var data=obj.data;var callback=arguments[2];obj.data=[];function Grow_inner()
{for(var i=0;i<data.length;++i){if(obj.data[i]==null){obj.data[i]=[];}
for(var j=0;j<data[i].length;++j){obj.data[i][j]=((totalframes-framenum)/totalframes)*data[i][j];}}
RGraph.Clear(obj.canvas);obj.Draw();if(framenum>0){framenum--;RGraph.Effects.UpdateCanvas(Grow_inner);}else if(typeof(callback)=='function'){callback(obj);}}
RGraph.Effects.UpdateCanvas(Grow_inner);}
RGraph.Effects.Waterfall.Grow=function(obj)
{var totalFrames=45;var numFrame=0;var data=RGraph.array_clone(obj.data);var callback=arguments[2];for(var i=0;i<obj.data.length;++i){obj.data[i]/=totalFrames;}
if(obj.Get('chart.ymax')==null){var max=RGraph.getScale(obj.getMax(data))[4]
obj.Set('chart.ymax',max);}
obj.Set('chart.multiplier.x',0);obj.Set('chart.multiplier.w',0);function Grow_inner()
{for(var i=0;i<obj.data.length;++i){obj.data[i]=data[i]*(numFrame/totalFrames);}
var multiplier=Math.pow(Math.sin(((numFrame/totalFrames)*90)/57.3),20);obj.Set('chart.multiplier.x',(numFrame/totalFrames)*multiplier);obj.Set('chart.multiplier.w',(numFrame/totalFrames)*multiplier);RGraph.Clear(obj.canvas);obj.Draw();if(numFrame++<totalFrames){RGraph.Effects.UpdateCanvas(Grow_inner);}else if(typeof(callback)=='function'){callback(obj);}}
RGraph.Effects.UpdateCanvas(Grow_inner)};if(typeof(RGraph)=='undefined')RGraph={};RGraph.Meter=function(id,min,max,value)
{this.id=id;this.canvas=document.getElementById(id);this.context=this.canvas.getContext?this.canvas.getContext("2d"):null;this.canvas.__object__=this;this.type='meter';this.min=min;this.max=max;this.value=value;this.centerx=null;this.centery=null;this.radius=null;this.isRGraph=true;this.currentValue=null;RGraph.OldBrowserCompat(this.context);this.properties={'chart.gutter.left':25,'chart.gutter.right':25,'chart.gutter.top':25,'chart.gutter.bottom':25,'chart.linewidth':1,'chart.linewidth.segments':1,'chart.strokestyle':null,'chart.border':true,'chart.border.color':'black','chart.text.font':'Verdana','chart.text.size':10,'chart.text.color':'black','chart.value.label':false,'chart.value.text.decimals':0,'chart.value.text.units.pre':'','chart.value.text.units.post':'','chart.title':'','chart.title.background':null,'chart.title.hpos':null,'chart.title.vpos':null,'chart.title.color':'black','chart.title.bold':true,'chart.title.font':null,'chart.green.start':((this.max-this.min)*0.35)+this.min,'chart.green.end':this.max,'chart.green.color':'#207A20','chart.yellow.start':((this.max-this.min)*0.1)+this.min,'chart.yellow.end':((this.max-this.min)*0.35)+this.min,'chart.yellow.color':'#D0AC41','chart.red.start':this.min,'chart.red.end':((this.max-this.min)*0.1)+this.min,'chart.red.color':'#9E1E1E','chart.units.pre':'','chart.units.post':'','chart.contextmenu':null,'chart.zoom.factor':1.5,'chart.zoom.fade.in':true,'chart.zoom.fade.out':true,'chart.zoom.hdir':'right','chart.zoom.vdir':'down','chart.zoom.frames':25,'chart.zoom.delay':16.666,'chart.zoom.shadow':true,'chart.zoom.mode':'canvas','chart.zoom.thumbnail.width':75,'chart.zoom.thumbnail.height':75,'chart.zoom.background':true,'chart.zoom.action':'zoom','chart.annotatable':false,'chart.annotate.color':'black','chart.shadow':false,'chart.shadow.color':'rgba(0,0,0,0.5)','chart.shadow.blur':3,'chart.shadow.offsetx':3,'chart.shadow.offsety':3,'chart.resizable':false,'chart.resize.handle.adjust':[0,0],'chart.resize.handle.background':null,'chart.tickmarks.small.num':100,'chart.tickmarks.big.num':10,'chart.tickmarks.small.color':'#bbb','chart.tickmarks.big.color':'black','chart.scale.decimals':0,'chart.radius':null,'chart.centerx':null,'chart.centery':null,'chart.labels':true,'chart.segment.radius.start':null,'chart.needle.radius':null,'chart.needle.tail':false}
if(!this.canvas){alert('[METER] No canvas support');return;}}
RGraph.Meter.prototype.Set=function(name,value)
{if(name=='chart.value'){this.value=value;return;}
this.properties[name.toLowerCase()]=value;}
RGraph.Meter.prototype.Get=function(name)
{if(name=='chart.value'){return this.value;}
return this.properties[name];}
RGraph.Meter.prototype.Draw=function()
{RGraph.FireCustomEvent(this,'onbeforedraw');if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.currentValue=this.value;this.gutterLeft=this.Get('chart.gutter.left');this.gutterRight=this.Get('chart.gutter.right');this.gutterTop=this.Get('chart.gutter.top');this.gutterBottom=this.Get('chart.gutter.bottom');this.centerx=this.canvas.width/2;this.centery=this.canvas.height-this.gutterBottom;this.radius=Math.min(this.canvas.width-this.gutterLeft-this.gutterRight,this.canvas.height-this.gutterTop-this.gutterBottom);if(typeof(this.Get('chart.centerx'))=='number')this.centerx=this.Get('chart.centerx');if(typeof(this.Get('chart.centery'))=='number')this.centery=this.Get('chart.centery');if(typeof(this.Get('chart.radius'))=='number')this.radius=this.Get('chart.radius');this.DrawBackground();this.DrawNeedle();this.DrawLabels();this.DrawReadout();RGraph.DrawTitle(this.canvas,this.Get('chart.title'),this.gutterTop,null,this.Get('chart.title.size')?this.Get('chart.title.size'):this.Get('chart.text.size')+2);if(this.Get('chart.contextmenu')){RGraph.ShowContext(this);}
if(this.Get('chart.annotatable')){RGraph.Annotate(this);}
if(this.Get('chart.zoom.mode')=='thumbnail'||this.Get('chart.zoom.mode')=='area'){RGraph.ShowZoomWindow(this);}
if(this.Get('chart.resizable')){RGraph.AllowResizing(this);}
if(RGraph.isIE8()){this.context.beginPath();this.context.moveTo(this.gutterLeft,this.canvas.height-this.gutterBottom);this.context.fillStyle='white';this.context.fillRect(this.centerx-this.radius-5,RGraph.GetHeight(this)-this.gutterBottom+1,10,this.gutterBottom);this.context.fill();this.context.beginPath();this.context.moveTo(RGraph.GetWidth(this)-this.gutterRight,RGraph.GetHeight(this)-this.gutterBottom);this.context.fillStyle='white';this.context.fillRect(this.centerx+this.radius-5,RGraph.GetHeight(this)-this.gutterBottom+1,10,this.gutterBottom);this.context.fill();}
RGraph.FireCustomEvent(this,'ondraw');}
RGraph.Meter.prototype.DrawBackground=function()
{if(this.Get('chart.shadow')){this.context.beginPath();this.context.fillStyle='white';this.context.shadowColor=this.Get('chart.shadow.color');this.context.shadowBlur=this.Get('chart.shadow.blur');this.context.shadowOffsetX=this.Get('chart.shadow.offsetx');this.context.shadowOffsetY=this.Get('chart.shadow.offsety');this.context.arc(this.centerx,this.centery,this.radius,3.14,6.28,false);this.context.fill();this.context.beginPath();var r=(this.radius*0.06)>40?40:(this.radius*0.06);this.context.arc(this.centerx,this.centery,r,0,6.28,0);this.context.fill();RGraph.NoShadow(this);}
if(this.Get('chart.tickmarks.small.num')){for(var i=0;i<3.14;i+=(3.14/this.Get('chart.tickmarks.small.num'))){this.context.beginPath();this.context.strokeStyle=this.Get('chart.tickmarks.small.color');this.context.arc(this.centerx,this.centery,this.radius,3.14+i,3.1415+i,0);this.context.arc(this.centerx,this.centery,this.radius-5,3.14+i,3.1415+i,0);this.context.stroke();}
this.context.beginPath();this.context.fillStyle='white'
this.context.arc(this.centerx,this.centery,this.radius-4,3.14,6.28,false);this.context.closePath();this.context.fill();}
if(this.Get('chart.tickmarks.big.num')){var colors=['white','white',this.Get('chart.tickmarks.big.color')];for(var j=0;j<colors.length;++j){for(var i=0;i<3.14;i+=(3.1415927/this.Get('chart.tickmarks.big.num'))){this.context.beginPath();this.context.strokeStyle=colors[j];this.context.arc(this.centerx,this.centery,this.radius,3.14+i,3.1415+i,0);this.context.arc(this.centerx,this.centery,this.radius-5,3.14+i,3.1415+i,0);this.context.stroke();}}}
this.context.beginPath();this.context.fillStyle='white';this.context.arc(this.centerx,this.centery,this.radius-7,3.1415927,6.28,false);this.context.closePath();this.context.fill();var ranges=this.Get('chart.colors.ranges');if(RGraph.is_array(this.Get('chart.colors.ranges'))){var ranges=this.Get('chart.colors.ranges');for(var i=0;i<ranges.length;++i){this.context.strokeStyle=this.Get('chart.strokestyle')?this.Get('chart.strokestyle'):ranges[i][2];this.context.fillStyle=ranges[i][2];this.context.lineWidth=this.Get('chart.linewidth.segments');this.context.beginPath();this.context.moveTo(this.centerx,this.centery);this.context.arc(this.centerx,this.centery,this.radius*0.85,(((ranges[i][0]-this.min)/(this.max-this.min))*3.1415927)+3.1415927,(((ranges[i][1]-this.min)/(this.max-this.min))*3.1415927)+3.1415927,false);this.context.lineTo(this.centerx,this.centery);this.context.closePath();this.context.stroke();this.context.fill();}
this.context.beginPath();}else{this.context.strokeStyle=this.Get('chart.strokestyle')?this.Get('chart.strokestyle'):this.Get('chart.green.color');this.context.fillStyle=this.Get('chart.green.color');this.context.lineWidth=this.Get('chart.linewidth.segments');this.context.beginPath();this.context.arc(this.centerx,this.centery,this.radius*0.85,(((this.Get('chart.green.start')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,(((this.Get('chart.green.end')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,false);if(typeof(this.Get('chart.segment.radius.start'))&&this.Get('chart.segment.radius.start')){this.context.arc(this.centerx,this.centery,this.Get('chart.segment.radius.start'),(((this.Get('chart.green.end')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,(((this.Get('chart.green.start')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,true);}else{this.context.lineTo(this.centerx,this.centery);}
this.context.closePath();this.context.stroke();this.context.fill();this.context.strokeStyle=this.Get('chart.strokestyle')?this.Get('chart.strokestyle'):this.Get('chart.yellow.color');this.context.fillStyle=this.Get('chart.yellow.color');this.context.lineWidth=this.Get('chart.linewidth.segments');this.context.beginPath();this.context.arc(this.centerx,this.centery,this.radius*0.85,(((this.Get('chart.yellow.start')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,(((this.Get('chart.yellow.end')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,false);if(typeof(this.Get('chart.segment.radius.start'))&&this.Get('chart.segment.radius.start')){this.context.arc(this.centerx,this.centery,this.Get('chart.segment.radius.start'),(((this.Get('chart.yellow.end')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,(((this.Get('chart.yellow.start')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,true);}else{this.context.lineTo(this.centerx,this.centery);}
this.context.closePath();this.context.stroke();this.context.fill();this.context.strokeStyle=this.Get('chart.strokestyle')?this.Get('chart.strokestyle'):this.Get('chart.red.color');this.context.fillStyle=this.Get('chart.red.color');this.context.lineWidth=this.Get('chart.linewidth.segments');this.context.beginPath();this.context.arc(this.centerx,this.centery,this.radius*0.85,(((this.Get('chart.red.start')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,(((this.Get('chart.red.end')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,false);if(typeof(this.Get('chart.segment.radius.start'))&&this.Get('chart.segment.radius.start')){this.context.arc(this.centerx,this.centery,this.Get('chart.segment.radius.start'),(((this.Get('chart.red.end')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,(((this.Get('chart.red.start')-this.min)/(this.max-this.min))*3.1415927)+3.1415927,true);}else{this.context.lineTo(this.centerx,this.centery);}
this.context.closePath();this.context.stroke();this.context.fill();this.context.lineWidth=1;}
if(this.Get('chart.border')){this.context.strokeStyle=this.Get('chart.border.color');this.context.lineWidth=this.Get('chart.linewidth');this.context.beginPath();this.context.moveTo(this.centerx,this.centery);this.context.arc(this.centerx,this.centery,this.radius,3.1415927,6.2831854,false);this.context.closePath();}
this.context.stroke();this.context.lineWidth=1;}
RGraph.Meter.prototype.DrawNeedle=function()
{var needleRadius=typeof(this.Get('chart.needle.radius'))=='number'?this.Get('chart.needle.radius'):this.radius*0.7;this.context.fillStyle='black';this.context.lineWidth=this.radius>=200?7:3;this.context.lineCap='round';this.context.beginPath();this.context.strokeStyle='black';if(typeof(this.Get('chart.needle.linewidth'))=='number')this.context.lineWidth=this.Get('chart.needle.linewidth');var a=(((this.value-this.min)/(this.max-this.min))*3.14)+3.14;this.context.arc(this.centerx,this.centery,needleRadius,a,a+0.001,false);this.context.lineTo(this.centerx,this.centery);this.context.stroke();this.context.beginPath();this.context.lineWidth=1;this.context.arc(this.centerx,this.centery,needleRadius+15,a,a+0.001,0);this.context.arc(this.centerx,this.centery,needleRadius-15,a+0.087,a+0.087999,0);this.context.arc(this.centerx,this.centery,needleRadius-15,a-0.087,a-0.087999,1);this.context.fill();if(this.Get('chart.needle.tail')){this.context.beginPath();this.context.strokeStyle='black';if(typeof(this.Get('chart.needle.linewidth'))=='number')this.context.lineWidth=this.Get('chart.needle.linewidth');var a=(((this.value-this.min)/(this.max-this.min))*3.14)+6.28;this.context.arc(this.centerx,this.centery,25,a,a+0.001,false);this.context.lineTo(this.centerx,this.centery);this.context.stroke();}
var r=(this.radius*0.06)>40?40:(this.radius*0.06);this.context.beginPath();this.context.arc(this.centerx,this.centery,r,0,6.28,0);this.context.fill();this.context.fillStyle='white';this.context.beginPath();this.context.arc(this.centerx,this.centery,r-2,0,6.28,0);this.context.fill();}
RGraph.Meter.prototype.DrawLabels=function()
{if(!this.Get('chart.labels')){return;}
var context=this.context;var radius=this.radius;var text_size=this.Get('chart.text.size');var text_font=this.Get('chart.text.font');var units_post=this.Get('chart.units.post');var units_pre=this.Get('chart.units.pre');var centerx=this.centerx;var centery=this.centery;var min=this.min;var max=this.max;var decimals=this.Get('chart.scale.decimals');context.fillStyle=this.Get('chart.text.color');context.lineWidth=1;context.beginPath();RGraph.Text(context,text_font,text_size,centerx-radius+(0.075*radius),centery-(this.Get('chart.border')?10:-5),units_pre+(min).toFixed(decimals)+units_post,'center','left',false,270);RGraph.Text(context,text_font,text_size,centerx-(Math.cos(0.62819/2)*(radius-(0.075*radius))),centery-(Math.sin(0.682819/2)*(radius-(0.1587*radius))),units_pre+(((max-min)*(1/10))+min).toFixed(decimals)+units_post,'center','center',false,288);RGraph.Text(context,text_font,text_size,centerx-(Math.cos(0.62819)*(radius-(0.07*radius))),centery-(Math.sin(0.682819)*(radius-(0.15*radius))),units_pre+(((max-min)*(2/10))+min).toFixed(decimals)+units_post,'center','center',false,306);RGraph.Text(context,text_font,text_size,centerx-(Math.cos(0.95)*(radius-(0.085*radius))),centery-(Math.sin(0.95)*(radius-(0.0785*radius))),units_pre+(((max-min)*(3/10))+min).toFixed(decimals)+units_post,'center','center',false,320);RGraph.Text(context,text_font,text_size,centerx-(Math.cos(1.2566)*(radius-(0.085*radius))),centery-(Math.sin(1.2566)*(radius-(0.0785*radius))),units_pre+(((max-min)*(4/10))+min).toFixed(decimals)+units_post,'center','center',false,342);RGraph.Text(context,text_font,text_size,centerx-(Math.cos(1.57)*(radius-(0.075*radius))),centery-(Math.sin(1.57)*(radius-(0.075*radius))),units_pre+(((max-min)*(5/10))+min).toFixed(decimals)+units_post,'center','center',false,0);RGraph.Text(context,text_font,text_size,centerx-(Math.cos(1.88495562)*(radius-(0.075*radius))),centery-(Math.sin(1.88495562)*(radius-(0.075*radius))),units_pre+(((max-min)*(6/10))+min).toFixed(decimals)+units_post,'center','center',false,18);RGraph.Text(context,text_font,text_size,centerx-(Math.cos(2.1989)*(radius-(0.075*radius))),centery-(Math.sin(2.1989)*(radius-(0.075*radius))),units_pre+(((max-min)*(7/10))+min).toFixed(decimals)+units_post,'center','center',false,36);RGraph.Text(context,text_font,text_size,centerx-(Math.cos(2.51327416)*(radius-(0.075*radius))),centery-(Math.sin(2.51327416)*(radius-(0.075*radius))),units_pre+(((max-min)*(8/10))+min).toFixed(decimals)+units_post,'center','center',false,54);RGraph.Text(context,text_font,text_size,centerx-(Math.cos(2.82764832)*(radius-(0.075*radius))),centery-(Math.sin(2.82764832)*(radius-(0.075*radius))),units_pre+(((max-min)*(9/10))+min).toFixed(decimals)+units_post,'center','center',false,72);RGraph.Text(context,text_font,text_size,centerx+radius-(0.075*radius),centery-(!this.Get('chart.border')?-5:10),units_pre+(max).toFixed(decimals)+units_post,'center','right',false,90);context.fill();context.stroke();}
RGraph.Meter.prototype.DrawReadout=function()
{if(this.Get('chart.value.text')){this.context.beginPath();RGraph.Text(this.context,this.Get('chart.text.font'),this.Get('chart.text.size'),this.centerx,this.centery-this.Get('chart.text.size')-15,this.Get('chart.value.text.units.pre')+(this.value).toFixed(this.Get('chart.value.text.decimals'))+this.Get('chart.value.text.units.post'),'center','center',true,null,'white');this.context.stroke();this.context.fill();}};if(typeof(RGraph)=='undefined')RGraph={};RGraph.Odometer=function(id,start,end,value)
{this.id=id
this.canvas=document.getElementById(id);this.context=this.canvas.getContext('2d');this.canvas.__object__=this;this.type='odo';this.isRGraph=true;this.start=start;this.end=end;this.value=value;this.currentValue=null;RGraph.OldBrowserCompat(this.context);this.properties={'chart.radius':null,'chart.value.text':false,'chart.value.text.decimals':0,'chart.needle.color':'black','chart.needle.width':2,'chart.needle.head':true,'chart.needle.tail':true,'chart.needle.type':'pointer','chart.needle.extra':[],'chart.needle.triangle.border':'#aaa','chart.text.size':10,'chart.text.color':'black','chart.text.font':'Verdana','chart.green.max':end*0.75,'chart.red.min':end*0.9,'chart.green.color':'green','chart.yellow.color':'yellow','chart.red.color':'red','chart.green.solid':false,'chart.yellow.solid':false,'chart.red.solid':false,'chart.label.area':35,'chart.gutter.left':25,'chart.gutter.right':25,'chart.gutter.top':25,'chart.gutter.bottom':25,'chart.title':'','chart.title.background':null,'chart.title.hpos':null,'chart.title.vpos':null,'chart.title.font':null,'chart.title.bold':true,'chart.contextmenu':null,'chart.linewidth':1,'chart.shadow.inner':false,'chart.shadow.inner.color':'black','chart.shadow.inner.offsetx':3,'chart.shadow.inner.offsety':3,'chart.shadow.inner.blur':6,'chart.shadow.outer':false,'chart.shadow.outer.color':'#666','chart.shadow.outer.offsetx':0,'chart.shadow.outer.offsety':0,'chart.shadow.outer.blur':15,'chart.annotatable':false,'chart.annotate.color':'black','chart.scale.decimals':0,'chart.zoom.factor':1.5,'chart.zoom.fade.in':true,'chart.zoom.fade.out':true,'chart.zoom.hdir':'right','chart.zoom.vdir':'down','chart.zoom.frames':25,'chart.zoom.delay':16.666,'chart.zoom.shadow':true,'chart.zoom.mode':'canvas','chart.zoom.thumbnail.width':75,'chart.zoom.thumbnail.height':75,'chart.zoom.background':true,'chart.zoom.action':'zoom','chart.resizable':false,'chart.resize.handle.adjust':[0,0],'chart.resize.handle.background':null,'chart.units.pre':'','chart.units.post':'','chart.border':false,'chart.border.color1':'#BEBCB0','chart.border.color2':'#F0EFEA','chart.border.color3':'#BEBCB0','chart.tickmarks.highlighted':false,'chart.zerostart':false,'chart.labels':null,'chart.units.pre':'','chart.units.post':'','chart.value.units.pre':'','chart.value.units.post':'','chart.key':[],'chart.key.background':'white','chart.key.position':'graph','chart.key.shadow':false,'chart.key.shadow.color':'#666','chart.key.shadow.blur':3,'chart.key.shadow.offsetx':2,'chart.key.shadow.offsety':2,'chart.key.position.gutter.boxed':true,'chart.key.position.x':null,'chart.key.position.y':null,'chart.key.halign':'right','chart.key.color.shape':'square','chart.key.rounded':true,'chart.key.text.size':10,}}
RGraph.Odometer.prototype.Set=function(name,value)
{if(name=='chart.needle.style'){alert('[RGRAPH] The RGraph property chart.needle.style has changed to chart.needle.color');}
if(name=='chart.needle.thickness'){name='chart.needle.width';}
if(name=='chart.value'){this.value=value;return;}
this.properties[name.toLowerCase()]=value;}
RGraph.Odometer.prototype.Get=function(name)
{if(name=='chart.value'){return this.value;}
return this.properties[name.toLowerCase()];}
RGraph.Odometer.prototype.Draw=function()
{RGraph.FireCustomEvent(this,'onbeforedraw');RGraph.ClearEventListeners(this.id);this.currentValue=this.value;if(this.value>this.end){this.value=this.end;}
if(this.value<this.start){this.value=this.start;}
this.gutterLeft=this.Get('chart.gutter.left');this.gutterRight=this.Get('chart.gutter.right');this.gutterTop=this.Get('chart.gutter.top');this.gutterBottom=this.Get('chart.gutter.bottom');this.radius=Math.min((RGraph.GetWidth(this)-this.gutterLeft-this.gutterRight)/2,(RGraph.GetHeight(this)-this.gutterTop-this.gutterBottom)/2)-(this.Get('chart.border')?25:0);this.diameter=2*this.radius;this.centerx=this.canvas.width/2;this.centery=this.canvas.height/2;this.range=this.end-this.start;if(typeof(this.Get('chart.radius'))=='number'){this.radius=this.Get('chart.radius');}
if(this.Get('chart.key').length>0&&this.canvas.width>this.canvas.height){this.centerx=5+this.radius;}
this.context.lineWidth=this.Get('chart.linewidth');this.DrawBackground();this.DrawLabels();this.DrawNeedle(this.value,this.Get('chart.needle.color'));if(this.Get('chart.needle.extra').length>0){for(var i=0;i<this.Get('chart.needle.extra').length;++i){var needle=this.Get('chart.needle.extra')[i];this.DrawNeedle(needle[0],needle[1],needle[2]);}}
if(this.Get('chart.key').length>0){var colors=[this.Get('chart.needle.color')];if(this.Get('chart.needle.extra').length>0){for(var i=0;i<this.Get('chart.needle.extra').length;++i){var needle=this.Get('chart.needle.extra')[i];colors.push(needle[1]);}}
RGraph.DrawKey(this,this.Get('chart.key'),colors);}
if(this.Get('chart.contextmenu')){RGraph.ShowContext(this);}
if(this.Get('chart.annotatable')){RGraph.Annotate(this);}
if(this.Get('chart.zoom.mode')=='thumbnail'||this.Get('chart.zoom.mode')=='area'){RGraph.ShowZoomWindow(this);}
if(this.Get('chart.resizable')){RGraph.AllowResizing(this);}
RGraph.FireCustomEvent(this,'ondraw');}
RGraph.Odometer.prototype.DrawBackground=function()
{this.context.beginPath();if(this.Get('chart.shadow.outer')){RGraph.SetShadow(this,this.Get('chart.shadow.outer.color'),this.Get('chart.shadow.outer.offsetx'),this.Get('chart.shadow.outer.offsety'),this.Get('chart.shadow.outer.blur'));}
var backgroundColor='#eee';this.context.fillStyle=backgroundColor;this.context.arc(this.centerx,this.centery,this.radius,0.0001,6.28,false);this.context.fill();RGraph.NoShadow(this);this.context.strokeStyle='#666';this.context.arc(this.centerx,this.centery,this.radius,0,6.28,false);this.context.fillStyle=backgroundColor;this.context.arc(this.centerx,this.centery,this.radius,0,6.28,false);this.context.fill();this.context.beginPath();this.context.strokeStyle='#bbb';for(var i=0;i<=360;i+=3){this.context.arc(this.centerx,this.centery,this.radius,0,RGraph.degrees2Radians(i),false);this.context.lineTo(this.centerx,this.centery);}
this.context.stroke();this.context.beginPath();this.context.lineWidth=1;this.context.strokeStyle='black';this.context.fillStyle=backgroundColor;this.context.strokeStyle=backgroundColor;this.context.arc(this.centerx,this.centery,this.radius-5,0,6.28,false);this.context.fill();this.context.stroke();this.context.beginPath();this.context.strokeStyle='#ddd';for(var i=0;i<360;i+=18){this.context.arc(this.centerx,this.centery,this.radius,0,RGraph.degrees2Radians(i),false);this.context.lineTo(this.centerx,this.centery);}
this.context.stroke();this.context.beginPath();this.context.strokeStyle='black';this.context.arc(this.centerx,this.centery,this.radius,0,6.2830,false);this.context.stroke();if(this.Get('chart.shadow.inner')){this.context.beginPath();RGraph.SetShadow(this,this.Get('chart.shadow.inner.color'),this.Get('chart.shadow.inner.offsetx'),this.Get('chart.shadow.inner.offsety'),this.Get('chart.shadow.inner.blur'));this.context.arc(this.centerx,this.centery,this.radius-this.Get('chart.label.area'),0,6.28,0);this.context.fill();this.context.stroke();RGraph.NoShadow(this);}
if(this.Get('chart.green.solid')){var greengrad=this.Get('chart.green.color');}else{var greengrad=this.context.createRadialGradient(this.centerx,this.centery,0,this.centerx,this.centery,this.radius);greengrad.addColorStop(0,'white');greengrad.addColorStop(1,this.Get('chart.green.color'));}
if(this.Get('chart.tickmarks.highlighted')){this.context.beginPath();this.context.lineWidth=5;this.context.strokeStyle=greengrad;this.context.arc(this.centerx,this.centery,this.radius-2.5,-1.57,(((this.Get('chart.green.max')-this.start)/(this.end-this.start))*6.2830)-1.57,0);this.context.stroke();this.context.lineWidth=1;}
this.context.beginPath();this.context.fillStyle=greengrad;this.context.arc(this.centerx,this.centery,this.radius-this.Get('chart.label.area'),-1.57,(((this.Get('chart.green.max')-this.start)/(this.end-this.start))*6.2830)-1.57,false);this.context.lineTo(this.centerx,this.centery);this.context.closePath();this.context.fill();if(this.Get('chart.yellow.solid')){var yellowgrad=this.Get('chart.yellow.color');}else{var yellowgrad=this.context.createRadialGradient(this.centerx,this.centery,0,this.centerx,this.centery,this.radius);yellowgrad.addColorStop(0,'white');yellowgrad.addColorStop(1,this.Get('chart.yellow.color'));}
if(this.Get('chart.tickmarks.highlighted')){this.context.beginPath();this.context.lineWidth=5;this.context.strokeStyle=yellowgrad;this.context.arc(this.centerx,this.centery,this.radius-2.5,(((this.Get('chart.green.max')-this.start)/(this.end-this.start))*6.2830)-1.57,(((this.Get('chart.red.min')-this.start)/(this.end-this.start))*6.2830)-1.57,0);this.context.stroke();this.context.lineWidth=1;}
this.context.beginPath();this.context.fillStyle=yellowgrad;this.context.arc(this.centerx,this.centery,this.radius-this.Get('chart.label.area'),(((this.Get('chart.green.max')-this.start)/(this.end-this.start))*6.2830)-1.57,(((this.Get('chart.red.min')-this.start)/(this.end-this.start))*6.2830)-1.57,false);this.context.lineTo(this.centerx,this.centery);this.context.closePath();this.context.fill();if(this.Get('chart.red.solid')){var redgrad=this.Get('chart.red.color');}else{var redgrad=this.context.createRadialGradient(this.centerx,this.centery,0,this.centerx,this.centery,this.radius);redgrad.addColorStop(0,'white');redgrad.addColorStop(1,this.Get('chart.red.color'));}
if(this.Get('chart.tickmarks.highlighted')){this.context.beginPath();this.context.lineWidth=5;this.context.strokeStyle=redgrad;this.context.arc(this.centerx,this.centery,this.radius-2.5,(((this.Get('chart.red.min')-this.start)/(this.end-this.start))*6.2830)-1.57,(2*Math.PI)-(0.5*Math.PI),0);this.context.stroke();this.context.lineWidth=1;}
this.context.beginPath();this.context.fillStyle=redgrad;this.context.strokeStyle=redgrad;this.context.arc(this.centerx,this.centery,this.radius-this.Get('chart.label.area'),(((this.Get('chart.red.min')-this.start)/(this.end-this.start))*6.2830)-1.57,6.2830-(0.25*6.2830),false);this.context.lineTo(this.centerx,this.centery);this.context.closePath();this.context.fill();if(this.Get('chart.border')){var grad=this.context.createRadialGradient(this.centerx,this.centery,this.radius,this.centerx,this.centery,this.radius+20);grad.addColorStop(0,this.Get('chart.border.color1'));grad.addColorStop(0.5,this.Get('chart.border.color2'));grad.addColorStop(1,this.Get('chart.border.color3'));this.context.beginPath();this.context.fillStyle=grad;this.context.strokeStyle='rgba(0,0,0,0)'
this.context.lineWidth=0.001;this.context.arc(this.centerx,this.centery,this.radius+20,0,6.2830,0);this.context.arc(this.centerx,this.centery,this.radius-2,6.2830,0,1);this.context.fill();}
this.context.lineWidth=this.Get('chart.linewidth');if(this.Get('chart.title')){RGraph.DrawTitle(this.canvas,this.Get('chart.title'),this.centery-this.radius,null,this.Get('chart.title.size')?this.Get('chart.title.size'):this.Get('chart.text.size')+2);}
if(!this.Get('chart.tickmarks.highlighted')){for(var i=18;i<=360;i+=36){this.context.beginPath();this.context.strokeStyle='#999';this.context.lineWidth=2;this.context.arc(this.centerx,this.centery,this.radius-1,RGraph.degrees2Radians(i),RGraph.degrees2Radians(i+0.01),false);this.context.arc(this.centerx,this.centery,this.radius-7,RGraph.degrees2Radians(i),RGraph.degrees2Radians(i+0.01),false);this.context.stroke();}}}
RGraph.Odometer.prototype.DrawNeedle=function(value,color)
{var length=arguments[2]?arguments[2]:this.radius-this.Get('chart.label.area');this.context.fillStyle='#999';this.context.beginPath();this.context.moveTo(this.centerx,this.centery);this.context.arc(this.centerx,this.centery,10,0,6.28,false);this.context.fill();this.context.closePath();this.context.fill();this.context.fillStyle=color
this.context.strokeStyle='#666';this.context.beginPath();this.context.moveTo(this.centerx,this.centery);this.context.arc(this.centerx,this.centery,8,0,6.28,false);this.context.fill();this.context.closePath();this.context.stroke();this.context.fill();if(this.Get('chart.needle.type')=='pointer'){this.context.strokeStyle=color;this.context.lineWidth=this.Get('chart.needle.width');this.context.lineCap='round';this.context.lineJoin='round';this.context.beginPath();this.context.beginPath();this.context.moveTo(this.centerx,this.centery);if(this.Get('chart.needle.tail')){this.context.arc(this.centerx,this.centery,20,(((value/this.range)*360)+90)/57.3,(((value/this.range)*360)+90+0.01)/57.3,false);}
this.context.arc(this.centerx,this.centery,length-10,(((value/this.range)*360)-90)/57.3,(((value/this.range)*360)-90+0.1)/57.3,false);this.context.closePath();}else if(this.Get('chart.needle.type')=='triangle'){this.context.lineWidth=0.01;this.context.lineEnd='square';this.context.lineJoin='miter';this.context.beginPath();this.context.fillStyle=this.Get('chart.needle.triangle.border');this.context.arc(this.centerx,this.centery,11,(((value/this.range)*360))/57.3,((((value/this.range)*360))+0.01)/57.3,0);this.context.arc(this.centerx,this.centery,11,(((value/this.range)*360)+180)/57.3,((((value/this.range)*360)+180)+0.01)/57.3,0);this.context.arc(this.centerx,this.centery,length-5,(((value/this.range)*360)-90)/57.3,((((value/this.range)*360)-90)/57.3)+0.01,0);this.context.closePath();this.context.fill();this.context.beginPath();this.context.arc(this.centerx,this.centery,15,0,6.28,0);this.context.closePath();this.context.fill();this.context.beginPath();this.context.strokeStyle='black';this.context.fillStyle=color;this.context.arc(this.centerx,this.centery,7,(((value/this.range)*360))/57.3,((((value/this.range)*360))+0.01)/57.3,0);this.context.arc(this.centerx,this.centery,7,(((value/this.range)*360)+180)/57.3,((((value/this.range)*360)+180)+0.01)/57.3,0);this.context.arc(this.centerx,this.centery,length-13,(((value/this.range)*360)-90)/57.3,((((value/this.range)*360)-90)/57.3)+0.01,0);this.context.closePath();this.context.stroke();this.context.fill();this.context.beginPath();this.context.arc(this.centerx,this.centery,7,0,6.28,0);this.context.closePath();this.context.fill();}
this.context.stroke();this.context.fill();this.context.beginPath();this.context.fillStyle=color;this.context.arc(this.centerx,this.centery,this.Get('chart.needle.type')=='pointer'?7:12,0.01,6.2830,false);this.context.fill();if(this.Get('chart.needle.head')&&this.Get('chart.needle.type')=='pointer'){this.context.lineWidth=1;this.context.fillStyle=color;this.context.lineJoin='miter';this.context.lineCap='butt';this.context.beginPath();this.context.arc(this.centerx,this.centery,length-5,(((value/this.range)*360)-90)/57.3,(((value/this.range)*360)-90+0.1)/57.3,false);this.context.arc(this.centerx,this.centery,length-20,RGraph.degrees2Radians(((value/this.range)*360)-(length<60?80:85)),RGraph.degrees2Radians(((value/this.range)*360)-(length<60?100:95)),1);this.context.closePath();this.context.fill();}
this.context.beginPath();this.context.fillStyle='gray';this.context.moveTo(this.centerx,this.centery);this.context.arc(this.centerx,this.centery,2,0,6.2795,false);this.context.closePath();this.context.fill();}
RGraph.Odometer.prototype.DrawLabels=function()
{var context=this.context;var size=this.Get('chart.text.size');var font=this.Get('chart.text.font');var centerx=this.centerx;var centery=this.centery;var r=this.radius-(this.Get('chart.label.area')/2);var start=this.start;var end=this.end;var decimals=this.Get('chart.scale.decimals');var labels=this.Get('chart.labels');var units_pre=this.Get('chart.units.pre');var units_post=this.Get('chart.units.post');context.beginPath();context.fillStyle=this.Get('chart.text.color');if(labels){for(var i=0;i<labels.length;++i){RGraph.Text(context,font,size,centerx+(Math.cos(((i/labels.length)*6.28)-1.57)*(this.radius-(this.Get('chart.label.area')/2))),centery+(Math.sin(((i/labels.length)*6.28)-1.57)*(this.radius-(this.Get('chart.label.area')/2))),String(units_pre+labels[i]+units_post),'center','center');}}else{RGraph.Text(context,font,size,centerx+(0.588*r),centery-(0.809*r),String(units_pre+(((end-start)*(1/10))+start).toFixed(decimals)+units_post),'center','center',false,36);RGraph.Text(context,font,size,centerx+(0.951*r),centery-(0.309*r),String(units_pre+(((end-start)*(2/10))+start).toFixed(decimals)+units_post),'center','center',false,72);RGraph.Text(context,font,size,centerx+(0.949*r),centery+(0.287*r),String(units_pre+(((end-start)*(3/10))+start).toFixed(decimals)+units_post),'center','center',false,108);RGraph.Text(context,font,size,centerx+(0.588*r),centery+(0.809*r),String(units_pre+(((end-start)*(4/10))+start).toFixed(decimals)+units_post),'center','center',false,144);RGraph.Text(context,font,size,centerx,centery+r,String(units_pre+(((end-start)*(5/10))+start).toFixed(decimals)+units_post),'center','center',false,180);RGraph.Text(context,font,size,centerx-(0.588*r),centery+(0.809*r),String(units_pre+(((end-start)*(6/10))+start).toFixed(decimals)+units_post),'center','center',false,216);RGraph.Text(context,font,size,centerx-(0.949*r),centery+(0.300*r),a=String(units_pre+(((end-start)*(7/10))+start).toFixed(decimals)+units_post),'center','center',false,252);RGraph.Text(context,font,size,centerx-(0.951*r),centery-(0.309*r),String(units_pre+(((end-start)*(8/10))+start).toFixed(decimals)+units_post),'center','center',false,288);RGraph.Text(context,font,size,centerx-(0.588*r),centery-(0.809*r),String(units_pre+(((end-start)*(9/10))+start).toFixed(decimals)+units_post),'center','center',false,324);RGraph.Text(context,font,size,centerx,centery-r,this.Get('chart.zerostart')?units_pre+String(this.start)+units_post:String(units_pre+(((end-start)*(10/10))+start).toFixed(decimals)+units_post),'center','center',false,360);}
this.context.fill();if(this.Get('chart.value.text')){context.strokeStyle='black';RGraph.Text(context,font,size+2,centerx,centery+size+2+10,String(this.Get('chart.value.units.pre')+this.value.toFixed(this.Get('chart.value.text.decimals'))+this.Get('chart.value.units.post')),'center','center',true,null,'white');}};if(typeof(RGraph)=='undefined')RGraph={};RGraph.Thermometer=function(id,min,max,value)
{this.id=id;this.canvas=document.getElementById(id);this.context=this.canvas.getContext?this.canvas.getContext("2d"):null;this.canvas.__object__=this;this.type='thermometer';this.isRGraph=true;this.min=min;this.max=max;this.value=value;this.coords=[];this.graphArea=[];this.currentValue=null;RGraph.OldBrowserCompat(this.context);this.properties={'chart.colors':['red'],'chart.gutter.left':15,'chart.gutter.right':15,'chart.gutter.top':15,'chart.gutter.bottom':15,'chart.ticksize':5,'chart.text.color':'black','chart.text.font':'Verdana','chart.text.size':10,'chart.units.pre':'','chart.units.post':'','chart.zoom.factor':1.5,'chart.zoom.fade.in':true,'chart.zoom.fade.out':true,'chart.zoom.hdir':'right','chart.zoom.vdir':'down','chart.zoom.frames':25,'chart.zoom.delay':16.666,'chart.zoom.shadow':true,'chart.zoom.mode':'canvas','chart.zoom.thumbnail.width':75,'chart.zoom.thumbnail.height':75,'chart.zoom.background':true,'chart.title':'','chart.title.hpos':0.5,'chart.title.side':'','chart.title.side.bold':true,'chart.title.side.font':null,'chart.shadow':true,'chart.shadow.offsetx':0,'chart.shadow.offsety':0,'chart.shadow.blur':15,'chart.shadow.color':'gray','chart.resizable':false,'chart.contextmenu':null,'chart.adjustable':false,'chart.value.label':true,'chart.scale.visible':false,'chart.scale.decimals':0,'chart.ylabels.count':10,'chart.annotatable':false,'chart.annotate.color':'black'}
if(!this.canvas){alert('[THERMOMETER] No canvas support');return;}}
RGraph.Thermometer.prototype.Set=function(name,value)
{this.properties[name.toLowerCase()]=value;}
RGraph.Thermometer.prototype.Get=function(name)
{return this.properties[name];}
RGraph.Thermometer.prototype.Draw=function()
{RGraph.FireCustomEvent(this,'onbeforedraw');RGraph.ClearEventListeners(this.id);this.currentValue=this.value;this.gutterLeft=this.Get('chart.gutter.left');this.gutterRight=this.Get('chart.gutter.right');this.gutterTop=this.Get('chart.gutter.top');this.gutterBottom=this.Get('chart.gutter.bottom');this.DrawBackground();this.DrawBar();this.DrawTickMarks();this.DrawLabels();if(this.Get('chart.title')){this.DrawTitle();}
if(this.Get('chart.title.side')){this.DrawSideTitle();}
if(this.Get('chart.resizable')){RGraph.AllowResizing(this);}
if(this.Get('chart.contextmenu')){RGraph.ShowContext(this);}
if(this.Get('chart.annotatable')){RGraph.Annotate(this);}
if(this.Get('chart.adjustable')){RGraph.AllowAdjusting(this);}
RGraph.FireCustomEvent(this,'ondraw');}
RGraph.Thermometer.prototype.DrawBackground=function()
{var canvas=this.canvas;var context=this.context;var bulbRadius=(this.canvas.width-this.gutterLeft-this.gutterRight)/2;this.bulbRadius=bulbRadius;context.beginPath();context.fillStyle='black';if(this.Get('chart.shadow')){RGraph.SetShadow(this,this.Get('chart.shadow.color'),this.Get('chart.shadow.offsetx'),this.Get('chart.shadow.offsety'),this.Get('chart.shadow.blur'));}
context.fillRect(this.gutterLeft+12,this.gutterTop+bulbRadius,RGraph.GetWidth(this)-this.gutterLeft-this.gutterRight-24,RGraph.GetHeight(this)-this.gutterTop-this.gutterBottom-bulbRadius-bulbRadius);context.arc(this.gutterLeft+bulbRadius,RGraph.GetHeight(this)-this.gutterBottom-bulbRadius,bulbRadius,0,6.28,0);context.arc(this.gutterLeft+bulbRadius,this.gutterTop+bulbRadius,(this.canvas.width-this.gutterLeft-this.gutterRight-24)/2,0,6.28,0);context.fill();RGraph.NoShadow(this);context.beginPath();context.fillStyle='white';context.fillRect(this.gutterLeft+12+1,this.gutterTop+bulbRadius,RGraph.GetWidth(this)-this.gutterLeft-this.gutterRight-24-2,RGraph.GetHeight(this)-this.gutterTop-this.gutterBottom-bulbRadius-bulbRadius);context.arc(this.gutterLeft+bulbRadius,RGraph.GetHeight(this)-this.gutterBottom-bulbRadius,bulbRadius-1,0,6.28,0);context.arc(this.gutterLeft+bulbRadius,this.gutterTop+bulbRadius,((RGraph.GetWidth(this)-this.gutterLeft-this.gutterRight-24)/2)-1,0,6.28,0);context.fill();context.beginPath();context.fillStyle=this.Get('chart.colors')[0];context.arc(this.gutterLeft+bulbRadius,RGraph.GetHeight(this)-this.gutterBottom-bulbRadius,bulbRadius-1,0,6.28,0);context.fillRect(this.gutterLeft+12+1,RGraph.GetHeight(this)-this.gutterBottom-bulbRadius-bulbRadius,RGraph.GetWidth(this)-this.gutterLeft-this.gutterRight-24-2,bulbRadius);context.fill();this.graphArea[0]=this.gutterLeft+12+1;this.graphArea[1]=this.gutterTop+bulbRadius;this.graphArea[2]=this.canvas.width-this.gutterLeft-this.gutterRight-24-2;this.graphArea[3]=(this.canvas.height-this.gutterBottom-bulbRadius-bulbRadius)-(this.graphArea[1]);}
RGraph.Thermometer.prototype.DrawBar=function()
{var barHeight=((this.value-this.min)/(this.max-this.min))*this.graphArea[3];var context=this.context;context.beginPath();context.fillStyle=this.Get('chart.colors')[0];context.fillRect(this.graphArea[0],this.graphArea[1]+this.graphArea[3]-barHeight,this.graphArea[2],barHeight);context.fill();this.coords=[this.graphArea[0],this.graphArea[1]+this.graphArea[3]-barHeight,this.graphArea[2],barHeight];}
RGraph.Thermometer.prototype.DrawTickMarks=function()
{var ticksize=this.Get('chart.ticksize');for(var i=this.graphArea[1];i<=(this.graphArea[1]+this.graphArea[3]);i+=(this.graphArea[3]/10)){this.context.beginPath();this.context.moveTo(this.gutterLeft+12,i);this.context.lineTo(this.gutterLeft+12+ticksize,i);this.context.stroke();}
for(var i=this.graphArea[1];i<=(this.graphArea[1]+this.graphArea[3]);i+=(this.graphArea[3]/10)){this.context.beginPath();this.context.moveTo(RGraph.GetWidth(this)-(this.gutterRight+12),i);this.context.lineTo(RGraph.GetWidth(this)-(this.gutterRight+12+ticksize),i);this.context.stroke();}}
RGraph.Thermometer.prototype.DrawLabels=function()
{if(this.Get('chart.value.label')){this.context.beginPath();this.context.fillStyle=this.Get('chart.text.color');var text=this.Get('chart.scale.visible')?String(this.value):this.Get('chart.units.pre')+String(this.value)+this.Get('chart.units.post');RGraph.Text(this.context,this.Get('chart.text.font'),this.Get('chart.text.size'),this.gutterLeft+this.bulbRadius,this.coords[1]+this.Get('chart.text.size'),text,'center','center',true,null,'white');this.context.fill();}
if(this.Get('chart.scale.visible')){this.DrawScale();}}
RGraph.Thermometer.prototype.DrawTitle=function()
{this.context.beginPath();this.context.fillStyle=this.Get('chart.text.color');RGraph.Text(this.context,this.Get('chart.text.font'),this.Get('chart.text.size')+2,this.gutterLeft+((RGraph.GetWidth(this)-this.gutterLeft-this.gutterRight)/2),this.gutterTop,String(this.Get('chart.title')),'center','center',null,null,null,true);this.context.fill();}
RGraph.Thermometer.prototype.DrawSideTitle=function()
{var font=this.Get('chart.title.side.font')?this.Get('chart.title.side.font'):this.Get('chart.text.font');var size=this.Get('chart.title.side.size')?this.Get('chart.title.side.size'):this.Get('chart.text.size')+2;this.context.beginPath();this.context.fillStyle=this.Get('chart.text.color');RGraph.Text(this.context,font,size,this.gutterLeft*this.Get('chart.title.hpos'),this.canvas.height/2,String(this.Get('chart.title.side')),'center','center',null,270,null,true);this.context.fill();}
RGraph.Thermometer.prototype.DrawScale=function()
{var numLabels=this.Get('chart.ylabels.count')-1;var step=(this.max-this.min)/numLabels;this.context.fillStyle=this.Get('chart.text.color');this.context.beginPath();for(var i=0;i<=numLabels;++i){var text=this.Get('chart.units.pre')+(i==0?String(this.min.toFixed(this.Get('chart.scale.decimals'))):String((this.min+(i*step)).toFixed(this.Get('chart.scale.decimals'))))+this.Get('chart.units.post');var x=this.canvas.width-this.gutterRight;var y=this.canvas.height-this.gutterBottom-(2*this.bulbRadius)-((this.graphArea[3]/numLabels)*i);RGraph.Text(this.context,this.Get('chart.text.font'),this.Get('chart.text.size'),x-6,y,text,'center');}
this.context.fill();};if(!hs){var hs={lang:{cssDirection:"ltr",loadingText:"Loading...",loadingTitle:"Click to cancel",focusTitle:"Click to bring to front",fullExpandTitle:"Expand to actual size (f)",creditsText:"Powered by <i>Highslide JS</i>",creditsTitle:"Go to the Highslide JS homepage",previousText:"Previous",nextText:"Next",moveText:"Move",closeText:"Close",closeTitle:"Close (esc)",resizeTitle:"Resize",playText:"Play",playTitle:"Play slideshow (spacebar)",pauseText:"Pause",pauseTitle:"Pause slideshow (spacebar)",previousTitle:"Previous (arrow left)",nextTitle:"Next (arrow right)",moveTitle:"Move",fullExpandText:"1:1",number:"Image %1 of %2",restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous."},graphicsDir:"highslide/graphics/",expandCursor:"zoomin.cur",restoreCursor:"zoomout.cur",expandDuration:250,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,loadingOpacity:0.75,allowMultipleInstances:true,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,padToMinWidth:false,fullExpandPosition:"bottom right",fullExpandOpacity:1,showCredits:true,creditsHref:"http://highslide.com/",creditsTarget:"_self",enableKeyListener:true,openerTagNames:["a","area"],transitions:[],transitionDuration:250,dimmingOpacity:0,dimmingDuration:50,allowWidthReduction:false,allowHeightReduction:true,preserveContent:true,objectLoadTime:"before",cacheAjax:true,anchor:"auto",align:"auto",targetX:null,targetY:null,dragByHeading:true,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"drop-shadow",skin:{controls:'<div class="highslide-controls"><ul><li class="highslide-previous"><a href="#" title="{hs.lang.previousTitle}"><span>{hs.lang.previousText}</span></a></li><li class="highslide-play"><a href="#" title="{hs.lang.playTitle}"><span>{hs.lang.playText}</span></a></li><li class="highslide-pause"><a href="#" title="{hs.lang.pauseTitle}"><span>{hs.lang.pauseText}</span></a></li><li class="highslide-next"><a href="#" title="{hs.lang.nextTitle}"><span>{hs.lang.nextText}</span></a></li><li class="highslide-move"><a href="#" title="{hs.lang.moveTitle}"><span>{hs.lang.moveText}</span></a></li><li class="highslide-full-expand"><a href="#" title="{hs.lang.fullExpandTitle}"><span>{hs.lang.fullExpandText}</span></a></li><li class="highslide-close"><a href="#" title="{hs.lang.closeTitle}" ><span>{hs.lang.closeText}</span></a></li></ul></div>',contentWrapper:'<div class="highslide-header"><ul><li class="highslide-previous"><a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)"><span>{hs.lang.previousText}</span></a></li><li class="highslide-next"><a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)"><span>{hs.lang.nextText}</span></a></li><li class="highslide-move"><a href="#" title="{hs.lang.moveTitle}" onclick="return false"><span>{hs.lang.moveText}</span></a></li><li class="highslide-close"><a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)"><span>{hs.lang.closeText}</span></a></li></ul></div><div class="highslide-body"></div><div class="highslide-footer"><div><span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span></div></div>'},preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:["allowSizeReduction","useBox","anchor","align","targetX","targetY","outlineType","outlineWhileAnimating","captionId","captionText","captionEval","captionOverlay","headingId","headingText","headingEval","headingOverlay","creditsPosition","dragByHeading","autoplay","numberPosition","transitions","dimmingOpacity","width","height","contentId","allowWidthReduction","allowHeightReduction","preserveContent","maincontentId","maincontentText","maincontentEval","objectType","cacheAjax","objectWidth","objectHeight","objectLoadTime","swfOptions","wrapperClassName","minWidth","minHeight","maxWidth","maxHeight","pageOrigin","slideshowGroup","easing","easingClose","fadeInOut","src"],overlays:[],idCounter:0,oPos:{x:["leftpanel","left","center","right","rightpanel"],y:["above","top","middle","bottom","below"]},mouse:{},headingOverlay:{},captionOverlay:{},swfOptions:{flashvars:{},params:{},attributes:{}},timers:[],slideshows:[],pendingOutlines:{},sleeping:[],preloadTheseAjax:[],cacheBindings:[],cachedGets:{},clones:{},onReady:[],uaVersion:/Trident\/4\.0/.test(navigator.userAgent)?8:parseFloat((navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1]),ie:(document.all&&!window.opera),safari:/Safari/.test(navigator.userAgent),geckoMac:/Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),$:function(a){if(a){return document.getElementById(a)}},push:function(a,b){a[a.length]=b},createElement:function(a,f,e,d,c){var b=document.createElement(a);if(f){hs.extend(b,f)}if(c){hs.setStyles(b,{padding:0,border:"none",margin:0})}if(e){hs.setStyles(b,e)}if(d){d.appendChild(b)}return b},extend:function(b,c){for(var a in c){b[a]=c[a]}return b},setStyles:function(b,c){for(var a in c){if(hs.ieLt9&&a=="opacity"){if(c[a]>0.99){b.style.removeAttribute("filter")}else{b.style.filter="alpha(opacity="+(c[a]*100)+")"}}else{b.style[a]=c[a]}}},animate:function(f,a,d){var c,g,j;if(typeof d!="object"||d===null){var i=arguments;d={duration:i[2],easing:i[3],complete:i[4]}}if(typeof d.duration!="number"){d.duration=250}d.easing=Math[d.easing]||Math.easeInQuad;d.curAnim=hs.extend({},a);for(var b in a){var h=new hs.fx(f,d,b);c=parseFloat(hs.css(f,b))||0;g=parseFloat(a[b]);j=b!="opacity"?"px":"";h.custom(c,g,j)}},css:function(a,c){if(a.style[c]){return a.style[c]}else{if(document.defaultView){return document.defaultView.getComputedStyle(a,null).getPropertyValue(c)}else{if(c=="opacity"){c="filter"}var b=a.currentStyle[c.replace(/\-(\w)/g,function(e,d){return d.toUpperCase()})];if(c=="filter"){b=b.replace(/alpha\(opacity=([0-9]+)\)/,function(e,d){return d/100})}return b===""?1:b}}},getPageSize:function(){var f=document,b=window,e=f.compatMode&&f.compatMode!="BackCompat"?f.documentElement:f.body,g=hs.ie&&(hs.uaVersion<9||typeof pageXOffset=="undefined");var c=g?e.clientWidth:(f.documentElement.clientWidth||self.innerWidth),a=g?e.clientHeight:self.innerHeight;hs.page={width:c,height:a,scrollLeft:g?e.scrollLeft:pageXOffset,scrollTop:g?e.scrollTop:pageYOffset};return hs.page},getPosition:function(c){if(/area/i.test(c.tagName)){var e=document.getElementsByTagName("img");for(var b=0;b<e.length;b++){var a=e[b].useMap;if(a&&a.replace(/^.*?#/,"")==c.parentNode.name){c=e[b];break}}}var d={x:c.offsetLeft,y:c.offsetTop};while(c.offsetParent){c=c.offsetParent;d.x+=c.offsetLeft;d.y+=c.offsetTop;if(c!=document.body&&c!=document.documentElement){d.x-=c.scrollLeft;d.y-=c.scrollTop}}return d},expand:function(b,h,f,d){if(!b){b=hs.createElement("a",null,{display:"none"},hs.container)}if(typeof b.getParams=="function"){return h}if(d=="html"){for(var c=0;c<hs.sleeping.length;c++){if(hs.sleeping[c]&&hs.sleeping[c].a==b){hs.sleeping[c].awake();hs.sleeping[c]=null;return false}}hs.hasHtmlExpanders=true}try{new hs.Expander(b,h,f,d);return false}catch(g){return true}},htmlExpand:function(b,d,c){return hs.expand(b,d,c,"html")},getSelfRendered:function(){return hs.createElement("div",{className:"highslide-html-content",innerHTML:hs.replaceLang(hs.skin.contentWrapper)})},getElementByClass:function(e,c,d){var b=e.getElementsByTagName(c);for(var a=0;a<b.length;a++){if((new RegExp(d)).test(b[a].className)){return b[a]}}return null},replaceLang:function(c){c=c.replace(/\s/g," ");var b=/{hs\.lang\.([^}]+)\}/g,d=c.match(b),e;if(d){for(var a=0;a<d.length;a++){e=d[a].replace(b,"$1");if(typeof hs.lang[e]!="undefined"){c=c.replace(d[a],hs.lang[e])}}}return c},setClickEvents:function(){var b=document.getElementsByTagName("a");for(var a=0;a<b.length;a++){var c=hs.isUnobtrusiveAnchor(b[a]);if(c&&!b[a].hsHasSetClick){(function(){var d=c;if(hs.fireEvent(hs,"onSetClickEvent",{element:b[a],type:d})){b[a].onclick=(c=="image")?function(){return hs.expand(this)}:function(){return hs.htmlExpand(this,{objectType:d})}}})();b[a].hsHasSetClick=true}}hs.getAnchors()},isUnobtrusiveAnchor:function(a){if(a.rel=="highslide"){return"image"}else{if(a.rel=="highslide-ajax"){return"ajax"}else{if(a.rel=="highslide-iframe"){return"iframe"}else{if(a.rel=="highslide-swf"){return"swf"}}}}},getCacheBinding:function(b){for(var d=0;d<hs.cacheBindings.length;d++){if(hs.cacheBindings[d][0]==b){var e=hs.cacheBindings[d][1];hs.cacheBindings[d][1]=e.cloneNode(1);return e}}return null},preloadAjax:function(f){var b=hs.getAnchors();for(var d=0;d<b.htmls.length;d++){var c=b.htmls[d];if(hs.getParam(c,"objectType")=="ajax"&&hs.getParam(c,"cacheAjax")){hs.push(hs.preloadTheseAjax,c)}}hs.preloadAjaxElement(0)},preloadAjaxElement:function(d){if(!hs.preloadTheseAjax[d]){return}var b=hs.preloadTheseAjax[d];var c=hs.getNode(hs.getParam(b,"contentId"));if(!c){c=hs.getSelfRendered()}var e=new hs.Ajax(b,c,1);e.onError=function(){};e.onLoad=function(){hs.push(hs.cacheBindings,[b,c]);hs.preloadAjaxElement(d+1)};e.run()},focusTopmost:function(){var c=0,b=-1,a=hs.expanders,e,f;for(var d=0;d<a.length;d++){e=a[d];if(e){f=e.wrapper.style.zIndex;if(f&&f>c){c=f;b=d}}}if(b==-1){hs.focusKey=-1}else{a[b].focus()}},getParam:function(b,d){b.getParams=b.onclick;var c=b.getParams?b.getParams():null;b.getParams=null;return(c&&typeof c[d]!="undefined")?c[d]:(typeof hs[d]!="undefined"?hs[d]:null)},getSrc:function(b){var c=hs.getParam(b,"src");if(c){return c}return b.href},getNode:function(e){var c=hs.$(e),d=hs.clones[e],b={};if(!c&&!d){return null}if(!d){d=c.cloneNode(true);d.id="";hs.clones[e]=d;return c}else{return d.cloneNode(true)}},discardElement:function(a){if(a){hs.garbageBin.appendChild(a)}hs.garbageBin.innerHTML=""},dim:function(d){if(!hs.dimmer){a=true;hs.dimmer=hs.createElement("div",{className:"highslide-dimming highslide-viewport-size",owner:"",onclick:function(){if(hs.fireEvent(hs,"onDimmerClick")){hs.close()}}},{visibility:"visible",opacity:0},hs.container,true);if(/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)){var b=document.body;function c(){hs.setStyles(hs.dimmer,{width:b.scrollWidth+"px",height:b.scrollHeight+"px"})}c();hs.addEventListener(window,"resize",c)}}hs.dimmer.style.display="";var a=hs.dimmer.owner=="";hs.dimmer.owner+="|"+d.key;if(a){if(hs.geckoMac&&hs.dimmingGeckoFix){hs.setStyles(hs.dimmer,{background:"url("+hs.graphicsDir+"geckodimmer.png)",opacity:1})}else{hs.animate(hs.dimmer,{opacity:d.dimmingOpacity},hs.dimmingDuration)}}},undim:function(a){if(!hs.dimmer){return}if(typeof a!="undefined"){hs.dimmer.owner=hs.dimmer.owner.replace("|"+a,"")}if((typeof a!="undefined"&&hs.dimmer.owner!="")||(hs.upcoming&&hs.getParam(hs.upcoming,"dimmingOpacity"))){return}if(hs.geckoMac&&hs.dimmingGeckoFix){hs.dimmer.style.display="none"}else{hs.animate(hs.dimmer,{opacity:0},hs.dimmingDuration,null,function(){hs.dimmer.style.display="none"})}},transit:function(a,d){var b=d||hs.getExpander();d=b;if(hs.upcoming){return false}else{hs.last=b}hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);try{hs.upcoming=a;a.onclick()}catch(c){hs.last=hs.upcoming=null}try{if(!a||d.transitions[1]!="crossfade"){d.close()}}catch(c){}return false},previousOrNext:function(a,c){var b=hs.getExpander(a);if(b){return hs.transit(b.getAdjacentAnchor(c),b)}else{return false}},previous:function(a){return hs.previousOrNext(a,-1)},next:function(a){return hs.previousOrNext(a,1)},keyHandler:function(a){if(!a){a=window.event}if(!a.target){a.target=a.srcElement}if(typeof a.target.form!="undefined"){return true}if(!hs.fireEvent(hs,"onKeyDown",a)){return true}var b=hs.getExpander();var c=null;switch(a.keyCode){case 70:if(b){b.doFullExpand()}return true;case 32:c=2;break;case 34:case 39:case 40:c=1;break;case 8:case 33:case 37:case 38:c=-1;break;case 27:case 13:c=0}if(c!==null){if(c!=2){hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler)}if(!hs.enableKeyListener){return true}if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}if(b){if(c==0){b.close()}else{if(c==2){if(b.slideshow){b.slideshow.hitSpace()}}else{if(b.slideshow){b.slideshow.pause()}hs.previousOrNext(b.key,c)}}return false}}return true},registerOverlay:function(a){hs.push(hs.overlays,hs.extend(a,{hsId:"hsId"+hs.idCounter++}))},addSlideshow:function(b){var d=b.slideshowGroup;if(typeof d=="object"){for(var c=0;c<d.length;c++){var e={};for(var a in b){e[a]=b[a]}e.slideshowGroup=d[c];hs.push(hs.slideshows,e)}}else{hs.push(hs.slideshows,b)}},getWrapperKey:function(c,b){var e,d=/^highslide-wrapper-([0-9]+)$/;e=c;while(e.parentNode){if(e.hsKey!==undefined){return e.hsKey}if(e.id&&d.test(e.id)){return e.id.replace(d,"$1")}e=e.parentNode}if(!b){e=c;while(e.parentNode){if(e.tagName&&hs.isHsAnchor(e)){for(var a=0;a<hs.expanders.length;a++){var f=hs.expanders[a];if(f&&f.a==e){return a}}}e=e.parentNode}}return null},getExpander:function(b,a){if(typeof b=="undefined"){return hs.expanders[hs.focusKey]||null}if(typeof b=="number"){return hs.expanders[b]||null}if(typeof b=="string"){b=hs.$(b)}return hs.expanders[hs.getWrapperKey(b,a)]||null},isHsAnchor:function(b){return(b.onclick&&b.onclick.toString().replace(/\s/g," ").match(/hs.(htmlE|e)xpand/))},reOrder:function(){for(var a=0;a<hs.expanders.length;a++){if(hs.expanders[a]&&hs.expanders[a].isExpanded){hs.focusTopmost()}}},fireEvent:function(c,a,b){return c&&c[a]?(c[a](c,b)!==false):true},mouseClickHandler:function(d){if(!d){d=window.event}if(d.button>1){return true}if(!d.target){d.target=d.srcElement}var b=d.target;while(b.parentNode&&!(/highslide-(image|move|html|resize)/.test(b.className))){b=b.parentNode}var f=hs.getExpander(b);if(f&&(f.isClosing||!f.isExpanded)){return true}if(f&&d.type=="mousedown"){if(d.target.form){return true}var a=b.className.match(/highslide-(image|move|resize)/);if(a){hs.dragArgs={exp:f,type:a[1],left:f.x.pos,width:f.x.size,top:f.y.pos,height:f.y.size,clickX:d.clientX,clickY:d.clientY};hs.addEventListener(document,"mousemove",hs.dragHandler);if(d.preventDefault){d.preventDefault()}if(/highslide-(image|html)-blur/.test(f.content.className)){f.focus();hs.hasFocused=true}return false}else{if(/highslide-html/.test(b.className)&&hs.focusKey!=f.key){f.focus();f.doShowHide("hidden")}}}else{if(d.type=="mouseup"){hs.removeEventListener(document,"mousemove",hs.dragHandler);if(hs.dragArgs){if(hs.styleRestoreCursor&&hs.dragArgs.type=="image"){hs.dragArgs.exp.content.style.cursor=hs.styleRestoreCursor}var c=hs.dragArgs.hasDragged;if(!c&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type)){if(hs.fireEvent(f,"onImageClick")){f.close()}}else{if(c||(!c&&hs.hasHtmlExpanders)){hs.dragArgs.exp.doShowHide("hidden")}}if(hs.dragArgs.exp.releaseMask){hs.dragArgs.exp.releaseMask.style.display="none"}if(c){hs.fireEvent(hs.dragArgs.exp,"onDrop",hs.dragArgs)}hs.hasFocused=false;hs.dragArgs=null}else{if(/highslide-image-blur/.test(b.className)){b.style.cursor=hs.styleRestoreCursor}}}}return false},dragHandler:function(c){if(!hs.dragArgs){return true}if(!c){c=window.event}var b=hs.dragArgs,d=b.exp;if(d.iframe){if(!d.releaseMask){d.releaseMask=hs.createElement("div",null,{position:"absolute",width:d.x.size+"px",height:d.y.size+"px",left:d.x.cb+"px",top:d.y.cb+"px",zIndex:4,background:(hs.ieLt9?"white":"none"),opacity:0.01},d.wrapper,true)}if(d.releaseMask.style.display=="none"){d.releaseMask.style.display=""}}b.dX=c.clientX-b.clickX;b.dY=c.clientY-b.clickY;var f=Math.sqrt(Math.pow(b.dX,2)+Math.pow(b.dY,2));if(!b.hasDragged){b.hasDragged=(b.type!="image"&&f>0)||(f>(hs.dragSensitivity||5))}if(b.hasDragged&&c.clientX>5&&c.clientY>5){if(!hs.fireEvent(d,"onDrag",b)){return false}if(b.type=="resize"){d.resize(b)}else{d.moveTo(b.left+b.dX,b.top+b.dY);if(b.type=="image"){d.content.style.cursor="move"}}}return false},wrapperMouseHandler:function(c){try{if(!c){c=window.event}var b=/mouseover/i.test(c.type);if(!c.target){c.target=c.srcElement}if(!c.relatedTarget){c.relatedTarget=b?c.fromElement:c.toElement}var d=hs.getExpander(c.target);if(!d.isExpanded){return}if(!d||!c.relatedTarget||hs.getExpander(c.relatedTarget,true)==d||hs.dragArgs){return}hs.fireEvent(d,b?"onMouseOver":"onMouseOut",c);for(var a=0;a<d.overlays.length;a++){(function(){var e=hs.$("hsId"+d.overlays[a]);if(e&&e.hideOnMouseOut){if(b){hs.setStyles(e,{visibility:"visible",display:""})}hs.animate(e,{opacity:b?e.opacity:0},e.dur)}})()}}catch(c){}},addEventListener:function(a,c,b){if(a==document&&c=="ready"){hs.push(hs.onReady,b)}try{a.addEventListener(c,b,false)}catch(d){try{a.detachEvent("on"+c,b);a.attachEvent("on"+c,b)}catch(d){a["on"+c]=b}}},removeEventListener:function(a,c,b){try{a.removeEventListener(c,b,false)}catch(d){try{a.detachEvent("on"+c,b)}catch(d){a["on"+c]=null}}},preloadFullImage:function(b){if(hs.continuePreloading&&hs.preloadTheseImages[b]&&hs.preloadTheseImages[b]!="undefined"){var a=document.createElement("img");a.onload=function(){a=null;hs.preloadFullImage(b+1)};a.src=hs.preloadTheseImages[b]}},preloadImages:function(c){if(c&&typeof c!="object"){hs.numberOfImagesToPreload=c}var a=hs.getAnchors();for(var b=0;b<a.images.length&&b<hs.numberOfImagesToPreload;b++){hs.push(hs.preloadTheseImages,hs.getSrc(a.images[b]))}if(hs.outlineType){new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)})}else{hs.preloadFullImage(0)}if(hs.restoreCursor){var d=hs.createElement("img",{src:hs.graphicsDir+hs.restoreCursor})}},init:function(){if(!hs.container){hs.ieLt7=hs.ie&&hs.uaVersion<7;hs.ieLt9=hs.ie&&hs.uaVersion<9;hs.getPageSize();hs.ie6SSL=hs.ieLt7&&location.protocol=="https:";for(var a in hs.langDefaults){if(typeof hs[a]!="undefined"){hs.lang[a]=hs[a]}else{if(typeof hs.lang[a]=="undefined"&&typeof hs.langDefaults[a]!="undefined"){hs.lang[a]=hs.langDefaults[a]}}}hs.container=hs.createElement("div",{className:"highslide-container"},{position:"absolute",left:0,top:0,width:"100%",zIndex:hs.zIndexCounter,direction:"ltr"},document.body,true);hs.loading=hs.createElement("a",{className:"highslide-loading",title:hs.lang.loadingTitle,innerHTML:hs.lang.loadingText,href:"javascript:;"},{position:"absolute",top:"-9999px",opacity:hs.loadingOpacity,zIndex:1},hs.container);hs.garbageBin=hs.createElement("div",null,{display:"none"},hs.container);hs.viewport=hs.createElement("div",{className:"highslide-viewport highslide-viewport-size"},{visibility:(hs.safari&&hs.uaVersion<525)?"visible":"hidden"},hs.container,1);hs.clearing=hs.createElement("div",null,{clear:"both",paddingTop:"1px"},null,true);Math.linearTween=function(f,e,h,g){return h*f/g+e};Math.easeInQuad=function(f,e,h,g){return h*(f/=g)*f+e};Math.easeOutQuad=function(f,e,h,g){return-h*(f/=g)*(f-2)+e};hs.hideSelects=hs.ieLt7;hs.hideIframes=((window.opera&&hs.uaVersion<9)||navigator.vendor=="KDE"||(hs.ieLt7&&hs.uaVersion<5.5));hs.fireEvent(this,"onActivate")}},ready:function(){if(hs.isReady){return}hs.isReady=true;for(var a=0;a<hs.onReady.length;a++){hs.onReady[a]()}},updateAnchors:function(){var a,d,l=[],h=[],k=[],b={},m;for(var e=0;e<hs.openerTagNames.length;e++){d=document.getElementsByTagName(hs.openerTagNames[e]);for(var c=0;c<d.length;c++){a=d[c];m=hs.isHsAnchor(a);if(m){hs.push(l,a);if(m[0]=="hs.expand"){hs.push(h,a)}else{if(m[0]=="hs.htmlExpand"){hs.push(k,a)}}var f=hs.getParam(a,"slideshowGroup")||"none";if(!b[f]){b[f]=[]}hs.push(b[f],a)}}}hs.anchors={all:l,groups:b,images:h,htmls:k};return hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},close:function(a){var b=hs.getExpander(a);if(b){b.close()}return false}};hs.fx=function(b,a,c){this.options=a;this.elem=b;this.prop=c;if(!a.orig){a.orig={}}};hs.fx.prototype={update:function(){(hs.fx.step[this.prop]||hs.fx.step._default)(this);if(this.options.step){this.options.step.call(this.elem,this.now,this)}},custom:function(e,d,c){this.startTime=(new Date()).getTime();this.start=e;this.end=d;this.unit=c;this.now=this.start;this.pos=this.state=0;var a=this;function b(f){return a.step(f)}b.elem=this.elem;if(b()&&hs.timers.push(b)==1){hs.timerId=setInterval(function(){var g=hs.timers;for(var f=0;f<g.length;f++){if(!g[f]()){g.splice(f--,1)}}if(!g.length){clearInterval(hs.timerId)}},13)}},step:function(d){var c=(new Date()).getTime();if(d||c>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var a=true;for(var b in this.options.curAnim){if(this.options.curAnim[b]!==true){a=false}}if(a){if(this.options.complete){this.options.complete.call(this.elem)}}return false}else{var e=c-this.startTime;this.state=e/this.options.duration;this.pos=this.options.easing(e,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};hs.extend(hs.fx,{step:{opacity:function(a){hs.setStyles(a.elem,{opacity:a.now})},_default:function(a){try{if(a.elem.style&&a.elem.style[a.prop]!=null){a.elem.style[a.prop]=a.now+a.unit}else{a.elem[a.prop]=a.now}}catch(b){}}}});hs.Outline=function(g,e){this.onLoad=e;this.outlineType=g;var a=hs.uaVersion,f;this.hasAlphaImageLoader=hs.ie&&hs.uaVersion<7;if(!g){if(e){e()}return}hs.init();this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",borderCollapse:"collapse",width:0},hs.container,true);var b=hs.createElement("tbody",null,null,this.table,1);this.td=[];for(var c=0;c<=8;c++){if(c%3==0){f=hs.createElement("tr",null,{height:"auto"},b,true)}this.td[c]=hs.createElement("td",null,null,f,true);var d=c!=4?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[c],d)}this.td[4].className=g+" highslide-outline";this.preloadGraphic()};hs.Outline.prototype={preloadGraphic:function(){var b=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png";var a=hs.safari&&hs.uaVersion<525?hs.container:null;this.graphic=hs.createElement("img",null,{position:"absolute",top:"-9999px"},a,true);var c=this;this.graphic.onload=function(){c.onGraphicLoad()};this.graphic.src=b},onGraphicLoad:function(){var d=this.offset=this.graphic.width/4,f=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],c={height:(2*d)+"px",width:(2*d)+"px"};for(var b=0;b<=8;b++){if(f[b]){if(this.hasAlphaImageLoader){var a=(b==1||b==7)?"100%":this.graphic.width+"px";var e=hs.createElement("div",null,{width:"100%",height:"100%",position:"relative",overflow:"hidden"},this.td[b],true);hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:"absolute",width:a,height:this.graphic.height+"px",left:(f[b][0]*d)+"px",top:(f[b][1]*d)+"px"},e,true)}else{hs.setStyles(this.td[b],{background:"url("+this.graphic.src+") "+(f[b][0]*d)+"px "+(f[b][1]*d)+"px"})}if(window.opera&&(b==3||b==5)){hs.createElement("div",null,c,this.td[b],true)}hs.setStyles(this.td[b],c)}}this.graphic=null;if(hs.pendingOutlines[this.outlineType]){hs.pendingOutlines[this.outlineType].destroy()}hs.pendingOutlines[this.outlineType]=this;if(this.onLoad){this.onLoad()}},setPosition:function(g,e,c,b,f){var d=this.exp,a=d.wrapper.style,e=e||0,g=g||{x:d.x.pos+e,y:d.y.pos+e,w:d.x.get("wsize")-2*e,h:d.y.get("wsize")-2*e};if(c){this.table.style.visibility=(g.h>=4*this.offset)?"visible":"hidden"}hs.setStyles(this.table,{left:(g.x-this.offset)+"px",top:(g.y-this.offset)+"px",width:(g.w+2*this.offset)+"px"});g.w-=2*this.offset;g.h-=2*this.offset;hs.setStyles(this.td[4],{width:g.w>=0?g.w+"px":0,height:g.h>=0?g.h+"px":0});if(this.hasAlphaImageLoader){this.td[3].style.height=this.td[5].style.height=this.td[4].style.height}},destroy:function(a){if(a){this.table.style.visibility="hidden"}else{hs.discardElement(this.table)}}};hs.Dimension=function(b,a){this.exp=b;this.dim=a;this.ucwh=a=="x"?"Width":"Height";this.wh=this.ucwh.toLowerCase();this.uclt=a=="x"?"Left":"Top";this.lt=this.uclt.toLowerCase();this.ucrb=a=="x"?"Right":"Bottom";this.rb=this.ucrb.toLowerCase();this.p1=this.p2=0};hs.Dimension.prototype={get:function(a){switch(a){case"loadingPos":return this.tpos+this.tb+(this.t-hs.loading["offset"+this.ucwh])/2;case"loadingPosXfade":return this.pos+this.cb+this.p1+(this.size-hs.loading["offset"+this.ucwh])/2;case"wsize":return this.size+2*this.cb+this.p1+this.p2;case"fitsize":return this.clientSize-this.marginMin-this.marginMax;case"maxsize":return this.get("fitsize")-2*this.cb-this.p1-this.p2;case"opos":return this.pos-(this.exp.outline?this.exp.outline.offset:0);case"osize":return this.get("wsize")+(this.exp.outline?2*this.exp.outline.offset:0);case"imgPad":return this.imgSize?Math.round((this.size-this.imgSize)/2):0}},calcBorders:function(){this.cb=(this.exp.content["offset"+this.ucwh]-this.t)/2;this.marginMax=hs["margin"+this.ucrb]},calcThumb:function(){this.t=this.exp.el[this.wh]?parseInt(this.exp.el[this.wh]):this.exp.el["offset"+this.ucwh];this.tpos=this.exp.tpos[this.dim];this.tb=(this.exp.el["offset"+this.ucwh]-this.t)/2;if(this.tpos==0||this.tpos==-1){this.tpos=(hs.page[this.wh]/2)+hs.page["scroll"+this.uclt]}},calcExpanded:function(){var a=this.exp;this.justify="auto";if(a.align=="center"){this.justify="center"}else{if(new RegExp(this.lt).test(a.anchor)){this.justify=null}else{if(new RegExp(this.rb).test(a.anchor)){this.justify="max"}}}this.pos=this.tpos-this.cb+this.tb;if(this.maxHeight&&this.dim=="x"){a.maxWidth=Math.min(a.maxWidth||this.full,a.maxHeight*this.full/a.y.full)}this.size=Math.min(this.full,a["max"+this.ucwh]||this.full);this.minSize=a.allowSizeReduction?Math.min(a["min"+this.ucwh],this.full):this.full;if(a.isImage&&a.useBox){this.size=a[this.wh];this.imgSize=this.full}if(this.dim=="x"&&hs.padToMinWidth){this.minSize=a.minWidth}this.target=a["target"+this.dim.toUpperCase()];this.marginMin=hs["margin"+this.uclt];this.scroll=hs.page["scroll"+this.uclt];this.clientSize=hs.page[this.wh]},setSize:function(a){var f=this.exp;if(f.isImage&&(f.useBox||hs.padToMinWidth)){this.imgSize=a;this.size=Math.max(this.size,this.imgSize);f.content.style[this.lt]=this.get("imgPad")+"px"}else{this.size=a}f.content.style[this.wh]=a+"px";f.wrapper.style[this.wh]=this.get("wsize")+"px";if(f.outline){f.outline.setPosition()}if(f.releaseMask){f.releaseMask.style[this.wh]=a+"px"}if(this.dim=="y"&&f.iDoc&&f.body.style.height!="auto"){try{f.iDoc.body.style.overflow="auto"}catch(b){}}if(f.isHtml){var c=f.scrollerDiv;if(this.sizeDiff===undefined){this.sizeDiff=f.innerContent["offset"+this.ucwh]-c["offset"+this.ucwh]}c.style[this.wh]=(this.size-this.sizeDiff)+"px";if(this.dim=="x"){f.mediumContent.style.width="auto"}if(f.body){f.body.style[this.wh]="auto"}}if(this.dim=="x"&&f.overlayBox){f.sizeOverlayBox(true)}if(this.dim=="x"&&f.slideshow&&f.isImage){if(a==this.full){f.slideshow.disable("full-expand")}else{f.slideshow.enable("full-expand")}}},setPos:function(a){this.pos=a;this.exp.wrapper.style[this.lt]=a+"px";if(this.exp.outline){this.exp.outline.setPosition()}}};hs.Expander=function(k,f,b,l){if(document.readyState&&hs.ie&&!hs.isReady){hs.addEventListener(document,"ready",function(){new hs.Expander(k,f,b,l)});return}this.a=k;this.custom=b;this.contentType=l||"image";this.isHtml=(l=="html");this.isImage=!this.isHtml;hs.continuePreloading=false;this.overlays=[];this.last=hs.last;hs.last=null;hs.init();var m=this.key=hs.expanders.length;for(var g=0;g<hs.overrides.length;g++){var c=hs.overrides[g];this[c]=f&&typeof f[c]!="undefined"?f[c]:hs[c]}if(!this.src){this.src=k.href}var d=(f&&f.thumbnailId)?hs.$(f.thumbnailId):k;d=this.thumb=d.getElementsByTagName("img")[0]||d;this.thumbsUserSetId=d.id||k.id;if(!hs.fireEvent(this,"onInit")){return true}for(var g=0;g<hs.expanders.length;g++){if(hs.expanders[g]&&hs.expanders[g].a==k&&!(this.last&&this.transitions[1]=="crossfade")){hs.expanders[g].focus();return false}}if(!hs.allowSimultaneousLoading){for(var g=0;g<hs.expanders.length;g++){if(hs.expanders[g]&&hs.expanders[g].thumb!=d&&!hs.expanders[g].onLoadStarted){hs.expanders[g].cancelLoading()}}}hs.expanders[m]=this;if(!hs.allowMultipleInstances&&!hs.upcoming){if(hs.expanders[m-1]){hs.expanders[m-1].close()}if(typeof hs.focusKey!="undefined"&&hs.expanders[hs.focusKey]){hs.expanders[hs.focusKey].close()}}this.el=d;this.tpos=this.pageOrigin||hs.getPosition(d);hs.getPageSize();var j=this.x=new hs.Dimension(this,"x");j.calcThumb();var h=this.y=new hs.Dimension(this,"y");h.calcThumb();if(/area/i.test(d.tagName)){this.getImageMapAreaCorrection(d)}this.wrapper=hs.createElement("div",{id:"highslide-wrapper-"+this.key,className:"highslide-wrapper "+this.wrapperClassName},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter+=2},null,true);this.wrapper.onmouseover=this.wrapper.onmouseout=hs.wrapperMouseHandler;if(this.contentType=="image"&&this.outlineWhileAnimating==2){this.outlineWhileAnimating=0}if(!this.outlineType||(this.last&&this.isImage&&this.transitions[1]=="crossfade")){this[this.contentType+"Create"]()}else{if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+"Create"]()}else{this.showLoading();var e=this;new hs.Outline(this.outlineType,function(){e.connectOutline();e[e.contentType+"Create"]()})}}return true};hs.Expander.prototype={error:function(a){if(hs.debug){alert("Line "+a.lineNumber+": "+a.message)}else{window.location.href=this.src}},connectOutline:function(){var a=this.outline=hs.pendingOutlines[this.outlineType];a.exp=this;a.table.style.zIndex=this.wrapper.style.zIndex-1;hs.pendingOutlines[this.outlineType]=null},showLoading:function(){if(this.onLoadStarted||this.loading){return}this.loading=hs.loading;var c=this;this.loading.onclick=function(){c.cancelLoading()};if(!hs.fireEvent(this,"onShowLoading")){return}var c=this,a=this.x.get("loadingPos")+"px",b=this.y.get("loadingPos")+"px";if(!d&&this.last&&this.transitions[1]=="crossfade"){var d=this.last}if(d){a=d.x.get("loadingPosXfade")+"px";b=d.y.get("loadingPosXfade")+"px";this.loading.style.zIndex=hs.zIndexCounter++}setTimeout(function(){if(c.loading){hs.setStyles(c.loading,{left:a,top:b,zIndex:hs.zIndexCounter++})}},100)},imageCreate:function(){var b=this;var a=document.createElement("img");this.content=a;a.onload=function(){if(hs.expanders[b.key]){b.contentLoaded()}};if(hs.blockRightClick){a.oncontextmenu=function(){return false}}a.className="highslide-image";hs.setStyles(a,{visibility:"hidden",display:"block",position:"absolute",maxWidth:"9999px",zIndex:3});a.title=hs.lang.restoreTitle;if(hs.safari&&hs.uaVersion<525){hs.container.appendChild(a)}if(hs.ie&&hs.flushImgSize){a.src=null}a.src=this.src;this.showLoading()},htmlCreate:function(){if(!hs.fireEvent(this,"onBeforeGetContent")){return}this.content=hs.getCacheBinding(this.a);if(!this.content){this.content=hs.getNode(this.contentId)}if(!this.content){this.content=hs.getSelfRendered()}this.getInline(["maincontent"]);if(this.maincontent){var a=hs.getElementByClass(this.content,"div","highslide-body");if(a){a.appendChild(this.maincontent)}this.maincontent.style.display="block"}hs.fireEvent(this,"onAfterGetContent");var d=this.innerContent=this.content;if(/(swf|iframe)/.test(this.objectType)){this.setObjContainerSize(d)}hs.container.appendChild(this.wrapper);hs.setStyles(this.wrapper,{position:"static",padding:"0 "+hs.marginRight+"px 0 "+hs.marginLeft+"px"});this.content=hs.createElement("div",{className:"highslide-html"},{position:"relative",zIndex:3,height:0,overflow:"hidden"},this.wrapper);this.mediumContent=hs.createElement("div",null,null,this.content,1);this.mediumContent.appendChild(d);hs.setStyles(d,{position:"relative",display:"block",direction:hs.lang.cssDirection||""});if(this.width){d.style.width=this.width+"px"}if(this.height){hs.setStyles(d,{height:this.height+"px",overflow:"hidden"})}if(d.offsetWidth<this.minWidth){d.style.width=this.minWidth+"px"}if(this.objectType=="ajax"&&!hs.getCacheBinding(this.a)){this.showLoading();var c=this;var b=new hs.Ajax(this.a,d);b.src=this.src;b.onLoad=function(){if(hs.expanders[c.key]){c.contentLoaded()}};b.onError=function(){location.href=c.src};b.run()}else{if(this.objectType=="iframe"&&this.objectLoadTime=="before"){this.writeExtendedContent()}else{this.contentLoaded()}}},contentLoaded:function(){try{if(!this.content){return}this.content.onload=null;if(this.onLoadStarted){return}else{this.onLoadStarted=true}var j=this.x,g=this.y;if(this.loading){hs.setStyles(this.loading,{top:"-9999px"});this.loading=null;hs.fireEvent(this,"onHideLoading")}if(this.isImage){j.full=this.content.width;g.full=this.content.height;hs.setStyles(this.content,{width:j.t+"px",height:g.t+"px"});this.wrapper.appendChild(this.content);hs.container.appendChild(this.wrapper)}else{if(this.htmlGetSize){this.htmlGetSize()}}j.calcBorders();g.calcBorders();hs.setStyles(this.wrapper,{left:(j.tpos+j.tb-j.cb)+"px",top:(g.tpos+j.tb-g.cb)+"px"});this.initSlideshow();this.getOverlays();var f=j.full/g.full;j.calcExpanded();this.justify(j);g.calcExpanded();this.justify(g);if(this.isHtml){this.htmlSizeOperations()}if(this.overlayBox){this.sizeOverlayBox(0,1)}if(this.allowSizeReduction){if(this.isImage){this.correctRatio(f)}else{this.fitOverlayBox()}var k=this.slideshow;if(k&&this.last&&k.controls&&k.fixedControls){var h=k.overlayOptions.position||"",a;for(var c in hs.oPos){for(var b=0;b<5;b++){a=this[c];if(h.match(hs.oPos[c][b])){a.pos=this.last[c].pos+(this.last[c].p1-a.p1)+(this.last[c].size-a.size)*[0,0,0.5,1,1][b];if(k.fixedControls=="fit"){if(a.pos+a.size+a.p1+a.p2>a.scroll+a.clientSize-a.marginMax){a.pos=a.scroll+a.clientSize-a.size-a.marginMin-a.marginMax-a.p1-a.p2}if(a.pos<a.scroll+a.marginMin){a.pos=a.scroll+a.marginMin}}}}}}if(this.isImage&&this.x.full>(this.x.imgSize||this.x.size)){this.createFullExpand();if(this.overlays.length==1){this.sizeOverlayBox()}}}this.show()}catch(d){this.error(d)}},setObjContainerSize:function(a,d){var b=hs.getElementByClass(a,"DIV","highslide-body");if(/(iframe|swf)/.test(this.objectType)){if(this.objectWidth){b.style.width=this.objectWidth+"px"}if(this.objectHeight){b.style.height=this.objectHeight+"px"}}},writeExtendedContent:function(){if(this.hasExtendedContent){return}var f=this;this.body=hs.getElementByClass(this.innerContent,"DIV","highslide-body");if(this.objectType=="iframe"){this.showLoading();var g=hs.clearing.cloneNode(1);this.body.appendChild(g);this.newWidth=this.innerContent.offsetWidth;if(!this.objectWidth){this.objectWidth=g.offsetWidth}var c=this.innerContent.offsetHeight-this.body.offsetHeight,d=this.objectHeight||hs.page.height-c-hs.marginTop-hs.marginBottom,e=this.objectLoadTime=="before"?' onload="if (hs.expanders['+this.key+"]) hs.expanders["+this.key+'].contentLoaded()" ':"";this.body.innerHTML+='<iframe name="hs'+(new Date()).getTime()+'" frameborder="0" key="'+this.key+'"  style="width:'+this.objectWidth+"px; height:"+d+'px" '+e+' src="'+this.src+'" ></iframe>';this.ruler=this.body.getElementsByTagName("div")[0];this.iframe=this.body.getElementsByTagName("iframe")[0];if(this.objectLoadTime=="after"){this.correctIframeSize()}}if(this.objectType=="swf"){this.body.id=this.body.id||"hs-flash-id-"+this.key;var b=this.swfOptions;if(!b.params){b.params={}}if(typeof b.params.wmode=="undefined"){b.params.wmode="transparent"}if(swfobject){swfobject.embedSWF(this.src,this.body.id,this.objectWidth,this.objectHeight,b.version||"7",b.expressInstallSwfurl,b.flashvars,b.params,b.attributes)}}this.hasExtendedContent=true},htmlGetSize:function(){if(this.iframe&&!this.objectHeight){this.iframe.style.height=this.body.style.height=this.getIframePageHeight()+"px"}this.innerContent.appendChild(hs.clearing);if(!this.x.full){this.x.full=this.innerContent.offsetWidth}this.y.full=this.innerContent.offsetHeight;this.innerContent.removeChild(hs.clearing);if(hs.ie&&this.newHeight>parseInt(this.innerContent.currentStyle.height)){this.newHeight=parseInt(this.innerContent.currentStyle.height)}hs.setStyles(this.wrapper,{position:"absolute",padding:"0"});hs.setStyles(this.content,{width:this.x.t+"px",height:this.y.t+"px"})},getIframePageHeight:function(){var a;try{var d=this.iDoc=this.iframe.contentDocument||this.iframe.contentWindow.document;var b=d.createElement("div");b.style.clear="both";d.body.appendChild(b);a=b.offsetTop;if(hs.ie){a+=parseInt(d.body.currentStyle.marginTop)+parseInt(d.body.currentStyle.marginBottom)-1}}catch(c){a=300}return a},correctIframeSize:function(){var b=this.innerContent.offsetWidth-this.ruler.offsetWidth;hs.discardElement(this.ruler);if(b<0){b=0}var a=this.innerContent.offsetHeight-this.iframe.offsetHeight;if(this.iDoc&&!this.objectHeight&&!this.height&&this.y.size==this.y.full){try{this.iDoc.body.style.overflow="hidden"}catch(c){}}hs.setStyles(this.iframe,{width:Math.abs(this.x.size-b)+"px",height:Math.abs(this.y.size-a)+"px"});hs.setStyles(this.body,{width:this.iframe.style.width,height:this.iframe.style.height});this.scrollingContent=this.iframe;this.scrollerDiv=this.scrollingContent},htmlSizeOperations:function(){this.setObjContainerSize(this.innerContent);if(this.objectType=="swf"&&this.objectLoadTime=="before"){this.writeExtendedContent()}if(this.x.size<this.x.full&&!this.allowWidthReduction){this.x.size=this.x.full}if(this.y.size<this.y.full&&!this.allowHeightReduction){this.y.size=this.y.full}this.scrollerDiv=this.innerContent;hs.setStyles(this.mediumContent,{position:"relative",width:this.x.size+"px"});hs.setStyles(this.innerContent,{border:"none",width:"auto",height:"auto"});var e=hs.getElementByClass(this.innerContent,"DIV","highslide-body");if(e&&!/(iframe|swf)/.test(this.objectType)){var b=e;e=hs.createElement(b.nodeName,null,{overflow:"hidden"},null,true);b.parentNode.insertBefore(e,b);e.appendChild(hs.clearing);e.appendChild(b);var c=this.innerContent.offsetWidth-e.offsetWidth;var a=this.innerContent.offsetHeight-e.offsetHeight;e.removeChild(hs.clearing);var d=hs.safari||navigator.vendor=="KDE"?1:0;hs.setStyles(e,{width:(this.x.size-c-d)+"px",height:(this.y.size-a)+"px",overflow:"auto",position:"relative"});if(d&&b.offsetHeight>e.offsetHeight){e.style.width=(parseInt(e.style.width)+d)+"px"}this.scrollingContent=e;this.scrollerDiv=this.scrollingContent}if(this.iframe&&this.objectLoadTime=="before"){this.correctIframeSize()}if(!this.scrollingContent&&this.y.size<this.mediumContent.offsetHeight){this.scrollerDiv=this.content}if(this.scrollerDiv==this.content&&!this.allowWidthReduction&&!/(iframe|swf)/.test(this.objectType)){this.x.size+=17}if(this.scrollerDiv&&this.scrollerDiv.offsetHeight>this.scrollerDiv.parentNode.offsetHeight){setTimeout("try { hs.expanders["+this.key+"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",hs.expandDuration)}},getImageMapAreaCorrection:function(d){var h=d.coords.split(",");for(var b=0;b<h.length;b++){h[b]=parseInt(h[b])}if(d.shape.toLowerCase()=="circle"){this.x.tpos+=h[0]-h[2];this.y.tpos+=h[1]-h[2];this.x.t=this.y.t=2*h[2]}else{var f,e,a=f=h[0],g=e=h[1];for(var b=0;b<h.length;b++){if(b%2==0){a=Math.min(a,h[b]);f=Math.max(f,h[b])}else{g=Math.min(g,h[b]);e=Math.max(e,h[b])}}this.x.tpos+=a;this.x.t=f-a;this.y.tpos+=g;this.y.t=e-g}},justify:function(f,b){var g,h=f.target,e=f==this.x?"x":"y";if(h&&h.match(/ /)){g=h.split(" ");h=g[0]}if(h&&hs.$(h)){f.pos=hs.getPosition(hs.$(h))[e];if(g&&g[1]&&g[1].match(/^[-]?[0-9]+px$/)){f.pos+=parseInt(g[1])}if(f.size<f.minSize){f.size=f.minSize}}else{if(f.justify=="auto"||f.justify=="center"){var d=false;var a=f.exp.allowSizeReduction;if(f.justify=="center"){f.pos=Math.round(f.scroll+(f.clientSize+f.marginMin-f.marginMax-f.get("wsize"))/2)}else{f.pos=Math.round(f.pos-((f.get("wsize")-f.t)/2))}if(f.pos<f.scroll+f.marginMin){f.pos=f.scroll+f.marginMin;d=true}if(!b&&f.size<f.minSize){f.size=f.minSize;a=false}if(f.pos+f.get("wsize")>f.scroll+f.clientSize-f.marginMax){if(!b&&d&&a){f.size=Math.min(f.size,f.get(e=="y"?"fitsize":"maxsize"))}else{if(f.get("wsize")<f.get("fitsize")){f.pos=f.scroll+f.clientSize-f.marginMax-f.get("wsize")}else{f.pos=f.scroll+f.marginMin;if(!b&&a){f.size=f.get(e=="y"?"fitsize":"maxsize")}}}}if(!b&&f.size<f.minSize){f.size=f.minSize;a=false}}else{if(f.justify=="max"){f.pos=Math.floor(f.pos-f.size+f.t)}}}if(f.pos<f.marginMin){var c=f.pos;f.pos=f.marginMin;if(a&&!b){f.size=f.size-(f.pos-c)}}},correctRatio:function(c){var a=this.x,g=this.y,e=false,d=Math.min(a.full,a.size),b=Math.min(g.full,g.size),f=(this.useBox||hs.padToMinWidth);if(d/b>c){d=b*c;if(d<a.minSize){d=a.minSize;b=d/c}e=true}else{if(d/b<c){b=d/c;e=true}}if(hs.padToMinWidth&&a.full<a.minSize){a.imgSize=a.full;g.size=g.imgSize=g.full}else{if(this.useBox){a.imgSize=d;g.imgSize=b}else{a.size=d;g.size=b}}e=this.fitOverlayBox(this.useBox?null:c,e);if(f&&g.size<g.imgSize){g.imgSize=g.size;a.imgSize=g.size*c}if(e||f){a.pos=a.tpos-a.cb+a.tb;a.minSize=a.size;this.justify(a,true);g.pos=g.tpos-g.cb+g.tb;g.minSize=g.size;this.justify(g,true);if(this.overlayBox){this.sizeOverlayBox()}}},fitOverlayBox:function(b,c){var a=this.x,d=this.y;if(this.overlayBox&&(this.isImage||this.allowHeightReduction)){while(d.size>this.minHeight&&a.size>this.minWidth&&d.get("wsize")>d.get("fitsize")){d.size-=10;if(b){a.size=d.size*b}this.sizeOverlayBox(0,1);c=true}}return c},reflow:function(){if(this.scrollerDiv){var a=/iframe/i.test(this.scrollerDiv.tagName)?(this.getIframePageHeight()+1)+"px":"auto";if(this.body){this.body.style.height=a}this.scrollerDiv.style.height=a;this.y.setSize(this.innerContent.offsetHeight)}},show:function(){var a=this.x,b=this.y;this.doShowHide("hidden");hs.fireEvent(this,"onBeforeExpand");if(this.slideshow&&this.slideshow.thumbstrip){this.slideshow.thumbstrip.selectThumb()}this.changeSize(1,{wrapper:{width:a.get("wsize"),height:b.get("wsize"),left:a.pos,top:b.pos},content:{left:a.p1+a.get("imgPad"),top:b.p1+b.get("imgPad"),width:a.imgSize||a.size,height:b.imgSize||b.size}},hs.expandDuration)},changeSize:function(d,i,b){var k=this.transitions,e=d?(this.last?this.last.a:null):hs.upcoming,j=(k[1]&&e&&hs.getParam(e,"transitions")[1]==k[1])?k[1]:k[0];if(this[j]&&j!="expand"){this[j](d,i);return}if(this.outline&&!this.outlineWhileAnimating){if(d){this.outline.setPosition()}else{this.outline.destroy((this.isHtml&&this.preserveContent))}}if(!d){this.destroyOverlays()}var c=this,h=c.x,g=c.y,f=this.easing;if(!d){f=this.easingClose||f}var a=d?function(){if(c.outline){c.outline.table.style.visibility="visible"}setTimeout(function(){c.afterExpand()},50)}:function(){c.afterClose()};if(d){hs.setStyles(this.wrapper,{width:h.t+"px",height:g.t+"px"})}if(d&&this.isHtml){hs.setStyles(this.wrapper,{left:(h.tpos-h.cb+h.tb)+"px",top:(g.tpos-g.cb+g.tb)+"px"})}if(this.fadeInOut){hs.setStyles(this.wrapper,{opacity:d?0:1});hs.extend(i.wrapper,{opacity:d})}hs.animate(this.wrapper,i.wrapper,{duration:b,easing:f,step:function(n,l){if(c.outline&&c.outlineWhileAnimating&&l.prop=="top"){var m=d?l.pos:1-l.pos;var o={w:h.t+(h.get("wsize")-h.t)*m,h:g.t+(g.get("wsize")-g.t)*m,x:h.tpos+(h.pos-h.tpos)*m,y:g.tpos+(g.pos-g.tpos)*m};c.outline.setPosition(o,0,1)}if(c.isHtml){if(l.prop=="left"){c.mediumContent.style.left=(h.pos-n)+"px"}if(l.prop=="top"){c.mediumContent.style.top=(g.pos-n)+"px"}}}});hs.animate(this.content,i.content,b,f,a);if(d){this.wrapper.style.visibility="visible";this.content.style.visibility="visible";if(this.isHtml){this.innerContent.style.visibility="visible"}this.a.className+=" highslide-active-anchor"}},fade:function(f,h){this.outlineWhileAnimating=false;var c=this,j=f?hs.expandDuration:0;if(f){hs.animate(this.wrapper,h.wrapper,0);hs.setStyles(this.wrapper,{opacity:0,visibility:"visible"});hs.animate(this.content,h.content,0);this.content.style.visibility="visible";hs.animate(this.wrapper,{opacity:1},j,null,function(){c.afterExpand()})}if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex;var b=f||-1,d=this.outline.offset,a=f?3:d,g=f?d:3;for(var e=a;b*e<=b*g;e+=b,j+=25){(function(){var i=f?g-e:a-e;setTimeout(function(){c.outline.setPosition(0,i,1)},j)})()}}if(f){}else{setTimeout(function(){if(c.outline){c.outline.destroy(c.preserveContent)}c.destroyOverlays();hs.animate(c.wrapper,{opacity:0},hs.restoreDuration,null,function(){c.afterClose()})},j)}},crossfade:function(g,m,o){if(!g){return}var f=this,p=this.last,l=this.x,k=this.y,d=p.x,b=p.y,a=this.wrapper,i=this.content,c=this.overlayBox;hs.removeEventListener(document,"mousemove",hs.dragHandler);hs.setStyles(i,{width:(l.imgSize||l.size)+"px",height:(k.imgSize||k.size)+"px"});if(c){c.style.overflow="visible"}this.outline=p.outline;if(this.outline){this.outline.exp=f}p.outline=null;var h=hs.createElement("div",{className:"highslide-"+this.contentType},{position:"absolute",zIndex:4,overflow:"hidden",display:"none"});var j={oldImg:p,newImg:this};for(var e in j){this[e]=j[e].content.cloneNode(1);hs.setStyles(this[e],{position:"absolute",border:0,visibility:"visible"});h.appendChild(this[e])}a.appendChild(h);if(this.isHtml){hs.setStyles(this.mediumContent,{left:0,top:0})}if(c){c.className="";a.appendChild(c)}h.style.display="";p.content.style.display="none";if(hs.safari&&hs.uaVersion<525){this.wrapper.style.visibility="visible"}hs.animate(a,{width:l.size},{duration:hs.transitionDuration,step:function(u,r){var x=r.pos,q=1-x;var w,s={},t=["pos","size","p1","p2"];for(var v in t){w=t[v];s["x"+w]=Math.round(q*d[w]+x*l[w]);s["y"+w]=Math.round(q*b[w]+x*k[w]);s.ximgSize=Math.round(q*(d.imgSize||d.size)+x*(l.imgSize||l.size));s.ximgPad=Math.round(q*d.get("imgPad")+x*l.get("imgPad"));s.yimgSize=Math.round(q*(b.imgSize||b.size)+x*(k.imgSize||k.size));s.yimgPad=Math.round(q*b.get("imgPad")+x*k.get("imgPad"))}if(f.outline){f.outline.setPosition({x:s.xpos,y:s.ypos,w:s.xsize+s.xp1+s.xp2+2*l.cb,h:s.ysize+s.yp1+s.yp2+2*k.cb})}p.wrapper.style.clip="rect("+(s.ypos-b.pos)+"px, "+(s.xsize+s.xp1+s.xp2+s.xpos+2*d.cb-d.pos)+"px, "+(s.ysize+s.yp1+s.yp2+s.ypos+2*b.cb-b.pos)+"px, "+(s.xpos-d.pos)+"px)";hs.setStyles(i,{top:(s.yp1+k.get("imgPad"))+"px",left:(s.xp1+l.get("imgPad"))+"px",marginTop:(k.pos-s.ypos)+"px",marginLeft:(l.pos-s.xpos)+"px"});hs.setStyles(a,{top:s.ypos+"px",left:s.xpos+"px",width:(s.xp1+s.xp2+s.xsize+2*l.cb)+"px",height:(s.yp1+s.yp2+s.ysize+2*k.cb)+"px"});hs.setStyles(h,{width:(s.ximgSize||s.xsize)+"px",height:(s.yimgSize||s.ysize)+"px",left:(s.xp1+s.ximgPad)+"px",top:(s.yp1+s.yimgPad)+"px",visibility:"visible"});hs.setStyles(f.oldImg,{top:(b.pos-s.ypos+b.p1-s.yp1+b.get("imgPad")-s.yimgPad)+"px",left:(d.pos-s.xpos+d.p1-s.xp1+d.get("imgPad")-s.ximgPad)+"px"});hs.setStyles(f.newImg,{opacity:x,top:(k.pos-s.ypos+k.p1-s.yp1+k.get("imgPad")-s.yimgPad)+"px",left:(l.pos-s.xpos+l.p1-s.xp1+l.get("imgPad")-s.ximgPad)+"px"});if(c){hs.setStyles(c,{width:s.xsize+"px",height:s.ysize+"px",left:(s.xp1+l.cb)+"px",top:(s.yp1+k.cb)+"px"})}},complete:function(){a.style.visibility=i.style.visibility="visible";i.style.display="block";hs.discardElement(h);f.afterExpand();p.afterClose();f.last=null}})},reuseOverlay:function(d,c){if(!this.last){return false}for(var b=0;b<this.last.overlays.length;b++){var a=hs.$("hsId"+this.last.overlays[b]);if(a&&a.hsId==d.hsId){this.genOverlayBox();a.reuse=this.key;hs.push(this.overlays,this.last.overlays[b]);return true}}return false},afterExpand:function(){this.isExpanded=true;this.focus();if(this.isHtml&&this.objectLoadTime=="after"){this.writeExtendedContent()}if(this.iframe){try{var g=this,f=this.iframe.contentDocument||this.iframe.contentWindow.document;hs.addEventListener(f,"mousedown",function(){if(hs.focusKey!=g.key){g.focus()}})}catch(d){}if(hs.ie&&typeof this.isClosing!="boolean"){this.iframe.style.width=(this.objectWidth-1)+"px"}}if(this.dimmingOpacity){hs.dim(this)}if(hs.upcoming&&hs.upcoming==this.a){hs.upcoming=null}this.prepareNextOutline();var c=hs.page,b=hs.mouse.x+c.scrollLeft,a=hs.mouse.y+c.scrollTop;this.mouseIsOver=this.x.pos<b&&b<this.x.pos+this.x.get("wsize")&&this.y.pos<a&&a<this.y.pos+this.y.get("wsize");if(this.overlayBox){this.showOverlays()}hs.fireEvent(this,"onAfterExpand")},prepareNextOutline:function(){var a=this.key;var b=this.outlineType;new hs.Outline(b,function(){try{hs.expanders[a].preloadNext()}catch(c){}})},preloadNext:function(){var b=this.getAdjacentAnchor(1);if(b&&b.onclick.toString().match(/hs\.expand/)){var a=hs.createElement("img",{src:hs.getSrc(b)})}},getAdjacentAnchor:function(c){var b=this.getAnchorIndex(),a=hs.anchors.groups[this.slideshowGroup||"none"];if(a&&!a[b+c]&&this.slideshow&&this.slideshow.repeat){if(c==1){return a[0]}else{if(c==-1){return a[a.length-1]}}}return(a&&a[b+c])||null},getAnchorIndex:function(){var a=hs.getAnchors().groups[this.slideshowGroup||"none"];if(a){for(var b=0;b<a.length;b++){if(a[b]==this.a){return b}}}return null},getNumber:function(){if(this[this.numberPosition]){var a=hs.anchors.groups[this.slideshowGroup||"none"];if(a){var b=hs.lang.number.replace("%1",this.getAnchorIndex()+1).replace("%2",a.length);this[this.numberPosition].innerHTML='<div class="highslide-number">'+b+"</div>"+this[this.numberPosition].innerHTML}}},initSlideshow:function(){if(!this.last){for(var c=0;c<hs.slideshows.length;c++){var b=hs.slideshows[c],d=b.slideshowGroup;if(typeof d=="undefined"||d===null||d===this.slideshowGroup){this.slideshow=new hs.Slideshow(this.key,b)}}}else{this.slideshow=this.last.slideshow}var b=this.slideshow;if(!b){return}var a=b.expKey=this.key;b.checkFirstAndLast();b.disable("full-expand");if(b.controls){this.createOverlay(hs.extend(b.overlayOptions||{},{overlayId:b.controls,hsId:"controls",zIndex:5}))}if(b.thumbstrip){b.thumbstrip.add(this)}if(!this.last&&this.autoplay){b.play(true)}if(b.autoplay){b.autoplay=setTimeout(function(){hs.next(a)},(b.interval||500))}},cancelLoading:function(){hs.discardElement(this.wrapper);hs.expanders[this.key]=null;if(hs.upcoming==this.a){hs.upcoming=null}hs.undim(this.key);if(this.loading){hs.loading.style.left="-9999px"}hs.fireEvent(this,"onHideLoading")},writeCredits:function(){if(this.credits){return}this.credits=hs.createElement("a",{href:hs.creditsHref,target:hs.creditsTarget,className:"highslide-credits",innerHTML:hs.lang.creditsText,title:hs.lang.creditsTitle});this.createOverlay({overlayId:this.credits,position:this.creditsPosition||"top left",hsId:"credits"})},getInline:function(types,addOverlay){for(var i=0;i<types.length;i++){var type=types[i],s=null;if(type=="caption"&&!hs.fireEvent(this,"onBeforeGetCaption")){return}else{if(type=="heading"&&!hs.fireEvent(this,"onBeforeGetHeading")){return}}if(!this[type+"Id"]&&this.thumbsUserSetId){this[type+"Id"]=type+"-for-"+this.thumbsUserSetId}if(this[type+"Id"]){this[type]=hs.getNode(this[type+"Id"])}if(!this[type]&&!this[type+"Text"]&&this[type+"Eval"]){try{s=eval(this[type+"Eval"])}catch(e){}}if(!this[type]&&this[type+"Text"]){s=this[type+"Text"]}if(!this[type]&&!s){this[type]=hs.getNode(this.a["_"+type+"Id"]);if(!this[type]){var next=this.a.nextSibling;while(next&&!hs.isHsAnchor(next)){if((new RegExp("highslide-"+type)).test(next.className||null)){if(!next.id){this.a["_"+type+"Id"]=next.id="hsId"+hs.idCounter++}this[type]=hs.getNode(next.id);break}next=next.nextSibling}}}if(!this[type]&&!s&&this.numberPosition==type){s="\n"}if(!this[type]&&s){this[type]=hs.createElement("div",{className:"highslide-"+type,innerHTML:s})}if(addOverlay&&this[type]){var o={position:(type=="heading")?"above":"below"};for(var x in this[type+"Overlay"]){o[x]=this[type+"Overlay"][x]}o.overlayId=this[type];this.createOverlay(o)}}},doShowHide:function(a){if(hs.hideSelects){this.showHideElements("SELECT",a)}if(hs.hideIframes){this.showHideElements("IFRAME",a)}if(hs.geckoMac){this.showHideElements("*",a)}},showHideElements:function(c,b){var e=document.getElementsByTagName(c);var a=c=="*"?"overflow":"visibility";for(var f=0;f<e.length;f++){if(a=="visibility"||(document.defaultView.getComputedStyle(e[f],"").getPropertyValue("overflow")=="auto"||e[f].getAttribute("hidden-by")!=null)){var h=e[f].getAttribute("hidden-by");if(b=="visible"&&h){h=h.replace("["+this.key+"]","");e[f].setAttribute("hidden-by",h);if(!h){e[f].style[a]=e[f].origProp}}else{if(b=="hidden"){var k=hs.getPosition(e[f]);k.w=e[f].offsetWidth;k.h=e[f].offsetHeight;if(!this.dimmingOpacity){var j=(k.x+k.w<this.x.get("opos")||k.x>this.x.get("opos")+this.x.get("osize"));var g=(k.y+k.h<this.y.get("opos")||k.y>this.y.get("opos")+this.y.get("osize"))}var d=hs.getWrapperKey(e[f]);if(!j&&!g&&d!=this.key){if(!h){e[f].setAttribute("hidden-by","["+this.key+"]");e[f].origProp=e[f].style[a];e[f].style[a]="hidden"}else{if(h.indexOf("["+this.key+"]")==-1){e[f].setAttribute("hidden-by",h+"["+this.key+"]")}}}else{if((h=="["+this.key+"]"||hs.focusKey==d)&&d!=this.key){e[f].setAttribute("hidden-by","");e[f].style[a]=e[f].origProp||""}else{if(h&&h.indexOf("["+this.key+"]")>-1){e[f].setAttribute("hidden-by",h.replace("["+this.key+"]",""))}}}}}}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter+=2;for(var a=0;a<hs.expanders.length;a++){if(hs.expanders[a]&&a==hs.focusKey){var b=hs.expanders[a];b.content.className+=" highslide-"+b.contentType+"-blur";if(b.isImage){b.content.style.cursor=hs.ieLt7?"hand":"pointer";b.content.title=hs.lang.focusTitle}hs.fireEvent(b,"onBlur")}}if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex-1}this.content.className="highslide-"+this.contentType;if(this.isImage){this.content.title=hs.lang.restoreTitle;if(hs.restoreCursor){hs.styleRestoreCursor=window.opera?"pointer":"url("+hs.graphicsDir+hs.restoreCursor+"), pointer";if(hs.ieLt7&&hs.uaVersion<6){hs.styleRestoreCursor="hand"}this.content.style.cursor=hs.styleRestoreCursor}}hs.focusKey=this.key;hs.addEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);hs.fireEvent(this,"onFocus")},moveTo:function(a,b){this.x.setPos(a);this.y.setPos(b)},resize:function(d){var a,b,c=d.width/d.height;a=Math.max(d.width+d.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(a-this.x.full)<12){a=this.x.full}b=this.isHtml?d.height+d.dY:a/c;if(b<Math.min(this.minHeight,this.y.full)){b=Math.min(this.minHeight,this.y.full);if(this.isImage){a=b*c}}this.resizeTo(a,b)},resizeTo:function(a,b){this.y.setSize(b);this.x.setSize(a);this.wrapper.style.height=this.y.get("wsize")+"px"},close:function(){if(this.isClosing||!this.isExpanded){return}if(this.transitions[1]=="crossfade"&&hs.upcoming){hs.getExpander(hs.upcoming).cancelLoading();hs.upcoming=null}if(!hs.fireEvent(this,"onBeforeClose")){return}this.isClosing=true;if(this.slideshow&&!hs.upcoming){this.slideshow.pause()}hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);try{if(this.isHtml){this.htmlPrepareClose()}this.content.style.cursor="default";this.changeSize(0,{wrapper:{width:this.x.t,height:this.y.t,left:this.x.tpos-this.x.cb+this.x.tb,top:this.y.tpos-this.y.cb+this.y.tb},content:{left:0,top:0,width:this.x.t,height:this.y.t}},hs.restoreDuration)}catch(a){this.afterClose()}},htmlPrepareClose:function(){if(hs.geckoMac){if(!hs.mask){hs.mask=hs.createElement("div",null,{position:"absolute"},hs.container)}hs.setStyles(hs.mask,{width:this.x.size+"px",height:this.y.size+"px",left:this.x.pos+"px",top:this.y.pos+"px",display:"block"})}if(this.objectType=="swf"){try{hs.$(this.body.id).StopPlay()}catch(a){}}if(this.objectLoadTime=="after"&&!this.preserveContent){this.destroyObject()}if(this.scrollerDiv&&this.scrollerDiv!=this.scrollingContent){this.scrollerDiv.style.overflow="hidden"}},destroyObject:function(){if(hs.ie&&this.iframe){try{this.iframe.contentWindow.document.body.innerHTML=""}catch(a){}}if(this.objectType=="swf"){swfobject.removeSWF(this.body.id)}this.body.innerHTML=""},sleep:function(){if(this.outline){this.outline.table.style.display="none"}this.releaseMask=null;this.wrapper.style.display="none";this.isExpanded=false;hs.push(hs.sleeping,this)},awake:function(){try{hs.expanders[this.key]=this;if(!hs.allowMultipleInstances&&hs.focusKey!=this.key){try{hs.expanders[hs.focusKey].close()}catch(b){}}var d=hs.zIndexCounter++,a={display:"",zIndex:d};hs.setStyles(this.wrapper,a);this.isClosing=false;var c=this.outline||0;if(c){if(!this.outlineWhileAnimating){a.visibility="hidden"}hs.setStyles(c.table,a)}if(this.slideshow){this.initSlideshow()}this.show()}catch(b){}},createOverlay:function(e){var d=e.overlayId,a=(e.relativeTo=="viewport"&&!/panel$/.test(e.position));if(typeof d=="string"){d=hs.getNode(d)}if(e.html){d=hs.createElement("div",{innerHTML:e.html})}if(!d||typeof d=="string"){return}if(!hs.fireEvent(this,"onCreateOverlay",{overlay:d})){return}d.style.display="block";e.hsId=e.hsId||e.overlayId;if(this.transitions[1]=="crossfade"&&this.reuseOverlay(e,d)){return}this.genOverlayBox();var c=e.width&&/^[0-9]+(px|%)$/.test(e.width)?e.width:"auto";if(/^(left|right)panel$/.test(e.position)&&!/^[0-9]+px$/.test(e.width)){c="200px"}var b=hs.createElement("div",{id:"hsId"+hs.idCounter++,hsId:e.hsId},{position:"absolute",visibility:"hidden",width:c,direction:hs.lang.cssDirection||"",opacity:0},a?hs.viewport:this.overlayBox,true);if(a){b.hsKey=this.key}b.appendChild(d);hs.extend(b,{opacity:1,offsetX:0,offsetY:0,dur:(e.fade===0||e.fade===false||(e.fade==2&&hs.ie))?0:250});hs.extend(b,e);if(this.gotOverlays){this.positionOverlay(b);if(!b.hideOnMouseOut||this.mouseIsOver){hs.animate(b,{opacity:b.opacity},b.dur)}}hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(e){var f=e.position||"middle center",c=(e.relativeTo=="viewport"),b=e.offsetX,a=e.offsetY;if(c){hs.viewport.style.display="block";e.hsKey=this.key;if(e.offsetWidth>e.parentNode.offsetWidth){e.style.width="100%"}}else{if(e.parentNode!=this.overlayBox){this.overlayBox.appendChild(e)}}if(/left$/.test(f)){e.style.left=b+"px"}if(/center$/.test(f)){hs.setStyles(e,{left:"50%",marginLeft:(b-Math.round(e.offsetWidth/2))+"px"})}if(/right$/.test(f)){e.style.right=-b+"px"}if(/^leftpanel$/.test(f)){hs.setStyles(e,{right:"100%",marginRight:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p1=e.offsetWidth}else{if(/^rightpanel$/.test(f)){hs.setStyles(e,{left:"100%",marginLeft:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p2=e.offsetWidth}}var d=e.parentNode.offsetHeight;e.style.height="auto";if(c&&e.offsetHeight>d){e.style.height=hs.ieLt7?d+"px":"100%"}if(/^top/.test(f)){e.style.top=a+"px"}if(/^middle/.test(f)){hs.setStyles(e,{top:"50%",marginTop:(a-Math.round(e.offsetHeight/2))+"px"})}if(/^bottom/.test(f)){e.style.bottom=-a+"px"}if(/^above$/.test(f)){hs.setStyles(e,{left:(-this.x.p1-this.x.cb)+"px",right:(-this.x.p2-this.x.cb)+"px",bottom:"100%",marginBottom:this.y.cb+"px",width:"auto"});this.y.p1=e.offsetHeight}else{if(/^below$/.test(f)){hs.setStyles(e,{position:"relative",left:(-this.x.p1-this.x.cb)+"px",right:(-this.x.p2-this.x.cb)+"px",top:"100%",marginTop:this.y.cb+"px",width:"auto"});this.y.p2=e.offsetHeight;e.style.position="absolute"}}},getOverlays:function(){this.getInline(["heading","caption"],true);this.getNumber();if(this.caption){hs.fireEvent(this,"onAfterGetCaption")}if(this.heading){hs.fireEvent(this,"onAfterGetHeading")}if(this.heading&&this.dragByHeading){this.heading.className+=" highslide-move"}if(hs.showCredits){this.writeCredits()}for(var a=0;a<hs.overlays.length;a++){var d=hs.overlays[a],e=d.thumbnailId,b=d.slideshowGroup;if((!e&&!b)||(e&&e==this.thumbsUserSetId)||(b&&b===this.slideshowGroup)){if(this.isImage||(this.isHtml&&d.useOnHtml)){this.createOverlay(d)}}}var c=[];for(var a=0;a<this.overlays.length;a++){var d=hs.$("hsId"+this.overlays[a]);if(/panel$/.test(d.position)){this.positionOverlay(d)}else{hs.push(c,d)}}for(var a=0;a<c.length;a++){this.positionOverlay(c[a])}this.gotOverlays=true},genOverlayBox:function(){if(!this.overlayBox){this.overlayBox=hs.createElement("div",{className:this.wrapperClassName},{position:"absolute",width:(this.x.size||(this.useBox?this.width:null)||this.x.full)+"px",height:(this.y.size||this.y.full)+"px",visibility:"hidden",overflow:"hidden",zIndex:hs.ie?4:"auto"},hs.container,true)}},sizeOverlayBox:function(f,d){var c=this.overlayBox,a=this.x,h=this.y;hs.setStyles(c,{width:a.size+"px",height:h.size+"px"});if(f||d){for(var e=0;e<this.overlays.length;e++){var g=hs.$("hsId"+this.overlays[e]);var b=(hs.ieLt7||document.compatMode=="BackCompat");if(g&&/^(above|below)$/.test(g.position)){if(b){g.style.width=(c.offsetWidth+2*a.cb+a.p1+a.p2)+"px"}h[g.position=="above"?"p1":"p2"]=g.offsetHeight}if(g&&b&&/^(left|right)panel$/.test(g.position)){g.style.height=(c.offsetHeight+2*h.cb)+"px"}}}if(f){hs.setStyles(this.content,{top:h.p1+"px"});hs.setStyles(c,{top:(h.p1+h.cb)+"px"})}},showOverlays:function(){var a=this.overlayBox;a.className="";hs.setStyles(a,{top:(this.y.p1+this.y.cb)+"px",left:(this.x.p1+this.x.cb)+"px",overflow:"visible"});if(hs.safari){a.style.visibility="visible"}this.wrapper.appendChild(a);for(var c=0;c<this.overlays.length;c++){var d=hs.$("hsId"+this.overlays[c]);d.style.zIndex=d.zIndex||4;if(!d.hideOnMouseOut||this.mouseIsOver){d.style.visibility="visible";hs.setStyles(d,{visibility:"visible",display:""});hs.animate(d,{opacity:d.opacity},d.dur)}}},destroyOverlays:function(){if(!this.overlays.length){return}if(this.slideshow){var d=this.slideshow.controls;if(d&&hs.getExpander(d)==this){d.parentNode.removeChild(d)}}for(var a=0;a<this.overlays.length;a++){var b=hs.$("hsId"+this.overlays[a]);if(b&&b.parentNode==hs.viewport&&hs.getExpander(b)==this){hs.discardElement(b)}}if(this.isHtml&&this.preserveContent){this.overlayBox.style.top="-9999px";hs.container.appendChild(this.overlayBox)}else{hs.discardElement(this.overlayBox)}},createFullExpand:function(){if(this.slideshow&&this.slideshow.controls){this.slideshow.enable("full-expand");return}this.fullExpandLabel=hs.createElement("a",{href:"javascript:hs.expanders["+this.key+"].doFullExpand();",title:hs.lang.fullExpandTitle,className:"highslide-full-expand"});if(!hs.fireEvent(this,"onCreateFullExpand")){return}this.createOverlay({overlayId:this.fullExpandLabel,position:hs.fullExpandPosition,hideOnMouseOut:true,opacity:hs.fullExpandOpacity})},doFullExpand:function(){try{if(!hs.fireEvent(this,"onDoFullExpand")){return}if(this.fullExpandLabel){hs.discardElement(this.fullExpandLabel)}this.focus();var c=this.x.size,a=this.y.size;this.resizeTo(this.x.full,this.y.full);var b=this.x.pos-(this.x.size-c)/2;if(b<hs.marginLeft){b=hs.marginLeft}var f=this.y.pos-(this.y.size-a)/2;if(f<hs.marginTop){f=hs.marginTop}this.moveTo(b,f);this.doShowHide("hidden")}catch(d){this.error(d)}},afterClose:function(){this.a.className=this.a.className.replace("highslide-active-anchor","");this.doShowHide("visible");if(this.isHtml&&this.preserveContent&&this.transitions[1]!="crossfade"){this.sleep()}else{if(this.outline&&this.outlineWhileAnimating){this.outline.destroy()}hs.discardElement(this.wrapper)}if(hs.mask){hs.mask.style.display="none"}this.destroyOverlays();if(!hs.viewport.childNodes.length){hs.viewport.style.display="none"}if(this.dimmingOpacity){hs.undim(this.key)}hs.fireEvent(this,"onAfterClose");hs.expanders[this.key]=null;hs.reOrder()}};hs.Ajax=function(b,c,d){this.a=b;this.content=c;this.pre=d};hs.Ajax.prototype={run:function(){var d;if(!this.src){this.src=hs.getSrc(this.a)}if(this.src.match("#")){var a=this.src.split("#");this.src=a[0];this.id=a[1]}if(hs.cachedGets[this.src]){this.cachedGet=hs.cachedGets[this.src];if(this.id){this.getElementContent()}else{this.loadHTML()}return}try{d=new XMLHttpRequest()}catch(b){try{d=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{d=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){this.onError()}}}var f=this;d.onreadystatechange=function(){if(f.xhr.readyState==4){if(f.id){f.getElementContent()}else{f.loadHTML()}}};var c=this.src;this.xhr=d;if(hs.forceAjaxReload){c=c.replace(/$/,(/\?/.test(c)?"&":"?")+"dummy="+(new Date()).getTime())}d.open("GET",c,true);d.setRequestHeader("X-Requested-With","XMLHttpRequest");d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.send(null)},getElementContent:function(){hs.init();var a=window.opera||hs.ie6SSL?{src:"about:blank"}:null;this.iframe=hs.createElement("iframe",a,{position:"absolute",top:"-9999px"},hs.container);this.loadHTML()},loadHTML:function(){var c=this.cachedGet||this.xhr.responseText,b;if(this.pre){hs.cachedGets[this.src]=c}if(!hs.ie||hs.uaVersion>=5.5){c=c.replace(new RegExp("<link[^>]*>","gi"),"").replace(new RegExp("<script[^>]*>.*?<\/script>","gi"),"");if(this.iframe){var f=this.iframe.contentDocument;if(!f&&this.iframe.contentWindow){f=this.iframe.contentWindow.document}if(!f){var g=this;setTimeout(function(){g.loadHTML()},25);return}f.open();f.write(c);f.close();try{c=f.getElementById(this.id).innerHTML}catch(d){try{c=this.iframe.document.getElementById(this.id).innerHTML}catch(d){}}hs.discardElement(this.iframe)}else{b=/(<body[^>]*>|<\/body>)/ig;if(b.test(c)){c=c.split(b)[hs.ieLt9?1:2]}}}hs.getElementByClass(this.content,"DIV","highslide-body").innerHTML=c;this.onLoad();for(var a in this){this[a]=null}}};hs.Slideshow=function(c,b){if(hs.dynamicallyUpdateAnchors!==false){hs.updateAnchors()}this.expKey=c;for(var a in b){this[a]=b[a]}if(this.useControls){this.getControls()}if(this.thumbstrip){this.thumbstrip=hs.Thumbstrip(this)}};hs.Slideshow.prototype={getControls:function(){this.controls=hs.createElement("div",{innerHTML:hs.replaceLang(hs.skin.controls)},null,hs.container);var b=["play","pause","previous","next","move","full-expand","close"];this.btn={};var c=this;for(var a=0;a<b.length;a++){this.btn[b[a]]=hs.getElementByClass(this.controls,"li","highslide-"+b[a]);this.enable(b[a])}this.btn.pause.style.display="none"},checkFirstAndLast:function(){if(this.repeat||!this.controls){return}var c=hs.expanders[this.expKey],b=c.getAnchorIndex(),a=/disabled$/;if(b==0){this.disable("previous")}else{if(a.test(this.btn.previous.getElementsByTagName("a")[0].className)){this.enable("previous")}}if(b+1==hs.anchors.groups[c.slideshowGroup||"none"].length){this.disable("next");this.disable("play")}else{if(a.test(this.btn.next.getElementsByTagName("a")[0].className)){this.enable("next");this.enable("play")}}},enable:function(d){if(!this.btn){return}var c=this,b=this.btn[d].getElementsByTagName("a")[0],e=/disabled$/;b.onclick=function(){c[d]();return false};if(e.test(b.className)){b.className=b.className.replace(e,"")}},disable:function(c){if(!this.btn){return}var b=this.btn[c].getElementsByTagName("a")[0];b.onclick=function(){return false};if(!/disabled$/.test(b.className)){b.className+=" disabled"}},hitSpace:function(){if(this.autoplay){this.pause()}else{this.play()}},play:function(a){if(this.btn){this.btn.play.style.display="none";this.btn.pause.style.display=""}this.autoplay=true;if(!a){hs.next(this.expKey)}},pause:function(){if(this.btn){this.btn.pause.style.display="none";this.btn.play.style.display=""}clearTimeout(this.autoplay);this.autoplay=null},previous:function(){this.pause();hs.previous(this.btn.previous)},next:function(){this.pause();hs.next(this.btn.next)},move:function(){},"full-expand":function(){hs.getExpander().doFullExpand()},close:function(){hs.close(this.btn.close)}};hs.Thumbstrip=function(k){function p(i){hs.extend(f||{},{overlayId:r,hsId:"thumbstrip",className:"highslide-thumbstrip-"+m+"-overlay "+(f.className||"")});if(hs.ieLt7){f.fade=0}i.createOverlay(f);hs.setStyles(r.parentNode,{overflow:"hidden"})}function c(i){d(undefined,Math.round(i*r[h?"offsetWidth":"offsetHeight"]*0.7))}function d(L,M){if(L===undefined){for(var K=0;K<j.length;K++){if(j[K]==hs.expanders[k.expKey].a){L=K;break}}}if(L===undefined){return}var G=r.getElementsByTagName("a"),z=G[L],w=z.parentNode,y=h?"Left":"Top",N=h?"Right":"Bottom",I=h?"Width":"Height",B="offset"+y,H="offset"+I,x=n.parentNode.parentNode[H],F=x-s[H],v=parseInt(s.style[h?"left":"top"])||0,C=v,D=20;if(M!==undefined){C=v-M;if(F>0){F=0}if(C>0){C=0}if(C<F){C=F}}else{for(var K=0;K<G.length;K++){G[K].className=""}z.className="highslide-active-anchor";var J=L>0?G[L-1].parentNode[B]:w[B],A=w[B]+w[H]+(G[L+1]?G[L+1].parentNode[H]:0);if(A>x-v){C=x-A}else{if(J<-v){C=-J}}}var E=w[B]+(w[H]-g[H])/2+C;hs.animate(s,h?{left:C}:{top:C},null,"easeOutQuad");hs.animate(g,h?{left:E}:{top:E},null,"easeOutQuad");l.style.display=C<0?"block":"none";t.style.display=(C>F)?"block":"none"}var j=hs.anchors.groups[hs.expanders[k.expKey].slideshowGroup||"none"],f=k.thumbstrip,m=f.mode||"horizontal",u=(m=="float"),o=u?["div","ul","li","span"]:["table","tbody","tr","td"],h=(m=="horizontal"),r=hs.createElement("div",{className:"highslide-thumbstrip highslide-thumbstrip-"+m,innerHTML:'<div class="highslide-thumbstrip-inner"><'+o[0]+"><"+o[1]+"></"+o[1]+"></"+o[0]+'></div><div class="highslide-scroll-up"><div></div></div><div class="highslide-scroll-down"><div></div></div><div class="highslide-marker"><div></div></div>'},{display:"none"},hs.container),e=r.childNodes,n=e[0],l=e[1],t=e[2],g=e[3],s=n.firstChild,a=r.getElementsByTagName(o[1])[0],b;for(var q=0;q<j.length;q++){if(q==0||!h){b=hs.createElement(o[2],null,null,a)}(function(){var v=j[q],i=hs.createElement(o[3],null,null,b),w=q;hs.createElement("a",{href:v.href,title:v.title,onclick:function(){if(/highslide-active-anchor/.test(this.className)){return false}hs.getExpander(this).focus();return hs.transit(v)},innerHTML:hs.stripItemFormatter?hs.stripItemFormatter(v):v.innerHTML},null,i)})()}if(!u){l.onclick=function(){c(-1)};t.onclick=function(){c(1)};hs.addEventListener(a,document.onmousewheel!==undefined?"mousewheel":"DOMMouseScroll",function(i){var v=0;i=i||window.event;if(i.wheelDelta){v=i.wheelDelta/120;if(hs.opera){v=-v}}else{if(i.detail){v=-i.detail/3}}if(v){c(-v*0.2)}if(i.preventDefault){i.preventDefault()}i.returnValue=false})}return{add:p,selectThumb:d}};hs.langDefaults=hs.lang;var HsExpander=hs.Expander;if(hs.ie&&window==window.top){(function(){try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,50);return}hs.ready()})()}hs.addEventListener(document,"DOMContentLoaded",hs.ready);hs.addEventListener(window,"load",hs.ready);hs.addEventListener(document,"ready",function(){if(hs.expandCursor||hs.dimmingOpacity){var d=hs.createElement("style",{type:"text/css"},null,document.getElementsByTagName("HEAD")[0]),c=document.compatMode=="BackCompat";function b(f,g){if(hs.ie&&(hs.uaVersion<9||c)){var e=document.styleSheets[document.styleSheets.length-1];if(typeof(e.addRule)=="object"){e.addRule(f,g)}}else{d.appendChild(document.createTextNode(f+" {"+g+"}"))}}function a(e){return"expression( ( ( ignoreMe = document.documentElement."+e+" ? document.documentElement."+e+" : document.body."+e+" ) ) + 'px' );"}if(hs.expandCursor){b(".highslide img","cursor: url("+hs.graphicsDir+hs.expandCursor+"), pointer !important;")}b(".highslide-viewport-size",hs.ie&&(hs.uaVersion<7||c)?"position: absolute; left:"+a("scrollLeft")+"top:"+a("scrollTop")+"width:"+a("clientWidth")+"height:"+a("clientHeight"):"position: fixed; width: 100%; height: 100%; left: 0; top: 0")}});hs.addEventListener(window,"resize",function(){hs.getPageSize();if(hs.viewport){for(var a=0;a<hs.viewport.childNodes.length;a++){var b=hs.viewport.childNodes[a],c=hs.getExpander(b);c.positionOverlay(b);if(b.hsId=="thumbstrip"){c.slideshow.thumbstrip.selectThumb()}}}});hs.addEventListener(document,"mousemove",function(a){hs.mouse={x:a.clientX,y:a.clientY}});hs.addEventListener(document,"mousedown",hs.mouseClickHandler);hs.addEventListener(document,"mouseup",hs.mouseClickHandler);hs.addEventListener(document,"ready",hs.setClickEvents);hs.addEventListener(window,"load",hs.preloadImages);hs.addEventListener(window,"load",hs.preloadAjax)};;shutterOnload=function(){shutterReloaded.init('sh');}
if(typeof shutterOnload=='function'){if('undefined'!=typeof jQuery)jQuery(document).ready(function(){shutterOnload();});else if(typeof window.onload!='function')window.onload=shutterOnload;else{oldonld=window.onload;window.onload=function(){if(oldonld){oldonld();};shutterOnload();}};}
shutterReloaded={I:function(a){return document.getElementById(a);},settings:function(){var t=this,s=shutterSettings;t.imageCount=s.imageCount||0;t.msgLoading=s.msgLoading||'L O A D I N G';t.msgClose=s.msgClose||'Click to Close';},init:function(a){var t=this,L,T,ext,i,m,setid,inset,shfile,shMenuPre,k,img;shutterLinks={},shutterSets={};if('object'!=typeof shutterSettings)shutterSettings={};t.mobileOS=typeof orientation!='undefined'?true:false;for(i=0;i<document.links.length;i++){L=document.links[i];ext=(L.href.indexOf('?')==-1)?L.href.slice(-4).toLowerCase():L.href.substring(0,L.href.indexOf('?')).slice(-4).toLowerCase();if(ext!='.jpg'&&ext!='.png'&&ext!='.gif'&&ext!='jpeg')continue;if(a=='sh'&&L.className.toLowerCase().indexOf('shutter')==-1)continue;if(a=='lb'&&L.rel.toLowerCase().indexOf('lightbox')==-1)continue;if(L.className.toLowerCase().indexOf('shutterset')!=-1)
setid=L.className.replace(/\s/g,'_');else if(L.rel.toLowerCase().indexOf('lightbox[')!=-1)
setid=L.rel.replace(/\s/g,'_');else setid=0,inset=-1;if(setid){if(!shutterSets[setid])shutterSets[setid]=[];inset=shutterSets[setid].push(i);}
shfile=L.href.slice(L.href.lastIndexOf('/')+1);T=(L.title&&L.title!=shfile)?L.title:'';shutterLinks[i]={link:L.href,num:inset,set:setid,title:T}
L.onclick=new Function('shutterReloaded.make("'+i+'");return false;');}
t.settings();},make:function(ln,fs){var t=this,prev,next,prevlink='',nextlink='',previmg,nextimg,D,S,W,fsarg=-1,imgNum,NavBar;if(!t.Top){if(typeof window.pageYOffset!='undefined')t.Top=window.pageYOffset;else t.Top=(document.documentElement.scrollTop>0)?document.documentElement.scrollTop:document.body.scrollTop;}
if(typeof t.pgHeight=='undefined')
t.pgHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);if(fs)t.FS=(fs>0)?1:0;else t.FS=shutterSettings.FS||0;if(t.resizing)t.resizing=null;if(t.mobileOS==true)
window.onorientationchange=new Function('shutterReloaded.resize("'+ln+'");');else
window.onresize=new Function('shutterReloaded.resize("'+ln+'");');document.documentElement.style.overflowX='hidden';if(!t.VP){t._viewPort();t.VP=true;}
if(!(S=t.I('shShutter'))){S=document.createElement('div');S.setAttribute('id','shShutter');document.getElementsByTagName('body')[0].appendChild(S);t.hideTags();}
if(!(D=t.I('shDisplay'))){D=document.createElement('div');D.setAttribute('id','shDisplay');D.style.top=t.Top+'px';document.getElementsByTagName('body')[0].appendChild(D);}
S.style.height=t.pgHeight+'px';var dv=t.textBtns?' | ':'';if(shutterLinks[ln].num>1){prev=shutterSets[shutterLinks[ln].set][shutterLinks[ln].num-2];prevlink='<a href="#" id="prevpic" onclick="shutterReloaded.make('+prev+');return false">&lt;&lt;</a>'+dv;previmg=new Image();previmg.src=shutterLinks[prev].link;}else{prevlink='';}
if(shutterLinks[ln].num!=-1&&shutterLinks[ln].num<(shutterSets[shutterLinks[ln].set].length)){next=shutterSets[shutterLinks[ln].set][shutterLinks[ln].num];nextlink='<a href="#" id="nextpic" onclick="shutterReloaded.make('+next+');return false">&gt;&gt;</a>'+dv;nextimg=new Image();nextimg.src=shutterLinks[next].link;}else{nextlink='';}
imgNum=((shutterLinks[ln].num>0)&&t.imageCount)?'<div id="shCount">&nbsp;(&nbsp;'+shutterLinks[ln].num+'&nbsp;/&nbsp;'+shutterSets[shutterLinks[ln].set].length+'&nbsp;)&nbsp;</div>':'';NavBar='<div id="shTitle"><div id="shPrev">'+prevlink+'</div><div id="shNext">'+nextlink+'</div><div id="shName">'+shutterLinks[ln].title+'</div>'+imgNum+'</div>';D.innerHTML='<div id="shWrap"><img src="'+shutterLinks[ln].link+'" id="shTopImg" title="'+t.msgClose+'" onload="shutterReloaded.showImg();" onclick="shutterReloaded.hideShutter();" />'+NavBar+'</div>';document.onkeydown=function(event){shutterReloaded.handleArrowKeys(event);};document.getElementById('shTopImg').src=shutterLinks[ln].link;window.setTimeout(function(){shutterReloaded.loading();},1000);},loading:function(){var t=this,S,WB,W;if((W=t.I('shWrap'))&&W.style.visibility=='visible')return;if(!(S=t.I('shShutter')))return;if(t.I('shWaitBar'))return;WB=document.createElement('div');WB.setAttribute('id','shWaitBar');WB.style.top=t.Top+'px';WB.style.marginTop=(t.pgHeight/2)+'px'
WB.innerHTML=t.msgLoading;S.appendChild(WB);},hideShutter:function(){var t=this,D,S;if(D=t.I('shDisplay'))D.parentNode.removeChild(D);if(S=t.I('shShutter'))S.parentNode.removeChild(S);t.hideTags(true);window.scrollTo(0,t.Top);window.onresize=t.FS=t.Top=t.VP=null;document.documentElement.style.overflowX='';document.onkeydown=null;},resize:function(ln){var t=this;if(t.resizing)return;if(!t.I('shShutter'))return;var W=t.I('shWrap');if(W)W.style.visibility='hidden';window.setTimeout(function(){shutterReloaded.resizing=null},500);window.setTimeout(new Function('shutterReloaded.VP = null;shutterReloaded.make("'+ln+'");'),100);t.resizing=true;},_viewPort:function(){var t=this;var wiH=window.innerHeight?window.innerHeight:0;var dbH=document.body.clientHeight?document.body.clientHeight:0;var deH=document.documentElement?document.documentElement.clientHeight:0;if(wiH>0){t.wHeight=((wiH-dbH)>1&&(wiH-dbH)<30)?dbH:wiH;t.wHeight=((t.wHeight-deH)>1&&(t.wHeight-deH)<30)?deH:t.wHeight;}else t.wHeight=(deH>0)?deH:dbH;var deW=document.documentElement?document.documentElement.clientWidth:0;var dbW=window.innerWidth?window.innerWidth:document.body.clientWidth;t.wWidth=(deW>1)?deW:dbW;},showImg:function(){var t=this,S=t.I('shShutter'),D=t.I('shDisplay'),TI=t.I('shTopImg'),T=t.I('shTitle'),NB=t.I('shNavBar'),W,WB,wHeight,wWidth,shHeight,maxHeight,itop,mtop,resized=0;if(!S)return;if((W=t.I('shWrap'))&&W.style.visibility=='visible')return;if(WB=t.I('shWaitBar'))WB.parentNode.removeChild(WB);S.style.width=D.style.width='';T.style.width=(TI.width-4)+'px';shHeight=t.wHeight-50;if(t.FS){if(TI.width>(t.wWidth-10))
S.style.width=D.style.width=TI.width+10+'px';document.documentElement.style.overflowX='';}else{window.scrollTo(0,t.Top);if(TI.height>shHeight){TI.width=TI.width*(shHeight/TI.height);TI.height=shHeight;resized=1;}
if(TI.width>(t.wWidth-16)){TI.height=TI.height*((t.wWidth-16)/TI.width);TI.width=t.wWidth-16;resized=1;}
T.style.width=(TI.width-4)+'px';}
maxHeight=t.Top+TI.height+10;if(maxHeight>t.pgHeight)S.style.height=maxHeight+'px';window.scrollTo(0,t.Top);itop=(shHeight-TI.height)*0.45;mtop=(itop>3)?Math.floor(itop):3;D.style.top=t.Top+mtop+'px';W.style.visibility='visible';},hideTags:function(arg){var sel=document.getElementsByTagName('select');var obj=document.getElementsByTagName('object');var emb=document.getElementsByTagName('embed');var ifr=document.getElementsByTagName('iframe');var vis=(arg)?'visible':'hidden';for(i=0;i<sel.length;i++)sel[i].style.visibility=vis;for(i=0;i<obj.length;i++)obj[i].style.visibility=vis;for(i=0;i<emb.length;i++)emb[i].style.visibility=vis;for(i=0;i<ifr.length;i++)ifr[i].style.visibility=vis;},handleArrowKeys:function(e){var code=0;if(!e)var e=window.event
if(e.keyCode)code=e.keyCode;else if(e.which)code=e.which;var nextlink=document.getElementById('prevpic');var prevlink=document.getElementById('nextpic');var closelink=document.getElementById('shTopImg');switch(code){case 39:if(prevlink)prevlink.onclick();break;case 37:if(nextlink)nextlink.onclick();break;case 27:if(closelink)closelink.onclick();break;}}};(function(a){function r(b){function e(b){for(;b&&b.nodeName.toLowerCase()!="html";b=b.parentNode){var c=a.css(b,"background-color");if(c&&c.indexOf("rgb")>=0){var e=c.match(/\d+/g);return"#"+d(e[0])+d(e[1])+d(e[2])}if(c&&c!="transparent")return c}return"#ffffff"}function d(a){a=parseInt(a,10).toString(16);return a.length<2?"0"+a:a}c("applying clearType background-color hack");b.each(function(){a(this).css("background-color",e(this))})}function q(b,c){var d=a(c.pager);a.each(b,function(e,f){a.fn.cycle.createPagerAnchor(e,f,d,b,c)});c.updateActivePagerLink(c.pager,c.startingSlide,c.activePagerClass)}function o(b,c){var d=c?1:-1;var e=b.elements;var f=b.$cont[0],g=f.cycleTimeout;if(g){clearTimeout(g);f.cycleTimeout=0}if(b.random&&d<0){b.randomIndex--;if(--b.randomIndex==-2)b.randomIndex=e.length-2;else if(b.randomIndex==-1)b.randomIndex=e.length-1;b.nextSlide=b.randomMap[b.randomIndex]}else if(b.random){b.nextSlide=b.randomMap[b.randomIndex]}else{b.nextSlide=b.currSlide+d;if(b.nextSlide<0){if(b.nowrap)return false;b.nextSlide=e.length-1}else if(b.nextSlide>=e.length){if(b.nowrap)return false;b.nextSlide=0}}var h=b.onPrevNextEvent||b.prevNextClick;if(a.isFunction(h))h(d>0,b.nextSlide,e[b.nextSlide]);m(e,b,1,c);return false}function n(a,b,d,e){if(d.timeoutFn){var f=d.timeoutFn.call(a,a,b,d,e);while(d.fx!="none"&&f-d.speed<250)f+=d.speed;c("calculated timeout: "+f+"; speed: "+d.speed);if(f!==false)return f}return d.timeout}function m(b,d,e,f){if(e&&d.busy&&d.manualTrump){c("manualTrump in go(), stopping active transition");a(b).stop(true,true);d.busy=0}if(d.busy){c("transition active, ignoring new tx request");return}var g=d.$cont[0],h=b[d.currSlide],i=b[d.nextSlide];if(g.cycleStop!=d.stopCount||g.cycleTimeout===0&&!e)return;if(!e&&!g.cyclePause&&!d.bounce&&(d.autostop&&--d.countdown<=0||d.nowrap&&!d.random&&d.nextSlide<d.currSlide)){if(d.end)d.end(d);return}var j=false;if((e||!g.cyclePause)&&d.nextSlide!=d.currSlide){j=true;var k=d.fx;h.cycleH=h.cycleH||a(h).height();h.cycleW=h.cycleW||a(h).width();i.cycleH=i.cycleH||a(i).height();i.cycleW=i.cycleW||a(i).width();if(d.multiFx){if(f&&(d.lastFx==undefined||++d.lastFx>=d.fxs.length))d.lastFx=0;else if(!f&&(d.lastFx==undefined||--d.lastFx<0))d.lastFx=d.fxs.length-1;k=d.fxs[d.lastFx]}if(d.oneTimeFx){k=d.oneTimeFx;d.oneTimeFx=null}a.fn.cycle.resetState(d,k);if(d.before.length)a.each(d.before,function(a,b){if(g.cycleStop!=d.stopCount)return;b.apply(i,[h,i,d,f])});var l=function(){d.busy=0;a.each(d.after,function(a,b){if(g.cycleStop!=d.stopCount)return;b.apply(i,[h,i,d,f])})};c("tx firing("+k+"); currSlide: "+d.currSlide+"; nextSlide: "+d.nextSlide);d.busy=1;if(d.fxFn)d.fxFn(h,i,d,l,f,e&&d.fastOnEvent);else if(a.isFunction(a.fn.cycle[d.fx]))a.fn.cycle[d.fx](h,i,d,l,f,e&&d.fastOnEvent);else a.fn.cycle.custom(h,i,d,l,f,e&&d.fastOnEvent)}if(j||d.nextSlide==d.currSlide){d.lastSlide=d.currSlide;if(d.random){d.currSlide=d.nextSlide;if(++d.randomIndex==b.length)d.randomIndex=0;d.nextSlide=d.randomMap[d.randomIndex];if(d.nextSlide==d.currSlide)d.nextSlide=d.currSlide==d.slideCount-1?0:d.currSlide+1}else if(d.backwards){var o=d.nextSlide-1<0;if(o&&d.bounce){d.backwards=!d.backwards;d.nextSlide=1;d.currSlide=0}else{d.nextSlide=o?b.length-1:d.nextSlide-1;d.currSlide=o?0:d.nextSlide+1}}else{var o=d.nextSlide+1==b.length;if(o&&d.bounce){d.backwards=!d.backwards;d.nextSlide=b.length-2;d.currSlide=b.length-1}else{d.nextSlide=o?0:d.nextSlide+1;d.currSlide=o?b.length-1:d.nextSlide-1}}}if(j&&d.pager)d.updateActivePagerLink(d.pager,d.currSlide,d.activePagerClass);var p=0;if(d.timeout&&!d.continuous)p=n(b[d.currSlide],b[d.nextSlide],d,f);else if(d.continuous&&g.cyclePause)p=10;if(p>0)g.cycleTimeout=setTimeout(function(){m(b,d,0,!d.backwards)},p)}function l(b,c){b.addSlide=function(d,e){var f=a(d),g=f[0];if(!b.autostopCount)b.countdown++;c[e?"unshift":"push"](g);if(b.els)b.els[e?"unshift":"push"](g);b.slideCount=c.length;f.css("position","absolute");f[e?"prependTo":"appendTo"](b.$cont);if(e){b.currSlide++;b.nextSlide++}if(!a.support.opacity&&b.cleartype&&!b.cleartypeNoBg)r(f);if(b.fit&&b.width)f.width(b.width);if(b.fit&&b.height&&b.height!="auto")f.height(b.height);g.cycleH=b.fit&&b.height?b.height:f.height();g.cycleW=b.fit&&b.width?b.width:f.width();f.css(b.cssBefore);if(b.pager||b.pagerAnchorBuilder)a.fn.cycle.createPagerAnchor(c.length-1,g,a(b.pager),c,b);if(a.isFunction(b.onAddSlide))b.onAddSlide(f);else f.hide()}}function k(b){var e,f,g=a.fn.cycle.transitions;if(b.fx.indexOf(",")>0){b.multiFx=true;b.fxs=b.fx.replace(/\s*/g,"").split(",");for(e=0;e<b.fxs.length;e++){var h=b.fxs[e];f=g[h];if(!f||!g.hasOwnProperty(h)||!a.isFunction(f)){d("discarding unknown transition: ",h);b.fxs.splice(e,1);e--}}if(!b.fxs.length){d("No valid transitions named; slideshow terminating.");return false}}else if(b.fx=="all"){b.multiFx=true;b.fxs=[];for(p in g){f=g[p];if(g.hasOwnProperty(p)&&a.isFunction(f))b.fxs.push(p)}}if(b.multiFx&&b.randomizeEffects){var i=Math.floor(Math.random()*20)+30;for(e=0;e<i;e++){var j=Math.floor(Math.random()*b.fxs.length);b.fxs.push(b.fxs.splice(j,1)[0])}c("randomized fx sequence: ",b.fxs)}return true}function j(b){b.original={before:[],after:[]};b.original.cssBefore=a.extend({},b.cssBefore);b.original.cssAfter=a.extend({},b.cssAfter);b.original.animIn=a.extend({},b.animIn);b.original.animOut=a.extend({},b.animOut);a.each(b.before,function(){b.original.before.push(this)});a.each(b.after,function(){b.original.after.push(this)})}function i(b,c,f,h,i){var n=a.extend({},a.fn.cycle.defaults,h||{},a.metadata?b.metadata():a.meta?b.data():{});var p=a.isFunction(b.data)?b.data(n.metaAttr):null;if(p)n=a.extend(n,p);if(n.autostop)n.countdown=n.autostopCount||f.length;var s=b[0];b.data("cycle.opts",n);n.$cont=b;n.stopCount=s.cycleStop;n.elements=f;n.before=n.before?[n.before]:[];n.after=n.after?[n.after]:[];if(!a.support.opacity&&n.cleartype)n.after.push(function(){g(this,n)});if(n.continuous)n.after.push(function(){m(f,n,0,!n.backwards)});j(n);if(!a.support.opacity&&n.cleartype&&!n.cleartypeNoBg)r(c);if(b.css("position")=="static")b.css("position","relative");if(n.width)b.width(n.width);if(n.height&&n.height!="auto")b.height(n.height);if(n.startingSlide)n.startingSlide=parseInt(n.startingSlide,10);else if(n.backwards)n.startingSlide=f.length-1;if(n.random){n.randomMap=[];for(var t=0;t<f.length;t++)n.randomMap.push(t);n.randomMap.sort(function(a,b){return Math.random()-.5});n.randomIndex=1;n.startingSlide=n.randomMap[1]}else if(n.startingSlide>=f.length)n.startingSlide=0;n.currSlide=n.startingSlide||0;var u=n.startingSlide;c.css({position:"absolute",top:0,left:0}).hide().each(function(b){var c;if(n.backwards)c=u?b<=u?f.length+(b-u):u-b:f.length-b;else c=u?b>=u?f.length-(b-u):u-b:f.length-b;a(this).css("z-index",c)});a(f[u]).css("opacity",1).show();g(f[u],n);if(n.fit){if(!n.aspect){if(n.width)c.width(n.width);if(n.height&&n.height!="auto")c.height(n.height)}else{c.each(function(){var b=a(this);var c=n.aspect===true?b.width()/b.height():n.aspect;if(n.width&&b.width()!=n.width){b.width(n.width);b.height(n.width/c)}if(n.height&&b.height()<n.height){b.height(n.height);b.width(n.height*c)}})}}if(n.center&&(!n.fit||n.aspect)){c.each(function(){var b=a(this);b.css({"margin-left":n.width?(n.width-b.width())/2+"px":0,"margin-top":n.height?(n.height-b.height())/2+"px":0})})}if(n.center&&!n.fit&&!n.slideResize){c.each(function(){var b=a(this);b.css({"margin-left":n.width?(n.width-b.width())/2+"px":0,"margin-top":n.height?(n.height-b.height())/2+"px":0})})}var v=n.containerResize&&!b.innerHeight();if(v){var w=0,x=0;for(var y=0;y<f.length;y++){var z=a(f[y]),A=z[0],B=z.outerWidth(),C=z.outerHeight();if(!B)B=A.offsetWidth||A.width||z.attr("width");if(!C)C=A.offsetHeight||A.height||z.attr("height");w=B>w?B:w;x=C>x?C:x}if(w>0&&x>0)b.css({width:w+"px",height:x+"px"})}var D=false;if(n.pause)b.hover(function(){D=true;this.cyclePause++;e(s,true)},function(){D&&this.cyclePause--;e(s,true)});if(k(n)===false)return false;var E=false;h.requeueAttempts=h.requeueAttempts||0;c.each(function(){var b=a(this);this.cycleH=n.fit&&n.height?n.height:b.height()||this.offsetHeight||this.height||b.attr("height")||0;this.cycleW=n.fit&&n.width?n.width:b.width()||this.offsetWidth||this.width||b.attr("width")||0;if(b.is("img")){var c=a.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete;var e=a.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete;var f=a.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete;var g=this.cycleH==0&&this.cycleW==0&&!this.complete;if(c||e||f||g){if(i.s&&n.requeueOnImageNotLoaded&&++h.requeueAttempts<100){d(h.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){a(i.s,i.c).cycle(h)},n.requeueTimeout);E=true;return false}else{d("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(E)return false;n.cssBefore=n.cssBefore||{};n.cssAfter=n.cssAfter||{};n.cssFirst=n.cssFirst||{};n.animIn=n.animIn||{};n.animOut=n.animOut||{};c.not(":eq("+u+")").css(n.cssBefore);a(c[u]).css(n.cssFirst);if(n.timeout){n.timeout=parseInt(n.timeout,10);if(n.speed.constructor==String)n.speed=a.fx.speeds[n.speed]||parseInt(n.speed,10);if(!n.sync)n.speed=n.speed/2;var F=n.fx=="none"?0:n.fx=="shuffle"?500:250;while(n.timeout-n.speed<F)n.timeout+=n.speed}if(n.easing)n.easeIn=n.easeOut=n.easing;if(!n.speedIn)n.speedIn=n.speed;if(!n.speedOut)n.speedOut=n.speed;n.slideCount=f.length;n.currSlide=n.lastSlide=u;if(n.random){if(++n.randomIndex==f.length)n.randomIndex=0;n.nextSlide=n.randomMap[n.randomIndex]}else if(n.backwards)n.nextSlide=n.startingSlide==0?f.length-1:n.startingSlide-1;else n.nextSlide=n.startingSlide>=f.length-1?0:n.startingSlide+1;if(!n.multiFx){var G=a.fn.cycle.transitions[n.fx];if(a.isFunction(G))G(b,c,n);else if(n.fx!="custom"&&!n.multiFx){d("unknown transition: "+n.fx,"; slideshow terminating");return false}}var H=c[u];if(!n.skipInitializationCallbacks){if(n.before.length)n.before[0].apply(H,[H,H,n,true]);if(n.after.length)n.after[0].apply(H,[H,H,n,true])}if(n.next)a(n.next).bind(n.prevNextEvent,function(){return o(n,1)});if(n.prev)a(n.prev).bind(n.prevNextEvent,function(){return o(n,0)});if(n.pager||n.pagerAnchorBuilder)q(f,n);l(n,f);return n}function h(b){if(b.next)a(b.next).unbind(b.prevNextEvent);if(b.prev)a(b.prev).unbind(b.prevNextEvent);if(b.pager||b.pagerAnchorBuilder)a.each(b.pagerAnchors||[],function(){this.unbind().remove()});b.pagerAnchors=null;if(b.destroy)b.destroy(b)}function g(b,c){if(!a.support.opacity&&c.cleartype&&b.style.filter){try{b.style.removeAttribute("filter")}catch(d){}}}function f(b,c,f){function j(b,c,e){if(!b&&c===true){var f=a(e).data("cycle.opts");if(!f){d("options not found, can not resume");return false}if(e.cycleTimeout){clearTimeout(e.cycleTimeout);e.cycleTimeout=0}m(f.elements,f,1,!f.backwards)}}if(b.cycleStop==undefined)b.cycleStop=0;if(c===undefined||c===null)c={};if(c.constructor==String){switch(c){case"destroy":case"stop":var g=a(b).data("cycle.opts");if(!g)return false;b.cycleStop++;if(b.cycleTimeout)clearTimeout(b.cycleTimeout);b.cycleTimeout=0;g.elements&&a(g.elements).stop();a(b).removeData("cycle.opts");if(c=="destroy")h(g);return false;case"toggle":b.cyclePause=b.cyclePause===1?0:1;j(b.cyclePause,f,b);e(b);return false;case"pause":b.cyclePause=1;e(b);return false;case"resume":b.cyclePause=0;j(false,f,b);e(b);return false;case"prev":case"next":var g=a(b).data("cycle.opts");if(!g){d('options not found, "prev/next" ignored');return false}a.fn.cycle[c](g);return false;default:c={fx:c}}return c}else if(c.constructor==Number){var i=c;c=a(b).data("cycle.opts");if(!c){d("options not found, can not advance slide");return false}if(i<0||i>=c.elements.length){d("invalid slide index: "+i);return false}c.nextSlide=i;if(b.cycleTimeout){clearTimeout(b.cycleTimeout);b.cycleTimeout=0}if(typeof f=="string")c.oneTimeFx=f;m(c.elements,c,1,i>=c.currSlide);return false}return c}function e(b,c,d){var e=a(b).data("cycle.opts");var f=!!b.cyclePause;if(f&&e.paused)e.paused(b,e,c,d);else if(!f&&e.resumed)e.resumed(b,e,c,d)}function d(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function c(b){a.fn.cycle.debug&&d(b)}var b="2.9995";if(a.support==undefined){a.support={opacity:!a.browser.msie}}a.expr[":"].paused=function(a){return a.cyclePause};a.fn.cycle=function(b,e){var g={s:this.selector,c:this.context};if(this.length===0&&b!="stop"){if(!a.isReady&&g.s){d("DOM not ready, queuing slideshow");a(function(){a(g.s,g.c).cycle(b,e)});return this}d("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var h=f(this,b,e);if(h===false)return;h.updateActivePagerLink=h.updateActivePagerLink||a.fn.cycle.updateActivePagerLink;if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var j=a(this);var k=h.slideExpr?a(h.slideExpr,this):j.children();var l=k.get();var o=i(j,k,l,h,g);if(o===false)return;if(l.length<2){d("terminating; too few slides: "+l.length);return}var p=o.continuous?10:n(l[o.currSlide],l[o.nextSlide],o,!o.backwards);if(p){p+=o.delay||0;if(p<10)p=10;c("first timeout: "+p);this.cycleTimeout=setTimeout(function(){m(l,o,0,!h.backwards)},p)}})};a.fn.cycle.resetState=function(b,c){c=c||b.fx;b.before=[];b.after=[];b.cssBefore=a.extend({},b.original.cssBefore);b.cssAfter=a.extend({},b.original.cssAfter);b.animIn=a.extend({},b.original.animIn);b.animOut=a.extend({},b.original.animOut);b.fxFn=null;a.each(b.original.before,function(){b.before.push(this)});a.each(b.original.after,function(){b.after.push(this)});var d=a.fn.cycle.transitions[c];if(a.isFunction(d))d(b.$cont,a(b.elements),b)};a.fn.cycle.updateActivePagerLink=function(b,c,d){a(b).each(function(){a(this).children().removeClass(d).eq(c).addClass(d)})};a.fn.cycle.next=function(a){o(a,1)};a.fn.cycle.prev=function(a){o(a,0)};a.fn.cycle.createPagerAnchor=function(b,d,f,g,h){var i;if(a.isFunction(h.pagerAnchorBuilder)){i=h.pagerAnchorBuilder(b,d);c("pagerAnchorBuilder("+b+", el) returned: "+i)}else i='<a href="#">'+(b+1)+"</a>";if(!i)return;var j=a(i);if(j.parents("body").length===0){var k=[];if(f.length>1){f.each(function(){var b=j.clone(true);a(this).append(b);k.push(b[0])});j=a(k)}else{j.appendTo(f)}}h.pagerAnchors=h.pagerAnchors||[];h.pagerAnchors.push(j);var l=function(c){c.preventDefault();h.nextSlide=b;var d=h.$cont[0],e=d.cycleTimeout;if(e){clearTimeout(e);d.cycleTimeout=0}var f=h.onPagerEvent||h.pagerClick;if(a.isFunction(f))f(h.nextSlide,g[h.nextSlide]);m(g,h,1,h.currSlide<b)};if(/mouseenter|mouseover/i.test(h.pagerEvent)){j.hover(l,function(){})}else{j.bind(h.pagerEvent,l)}if(!/^click/.test(h.pagerEvent)&&!h.allowPagerClickBubble)j.bind("click.cycle",function(){return false});var n=h.$cont[0];var o=false;if(h.pauseOnPagerHover){j.hover(function(){o=true;n.cyclePause++;e(n,true,true)},function(){o&&n.cyclePause--;e(n,true,true)})}};a.fn.cycle.hopsFromLast=function(a,b){var c,d=a.lastSlide,e=a.currSlide;if(b)c=e>d?e-d:a.slideCount-d;else c=e<d?d-e:d+a.slideCount-e;return c};a.fn.cycle.commonReset=function(b,c,d,e,f,g){a(d.elements).not(b).hide();if(typeof d.cssBefore.opacity=="undefined")d.cssBefore.opacity=1;d.cssBefore.display="block";if(d.slideResize&&e!==false&&c.cycleW>0)d.cssBefore.width=c.cycleW;if(d.slideResize&&f!==false&&c.cycleH>0)d.cssBefore.height=c.cycleH;d.cssAfter=d.cssAfter||{};d.cssAfter.display="none";a(b).css("zIndex",d.slideCount+(g===true?1:0));a(c).css("zIndex",d.slideCount+(g===true?0:1))};a.fn.cycle.custom=function(b,c,d,e,f,g){var h=a(b),i=a(c);var j=d.speedIn,k=d.speedOut,l=d.easeIn,m=d.easeOut;i.css(d.cssBefore);if(g){if(typeof g=="number")j=k=g;else j=k=1;l=m=null}var n=function(){i.animate(d.animIn,j,l,function(){e()})};h.animate(d.animOut,k,m,function(){h.css(d.cssAfter);if(!d.sync)n()});if(d.sync)n()};a.fn.cycle.transitions={fade:function(b,c,d){c.not(":eq("+d.currSlide+")").css("opacity",0);d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d);d.cssBefore.opacity=0});d.animIn={opacity:1};d.animOut={opacity:0};d.cssBefore={top:0,left:0}}};a.fn.cycle.ver=function(){return b};a.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,aspect:false,autostop:0,autostopCount:0,backwards:false,before:null,center:null,cleartype:!a.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:false,slideExpr:null,slideResize:1,speed:1e3,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4e3,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery);(function(a){a.fn.cycle.transitions.none=function(b,c,d){d.fxFn=function(b,c,d,e){a(c).show();a(b).hide();e()}};a.fn.cycle.transitions.fadeout=function(b,c,d){c.not(":eq("+d.currSlide+")").css({display:"block",opacity:1});d.before.push(function(b,c,d,e,f,g){a(b).css("zIndex",d.slideCount+(!g===true?1:0));a(c).css("zIndex",d.slideCount+(!g===true?0:1))});d.animIn.opacity=1;d.animOut.opacity=0;d.cssBefore.opacity=1;d.cssBefore.display="block";d.cssAfter.zIndex=0};a.fn.cycle.transitions.scrollUp=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.height();d.cssBefore.top=e;d.cssBefore.left=0;d.cssFirst.top=0;d.animIn.top=0;d.animOut.top=-e};a.fn.cycle.transitions.scrollDown=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.height();d.cssFirst.top=0;d.cssBefore.top=-e;d.cssBefore.left=0;d.animIn.top=0;d.animOut.top=e};a.fn.cycle.transitions.scrollLeft=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst.left=0;d.cssBefore.left=e;d.cssBefore.top=0;d.animIn.left=0;d.animOut.left=0-e};a.fn.cycle.transitions.scrollRight=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst.left=0;d.cssBefore.left=-e;d.cssBefore.top=0;d.animIn.left=0;d.animOut.left=e};a.fn.cycle.transitions.scrollHorz=function(b,c,d){b.css("overflow","hidden").width();d.before.push(function(b,c,d,e){if(d.rev)e=!e;a.fn.cycle.commonReset(b,c,d);d.cssBefore.left=e?c.cycleW-1:1-c.cycleW;d.animOut.left=e?-b.cycleW:b.cycleW});d.cssFirst.left=0;d.cssBefore.top=0;d.animIn.left=0;d.animOut.top=0};a.fn.cycle.transitions.scrollVert=function(b,c,d){b.css("overflow","hidden");d.before.push(function(b,c,d,e){if(d.rev)e=!e;a.fn.cycle.commonReset(b,c,d);d.cssBefore.top=e?1-c.cycleH:c.cycleH-1;d.animOut.top=e?b.cycleH:-b.cycleH});d.cssFirst.top=0;d.cssBefore.left=0;d.animIn.top=0;d.animOut.left=0};a.fn.cycle.transitions.slideX=function(b,c,d){d.before.push(function(b,c,d){a(d.elements).not(b).hide();a.fn.cycle.commonReset(b,c,d,false,true);d.animIn.width=c.cycleW});d.cssBefore.left=0;d.cssBefore.top=0;d.cssBefore.width=0;d.animIn.width="show";d.animOut.width=0};a.fn.cycle.transitions.slideY=function(b,c,d){d.before.push(function(b,c,d){a(d.elements).not(b).hide();a.fn.cycle.commonReset(b,c,d,true,false);d.animIn.height=c.cycleH});d.cssBefore.left=0;d.cssBefore.top=0;d.cssBefore.height=0;d.animIn.height="show";d.animOut.height=0};a.fn.cycle.transitions.shuffle=function(b,c,d){var e,f=b.css("overflow","visible").width();c.css({left:0,top:0});d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,true,true)});if(!d.speedAdjusted){d.speed=d.speed/2;d.speedAdjusted=true}d.random=0;d.shuffle=d.shuffle||{left:-f,top:15};d.els=[];for(e=0;e<c.length;e++)d.els.push(c[e]);for(e=0;e<d.currSlide;e++)d.els.push(d.els.shift());d.fxFn=function(b,c,d,e,f){if(d.rev)f=!f;var g=f?a(b):a(c);a(c).css(d.cssBefore);var h=d.slideCount;g.animate(d.shuffle,d.speedIn,d.easeIn,function(){var c=a.fn.cycle.hopsFromLast(d,f);for(var i=0;i<c;i++)f?d.els.push(d.els.shift()):d.els.unshift(d.els.pop());if(f){for(var j=0,k=d.els.length;j<k;j++)a(d.els[j]).css("z-index",k-j+h)}else{var l=a(b).css("z-index");g.css("z-index",parseInt(l,10)+1+h)}g.animate({left:0,top:0},d.speedOut,d.easeOut,function(){a(f?this:b).hide();if(e)e()})})};a.extend(d.cssBefore,{display:"block",opacity:1,top:0,left:0})};a.fn.cycle.transitions.turnUp=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,false);d.cssBefore.top=c.cycleH;d.animIn.height=c.cycleH;d.animOut.width=c.cycleW});d.cssFirst.top=0;d.cssBefore.left=0;d.cssBefore.height=0;d.animIn.top=0;d.animOut.height=0};a.fn.cycle.transitions.turnDown=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,false);d.animIn.height=c.cycleH;d.animOut.top=b.cycleH});d.cssFirst.top=0;d.cssBefore.left=0;d.cssBefore.top=0;d.cssBefore.height=0;d.animOut.height=0};a.fn.cycle.transitions.turnLeft=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,true);d.cssBefore.left=c.cycleW;d.animIn.width=c.cycleW});d.cssBefore.top=0;d.cssBefore.width=0;d.animIn.left=0;d.animOut.width=0};a.fn.cycle.transitions.turnRight=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,true);d.animIn.width=c.cycleW;d.animOut.left=b.cycleW});a.extend(d.cssBefore,{top:0,left:0,width:0});d.animIn.left=0;d.animOut.width=0};a.fn.cycle.transitions.zoom=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,false,true);d.cssBefore.top=c.cycleH/2;d.cssBefore.left=c.cycleW/2;a.extend(d.animIn,{top:0,left:0,width:c.cycleW,height:c.cycleH});a.extend(d.animOut,{width:0,height:0,top:b.cycleH/2,left:b.cycleW/2})});d.cssFirst.top=0;d.cssFirst.left=0;d.cssBefore.width=0;d.cssBefore.height=0};a.fn.cycle.transitions.fadeZoom=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,false);d.cssBefore.left=c.cycleW/2;d.cssBefore.top=c.cycleH/2;a.extend(d.animIn,{top:0,left:0,width:c.cycleW,height:c.cycleH})});d.cssBefore.width=0;d.cssBefore.height=0;d.animOut.opacity=0};a.fn.cycle.transitions.blindX=function(b,c,d){var e=b.css("overflow","hidden").width();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d);d.animIn.width=c.cycleW;d.animOut.left=b.cycleW});d.cssBefore.left=e;d.cssBefore.top=0;d.animIn.left=0;d.animOut.left=e};a.fn.cycle.transitions.blindY=function(b,c,d){var e=b.css("overflow","hidden").height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d);d.animIn.height=c.cycleH;d.animOut.top=b.cycleH});d.cssBefore.top=e;d.cssBefore.left=0;d.animIn.top=0;d.animOut.top=e};a.fn.cycle.transitions.blindZ=function(b,c,d){var e=b.css("overflow","hidden").height();var f=b.width();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d);d.animIn.height=c.cycleH;d.animOut.top=b.cycleH});d.cssBefore.top=e;d.cssBefore.left=f;d.animIn.top=0;d.animIn.left=0;d.animOut.top=e;d.animOut.left=f};a.fn.cycle.transitions.growX=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,true);d.cssBefore.left=this.cycleW/2;d.animIn.left=0;d.animIn.width=this.cycleW;d.animOut.left=0});d.cssBefore.top=0;d.cssBefore.width=0};a.fn.cycle.transitions.growY=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,false);d.cssBefore.top=this.cycleH/2;d.animIn.top=0;d.animIn.height=this.cycleH;d.animOut.top=0});d.cssBefore.height=0;d.cssBefore.left=0};a.fn.cycle.transitions.curtainX=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,true,true);d.cssBefore.left=c.cycleW/2;d.animIn.left=0;d.animIn.width=this.cycleW;d.animOut.left=b.cycleW/2;d.animOut.width=0});d.cssBefore.top=0;d.cssBefore.width=0};a.fn.cycle.transitions.curtainY=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,false,true);d.cssBefore.top=c.cycleH/2;d.animIn.top=0;d.animIn.height=c.cycleH;d.animOut.top=b.cycleH/2;d.animOut.height=0});d.cssBefore.height=0;d.cssBefore.left=0};a.fn.cycle.transitions.cover=function(b,c,d){var e=d.direction||"left";var f=b.css("overflow","hidden").width();var g=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d);if(e=="right")d.cssBefore.left=-f;else if(e=="up")d.cssBefore.top=g;else if(e=="down")d.cssBefore.top=-g;else d.cssBefore.left=f});d.animIn.left=0;d.animIn.top=0;d.cssBefore.top=0;d.cssBefore.left=0};a.fn.cycle.transitions.uncover=function(b,c,d){var e=d.direction||"left";var f=b.css("overflow","hidden").width();var g=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,true,true);if(e=="right")d.animOut.left=f;else if(e=="up")d.animOut.top=-g;else if(e=="down")d.animOut.top=g;else d.animOut.left=-f});d.animIn.left=0;d.animIn.top=0;d.cssBefore.top=0;d.cssBefore.left=0};a.fn.cycle.transitions.toss=function(b,c,d){var e=b.css("overflow","visible").width();var f=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,true,true);if(!d.animOut.left&&!d.animOut.top)a.extend(d.animOut,{left:e*2,top:-f/2,opacity:0});else d.animOut.opacity=0});d.cssBefore.left=0;d.cssBefore.top=0;d.animIn.left=0};a.fn.cycle.transitions.wipe=function(b,c,d){var e=b.css("overflow","hidden").width();var f=b.height();d.cssBefore=d.cssBefore||{};var g;if(d.clip){if(/l2r/.test(d.clip))g="rect(0px 0px "+f+"px 0px)";else if(/r2l/.test(d.clip))g="rect(0px "+e+"px "+f+"px "+e+"px)";else if(/t2b/.test(d.clip))g="rect(0px "+e+"px 0px 0px)";else if(/b2t/.test(d.clip))g="rect("+f+"px "+e+"px "+f+"px 0px)";else if(/zoom/.test(d.clip)){var h=parseInt(f/2,10);var i=parseInt(e/2,10);g="rect("+h+"px "+i+"px "+h+"px "+i+"px)"}}d.cssBefore.clip=d.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var j=d.cssBefore.clip.match(/(\d+)/g);var k=parseInt(j[0],10),l=parseInt(j[1],10),m=parseInt(j[2],10),n=parseInt(j[3],10);d.before.push(function(b,c,d){if(b==c)return;var g=a(b),h=a(c);a.fn.cycle.commonReset(b,c,d,true,true,false);d.cssAfter.display="block";var i=1,j=parseInt(d.speedIn/13,10)-1;(function o(){var a=k?k-parseInt(i*(k/j),10):0;var b=n?n-parseInt(i*(n/j),10):0;var c=m<f?m+parseInt(i*((f-m)/j||1),10):f;var d=l<e?l+parseInt(i*((e-l)/j||1),10):e;h.css({clip:"rect("+a+"px "+d+"px "+c+"px "+b+"px)"});i++<=j?setTimeout(o,13):g.css("display","none")})()});a.extend(d.cssBefore,{display:"block",opacity:1,top:0,left:0});d.animIn={left:0};d.animOut={left:0}}})(jQuery);jQuery.fn.nggSlideshow=function(args){var defaults={id:1,width:320,height:240,fx:'fade',domain:'',timeout:5000};var s=jQuery.extend({},defaults,args);var obj=this.selector;var stack=[];var url=s.domain+'index.php?callback=json&api_key=true&format=json&method=gallery&id='+s.id;var stackLength=0;jQuery.getJSON(url,function(r){if(r.stat=="ok"){for(img in r.images){var photo=r.images[img];stack.push(decodeURI(photo['imageURL']));}
stackLength=stack.length;loadImage(1);}});function loadImage(num){if(stackLength>0&&num<=3){var img=new Image();img.src=stack.shift();stackLength--;jQuery(img).bind('load',function(){appendImage(img,num);});}}
function appendImage(img,num){jQuery(img).hide();jQuery(obj).append(imageResize(img,s.width,s.height));if(num==3||stackLength==0){startSlideshow();}else{loadImage(++num);}}
function startSlideshow(){jQuery(obj+'-loader').empty().remove();jQuery(obj+' img:first').fadeIn(1000,function(){jQuery(obj).cycle({fx:s.fx,containerResize:1,fit:1,timeout:s.timeout,next:obj,before:jCycle_onBefore});});}
function imageResize(img,maxWidth,maxHeight){if(!img.complete)
jQuery(img).bind('load',function(){imageResize(img,maxWidth,maxHeight)});if(img.height==0||img.width==0)
return img;var width,height;if(img.width*maxHeight>img.height*maxWidth){if(img.width>maxWidth){width=maxWidth;height=Math.round(img.height/img.width*maxWidth);}}else{if(img.height>maxHeight){height=maxHeight;width=Math.round(img.width/img.height*maxHeight);}}
jQuery(img).css({'height':height,'width':width});return img;};function jCycle_onBefore(curr,next,opts){if(opts.addSlide)
if(stackLength>0){var img=new Image();img.src=stack.shift();stackLength--;jQuery(img).bind('load',function(){opts.addSlide(imageResize(this,s.width,s.height));});}};}
