﻿/*!
 * jQuery JavaScript Library v1.6.1
 * http://jquery.com/
 *
 * Copyright 2011, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2011, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Thu May 12 15:04:36 2011 -0400
 */
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!cj[a]){var b=f("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),c.body.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write("<!doctype><html><body></body></html>");b=cl.createElement(a),cl.body.appendChild(b),d=f.css(b,"display"),c.body.removeChild(ck)}cj[a]=d}return cj[a]}function cu(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function ct(){cq=b}function cs(){setTimeout(ct,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(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 ca(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 b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bF.test(a)?d(a,e):b_(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}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===bU,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(bQ),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 bD(a,b,c){var d=b==="width"?bx:by,e=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return e;f.each(d,function(){c||(e-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?e+=parseFloat(f.css(a,"margin"+this))||0:e-=parseFloat(f.css(a,"border"+this+"Width"))||0});return e}function bn(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 bm(a){f.nodeName(a,"input")?bl(a):a.getElementsByTagName&&f.grep(a.getElementsByTagName("input"),bl)}function bl(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bk(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bj(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 bi(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bh(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function X(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(S.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 W(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function O(a,b){return(a&&a!=="*"?a+".":"")+b.replace(A,"`").replace(B,"&")}function N(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(y,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function L(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function F(){return!0}function E(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function H(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(H,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=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=d.userAgent,x,y,z,A=Object.prototype.toString,B=Object.prototype.hasOwnProperty,C=Array.prototype.push,D=Array.prototype.slice,E=String.prototype.trim,F=Array.prototype.indexOf,G={};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=n.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.6.1",length:0,size:function(){return this.length},toArray:function(){return D.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)?C.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(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(D.apply(this,arguments),"slice",D.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:C,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;y.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!y){y=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",z,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",z),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&H()}}},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},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):G[A.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!B.call(a,"constructor")&&!B.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||B.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw 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(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},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:E?function(a){return a==null?"":E.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)?C.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(F)return F.call(b,a);for(var c=0,d=b.length;c<d;c++)if(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=D.call(arguments,2),g=function(){return a.apply(c,f.concat(D.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=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.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){G["[object "+b+"]"]=b.toLowerCase()}),x=e.uaMatch(w),x.browser&&(e.browser[x.browser]=!0,e.browser.version=x.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?z=function(){c.removeEventListener("DOMContentLoaded",z,!1),e.ready()}:c.attachEvent&&(z=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",z),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;a.setAttribute("className","t"),a.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};f=c.createElement("select"),g=f.appendChild(c.createElement("option")),h=a.getElementsByTagName("input")[0],j={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.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:h.value==="on",optSelected:g.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},h.checked=!0,j.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,j.optDisabled=!g.disabled;try{delete a.test}catch(s){j.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function b(){j.noCloneEvent=!1,a.detachEvent("onclick",b)}),a.cloneNode(!0).fireEvent("onclick")),h=c.createElement("input"),h.value="t",h.setAttribute("type","radio"),j.radioValue=h.value==="t",h.setAttribute("checked","checked"),a.appendChild(h),k=c.createDocumentFragment(),k.appendChild(a.firstChild),j.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",l=c.createElement("body"),m={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(q in m)l.style[q]=m[q];l.appendChild(a),b.insertBefore(l,b.firstChild),j.appendChecked=h.checked,j.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,j.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",j.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",n=a.getElementsByTagName("td"),r=n[0].offsetHeight===0,n[0].style.display="",n[1].style.display="none",j.reliableHiddenOffsets=r&&n[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(i=c.createElement("div"),i.style.width="0",i.style.marginRight="0",a.appendChild(i),j.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(i,null)||{marginRight:0}).marginRight,10)||0)===0),l.innerHTML="",b.removeChild(l);if(a.attachEvent)for(q in{submit:1,change:1,focusin:1})p="on"+q,r=p in a,r||(a.setAttribute(p,"return;"),r=typeof a[p]=="function"),j[q+"Bubbles"]=r;return j}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([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&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=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=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},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"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(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(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},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._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:/,v,w;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){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.addClass(a.call(this,b,c.attr("class")||""))});if(a&&typeof a=="string"){var b=(a||"").split(o);for(var c=0,d=this.length;c<d;c++){var e=this[c];if(e.nodeType===1)if(!e.className)e.className=a;else{var g=" "+e.className+" ",h=e.className;for(var i=0,j=b.length;i<j;i++)g.indexOf(" "+b[i]+" ")<0&&(h+=" "+b[i]);e.className=f.trim(h)}}}return this},removeClass:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a=="string"||a===b){var c=(a||"").split(o);for(var d=0,e=this.length;d<e;d++){var g=this[d];if(g.nodeType===1&&g.className)if(a){var h=(" "+g.className+" ").replace(n," ");for(var 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){var d=f(this);d.toggleClass(a.call(this,c,d.attr("class"),b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);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+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;return(e.value||"").replace(p,"")}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.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}})}}),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=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},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},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);c=j&&f.attrFix[c]||c,i=f.attrHooks[c],i||(!t.test(c)||typeof d!="boolean"&&d!==b&&d.toLowerCase()!==c.toLowerCase()?v&&(f.nodeName(a,"form")||u.test(c))&&(i=v):i=w);if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j)return i.get(a,c);h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.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}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0: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=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);c=i&&f.propFix[c]||c,h=f.propHooks[c];return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return a[f.propFix[c]||c]?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]=b),a.setAttribute(c,c.toLowerCase()));return c}},f.attrHooks.value={get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return a.value},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},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.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)}})),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 x=Object.prototype.hasOwnProperty,y=/\.(.*)$/,z=/^(?:textarea|input|select)$/i,A=/\./g,B=/ /g,C=/[^\w\s.|`]/g,D=function(a){return a.replace(C,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=E;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=E);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),D).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem
)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,O(a.origType,a.selector),f.extend({},a,{handler:N,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,O(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},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.preventDefault)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()?F:E):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=F;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=F;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=F,this.stopPropagation()},isDefaultPrevented:E,isPropagationStopped:E,isImmediatePropagationStopped:E};var G=function(a){var b=a.relatedTarget;a.type=a.data;try{if(b&&b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&f.event.handle.apply(this,arguments)}catch(d){}},H=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?H:G,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?H:G)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&L("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&L("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var I,J=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},K=function(c){var d=c.target,e,g;if(!!z.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=J(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:K,beforedeactivate:K,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&K.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&K.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",J(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in I)f.event.add(this,c+".specialChange",I[c]);return z.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return z.test(this.nodeName)}},I=f.event.special.change.filters,I.focus=I.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},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)}});var M={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||E,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=y.exec(h),k="",j&&(k=j[0],h=h.replace(y,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,M[h]?(a.push(M[h]+k),h=h+k):h=(M[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+O(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+O(h,m),e)}return this}}),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".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.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&&!j.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&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.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&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,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(i,"")+" ";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(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.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]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),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]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.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!!k(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=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([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}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||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=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":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=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=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(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)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 s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=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}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},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)&&(l.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:[]}},l.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&&(l.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")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[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}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.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 k(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;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var P=/Until$/,Q=/^(?:parents|prevUntil|prevAll)/,R=/,/,S=/^.[^:#\[\.,]*$/,T=Array.prototype.slice,U=f.expr.match.POS,V={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(X(this,a,!1),"not",a)},filter:function(a){return this.pushStack(X(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?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,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=U.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=U.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(l?l.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||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());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(W(c[0])||W(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),g=T.call(arguments);P.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!V[a]?f.unique(e):e,(this.length>1||R.test(d))&&Q.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.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 Y=/ jQuery\d+="(?:\d+|null)"/g,Z=/^\s+/,$=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,_=/<([\w:]+)/,ba=/<tbody/i,bb=/<|&#?\w+;/,bc=/<(?:script|object|embed|option|style)/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,"",""]};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){return this.each(function(){f(this).wrapAll(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(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());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(Y,""):null;if(typeof a=="string"&&!bc.test(a)&&(f.support.leadingWhitespace||!Z.test(a))&&!bg[(_.exec(a)||["",""])[1].toLowerCase()]){a=a.replace($,"<$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?bh(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bn)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bc.test(a[0])&&(f.support.checkClone||!bd.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=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=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bj(a,d),e=bk(a),g=bk(d);for(h=0;e[h];++h)bj(e[h],g[h])}if(b){bi(a,d);if(c){e=bk(a),g=bk(d);for(h=0;e[h];++h)bi(e[h],g[h])}}return d},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(!bb.test(k))k=b.createTextNode(k);else{k=k.replace($,"<$1></$2>");var l=(_.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=ba.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&&Z.test(k)&&o.insertBefore(b.createTextNode(Z.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++)bm(k[i]);else bm(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.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bo=/alpha\([^)]*\)/i,bp=/opacity=([^)]*)/,bq=/-([a-z])/ig,br=/([A-Z]|^ms)/g,bs=/^-?\d+(?:px)?$/i,bt=/^-?\d/,bu=/^[+\-]=/,bv=/[^+\-\.\de]+/g,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB,bC=function(a,b){return b.toUpperCase()};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:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0,widows:!0,orphans:!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;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bu.test(d)&&(d=+d.replace(bv,"")+parseFloat(f.css(a,c))),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]},camelCase:function(a){return a.replace(bq,bC)}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){a.offsetWidth!==0?e=bD(a,b,d):f.swap(a,bw,function(){e=bD(a,b,d)});if(e<=0){e=bz(a,b,b),e==="0px"&&bB&&(e=bB(a,b,b));if(e!=null)return e===""||e==="auto"?"0px":e}if(e<0||e==null){e=a.style[b];return e===""||e==="auto"?"0px":e}return typeof e=="string"?e:e+"px"}},set:function(a,b){if(!bs.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bp.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;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bo.test(g)?g.replace(bo,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,c){var d,e,g;c=c.replace(br,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bs.test(d)&&bt.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),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.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bE=/%20/g,bF=/\[\]$/,bG=/\r?\n/g,bH=/#.*$/,bI=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bJ=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bK=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bL=/^(?:GET|HEAD)$/,bM=/^\/\//,bN=/\?/,bO=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bP=/^(?:select|textarea)/i,bQ=/\s+/,bR=/([?&])_=[^&]*/,bS=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bT=f.fn.load,bU={},bV={},bW,bX;try{bW=e.href}catch(bY){bW=c.createElement("a"),bW.href="",bW=bW.href}bX=bS.exec(bW.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bT)return bT.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(bO,"")).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||bP.test(this.nodeName)||bJ.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(bG,"\r\n")}}):{name:b.name,value:c.replace(bG,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(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?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bW,isLocal:bK.test(bX[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","*":"*/*"},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}},ajaxPrefilter:bZ(bU),ajaxTransport:bZ(bV),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?4:0;var o,r,u,w=l?ca(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=cb(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),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._Deferred(),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=bI.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.done,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(bH,"").replace(bM,bX[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bQ),d.crossDomain==null&&(r=bS.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bX[1]&&r[2]==bX[2]&&(r[3]||(r[1]==="http:"?80:443))==(bX[3]||(bX[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bU,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bL.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bN.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bR,"$1_="+x);d.url=y+(y===d.url?(bN.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]!=="*"?", */*; 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$(bV,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){status<2?w(-1,z):f.error(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)b_(g,a[g],c,e);return d.join("&").replace(bE,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),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&&(cd.test(b.url)||e&&cd.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(cd,l),b.url===j&&(e&&(k=k.replace(cd,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 ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,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,ce&&delete cg[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=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq,cr=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;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);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].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){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){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?(j=cv(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cm.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=cn.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),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,d.old=d.complete,d.complete=function(a){d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this),f.isFunction(d.old)&&d.old.call(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,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cq||cs(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!co&&(cr?(co=1,g=function(){co&&(cr(g),e.tick())},cr(g)):co=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cq||cs(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=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.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),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);f.offset.initialize();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.offset.supportsFixedPosition&&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.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.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.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.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(){return this[0]?parseFloat(f.css(this[0],d,"padding")):null},f.fn["outer"+c]=function(a){return this[0]?parseFloat(f.css(this[0],d,a?"margin":"border")):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];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["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 h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
;;;/*
    http://www.JSON.org/json2.js
    2011-01-18

    Public Domain.

    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.

    See http://www.JSON.org/js.html


    This code should be minified before deployment.
    See http://javascript.crockford.com/jsmin.html

    USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
    NOT CONTROL.


    This file creates a global JSON object containing two methods: stringify
    and parse.

        JSON.stringify(value, replacer, space)
            value       any JavaScript value, usually an object or array.

            replacer    an optional parameter that determines how object
                        values are stringified for objects. It can be a
                        function or an array of strings.

            space       an optional parameter that specifies the indentation
                        of nested structures. If it is omitted, the text will
                        be packed without extra whitespace. If it is a number,
                        it will specify the number of spaces to indent at each
                        level. If it is a string (such as '\t' or '&nbsp;'),
                        it contains the characters used to indent at each level.

            This method produces a JSON text from a JavaScript value.

            When an object value is found, if the object contains a toJSON
            method, its toJSON method will be called and the result will be
            stringified. A toJSON method does not serialize: it returns the
            value represented by the name/value pair that should be serialized,
            or undefined if nothing should be serialized. The toJSON method
            will be passed the key associated with the value, and this will be
            bound to the value

            For example, this would serialize Dates as ISO strings.

                Date.prototype.toJSON = function (key) {
                    function f(n) {
                        // Format integers to have at least two digits.
                        return n < 10 ? '0' + n : n;
                    }

                    return this.getUTCFullYear()   + '-' +
                         f(this.getUTCMonth() + 1) + '-' +
                         f(this.getUTCDate())      + 'T' +
                         f(this.getUTCHours())     + ':' +
                         f(this.getUTCMinutes())   + ':' +
                         f(this.getUTCSeconds())   + 'Z';
                };

            You can provide an optional replacer method. It will be passed the
            key and value of each member, with this bound to the containing
            object. The value that is returned from your method will be
            serialized. If your method returns undefined, then the member will
            be excluded from the serialization.

            If the replacer parameter is an array of strings, then it will be
            used to select the members to be serialized. It filters the results
            such that only members with keys listed in the replacer array are
            stringified.

            Values that do not have JSON representations, such as undefined or
            functions, will not be serialized. Such values in objects will be
            dropped; in arrays they will be replaced with null. You can use
            a replacer function to replace those with JSON values.
            JSON.stringify(undefined) returns undefined.

            The optional space parameter produces a stringification of the
            value that is filled with line breaks and indentation to make it
            easier to read.

            If the space parameter is a non-empty string, then that string will
            be used for indentation. If the space parameter is a number, then
            the indentation will be that many spaces.

            Example:

            text = JSON.stringify(['e', {pluribus: 'unum'}]);
            // text is '["e",{"pluribus":"unum"}]'


            text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
            // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'

            text = JSON.stringify([new Date()], function (key, value) {
                return this[key] instanceof Date ?
                    'Date(' + this[key] + ')' : value;
            });
            // text is '["Date(---current time---)"]'


        JSON.parse(text, reviver)
            This method parses a JSON text to produce an object or array.
            It can throw a SyntaxError exception.

            The optional reviver parameter is a function that can filter and
            transform the results. It receives each of the keys and values,
            and its return value is used instead of the original value.
            If it returns what it received, then the structure is not modified.
            If it returns undefined then the member is deleted.

            Example:

            // Parse the text. Values that look like ISO date strings will
            // be converted to Date objects.

            myData = JSON.parse(text, function (key, value) {
                var a;
                if (typeof value === 'string') {
                    a =
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
                    if (a) {
                        return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
                            +a[5], +a[6]));
                    }
                }
                return value;
            });

            myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
                var d;
                if (typeof value === 'string' &&
                        value.slice(0, 5) === 'Date(' &&
                        value.slice(-1) === ')') {
                    d = new Date(value.slice(5, -1));
                    if (d) {
                        return d;
                    }
                }
                return value;
            });


    This is a reference implementation. You are free to copy, modify, or
    redistribute.
*/

/*jslint evil: true, strict: false, regexp: false */

/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
    call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
    getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
    lastIndex, length, parse, prototype, push, replace, slice, stringify,
    test, toJSON, toString, valueOf
*/


// Create a JSON object only if one does not already exist. We create the
// methods in a closure to avoid creating global variables.

var JSON;
if (!JSON) {
    JSON = {};
}

(function () {
    "use strict";

    function f(n) {
        // Format integers to have at least two digits.
        return n < 10 ? '0' + n : n;
    }

    if (typeof Date.prototype.toJSON !== 'function') {

        Date.prototype.toJSON = function (key) {

            return isFinite(this.valueOf()) ?
                this.getUTCFullYear()     + '-' +
                f(this.getUTCMonth() + 1) + '-' +
                f(this.getUTCDate())      + 'T' +
                f(this.getUTCHours())     + ':' +
                f(this.getUTCMinutes())   + ':' +
                f(this.getUTCSeconds())   + 'Z' : null;
        };

        String.prototype.toJSON      =
            Number.prototype.toJSON  =
            Boolean.prototype.toJSON = function (key) {
                return this.valueOf();
            };
    }

    var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
        escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
        gap,
        indent,
        meta = {    // table of character substitutions
            '\b': '\\b',
            '\t': '\\t',
            '\n': '\\n',
            '\f': '\\f',
            '\r': '\\r',
            '"' : '\\"',
            '\\': '\\\\'
        },
        rep;


    function quote(string) {

// If the string contains no control characters, no quote characters, and no
// backslash characters, then we can safely slap some quotes around it.
// Otherwise we must also replace the offending characters with safe escape
// sequences.

        escapable.lastIndex = 0;
        return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
            var c = meta[a];
            return typeof c === 'string' ? c :
                '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
        }) + '"' : '"' + string + '"';
    }


    function str(key, holder) {

// Produce a string from holder[key].

        var i,          // The loop counter.
            k,          // The member key.
            v,          // The member value.
            length,
            mind = gap,
            partial,
            value = holder[key];

// If the value has a toJSON method, call it to obtain a replacement value.

        if (value && typeof value === 'object' &&
                typeof value.toJSON === 'function') {
            value = value.toJSON(key);
        }

// If we were called with a replacer function, then call the replacer to
// obtain a replacement value.

        if (typeof rep === 'function') {
            value = rep.call(holder, key, value);
        }

// What happens next depends on the value's type.

        switch (typeof value) {
        case 'string':
            return quote(value);

        case 'number':

// JSON numbers must be finite. Encode non-finite numbers as null.

            return isFinite(value) ? String(value) : 'null';

        case 'boolean':
        case 'null':

// If the value is a boolean or null, convert it to a string. Note:
// typeof null does not produce 'null'. The case is included here in
// the remote chance that this gets fixed someday.

            return String(value);

// If the type is 'object', we might be dealing with an object or an array or
// null.

        case 'object':

// Due to a specification blunder in ECMAScript, typeof null is 'object',
// so watch out for that case.

            if (!value) {
                return 'null';
            }

// Make an array to hold the partial results of stringifying this object value.

            gap += indent;
            partial = [];

// Is the value an array?

            if (Object.prototype.toString.apply(value) === '[object Array]') {

// The value is an array. Stringify every element. Use null as a placeholder
// for non-JSON values.

                length = value.length;
                for (i = 0; i < length; i += 1) {
                    partial[i] = str(i, value) || 'null';
                }

// Join all of the elements together, separated with commas, and wrap them in
// brackets.

                v = partial.length === 0 ? '[]' : gap ?
                    '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
                    '[' + partial.join(',') + ']';
                gap = mind;
                return v;
            }

// If the replacer is an array, use it to select the members to be stringified.

            if (rep && typeof rep === 'object') {
                length = rep.length;
                for (i = 0; i < length; i += 1) {
                    k = rep[i];
                    if (typeof k === 'string') {
                        v = str(k, value);
                        if (v) {
                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
                        }
                    }
                }
            } else {

// Otherwise, iterate through all of the keys in the object.

                for (k in value) {
                    if (Object.hasOwnProperty.call(value, k)) {
                        v = str(k, value);
                        if (v) {
                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
                        }
                    }
                }
            }

// Join all of the member texts together, separated with commas,
// and wrap them in braces.

            v = partial.length === 0 ? '{}' : gap ?
                '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
                '{' + partial.join(',') + '}';
            gap = mind;
            return v;
        }
    }

// If the JSON object does not yet have a stringify method, give it one.

    if (typeof JSON.stringify !== 'function') {
        JSON.stringify = function (value, replacer, space) {

// The stringify method takes a value and an optional replacer, and an optional
// space parameter, and returns a JSON text. The replacer can be a function
// that can replace values, or an array of strings that will select the keys.
// A default replacer method can be provided. Use of the space parameter can
// produce text that is more easily readable.

            var i;
            gap = '';
            indent = '';

// If the space parameter is a number, make an indent string containing that
// many spaces.

            if (typeof space === 'number') {
                for (i = 0; i < space; i += 1) {
                    indent += ' ';
                }

// If the space parameter is a string, it will be used as the indent string.

            } else if (typeof space === 'string') {
                indent = space;
            }

// If there is a replacer, it must be a function or an array.
// Otherwise, throw an error.

            rep = replacer;
            if (replacer && typeof replacer !== 'function' &&
                    (typeof replacer !== 'object' ||
                    typeof replacer.length !== 'number')) {
                throw new Error('JSON.stringify');
            }

// Make a fake root object containing our value under the key of ''.
// Return the result of stringifying the value.

            return str('', {'': value});
        };
    }


// If the JSON object does not yet have a parse method, give it one.

    if (typeof JSON.parse !== 'function') {
        JSON.parse = function (text, reviver) {

// The parse method takes a text and an optional reviver function, and returns
// a JavaScript value if the text is a valid JSON text.

            var j;

            function walk(holder, key) {

// The walk method is used to recursively walk the resulting structure so
// that modifications can be made.

                var k, v, value = holder[key];
                if (value && typeof value === 'object') {
                    for (k in value) {
                        if (Object.hasOwnProperty.call(value, k)) {
                            v = walk(value, k);
                            if (v !== undefined) {
                                value[k] = v;
                            } else {
                                delete value[k];
                            }
                        }
                    }
                }
                return reviver.call(holder, key, value);
            }


// Parsing happens in four stages. In the first stage, we replace certain
// Unicode characters with escape sequences. JavaScript handles many characters
// incorrectly, either silently deleting them, or treating them as line endings.

            text = String(text);
            cx.lastIndex = 0;
            if (cx.test(text)) {
                text = text.replace(cx, function (a) {
                    return '\\u' +
                        ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
                });
            }

// In the second stage, we run the text against regular expressions that look
// for non-JSON patterns. We are especially concerned with '()' and 'new'
// because they can cause invocation, and '=' because it can cause mutation.
// But just to be safe, we want to reject all unexpected forms.

// We split the second stage into 4 regexp operations in order to work around
// crippling inefficiencies in IE's and Safari's regexp engines. First we
// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
// replace all simple value tokens with ']' characters. Third, we delete all
// open brackets that follow a colon or comma or that begin the text. Finally,
// we look to see that the remaining characters are only whitespace or ']' or
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.

            if (/^[\],:{}\s]*$/
                    .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
                        .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
                        .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {

// In the third stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.

                j = eval('(' + text + ')');

// In the optional fourth stage, we recursively walk the new structure, passing
// each name/value pair to a reviver function for possible transformation.

                return typeof reviver === 'function' ?
                    walk({'': j}, '') : j;
            }

// If the text is not JSON parseable, then a SyntaxError is thrown.

            throw new SyntaxError('JSON.parse');
        };
    }
}());

;;;/*!
 * jQuery UI 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.14",
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();
b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,
"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",
function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,
outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,"tabindex"),d=isNaN(b);
return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=
0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
;/*!
 * jQuery UI Widget 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
;/*!
 * jQuery UI Mouse 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Mouse
 *
 * Depends:
 *	jquery.ui.widget.js
 */
(function(b){var d=false;b(document).mousedown(function(){d=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===b.data(c.target,a.widgetName+".preventClickEvent")){b.removeData(c.target,a.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+
this.widgetName)},_mouseDown:function(a){if(!d){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,f=a.which==1,g=typeof this.options.cancel=="string"?b(a.target).closest(this.options.cancel).length:false;if(!f||g||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==
false;if(!this._mouseStarted){a.preventDefault();return true}}true===b.data(a.target,this.widgetName+".preventClickEvent")&&b.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(e){return c._mouseMove(e)};this._mouseUpDelegate=function(e){return c._mouseUp(e)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return d=true}},_mouseMove:function(a){if(b.browser.msie&&
!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=
false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
;/*
 * jQuery UI Position 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Position
 */
(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY,
left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+=
k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-=
m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left=
d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+=
a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b),
g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
;/*
 * jQuery UI Draggable 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Draggables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b=
this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options;this.helper=
this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true},
_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=
false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,
10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||
!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&
a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=
this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),
10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),
10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,
(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!=
"hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),
10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+
this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&
!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.left<g[0])e=g[0]+this.offset.click.left;
if(a.pageY-this.offset.click.top<g[1])h=g[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>g[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.top<g[1]||h-this.offset.click.top>g[3])?h:!(h-this.offset.click.top<g[1])?h-b.grid[1]:h+b.grid[1]:h;e=b.grid[0]?this.originalPageX+Math.round((e-this.originalPageX)/
b.grid[0])*b.grid[0]:this.originalPageX;e=g?!(e-this.offset.click.left<g[0]||e-this.offset.click.left>g[2])?e:!(e-this.offset.click.left<g[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<
526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,
c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.14"});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var h=d.data(this,"sortable");if(h&&!h.options.disabled){c.sortables.push({instance:h,shouldRevert:h.options.revert});
h.refreshPositions();h._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=
false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);
this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;
c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&
this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=
a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!=
"x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-b.overflowOffset.left<
c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-
c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,
width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),f=c.options,e=f.snapTolerance,h=b.offset.left,g=h+c.helperProportions.width,n=b.offset.top,o=n+c.helperProportions.height,i=c.snapElements.length-1;i>=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e<h&&h<l+e&&k-e<n&&n<m+e||j-e<h&&h<l+e&&k-e<o&&o<m+e||j-e<g&&g<l+e&&k-e<n&&n<m+e||j-e<g&&g<l+e&&k-e<o&&
o<m+e){if(f.snapMode!="inner"){var p=Math.abs(k-o)<=e,q=Math.abs(m-n)<=e,r=Math.abs(j-g)<=e,s=Math.abs(l-h)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:k-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:m,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:j-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:l}).left-c.margins.left}var t=
p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(k-n)<=e;q=Math.abs(m-o)<=e;r=Math.abs(j-h)<=e;s=Math.abs(l-g)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:k,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:m-c.helperProportions.height,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:j}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:l-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[i].snapping&&
(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[i].item}));c.snapElements[i].snapping=p||q||r||s||t}else{c.snapElements[i].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[i].item}));c.snapElements[i].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),
10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
;/*
 * jQuery UI Droppable 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Droppables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	jquery.ui.mouse.js
 *	jquery.ui.draggable.js
 */
(function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(c){return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this);
a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(c){return c.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&
this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
this._trigger("over",a,this.ui(b))}},_out:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",a,this.ui(b))}},_drop:function(a,b){var c=b||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
d.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.14"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height;
switch(c){case "fit":return i<=e&&g<=k&&j<=f&&h<=l;case "intersect":return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);case "touch":return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>=
i&&e<=k||g>=i&&g<=k||e<i&&g>k);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){for(var h=0;h<g.length;h++)if(g[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible=c[f].element.css("display")!=
"none";if(c[f].visible){e=="mousedown"&&c[f]._activate.call(c[f],b);c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight}}}},drop:function(a,b){var c=false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance))c=c||this._drop.call(this,b);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||
a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},dragStart:function(a,b){a.element.parentsUntil("body").bind("scroll.droppable",function(){a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)})},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance);if(c=
!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e=d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})},dragStop:function(a,b){a.element.parentsUntil("body").unbind("scroll.droppable");
a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)}}})(jQuery);
;/*
 * jQuery UI Resizable 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Resizables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
(function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==
String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,l);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){if(!a.disabled){e(this).removeClass("ui-resizable-autohide");b._handles.show()}},function(){if(!a.disabled)if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();
var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=
false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});
this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff=
{width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];
if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},
_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,
{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(b){var a=this.options,c,d,f;a={minWidth:k(a.minWidth)?a.minWidth:0,maxWidth:k(a.maxWidth)?a.maxWidth:Infinity,minHeight:k(a.minHeight)?a.minHeight:0,maxHeight:k(a.maxHeight)?a.maxHeight:
Infinity};if(this._aspectRatio||b){b=a.minHeight*this.aspectRatio;d=a.minWidth/this.aspectRatio;c=a.maxHeight*this.aspectRatio;f=a.maxWidth/this.aspectRatio;if(b>a.minWidth)a.minWidth=b;if(d>a.minHeight)a.minHeight=d;if(c<a.maxWidth)a.maxWidth=c;if(f<a.maxHeight)a.maxHeight=f}this._vBoundaries=a},_updateCache:function(b){this.offset=this.helper.offset();if(k(b.left))this.position.left=b.left;if(k(b.top))this.position.top=b.top;if(k(b.height))this.size.height=b.height;if(k(b.width))this.size.width=
b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(k(b.height))b.width=b.height*this.aspectRatio;else if(k(b.width))b.height=b.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this._vBoundaries,c=this.axis,d=k(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=k(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=k(b.width)&&a.minWidth&&
a.minWidth>b.width,h=k(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&l)b.left=i-a.minWidth;if(d&&l)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=
null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=[c.css("borderTopWidth"),c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||
0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+
a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+
c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);
b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.14"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),
10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-
f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var l=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:l.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(l.css("position"))){c._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?
e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=
e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,
step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=
e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;
var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:
a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-
d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,
f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,
display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=
e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=
d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},k=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
;/*
 * jQuery UI Selectable 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Selectables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),
selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX,
c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting",
c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d=
this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.right<b||a.top>i||a.bottom<g);else if(d.tolerance=="fit")k=a.left>b&&a.right<h&&a.top>g&&a.bottom<i;if(k){if(a.selected){a.$element.removeClass("ui-selected");a.selected=false}if(a.unselecting){a.$element.removeClass("ui-unselecting");
a.unselecting=false}if(!a.selecting){a.$element.addClass("ui-selecting");a.selecting=true;f._trigger("selecting",c,{selecting:a.element})}}else{if(a.selecting)if(c.metaKey&&a.startselected){a.$element.removeClass("ui-selecting");a.selecting=false;a.$element.addClass("ui-selected");a.selected=true}else{a.$element.removeClass("ui-selecting");a.selecting=false;if(a.startselected){a.$element.addClass("ui-unselecting");a.unselecting=true}f._trigger("unselecting",c,{unselecting:a.element})}if(a.selected)if(!c.metaKey&&
!a.startselected){a.$element.removeClass("ui-selected");a.selected=false;a.$element.addClass("ui-unselecting");a.unselecting=true;f._trigger("unselecting",c,{unselecting:a.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;e(".ui-unselecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=false;f._trigger("unselected",c,{unselected:d.element})});e(".ui-selecting",this.element[0]).each(function(){var d=
e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;f._trigger("selected",c,{selected:d.element})});this._trigger("stop",c);this.helper.remove();return false}});e.extend(e.ui.selectable,{version:"1.8.14"})})(jQuery);
;/*
 * jQuery UI Sortable 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Sortables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable");
this.refresh();this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a===
"disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&
!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,
left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};
this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=
document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);
return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<
b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-b.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+b.scrollSpeed;else if(a.pageX-this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-b.scrollSpeed}else{if(a.pageY-d(document).scrollTop()<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()-
b.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()+b.scrollSpeed);if(a.pageX-d(document).scrollLeft()<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed)}c!==false&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,
a)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(b=this.items.length-1;b>=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],
e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset();
c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):
this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null,
dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")},
toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+j<k&&b+l>g&&b+l<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||
this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?j:g<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width);b=b&&a;a=this._getDragVerticalDirection();
var c=this._getDragHorizontalDirection();if(!b)return false;return this.floating?c&&c=="right"||a=="down"?2:1:a&&(a=="down"?2:1)},_intersectsWithSides:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&a||e=="left"&&!a:c&&(c=="down"&&b||c=="up"&&!b)},
_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith();
if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),
this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(a){this.items=[];this.containers=[this];var b=this.items,c=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),
this]],e=this._connectWith();if(e)for(var f=e.length-1;f>=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h<g;h++){i=d(e[h]);i.data("sortable-item",a);b.push({item:i,instance:a,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&&
this.helper)this.offset.parent=this._getParentOffset();for(var b=this.items.length-1;b>=0;b--){var c=this.items[b];if(!(c.instance!=this.currentContainer&&this.currentContainer&&c.item[0]!=this.currentItem[0])){var e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=
this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=
d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||
0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",
a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-
f)<b){b=Math.abs(h-f);e=this.items[g]}}if(e||this.options.dropOnEmpty){this.currentContainer=this.containers[c];e?this._rearrange(a,e,null,true):this._rearrange(a,null,this.containers[c].element,true);this._trigger("change",a,this._uiHash());this.containers[c]._trigger("change",a,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}}},_createHelper:function(a){var b=
this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):b.helper=="clone"?this.currentItem.clone():this.currentItem;a.parents("body").length||d(b.appendTo!="parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);if(a[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(a[0].style.width==
""||b.forceHelperSize)a.width(this.currentItem.width());if(a[0].style.height==""||b.forceHelperSize)a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=
this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a=
{top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),
10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?
document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=d(a.containment)[0];a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),
10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){if(!b)b=
this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&
this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();
var f=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])f=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-
this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;f=this.originalPageX+Math.round((f-this.originalPageX)/b.grid[0])*b.grid[0];f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<this.containment[0])?f-b.grid[0]:f+b.grid[0]:f}}return{top:g-
this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(a,b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],
this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var f=this,g=this.counter;window.setTimeout(function(){g==f.counter&&f.refreshPositions(!e)},0)},_clear:function(a,b){this.reverting=false;var c=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]=
"";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&c.push(function(f){this._trigger("receive",f,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b)c.push(function(f){this._trigger("update",f,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||c.push(function(f){this._trigger("remove",
f,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,
this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",
a,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}return false}b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},
_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable,{version:"1.8.14"})})(jQuery);
;/*
 * jQuery UI Accordion 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Accordion
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
(function(c){c.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion",
function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a=
this.options;if(a.icons){c("<span></span>").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");
this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons();
b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target);
a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+
c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options;
if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);
if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(),
e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight||
e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",
"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.14",
animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);
f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",
paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery);
;/*
 * jQuery UI Autocomplete 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Autocomplete
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	jquery.ui.position.js
 */
(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.attr("readonly"))){g=
false;var f=d.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!=
a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};
this.menu=d("<ul></ul>").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&&
a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");
d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&&
b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source=
this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)!==false)return this._search(a)},_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:a},this.response)},_response:function(a){if(!this.options.disabled&&a&&a.length){a=this._normalize(a);this._suggest(a);this._trigger("open")}else this.close();
this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",a)}},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return d.map(a,function(b){if(typeof b==="string")return{label:b,value:b};return d.extend({label:b.label||
b.value,value:b.value||b.label},b)})},_suggest:function(a){var b=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(b,a);this.menu.deactivate();this.menu.refresh();b.show();this._resizeMenu();b.position(d.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new d.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(a,b){var g=this;
d.each(b,function(c,f){g._renderItem(a,f)})},_renderItem:function(a,b){return d("<li></li>").data("item.autocomplete",b).append(d("<a></a>").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery);
(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();if(b<0)this.element.scrollTop(g+b);else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b,
this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||
this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||
this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[d.fn.prop?"prop":"attr"]("scrollHeight")},select:function(e){this._trigger("selected",e,{item:this.active})}})})(jQuery);
;/*
 * jQuery UI Button 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Button
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
(function(b){var h,i,j,g,l=function(){var a=b(this).find(":ui-button");setTimeout(function(){a.button("refresh")},1)},k=function(a){var c=a.name,e=a.form,f=b([]);if(c)f=e?b(e).find("[name='"+c+"']"):b("[name='"+c+"']",a.ownerDocument).filter(function(){return!this.form});return f};b.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",l);if(typeof this.options.disabled!==
"boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var a=this,c=this.options,e=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!e?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!c.disabled){b(this).addClass("ui-state-hover");
this===h&&b(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){c.disabled||b(this).removeClass(f)}).bind("click.button",function(d){if(c.disabled){d.preventDefault();d.stopImmediatePropagation()}});this.element.bind("focus.button",function(){a.buttonElement.addClass("ui-state-focus")}).bind("blur.button",function(){a.buttonElement.removeClass("ui-state-focus")});if(e){this.element.bind("change.button",function(){g||a.refresh()});this.buttonElement.bind("mousedown.button",function(d){if(!c.disabled){g=
false;i=d.pageX;j=d.pageY}}).bind("mouseup.button",function(d){if(!c.disabled)if(i!==d.pageX||j!==d.pageY)g=true})}if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled||g)return false;b(this).toggleClass("ui-state-active");a.buttonElement.attr("aria-pressed",a.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(c.disabled||g)return false;b(this).addClass("ui-state-active");a.buttonElement.attr("aria-pressed",true);
var d=a.element[0];k(d).not(d).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;b(this).addClass("ui-state-active");h=this;b(document).one("mouseup",function(){h=null})}).bind("mouseup.button",function(){if(c.disabled)return false;b(this).removeClass("ui-state-active")}).bind("keydown.button",function(d){if(c.disabled)return false;if(d.keyCode==b.ui.keyCode.SPACE||
d.keyCode==b.ui.keyCode.ENTER)b(this).addClass("ui-state-active")}).bind("keyup.button",function(){b(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(d){d.keyCode===b.ui.keyCode.SPACE&&b(this).click()})}this._setOption("disabled",c.disabled);this._resetButton()},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type===
"radio"){var a=this.element.parents().filter(":last"),c="label[for="+this.element.attr("id")+"]";this.buttonElement=a.find(c);if(!this.buttonElement.length){a=a.length?a.siblings():this.element.siblings();this.buttonElement=a.filter(c);if(!this.buttonElement.length)this.buttonElement=a.find(c)}this.element.addClass("ui-helper-hidden-accessible");(a=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",a)}else this.buttonElement=this.element},
widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active  ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title");
b.Widget.prototype.destroy.call(this)},_setOption:function(a,c){b.Widget.prototype._setOption.apply(this,arguments);if(a==="disabled")c?this.element.attr("disabled",true):this.element.removeAttr("disabled");else this._resetButton()},refresh:function(){var a=this.element.is(":disabled");a!==this.options.disabled&&this._setOption("disabled",a);if(this.type==="radio")k(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true):
b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
c=b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,d=[];if(e.primary||e.secondary){if(this.options.text)d.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary"));e.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+e.primary+"'></span>");e.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+e.secondary+"'></span>");if(!this.options.text){d.push(f?"ui-button-icons-only":
"ui-button-icon-only");this.hasTitle||a.attr("title",c)}}else d.push("ui-button-text-only");a.addClass(d.join(" "))}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,c){a==="disabled"&&this.buttons.button("option",a,c);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var a=this.element.css("direction")===
"ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(a?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");
b.Widget.prototype.destroy.call(this)}})})(jQuery);
;/*
 * jQuery UI Dialog 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Dialog
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *  jquery.ui.button.js
 *	jquery.ui.draggable.js
 *	jquery.ui.mouse.js
 *	jquery.ui.position.js
 *	jquery.ui.resizable.js
 */
(function(c,l){var m={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},n={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},o=c.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,
position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||"&#160;",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),
h=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("<span></span>").addClass("ui-dialog-title").attr("id",
e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==
b.uiDialog[0]){e=c(this).css("z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=
1;d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===
f[0]&&e.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,
function(){return!(d=true)});if(d){c.each(a,function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;var i=c('<button type="button"></button>').click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.each(h,function(j,k){if(j!=="click")j in o?i[j](k):i.attr(j,k)});c.fn.button&&i.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,
originalSize:f.originalSize,position:f.position,size:f.size}}a=a===l?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",
f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):
[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f);
if(g in m)e=true;if(g in n)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):
e.removeClass("ui-dialog-disabled");break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||"&#160;"));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=
this.options,b,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-
b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.14",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),
create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()<c.ui.dialog.overlay.maxZ)return false})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a<b?c(window).height()+"px":a+"px"}else return c(document).height()+"px"},width:function(){var a,b;if(c.browser.msie){a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return a<b?c(window).width()+"px":a+"px"}else return c(document).width()+"px"},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,function(){a=
a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
;/*
 * jQuery UI Slider 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Slider
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var b=this,a=this.options,c=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f=a.values&&a.values.length||1,e=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+
this.orientation+" ui-widget ui-widget-content ui-corner-all"+(a.disabled?" ui-slider-disabled ui-disabled":""));this.range=d([]);if(a.range){if(a.range===true){if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}this.range=d("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(a.range==="min"||a.range==="max"?" ui-slider-range-"+a.range:""))}for(var j=c.length;j<f;j+=1)e.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
this.handles=c.add(d(e.join("")).appendTo(b.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(g){d(this).data("index.ui-slider-handle",
g)});this.handles.keydown(function(g){var k=true,l=d(this).data("index.ui-slider-handle"),i,h,m;if(!b.options.disabled){switch(g.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:k=false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");i=b._start(g,l);if(i===false)return}break}m=b.options.step;i=b.options.values&&b.options.values.length?
(h=b.values(l)):(h=b.value());switch(g.keyCode){case d.ui.keyCode.HOME:h=b._valueMin();break;case d.ui.keyCode.END:h=b._valueMax();break;case d.ui.keyCode.PAGE_UP:h=b._trimAlignValue(i+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:h=b._trimAlignValue(i-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(i===b._valueMax())return;h=b._trimAlignValue(i+m);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(i===b._valueMin())return;h=b._trimAlignValue(i-
m);break}b._slide(g,l,h);return k}}).keyup(function(g){var k=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(g,k);b._change(g,k);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();
return this},_mouseCapture:function(b){var a=this.options,c,f,e,j,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});f=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(k){var l=Math.abs(c-j.values(k));if(f>l){f=l;e=d(this);g=k}});if(a.range===true&&this.values(1)===a.min){g+=1;e=d(this.handles[g])}if(this._start(b,g)===false)return false;
this._mouseSliding=true;j._handleIndex=g;e.addClass("ui-state-active").focus();a=e.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-e.width()/2,top:b.pageY-a.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(b){var a=
this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a;if(this.orientation==="horizontal"){a=
this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);
c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var f;if(this.options.values&&this.options.values.length){f=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>f||a===1&&c<f))c=f;if(c!==this.values(a)){f=this.values();f[a]=c;b=this._trigger("slide",b,{handle:this.handles[a],value:c,values:f});this.values(a?0:1);b!==false&&this.values(a,c,true)}}else if(c!==this.value()){b=this._trigger("slide",b,{handle:this.handles[a],value:c});
b!==false&&this.value(c)}},_stop:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("stop",b,c)},_change:function(b,a){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("change",b,c)}},value:function(b){if(arguments.length){this.options.value=
this._trimAlignValue(b);this._refreshValue();this._change(null,0)}else return this._value()},values:function(b,a){var c,f,e;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];for(e=0;e<c.length;e+=1){c[e]=this._trimAlignValue(f[e]);this._change(null,e)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(b):
this.value();else return this._values()},_setOption:function(b,a){var c,f=0;if(d.isArray(this.options.values))f=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(b){case "disabled":if(a){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<f;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var b=this.options.value;return b=this._trimAlignValue(b)},_values:function(b){var a,c;if(arguments.length){a=this.options.values[b];
return a=this._trimAlignValue(a)}else{a=this.options.values.slice();for(c=0;c<a.length;c+=1)a[c]=this._trimAlignValue(a[c]);return a}},_trimAlignValue:function(b){if(b<=this._valueMin())return this._valueMin();if(b>=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},
_refreshValue:function(){var b=this.options.range,a=this.options,c=this,f=!this._animateOff?a.animate:false,e,j={},g,k,l,i;if(this.options.values&&this.options.values.length)this.handles.each(function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";d(this).stop(1,1)[f?"animate":"css"](j,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(h===0)c.range.stop(1,1)[f?"animate":"css"]({left:e+"%"},a.animate);
if(h===1)c.range[f?"animate":"css"]({width:e-g+"%"},{queue:false,duration:a.animate})}else{if(h===0)c.range.stop(1,1)[f?"animate":"css"]({bottom:e+"%"},a.animate);if(h===1)c.range[f?"animate":"css"]({height:e-g+"%"},{queue:false,duration:a.animate})}g=e});else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[f?"animate":"css"](j,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1,
1)[f?"animate":"css"]({width:e+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-e+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:e+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-e+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.14"})})(jQuery);
;/*
 * jQuery UI Tabs 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Tabs
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&&
e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=
d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]||
(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=
this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+
g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};
this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=
-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=
d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b,
e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);
j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();
if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(h){return h!=b}),function(h){return h>=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null,
this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this},
load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,
"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},
url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.14"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&
a.rotate(null)}:function(){t=c.selected;h()});if(b){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
;/*
 * jQuery UI Datepicker 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Datepicker
 *
 * Depends:
 *	jquery.ui.core.js
 */
(function(d,C){function M(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=N(d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function N(a){return a.bind("mouseout",function(b){b=
d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");b.length&&b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!(d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||!b.length)){b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");b.addClass("ui-state-hover");
b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover");b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")}})}function H(a,b){d.extend(a,b);for(var c in b)if(b[c]==null||b[c]==C)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.14"}});var A=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){H(this._defaults,
a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,
selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:N(d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=
h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=
this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,
"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++)if(f[g].length>h){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",
function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);
a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",
this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",
this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span"){b=
b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",
cursor:"default"})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return true;return false},
_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},e.settings):this._get(e,b):null;var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true),i=this._getMinMaxDate(e,"min"),g=this._getMinMaxDate(e,
"max");H(e.settings,f);if(i!==null&&f.dateFormat!==C&&f.minDate===C)e.settings.minDate=this._formatDate(e,i);if(g!==null&&f.dateFormat!==C&&f.maxDate===C)e.settings.maxDate=this._formatDate(e,g);this._attachments(d(a),e);this._autoSize(e);this._setDate(e,h);this._updateAlternate(e);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,
b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv);
c[0]?d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)d.datepicker._clearDate(a.target);
c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)d.datepicker._gotoToday(a.target);c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?+1:-1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,-7,"D");c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||
a.metaKey)d.datepicker._adjustDate(a.target,e?-1:+1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,+7,"D");c=a.ctrlKey||a.metaKey;break;default:c=false}else if(a.keyCode==36&&a.ctrlKey)d.datepicker._showDatepicker(this);else c=false;if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=
d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==C?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);
d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(true,true)}var c=
d.datepicker._get(b,"beforeShow");H(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c=
{left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");
if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing=true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);
J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");
a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||
c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+
i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b)b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=
this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",
left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&
d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=
b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=
!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);
a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));
d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%
100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=B+1<a.length&&a.charAt(B+1)==p)&&B++;return p},m=function(p){var D=o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"&&D?4:p=="o"?3:2)+"}");p=b.substring(q).match(p);if(!p)throw"Missing number at position "+q;q+=
p[0].length;return parseInt(p[0],10)},n=function(p,D,K){p=d.map(o(p)?K:D,function(w,x){return[[x,w]]}).sort(function(w,x){return-(w[1].length-x[1].length)});var E=-1;d.each(p,function(w,x){w=x[1];if(b.substr(q,w.length).toLowerCase()==w.toLowerCase()){E=x[0];q+=w.length;return false}});if(E!=-1)return E+1;else throw"Unknown name at position "+q;},s=function(){if(b.charAt(q)!=a.charAt(B))throw"Unexpected literal at position "+q;q++},q=0,B=0;B<a.length;B++)if(k)if(a.charAt(B)=="'"&&!o("'"))k=false;
else s();else switch(a.charAt(B)){case "d":l=m("d");break;case "D":n("D",f,h);break;case "o":u=m("o");break;case "m":j=m("m");break;case "M":j=n("M",i,g);break;case "y":c=m("y");break;case "@":var v=new Date(m("@"));c=v.getFullYear();j=v.getMonth()+1;l=v.getDate();break;case "!":v=new Date((m("!")-this._ticksTo1970)/1E4);c=v.getFullYear();j=v.getMonth()+1;l=v.getDate();break;case "'":if(o("'"))s();else k=true;break;default:s()}if(q<b.length)throw"Extra/unparsed characters found in date: "+b.substring(q);
if(c==-1)c=(new Date).getFullYear();else if(c<100)c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100);if(u>-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l)throw"Invalid date";return v},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",
TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+1<a.length&&a.charAt(k+1)==o)&&k++;return o},g=function(o,m,n){m=""+m;if(i(o))for(;m.length<
n;)m="0"+m;return m},j=function(o,m,n,s){return i(o)?s[m]:n[m]},l="",u=false;if(b)for(var k=0;k<a.length;k++)if(u)if(a.charAt(k)=="'"&&!i("'"))u=false;else l+=a.charAt(k);else switch(a.charAt(k)){case "d":l+=g("d",b.getDate(),2);break;case "D":l+=j("D",b.getDay(),e,f);break;case "o":l+=g("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":l+=g("m",b.getMonth()+1,2);break;case "M":l+=j("M",b.getMonth(),h,
c);break;case "y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case "@":l+=b.getTime();break;case "!":l+=b.getTime()*1E4+this._ticksTo1970;break;case "'":if(i("'"))l+="'";else u=true;break;default:l+=a.charAt(k)}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++)if(c)if(a.charAt(f)=="'"&&!e("'"))c=false;else b+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":b+=
"0123456789";break;case "D":case "M":return null;case "'":if(e("'"))b+="'";else c=true;break;default:b+=a.charAt(f)}return b},_get:function(a,b){return a.settings[b]!==C?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=
f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=
(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){switch(k[2]||"d"){case "d":case "D":g+=parseInt(k[1],10);break;case "w":case "W":g+=parseInt(k[1],10)*7;break;case "m":case "M":l+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break;case "y":case "Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break}k=u.exec(h)}return new Date(j,
l,g)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=
a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),
b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=
this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&n<k?k:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+A+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+
(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var s=this._get(a,"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+A+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+s+'"><span class="ui-icon ui-icon-circle-triangle-'+
(c?"w":"e")+'">'+s+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>";j=this._get(a,"currentText");s=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+A+'.datepicker._hideDatepicker();">'+this._get(a,
"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,s)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+A+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");s=this._get(a,"dayNames");this._get(a,"dayNamesShort");var q=this._get(a,"dayNamesMin"),B=
this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),D=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x<i[0];x++){var O="";this.maxRows=4;for(var G=0;G<i[1];G++){var P=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",y="";if(l){y+='<div class="ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":
"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}y+='">'}y+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&x==0?c?f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,B,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var z=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":
"";for(t=0;t<7;t++){var r=(t+h)%7;z+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+s[r]+'">'+q[r]+"</span></th>"}y+=z+"</tr></thead><tbody>";z=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,z);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q<z;Q++){y+="<tr>";var R=!j?"":'<td class="ui-datepicker-week-col">'+
this._get(a,"calculateWeek")(r)+"</td>";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&r<k||o&&r>o;R+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(r.getTime()==P.getTime()&&g==a.selectedMonth&&a._keyEvent||E.getTime()==r.getTime()&&E.getTime()==P.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!D?"":" "+I[1]+(r.getTime()==u.getTime()?" "+
this._currentClass:"")+(r.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!F||D)&&I[2]?' title="'+I[2]+'"':"")+(L?"":' onclick="DP_jQuery_'+A+".datepicker._selectDay('#"+a.id+"',"+r.getMonth()+","+r.getFullYear()+', this);return false;"')+">"+(F&&!D?"&#xa0;":L?'<span class="ui-state-default">'+r.getDate()+"</span>":'<a class="ui-state-default'+(r.getTime()==b.getTime()?" ui-state-highlight":"")+(r.getTime()==u.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+'" href="#">'+
r.getDate()+"</a>")+"</td>";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+"</tr>"}g++;if(g>11){g=0;m++}y+="</tbody></table>"+(l?"</div>"+(i[0]>0&&G==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),
l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='<div class="ui-datepicker-title">',o="";if(h||!j)o+='<span class="ui-datepicker-month">'+i[b]+"</span>";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+A+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+A+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var n=0;n<12;n++)if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth()))o+='<option value="'+
n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>";o+="</select>"}u||(k+=o+(h||!(j&&l)?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+='<span class="ui-datepicker-year">'+c+"</span>";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):
g;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+A+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+A+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++)a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>";a.yearshtml+="</select>";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?"&#xa0;":"")+o;k+="</div>";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c==
"Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");
if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);
c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,
"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=
function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,
[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.14";window["DP_jQuery_"+A]=d})(jQuery);
;/*
 * jQuery UI Progressbar 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Progressbar
 *
 * Depends:
 *   jquery.ui.core.js
 *   jquery.ui.widget.js
 */
(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*
this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.14"})})(jQuery);
;/*
 * jQuery UI Effects 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/
 */
jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,
d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})};
f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,
[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.14",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=
0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});
c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,
a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);
a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%",
"pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*
((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=
e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=
e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/
h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*
h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,
e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
;/*
 * jQuery UI Effects Blind 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Blind
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","bottom","left","right"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a,
g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery);
;/*
 * jQuery UI Effects Bounce 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Bounce
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(e){e.effects.bounce=function(b){return this.queue(function(){var a=e(this),l=["position","top","bottom","left","right"],h=e.effects.setMode(a,b.options.mode||"effect"),d=b.options.direction||"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push("opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d=="up"||d=="down"?"top":"left";d=d=="up"||d=="left"?"pos":"neg";c=b.options.distance||(f=="top"?a.outerHeight({margin:true})/3:a.outerWidth({margin:true})/
3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g<m;g++){var j={},k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing);c=h=="hide"?c*2:c/2}if(h=="hide"){g={opacity:0};g[f]=(d=="pos"?"-=":"+=")+c;a.animate(g,i/2,b.options.easing,function(){a.hide();e.effects.restore(a,l);e.effects.removeWrapper(a);
b.callback&&b.callback.apply(this,arguments)})}else{j={};k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing,function(){e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments)})}a.queue("fx",function(){a.dequeue()});a.dequeue()})}})(jQuery);
;/*
 * jQuery UI Effects Clip 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Clip
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.clip=function(e){return this.queue(function(){var a=b(this),i=["position","top","bottom","left","right","height","width"],f=b.effects.setMode(a,e.options.mode||"hide"),c=e.options.direction||"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:"hidden"});d=a[0].tagName=="IMG"?d:a;var g={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?d.height():d.width();if(f=="show"){d.css(g.size,0);d.css(g.position,
c/2)}var h={};h[g.size]=f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,{queue:false,duration:e.duration,easing:e.options.easing,complete:function(){f=="hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Drop 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Drop
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.drop=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right","opacity"],e=c.effects.setMode(a,d.options.mode||"hide"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true})/2:a.outerWidth({margin:true})/2);if(e=="show")a.css("opacity",0).css(f,b=="pos"?-g:g);var i={opacity:e==
"show"?1:0};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Explode 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Explode
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(j){j.effects.explode=function(a){return this.queue(function(){var c=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,d=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?j(this).is(":visible")?"hide":"show":a.options.mode;var b=j(this).show().css("visibility","hidden"),g=b.offset();g.top-=parseInt(b.css("marginTop"),10)||0;g.left-=parseInt(b.css("marginLeft"),10)||0;for(var h=b.outerWidth(true),i=b.outerHeight(true),e=0;e<c;e++)for(var f=
0;f<d;f++)b.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+
e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery);
;/*
 * jQuery UI Effects Fade 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Fade
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Fold 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Fold
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1],
10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
;/*
 * jQuery UI Effects Highlight 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Highlight
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&&
this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Pulsate 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Pulsate
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c<times;c++){b.animate({opacity:animateTo},duration,a.options.easing);animateTo=(animateTo+1)%2}b.animate({opacity:animateTo},duration,
a.options.easing,function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()}).dequeue()})}})(jQuery);
;/*
 * jQuery UI Effects Scale 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Scale
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.puff=function(b){return this.queue(function(){var a=c(this),e=c.effects.setMode(a,b.options.mode||"hide"),g=parseInt(b.options.percent,10)||150,h=g/100,i={height:a.height(),width:a.width()};c.extend(b.options,{fade:true,mode:e,percent:e=="hide"?g:100,from:e=="hide"?i:{height:i.height*h,width:i.width*h}});a.effect("scale",b.options,b.duration,b.callback);a.dequeue()})};c.effects.scale=function(b){return this.queue(function(){var a=c(this),e=c.extend(true,{},b.options),g=c.effects.setMode(a,
b.options.mode||"effect"),h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:g=="hide"?0:100),i=b.options.direction||"both",f=b.options.origin;if(g!="effect"){e.origin=f||["middle","center"];e.restore=true}f={height:a.height(),width:a.width()};a.from=b.options.from||(g=="show"?{height:0,width:0}:f);h={y:i!="horizontal"?h/100:1,x:i!="vertical"?h/100:1};a.to={height:f.height*h.y,width:f.width*h.x};if(b.options.fade){if(g=="show"){a.from.opacity=0;a.to.opacity=1}if(g=="hide"){a.from.opacity=
1;a.to.opacity=0}}e.from=a.from;e.to=a.to;e.mode=g;a.effect("size",e,b.duration,b.callback);a.dequeue()})};c.effects.size=function(b){return this.queue(function(){var a=c(this),e=["position","top","bottom","left","right","width","height","overflow","opacity"],g=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],i=["fontSize"],f=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],k=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
p=c.effects.setMode(a,b.options.mode||"effect"),n=b.options.restore||false,m=b.options.scale||"both",l=b.options.origin,j={height:a.height(),width:a.width()};a.from=b.options.from||j;a.to=b.options.to||j;if(l){l=c.effects.getBaseline(l,j);a.from.top=(j.height-a.from.height)*l.y;a.from.left=(j.width-a.from.width)*l.x;a.to.top=(j.height-a.to.height)*l.y;a.to.left=(j.width-a.to.width)*l.x}var d={from:{y:a.from.height/j.height,x:a.from.width/j.width},to:{y:a.to.height/j.height,x:a.to.width/j.width}};
if(m=="box"||m=="both"){if(d.from.y!=d.to.y){e=e.concat(f);a.from=c.effects.setTransition(a,f,d.from.y,a.from);a.to=c.effects.setTransition(a,f,d.to.y,a.to)}if(d.from.x!=d.to.x){e=e.concat(k);a.from=c.effects.setTransition(a,k,d.from.x,a.from);a.to=c.effects.setTransition(a,k,d.to.x,a.to)}}if(m=="content"||m=="both")if(d.from.y!=d.to.y){e=e.concat(i);a.from=c.effects.setTransition(a,i,d.from.y,a.from);a.to=c.effects.setTransition(a,i,d.to.y,a.to)}c.effects.save(a,n?e:g);a.show();c.effects.createWrapper(a);
a.css("overflow","hidden").css(a.from);if(m=="content"||m=="both"){f=f.concat(["marginTop","marginBottom"]).concat(i);k=k.concat(["marginLeft","marginRight"]);h=e.concat(f).concat(k);a.find("*[width]").each(function(){child=c(this);n&&c.effects.save(child,h);var o={height:child.height(),width:child.width()};child.from={height:o.height*d.from.y,width:o.width*d.from.x};child.to={height:o.height*d.to.y,width:o.width*d.to.x};if(d.from.y!=d.to.y){child.from=c.effects.setTransition(child,f,d.from.y,child.from);
child.to=c.effects.setTransition(child,f,d.to.y,child.to)}if(d.from.x!=d.to.x){child.from=c.effects.setTransition(child,k,d.from.x,child.from);child.to=c.effects.setTransition(child,k,d.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){n&&c.effects.restore(child,h)})})}a.animate(a.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){a.to.opacity===0&&a.css("opacity",a.from.opacity);p=="hide"&&a.hide();c.effects.restore(a,
n?e:g);c.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Shake 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Shake
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(d){d.effects.shake=function(a){return this.queue(function(){var b=d(this),j=["position","top","bottom","left","right"];d.effects.setMode(b,a.options.mode||"effect");var c=a.options.direction||"left",e=a.options.distance||20,l=a.options.times||3,f=a.duration||a.options.duration||140;d.effects.save(b,j);b.show();d.effects.createWrapper(b);var g=c=="up"||c=="down"?"top":"left",h=c=="up"||c=="left"?"pos":"neg";c={};var i={},k={};c[g]=(h=="pos"?"-=":"+=")+e;i[g]=(h=="pos"?"+=":"-=")+e*2;k[g]=
(h=="pos"?"-=":"+=")+e*2;b.animate(c,f,a.options.easing);for(e=1;e<l;e++)b.animate(i,f,a.options.easing).animate(k,f,a.options.easing);b.animate(i,f,a.options.easing).animate(c,f/2,a.options.easing,function(){d.effects.restore(b,j);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery);
;/*
 * jQuery UI Effects Slide 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Slide
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.slide=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right"],f=c.effects.setMode(a,d.options.mode||"show"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a).css({overflow:"hidden"});var g=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var e=d.options.distance||(g=="top"?a.outerHeight({margin:true}):a.outerWidth({margin:true}));if(f=="show")a.css(g,b=="pos"?isNaN(e)?"-"+e:-e:e);
var i={};i[g]=(f=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+e;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){f=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Transfer 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Transfer
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(e){e.effects.transfer=function(a){return this.queue(function(){var b=e(this),c=e(a.options.to),d=c.offset();c={top:d.top,left:d.left,height:c.innerHeight(),width:c.innerWidth()};d=b.offset();var f=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments);
b.dequeue()})})}})(jQuery);
;
;;;/* JQuery RC4 encryption/decryption
 * Copyright (c) 2009 by Tony Simek.
 * released under the terms of the Gnu Public License.
 * Email: tony.simek@gmail.com
 */
(function ($) {
    $.fn.rc4 = function (settings) {
        var defaults = { key: null, method: "encrypt", callback: null };
        var options = $.extend(defaults, settings);
        if ($.fn.rc4.ctrlrInst == null) { $.fn.rc4.ctrlrInst = new $.fn.rc4.ctrlr(options); }
        return this.each(function () {
            $.fn.rc4.ctrlrInst.settings = options;
            $.fn.rc4.ctrlrInst.container = this; $.fn.rc4.ctrlrInst.initialise(this);
        });
    };
    $.extend({ hexEncode: function (data) {
        var b16D = '0123456789abcdef'; var b16M = new Array();
        for (var i = 0; i < 256; i++) { b16M[i] = b16D.charAt(i >> 4) + b16D.charAt(i & 15); }
        var result = new Array(); for (var i = 0; i < data.length; i++) { result[i] = b16M[data.charCodeAt(i)]; }
        return result.join('');
    }, hexDecode: function (data) {
        var b16D = '0123456789abcdef'; var b16M = new Array();
        for (var i = 0; i < 256; i++) { b16M[b16D.charAt(i >> 4) + b16D.charAt(i & 15)] = String.fromCharCode(i); }
        if (!data.match(/^[a-f0-9]*$/i)) return false; if (data.length % 2) data = '0' + data;
        var result = new Array(); var j = 0; for (var i = 0; i < data.length; i += 2) {
            result[j++] = b16M[data.substr(i, 2)];
        }
        return result.join('');
    }, rc4Encrypt: function (key, pt) {
        s = new Array(); for (var i = 0; i < 256; i++) { s[i] = i; }; var j = 0; var x;
        for (i = 0; i < 256; i++) { j = (j + s[i] + key.charCodeAt(i % key.length)) % 256; x = s[i]; s[i] = s[j]; s[j] = x; }
        i = 0; j = 0; var ct = ''; for (var y = 0; y < pt.length; y++) { i = (i + 1) % 256; j = (j + s[i]) % 256; x = s[i]; s[i] = s[j]; s[j] = x; ct += String.fromCharCode(pt.charCodeAt(y) ^ s[(s[i] + s[j]) % 256]); }
        return ct;
    }, rc4Decrypt: function (key, ct) {
        return $.rc4Encrypt(key, ct);
    }, rc4EncryptStr: function (str, key) {
        return $.hexEncode($.rc4Encrypt(key, unescape(encodeURIComponent(str))));
    }, rc4DecryptStr: function (hexStr, key) {
        try {
            return decodeURIComponent(escape($.rc4Decrypt(key, $.hexDecode(hexStr))));
        } catch (err) {
        }
    }
    });
    $.rc4 = {}; $.fn.rc4.ctrlrInst = null; $.fn.rc4.ctrlr = function (settings) { this.settings = settings; }; var ctrlr = $.fn.rc4.ctrlr;
    ctrlr.prototype.initialise = function () {
        if (this.settings.key) {
            if (this.settings.method) {
                if ($.trim(this.settings.method.toUpperCase()) == "ENCRYPT") {
                    this.setObjectValue($.hexEncode($.rc4Encrypt(this.settings.key, this.getObjectValue())));
                }
                if ($.trim(this.settings.method.toUpperCase()) == "DECRYPT") {
                    this.setObjectValue($.rc4Decrypt(this.settings.key, $.hexDecode(this.getObjectValue())));
                }
            }
        };
    };
    ctrlr.prototype.getObjectValue = function () {
        if ($.fn.rc4.ctrlrInst.container.innerHTML) { return $.fn.rc4.ctrlrInst.container.innerHTML; }
        if ($.fn.rc4.ctrlrInst.container.value) { return $.fn.rc4.ctrlrInst.container.value; }
    };
    ctrlr.prototype.setObjectValue = function(data) {
        if ($.fn.rc4.ctrlrInst.container.innerHTML) { $.fn.rc4.ctrlrInst.container.innerHTML = data; }
        if ($.fn.rc4.ctrlrInst.container.value) { $.fn.rc4.ctrlrInst.container.value = data; }
    };
})(jQuery);
;;;/**
 * jQuery Validation Plugin 1.8.1
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2011 Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("<input type='hidden'/>").attr("name",
b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form();
else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name];
return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a,
b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)},
onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults,
a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."),
minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator");e="on"+e.type.replace(/^validate/,
"");f.settings[e]&&f.settings[e].call(f,this[0])}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d=this.settings.rules;
c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",a).validateDelegate(":radio, :checkbox, select, option","click",a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",
[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement=a=this.clean(a);this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,
a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},
objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==
a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,
this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.clean(a);if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=
c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=
this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==undefined)return arguments[a]},defaultMessage:function(a,b){return this.findDefined(this.customMessage(a.name,b),this.customMetaMessage(a,b),!this.settings.ignoreTitle&&a.title||undefined,c.validator.messages[b],"<strong>Warning: No message defined for "+
a.name+"</strong>")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]=d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a];
this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);
this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass().addClass(this.settings.errorClass);d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b||
"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})},
idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d,e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length},
depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this,c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest<
0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true},
email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings,a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b=
{};a=c(a);for(var d in c.validator.methods){var e=a.attr(d);if(e)b[d]=e}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{};var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e===
false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined?e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&&
a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;return a},normalizeRule:function(a){if(typeof a=="string"){var b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))},
methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a,b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=
e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d,mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]=
e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)||
a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a)},
url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9-]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>=
0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery);
(function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery);
(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a,
b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery);

;;;/* Norwegian initialisation for the jQuery UI date picker plugin. */
/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
jQuery(function ($) {
     $.datepicker.regional['no'] = {
        closeText: 'Lukk',
        prevText: '&laquo;Forrige',
        nextText: 'Neste&raquo;',
        currentText: 'I dag',
        monthNames: ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'],
        monthNamesShort: ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'],
        dayNamesShort: ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'],
        dayNames: ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'],
        dayNamesMin: ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], weekHeader: 'Uke',
        dateFormat: 'dd.mm.yy',
        firstDay: 1,
        isRTL: false,
        showMonthAfterYear: false, 
        yearSuffix: ''
    }; 
    $.datepicker.setDefaults($.datepicker.regional['no']);
}); 

;;;/**
*	@name							Defaultvalue
*	@descripton						Gives value to empty inputs
*	@version						1.1
*	@requires						Jquery 1.2.6+
*
*	@author							Jan Jarfalk
*	@author-email					jan.jarfalk@unwrongest.com
*	@author-website					http://www.unwrongest.com
*
*	@licens							MIT License - http://www.opensource.org/licenses/mit-license.php
*
*	@param {String} str				The default value
*/

(function(jQuery) {
    jQuery.fn.extend({
        defaultValue: function(str) {
            return this.each(function() {

                var $input = $(this),
					defaultValue = str || $input.attr('rel');


                if ($input.attr('type') == 'password') {
                    handlePasswordInput();
                } else {
                    handleTextInputs();
                }

                function handlePasswordInput() {

                    // Create clone and switch
                    var $clone = createClone();
                    $clone.insertAfter($input);
                    $input.hide();

                    // Events for password fields
                    $input.blur(function() {
                        if ($input.val().length <= 0) {
                            $clone.show();
                            $input.hide();
                        }
                    });

                }

                function handleTextInputs() {

                    // Set current state
                    setState();

                    // Events for non-password fields
                    $input.keypress(function() {
                        if ($input.val().length > 0) {
                            setState();
                        }
                    }).blur(setState).focus(function() {
                        $input.val() == defaultValue && $input.val('');
                    });

                    // Remove default values from fields on submit
                    $input.closest("form").submit(function() {
                        $input.val() == defaultValue && $input.val('');
                    });

                }

                function setState() {
                    val = jQuery.trim($input.val());
                    if (val.length <= 0 || val == defaultValue) {
                        $input.val(defaultValue).addClass('empty');
                    } else {
                        $input.removeClass('empty');
                    }
                }


                // Create a text clone of password fields
                function createClone() {

                    var $el = jQuery("<input />").attr({
                        'type': 'text',
                        'value': defaultValue,
                        'class': $input.attr('class') + ' empty',
                        'style': $input.attr('style'),
                        'tabindex': $input.attr('tabindex')
                    });

                    $el.focus(function() {

                        // Hide text clone and show real password field
                        $el.hide();
                        $input.show();

                        // Webkit and Moz need some extra time
                        // BTW $input.show(0,function(){$input.focus();}); doesn't work.
                        setTimeout(function() {
                            $input.focus();
                        }, 1);

                    });

                    return $el;
                }

            });
        }
    });
})(jQuery);


;;;/*
 * jQuery doTimeout: Like setTimeout, but better! - v1.0 - 3/3/2010
 * http://benalman.com/projects/jquery-dotimeout-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function ($) { var a = {}, c = "doTimeout", d = Array.prototype.slice; $[c] = function () { return b.apply(window, [0].concat(d.call(arguments))); }; $.fn[c] = function () { var f = d.call(arguments), e = b.apply(this, [c + f[0]].concat(f)); return typeof f[0] === "number" || typeof f[1] === "number" ? this : e; }; function b(l) { var m = this, h, k = {}, g = l ? $.fn : $, n = arguments, i = 4, f = n[1], j = n[2], p = n[3]; if (typeof f !== "string") { i--; f = l = 0; j = n[1]; p = n[2]; } if (l) { h = m.eq(0); h.data(l, k = h.data(l) || {}); } else { if (f) { k = a[f] || (a[f] = {}); } } k.id && clearTimeout(k.id); delete k.id; function e() { if (l) { h.removeData(l); } else { if (f) { delete a[f]; } } } function o() { k.id = setTimeout(function () { k.fn(); }, j); } if (p) { k.fn = function (q) { if (typeof p === "string") { p = g[p]; } p.apply(m, d.call(n, i)) === true && !q ? o() : e(); }; o(); } else { if (k.fn) { j === undefined ? e() : k.fn(j === false); return true; } else { e(); } } } })(jQuery);

;;;$(document).ready(function () {

    jQuery("#aspnetForm").not("form.Settlement").not("form.OrderForm").validate({
        highlight: function (element, errorClass) {
            jQuery(element).parent().addClass("Error");
            jQuery(element).parent().removeClass("OK");
        },
        errorPlacement: function (error, element) {
            element.parent().parent().addClass("Error");
            element.parent().parent().removeClass("OK");
            error.insertAfter(element);
            error.wrap('<span class="hideme"></span>');
            
        },
        success: function (label) {
            label.parent().parent().removeClass("Error");
            label.parent().parent().addClass("OK");
        }
    });

   jQuery("form.Settlement").validate({
        highlight: function (element, errorClass) {
            jQuery(element).parent().addClass("Error");
            jQuery(element).parent().parent().addClass("Error");
            jQuery(element).parent().removeClass("OK");
        },
        errorPlacement: function (error, element) {
            element.parent().parent().addClass("Error");
            element.parent().parent().removeClass("OK");
            error.insertAfter(element);
            error.wrap('<span class="hideme"></span>');
        },
        success: function (label) {

            label.parent().parent().parent().removeClass("Error");
            label.parent().parent().removeClass("Error");
            label.parent().parent().addClass("OK");
        }
    });
    jQuery("form.OrderForm").validate({
        highlight: function (element, errorClass) {
            jQuery(element).parent().addClass("Error");
            jQuery(element).parent().parent().addClass("Error");
            jQuery(element).parent().removeClass("OK");
        },
        errorPlacement: function (error, element) {
            element.parent().parent().addClass("Error");
            element.parent().parent().removeClass("OK");
            //error.insertAfter(element);
            //error.wrap('<span class="hideme"></span>');
        },
        success: function (label) {

            label.parent().parent().parent().removeClass("Error");
            label.parent().parent().removeClass("Error");
            label.parent().parent().addClass("OK");
        }
    });

    jQuery(".numeric").keypress(function (event) {

        alert();
        // Backspace, tab, enter, end, home, left, right 
        // We don't support the del key in Opera because del == . == 46. 
        var controlKeys = [8, 9, 13, 35, 36, 37, 39];
        // IE doesn't support indexOf 
        var isControlKey = controlKeys.join(",").match(new RegExp(event.which));
        // Some browsers just don't raise events for control keys. Easy. 
        // e.g. Safari backspace. 
        if (!event.which || // Control keys in most browsers. e.g. Firefox tab is 0 
	  (49 <= event.which && event.which <= 57) || // Always 1 through 9 
	  (48 == event.which && $(this).attr("value")) || // No 0 first digit 
	  isControlKey) { // Opera assigns values for control keys. 
            return;
        } else {
            event.preventDefault();
        }
    });

});

/* Form validation functions */

$.validator.addMethod("isRequired", function (value, element) {
	return isRequired(value);
}, 'Dette feltet er p&aring;krevd');

$.validator.addMethod("isChecked", function (value, element) {
	return $(element).is(':checked');
}, '[Not checked]');

$.validator.addMethod("isValidPhoneNo", function (value, element) {
	return isValidPhoneNo(value);
}, 'Telefonnummer er ikke gyldig');

$.validator.addMethod("isValidSSN", function (value, element) {
	return isValidSSN(value);
}, 'Personnr. er ikke gyldig');

$.validator.addMethod("isValidSSNStrong", function (value, element) {
    return isValidSSNStrong(value);
}, 'Personnr. er ikke gyldig');

$.validator.addMethod("isValidCompanyNo", function (value, element) {
	return isValidCompanyNo(value);
}, 'Org.nr. er ikke gyldig');

$.validator.addMethod("isValidPostNo", function (value, element) {
	return isValidPostNo(value);
}, 'Postnummer er ikke gyldig');

$.validator.addMethod("isValidEmail", function (value, element) {
    return validateMainOrderFormEmail(value);
}, 'E-postadressen er ikke gyldig');


$.validator.addMethod("isValidNumber", function (value, element) {
	return IsNumeric(value) && value.length > 0;
}, 'Ugyldig format');


/* Form validation helper functions */

function isValid() {
	var v = $("#aspnetForm").valid();
	return v;
}

function isRequired(value) {
	return value.length > 0;
}
function validateMainOrderFormEmail(elementValue) {
	var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
	return emailPattern.test(elementValue);
}
function isValidPostNo(value) {
	return IsNumeric(value) && value.length == 4;
}
function isValidSSN(value) {
	return value=="****************" || (IsNumeric(value) && ((value.length == 6 && isShortDate(value)) || value.length == 11));
}
function isValidSSNStrong(value) {
    if (value != "****************" && value.length != 11)
        return false;

    var dob = value.substring(0, 6);
    return value == "****************" || (IsNumeric(dob) && isShortDate(dob));
}
function isValidCompanyNo(value) {
	return IsNumeric(value) && value.length == 9;
}
function isValidPhoneNo(value) {
	return IsNumeric(value) && value.length >= 8;
}
function IsNumeric(val) {
	if (isNaN(parseFloat(val))) {
		return false;
	}
	return true;
}

function isShortDate(val) {
    var dt = val.substring(0, 2) + "." + val.substring(2, 4) + "." + val.substring(4);

    try {
        jQuery.datepicker.parseDate('dd.mm.y', dt);
        return true; 
        }
    catch (e) {
        return false;
    }

}
function IsMobileChecked() {
    if ($('.chkTerms :checkbox:checked').length == "0") {
        return false;

    }
    else {
        return true;
    }

}

function SSNEncoded(val) {
	return $.rc4EncryptStr(val, "fcea467a94450f");
}
function SSNDecoded(val) {
	return $.rc4DecryptStr(val, "fcea467a94450f");
}

$.fn.watch = function (props, callback, timeout) {
    if (!timeout)
        timeout = 10;
    return this.each(function () {
        var el = $(this),
            func = function () { __check.call(this, el); },
            data = { props: props.split(","),
                func: callback,
                vals: []
            };
        $.each(data.props, function (i) { data.vals[i] = el.css(data.props[i]); });
        el.data(data);
        if (typeof (this.onpropertychange) == "object") {
            el.bind("propertychange", callback);
        } else if ($.browser.mozilla) {
            el.bind("DOMAttrModified", callback);
        } else {
            setInterval(func, timeout);
        }
    });
    function __check(el) {
        var data = el.data(),
            changed = false,
            temp = "";
        for (var i = 0; i < data.props.length; i++) {
            temp = el.css(data.props[i]);
            if (data.vals[i] != temp) {
                data.vals[i] = temp;
                changed = true;
                break;
            }
        }
        if (changed && data.func) {
            data.func.call(el, data);
        }
    }
}
;;;function CheckPostNo() {
    $(".isValidPostNo, .lookupPostalLocation").each(function () {
        var item = $(this);
        var idx = $(":input").index(this) + 1;
        var addressItem = $(":input:eq(" + idx + ")");
        item.keyup(function () {
            if (isValidPostNo(item.attr('value'))) {
                var message = ["postalCode", item.attr('value')];
                PageMethod("/Templates/Fjordkraft/webservices/PostalCode.asmx", "GetPostAddress", message,
                function (msg) {
                    addressItem.attr('value', msg.d);
                },
                function (msg) {
                    //error ignored...
                });
            }

        });
    });
}

function PageMethod(pagePath, fn, paramArray, successFn, errorFn) {
    //Create list of parameters in the form:
    //{"paramName1":"paramValue1","paramName2":"paramValue2"}
    var paramList = '';
    if (paramArray.length > 0) {
        for (var i = 0; i < paramArray.length; i += 2) {
            if (paramList.length > 0) paramList += ',';
            paramList += '"' + paramArray[i] + '":"' + paramArray[i + 1] + '"';
        }
    }
    paramList = '{' + paramList + '}';
    //Call the page method
    $.ajax({
        type: "POST",
        url: pagePath + "/" + fn,
        contentType: "application/json; charset=utf-8",
        data: paramList,
        dataType: "json",
        success: successFn,
        error: errorFn
    });
}


function PageAjaxMethod(pagePath, fn, paramArray, successFn, errorFn) {
    
    //Create list of parameters in the form:
    //{"paramName1":"paramValue1","paramName2":"paramValue2"}
    
    $.ajax({
        type: "POST",
        url: pagePath + "/" + fn,
        contentType: "application/json; charset=utf-8",
        data: paramArray,
        dataType: "json",
        success: successFn,
        error: errorFn
    });
}


;;;function SetupDatePicker() {
    $('.DatePicker, .datepicker').datepicker({ dateFormat: 'dd.mm.yy', duration: '', showAnim: false,
        onClose: function (dateText, inst) {
            try {
                var idx = $(":input").index(this) + 1;
                var nextItem = $(":input:eq(" + idx + ")");
                if (nextItem.attr("class").toLowerCase().indexOf("datepicker") == -1) {
                    nextItem.focus();
                }
            } catch(err) {
            }
        }
    });

    
    $('.moveDate').datepicker({ dateFormat: 'dd.mm.yy', duration: '', showAnim: false,
        onClose: function (dateText, inst) {
            SetRequiredDatesForMove(this,true);
        }
    });
    SetRequiredDatesForMove('.moveDate',false);

    $('.meterReadingDate').datepicker({ dateFormat: 'dd.mm.yy',
        minDate: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 10),
        duration: '', showAnim: false,
        onClose: function (dateText, inst) {
            try {
                var idx = $(":input").index(this) + 1;
                var nextItem = $(":input:eq(" + idx + ")");
                if (nextItem.attr("class").toLowerCase().indexOf("datepicker") == -1) {
                    nextItem.focus();
                }
            } catch (err) {
                alert(err.Description.toString());
            }

        }
    });
    
    
}
function SetRequiredDatesForMove(datepicker,focus){
    try {
        var today = new Date();
        var selected = $(datepicker).datepicker("getDate");
        if (selected == null) return;
        var isFutureDate = selected > today;
        var idx = $(":input").index($(datepicker)) + 1;
        var nextItem = $(":input:eq(" + idx + ")");
        if (isFutureDate) {
            $(nextItem).removeClass("required");
            $(nextItem).parent().removeClass("Error");
            $(nextItem).next(".TooltipTextStyle").removeClass("hideme");
        } else {
            $(nextItem).not("#__EVENTTARGET").addClass("required");
            $(nextItem).next(".TooltipTextStyle").addClass("hideme");
        }
        if(focus)nextItem.focus();
    } catch (err) {
        //alert(err);
    }
}
;;;/*
jQuery MegaMenu Plugin
Author: GeekTantra
Author URI: http://www.geektantra.com
*/
var isIE6 = navigator.userAgent.toLowerCase().indexOf('msie 6') != -1;

jQuery.fn.megamenu = function (options) {
    options = jQuery.extend({
        activate_action: "mouseover",
        deactivate_action: "mouseleave",
        show_method: "slideDown",
        hide_method: "slideUp",
        justify: "left",
        enable_js_shadow: true,
        shadow_size: 3,
        mm_timeout: 250
    }, options);
    var $megamenu_object = this;
    if (options.activate_action == "click") options.mm_timeout = 0;
    $megamenu_object.children("li").each(function () {
        jQuery(this).addClass("mm-item");
        jQuery(".mm-item").css({ 'float': options.justify });

        jQuery(this).find("div:first").addClass("mm-item-content");
        jQuery(this).find("a:first").addClass("mm-item-link");
        var $mm_item_content = jQuery(this).find(".mm-item-content");
        var $mm_item_link = jQuery(this).find(".mm-item-link");
        $mm_item_content.hide();

        jQuery(document).bind("click", function () {
            jQuery(".mm-item-content").hide();
            jQuery(".mm-item-link").removeClass("mm-item-link-hover");
        });
        jQuery(this).bind("click", function (e) {
            e.stopPropagation();
        });
        $mm_item_content.wrapInner('<div class="mm-content-base"></div>');
        if (options.enable_js_shadow == true) {
            $mm_item_content.append('<div class="mm-js-shadow"></div>');
        }
        var $mm_timer = 0;
        // Activation Method Starts
        jQuery(this).bind(options.activate_action, function (e) {
            e.stopPropagation();
            var mm_item_link_obj = jQuery(this).find("a.mm-item-link");
            var mm_item_content_obj = jQuery(this).find("div.mm-item-content");
            clearTimeout($mm_timer);
            $mm_timer = setTimeout(function () { //Emulate HoverIntent
                if (!mm_item_link_obj.hasClass("empty"))
                    mm_item_link_obj.addClass("mm-item-link-hover");
                mm_item_content_obj.css({
                        'top': ($mm_item_link.offset().top + $mm_item_link.outerHeight()) - 1 + "px",
                        'left': ($mm_item_link.offset().left) - 5 + 'px'
                    });

                if (options.justify == "left") {
                    var mm_object_right_end = $megamenu_object.offset().left + $megamenu_object.outerWidth();
                    // Coordinates of the right end of the megamenu object
                    var mm_content_right_end = $mm_item_link.offset().left + $mm_item_content.outerWidth() - 5;
                    // Coordinates of the right end of the megamenu content
                    if (mm_content_right_end >= mm_object_right_end) { // Menu content exceeding the outer box
                        mm_item_content_obj.css({
                            'left': ($mm_item_link.offset().left - (mm_content_right_end - mm_object_right_end)) - 2 + 'px'
                        }); // Limit megamenu inside the outer box
                    }
                } else if (options.justify == "right") {
                    var mm_object_left_end = $megamenu_object.offset().left;
                    // Coordinates of the left end of the megamenu object
                    var mm_content_left_end = $mm_item_link.offset().left - mm_item_content_obj.outerWidth() +
                                    $mm_item_link.outerWidth() + 5;
                    // Coordinates of the left end of the megamenu content
                    if (mm_content_left_end <= mm_object_left_end) { // Menu content exceeding the outer box
                        mm_item_content_obj.css({
                            'left': mm_object_left_end + 2 + 'px'
                        }); // Limit megamenu inside the outer box
                    } else {
                        mm_item_content_obj.css({
                            'left': mm_content_left_end + 'px'
                        }); // Limit megamenu inside the outer box
                    }
                }
                if (options.enable_js_shadow == true) {
                    mm_item_content_obj.find(".mm-js-shadow").height(mm_item_content_obj.height());
                    mm_item_content_obj.find(".mm-js-shadow").width(mm_item_content_obj.width());
                    mm_item_content_obj.find(".mm-js-shadow").css({
                        'top': (options.shadow_size) + (isIE6 ? 2 : 0) + "px",
                        'left': (options.shadow_size) + (isIE6 ? 2 : 0) + "px",
                        'opacity': 0.5
                    });
                }
                switch (options.show_method) {
                    case "simple":
                        mm_item_content_obj.show();
                        break;
                    case "slideDown":
                        mm_item_content_obj.height("auto");
                        mm_item_content_obj.slideDown('fast');
                        break;
                    case "fadeIn":
                        mm_item_content_obj.fadeTo('fast', 1);
                        break;
                    default:
                        mm_item_content_obj.each(options.show_method);
                        break;
                }
            }, options.mm_timeout);
        });
        // Activation Method Ends
        // Deactivation Method Starts
        jQuery(this).bind(options.deactivate_action, function (e) {
            e.stopPropagation();
            clearTimeout($mm_timer);
            var mm_item_link_obj = jQuery(this).find("a.mm-item-link");
            var mm_item_content_obj = jQuery(this).find("div.mm-item-content");
            //      mm_item_content_obj.stop();
            switch (options.hide_method) {
                case "simple":
                    mm_item_content_obj.hide();
                    mm_item_link_obj.removeClass("mm-item-link-hover");
                    break;
                case "slideUp":
                    mm_item_content_obj.slideUp('fast', function () {
                        mm_item_link_obj.removeClass("mm-item-link-hover");
                    });
                    break;
                case "fadeOut":
                    mm_item_content_obj.fadeOut('fast', function () {
                        mm_item_link_obj.removeClass("mm-item-link-hover");
                    });
                    break;
                default:
                    mm_item_content_obj.each(options.hide_method);
                    mm_item_link_obj.removeClass("mm-item-link-hover");
                    break;
            }
            if (mm_item_content_obj.length < 1) mm_item_link_obj.removeClass("mm-item-link-hover");
        });
        //    Deactivation Method Ends
    });
    this.find(">li:last").after('<li class="clear-fix"></li>');
    this.show();
};

;;;///////// BUTTONS /////////
function MakeButton(BtnDivContainer) {
    $(BtnDivContainer).each(function() {
        var text = $(this).html();
        var preText = '<div class="Button-Left-active"><span class="button">';
        var postText = '</span></div><div class="Button-Right-active"></div>';
        $(this).html(preText + text + postText);
        $(this).css('cursor', 'hand');
        $(this).mouseover(function () {
            $(".Button-Left-active",this).removeClass().addClass("Button-Left-hover");
            $(".Button-Right-active",this).removeClass().addClass("Button-Right-hover");
            return false;
        });

        $(this).mouseout(function () {
            $(".Button-Left-hover",this).removeClass().addClass("Button-Left-active");
            $(".Button-Right-hover",this).removeClass().addClass("Button-Right-active");
            return false;
        });
    });
    
    Cufon.refresh();
}
;;;/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.88 (08-JUN-2010)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.2.6 or later
 */
(function($){var ver="2.88";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){if($.fn.cycle.debug){log(s);}}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.rev);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,(!opts2.rev&&!opts.backwards));},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,(!opts.rev&&!opts.backwards));}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,(!opts.rev&&!opts.backwards));});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}else{if(opts.backwards){opts.startingSlide=els.length-1;}}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards){z=first?i<=first?els.length+(i-first):first-i:els.length-i;}else{z=first?i>=first?els.length-(i-first):first-i:els.length-i;}$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.backwards){opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");$(els).stop(true,true);opts.busy=false;}if(opts.busy){debug("transition active, ignoring new tx request");return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};debug("tx firing; currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,(!opts.rev&&!opts.backwards));},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while((t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null,backwards:false};})(jQuery);
/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version:	 2.72
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);
;;;/**
 * jQuery Cookie plugin
 *
 * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */
jQuery.cookie = function (key, value, options) {

    // key and at least value given, set cookie...
    if (arguments.length > 1 && String(value) !== "[object Object]") {
        options = jQuery.extend({}, options);

        if (value === null || value === undefined) {
            options.expires = -1;
        }

        if (typeof options.expires === 'number') {
            var days = options.expires, t = options.expires = new Date();
            t.setDate(t.getDate() + days);
        }

        value = String(value);

        return (document.cookie = [
            encodeURIComponent(key), '=',
            options.raw ? value : encodeURIComponent(value),
            options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
            options.path ? '; path=' + options.path : '',
            options.domain ? '; domain=' + options.domain : '',
            options.secure ? '; secure' : ''
        ].join(''));
    }

    // key and possibly options given, get cookie...
    options = value || {};
    var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
    return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
};

;;;/*
* Author:      Marco Kuiper (http://www.marcofolio.net/)
* BelongsTo:   The iPhone unlock screen in xHTML, CSS and jQuery
* Modifications: Swing back and "slide to unlock"-fade made by Martin Jansson (http://www.martinjansson.se)
*/

function SliderSetup() {
    
    //True or False
    var isCorporate = $("input[id*=IsCorporate]").attr('value');

    var slidePosition;
    if (isCorporate == "True") {
        slidePosition = "right";
    } else {
        slidePosition = "left";
    }

    

	if(slidePosition == "right"){
		$("#unlock-handle").animate({left: 56}, 1 );
	}
	// Set the slider to be sliding
	$("#unlock-slider").slider({
		handle: "#unlock-handle",
		animate:true,
		slide: function(e,ui)
		{
			$("#slide-to-unlock").css("opacity", 1-(parseInt($("#unlock-handle").css("left"))/120));
		},
		stop: function(e,ui)
		{
			if($("#unlock-handle").position().left > 36)
			{
				unlockBedrift();
			}
			else if($("#unlock-handle").position().left < 20)
			{
				unlockPrivat();
			}
			else
			{
				if(slidePosition == "right"){
					$("#unlock-handle").animate({left: 56}, 70 );
				} else {
					$("#unlock-handle").animate({left: 0}, 70 );
				}
			}
		}
		}
	);
	
	
	$('#iphone-label').click(function() {
		if(slidePosition == "right"){
			$("#unlock-handle").animate({left: 0}, 70, function(){ unlockPrivat(); });
		} else {
			$("#unlock-handle").animate({left: 56}, 70, function(){ unlockBedrift(); });
		}
	});
	$('#unlock-bottom').click(function() {
		if(slidePosition == "right"){
			$("#unlock-handle").animate({left: 0}, 70, function(){ unlockPrivat(); });
		} else {
			$("#unlock-handle").animate({left: 56}, 70, function(){ unlockBedrift(); });
		}
	});

    var unlockBedrift = function() {
        $("#unlock-handle").animate({ left: 56 }, 70);
        window.location.href = $("input[id*=CorporateUrl]").attr('value'); // "hjem_bedrift.html";
    };

    var unlockPrivat = function() {
        $("#unlock-handle").animate({ left: 0 }, 70);
        window.location.href = $("input[id*=PrivateUrl]").attr('value'); // "hjem_privat.html";
    };
	
};
;;;// Get object of URL parameters
//var allVars = $.getUrlVars();
// Getting URL var by its nam
//var byName = $.getUrlVar('name');
$.extend({ getUrlVars: function () { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for (var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; }, getUrlVar: function (name) { return $.getUrlVars()[name]; } });
;;;$(document).ready(function () {
    try {
        TrackUrlParameterInCookie();
    } catch(err) {
        alert(err);
    }
    try {
        MakeButton(".fkButton");
    } catch(err) {
        //ignore
    }
    
    //FlashFocus
    setTimeout(function() {
        if (window.document.flashcontent != null) {
            window.document.flashcontent.focus();
        }
    }, 1500);


    //Slideshow
    try {
        $('.slideShow').cycle({
                fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
                timeout: 8000
            });
    } catch(err) {
        //alert("Slideshow error");
    }

    //Slider
    try {
        SliderSetup();
    } catch(err) {
        //alert("Slider error");
    }

    //MegaMenu
    try {
        jQuery(".megamenu").megamenu({ 'justify': 'left' });
    } catch(err) {
        //alert("Menu error");
    }

    try {
        // Searchbox.
        $('.box').focus(function() {
            if ($(this).val() == 'Søk...') $(this).val('');
            $('.searchLeft').addClass("searchLeft_focus");
            $('.searchMid').addClass("searchMid_focus");
            $(this).animate({ width: 180 }, { duration: 200 });
            $(".searchWrapper").animate({ width: '275' }, "fast");
        });
        $('.box').blur(function() {
            if ($('.box').val() == '') $(this).val('Søk...');
            $('.searchLeft').removeClass("searchLeft_focus");
            $('.searchMid').removeClass("searchMid_focus");
            $('.box').animate({ width: 80 }, { duration: 200 });
            $(".searchWrapper").animate({ width: '175' }, "fast");
        });
        $('.searchMid .box').keypress(function(e) {
            if (e.which == 13) {
                eval($('.searchRight .btn').attr('href'));
            }
        });
        $(".searchRight .searchRight_focus").click(function() {
            //alert("ok");
        });
    } catch(err) {
        //alert("searchbox error");
    }

    SetupXform();

    //produktvelger
    $("#ProductMenuSelector div").hover(
        function() {
            $(this).addClass("hover");
        },
        function() {
            $(this).removeClass("hover");
        }
    );

    //FAQ
    try {

        $(".faqList a.ToggleLink").next(".faqItem").hide();

        $(".faqList a.ToggleLink").each(function() {
            $(this).toggle(
                function() {
                    $(this).addClass("expanded");
                    $(this).next(".faqItem").show();
                    refreshContainer();
                },
                function() {
                    $(this).removeClass("expanded");
                    $(this).next(".faqItem").hide();
                    refreshContainer();

                }
            );
        });


        $(".faqCategories a").each(function() {
            if ($(".faqList ." + $(this).attr("class")).length == 0) {
                //not found
                $(this).hide();
                $("#left").hide().show();
                $(".faqList a.ToggleLink").next(".faqItem").hide();
            } else {
                //found
                $(this).click(function() {
                    $(".faqList .item").hide();
                    $(this).removeClass("translate");
                    $(".faqList ." + $(this).attr("class")).show();
                    $(".faqList a.ToggleLink").next(".faqItem").hide();
                    $("#left").hide().show();

                    $(".faqCategories a").removeClass("selected");
                    $(this).addClass("selected");
                });
            }
        });


        //mark active 
        var anchor = $(document).attr('location').hash;
        if (anchor != null && anchor.length > 0)
            $(".refId" + anchor.substring(1, anchor.length)).click();

    } catch(err) {
        //alert(err);
    }


    //webpart customeraccount
    try {
        $('.wpCustomerAccount .loginBox input[type=text]').focus(function() {
            if ($(this).attr('value') == "brukernavn") {
                $(this).attr('value', '');
            }
        });
        $('.wpCustomerAccount .loginBox input[type=password]').focus(function() {
            if ($(this).attr('value') == "pass") {
                $(this).attr('value', '');
            }
        });
    } catch(err) {
        //alert(err);
    }

    //webpart avtalevelger for privat
    try {

        if ($('.calculatorWebpart').length != 0) {
            var port = ":" + window.location.port;
            if (port.length < 2) port = "";
            // Setup the flash in expandFlash.js, passing the swf file location and the div containing the flash plus parameters.
            EmbedFlashCalculator(
                "/Templates/Fjordkraft/Flash/Calculators/privat_prodselector.swf",
                "flashcontent", {
                    MapFolderPath: "/Templates/Fjordkraft/Flash/Calculators/",
                    FontFolderPath: "/Templates/Fjordkraft/Flash/Calculators/fonts/",
                    forceLiveData: "true",
                    datasource: "http://" + document.domain + port + "/templates/fjordkraft/WebServices/PriceCalculator/ProductCalculator.asmx?wsdl"
                },
                ".calculatorWebpart"
            );
            ResizeFlashDiv("false");

        }
    } catch(err) {
        //alert(err);
    }

    //webpart avtalevelger for bedrifter
    try {
        if ($('.corporateCalculatorWebpart').length != 0) {
            var port = ":" + window.location.port;
            if (port.length < 2) port = "";


            // Setup the flash in expandFlash.js, passing the swf file location and the div containing the flash plus parameters.
            EmbedFlashCalculator(
                "/Templates/Fjordkraft/Flash/Calculators/bedrift_prodselector.swf",
                "flashcontent", {
                    MapFolderPath: "/Templates/Fjordkraft/Flash/Calculators/",
                    FontFolderPath: "/Templates/Fjordkraft/Flash/Calculators/fonts/",
                    forceLiveData: "true",
                    datasource: "http://" + document.domain + port + "/templates/fjordkraft/WebServices/PriceCalculator/CorporateProductCalculator.asmx?wsdl"
                },
                ".corporateCalculatorWebpart"
            );
            ResizeFlashDiv("false");
        }
    } catch(err) {
        //alert(err);
    }

    //webpart productcalculator
    try {
        if ($('.productCalculatorWebpart').length != 0) {
            // Setup the flash in expandFlash.js, passing the swf file location and the div containing the flash plus parameters.
            EmbedFlashCalculator(
                "/Templates/Fjordkraft/Flash/Calculators/privat_calculator.swf",
                "flashcontent", { Debug: "false",
                    MapFolderPath: "",
                    FontFolderPath: "/Templates/Fjordkraft/Flash/Calculators/fonts/",
                    forceLiveData: "true",
                    datasource: "http://" + document.domain + "/templates/fjordkraft/WebServices/PriceCalculator/PriceCalculator.asmx?wsdl"
                },
                ".productCalculatorWebpart"
            );
            ResizeFlashDiv("false");
            $(".calculatorInfo").hide();

        }
    } catch(err) {
        //alert(err);
    }

    try {
        EmbedFlash(
            "/Templates/Fjordkraft/Flash/mapV2.swf",
            "FlashMap", $("#FlashMap").attr('rel'),
            $("#SelectedRegion").attr('rel')
        );
    } catch(err) {
        //alert(err);
    }

    try {
        $(".track").click(function() {
            var param = "sent=ok";
            var action = $("form").attr("action");
            if (action.indexOf(param) != -1) {
                return;
            }

            if (action.indexOf("?") == -1) {
                action += "?";
            } else {
                action += "&";
            }
            action += param;

            $("form").attr("action", action);
        });
    } catch(err) {
        //alert(err);
    }

    try {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(FKAjaxCallback);
    } catch(err) {
        //ignore
    }
});

function FKAjaxCallback() {
    try {
        MakeButton(".fkButton");
    } catch (err) {
        //ignore
    }
    SetupXform();
    Cufon.refresh();
}

function TrackUrlParameterInCookie() {
    var urlparam = $.getUrlVars();
    var seller = urlparam['selger'];
    if (seller != null && seller.length > 0) TrackPram('seller', seller);
    var vervid = urlparam['vervid'];
    if (vervid != null && vervid.length > 0) TrackPram('vervid', vervid);
    var customerid = urlparam['customerid'];
    if (customerid != null && customerid.length > 0) TrackPram('customerid', customerid);
    var customername = urlparam['customername'];
    if (customername != null && customername.length > 0) TrackPram('customername', customername);
    
}
function TrackPram(param, value) {
    $.cookie(param, null); //Reset cookie if any
    $.cookie(param, value, { path: '/', expires: 1 }); //Set cookie
}

function DisplayText(supplierId, postalCode, consumption) {
    setTimeout(function () {
        var message = '{supplierId:' + supplierId + ', postalCode:' + postalCode + ', consumption:' + consumption + '}';
        PageAjaxMethod("/Templates/Fjordkraft/webservices/PriceCalculator/PriceCalculator.asmx", "GetProductPriceSummaryText", message,

            function (msg) {
                $('.calculatorRow').append(msg.d);
            },
            function (msg) {
                //error ignored...
            }
        );

        message = [];
        PageMethod("/Templates/Fjordkraft/webservices/PriceCalculator/PriceCalculator.asmx", "GetSummaryText", message,
            function (msg) {
                $('.calculatorColumn:first').append(msg.d);
                ToggleCalculatorInfo($('.calculatorColumn:first p'), $('.calculatorColumn:first h3'));
            },
            function (msg) {
                //error ignored...
            }
        );

        message = '{supplierId:' + supplierId + '}';
        PageAjaxMethod("/Templates/Fjordkraft/webservices/PriceCalculator/PriceCalculator.asmx", "GetProductSummaryText", message,
            function (msg) {
                $('.calculatorColumn:last').append(msg.d);
                ToggleCalculatorInfo($('.calculatorColumn:last p'), $('.calculatorColumn:last h3'));
            },
            function (msg) {
                //error ignored...
                //alert(msg.responseText);
            }
        );

        $('.calculatorInfo').show(1000, function () {
            if ($.browser.msie && jQuery.browser.version.substring(0, 2) == "8.") {
                $('.calculatorInfo').show();
            } else {
                var CalcInfoHeight = $('.calculatorInfo .calculatorColumn').height();
                $('.calculatorDivider').animate({ height: CalcInfoHeight });
            }
        });

    }, 1000);
}

function ToggleCalculatorInfo(paragraph, heading) {
    $(paragraph).hide();

    $(heading).append('<span class="end"></span>');
    $(heading).addClass("notActive");

    $(heading).click(function () {
        $(this).next().toggle();
        if($(this).hasClass("notActive")){
            $(this).removeClass("notActive");
            $(this).addClass("active");
        }else{
            $(this).removeClass("active");
            $(this).addClass("notActive");
        }
    });
}

function EmbedFlash(SWFfile, embedDiv, id, selectedRegion) {
    var flashvars = {};
    var params = {};
    var attributes = {};
    params.wmode = "transparent";
    params.allowscriptaccess = "always";
    params.allowfullscreen = true;
    flashvars.xml = "/templates/fjordkraft/pages/webparts/map.aspx?id=" + id;
    if (selectedRegion.length > 0) {
        flashvars.xml += "&selected=NO" + selectedRegion;
    }
    params.bgcolor = "#FFFFFF";
    attributes.id = embedDiv;
    swfobject.embedSWF(SWFfile, embedDiv, "100%", "100%", "9.0.0", false, flashvars, params, attributes);

    if (navigator.appVersion.indexOf("Mac") != -1) swfmacmousewheel.registerObject(attributes.id);
}

function refreshContainer() {
    $("#left").hide().show();
}

function DisplayVideoEndContent() {
    $("#video_flash").slideUp(1000);
    setTimeout(function () {
        $(".PlayerEndContent").slideDown();
    }, 1200);
}

$(document).ready(function () {
    $(".PlayerEndContent a[href*='.flv']").each(function () {
        var video = $(this).attr('href');
        $(this).attr('href', 'javascript:void()');
        $(this).click(function () {
            $f('video_flash', {
                // our Flash component
                src: "/Templates/Fjordkraft/Scripts/FlowPlayer/flowplayer-3.1.2.swf",
                wmode: "Transparent",
                // we need at least this Flash version 
                version: [9, 115],
                onFail: function () {
                    $("span.info").innerHTML = "You need the latest Flash version to see MP4 movies.  Your version is " + this.getVersion();
                }
            }, {
                clip: {
                    autoPlay: true,
                    autoBuffering: true,
                    url: video
                },
                plugins: {
                    controls: {
                        backgroundColor: '#e7e7e7',
                        backgroundGradient: 'none',
                        sliderColor: '#333333',
                        progressColor: '#eaeaea',
                        bufferColor: '#666666',
                        tooltips: {
                            buttons: true,
                            fullscreen: 'Fullskjerm',
                            mute: 'Ingen lyd',
                            unmute: 'Sett på lyd',
                            play: 'Spill av Fjordkraft video',
                            playagain: "Se engang til"
                        }
                    }
                },
                onLoad: function () {	// called when player has finished loading
                    //$f.setVolume(20); // set volume property
                },
                onFinish: function () {		// set an event handler in the configuration
                    $(this).attr('href', video);
                    $("#video_flash").fadeOut();
                    $(".PlayerEndContent").fadeIn();
                }
            });
            $("#video_flash").fadeIn();
            $(".PlayerEndContent").fadeOut();
        });
    });
});

function submitEPform() {
    document.aspnetForm.action = "http://www.energiparaplyen.no/epprod2007/logonservlet";
    document.aspnetForm.target = "_new";
    document.aspnetForm.submit();
}

function submitLoginform() {
    document.aspnetForm.action = "https://bkk-web2.bkk.no/dinkonto/dinkonto/cgi-bin/login.cgi";
    document.aspnetForm.name = "bkklogin";
    document.aspnetForm.target = "_new";
    document.aspnetForm.submit();
}

function SetupXform() {
    try {
        $(".defaulttext").each(function () {
            $(this).defaultValue($(this).attr('title'));
        });
        var submitBtn = "#id_matrix input:submit";
        $(submitBtn).not('.customerServiceFormButton').hide();
        $(submitBtn).not('.customerServiceFormButton').parent().append('<p><a href="#" class="xformSubmit"><span class="xformSubmit">' + $(submitBtn).val() + '</span></a></p>');
        $("a.xformSubmit").click(function () {
            jQuery(".defaulttext").each(function () {
                if ($(this).val() == $(this).attr('title')) {
                    $(this).val('');
                }
            });
            $(submitBtn).not('.customerServiceFormButton').click();
        });
    } catch (err) {
        alert("SetupXform error");
    }
}


;;;$(document).ready(function () {
    //Hide (Collapse) the toggle containers on load
    $(".toggle_container").show();
    //Special case Google translate toggle. Show drop down list if a different language is choosen
    var translateToLanguage = $("[id$='_lblSelectedLanguage']").html();
    if (translateToLanguage != "" && translateToLanguage != "no") 
    {
        $("div#GoogleLanguageChooser div.toggle_container").slideToggle("fast");
        $("div#GoogleLanguageChooser span.toggle_trigger").addClass("active");       
    }

    //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
    $("span.toggle_trigger").click(function () {
        $(this).toggleClass("active").siblings(".toggle_container").first().slideToggle("fast");
    });
});
;;;jQuery(document).ready(function () {
    //try {
    CheckJavascript();
    try {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(AjaxCallEnded);
    } catch (err) {
    }



    //TODO: Url tracking

    MainOrderFormStepOneSettings();
    AutofillMainOrderFormStep1();

    //run this last
    BackFunctions();

    CheckPostNo();
    RegisterCSS();
    SetupDatePicker();
    DebugForm();
    RecruitAddmore();

    HousingCooperative();

    SSN();


    //    } catch (err) {
    //        alert(err);
    //    }
});

function SSN() {
    $("input[name*=ButtonNext], .OrderOptions input").click(function () {
        if ($('#aspnetForm').valid()) {
            $(".isValidSSNStrong, .isValidSSN").each(function () {
                var val = $(this).val();
                var enc = SSNEncoded(val);
                $("input[name *= hfSSN]").val(enc);
                $("input[name *= hfSSN]").parent().removeClass("Error");
                $("input[name *= hfSSN]").parent().parent().removeClass("Error");
                $(this).val('****************');
            });
        }
    });
}

function SSNEncoded(val) {
    return $.rc4EncryptStr(val, Seed());
}
function SSNDecoded(val) {
    return $.rc4DecryptStr(val, Seed());
}


function AjaxCallEnded() {
    /*.NET fix*/
    $("SPAN.isChecked input").addClass("isChecked");
    CheckJavascript();
    MainOrderFormStepOneSettings();
    BackFunctions();
    CheckPostNo();
    RegisterCSS();
    SetupDatePicker();
    //depreciated after billing type selection has been moved to step 3
    //CheckBillingType();
    DebugForm();
    SSN();
    RecruitAddmore();
}

function DebugForm() {
    if (document.location.toString().indexOf("debug=true") != -1) {
        $("input[name*=txtCustomerName]").val("reaktortest 1");
        $("input[name*=txtAddress]").val("testveien 1");
        //$("input[name*=txtSSN]").val("31127012345");
        $("input[name*=txtEmail]").val("kjetils@reaktor.no");
        $("input[name*=txtTelephone]").val("93412123");
        $("select option:eq(1)").each(function () {
            $(this).attr("selected", "selected");
        });
        $("select[name*=BirthMonth] option:last").attr("selected", "selected");
        $("select option:last").each(function () {
            $(this).attr("selected", "selected");
        });
        /**/
        $("input[name*=txtCompanyName]").val("reaktortest");
        $("input[name*=txtCompanyNo]").val("123456789");
        $("input[name*=txtContactpersonName]").val("reaktortest");
        $("input[name*=txtContactPersonTelephone]").val("93412123");
        $("input[name*=txtContactPersonEmail]").val("kjetils@reaktor.no");
    }
}
function BackFunctions() {
    $("input:radio:checked").each(function () {
        $(this).click();
    });
    $(".isValidSSN, .isValidSSNStrong").each(function () {
        var val = $("input[name *= hfSSN]").val();
        $(this).val(SSNDecoded(val));
    });
    $(".HousingCooperativeYesNo").val() == "0" ? $(".HousingCooperativeNameContainer").hide() : $(".HousingCooperativeNameContainer").show();
}

//hides order form if javascript is not activated
function CheckJavascript() {
    jQuery(".noscript").hide();
    jQuery("#OrderForm").show();
}

function InitForm() {
    CheckJavascript();
}

/* Controls radio button selection in Forms/Common/orderOptions.ascx */

function MainOrderFormStepOneSettings() {
    jQuery("#CustomForm .secondOpt input").click(function () {
        setRequiredId("#ExistingCustomerOption input", true);
        jQuery("#ExistingCustomerOption").show();
    });
    jQuery("#CustomForm .firstOpt input").click(function () {
        setRequiredId("#ExistingCustomerOption input", false);
        jQuery("#ExistingCustomerOption").hide();
    });
}

function setRequired(name, isRequired) {
    if (isRequired) jQuery("[name='" + name + "']").addClass("required");
    else jQuery("[name='" + name + "']").removeClass("required");
}

function setRequiredId(id, isRequired) {
    if (isRequired) jQuery(id).addClass("required");
    else jQuery(id).removeClass("required");
}

function SetFormUrls() {
}

function AddUrlParamToForm(urlParam) {
    var action = jQuery("aspnetForm").attr("action");
    action = action.replace("&step=1", "");
    action = action.replace("&step=2", "");
    action = action.replace("&step=3", "");
    action = action.replace("?step=1", "");
    action = action.replace("?step=2", "");
    action = action.replace("?step=3", "");

    if (action.indexOf("?") == -1) {
        action += "?";
    } else {
        action += "&";
    }

    action += urlParam;
    jQuery("form").attr("action", action);
}

function RegisterCSS() {
    $('input:radio').each(function () {
        $(this).addClass("RadioCheckBox");
    });
}

function RedirectToUrl(url) {
    document.location.href = url;
}

function RecruitAddmore() {

    var counter = 2;

    $("#imgPlusIcon").click(function () {

        var divid;
        divid = '#OrangeBoxInput' + counter;
        $(divid).show();
        if (counter > 4) {
            $("#imgPlusIcon").hide();
            $(".AddMoreText").html("Maks 5 personer kan verves.");
        }
        counter++;

        $(".OrangeBoxLeftCol").animate({ height: '+=28' }, "fast");


    });
}

//depreciated after billing type selection has been moved to step 3
function CheckBillingType() {
    if ($(".BillingType").lenght) return;

    //check postno field...
    $(".isValidPostNo:last").each(function () {
        var item = $(this);
        item.keyup(function () {
            if (isValidPostNo(item.attr('value'))) {
                var message = ["postalCode", item.attr('value')];
                PageMethod("/Templates/Fjordkraft/webservices/PostalCode.asmx", "CanSelectBillingType", message,
				function (msg) {
				    var canSelect = msg.d;
				    if (canSelect) {
				        $(".BillingType").show();
				        $(".BillingInterval").show();
				    } else {
				        $(".BillingType").hide();
				        $(".BillingInterval").hide();
				    }
				},
				function (msg) {
				    //error ignored...
				});
            }
        });
    });
}


function HousingCooperative() {

    /*$(".HousingCooperativeYesNo").val("0");*/
    /*$(".HousingCooperativeNameContainer").hide();*/

    $(".HousingCooperativeYesNo").change(function () {
        $(this).val() == "0" ? $(".HousingCooperativeNameContainer").hide() : $(".HousingCooperativeNameContainer").show();
    });

}

function AutofillMainOrderFormStep1() {
    var urlparam = $.getUrlVars();

    var customername = urlparam['kundenavn'];
    var address = urlparam['gateadresse'];
    var postalCode = urlparam['postnummer'];
    var email = urlparam['epostadresse'];
    var phone = urlparam['tlf'];
    var dateOfBirth = urlparam['fodselsdato'];

    var companyName = urlparam['firmanavn'];
    var companyNo = urlparam['orgnummer']; 
    var contactPerson = urlparam['kontaktperson'];
    var contactEmail = urlparam['kontaktepost'];

    if (customername != null && customername.length > 0) {
        AutoFill("input[id*=txtCustomerName]", unescape(customername));
    }
    if (address != null && address.length > 0) {
        AutoFill("input[id*=txtAddress]", unescape(address));
    }
    if (postalCode != null && postalCode.length > 0) {
        AutoFill("input[id*=txtPostNo]", postalCode);
        setTimeout(function () {
            $("input[id*=txtPostNo]").trigger('keyup');
        }, 1000);
    }
    if (email != null && email.length > 0) {
        AutoFill("input[id*=txtEmail]", email);
    }
    if (phone != null && phone.length > 0) {
        AutoFill("input[id*=txtTelephone]", phone);
        AutoFill("input[id*=txtTelephone2]", phone);
    }

    if (dateOfBirth != null && dateOfBirth.length == 8) {
        if ($("input[id*=txtSSN]").length != 0) {
            AutoFill("input[id*=txtSSN]", dateOfBirth);
        } else {

            var day = dateOfBirth.substring(0, 2);
            var month = dateOfBirth.substring(2, 4);
            var year = dateOfBirth.substring(4, 8);

            $("select[id*=BirthDate]").val(parseInt(parseFloat(day)));
            $("select[id*=BirthMonth]").val(parseInt(parseFloat(month)));
            $("select[id*=BirthYear]").val(year);
        }
    }

    if (companyName != null && companyName.length > 0) {
        AutoFill("input[id*=txtCompanyName]", unescape(companyName));
    }
    if (companyNo != null && companyNo.length > 0) {
        AutoFill("input[id*=txtCompanyNo]", companyNo);
    }
    if (contactPerson != null && contactPerson.length > 0) {
        AutoFill("input[id*=txtContactpersonName]", unescape(contactPerson));
    }
    if (contactEmail != null && contactEmail.length > 0) {
        AutoFill("input[id*=txtContactPersonEmail]", contactEmail);
    }
        
    
}

function AutoFill(field, value) {
    $(field).val(value);
}
;;;/* Note: Denne filen kan trygt refaktureres */

jQuery(document).ready(function () {
    try {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(MatchItTelephone.Startup);
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(MatchItNameAndDob.Events.StartupEvents);
    } catch (err) {
    }
    MatchItTelephone.Startup();
    MatchItNameAndDob.Events.StartupEvents();
});

var MatchItTelephone = {
    Startup: function () {
        $(MatchItTelephone.Selectors.SearchButton).click(function () {
            MatchItTelephone.Functions.DoMatch();
        });
    },
    Functions: {
        DoMatch: function () {
            MatchItTelephone.Functions.SearchButton.Deactivate();
            var searchString;
            if (MatchItTelephone.IsCorporate) {
                searchString = $(".txtMatchItCompanyNoSearchString");
                if ($(searchString).val().length == 0) {
                    searchString = $(".txtMatchItCompanyNameSearchString");
                    if ($(searchString).val().length > 0) {
                        MatchItTelephone.Company.IsCompanyNameSearch = true;
                    }
                } else {
                    MatchItTelephone.Company.IsCompanyNoSearch = true;
                }
            } else {
                searchString = $(".txtMatchItTelephoneSearchString");
            }

            MatchItTelephone.Functions.ClearError();

            if (MatchItTelephone.IsCorporate && !MatchItTelephone.Company.IsCompanyNoSearch && !MatchItTelephone.Company.IsCompanyNameSearch) {
                MatchItTelephone.Functions.SetError('', MatchItTelephone.Error.NotValidCompanyNoOrName);
                MatchItTelephone.Functions.SearchButton.Activate();
                return;
            }

            if (MatchItTelephone.Company.IsCompanyNoSearch) {
                if (MatchItTelephone.IsCorporate && !MatchItTelephone.Validators.IsValidCompanyNo(searchString) && !MatchItTelephone.Validators.IsValidCompanyName(searchString)) {
                    MatchItTelephone.Functions.SetError('', MatchItTelephone.Error.NotValidCompanyNo);
                    MatchItTelephone.Functions.SearchButton.Activate();
                    return;
                }
            }
            if (MatchItTelephone.Company.IsCompanyNameSearch) {
                if (MatchItTelephone.IsCorporate && !MatchItTelephone.Validators.IsValidCompanyName(searchString)) {
                    MatchItTelephone.Functions.SetError('', MatchItTelephone.Error.NotValidCompanyName);
                    MatchItTelephone.Functions.SearchButton.Activate();
                    return;
                }
            }

            if (!MatchItTelephone.IsCorporate && !MatchItTelephone.Validators.IsValidPhoneNo(searchString)) {
                MatchItTelephone.Functions.SetError('', MatchItTelephone.Error.NotValidPhoneNo);
                MatchItTelephone.Functions.SearchButton.Activate();
                return;
            }
            var message = ["matchItSearchString", $(searchString).val(), "language", MatchItTelephone.Language];
            var opType;
            if (MatchItTelephone.IsCorporate) {
                opType = "MatchItSearchCorporate";
            }else {
                opType = "MatchItSearchTelephone";
            }

            PageMethod(
                "/Templates/Fjordkraft/webservices/MatchIt.asmx",
                opType,
                message,
                function (msg) {
                    if (msg.d.length > 0) {
                        if (MatchItTelephone.Debug) alert("MatchItTelephoneSearch: " + msg.d);
                        MatchItTelephone.Result = eval('(' + msg.d + ')');
                        if (MatchItTelephone.Result == null) {
                            MatchItTelephone.Functions.SetError('', MatchItTelephone.Error.NoResult);
                        } else {
                            MatchItTelephone.Functions.SetResult();
                        }
                    } else {
                        //handle error
                        MatchItTelephone.Functions.SetError('', MatchItTelephone.Error.NoResult);
                    }
                    MatchItTelephone.Functions.SearchButton.Activate();
                },
                function (msg) {
                    //error ignored...
                    if (MatchItTelephone.Debug) alert("MatchItTelephoneSearch: " + msg.responseText);
                    MatchItTelephone.Functions.SetError('0', MatchItTelephone.Error.GenericError);
                    MatchItTelephone.Functions.SearchButton.Activate();
                }
            );
           


        },
        SetError: function (code, msg) {
            var error = $("span.message");
            if (code.length > 0) code = 'Feilkode: ' + code + '.';
            $(error).html('<span class="code">' + code + '</span> <span class="msg">' + msg + '<span>');
        },
        ClearError: function () {
            $("span.message").html('');
        },
        SetResult: function () {
            if (MatchItTelephone.Result.HasValues) {
                MatchItTelephone.Functions.Form.IndustryCode(MatchItTelephone.Result.IndustryCode);
                MatchItTelephone.Functions.Form.CompanyName((MatchItTelephone.Result.Name1).replace('  ', ' '));
                MatchItTelephone.Functions.Form.CompanyContactPersonPhone((MatchItTelephone.Result.PhoneNo).replace('  ', ' '));
                MatchItTelephone.Functions.Form.Name((MatchItTelephone.Result.Name2 + ' ' + MatchItTelephone.Result.Name3 + ' ' + MatchItTelephone.Result.Name1).replace('  ', ' '));
                MatchItTelephone.Functions.Form.Address(MatchItTelephone.Result.Address.trim());
                MatchItTelephone.Functions.Form.PostNo(MatchItTelephone.Result.PostalCode);
                MatchItTelephone.Functions.Form.CompanyNo(MatchItTelephone.Result.CompanyNo);

                if (MatchItTelephone.Result.Born.length == "yyyyMMdd".length) {
                    MatchItTelephone.Functions.Form.SSN(MatchItTelephone.Result.BornDay + MatchItTelephone.Result.BornMonth + MatchItTelephone.Result.BornYear.substring(2, 4));
                } else {
                    MatchItTelephone.Functions.Form.SSN('');
                }
                MatchItTelephone.Functions.Form.PostLocation('');
                $("input[name*=txtPostNo]").trigger('keyup');
            } else {
                MatchItTelephone.Functions.SetError('', MatchItTelephone.Error.NoResult);
            }
        },
        Form: {
            IndustryCode: function (value) {
                $("input[name*=hfIndustyCode]").val(value.trim());
            },
            Name: function (value) {
                $("input[name*=txtCustomerName]").val(value.trim());
            },
            CompanyName: function (value) {
                $("input[name*=txtCompanyName]").val(value.trim());
            },
            CompanyContactPersonPhone: function (value) {
                $("input[name*=txtContactPersonTelephone]").val(value.trim());
            },
            CompanyNo: function (value) {
                $("input[name*=txtCompanyNo]").val(value.trim());
            },
            Address: function (value) {
                $("input[name*=txtAddress]").val(value);
            },
            PostNo: function (value) {
                $("input[name*=txtPostNo]").val(value);
            },
            PostLocation: function (value) {
                $("input[name*=txtPostalLocation]").val(value);
            },
            SSN: function (value) {
                if ($("input[name*=txtSSN]").length != 0) {
                    $("input[name*=txtSSN]").val(value);
                } else {
                    $("select[name*=BirthDate]").val(parseInt(parseFloat(MatchItTelephone.Result.BornDay)));
                    $("select[name*=BirthMonth]").val(parseInt(parseFloat(MatchItTelephone.Result.BornMonth)));
                    $("select[name*=BirthYear]").val(MatchItTelephone.Result.BornYear);
                }
            }
        },
        SearchButton: {
            Activate: function () {
                $(MatchItTelephone.Selectors.SearchButton).removeAttr('disabled').removeClass('loading');
            },
            Deactivate: function () {
                $(MatchItTelephone.Selectors.SearchButton).addClass('loading').attr('disabled', 'disabled');
            }
        }
    },
    Selectors: {
        SearchButton: '.MatchItTelephone a.MatchItTelephoneSearch'
    },
    Validators: {
        IsValidPhoneNo: function (element) {
            if ($(element).val().length == 8 && IsNumeric($(element).val())) {
                return true;
            } else {
                return false;
            }
        },
        IsValidCompanyNo: function (element) {
            if ($(element).val().length == 9 && IsNumeric($(element).val())) {
                return true;
            } else {
                return false;
            }
        },
        IsValidCompanyName: function (element) {
            return $(element).val().length > 0;
        }
    },
    Company: {
        IsCompanyNameSearch: false,
        IsCompanyNoSearch: false
    },
    IsCorporate: false,
    Debug: false,
    Language: 'no',
    Error: {
        NotValidPhoneNo: 'Ikke gyldig telefonnr',
        NotValidCompanyNo: 'Ikke gyldig orgnr',
        NotValidCompanyName: 'Ikke gyldig navn',
        NotValidCompanyNoOrName: 'Ikke gyldig navn eller orgnr',
        NoResult: 'Ingen treff',
        GenericError: 'Det oppstod desverre en feil'
    },
    Result: ''
};




var MatchItNameAndDob = {
    Events: {
        StartupEvents: function () {
            $(MatchItNameAndDob.Selectors.SearchButton).click(function () {
                MatchItNameAndDob.Functions.DoMatch();
            });
        }
    },
    Functions: {
        AddLeadingZero: function (num) {
            if (num.length > 1) {
                return num;
            }
            else {
                return "0" + num;
            }
        },
        DoMatch: function (withDropDownLists) {

            MatchItNameAndDob.Functions.SearchButton.Deactivate();
            MatchItNameAndDob.Functions.ClearError();

            var searchStringName = $(".txtMatchItNameAndDobSearchStringName");
            var searchDay = $(".txtMatchItNameAndDobSearchDay");
            var searchMonth = $(".txtMatchItNameAndDobSearchMonth");
            var searchYear = $(".txtMatchItNameAndDobSearchYear");
            var SSN = $(".MatchItNameAndDobSearchSSN");
            var withDropDownLists = (SSN.length == 0);

            if (withDropDownLists && (!MatchItNameAndDob.Validators.IsValidName(searchStringName))) {
                MatchItNameAndDob.Functions.SetError('', MatchItNameAndDob.Error.NoValidName);
                MatchItNameAndDob.Functions.SearchButton.Activate();
                return;
            }

            if (withDropDownLists && (!MatchItNameAndDob.Validators.IsSelected(searchDay) || !MatchItNameAndDob.Validators.IsSelected(searchMonth) || !MatchItNameAndDob.Validators.IsSelected(searchYear))) {
                MatchItNameAndDob.Functions.SetError('', MatchItNameAndDob.Error.NoValidDob);
                MatchItNameAndDob.Functions.SearchButton.Activate();
                return;
            }

            var fullDob = "";

            if (withDropDownLists) {
                fullDob = searchYear.val() + MatchItNameAndDob.Functions.AddLeadingZero(searchMonth.val()) + MatchItNameAndDob.Functions.AddLeadingZero(searchDay.val());
            }
            else {
                var fullSSN = SSN.val();
                fullDob = "19" + fullSSN.substr(4, 2) + fullSSN.substr(2, 2) + fullSSN.substr(0, 2);
            }
            if (fullDob == "19") fullDob = "";


            var message = ["matchItName", $(searchStringName).val(), "matchItDateOfBirth", fullDob, "language", MatchItNameAndDob.Language];
            PageMethod(
                "/Templates/Fjordkraft/webservices/MatchIt.asmx",
                "MatchItSearchNameAndDob",
                message,
                function (msg) {

                    if (msg.d.length > 0) {
                        if (MatchItNameAndDob.Debug) alert("MatchItNameAndDobSearch: " + msg.d);
                        MatchItNameAndDob.Result = eval('(' + msg.d + ')');
                        if (MatchItNameAndDob.Result == null) {
                            MatchItNameAndDob.Functions.SetError('', MatchItNameAndDob.Error.NoResult);
                        } else {
                            MatchItNameAndDob.Functions.SetResult();
                        }
                    } else {
                        //handle error
                        MatchItNameAndDob.Functions.SetError('', MatchItNameAndDob.Error.NoResult);
                    }
                    MatchItNameAndDob.Functions.SearchButton.Activate();
                },
                function (msg) {

                    //error ignored...
                    if (MatchItNameAndDob.Debug) alert("MatchItNameAndDobSearch: " + msg.responseText);
                    MatchItNameAndDob.Functions.SetError('0', MatchItNameAndDob.Error.GenericError);
                    MatchItNameAndDob.Functions.SearchButton.Activate();
                }
            );
        },
        SetError: function (code, msg) {
            var error = $(MatchItNameAndDob.Selectors.StatusField);
            if (code.length > 0) code = 'Feilkode: ' + code + '.';
            $(error).html('<span class="code">' + code + '</span> <span class="msg">' + msg + '<span>');
        },
        ClearError: function () {
            $(MatchItNameAndDob.Selectors.StatusField).html('');
        },
        SetResult: function () {
            if (MatchItNameAndDob.Result.HasValues) {
                MatchItNameAndDob.Functions.Form.CompanyName((MatchItNameAndDob.Result.Name1).replace('  ', ' '));
                MatchItNameAndDob.Functions.Form.CompanyContactPersonPhone((MatchItNameAndDob.Result.PhoneNo).replace('  ', ' '));
                MatchItNameAndDob.Functions.Form.Name((MatchItNameAndDob.Result.Name2 + ' ' + MatchItNameAndDob.Result.Name3 + ' ' + MatchItNameAndDob.Result.Name1).replace('  ', ' '));
                MatchItNameAndDob.Functions.Form.Address(MatchItNameAndDob.Result.Address.trim());
                MatchItNameAndDob.Functions.Form.PostNo(MatchItNameAndDob.Result.PostalCode);
                MatchItNameAndDob.Functions.Form.Telephone(MatchItNameAndDob.Result.PhoneNo);

                if (MatchItNameAndDob.Result.Born.length == "yyyyMMdd".length) {
                    MatchItNameAndDob.Functions.Form.SSN(MatchItNameAndDob.Result.BornDay + MatchItNameAndDob.Result.BornMonth + MatchItNameAndDob.Result.BornYear.substring(2, 4));
                } else {
                    MatchItNameAndDob.Functions.Form.SSN('');
                }
                MatchItNameAndDob.Functions.Form.PostLocation('');
                $("input[name*=txtPostNo]").trigger('keyup');
            } else {
                MatchItNameAndDob.Functions.SetError('', MatchItNameAndDob.Error.NoResult);
            }
        },
        Form: {
            Name: function (value) {
                $("input[name*=txtCustomerName]").val(value.trim());
            },
            CompanyName: function (value) {
                $("input[name*=txtCompanyName]").val(value.trim());
            },
            CompanyContactPersonPhone: function (value) {
                $("input[name*=txtContactPersonTelephone]").val(value.trim());
            },
            Telephone: function (value) {
                $("input[name*=txtTelephone]").val(value);
            },
            Address: function (value) {
                $("input[name*=txtAddress]").val(value);
            },
            PostNo: function (value) {
                $("input[name*=txtPostNo]").val(value);
            },
            PostLocation: function (value) {
                $("input[name*=txtPostalLocation]").val(value);
            },
            SSN: function (value) {
                if ($("input[name*=txtSSN]").length != 0) {
                    if ($("input[name*=txtSSN]").val().length == 0) {
                        $("input[name*=txtSSN]").val(value);
                    }
                } else {
                    $("select[name*=BirthDate]").val(parseInt(parseFloat(MatchItNameAndDob.Result.BornDay)));
                    $("select[name*=BirthMonth]").val(parseInt(parseFloat(MatchItNameAndDob.Result.BornMonth)));
                    $("select[name*=BirthYear]").val(MatchItNameAndDob.Result.BornYear);
                }
            }
        },
        SearchButton: {
            Activate: function () {
                $(MatchItNameAndDob.Selectors.SearchButton).removeAttr('disabled').removeClass('loading');
            },
            Deactivate: function () {
                $(MatchItNameAndDob.Selectors.SearchButton).addClass('loading').attr('disabled', 'disabled');
            }
        }
    },
    Selectors: {
        SearchButton: '.MatchItNameAndDob a.MatchItNameAndDobSearch',
        StatusField: 'span.message'
    },
    Validators: {
        IsValidName: function (element) {
            if ($(element).val().length > 0) {
                return true;
            }
            else {
                return false;
            }
        },
        IsSelected: function (element) {
            if ($(element).val() != "") {
                return true;
            }
            else {
                return false;
            }
        }
    },
    IsCorporate: false,
    Debug: false,
    Language: 'no',
    Error: {
        NotValidPhoneNo: 'Ikke gyldig telefonnr',
        NotValidCompanyNo: 'Ikke gyldig orgnr',
        NoResult: 'Ingen treff',
        GenericError: 'Det oppstod desverre en feil',
        NoValidName: 'Ikke gyldig navn',
        NoValidDob: 'Ikke gyldig dato'
    },
    Result: ''
};



;;;$(document).ready(function () {
    
});

function GetCustomerType()
{
    var pathname = window.location.pathname;
    var group = pathname.split('/');
    return group[1];
}

function isValidForm() {
    var v = $("#aspnetForm").valid();
    return v;
}

/*############################################################
Main tracking functions 
############################################################*/

//go to step 2
function TrackOrderFormGoToStep2(productId, contractMoveForm) {

    if (!isValidForm())
        return false;
    
    if (contractMoveForm == "True")
        return true;

    var customerType = GetCustomerType();
    if (customerType == "Privat") {
        TrackOrderFormGoToStep2_Private(productId);
    }
    else if (customerType == "Bedrift") {
        TrackOrderFormGoToStep2_Corporate(productId);
    }

    return true;
}

//go to step 3
function TrackOrderFormGoToStep3(productId, contractMoveForm) {

    if (!isValidForm())
        return false;

    if (contractMoveForm == "True")
        return true;

    var customerType = GetCustomerType();
    if (customerType == "Privat") {
        TrackOrderFormGoToStep3_Private(productId);
    }
    else if (customerType == "Bedrift") {
        TrackOrderFormGoToStep3_Corporate(productId);
    }
    return true;
}

//submit order tracking
function TrackOrderFormSubmitOrder(productId, contractMoveForm) {

    if (!isValidForm()) 
        return false;

    if (contractMoveForm == "True") 
        return true;

    var customerType = GetCustomerType();
    if (customerType == "Privat") {
        TrackOrderFormSubmitOrder_Private(productId);
    }
    else if (customerType == "Bedrift") {
        TrackOrderFormSubmitOrder_Corporate(productId);
    }

    return true;
}

//back to step 1 tracking
function TrackOrderFormBackToStep1(productId, contractMoveForm) {

    if (contractMoveForm == "True")
        return;

    var customerType = GetCustomerType();
    if (customerType == "Privat") {
        TrackOrderFormBackToStep1_Private(productId);
    }
    else if (customerType == "Bedrift") {
        TrackOrderFormBackToStep1_Corporate(productId);
    }

}

//back to step 2 tracking
function TrackOrderFormBackToStep2(productId, contractMoveForm) {

    if (contractMoveForm == "True") 
        return;
    
    var customerType = GetCustomerType();
    if (customerType == "Privat") {
        TrackOrderFormBackToStep2_Private(productId);
    }
    else if (customerType == "Bedrift") {
        TrackOrderFormBackToStep2_Corporate(productId);
    }

}

/*############################################################
TrackOrderFormGoToStep2 helper functions 
############################################################*/
function TrackOrderFormGoToStep2_Private(productId) {
    switch (productId) {
        case "1":
            //strøm til Innkjøpspris
            _gaq.push(['_trackPageview', '/Privat/Bestill/sti/Steg-1-STI']); 
            break;
        case "23":
            //topp 10
            _gaq.push(['_trackPageview', '/Privat/Bestill/topp10/Steg-1-Topp10']); 
            break;
        default:
            break;
    }
}

function TrackOrderFormGoToStep2_Corporate(productId) {
    switch (productId) {
        case "1":
            //strøm til Innkjøpspris
            try {
                _gaq.push(['_trackPageview', '/Bedrift/Bestill/sti/Steg-1-STI']);
            } catch (err) { }
            break;
        default:
            break;
    }
}

/*############################################################
TrackOrderFormGoToStep3 helper functions 
############################################################*/
function TrackOrderFormGoToStep3_Private(productId) {
    switch (productId) {
        case "1":
            //strøm til Innkjøpspris
            _gaq.push(['_trackPageview', '/Privat/Bestill/sti/Steg-2-STI']); 
            break;
        case "23":
            //topp 10
            _gaq.push(['_trackPageview', '/Privat/Bestill/topp10/Steg-2-Topp10']); 
            break;
        default:
            break;
    }
}

function TrackOrderFormGoToStep3_Corporate(productId) {
    switch (productId) {
        case "1":
            //strøm til Innkjøpspris
            try {
                _gaq.push(['_trackPageview', '/Bedrift/Bestill/sti/Steg-2-STI']);
            } catch (err) {
            }
            break;
        default:
            break;
    }
}


/*############################################################
TrackOrderFormSubmitOrder helper functions 
############################################################*/
function TrackOrderFormSubmitOrder_Private(productId) 
{
    switch (productId) {
        case "1":
            //strøm til Innkjøpspris
            _gaq.push(['_trackPageview', '/Privat/Bestill/sti/Steg-3-Bestill-STI']);
            Adform.Tracking.Track(57137, 660925, '');
            break;
        case "23":
            //topp 10
            _gaq.push(['_trackPageview', '/Privat/Bestill/topp10/Steg-3-Bestill-Topp10']); 
            break;
        default:
            break;
    }
}

function TrackOrderFormSubmitOrder_Corporate(productId) 
{
    switch (productId) {
        case "1":
            //strøm til Innkjøpspris
            _gaq.push(['_trackPageview', '/Bedrift/Bestill/sti/Steg-3-Bestill-STI']); 
            break;
        default:
            break;
    }
}

/*############################################################
TrackOrderFormBackToStep1 helper functions 
############################################################*/

function TrackOrderFormBackToStep1_Private(productId) {
    switch (productId) {
        case "1":
            //strøm til Innkjøpspris
            _gaq.push(['_trackPageview', '/Privat/Bestill/sti/Tilbake-Til-Steg-1-STI']); 
            break;
        case "23":
            //topp 10
            _gaq.push(['_trackPageview', '/Privat/Bestill/topp10/Tilbake-Til-Steg-1-Topp10']); 
            break;
        default:
            break;
    }
}

function TrackOrderFormBackToStep1_Corporate(productId) {
    switch (productId) {
        case "1":
            //strøm til Innkjøpspris
            try {
                _gaq.push(['_trackPageview', '/Bedrift/Bestill/sti/Tilbake-Til-Steg-1-STI']);
            } catch (err) {
            }
            break;
        default:
            break;
    }
}

/*############################################################
TrackOrderFormBackToStep2 helper functions 
############################################################*/

function TrackOrderFormBackToStep2_Private(productId) 
{
    switch (productId) {
        case "1":
            //strøm til Innkjøpspris
            _gaq.push(['_trackPageview', '/Privat/Bestill/sti/Tilbake-Til-Steg-2-STI']); 
            break;
        case "23":
            //topp 10
            _gaq.push(['_trackPageview', '/Privat/Bestill/topp10/Tilbake-Til-Steg-2-Topp10']); 
            break;
        default:
            break;
    }
}

function TrackOrderFormBackToStep2_Corporate(productId) {
    try {
        switch (productId) {
        case "1":
            //strøm til Innkjøpspris
            _gaq.push(['_trackPageview', '/Bedrift/Bestill/sti/Tilbake-Til-Steg-2-STI']);
            break;
        default:
            break;
        }
    }catch(err) {
        //ignore
    }
}
;;;/* 
* flowplayer.js 3.2.4. The Flowplayer API
* 
* Copyright 2009 Flowplayer Oy
* 
* This file is part of Flowplayer.
* 
* Flowplayer is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* 
* Flowplayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
* 
* Date: 2010-08-25 12:48:46 +0000 (Wed, 25 Aug 2010)
* Revision: 551 
*/
(function () { function g(o) { console.log("$f.fireEvent", [].slice.call(o)) } function k(q) { if (!q || typeof q != "object") { return q } var o = new q.constructor(); for (var p in q) { if (q.hasOwnProperty(p)) { o[p] = k(q[p]) } } return o } function m(t, q) { if (!t) { return } var o, p = 0, r = t.length; if (r === undefined) { for (o in t) { if (q.call(t[o], o, t[o]) === false) { break } } } else { for (var s = t[0]; p < r && q.call(s, p, s) !== false; s = t[++p]) { } } return t } function c(o) { return document.getElementById(o) } function i(q, p, o) { if (typeof p != "object") { return q } if (q && p) { m(p, function (r, s) { if (!o || typeof s != "function") { q[r] = s } }) } return q } function n(s) { var q = s.indexOf("."); if (q != -1) { var p = s.slice(0, q) || "*"; var o = s.slice(q + 1, s.length); var r = []; m(document.getElementsByTagName(p), function () { if (this.className && this.className.indexOf(o) != -1) { r.push(this) } }); return r } } function f(o) { o = o || window.event; if (o.preventDefault) { o.stopPropagation(); o.preventDefault() } else { o.returnValue = false; o.cancelBubble = true } return false } function j(q, o, p) { q[o] = q[o] || []; q[o].push(p) } function e() { return "_" + ("" + Math.random()).slice(2, 10) } var h = function (t, r, s) { var q = this, p = {}, u = {}; q.index = r; if (typeof t == "string") { t = { url: t} } i(this, t, true); m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","), function () { var v = "on" + this; if (v.indexOf("*") != -1) { v = v.slice(0, v.length - 1); var w = "onBefore" + v.slice(2); q[w] = function (x) { j(u, w, x); return q } } q[v] = function (x) { j(u, v, x); return q }; if (r == -1) { if (q[w]) { s[w] = q[w] } if (q[v]) { s[v] = q[v] } } }); i(this, { onCuepoint: function (x, w) { if (arguments.length == 1) { p.embedded = [null, x]; return q } if (typeof x == "number") { x = [x] } var v = e(); p[v] = [x, w]; if (s.isLoaded()) { s._api().fp_addCuepoints(x, r, v) } return q }, update: function (w) { i(q, w); if (s.isLoaded()) { s._api().fp_updateClip(w, r) } var v = s.getConfig(); var x = (r == -1) ? v.clip : v.playlist[r]; i(x, w, true) }, _fireEvent: function (v, y, w, A) { if (v == "onLoad") { m(p, function (B, C) { if (C[0]) { s._api().fp_addCuepoints(C[0], r, B) } }); return false } A = A || q; if (v == "onCuepoint") { var z = p[y]; if (z) { return z[1].call(s, A, w) } } if (y && "onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v) != -1) { i(A, y); if (y.metaData) { if (!A.duration) { A.duration = y.metaData.duration } else { A.fullDuration = y.metaData.duration } } } var x = true; m(u[v], function () { x = this.call(s, A, y, w) }); return x } }); if (t.onCuepoint) { var o = t.onCuepoint; q.onCuepoint.apply(q, typeof o == "function" ? [o] : o); delete t.onCuepoint } m(t, function (v, w) { if (typeof w == "function") { j(u, v, w); delete t[v] } }); if (r == -1) { s.onCuepoint = this.onCuepoint } }; var l = function (p, r, q, t) { var o = this, s = {}, u = false; if (t) { i(s, t) } m(r, function (v, w) { if (typeof w == "function") { s[v] = w; delete r[v] } }); i(this, { animate: function (y, z, x) { if (!y) { return o } if (typeof z == "function") { x = z; z = 500 } if (typeof y == "string") { var w = y; y = {}; y[w] = z; z = 500 } if (x) { var v = e(); s[v] = x } if (z === undefined) { z = 500 } r = q._api().fp_animate(p, y, z, v); return o }, css: function (w, x) { if (x !== undefined) { var v = {}; v[w] = x; w = v } r = q._api().fp_css(p, w); i(o, r); return o }, show: function () { this.display = "block"; q._api().fp_showPlugin(p); return o }, hide: function () { this.display = "none"; q._api().fp_hidePlugin(p); return o }, toggle: function () { this.display = q._api().fp_togglePlugin(p); return o }, fadeTo: function (y, x, w) { if (typeof x == "function") { w = x; x = 500 } if (w) { var v = e(); s[v] = w } this.display = q._api().fp_fadeTo(p, y, x, v); this.opacity = y; return o }, fadeIn: function (w, v) { return o.fadeTo(1, w, v) }, fadeOut: function (w, v) { return o.fadeTo(0, w, v) }, getName: function () { return p }, getPlayer: function () { return q }, _fireEvent: function (w, v, x) { if (w == "onUpdate") { var z = q._api().fp_getPlugin(p); if (!z) { return } i(o, z); delete o.methods; if (!u) { m(z.methods, function () { var B = "" + this; o[B] = function () { var C = [].slice.call(arguments); var D = q._api().fp_invoke(p, B, C); return D === "undefined" || D === undefined ? o : D } }); u = true } } var A = s[w]; if (A) { var y = A.apply(o, v); if (w.slice(0, 1) == "_") { delete s[w] } return y } return o } }) }; function b(q, G, t) { var w = this, v = null, D = false, u, s, F = [], y = {}, x = {}, E, r, p, C, o, A; i(w, { id: function () { return E }, isLoaded: function () { return (v !== null && v.fp_play !== undefined && !D) }, getParent: function () { return q }, hide: function (H) { if (H) { q.style.height = "0px" } if (w.isLoaded()) { v.style.height = "0px" } return w }, show: function () { q.style.height = A + "px"; if (w.isLoaded()) { v.style.height = o + "px" } return w }, isHidden: function () { return w.isLoaded() && parseInt(v.style.height, 10) === 0 }, load: function (J) { if (!w.isLoaded() && w._fireEvent("onBeforeLoad") !== false) { var H = function () { u = q.innerHTML; if (u && !flashembed.isSupported(G.version)) { q.innerHTML = "" } if (J) { J.cached = true; j(x, "onLoad", J) } flashembed(q, G, { config: t }) }; var I = 0; m(a, function () { this.unload(function (K) { if (++I == a.length) { H() } }) }) } return w }, unload: function (J) { if (this.isFullscreen() && /WebKit/i.test(navigator.userAgent)) { if (J) { J(false) } return w } if (u.replace(/\s/g, "") !== "") { if (w._fireEvent("onBeforeUnload") === false) { if (J) { J(false) } return w } D = true; try { if (v) { v.fp_close(); w._fireEvent("onUnload") } } catch (H) { } var I = function () { v = null; q.innerHTML = u; D = false; if (J) { J(true) } }; setTimeout(I, 50) } else { if (J) { J(false) } } return w }, getClip: function (H) { if (H === undefined) { H = C } return F[H] }, getCommonClip: function () { return s }, getPlaylist: function () { return F }, getPlugin: function (H) { var J = y[H]; if (!J && w.isLoaded()) { var I = w._api().fp_getPlugin(H); if (I) { J = new l(H, I, w); y[H] = J } } return J }, getScreen: function () { return w.getPlugin("screen") }, getControls: function () { return w.getPlugin("controls")._fireEvent("onUpdate") }, getLogo: function () { try { return w.getPlugin("logo")._fireEvent("onUpdate") } catch (H) { } }, getPlay: function () { return w.getPlugin("play")._fireEvent("onUpdate") }, getConfig: function (H) { return H ? k(t) : t }, getFlashParams: function () { return G }, loadPlugin: function (K, J, M, L) { if (typeof M == "function") { L = M; M = {} } var I = L ? e() : "_"; w._api().fp_loadPlugin(K, J, M, I); var H = {}; H[I] = L; var N = new l(K, null, w, H); y[K] = N; return N }, getState: function () { return w.isLoaded() ? v.fp_getState() : -1 }, play: function (I, H) { var J = function () { if (I !== undefined) { w._api().fp_play(I, H) } else { w._api().fp_play() } }; if (w.isLoaded()) { J() } else { if (D) { setTimeout(function () { w.play(I, H) }, 50) } else { w.load(function () { J() }) } } return w }, getVersion: function () { var I = "flowplayer.js 3.2.4"; if (w.isLoaded()) { var H = v.fp_getVersion(); H.push(I); return H } return I }, _api: function () { if (!w.isLoaded()) { throw "Flowplayer " + w.id() + " not loaded when calling an API method" } return v }, setClip: function (H) { w.setPlaylist([H]); return w }, getIndex: function () { return p }, _swfHeight: function () { return v.clientHeight } }); m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","), function () { var H = "on" + this; if (H.indexOf("*") != -1) { H = H.slice(0, H.length - 1); var I = "onBefore" + H.slice(2); w[I] = function (J) { j(x, I, J); return w } } w[H] = function (J) { j(x, H, J); return w } }); m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","), function () { var H = this; w[H] = function (J, I) { if (!w.isLoaded()) { return w } var K = null; if (J !== undefined && I !== undefined) { K = v["fp_" + H](J, I) } else { K = (J === undefined) ? v["fp_" + H]() : v["fp_" + H](J) } return K === "undefined" || K === undefined ? w : K } }); w._fireEvent = function (Q) { if (typeof Q == "string") { Q = [Q] } var R = Q[0], O = Q[1], M = Q[2], L = Q[3], K = 0; if (t.debug) { g(Q) } if (!w.isLoaded() && R == "onLoad" && O == "player") { v = v || c(r); o = w._swfHeight(); m(F, function () { this._fireEvent("onLoad") }); m(y, function (S, T) { T._fireEvent("onUpdate") }); s._fireEvent("onLoad") } if (R == "onLoad" && O != "player") { return } if (R == "onError") { if (typeof O == "string" || (typeof O == "number" && typeof M == "number")) { O = M; M = L } } if (R == "onContextMenu") { m(t.contextMenu[O], function (S, T) { T.call(w) }); return } if (R == "onPluginEvent" || R == "onBeforePluginEvent") { var H = O.name || O; var I = y[H]; if (I) { I._fireEvent("onUpdate", O); return I._fireEvent(M, Q.slice(3)) } return } if (R == "onPlaylistReplace") { F = []; var N = 0; m(O, function () { F.push(new h(this, N++, w)) }) } if (R == "onClipAdd") { if (O.isInStream) { return } O = new h(O, M, w); F.splice(M, 0, O); for (K = M + 1; K < F.length; K++) { F[K].index++ } } var P = true; if (typeof O == "number" && O < F.length) { C = O; var J = F[O]; if (J) { P = J._fireEvent(R, M, L) } if (!J || P !== false) { P = s._fireEvent(R, M, L, J) } } m(x[R], function () { P = this.call(w, O, M); if (this.cached) { x[R].splice(K, 1) } if (P === false) { return false } K++ }); return P }; function B() { if ($f(q)) { $f(q).getParent().innerHTML = ""; p = $f(q).getIndex(); a[p] = w } else { a.push(w); p = a.length - 1 } A = parseInt(q.style.height, 10) || q.clientHeight; E = q.id || "fp" + e(); r = G.id || E + "_api"; G.id = r; t.playerId = E; if (typeof t == "string") { t = { clip: { url: t}} } if (typeof t.clip == "string") { t.clip = { url: t.clip} } t.clip = t.clip || {}; if (q.getAttribute("href", 2) && !t.clip.url) { t.clip.url = q.getAttribute("href", 2) } s = new h(t.clip, -1, w); t.playlist = t.playlist || [t.clip]; var I = 0; m(t.playlist, function () { var K = this; if (typeof K == "object" && K.length) { K = { url: "" + K} } m(t.clip, function (L, M) { if (M !== undefined && K[L] === undefined && typeof M != "function") { K[L] = M } }); t.playlist[I] = K; K = new h(K, I, w); F.push(K); I++ }); m(t, function (K, L) { if (typeof L == "function") { if (s[K]) { s[K](L) } else { j(x, K, L) } delete t[K] } }); m(t.plugins, function (K, L) { if (L) { y[K] = new l(K, L, w) } }); if (!t.plugins || t.plugins.controls === undefined) { y.controls = new l("controls", null, w) } y.canvas = new l("canvas", null, w); u = q.innerHTML; function J(L) { var K = w.hasiPadSupport && w.hasiPadSupport(); if (/iPad|iPhone|iPod/i.test(navigator.userAgent) && !/.flv$/i.test(F[0].url) && !K) { return true } if (!w.isLoaded() && w._fireEvent("onBeforeClick") !== false) { w.load() } return f(L) } function H() { if (u.replace(/\s/g, "") !== "") { if (q.addEventListener) { q.addEventListener("click", J, false) } else { if (q.attachEvent) { q.attachEvent("onclick", J) } } } else { if (q.addEventListener) { q.addEventListener("click", f, false) } w.load() } } setTimeout(H, 0) } if (typeof q == "string") { var z = c(q); if (!z) { throw "Flowplayer cannot access element: " + q } q = z; B() } else { B() } } var a = []; function d(o) { this.length = o.length; this.each = function (p) { m(o, p) }; this.size = function () { return o.length } } window.flowplayer = window.$f = function () { var p = null; var o = arguments[0]; if (!arguments.length) { m(a, function () { if (this.isLoaded()) { p = this; return false } }); return p || a[0] } if (arguments.length == 1) { if (typeof o == "number") { return a[o] } else { if (o == "*") { return new d(a) } m(a, function () { if (this.id() == o.id || this.id() == o || this.getParent() == o) { p = this; return false } }); return p } } if (arguments.length > 1) { var t = arguments[1], q = (arguments.length == 3) ? arguments[2] : {}; if (typeof t == "string") { t = { src: t} } t = i({ bgcolor: "#000000", version: [9, 0], expressInstall: "http://static.flowplayer.org/swf/expressinstall.swf", cachebusting: true }, t); if (typeof o == "string") { if (o.indexOf(".") != -1) { var s = []; m(n(o), function () { s.push(new b(this, k(t), k(q))) }); return new d(s) } else { var r = c(o); return new b(r !== null ? r : o, t, q) } } else { if (o) { return new b(o, t, q) } } } return null }; i(window.$f, { fireEvent: function () { var o = [].slice.call(arguments); var q = $f(o[0]); return q ? q._fireEvent(o.slice(1)) : null }, addPlugin: function (o, p) { b.prototype[o] = p; return $f }, each: m, extend: i }); if (typeof jQuery == "function") { jQuery.fn.flowplayer = function (q, p) { if (!arguments.length || typeof arguments[0] == "number") { var o = []; this.each(function () { var r = $f(this); if (r) { o.push(r) } }); return arguments.length ? o[arguments[0]] : new d(o) } return this.each(function () { $f(this, k(q), p ? k(p) : {}) }) } } })(); (function () { var h = document.all, j = "http://www.adobe.com/go/getflashplayer", c = typeof jQuery == "function", e = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, b = { width: "100%", height: "100%", id: "_" + ("" + Math.random()).slice(9), allowfullscreen: true, allowscriptaccess: "always", quality: "high", version: [3, 0], onFail: null, expressInstall: null, w3c: false, cachebusting: false }; if (window.attachEvent) { window.attachEvent("onbeforeunload", function () { __flash_unloadHandler = function () { }; __flash_savedUnloadHandler = function () { } }) } function i(m, l) { if (l) { for (var f in l) { if (l.hasOwnProperty(f)) { m[f] = l[f] } } } return m } function a(f, n) { var m = []; for (var l in f) { if (f.hasOwnProperty(l)) { m[l] = n(f[l]) } } return m } window.flashembed = function (f, m, l) { if (typeof f == "string") { f = document.getElementById(f.replace("#", "")) } if (!f) { return } if (typeof m == "string") { m = { src: m} } return new d(f, i(i({}, b), m), l) }; var g = i(window.flashembed, { conf: b, getVersion: function () { var m, f; try { f = navigator.plugins["Shockwave Flash"].description.slice(16) } catch (o) { try { m = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); f = m && m.GetVariable("$version") } catch (n) { try { m = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); f = m && m.GetVariable("$version") } catch (l) { } } } f = e.exec(f); return f ? [f[1], f[3]] : [0, 0] }, asString: function (l) { if (l === null || l === undefined) { return null } var f = typeof l; if (f == "object" && l.push) { f = "array" } switch (f) { case "string": l = l.replace(new RegExp('(["\\\\])', "g"), "\\$1"); l = l.replace(/^\s?(\d+\.?\d+)%/, "$1pct"); return '"' + l + '"'; case "array": return "[" + a(l, function (o) { return g.asString(o) }).join(",") + "]"; case "function": return '"function()"'; case "object": var m = []; for (var n in l) { if (l.hasOwnProperty(n)) { m.push('"' + n + '":' + g.asString(l[n])) } } return "{" + m.join(",") + "}" } return String(l).replace(/\s/g, " ").replace(/\'/g, '"') }, getHTML: function (o, l) { o = i({}, o); var n = '<object width="' + o.width + '" height="' + o.height + '" id="' + o.id + '" name="' + o.id + '"'; if (o.cachebusting) { o.src += ((o.src.indexOf("?") != -1 ? "&" : "?") + Math.random()) } if (o.w3c || !h) { n += ' data="' + o.src + '" type="application/x-shockwave-flash"' } else { n += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' } n += ">"; if (o.w3c || h) { n += '<param name="movie" value="' + o.src + '" />' } o.width = o.height = o.id = o.w3c = o.src = null; o.onFail = o.version = o.expressInstall = null; for (var m in o) { if (o[m]) { n += '<param name="' + m + '" value="' + o[m] + '" />' } } var p = ""; if (l) { for (var f in l) { if (l[f]) { var q = l[f]; p += f + "=" + (/function|object/.test(typeof q) ? g.asString(q) : q) + "&" } } p = p.slice(0, -1); n += '<param name="flashvars" value=\'' + p + "' />" } n += "</object>"; return n }, isSupported: function (f) { return k[0] > f[0] || k[0] == f[0] && k[1] >= f[1] } }); var k = g.getVersion(); function d(f, n, m) { if (g.isSupported(n.version)) { f.innerHTML = g.getHTML(n, m) } else { if (n.expressInstall && g.isSupported([6, 65])) { f.innerHTML = g.getHTML(i(n, { src: n.expressInstall }), { MMredirectURL: location.href, MMplayerType: "PlugIn", MMdoctitle: document.title }) } else { if (!f.innerHTML.replace(/\s/g, "")) { f.innerHTML = "<h2>Flash version " + n.version + " or greater is required</h2><h3>" + (k[0] > 0 ? "Your version is " + k : "You have no flash plugin installed") + "</h3>" + (f.tagName == "A" ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='" + j + "'>here</a></p>"); if (f.tagName == "A") { f.onclick = function () { location.href = j } } } if (n.onFail) { var l = n.onFail.call(this); if (typeof l == "string") { f.innerHTML = l } } } } if (h) { window[n.id] = document.getElementById(n.id) } i(this, { getRoot: function () { return f }, getOptions: function () { return n }, getConf: function () { return m }, getApi: function () { return f.firstChild } }) } if (c) { jQuery.tools = jQuery.tools || { version: "3.2.4" }; jQuery.tools.flashembed = { conf: b }; jQuery.fn.flashembed = function (l, f) { return this.each(function () { $(this).data("flashembed", flashembed(this, l, f)) }) } } })();
;;;$(document).ready(function () {
    $('ul.FormFrontPage li:last').addClass("right");
    $('ul.FormFrontPage li.selected:last').not('ul.FormFrontPage li:first').addClass("selectedRight");
    $('ul.FormFrontPage li').not('ul.FormFrontPage li:first,ul.FormFrontPage li:last').addClass("middle");
    $('ul.FormFrontPage li.selected').not('ul.FormFrontPage li:first,ul.FormFrontPage li:last').addClass("middleSelected");
});
;;;
function SearchBtnKeyPress(e, url) {
    if (e.keyCode == 13) {
        Search(url);
        e.returnValue = false;

        if (navigator.userAgent.indexOf("Firefox") != -1) {
            alert('');
        }
    }
}

function Search(u) {
    var obj = document.getElementById('txtSearch');
    var q = obj.value;
    var url = u + '/CustomModules/Search.aspx?q=' + q;

    if (q.length > 0) {
        self.location.href = url;
    }
}

function SearchT(u) {
    var obj = document.getElementById('txtSearchT');
    var q = obj.value;
    var url = u + '/CustomModules/Search.aspx?q=' + q;

    if (q.length > 0) {
        self.location.href = url;
    }
}

function PrintPage() {
    window.print();
}

function ShowQuery(url) {
    window.open(url, '', 'location=no, scrollbars=yes, height=420, width=630 ,resizable=no, status=no, menubar=no');
}

function ValidatePostNo(sText) {
    if (sText.length == 4) {
        if (IsNumeric(sText)) {
            return true;
        }
    }
}

function IsNumeric(sText) {
    var ValidChars = "0123456789";
    var IsNumber = true;
    var Char;

    for (i = 0; i < sText.length && IsNumber == true; i++) {
        Char = sText.charAt(i);

        if (ValidChars.indexOf(Char) == -1) {
            IsNumber = false;
        }
    }

    return IsNumber;
}

;;;/*!
* Copyright (c) 2011 Simo Kinnunen.
* Licensed under the MIT license.
*
* @version 1.09i
*/

var Cufon = (function () {

	var api = function () {
		return api.replace.apply(null, arguments);
	};

	var DOM = api.DOM = {

		ready: (function () {

			var complete = false, readyStatus = { loaded: 1, complete: 1 };

			var queue = [], perform = function () {
				if (complete) return;
				complete = true;
				for (var fn; fn = queue.shift(); fn());
			};

			// Gecko, Opera, WebKit r26101+

			if (document.addEventListener) {
				document.addEventListener('DOMContentLoaded', perform, false);
				window.addEventListener('pageshow', perform, false); // For cached Gecko pages
			}

			// Old WebKit, Internet Explorer

			if (!window.opera && document.readyState) (function () {
				readyStatus[document.readyState] ? perform() : setTimeout(arguments.callee, 10);
			})();

			// Internet Explorer

			if (document.readyState && document.createStyleSheet) (function () {
				try {
					document.body.doScroll('left');
					perform();
				}
				catch (e) {
					setTimeout(arguments.callee, 1);
				}
			})();

			addEvent(window, 'load', perform); // Fallback

			return function (listener) {
				if (!arguments.length) perform();
				else complete ? listener() : queue.push(listener);
			};

		})(),

		root: function () {
			return document.documentElement || document.body;
		},

		strict: (function () {
			var doctype;
			// no doctype (doesn't always catch it though.. IE I'm looking at you)
			if (document.compatMode == 'BackCompat') return false;
			// WebKit, Gecko, Opera, IE9+
			doctype = document.doctype;
			if (doctype) {
				return !/frameset|transitional/i.test(doctype.publicId);
			}
			// IE<9, firstChild is the doctype even if there's an XML declaration
			doctype = document.firstChild;
			if (doctype.nodeType != 8 || /^DOCTYPE.+(transitional|frameset)/i.test(doctype.data)) {
				return false;
			}
			return true;
		})()

	};

	var CSS = api.CSS = {

		Size: function (value, base) {

			this.value = parseFloat(value);
			this.unit = String(value).match(/[a-z%]*$/)[0] || 'px';

			this.convert = function (value) {
				return value / base * this.value;
			};

			this.convertFrom = function (value) {
				return value / this.value * base;
			};

			this.toString = function () {
				return this.value + this.unit;
			};

		},

		addClass: function (el, className) {
			var current = el.className;
			el.className = current + (current && ' ') + className;
			return el;
		},

		color: cached(function (value) {
			var parsed = {};
			parsed.color = value.replace(/^rgba\((.*?),\s*([\d.]+)\)/, function ($0, $1, $2) {
				parsed.opacity = parseFloat($2);
				return 'rgb(' + $1 + ')';
			});
			return parsed;
		}),

		// has no direct CSS equivalent.
		// @see http://msdn.microsoft.com/en-us/library/system.windows.fontstretches.aspx
		fontStretch: cached(function (value) {
			if (typeof value == 'number') return value;
			if (/%$/.test(value)) return parseFloat(value) / 100;
			return {
				'ultra-condensed': 0.5,
				'extra-condensed': 0.625,
				condensed: 0.75,
				'semi-condensed': 0.875,
				'semi-expanded': 1.125,
				expanded: 1.25,
				'extra-expanded': 1.5,
				'ultra-expanded': 2
			}[value] || 1;
		}),

		getStyle: function (el) {
			var view = document.defaultView;
			if (view && view.getComputedStyle) return new Style(view.getComputedStyle(el, null));
			if (el.currentStyle) return new Style(el.currentStyle);
			return new Style(el.style);
		},

		gradient: cached(function (value) {
			var gradient = {
				id: value,
				type: value.match(/^-([a-z]+)-gradient\(/)[1],
				stops: []
			}, colors = value.substr(value.indexOf('(')).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);
			for (var i = 0, l = colors.length, stop; i < l; ++i) {
				stop = colors[i].split('=', 2).reverse();
				gradient.stops.push([stop[1] || i / (l - 1), stop[0]]);
			}
			return gradient;
		}),

		quotedList: cached(function (value) {
			// doesn't work properly with empty quoted strings (""), but
			// it's not worth the extra code.
			var list = [], re = /\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g, match;
			while (match = re.exec(value)) list.push(match[3] || match[1]);
			return list;
		}),

		recognizesMedia: cached(function (media) {
			var el = document.createElement('style'), sheet, container, supported;
			el.type = 'text/css';
			el.media = media;
			try { // this is cached anyway
				el.appendChild(document.createTextNode('/**/'));
			} catch (e) { }
			container = elementsByTagName('head')[0];
			container.insertBefore(el, container.firstChild);
			sheet = (el.sheet || el.styleSheet);
			supported = sheet && !sheet.disabled;
			container.removeChild(el);
			return supported;
		}),

		removeClass: function (el, className) {
			var re = RegExp('(?:^|\\s+)' + className + '(?=\\s|$)', 'g');
			el.className = el.className.replace(re, '');
			return el;
		},

		supports: function (property, value) {
			var checker = document.createElement('span').style;
			if (checker[property] === undefined) return false;
			checker[property] = value;
			return checker[property] === value;
		},

		textAlign: function (word, style, position, wordCount) {
			if (style.get('textAlign') == 'right') {
				if (position > 0) word = ' ' + word;
			}
			else if (position < wordCount - 1) word += ' ';
			return word;
		},

		textShadow: cached(function (value) {
			if (value == 'none') return null;
			var shadows = [], currentShadow = {}, result, offCount = 0;
			var re = /(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;
			while (result = re.exec(value)) {
				if (result[0] == ',') {
					shadows.push(currentShadow);
					currentShadow = {};
					offCount = 0;
				}
				else if (result[1]) {
					currentShadow.color = result[1];
				}
				else {
					currentShadow[['offX', 'offY', 'blur'][offCount++]] = result[2];
				}
			}
			shadows.push(currentShadow);
			return shadows;
		}),

		textTransform: (function () {
			var map = {
				uppercase: function (s) {
					return s.toUpperCase();
				},
				lowercase: function (s) {
					return s.toLowerCase();
				},
				capitalize: function (s) {
					return s.replace(/(?:^|\s)./g, function ($0) {
						return $0.toUpperCase();
					});
				}
			};
			return function (text, style) {
				var transform = map[style.get('textTransform')];
				return transform ? transform(text) : text;
			};
		})(),

		whiteSpace: (function () {
			var ignore = {
				inline: 1,
				'inline-block': 1,
				'run-in': 1
			};
			var wsStart = /^\s+/, wsEnd = /\s+$/;
			return function (text, style, node, previousElement, simple) {
				if (simple) return text.replace(wsStart, '').replace(wsEnd, ''); // @fixme too simple
				if (previousElement) {
					if (previousElement.nodeName.toLowerCase() == 'br') {
						text = text.replace(wsStart, '');
					}
				}
				if (ignore[style.get('display')]) return text;
				if (!node.previousSibling) text = text.replace(wsStart, '');
				if (!node.nextSibling) text = text.replace(wsEnd, '');
				return text;
			};
		})()

	};

	CSS.ready = (function () {

		// don't do anything in Safari 2 (it doesn't recognize any media type)
		var complete = !CSS.recognizesMedia('all'), hasLayout = false;

		var queue = [], perform = function () {
			complete = true;
			for (var fn; fn = queue.shift(); fn());
		};

		var links = elementsByTagName('link'), styles = elementsByTagName('style');

		var checkTypes = {
			'': 1,
			'text/css': 1
		};

		function isContainerReady(el) {
			if (!checkTypes[el.type.toLowerCase()]) return true;
			return el.disabled || isSheetReady(el.sheet, el.media || 'screen');
		}

		function isSheetReady(sheet, media) {
			// in Opera sheet.disabled is true when it's still loading,
			// even though link.disabled is false. they stay in sync if
			// set manually.
			if (!CSS.recognizesMedia(media || 'all')) return true;
			if (!sheet || sheet.disabled) return false;
			try {
				var rules = sheet.cssRules, rule;
				if (rules) {
					// needed for Safari 3 and Chrome 1.0.
					// in standards-conforming browsers cssRules contains @-rules.
					// Chrome 1.0 weirdness: rules[<number larger than .length - 1>]
					// returns the last rule, so a for loop is the only option.
					search: for (var i = 0, l = rules.length; rule = rules[i], i < l; ++i) {
						switch (rule.type) {
							case 2: // @charset
								break;
							case 3: // @import
								if (!isSheetReady(rule.styleSheet, rule.media.mediaText)) return false;
								break;
							default:
								// only @charset can precede @import
								break search;
						}
					}
				}
			}
			catch (e) { } // probably a style sheet from another domain
			return true;
		}

		function allStylesLoaded() {
			// Internet Explorer's style sheet model, there's no need to do anything
			if (document.createStyleSheet) return true;
			// standards-compliant browsers
			var el, i;
			for (i = 0; el = links[i]; ++i) {
				if (el.rel.toLowerCase() == 'stylesheet' && !isContainerReady(el)) return false;
			}
			for (i = 0; el = styles[i]; ++i) {
				if (!isContainerReady(el)) return false;
			}
			return true;
		}

		DOM.ready(function () {
			// getComputedStyle returns null in Gecko if used in an iframe with display: none
			if (!hasLayout) hasLayout = CSS.getStyle(document.body).isUsable();
			if (complete || (hasLayout && allStylesLoaded())) perform();
			else setTimeout(arguments.callee, 10);
		});

		return function (listener) {
			if (complete) listener();
			else queue.push(listener);
		};

	})();

	function Font(data) {

		var face = this.face = data.face, wordSeparators = {
			'\u0020': 1,
			'\u00a0': 1,
			'\u3000': 1
		};

		this.glyphs = (function (glyphs) {
			var key, fallbacks = {
				'\u2011': '\u002d',
				'\u00ad': '\u2011'
			};
			for (key in fallbacks) {
				if (!hasOwnProperty(fallbacks, key)) continue;
				if (!glyphs[key]) glyphs[key] = glyphs[fallbacks[key]];
			}
			return glyphs;
		})(data.glyphs);

		this.w = data.w;
		this.baseSize = parseInt(face['units-per-em'], 10);

		this.family = face['font-family'].toLowerCase();
		this.weight = face['font-weight'];
		this.style = face['font-style'] || 'normal';

		this.viewBox = (function () {
			var parts = face.bbox.split(/\s+/);
			var box = {
				minX: parseInt(parts[0], 10),
				minY: parseInt(parts[1], 10),
				maxX: parseInt(parts[2], 10),
				maxY: parseInt(parts[3], 10)
			};
			box.width = box.maxX - box.minX;
			box.height = box.maxY - box.minY;
			box.toString = function () {
				return [this.minX, this.minY, this.width, this.height].join(' ');
			};
			return box;
		})();

		this.ascent = -parseInt(face.ascent, 10);
		this.descent = -parseInt(face.descent, 10);

		this.height = -this.ascent + this.descent;

		this.spacing = function (chars, letterSpacing, wordSpacing) {
			var glyphs = this.glyphs, glyph,
				kerning, k,
				jumps = [],
				width = 0, w,
				i = -1, j = -1, chr;
			while (chr = chars[++i]) {
				glyph = glyphs[chr] || this.missingGlyph;
				if (!glyph) continue;
				if (kerning) {
					width -= k = kerning[chr] || 0;
					jumps[j] -= k;
				}
				w = glyph.w;
				if (isNaN(w)) w = +this.w; // may have been a String in old fonts
				if (w > 0) {
					w += letterSpacing;
					if (wordSeparators[chr]) w += wordSpacing;
				}
				width += jumps[++j] = ~ ~w; // get rid of decimals
				kerning = glyph.k;
			}
			jumps.total = width;
			return jumps;
		};

	}

	function FontFamily() {

		var styles = {}, mapping = {
			oblique: 'italic',
			italic: 'oblique'
		};

		this.add = function (font) {
			(styles[font.style] || (styles[font.style] = {}))[font.weight] = font;
		};

		this.get = function (style, weight) {
			var weights = styles[style] || styles[mapping[style]]
				|| styles.normal || styles.italic || styles.oblique;
			if (!weights) return null;
			// we don't have to worry about "bolder" and "lighter"
			// because IE's currentStyle returns a numeric value for it,
			// and other browsers use the computed value anyway
			weight = {
				normal: 400,
				bold: 700
			}[weight] || parseInt(weight, 10);
			if (weights[weight]) return weights[weight];
			// http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight
			// Gecko uses x99/x01 for lighter/bolder
			var up = {
				1: 1,
				99: 0
			}[weight % 100], alts = [], min, max;
			if (up === undefined) up = weight > 400;
			if (weight == 500) weight = 400;
			for (var alt in weights) {
				if (!hasOwnProperty(weights, alt)) continue;
				alt = parseInt(alt, 10);
				if (!min || alt < min) min = alt;
				if (!max || alt > max) max = alt;
				alts.push(alt);
			}
			if (weight < min) weight = min;
			if (weight > max) weight = max;
			alts.sort(function (a, b) {
				return (up
					? (a >= weight && b >= weight) ? a < b : a > b
					: (a <= weight && b <= weight) ? a > b : a < b) ? -1 : 1;
			});
			return weights[alts[0]];
		};

	}

	function HoverHandler() {

		function contains(node, anotherNode) {
			try {
				if (node.contains) return node.contains(anotherNode);
				return node.compareDocumentPosition(anotherNode) & 16;
			}
			catch (e) { } // probably a XUL element such as a scrollbar
			return false;
		}

		// mouseover/mouseout (standards) mode
		function onOverOut(e) {
			var related = e.relatedTarget;
			// there might be no relatedTarget if the element is right next
			// to the window frame
			if (related && contains(this, related)) return;
			trigger(this, e.type == 'mouseover');
		}

		// mouseenter/mouseleave (probably ie) mode
		function onEnterLeave(e) {
			if (!e) e = window.event;
			// ie model, we don't have access to "this", but
			// mouseenter/leave doesn't bubble so it's fine.
			trigger(e.target || e.srcElement, e.type == 'mouseenter');
		}

		function trigger(el, hoverState) {
			// A timeout is needed so that the event can actually "happen"
			// before replace is triggered. This ensures that styles are up
			// to date.
			setTimeout(function () {
				var options = sharedStorage.get(el).options;
				if (hoverState) {
					options = merge(options, options.hover);
					options._mediatorMode = 1;
				}
				api.replace(el, options, true);
			}, 10);
		}

		this.attach = function (el) {
			if (el.onmouseenter === undefined) {
				addEvent(el, 'mouseover', onOverOut);
				addEvent(el, 'mouseout', onOverOut);
			}
			else {
				addEvent(el, 'mouseenter', onEnterLeave);
				addEvent(el, 'mouseleave', onEnterLeave);
			}
		};

		this.detach = function (el) {
			if (el.onmouseenter === undefined) {
				removeEvent(el, 'mouseover', onOverOut);
				removeEvent(el, 'mouseout', onOverOut);
			}
			else {
				removeEvent(el, 'mouseenter', onEnterLeave);
				removeEvent(el, 'mouseleave', onEnterLeave);
			}
		};

	}

	function ReplaceHistory() {

		var list = [], map = {};

		function filter(keys) {
			var values = [], key;
			for (var i = 0; key = keys[i]; ++i) values[i] = list[map[key]];
			return values;
		}

		this.add = function (key, args) {
			map[key] = list.push(args) - 1;
		};

		this.repeat = function () {
			var snapshot = arguments.length ? filter(arguments) : list, args;
			for (var i = 0; args = snapshot[i++]; ) api.replace(args[0], args[1], true);
		};

	}

	function Storage() {

		var map = {}, at = 0;

		function identify(el) {
			return el.cufid || (el.cufid = ++at);
		}

		this.get = function (el) {
			var id = identify(el);
			return map[id] || (map[id] = {});
		};

	}

	function Style(style) {

		var custom = {}, sizes = {};

		this.extend = function (styles) {
			for (var property in styles) {
				if (hasOwnProperty(styles, property)) custom[property] = styles[property];
			}
			return this;
		};

		this.get = function (property) {
			return custom[property] != undefined ? custom[property] : style[property];
		};

		this.getSize = function (property, base) {
			return sizes[property] || (sizes[property] = new CSS.Size(this.get(property), base));
		};

		this.isUsable = function () {
			return !!style;
		};

	}

	function addEvent(el, type, listener) {
		if (el.addEventListener) {
			el.addEventListener(type, listener, false);
		}
		else if (el.attachEvent) {
			// we don't really need "this" right now, saves code
			el.attachEvent('on' + type, listener);
		}
	}

	function attach(el, options) {
		if (options._mediatorMode) return el;
		var storage = sharedStorage.get(el);
		var oldOptions = storage.options;
		if (oldOptions) {
			if (oldOptions === options) return el;
			if (oldOptions.hover) hoverHandler.detach(el);
		}
		if (options.hover && options.hoverables[el.nodeName.toLowerCase()]) {
			hoverHandler.attach(el);
		}
		storage.options = options;
		return el;
	}

	function cached(fun) {
		var cache = {};
		return function (key) {
			if (!hasOwnProperty(cache, key)) cache[key] = fun.apply(null, arguments);
			return cache[key];
		};
	}

	function getFont(el, style) {
		var families = CSS.quotedList(style.get('fontFamily').toLowerCase()), family;
		for (var i = 0; family = families[i]; ++i) {
			if (fonts[family]) return fonts[family].get(style.get('fontStyle'), style.get('fontWeight'));
		}
		return null;
	}

	function elementsByTagName(query) {
		return document.getElementsByTagName(query);
	}

	function hasOwnProperty(obj, property) {
		return obj.hasOwnProperty(property);
	}

	function merge() {
		var merged = {}, arg, key;
		for (var i = 0, l = arguments.length; arg = arguments[i], i < l; ++i) {
			for (key in arg) {
				if (hasOwnProperty(arg, key)) merged[key] = arg[key];
			}
		}
		return merged;
	}

	function process(font, text, style, options, node, el) {
		var fragment = document.createDocumentFragment(), processed;
		if (text === '') return fragment;
		var separate = options.separate;
		var parts = text.split(separators[separate]), needsAligning = (separate == 'words');
		if (needsAligning && HAS_BROKEN_REGEXP) {
			// @todo figure out a better way to do this
			if (/^\s/.test(text)) parts.unshift('');
			if (/\s$/.test(text)) parts.push('');
		}
		for (var i = 0, l = parts.length; i < l; ++i) {
			processed = engines[options.engine](font,
				needsAligning ? CSS.textAlign(parts[i], style, i, l) : parts[i],
				style, options, node, el, i < l - 1);
			if (processed) fragment.appendChild(processed);
		}
		return fragment;
	}

	function removeEvent(el, type, listener) {
		if (el.removeEventListener) {
			el.removeEventListener(type, listener, false);
		}
		else if (el.detachEvent) {
			el.detachEvent('on' + type, listener);
		}
	}

	function replaceElement(el, options) {
		var name = el.nodeName.toLowerCase();
		if (options.ignore[name]) return;
		if (options.ignoreClass && options.ignoreClass.test(el.className)) return;
		if (options.onBeforeReplace) options.onBeforeReplace(el, options);
		var replace = !options.textless[name], simple = (options.trim === 'simple');
		var style = CSS.getStyle(attach(el, options)).extend(options);
		// may cause issues if the element contains other elements
		// with larger fontSize, however such cases are rare and can
		// be fixed by using a more specific selector
		if (parseFloat(style.get('fontSize')) === 0) return;
		var font = getFont(el, style), node, type, next, anchor, text, lastElement;
		var isShy = options.softHyphens, anyShy = false, pos, shy, reShy = /\u00ad/g;
		var modifyText = options.modifyText;
		if (!font) return;
		for (node = el.firstChild; node; node = next) {
			type = node.nodeType;
			next = node.nextSibling;
			if (replace && type == 3) {
				if (isShy && el.nodeName.toLowerCase() != TAG_SHY) {
					pos = node.data.indexOf('\u00ad');
					if (pos >= 0) {
						node.splitText(pos);
						next = node.nextSibling;
						next.deleteData(0, 1);
						shy = document.createElement(TAG_SHY);
						shy.appendChild(document.createTextNode('\u00ad'));
						el.insertBefore(shy, next);
						next = shy;
						anyShy = true;
					}
				}
				// Node.normalize() is broken in IE 6, 7, 8
				if (anchor) {
					anchor.appendData(node.data);
					el.removeChild(node);
				}
				else anchor = node;
				if (next) continue;
			}
			if (anchor) {
				text = anchor.data;
				if (!isShy) text = text.replace(reShy, '');
				text = CSS.whiteSpace(text, style, anchor, lastElement, simple);
				// modify text only on the first replace
				if (modifyText) text = modifyText(text, anchor, el, options);
				el.replaceChild(process(font, text, style, options, node, el), anchor);
				anchor = null;
			}
			if (type == 1) {
				if (node.firstChild) {
					if (node.nodeName.toLowerCase() == 'cufon') {
						engines[options.engine](font, null, style, options, node, el);
					}
					else arguments.callee(node, options);
				}
				lastElement = node;
			}
		}
		if (isShy && anyShy) {
			updateShy(el);
			if (!trackingShy) addEvent(window, 'resize', updateShyOnResize);
			trackingShy = true;
		}
		if (options.onAfterReplace) options.onAfterReplace(el, options);
	}

	function updateShy(context) {
		var shys, shy, parent, glue, newGlue, next, prev, i;
		shys = context.getElementsByTagName(TAG_SHY);
		// unfortunately there doesn't seem to be any easy
		// way to avoid having to loop through the shys twice.
		for (i = 0; shy = shys[i]; ++i) {
			shy.className = C_SHY_DISABLED;
			glue = parent = shy.parentNode;
			if (glue.nodeName.toLowerCase() != TAG_GLUE) {
				newGlue = document.createElement(TAG_GLUE);
				newGlue.appendChild(shy.previousSibling);
				parent.insertBefore(newGlue, shy);
				newGlue.appendChild(shy);
			}
			else {
				// get rid of double glue (edge case fix)
				glue = glue.parentNode;
				if (glue.nodeName.toLowerCase() == TAG_GLUE) {
					parent = glue.parentNode;
					while (glue.firstChild) {
						parent.insertBefore(glue.firstChild, glue);
					}
					parent.removeChild(glue);
				}
			}
		}
		for (i = 0; shy = shys[i]; ++i) {
			shy.className = '';
			glue = shy.parentNode;
			parent = glue.parentNode;
			next = glue.nextSibling || parent.nextSibling;
			// make sure we're comparing same types
			prev = (next.nodeName.toLowerCase() == TAG_GLUE) ? glue : shy.previousSibling;
			if (prev.offsetTop >= next.offsetTop) {
				shy.className = C_SHY_DISABLED;
				if (prev.offsetTop < next.offsetTop) {
					// we have an annoying edge case, double the glue
					newGlue = document.createElement(TAG_GLUE);
					parent.insertBefore(newGlue, glue);
					newGlue.appendChild(glue);
					newGlue.appendChild(next);
				}
			}
		}
	}

	function updateShyOnResize() {
		if (ignoreResize) return; // needed for IE
		CSS.addClass(DOM.root(), C_VIEWPORT_RESIZING);
		clearTimeout(shyTimer);
		shyTimer = setTimeout(function () {
			ignoreResize = true;
			CSS.removeClass(DOM.root(), C_VIEWPORT_RESIZING);
			updateShy(document);
			ignoreResize = false;
		}, 100);
	}

	var HAS_BROKEN_REGEXP = ' '.split(/\s+/).length == 0;
	var TAG_GLUE = 'cufonglue';
	var TAG_SHY = 'cufonshy';
	var C_SHY_DISABLED = 'cufon-shy-disabled';
	var C_VIEWPORT_RESIZING = 'cufon-viewport-resizing';

	var sharedStorage = new Storage();
	var hoverHandler = new HoverHandler();
	var replaceHistory = new ReplaceHistory();
	var initialized = false;
	var trackingShy = false;
	var shyTimer;
	var ignoreResize = false;

	var engines = {}, fonts = {}, defaultOptions = {
		autoDetect: false,
		engine: null,
		forceHitArea: false,
		hover: false,
		hoverables: {
			a: true
		},
		ignore: {
			applet: 1,
			canvas: 1,
			col: 1,
			colgroup: 1,
			head: 1,
			iframe: 1,
			map: 1,
			noscript: 1,
			optgroup: 1,
			option: 1,
			script: 1,
			select: 1,
			style: 1,
			textarea: 1,
			title: 1,
			pre: 1
		},
		ignoreClass: null,
		modifyText: null,
		onAfterReplace: null,
		onBeforeReplace: null,
		printable: true,
		selector: (
				window.Sizzle
			|| (window.jQuery && function (query) { return jQuery(query); }) // avoid noConflict issues
			|| (window.dojo && dojo.query)
			|| (window.glow && glow.dom && glow.dom.get)
			|| (window.Ext && Ext.query)
			|| (window.YAHOO && YAHOO.util && YAHOO.util.Selector && YAHOO.util.Selector.query)
			|| (window.$$ && function (query) { return $$(query); })
			|| (window.$ && function (query) { return $(query); })
			|| (document.querySelectorAll && function (query) { return document.querySelectorAll(query); })
			|| elementsByTagName
		),
		separate: 'words', // 'none' and 'characters' are also accepted
		softHyphens: true,
		textless: {
			dl: 1,
			html: 1,
			ol: 1,
			table: 1,
			tbody: 1,
			thead: 1,
			tfoot: 1,
			tr: 1,
			ul: 1
		},
		textShadow: 'none',
		trim: 'advanced'
	};

	var separators = {
		// The first pattern may cause unicode characters above
		// code point 255 to be removed in Safari 3.0. Luckily enough
		// Safari 3.0 does not include non-breaking spaces in \s, so
		// we can just use a simple alternative pattern.
		words: /\s/.test('\u00a0') ? /[^\S\u00a0]+/ : /\s+/,
		characters: '',
		none: /^/
	};

	api.now = function () {
		DOM.ready();
		return api;
	};

	api.refresh = function () {
		replaceHistory.repeat.apply(replaceHistory, arguments);
		return api;
	};

	api.registerEngine = function (id, engine) {
		if (!engine) return api;
		engines[id] = engine;
		return api.set('engine', id);
	};

	api.registerFont = function (data) {
		if (!data) return api;
		var font = new Font(data), family = font.family;
		if (!fonts[family]) fonts[family] = new FontFamily();
		fonts[family].add(font);
		return api.set('fontFamily', '"' + family + '"');
	};

	api.replace = function (elements, options, ignoreHistory) {
		options = merge(defaultOptions, options);
		if (!options.engine) return api; // there's no browser support so we'll just stop here
		if (!initialized) {
			CSS.addClass(DOM.root(), 'cufon-active cufon-loading');
			CSS.ready(function () {
				// fires before any replace() calls, but it doesn't really matter
				CSS.addClass(CSS.removeClass(DOM.root(), 'cufon-loading'), 'cufon-ready');
			});
			initialized = true;
		}
		if (options.hover) options.forceHitArea = true;
		if (options.autoDetect) delete options.fontFamily;
		if (typeof options.ignoreClass == 'string') {
			options.ignoreClass = new RegExp('(?:^|\\s)(?:' + options.ignoreClass.replace(/\s+/g, '|') + ')(?:\\s|$)');
		}
		if (typeof options.textShadow == 'string') {
			options.textShadow = CSS.textShadow(options.textShadow);
		}
		if (typeof options.color == 'string' && /^-/.test(options.color)) {
			options.textGradient = CSS.gradient(options.color);
		}
		else delete options.textGradient;
		if (typeof elements == 'string') {
			if (!ignoreHistory) replaceHistory.add(elements, arguments);
			elements = [elements];
		}
		else if (elements.nodeType) elements = [elements];
		CSS.ready(function () {
			for (var i = 0, l = elements.length; i < l; ++i) {
				var el = elements[i];
				if (typeof el == 'string') api.replace(options.selector(el), options, true);
				else replaceElement(el, options);
			}
		});
		return api;
	};

	api.set = function (option, value) {
		defaultOptions[option] = value;
		return api;
	};

	return api;

})();

Cufon.registerEngine('vml', (function () {

	var ns = document.namespaces;
	if (!ns) return;
	ns.add('cvml', 'urn:schemas-microsoft-com:vml');
	ns = null;

	var check = document.createElement('cvml:shape');
	check.style.behavior = 'url(#default#VML)';
	if (!check.coordsize) return; // VML isn't supported
	check = null;

	var HAS_BROKEN_LINEHEIGHT = (document.documentMode || 0) < 8;

	document.write(('<style type="text/css">' +
		'cufoncanvas{text-indent:0;}' +
		'@media screen{' +
			'cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}' +
			'cufoncanvas{position:absolute;text-align:left;}' +
			'cufon{display:inline-block;position:relative;vertical-align:' +
			(HAS_BROKEN_LINEHEIGHT
				? 'middle'
				: 'text-bottom') +
			';}' +
			'cufon cufontext{position:absolute;left:-10000in;font-size:1px;text-align:left;}' +
			'cufonshy.cufon-shy-disabled,.cufon-viewport-resizing cufonshy{display:none;}' +
			'cufonglue{white-space:nowrap;display:inline-block;}' +
			'.cufon-viewport-resizing cufonglue{white-space:normal;}' +
			'a cufon{cursor:pointer}' + // ignore !important here
		'}' +
		'@media print{' +
			'cufon cufoncanvas{display:none;}' +
		'}' +
	'</style>').replace(/;/g, '!important;'));

	function getFontSizeInPixels(el, value) {
		return getSizeInPixels(el, /(?:em|ex|%)$|^[a-z-]+$/i.test(value) ? '1em' : value);
	}

	// Original by Dead Edwards.
	// Combined with getFontSizeInPixels it also works with relative units.
	function getSizeInPixels(el, value) {
		if (!isNaN(value) || /px$/i.test(value)) return parseFloat(value);
		var style = el.style.left, runtimeStyle = el.runtimeStyle.left;
		el.runtimeStyle.left = el.currentStyle.left;
		el.style.left = value.replace('%', 'em');
		var result = el.style.pixelLeft;
		el.style.left = style;
		el.runtimeStyle.left = runtimeStyle;
		return result;
	}

	function getSpacingValue(el, style, size, property) {
		var key = 'computed' + property, value = style[key];
		if (isNaN(value)) {
			value = style.get(property);
			style[key] = value = (value == 'normal') ? 0 : ~ ~size.convertFrom(getSizeInPixels(el, value));
		}
		return value;
	}

	var fills = {};

	function gradientFill(gradient) {
		var id = gradient.id;
		if (!fills[id]) {
			var stops = gradient.stops, fill = document.createElement('cvml:fill'), colors = [];
			fill.type = 'gradient';
			fill.angle = 180;
			fill.focus = '0';
			fill.method = 'none';
			fill.color = stops[0][1];
			for (var j = 1, k = stops.length - 1; j < k; ++j) {
				colors.push(stops[j][0] * 100 + '% ' + stops[j][1]);
			}
			fill.colors = colors.join(',');
			fill.color2 = stops[k][1];
			fills[id] = fill;
		}
		return fills[id];
	}

	return function (font, text, style, options, node, el, hasNext) {

		var redraw = (text === null);

		if (redraw) text = node.alt;

		var viewBox = font.viewBox;

		var size = style.computedFontSize || (style.computedFontSize = new Cufon.CSS.Size(getFontSizeInPixels(el, style.get('fontSize')) + 'px', font.baseSize));

		var wrapper, canvas;

		if (redraw) {
			wrapper = node;
			canvas = node.firstChild;
		}
		else {
			wrapper = document.createElement('cufon');
			wrapper.className = 'cufon cufon-vml';
			wrapper.alt = text;

			canvas = document.createElement('cufoncanvas');
			wrapper.appendChild(canvas);

			if (options.printable) {
				var print = document.createElement('cufontext');
				print.appendChild(document.createTextNode(text));
				wrapper.appendChild(print);
			}

			// ie6, for some reason, has trouble rendering the last VML element in the document.
			// we can work around this by injecting a dummy element where needed.
			// @todo find a better solution
			if (!hasNext) wrapper.appendChild(document.createElement('cvml:shape'));
		}

		var wStyle = wrapper.style;
		var cStyle = canvas.style;

		var height = size.convert(viewBox.height), roundedHeight = Math.ceil(height);
		var roundingFactor = roundedHeight / height;
		var stretchFactor = roundingFactor * Cufon.CSS.fontStretch(style.get('fontStretch'));
		var minX = viewBox.minX, minY = viewBox.minY;

		cStyle.height = roundedHeight;
		cStyle.top = Math.round(size.convert(minY - font.ascent));
		cStyle.left = Math.round(size.convert(minX));

		wStyle.height = size.convert(font.height) + 'px';

		var color = style.get('color');
		var chars = Cufon.CSS.textTransform(text, style).split('');

		var jumps = font.spacing(chars,
			getSpacingValue(el, style, size, 'letterSpacing'),
			getSpacingValue(el, style, size, 'wordSpacing')
		);

		if (!jumps.length) return null;

		var width = jumps.total;
		var fullWidth = -minX + width + (viewBox.width - jumps[jumps.length - 1]);

		var shapeWidth = size.convert(fullWidth * stretchFactor), roundedShapeWidth = Math.round(shapeWidth);

		var coordSize = fullWidth + ',' + viewBox.height, coordOrigin;
		var stretch = 'r' + coordSize + 'ns';

		var fill = options.textGradient && gradientFill(options.textGradient);

		var glyphs = font.glyphs, offsetX = 0;
		var shadows = options.textShadow;
		var i = -1, j = 0, chr;

		while (chr = chars[++i]) {

			var glyph = glyphs[chars[i]] || font.missingGlyph, shape;
			if (!glyph) continue;

			if (redraw) {
				// some glyphs may be missing so we can't use i
				shape = canvas.childNodes[j];
				while (shape.firstChild) shape.removeChild(shape.firstChild); // shadow, fill
			}
			else {
				shape = document.createElement('cvml:shape');
				canvas.appendChild(shape);
			}

			shape.stroked = 'f';
			shape.coordsize = coordSize;
			shape.coordorigin = coordOrigin = (minX - offsetX) + ',' + minY;
			shape.path = (glyph.d ? 'm' + glyph.d + 'xe' : '') + 'm' + coordOrigin + stretch;
			shape.fillcolor = color;

			if (fill) shape.appendChild(fill.cloneNode(false));

			// it's important to not set top/left or IE8 will grind to a halt
			var sStyle = shape.style;
			sStyle.width = roundedShapeWidth;
			sStyle.height = roundedHeight;

			if (shadows) {
				// due to the limitations of the VML shadow element there
				// can only be two visible shadows. opacity is shared
				// for all shadows.
				var shadow1 = shadows[0], shadow2 = shadows[1];
				var color1 = Cufon.CSS.color(shadow1.color), color2;
				var shadow = document.createElement('cvml:shadow');
				shadow.on = 't';
				shadow.color = color1.color;
				shadow.offset = shadow1.offX + ',' + shadow1.offY;
				if (shadow2) {
					color2 = Cufon.CSS.color(shadow2.color);
					shadow.type = 'double';
					shadow.color2 = color2.color;
					shadow.offset2 = shadow2.offX + ',' + shadow2.offY;
				}
				shadow.opacity = color1.opacity || (color2 && color2.opacity) || 1;
				shape.appendChild(shadow);
			}

			offsetX += jumps[j++];
		}

		// addresses flickering issues on :hover

		var cover = shape.nextSibling, coverFill, vStyle;

		if (options.forceHitArea) {

			if (!cover) {
				cover = document.createElement('cvml:rect');
				cover.stroked = 'f';
				cover.className = 'cufon-vml-cover';
				coverFill = document.createElement('cvml:fill');
				coverFill.opacity = 0;
				cover.appendChild(coverFill);
				canvas.appendChild(cover);
			}

			vStyle = cover.style;

			vStyle.width = roundedShapeWidth;
			vStyle.height = roundedHeight;

		}
		else if (cover) canvas.removeChild(cover);

		wStyle.width = Math.max(Math.ceil(size.convert(width * stretchFactor)), 0);

		if (HAS_BROKEN_LINEHEIGHT) {

			var yAdjust = style.computedYAdjust;

			if (yAdjust === undefined) {
				var lineHeight = style.get('lineHeight');
				if (lineHeight == 'normal') lineHeight = '1em';
				else if (!isNaN(lineHeight)) lineHeight += 'em'; // no unit
				style.computedYAdjust = yAdjust = 0.5 * (getSizeInPixels(el, lineHeight) - parseFloat(wStyle.height));
			}

			if (yAdjust) {
				wStyle.marginTop = Math.ceil(yAdjust) + 'px';
				wStyle.marginBottom = yAdjust + 'px';
			}

		}

		return wrapper;

	};

})());

Cufon.registerEngine('canvas', (function () {

	// Safari 2 doesn't support .apply() on native methods

	var check = document.createElement('canvas');
	if (!check || !check.getContext || !check.getContext.apply) return;
	check = null;

	var HAS_INLINE_BLOCK = Cufon.CSS.supports('display', 'inline-block');

	// Firefox 2 w/ non-strict doctype (almost standards mode)
	var HAS_BROKEN_LINEHEIGHT = !HAS_INLINE_BLOCK && (document.compatMode == 'BackCompat' || /frameset|transitional/i.test(document.doctype.publicId));

	var styleSheet = document.createElement('style');
	styleSheet.type = 'text/css';
	styleSheet.appendChild(document.createTextNode((
		'cufon{text-indent:0;}' +
		'@media screen,projection{' +
			'cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;' +
			(HAS_BROKEN_LINEHEIGHT
				? ''
				: 'font-size:1px;line-height:1px;') +
			'}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;text-align:left;text-indent:-10000in;}' +
			(HAS_INLINE_BLOCK
				? 'cufon canvas{position:relative;}'
				: 'cufon canvas{position:absolute;}') +
			'cufonshy.cufon-shy-disabled,.cufon-viewport-resizing cufonshy{display:none;}' +
			'cufonglue{white-space:nowrap;display:inline-block;}' +
			'.cufon-viewport-resizing cufonglue{white-space:normal;}' +
		'}' +
		'@media print{' +
			'cufon{padding:0;}' + // Firefox 2
			'cufon canvas{display:none;}' +
		'}'
	).replace(/;/g, '!important;')));
	document.getElementsByTagName('head')[0].appendChild(styleSheet);

	function generateFromVML(path, context) {
		var atX = 0, atY = 0;
		var code = [], re = /([mrvxe])([^a-z]*)/g, match;
		generate: for (var i = 0; match = re.exec(path); ++i) {
			var c = match[2].split(',');
			switch (match[1]) {
				case 'v':
					code[i] = { m: 'bezierCurveTo', a: [atX + ~ ~c[0], atY + ~ ~c[1], atX + ~ ~c[2], atY + ~ ~c[3], atX += ~ ~c[4], atY += ~ ~c[5]] };
					break;
				case 'r':
					code[i] = { m: 'lineTo', a: [atX += ~ ~c[0], atY += ~ ~c[1]] };
					break;
				case 'm':
					code[i] = { m: 'moveTo', a: [atX = ~ ~c[0], atY = ~ ~c[1]] };
					break;
				case 'x':
					code[i] = { m: 'closePath' };
					break;
				case 'e':
					break generate;
			}
			context[code[i].m].apply(context, code[i].a);
		}
		return code;
	}

	function interpret(code, context) {
		for (var i = 0, l = code.length; i < l; ++i) {
			var line = code[i];
			context[line.m].apply(context, line.a);
		}
	}

	return function (font, text, style, options, node, el) {

		var redraw = (text === null);

		if (redraw) text = node.getAttribute('alt');

		var viewBox = font.viewBox;

		var size = style.getSize('fontSize', font.baseSize);

		var expandTop = 0, expandRight = 0, expandBottom = 0, expandLeft = 0;
		var shadows = options.textShadow, shadowOffsets = [];
		if (shadows) {
			for (var i = shadows.length; i--; ) {
				var shadow = shadows[i];
				var x = size.convertFrom(parseFloat(shadow.offX));
				var y = size.convertFrom(parseFloat(shadow.offY));
				shadowOffsets[i] = [x, y];
				if (y < expandTop) expandTop = y;
				if (x > expandRight) expandRight = x;
				if (y > expandBottom) expandBottom = y;
				if (x < expandLeft) expandLeft = x;
			}
		}

		var chars = Cufon.CSS.textTransform(text, style).split('');

		var jumps = font.spacing(chars,
			~ ~size.convertFrom(parseFloat(style.get('letterSpacing')) || 0),
			~ ~size.convertFrom(parseFloat(style.get('wordSpacing')) || 0)
		);

		if (!jumps.length) return null; // there's nothing to render

		var width = jumps.total;

		expandRight += viewBox.width - jumps[jumps.length - 1];
		expandLeft += viewBox.minX;

		var wrapper, canvas;

		if (redraw) {
			wrapper = node;
			canvas = node.firstChild;
		}
		else {
			wrapper = document.createElement('cufon');
			wrapper.className = 'cufon cufon-canvas';
			wrapper.setAttribute('alt', text);

			canvas = document.createElement('canvas');
			wrapper.appendChild(canvas);

			if (options.printable) {
				var print = document.createElement('cufontext');
				print.appendChild(document.createTextNode(text));
				wrapper.appendChild(print);
			}
		}

		var wStyle = wrapper.style;
		var cStyle = canvas.style;

		var height = size.convert(viewBox.height);
		var roundedHeight = Math.ceil(height);
		var roundingFactor = roundedHeight / height;
		var stretchFactor = roundingFactor * Cufon.CSS.fontStretch(style.get('fontStretch'));
		var stretchedWidth = width * stretchFactor;

		var canvasWidth = Math.ceil(size.convert(stretchedWidth + expandRight - expandLeft));
		var canvasHeight = Math.ceil(size.convert(viewBox.height - expandTop + expandBottom));

		canvas.width = canvasWidth;
		canvas.height = canvasHeight;

		// needed for WebKit and full page zoom
		cStyle.width = canvasWidth + 'px';
		cStyle.height = canvasHeight + 'px';

		// minY has no part in canvas.height
		expandTop += viewBox.minY;

		cStyle.top = Math.round(size.convert(expandTop - font.ascent)) + 'px';
		cStyle.left = Math.round(size.convert(expandLeft)) + 'px';

		var wrapperWidth = Math.max(Math.ceil(size.convert(stretchedWidth)), 0) + 'px';

		if (HAS_INLINE_BLOCK) {
			wStyle.width = wrapperWidth;
			wStyle.height = size.convert(font.height) + 'px';
		}
		else {
			wStyle.paddingLeft = wrapperWidth;
			wStyle.paddingBottom = (size.convert(font.height) - 1) + 'px';
		}

		var g = canvas.getContext('2d'), scale = height / viewBox.height;
		var pixelRatio = window.devicePixelRatio || 1;
		if (pixelRatio != 1) {
			canvas.width = canvasWidth * pixelRatio;
			canvas.height = canvasHeight * pixelRatio;
			g.scale(pixelRatio, pixelRatio);
		}

		// proper horizontal scaling is performed later
		g.scale(scale, scale * roundingFactor);
		g.translate(-expandLeft, -expandTop);
		g.save();

		function renderText() {
			var glyphs = font.glyphs, glyph, i = -1, j = -1, chr;
			g.scale(stretchFactor, 1);
			while (chr = chars[++i]) {
				var glyph = glyphs[chars[i]] || font.missingGlyph;
				if (!glyph) continue;
				if (glyph.d) {
					g.beginPath();
					if (glyph.code) interpret(glyph.code, g);
					else glyph.code = generateFromVML('m' + glyph.d, g);
					g.fill();
				}
				g.translate(jumps[++j], 0);
			}
			g.restore();
		}

		if (shadows) {
			for (var i = shadows.length; i--; ) {
				var shadow = shadows[i];
				g.save();
				g.fillStyle = shadow.color;
				g.translate.apply(g, shadowOffsets[i]);
				renderText();
			}
		}

		var gradient = options.textGradient;
		if (gradient) {
			var stops = gradient.stops, fill = g.createLinearGradient(0, viewBox.minY, 0, viewBox.maxY);
			for (var i = 0, l = stops.length; i < l; ++i) {
				fill.addColorStop.apply(fill, stops[i]);
			}
			g.fillStyle = fill;
		}
		else g.fillStyle = style.get('color');

		renderText();

		return wrapper;

	};

})());

;;;/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Digitized data (C) 2004 Agfa Monotype Corporation. Neo Sans(TM) is a trademark
 * of Agfa Monotype Corporation and may be registered in certain jurisdictions. 
 * All rights reserved. Neo Sans is designed by Sebastian Lester.
 * 
 * Manufacturer:
 * Digitized data (C) Agfa Monotype Corporation. Neo Sans(TM) is a trademark of
 * Agfa Monotype Corporation and may be registered in certain jurisdictions
 */
Cufon.registerFont({"w":605,"face":{"font-family":"FjordkraftNeo","font-weight":400,"font-stretch":"normal","units-per-em":"1000","panose-1":"2 0 5 6 2 0 0 2 0 4","ascent":"800","descent":"-200","x-height":"7","bbox":"-35.5983 -980 806.13 209.5","underline-thickness":"57","underline-position":"-21","unicode-range":"U+0020-U+00F8"},"glyphs":{" ":{"w":247},"!":{"d":"84,-752v28,2,70,-9,70,19r-8,520v0,24,-31,19,-55,19v-10,0,-20,-9,-20,-19r-7,-520v0,-10,10,-19,20,-19xm85,-132v27,2,67,-9,67,19r0,94v1,30,-41,16,-67,19v-10,0,-19,-9,-19,-19r0,-94v0,-10,9,-19,19,-19","w":217},"\"":{"d":"266,-752v25,0,75,-12,66,19r-58,189v-5,29,-38,16,-66,19v-10,2,-10,-12,-8,-19r46,-189v3,-13,9,-19,20,-19xm96,-752v25,0,75,-12,66,19r-58,189v-5,29,-38,16,-66,19v-10,2,-10,-12,-8,-19r46,-189v3,-13,9,-19,20,-19","w":362,"k":{".":65,",":65}},"#":{"d":"594,-531v20,0,16,25,14,43v-1,13,-8,19,-20,19r-97,0r-18,202r98,0v20,0,16,25,14,42v-1,13,-8,19,-20,19r-98,0r-16,187v0,26,-36,18,-62,19v-11,0,-17,-8,-16,-19r16,-187r-155,0r-16,187v0,27,-37,18,-63,19v-10,0,-17,-8,-16,-19r16,-187r-93,0v-20,0,-16,-25,-14,-42v1,-13,8,-19,20,-19r93,0r18,-202r-94,0v-20,0,-16,-25,-14,-43v1,-13,8,-19,20,-19r93,0r17,-193v1,-26,38,-18,64,-19v10,0,16,8,15,19r-17,193r155,0r17,-193v1,-26,37,-18,63,-19v11,0,15,8,15,19r-17,193r98,0xm258,-469r-18,202r155,0r18,-202r-155,0","w":660},"$":{"d":"491,-661v-132,-3,-360,-52,-315,121v83,124,298,138,344,291v42,137,-46,240,-175,252r0,94v0,28,-39,20,-67,20v-37,0,-14,-73,-20,-110v-61,-2,-114,-5,-159,-20v-3,-18,-15,-71,17,-69v133,7,325,43,317,-111v-4,-80,-66,-97,-120,-134v-64,-43,-160,-90,-201,-143v-23,-28,-34,-63,-34,-103v1,-113,73,-160,180,-174v5,-37,-16,-100,20,-106v28,1,67,-8,67,20r0,83r146,13v27,2,17,35,17,60v0,11,-6,16,-17,16"},"%":{"d":"749,-155v1,101,-42,162,-134,162v-92,0,-136,-62,-135,-162r0,-93v-1,-102,43,-162,135,-162v92,0,135,61,134,162r0,93xm579,-739v22,-6,84,-16,66,15r-428,724v-13,10,-41,2,-61,4v-13,1,-10,-13,-6,-20r418,-708v5,-7,8,-12,11,-15xm314,-496v1,101,-42,162,-134,162v-92,0,-136,-62,-135,-162r0,-93v-1,-102,43,-161,135,-161v92,0,135,60,134,161r0,93xm615,-50v86,3,71,-110,72,-198v0,-65,-17,-103,-72,-105v-86,-3,-73,109,-73,198v0,65,18,103,73,105xm180,-391v86,3,71,-110,72,-198v0,-65,-17,-103,-72,-105v-86,-3,-73,109,-73,198v0,65,18,103,73,105","w":794},"&":{"d":"610,-361v2,101,-21,183,-63,244r89,95v9,7,5,22,-6,22v-28,0,-70,9,-85,-7r-50,-54v-115,110,-455,98,-442,-123v7,-110,73,-148,144,-197v-44,-62,-112,-107,-111,-210v0,-114,91,-159,210,-159v132,0,230,77,193,214v-22,83,-106,120,-175,170r181,195v28,-49,40,-114,39,-190v-1,-26,37,-16,59,-16v11,0,17,5,17,16xm296,-683v-85,-2,-146,34,-126,126v12,58,55,90,93,135v58,-48,149,-62,149,-169v0,-68,-49,-91,-116,-92xm145,-184v-7,152,225,145,302,71r-199,-213v-53,36,-99,59,-103,142","w":678},"'":{"d":"96,-752v25,0,75,-12,66,19r-58,189v-5,29,-38,16,-66,19v-10,2,-10,-12,-8,-19r46,-189v3,-13,9,-19,20,-19","w":192,"k":{".":65,",":65}},"(":{"d":"277,191v5,7,5,19,-7,18v-25,-3,-59,8,-70,-11v-157,-174,-185,-611,-59,-846v21,-40,40,-75,69,-102v16,-3,41,-1,60,-2v12,-1,12,11,7,18v-121,161,-166,468,-97,716v22,77,54,146,97,209","w":305},")":{"d":"108,-750v168,160,197,619,70,855v-21,40,-41,76,-70,103v-16,3,-40,0,-59,1v-12,1,-12,-11,-7,-18v121,-161,165,-468,96,-716v-22,-77,-53,-146,-96,-209v-5,-7,-5,-19,7,-18v19,1,43,-1,59,2","w":305},"*":{"d":"62,-583v-23,-5,-11,-31,-5,-49v3,-10,11,-12,22,-8r124,41r0,-131v-2,-26,24,-18,45,-19v10,0,15,6,15,19r-1,131r134,-43v19,2,16,29,23,44v0,7,-5,12,-14,15r-125,39v27,40,60,74,82,119v-8,16,-37,45,-53,22r-76,-106r-76,106v-15,23,-35,-2,-48,-11v-9,-6,-7,-15,-1,-24r78,-106","w":465},"+":{"d":"530,-411v-1,24,7,56,-20,56r-172,0r0,171v2,27,-32,19,-56,20v-11,0,-16,-10,-16,-20r0,-171r-171,0v-27,2,-19,-32,-20,-56v0,-11,10,-16,20,-16r171,0r0,-172v-2,-27,32,-19,56,-20v11,0,16,10,16,20r0,172r172,0v10,0,20,5,20,16"},",":{"d":"98,-129v25,0,81,-12,69,19r-83,204v-10,9,-35,2,-52,4v-11,1,-14,-10,-11,-19r57,-189v4,-13,11,-19,20,-19","w":214,"k":{"'":65,"\"":65}},"-":{"d":"48,-273v1,-24,-7,-58,19,-57r199,0v28,-2,17,33,19,57v0,11,-6,17,-19,17r-199,0v-13,0,-19,-6,-19,-17","w":333},".":{"d":"150,-21v0,28,-40,19,-67,20v-36,-7,-19,-75,-19,-113v0,-28,40,-17,67,-19v10,0,19,9,19,19r0,93","w":214,"k":{"'":65,"\"":65}},"\/":{"d":"268,-743v25,3,74,-11,64,20r-232,717v-11,12,-42,3,-63,6v-11,1,-16,-10,-13,-20r232,-717v2,-4,7,-6,12,-6","w":355,"k":{"\/":32}},"0":{"d":"548,-304v-1,187,-64,311,-245,311v-181,0,-246,-123,-246,-311r0,-135v0,-188,65,-311,246,-311v181,0,244,124,245,311r0,135xm303,-70v168,0,156,-193,154,-369v-2,-131,-31,-234,-154,-234v-168,0,-156,193,-154,369v2,131,31,234,154,234"},"1":{"d":"373,-20v0,30,-45,17,-73,20v-10,0,-18,-10,-18,-20r0,-629v-48,19,-91,43,-142,59v-18,-6,-7,-51,-6,-70v49,-29,107,-50,158,-77v18,-9,38,-5,62,-6v10,0,19,9,19,19r0,704"},"2":{"d":"437,-571v0,-146,-211,-98,-331,-88v-24,1,-19,-48,-10,-65v48,-21,125,-26,191,-26v149,0,239,42,239,179v0,146,-134,189,-226,258v-78,58,-145,100,-140,234r337,0v28,-1,19,35,20,61v0,10,-10,18,-20,18r-397,0v-36,-3,-19,-65,-20,-100v-6,-209,183,-271,305,-368v31,-26,52,-49,52,-103"},"3":{"d":"521,-228v17,231,-214,261,-418,215v-22,-5,-20,-28,-19,-53v0,-12,7,-18,20,-17v30,4,60,7,89,10v139,17,247,-6,235,-155v-6,-74,-39,-122,-117,-122r-182,0v-26,2,-18,-30,-19,-53v0,-13,6,-19,19,-19r182,0v84,0,119,-49,117,-133v-2,-93,-53,-118,-156,-119v-64,-1,-114,10,-171,15v-25,2,-20,-46,-11,-64v47,-21,115,-26,182,-27v153,-2,254,50,249,209v-2,76,-39,130,-95,156v57,28,89,77,95,157"},"4":{"d":"548,-274v26,-1,18,34,19,58v0,12,-6,18,-19,18r-87,0r0,178v1,32,-47,17,-75,20v-11,0,-17,-10,-17,-20r0,-178r-289,0v-47,5,-41,-35,-41,-77v0,-14,4,-26,12,-37r296,-415v10,-24,55,-14,88,-16v17,0,26,7,26,22r0,447r87,0xm370,-616v0,-10,-9,-7,-13,0r-231,328v-4,6,-5,14,5,14r239,0r0,-342"},"5":{"d":"528,-241v0,233,-213,278,-431,230v-24,-5,-19,-32,-19,-57v0,-12,7,-17,20,-15v56,9,115,14,175,14v116,1,163,-56,163,-172v0,-156,-172,-132,-329,-134v-9,0,-17,-8,-16,-18r28,-333v1,-10,9,-17,20,-17r344,0v28,-1,19,35,20,61v0,11,-10,16,-20,16r-287,0r-16,216v191,-4,348,23,348,209"},"6":{"d":"498,-657v-54,-11,-111,-17,-177,-17v-144,0,-176,90,-171,233v45,-10,92,-21,151,-20v150,1,246,61,245,215v-1,158,-82,255,-244,253v-163,-2,-245,-104,-242,-284r0,-175v-1,-191,73,-299,261,-298v77,1,135,5,188,23v13,8,6,34,7,52v1,12,-7,18,-18,18xm302,-67v113,0,154,-68,154,-185v0,-159,-181,-150,-306,-120v-4,158,-5,305,152,305"},"7":{"d":"458,-743v72,-5,89,58,62,115r-288,613v-10,26,-51,12,-82,15v-14,1,-18,-15,-12,-26r303,-632v0,-5,-2,-7,-7,-7r-341,0v-27,1,-19,-34,-20,-59v0,-10,10,-19,20,-19r365,0","k":{"\/":101}},"8":{"d":"551,-226v5,163,-96,233,-253,233v-150,0,-248,-73,-243,-233v3,-80,43,-131,97,-162v-59,-29,-96,-82,-95,-165v3,-144,104,-198,251,-197v144,1,243,58,241,206v-1,76,-38,129,-95,156v54,31,95,82,97,162xm272,-424v114,5,192,-20,189,-129v-2,-89,-65,-123,-163,-123v-96,0,-156,38,-153,132v2,78,46,116,127,120xm298,-69v108,0,166,-49,162,-157v-3,-100,-74,-134,-188,-126v-87,6,-127,56,-126,145v1,90,57,138,152,138"},"9":{"d":"98,-86v54,11,111,17,177,17v144,0,177,-90,172,-233v-46,10,-93,21,-151,20v-150,-1,-247,-60,-246,-215v1,-159,82,-255,244,-253v164,2,246,103,243,284r0,175v1,191,-73,299,-261,298v-78,-1,-135,-5,-189,-23v-13,-8,-6,-34,-7,-52v-1,-12,7,-18,18,-18xm140,-497v0,161,171,159,306,126v5,-156,6,-309,-151,-305v-111,3,-155,65,-155,179"},":":{"d":"153,-437v0,27,-40,17,-67,19v-37,-6,-20,-74,-20,-112v0,-28,40,-19,67,-20v37,6,20,74,20,113xm153,-19v0,27,-40,17,-67,19v-38,-6,-20,-75,-20,-113v0,-27,40,-17,67,-19v38,6,20,75,20,113","w":219},";":{"d":"85,-550v28,2,68,-9,68,20r0,93v1,30,-42,16,-68,19v-10,0,-19,-9,-19,-19r0,-93v0,-10,9,-20,19,-20xm87,-128v25,0,80,-12,68,19r-83,204v-9,10,-34,3,-51,5v-11,1,-14,-11,-11,-20r57,-189v4,-13,11,-19,20,-19","w":219},"<":{"d":"472,-167v11,9,16,27,-2,27v-33,0,-68,5,-89,-13r-241,-204v-24,-19,-24,-49,0,-68r241,-204v17,-20,55,-13,89,-13v18,0,13,18,2,27r-262,224"},"=":{"d":"515,-522v-1,24,7,56,-20,56r-385,0v-27,2,-19,-32,-20,-56v0,-11,10,-16,20,-16r385,0v10,0,20,5,20,16xm515,-301v-1,24,7,56,-20,56r-385,0v-27,2,-19,-32,-20,-56v0,-11,10,-16,20,-16r385,0v10,0,20,5,20,16"},">":{"d":"465,-425v24,19,24,49,0,68r-241,204v-21,21,-53,13,-89,13v-18,0,-13,-18,-2,-27r262,-224r-262,-224v-11,-9,-16,-27,2,-27v33,0,68,-5,89,13"},"?":{"d":"288,-587v11,-121,-149,-75,-240,-75v-24,0,-14,-45,-12,-67v33,-20,98,-19,150,-21v133,-5,228,58,196,198v-23,101,-118,157,-172,238v-16,23,-13,63,-13,101v-1,26,-38,19,-64,19v-35,0,-15,-74,-16,-110v24,-113,138,-148,169,-254v2,-9,2,-19,2,-29xm131,-132v27,2,67,-8,67,20r0,93v1,30,-41,16,-67,19v-37,-6,-15,-74,-20,-112v-1,-10,10,-20,20,-20","w":446},"@":{"d":"507,96v-243,43,-491,-29,-465,-288v10,-100,9,-204,48,-280v56,-112,163,-184,329,-184v190,0,302,107,309,290v9,236,-131,312,-364,312v-101,0,-170,-54,-160,-157v9,-91,12,-187,66,-235v58,-52,190,-46,270,-20v4,3,6,10,6,19r-30,313v115,-14,150,-101,146,-232v-4,-149,-92,-232,-246,-232v-177,0,-279,94,-294,254r-17,184v5,145,101,211,252,213r145,-7v16,1,10,38,5,50xm287,-212v-14,85,60,94,145,84r25,-281v-46,-5,-108,-13,-133,16v-32,36,-27,120,-37,181","w":767},"A":{"d":"603,-23v10,35,-45,20,-75,23v-10,0,-14,-8,-17,-15r-65,-230r-259,0r-64,230v-6,24,-49,12,-77,15v-14,1,-19,-11,-16,-23r185,-651v9,-80,139,-101,185,-38v8,10,14,22,18,37xm336,-653v-5,-24,-33,-23,-39,0r-91,329r221,0","w":633,"k":{"\u00e6":10,"\u00e5":10,"\u00d8":25,"y":53,"w":39,"v":53,"u":10,"t":45,"q":10,"o":10,"g":10,"f":45,"e":10,"d":10,"c":10,"a":10,"Y":85,"W":32,"V":70,"U":25,"T":90,"S":16,"Q":25,"O":25,"L":18,"G":22,"C":22}},"B":{"d":"566,-222v11,238,-233,244,-455,220v-23,-3,-33,-11,-33,-37r0,-666v2,-49,49,-40,100,-43v194,-13,391,4,384,207v-3,81,-45,133,-107,157v65,21,107,80,111,162xm324,-422v97,0,149,-37,147,-135v-3,-137,-169,-115,-301,-113r0,248r154,0xm170,-74v148,8,315,20,305,-148v-6,-89,-57,-127,-151,-127r-154,0r0,275","w":616,"k":{"\u00c6":21,"Y":34,"T":32,"A":19}},"C":{"d":"151,-302v-1,151,60,241,219,226r124,-7v25,-1,13,35,16,57v-25,44,-111,33,-186,33v-179,0,-263,-118,-264,-309r0,-139v-5,-226,127,-336,356,-303v29,4,54,8,76,10v28,3,14,40,16,64v2,20,-32,9,-48,8r-135,-6v-129,3,-173,92,-174,227r0,139","w":545,"k":{"\u00d8":28,"y":21,"o":10,"Q":28,"O":28,"G":28,"C":16}},"D":{"d":"584,-304v12,273,-208,345,-485,301v-14,-2,-21,-10,-21,-25r0,-687v2,-40,55,-30,94,-31r109,-4v201,1,302,108,303,311r0,135xm170,-73v202,22,333,-35,323,-231r0,-135v1,-153,-65,-233,-212,-233r-111,3r0,596","w":641,"k":{"\u00c6":23,"\u00c5":23,"Z":21,"Y":31,"X":31,"W":10,"V":20,"T":36,"A":23}},"E":{"d":"169,-179v-4,83,39,104,123,104r193,0v21,4,10,51,9,72v-44,16,-134,10,-203,10v-138,0,-213,-49,-213,-186r0,-385v-14,-210,208,-194,408,-180v18,6,10,42,10,64v0,8,-4,12,-11,12r-193,0v-84,-2,-123,20,-123,104r0,139r307,0v25,0,20,32,20,58v0,10,-10,20,-20,20r-307,0r0,168","w":551},"F":{"d":"496,-405v0,26,5,58,-20,58r-307,0r0,327v-1,29,-43,18,-71,20v-10,0,-20,-10,-20,-20r0,-544v-14,-210,208,-194,408,-180v18,6,10,42,10,64v0,8,-4,12,-11,12r-193,0v-84,-2,-123,20,-123,104r0,139r307,0v10,0,20,10,20,20","w":551,"k":{"\u00c6":62,"\u00c5":62,"o":27,"O":12,"A":62,".":92,",":92}},"G":{"d":"461,-386v29,2,73,-10,73,20r0,336v0,13,-6,20,-18,22v-62,10,-117,18,-199,15v-175,-6,-257,-124,-259,-311r0,-134v1,-194,86,-312,268,-312v82,0,145,3,202,18v11,11,3,41,5,61v0,8,-7,11,-17,10v-62,-6,-121,-7,-190,-7v-131,0,-175,91,-177,230v-3,182,-4,363,168,364v49,0,90,-2,126,-6r0,-286v0,-10,8,-20,18,-20","w":612,"k":{"V":14}},"H":{"d":"602,-20v-1,29,-43,18,-71,20v-10,0,-20,-10,-20,-20r0,-332r-342,0r0,332v-1,29,-43,18,-71,20v-10,0,-20,-10,-20,-20r0,-703v1,-29,43,-18,71,-20v10,0,20,10,20,20r0,290r342,0r0,-290v1,-29,43,-18,71,-20v10,0,20,10,20,20r0,703","w":680},"I":{"d":"179,-20v0,30,-45,17,-73,20v-10,0,-18,-10,-18,-20r0,-704v0,-30,45,-16,73,-19v10,0,18,9,18,19r0,704","w":267},"J":{"d":"107,-743v28,2,71,-10,72,19r0,761v-1,101,-49,145,-155,143v-22,-1,-59,2,-59,-19v0,-24,-6,-56,20,-54v65,3,103,-1,103,-70r0,-761v0,-10,9,-19,19,-19","w":257},"K":{"d":"97,-743v28,2,71,-10,72,19r0,323r288,-333v16,-18,61,-5,92,-9v15,-1,17,13,10,21r-301,340r301,360v8,7,7,23,-8,22v-34,-4,-82,11,-100,-10r-282,-343r0,333v0,30,-45,17,-73,20v-10,0,-18,-10,-18,-20r0,-704v0,-10,9,-19,19,-19","w":607,"k":{"\u00d8":47,"y":55,"w":50,"v":57,"u":42,"t":28,"q":36,"o":36,"f":15,"e":45,"d":45,"c":45,"V":10,"U":18,"T":14,"Q":47,"O":47,"L":17,"G":69,"E":37,"C":69,"-":39}},"L":{"d":"169,-179v-4,83,39,104,123,104r193,0v21,3,10,48,9,68v-40,17,-128,12,-203,14v-134,3,-213,-47,-213,-186r0,-544v1,-29,43,-18,71,-20v10,0,20,10,20,20r0,544","w":514,"k":{"\u00d8":45,"y":52,"w":27,"v":50,"o":25,"e":21,"Y":104,"W":37,"V":92,"U":40,"T":99,"S":18,"Q":45,"O":45,"G":38,"E":20,"C":32,"-":39}},"M":{"d":"684,-20v0,28,-41,19,-69,20v-10,0,-20,-10,-20,-20r-1,-596r-145,298v-10,33,-48,30,-91,29v-28,0,-36,-10,-45,-29r-145,-298r-1,596v0,28,-41,19,-69,20v-10,0,-20,-10,-20,-20r0,-694v0,-43,75,-30,114,-26v4,2,9,7,12,14r165,343v6,15,18,15,24,0r165,-343v10,-29,62,-14,97,-17v15,-1,29,13,29,29r0,694","w":761,"k":{"Y":37,"V":18}},"N":{"d":"602,-29v0,39,-53,28,-91,29v-16,0,-27,-5,-32,-16r-312,-590r-1,587v0,29,-43,19,-70,19v-10,0,-18,-1,-18,-12r0,-703v-1,-42,77,-28,112,-23v5,3,9,8,13,15r309,587r1,-588v0,-29,44,-16,71,-19v10,0,18,9,18,19r0,695","w":680,"k":{"Y":17,"V":23,"T":34}},"O":{"d":"601,-307v-1,194,-83,314,-270,314v-187,0,-270,-120,-271,-314r0,-129v1,-194,83,-314,271,-314v187,0,269,120,270,314r0,129xm331,-75v181,3,182,-175,178,-361v-3,-139,-44,-232,-178,-232v-134,0,-179,93,-179,232r0,129v0,139,45,230,179,232","w":661,"k":{"\u00c6":25,"\u00c5":25,"Z":36,"Y":39,"X":44,"W":10,"V":23,"T":45,"A":25}},"P":{"d":"548,-533v0,213,-171,254,-380,232r0,281v0,30,-44,18,-72,20v-10,0,-18,-10,-18,-20r0,-697v4,-39,58,-27,101,-31v199,-16,369,21,369,215xm168,-376v155,11,289,8,289,-157v0,-148,-146,-145,-289,-136r0,293","w":593,"k":{"\u00e6":23,"\u00e5":23,"\u00c6":70,"\u00c5":62,"o":18,"e":18,"a":23,"Z":34,"A":62,".":107,",":107}},"Q":{"d":"601,-307v-1,179,-71,291,-227,312v-2,61,-4,111,62,101v29,4,81,-12,81,16r0,34v-6,24,-45,23,-81,24v-117,7,-161,-53,-150,-176v-154,-22,-226,-132,-226,-311r0,-129v1,-194,83,-314,271,-314v187,0,269,120,270,314r0,129xm331,-75v181,3,182,-175,178,-361v-3,-139,-44,-232,-178,-232v-134,0,-179,93,-179,232r0,129v0,139,45,230,179,232","w":661,"k":{"\u00c6":25,"\u00c5":25,"Z":36,"Y":39,"X":44,"W":10,"V":23,"T":45,"A":25}},"R":{"d":"558,-535v1,122,-63,182,-157,209r182,304v6,8,3,23,-10,22v-31,-4,-76,11,-90,-13r-179,-298r-136,-3r0,294v0,30,-44,18,-72,20v-10,0,-18,-10,-18,-20r0,-700v11,-44,94,-26,154,-30v183,-13,325,37,326,215xm168,-391v149,5,300,16,300,-144v0,-148,-157,-136,-300,-130r0,274","w":625,"k":{"\u00d8":20,"y":20,"o":25,"g":14,"e":21,"c":14,"Y":42,"W":7,"V":33,"T":43,"Q":20,"O":20,"G":20,"C":20}},"S":{"d":"463,-662v-133,1,-360,-50,-315,122v83,124,299,138,344,291v47,160,-69,262,-239,256v-70,-3,-131,-4,-182,-20v-3,-18,-14,-69,17,-68v135,4,325,40,317,-112v-4,-80,-66,-97,-120,-134v-64,-43,-160,-90,-201,-143v-23,-28,-34,-63,-34,-103v0,-193,229,-190,413,-165v27,4,17,35,17,60v0,11,-6,16,-17,16","w":550,"k":{"\u00c6":14,"y":16,"x":14,"v":21,"t":39,"Y":21,"W":15,"V":25,"A":18}},"T":{"d":"35,-681v1,-26,-8,-63,20,-62r481,0v29,-1,19,37,19,62v0,11,-6,16,-19,16r-195,0r0,645v0,30,-45,17,-73,20v-10,0,-18,-10,-18,-20r0,-645r-195,0v-10,0,-20,-5,-20,-16","w":590,"k":{"\u00e6":85,"\u00e5":85,"\u00d8":45,"\u00c6":90,"\u00c5":90,"z":36,"y":65,"x":39,"w":32,"v":32,"u":42,"t":32,"s":77,"r":46,"q":80,"p":39,"o":90,"n":39,"m":39,"g":65,"e":80,"d":82,"c":77,"a":85,"Q":45,"O":45,"G":31,"F":18,"E":27,"C":38,"A":90,".":76,",":76}},"U":{"d":"587,-270v2,182,-85,277,-256,277v-170,0,-256,-96,-256,-277r0,-454v1,-29,45,-16,73,-19v10,0,19,9,19,19r0,454v-2,124,40,199,164,199v124,0,164,-74,164,-199r0,-454v1,-29,45,-16,73,-19v10,0,19,9,19,19r0,454","w":662,"k":{"\u00c6":26,"\u00c5":26,"A":26}},"V":{"d":"35,-720v-8,-34,45,-21,75,-23v9,0,16,8,18,15r174,637v7,28,31,28,39,0r175,-637v6,-25,49,-12,76,-15v14,-1,19,10,16,23r-184,651v-9,80,-140,102,-186,39v-8,-10,-13,-23,-18,-39","w":643,"k":{"\u00e6":52,"\u00e5":52,"\u00d8":23,"\u00c6":70,"\u00c5":70,"z":29,"y":32,"x":39,"w":25,"v":25,"u":37,"s":50,"r":34,"q":50,"p":25,"o":50,"n":25,"m":25,"g":47,"e":50,"c":47,"a":52,"S":21,"Q":23,"O":23,"G":21,"E":26,"C":25,"A":70,".":76,",":76}},"W":{"d":"420,-416v-1,-12,-11,-12,-14,0r-99,370v-4,55,-90,63,-139,40v-12,-5,-19,-20,-22,-41r-111,-679v1,-30,48,-17,75,-17v9,0,15,6,17,17r99,648v0,2,1,4,3,4v3,0,5,-5,7,-15r98,-370v8,-50,58,-39,111,-40v25,0,40,13,47,40r98,370v2,12,6,20,10,11r99,-648v4,-30,47,-14,75,-17v12,-1,19,7,17,20r-111,676v-4,53,-49,52,-105,51v-31,0,-50,-23,-57,-50","w":825,"k":{"\u00e6":26,"\u00e5":26,"\u00d8":15,"\u00c6":45,"\u00c5":45,"o":35,"e":31,"a":26,"Q":15,"O":15,"G":12,"C":10,"A":45}},"X":{"d":"509,-742v30,0,96,-14,82,23r-215,343r225,351v7,10,1,26,-13,25v-30,-4,-69,9,-84,-15r-183,-291r-179,291v-13,26,-48,11,-80,15v-14,1,-20,-15,-13,-25r222,-353r-220,-341v-6,-10,-2,-25,12,-24v28,4,70,-10,83,10r180,285r174,-285v3,-5,6,-8,9,-9","w":646,"k":{"\u00d8":44,"y":37,"v":41,"u":32,"o":32,"e":27,"Q":44,"O":44,"G":36,"C":35}},"Y":{"d":"319,0v-28,-3,-73,11,-73,-20r0,-284v-26,-12,-40,-34,-54,-66r-157,-359v3,-26,53,-10,78,-14v7,-1,16,8,18,14r138,324v10,32,32,32,46,0r139,-324v7,-23,50,-11,78,-14v17,-1,20,12,14,25r-155,348v-15,32,-28,53,-54,66r0,284v0,10,-8,20,-18,20","w":583,"k":{"\u00e6":86,"\u00e5":86,"\u00d8":39,"\u00c6":85,"\u00c5":85,"z":70,"y":54,"x":54,"w":55,"v":58,"u":72,"t":35,"s":73,"r":75,"q":96,"p":75,"o":98,"n":46,"m":46,"g":91,"f":35,"e":95,"d":91,"c":91,"a":86,"S":21,"Q":39,"O":39,"G":44,"E":28,"C":44,"A":85,"\/":92,".":92,"-":79,",":92}},"Z":{"d":"544,-65v-2,27,8,66,-20,65r-385,0v-88,14,-105,-72,-68,-126r358,-521v5,-8,4,-15,-7,-15r-332,0v-29,1,-18,-38,-20,-64v0,-11,10,-17,20,-17r356,0v84,-13,108,68,69,125r-357,521v-5,6,-5,16,7,15r359,0v10,0,20,6,20,17","w":597,"k":{"\u00e6":22,"\u00e5":22,"\u00d8":30,"y":30,"v":32,"u":32,"o":30,"g":38,"e":32,"c":38,"a":22,"W":10,"Q":30,"O":30,"G":30,"C":25}},"[":{"d":"303,141v1,24,3,53,-20,53r-186,0v-11,0,-17,-9,-17,-19r0,-899v0,-10,6,-19,17,-19r186,0v23,0,21,29,20,53v0,10,-10,20,-20,20r-114,0r0,791r114,0v10,0,20,10,20,20","w":327},"\\":{"d":"24,-723v-8,-29,38,-18,64,-20v12,0,14,11,17,20r228,709v-1,24,-42,12,-65,14v-12,1,-15,-11,-18,-20","w":355},"]":{"d":"247,175v0,10,-6,19,-17,19r-186,0v-23,0,-21,-29,-20,-53v0,-10,10,-20,20,-20r114,0r0,-791r-114,0v-23,0,-21,-29,-20,-53v0,-10,10,-20,20,-20r186,0v11,0,17,9,17,19r0,899","w":327},"^":{"d":"501,-583v6,7,6,21,-7,20v-34,-2,-75,9,-88,-18r-103,-120r-115,133v-16,10,-52,3,-76,5v-13,1,-13,-13,-7,-20r115,-149v19,-35,89,-18,136,-18v19,0,20,6,30,18"},"_":{"d":"525,65v1,21,2,41,-20,41r-515,0v-21,2,-20,-20,-20,-41v0,-11,10,-16,20,-16r515,0v10,0,20,5,20,16","w":494},"`":{"d":"239,-640v6,5,7,18,-5,17v-30,-2,-65,8,-77,-15r-113,-126v-7,-6,-5,-16,7,-15v33,3,73,-8,91,15","w":372},"a":{"d":"451,-20v0,27,-39,19,-66,20v-19,0,-22,-20,-20,-42v-44,24,-91,49,-154,49v-110,-1,-163,-58,-163,-174v0,-160,150,-165,315,-162v4,-98,-9,-153,-107,-153v-60,0,-107,4,-158,8v-25,2,-17,-29,-18,-51v6,-30,56,-22,88,-28v24,-5,54,-4,88,-4v133,-1,195,63,195,188r0,349xm136,-168v0,144,159,109,227,63r0,-161v-109,2,-227,-16,-227,98","w":519,"k":{"y":22,"v":30,"t":24,"f":20}},"b":{"d":"491,-312v0,189,-40,319,-218,319v-65,0,-126,-6,-184,-17v-17,-3,-20,-6,-21,-23r0,-700v0,-29,42,-17,69,-19v10,0,19,9,19,19r0,186v33,-6,81,-10,117,-10v149,0,218,93,218,245xm273,-70v130,4,130,-112,130,-242v0,-111,-37,-176,-157,-168v-30,2,-64,3,-90,7r0,397","w":541,"k":{"x":23,"t":30,"f":20}},"c":{"d":"387,-77v31,-4,23,44,17,66v-33,17,-91,18,-141,18v-172,0,-213,-133,-213,-321v0,-171,98,-267,280,-240v32,5,78,-4,78,30v0,23,8,55,-21,51v-45,-5,-73,-7,-124,-7v-118,-2,-125,114,-125,244v0,102,34,166,125,166v51,0,79,-1,124,-7","w":452,"k":{"o":36}},"d":{"d":"404,-752v27,2,69,-10,69,19r0,700v-1,16,-4,21,-21,23v-59,11,-118,17,-184,17v-178,0,-218,-130,-218,-319v0,-153,68,-245,218,-245v35,0,85,4,117,10r0,-186v0,-10,9,-19,19,-19xm268,-70v35,0,84,-4,117,-6r0,-397v-29,-7,-83,-7,-117,-7v-128,-4,-133,111,-130,240v2,105,26,170,130,170","w":541},"e":{"d":"272,-557v166,1,230,110,220,288v0,15,-6,22,-19,22r-335,0v-3,116,33,176,139,177v58,1,133,-6,183,-11v25,-2,17,44,12,63v-53,22,-122,25,-195,25v-149,0,-227,-84,-227,-240r0,-90v-1,-142,79,-236,222,-234xm272,-480v-96,0,-137,61,-134,166r265,0v2,-109,-31,-166,-131,-166","w":544,"k":{"y":20,"x":27,"w":5,"v":20,"t":30,"f":20,"T":93}},"f":{"d":"281,-761v31,1,69,1,75,22v-2,21,8,49,-18,48v-66,-2,-117,-5,-109,69r0,72r105,0v25,-1,18,33,19,57v0,11,-6,17,-19,17r-105,0r0,456v0,28,-41,18,-68,20v-10,0,-20,-10,-20,-20r0,-456r-97,-11v-24,-1,-19,-23,-19,-45v0,-10,9,-18,19,-18r97,0r0,-72v-1,-96,45,-141,140,-139","w":381,"k":{"s":15,"q":20,"o":22,"g":21,"e":25,"d":10,"c":21,".":56,",":56}},"g":{"d":"50,-238v0,-189,40,-320,218,-319v69,1,152,10,202,31v2,3,3,8,3,15r0,523v-2,125,-62,188,-195,188v-62,0,-106,-7,-155,-13v-28,-3,-20,-28,-21,-54v0,-14,10,-16,23,-16v20,2,42,3,67,5v25,2,53,3,86,3v88,1,109,-39,107,-129v-33,6,-81,11,-117,11v-149,0,-218,-93,-218,-245xm138,-310v-2,129,1,243,130,243v40,0,82,-4,117,-10r0,-396v-29,-6,-80,-10,-117,-10v-102,0,-128,71,-130,173","w":541},"h":{"d":"489,-20v0,28,-40,19,-68,20v-10,0,-20,-10,-20,-20r0,-329v1,-89,-31,-131,-107,-131v-51,0,-100,11,-138,28r0,432v0,28,-41,19,-69,20v-10,0,-19,-10,-19,-20r0,-712v0,-29,41,-18,69,-20v10,0,19,10,19,20r0,206v39,-19,102,-31,153,-31v125,0,180,78,180,208r0,329","w":557,"k":{"y":20,"t":20,"f":20}},"i":{"d":"169,-738v0,36,15,100,-20,100v-29,0,-71,9,-71,-20v0,-36,-15,-100,20,-100v29,0,71,-9,71,20xm167,-20v0,28,-40,19,-68,20v-10,0,-20,-10,-20,-20r0,-510v0,-28,40,-19,68,-20v10,0,20,10,20,20r0,510","w":247},"j":{"d":"169,-738v0,35,16,100,-20,100v-28,0,-71,9,-71,-19v0,-36,-15,-101,20,-101v29,0,71,-9,71,20xm167,64v1,90,-36,136,-125,133v-27,-1,-68,3,-72,-20v2,-24,-10,-52,21,-51v57,2,88,5,88,-62r0,-594v0,-30,42,-18,70,-20v10,0,18,10,18,20r0,594","w":247},"k":{"d":"88,-752v28,1,67,-8,68,20r0,416r200,-225v16,-18,60,-5,90,-9v16,-1,19,14,10,22r-220,238r222,268v6,6,3,24,-8,22v-33,-4,-77,9,-95,-13r-199,-246r0,239v0,28,-40,19,-68,20v-10,0,-20,-10,-20,-20r0,-712v0,-10,10,-20,20,-20","w":496,"k":{"\u00e6":14,"\u00e5":14,"q":27,"o":32,"e":35,"d":26,"c":29,"a":14}},"l":{"d":"166,-20v0,30,-42,18,-70,20v-10,0,-18,-10,-18,-20r0,-713v0,-29,43,-16,70,-19v10,0,18,9,18,19r0,713","w":244},"m":{"d":"156,-511v56,-43,195,-75,246,-6v48,-23,103,-41,166,-41v113,0,162,67,162,184r0,354v0,28,-40,19,-68,20v-10,0,-20,-10,-20,-20r0,-354v7,-93,-64,-124,-148,-99v-20,5,-41,12,-60,19v21,126,4,292,9,434v0,30,-43,18,-71,20v-11,0,-17,-10,-17,-20r0,-356v1,-66,-12,-107,-77,-105v-45,1,-87,22,-122,39r0,422v0,30,-43,18,-71,20v-11,0,-17,-10,-17,-20r0,-510v0,-29,41,-20,69,-20v18,0,21,19,19,39","w":798,"k":{"y":15,"t":20,"f":20}},"n":{"d":"489,-20v0,28,-40,19,-68,20v-10,0,-20,-10,-20,-20r0,-329v1,-85,-25,-134,-110,-132v-51,1,-95,20,-135,39r0,422v0,28,-41,19,-69,20v-10,0,-19,-10,-19,-20r0,-510v0,-29,41,-20,69,-20v18,0,21,19,19,39v51,-27,88,-45,159,-46v126,0,173,80,174,208r0,329","w":557,"k":{"y":22,"w":19,"v":22,"t":20,"f":20}},"o":{"d":"495,-313v8,191,-45,320,-223,320v-177,0,-230,-129,-222,-320v6,-150,72,-244,222,-244v150,0,217,93,223,244xm272,-70v125,0,139,-111,135,-243v-3,-99,-37,-167,-135,-167v-125,0,-138,112,-134,243v3,99,36,167,134,167","w":545,"k":{"z":17,"y":22,"x":35,"w":17,"v":22,"t":30,"f":20}},"p":{"d":"491,-310v7,188,-41,320,-218,317v-35,0,-85,-5,-117,-11r0,181v0,28,-43,17,-70,19v-10,0,-18,-9,-18,-19r0,-688v1,-17,5,-19,21,-23v51,-13,122,-23,184,-23v152,1,212,95,218,247xm273,-67v128,4,133,-113,130,-243v-2,-101,-29,-173,-130,-173v-38,0,-87,4,-117,10r0,396v29,6,84,10,117,10","w":541,"k":{"y":20,"x":30,"w":15,"t":30,"f":20}},"q":{"d":"473,177v0,29,-42,17,-69,19v-10,0,-19,-9,-19,-19r0,-181v-33,6,-81,11,-117,11v-176,2,-226,-128,-218,-317v6,-152,66,-247,218,-247v69,0,152,10,202,31v2,3,3,8,3,15r0,688xm268,-67v40,0,82,-4,117,-10r0,-396v-29,-6,-80,-10,-117,-10v-128,0,-130,115,-130,245v0,101,28,172,130,171","w":541},"r":{"d":"153,-509v43,-29,81,-45,141,-48v31,-1,19,34,21,59v0,11,-7,17,-21,17v-59,1,-95,16,-138,42r0,419v0,28,-41,19,-69,20v-10,0,-19,-10,-19,-20r0,-510v0,-28,39,-20,66,-20v18,0,21,20,19,41","w":342,"k":{"\u00e6":27,"\u00e5":27,"q":29,"o":25,"g":24,"e":24,"d":29,"c":25,"a":27,".":30,",":30}},"s":{"d":"231,-482v-53,2,-95,4,-93,58v2,43,34,52,69,76v82,56,205,87,209,210v6,162,-200,158,-345,130v-28,-5,-20,-28,-21,-55v0,-11,10,-16,22,-15r157,11v61,-1,99,-12,99,-71v0,-48,-33,-54,-75,-83v-78,-55,-198,-82,-203,-203v-7,-160,199,-139,337,-120v25,3,18,29,19,53v0,12,-7,18,-20,17","w":466,"k":{"y":10,"v":14,"t":13,"f":10}},"t":{"d":"360,-15v0,27,-55,20,-83,22v-96,5,-136,-38,-136,-134r0,-349r-97,-11v-24,-1,-19,-23,-19,-45v0,-12,6,-18,19,-18r97,0r0,-98v2,-30,47,-21,73,-28v9,0,15,7,15,17r0,109r108,0v23,0,21,29,20,54v0,10,-10,20,-20,20r-108,0r0,349v-9,75,47,63,110,63v30,0,21,26,21,49","w":385,"k":{"q":14,"o":15,"g":10,"d":10,"c":10}},"u":{"d":"489,-20v0,29,-41,20,-69,20v-18,0,-21,-19,-19,-39v-51,27,-88,45,-159,46v-126,0,-173,-80,-174,-208r0,-329v0,-28,40,-19,68,-20v10,0,20,10,20,20r0,329v-2,85,26,134,110,132v51,-1,95,-20,135,-39r0,-422v0,-28,41,-19,69,-20v10,0,19,10,19,20r0,510","w":557},"v":{"d":"420,-550v29,2,80,-11,70,24r-135,476v-10,60,-92,68,-146,46v-16,-8,-27,-23,-34,-46r-136,-483v0,-30,45,-17,71,-17v9,0,15,6,19,19r115,436v4,22,14,36,32,23v48,-145,82,-309,125,-459v4,-13,10,-19,19,-19","w":530,"k":{"\u00e6":21,"\u00e5":21,"q":22,"o":22,"e":20,"a":21,".":50,",":50}},"w":{"d":"675,-550v30,3,80,-11,73,24r-107,502v-13,47,-130,42,-143,-3v-3,-10,-9,-22,-13,-38r-89,-346v-5,-3,-6,1,-8,6r-87,340v-11,45,-25,72,-82,72v-60,0,-74,-20,-84,-69r-97,-468v0,-30,44,-18,73,-20v9,0,16,8,17,16r83,456v2,16,13,16,16,0r98,-384v6,-39,54,-30,96,-30v24,0,34,9,40,30r98,384v3,16,14,16,16,0r83,-456v1,-8,8,-16,17,-16","w":786,"k":{"o":17,"e":15,"c":17}},"x":{"d":"507,-23v7,8,6,24,-9,23v-28,-3,-70,10,-83,-8r-143,-209r-150,215v-19,4,-48,1,-70,2v-15,1,-13,-14,-7,-23r180,-257r-170,-245v-8,-12,-7,-26,10,-25v30,2,70,-9,85,14r127,188r128,-188v10,-25,48,-11,79,-14v15,-1,16,15,8,25r-168,239","w":547,"k":{"q":37,"o":35,"g":35,"f":5,"e":37,"d":36,"c":27}},"y":{"d":"60,120v67,3,152,22,176,-36v9,-22,18,-57,25,-84v-57,5,-75,-25,-88,-69r-134,-464v0,-29,47,-14,73,-17v9,-1,15,9,17,16r118,434v4,21,13,23,35,22r122,-457v6,-24,48,-13,75,-15v13,-1,18,12,15,24r-165,576v-15,127,-140,177,-282,134v-11,-7,-6,-32,-6,-48v0,-11,6,-16,19,-16","w":534,"k":{"q":20,"o":22,"g":24,"e":20,"c":24,",":37}},"z":{"d":"412,-74v31,0,29,74,0,74r-302,0v-74,7,-73,-96,-38,-139r258,-321v6,-8,6,-16,-6,-16r-243,0v-23,0,-21,-29,-20,-54v0,-10,10,-20,20,-20r294,0v73,-10,63,90,33,128r-263,329v-6,5,-8,19,3,19r264,0","w":482,"k":{"q":10,"o":17,"e":19,"d":14,"c":10}},"{":{"d":"304,141v1,24,3,53,-20,53v-128,0,-204,-10,-204,-138r0,-176v1,-65,-20,-100,-60,-125r0,-58v40,-25,61,-59,60,-124r0,-178v-10,-127,75,-138,203,-138v23,0,21,29,20,53v0,27,-38,20,-65,20v-51,0,-69,14,-69,65r0,178v-1,79,-20,119,-71,154v50,35,71,74,71,153r0,176v-9,71,48,67,115,65v10,0,20,10,20,20","w":331},"|":{"d":"169,175v0,29,-43,16,-70,19v-10,0,-19,-9,-19,-19r0,-899v0,-29,44,-17,71,-19v10,0,18,9,18,19r0,899","w":249},"}":{"d":"311,-245v-40,25,-61,60,-60,125r0,176v11,128,-76,138,-204,138v-23,0,-21,-29,-20,-53v0,-27,39,-20,66,-20v51,0,69,-14,69,-65r0,-176v1,-78,21,-118,71,-153v-51,-35,-71,-75,-71,-154r0,-178v9,-71,-48,-67,-114,-65v-23,0,-21,-29,-20,-53v1,-28,42,-18,70,-20v107,-4,153,31,153,138r0,178v-1,65,20,99,60,124r0,58","w":331},"~":{"d":"514,-495v3,95,-17,161,-109,156v-85,-4,-123,-78,-181,-110v-48,-26,-70,18,-63,78v2,21,-26,21,-49,20v-21,-1,-20,-23,-20,-46v0,-116,105,-162,186,-102v41,31,71,76,127,88v46,10,40,-40,40,-84v0,-22,26,-21,49,-20v10,0,20,10,20,20"},"\u00c5":{"d":"603,-23v10,35,-45,20,-75,23v-10,0,-14,-8,-17,-15r-65,-230r-259,0r-64,230v-6,24,-49,12,-77,15v-14,1,-19,-11,-16,-23r185,-651v9,-80,139,-101,185,-38v8,10,14,22,18,37xm336,-653v-5,-24,-33,-23,-39,0r-91,329r221,0xm316,-980v61,0,101,41,101,102v0,61,-40,101,-101,101v-61,0,-102,-40,-102,-101v0,-61,41,-102,102,-102xm316,-826v29,0,53,-24,53,-53v0,-29,-24,-52,-53,-52v-29,0,-52,23,-52,52v0,29,23,53,52,53","w":633,"k":{"\u00e6":10,"\u00e5":10,"\u00d8":25,"y":53,"w":39,"v":53,"t":45,"o":10,"f":45,"e":10,"c":10,"a":10,"Y":85,"W":32,"V":70,"U":25,"T":90,"Q":25,"O":25,"G":22,"C":22}},"\u00c6":{"d":"507,-179v-17,145,160,93,286,104v21,2,10,49,9,70v-36,16,-115,12,-173,12v-138,0,-213,-49,-213,-186r0,-66r-239,0r-64,230v-6,24,-49,12,-77,15v-14,1,-19,-11,-16,-23r185,-645v14,-46,45,-74,102,-75r487,0v19,6,10,45,10,67v0,8,-4,12,-11,12r-286,0r0,239r277,0v25,0,20,32,20,58v0,10,-10,20,-20,20r-277,0r0,168xm416,-664r-109,0v-10,0,-17,6,-20,17r-91,323r220,0r0,-340","w":859},"\u00d8":{"d":"331,-750v79,0,141,23,184,64v18,-20,26,-51,55,-60v22,3,73,-12,60,19r-71,98v46,74,43,200,42,322v-2,194,-83,314,-270,314v-78,0,-140,-23,-183,-63v-18,21,-27,53,-56,63v-22,-3,-74,12,-61,-19r72,-100v-48,-72,-44,-201,-43,-324v1,-194,83,-314,271,-314xm331,-668v-134,2,-179,93,-179,232r0,129v0,41,5,76,13,108r297,-414v-30,-37,-74,-55,-131,-55xm331,-75v181,4,178,-175,178,-361v0,-42,-4,-77,-12,-106r-297,414v28,35,71,52,131,53","w":661,"k":{"\u00c5":25,"Z":36,"Y":39,"X":44,"W":10,"V":23,"T":45,"A":25}},"\u00e5":{"d":"451,-20v0,27,-39,19,-66,20v-19,0,-22,-20,-20,-42v-44,24,-91,49,-154,49v-110,-1,-163,-58,-163,-174v0,-160,150,-165,315,-162v4,-98,-9,-153,-107,-153v-60,0,-107,4,-158,8v-25,2,-17,-29,-18,-51v6,-30,56,-22,88,-28v24,-5,54,-4,88,-4v133,-1,195,63,195,188r0,349xm136,-168v0,144,159,109,227,63r0,-161v-109,2,-227,-16,-227,98xm257,-805v61,0,101,41,101,102v0,61,-40,101,-101,101v-61,0,-102,-40,-102,-101v0,-61,41,-102,102,-102xm257,-651v29,0,53,-24,53,-53v0,-29,-24,-52,-53,-52v-29,0,-52,23,-52,52v0,29,23,53,52,53","w":519,"k":{"y":22,"v":20,"t":24,"f":20}},"\u00e6":{"d":"585,-557v163,2,225,115,218,288v0,15,-6,22,-19,22r-333,0v-6,118,32,180,146,180v58,0,125,-10,176,-14v26,-2,16,43,12,63v-53,22,-120,25,-193,25v-82,0,-132,-15,-173,-59v-42,37,-107,59,-180,59v-114,0,-191,-53,-191,-174v0,-161,151,-165,316,-162v4,-98,-10,-153,-108,-153v-60,0,-107,4,-158,8v-25,2,-17,-29,-18,-51v6,-30,56,-22,88,-28v24,-5,54,-4,88,-4v81,0,134,23,166,70v36,-42,88,-71,163,-70xm585,-482v-93,0,-136,68,-134,168r265,0v1,-110,-42,-169,-131,-168xm137,-167v0,125,159,122,227,73r0,-171v-110,2,-227,-16,-227,98","w":853},"\u00f8":{"d":"50,-237v0,-191,44,-319,222,-320v57,0,104,14,140,42v17,-22,32,-48,50,-67v16,-4,39,0,58,-1v11,-1,9,15,4,19r-70,94v40,56,43,138,41,233v-3,151,-73,241,-223,244v-57,0,-103,-14,-139,-42v-17,22,-33,49,-52,69v-16,4,-39,0,-57,1v-11,1,-9,-15,-4,-19r71,-96v-27,-41,-41,-94,-41,-157xm272,-480v-126,-3,-134,112,-134,243v0,31,3,57,10,79r214,-291v-23,-21,-53,-31,-90,-31xm272,-70v126,3,135,-111,135,-243v0,-28,-4,-54,-11,-78r-214,290v22,21,52,31,90,31","w":545},"\u00a0":{"w":247}}});
/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Digitized data (C) 2004 Agfa Monotype Corporation. Neo Sans(TM) is a trademark
 * of Agfa Monotype Corporation and may be registered in certain jurisdictions. 
 * All rights reserved. Neo Sans is designed by Sebastian Lester.
 * 
 * Manufacturer:
 * Digitized data (C) Agfa Monotype Corporation. Neo Sans(TM) is a trademark of
 * Agfa Monotype Corporation and may be registered in certain jurisdictions
 */
Cufon.registerFont({"w":645,"face":{"font-family":"FjordkraftNeo Bold","font-weight":700,"font-stretch":"normal","units-per-em":"1000","panose-1":"2 0 5 3 5 0 0 2 0 4","ascent":"800","descent":"-200","x-height":"9","bbox":"-34.3778 -1012 872.085 203.49","underline-thickness":"80","underline-position":"1","unicode-range":"U+0020-U+00F8"},"glyphs":{" ":{"w":260},"!":{"d":"200,-767v11,0,21,9,20,20r-20,499v-4,37,-68,17,-105,21v-10,1,-23,-11,-22,-21r-20,-500v-1,-10,12,-19,22,-19r125,0xm215,-20v0,10,-9,20,-19,20r-118,0v-10,0,-20,-10,-20,-20r0,-126v0,-10,10,-19,20,-19r118,0v13,0,19,6,19,19r0,126","w":273},"\"":{"d":"437,-767v12,0,14,9,10,19r-75,219v-5,11,-6,18,-19,19r-101,0v-9,1,-11,-11,-8,-19r54,-219v3,-13,9,-19,20,-19r119,0xm218,-767v12,0,14,9,10,19r-75,219v-5,11,-6,18,-19,19r-101,0v-9,1,-11,-11,-8,-19r54,-219v3,-13,9,-19,20,-19r119,0","w":472,"k":{".":75,",":75}},"#":{"d":"634,-552v8,0,18,5,17,15r-12,76v-1,7,-6,11,-15,11r-85,0r-15,161r84,0v8,0,21,6,18,16v-8,29,1,76,-27,86r-84,0r-14,168v-1,10,-7,19,-18,19r-102,0v-11,0,-17,-8,-16,-19r14,-168r-113,0r-15,168v-1,10,-7,19,-18,19r-103,0v-10,0,-17,-8,-16,-19r14,-168r-85,0v-10,0,-16,-5,-14,-15r12,-75v1,-8,6,-12,14,-12r83,0r14,-161r-85,0v-10,0,-16,-5,-14,-14v6,-28,4,-65,18,-85v24,-8,61,-1,90,-3r15,-172v1,-10,8,-19,19,-19r103,0v10,0,16,8,15,19r-15,172r113,0r16,-172v1,-10,8,-19,19,-19r102,0v11,0,15,8,15,19r-16,172r87,0xm290,-450r-15,161r113,0r15,-161r-113,0","w":699},"$":{"d":"322,-605v-66,0,-97,43,-64,87v105,91,322,116,317,308v-3,124,-77,187,-186,211r0,94v0,10,-10,20,-20,20r-110,0v-36,-6,-14,-72,-20,-109v-54,-4,-103,-8,-141,-26v-13,-26,-1,-75,-5,-111v7,-38,73,-11,113,-11v79,0,195,25,187,-66v-4,-45,-27,-50,-66,-76v-104,-73,-257,-101,-257,-273v0,-116,66,-170,169,-188v5,-37,-16,-106,20,-106r110,0v35,4,15,67,20,102v54,5,123,8,159,25v13,26,6,76,6,112v0,11,-8,19,-20,18v-61,-7,-145,-11,-212,-11"},"%":{"d":"801,-166v0,110,-45,170,-147,172v-130,3,-148,-105,-148,-247v0,-110,46,-170,148,-172v130,-3,147,106,147,247xm688,-743v13,-1,10,13,6,20r-426,718v-28,12,-79,2,-116,5v-12,0,-13,-12,-8,-21r416,-702v15,-37,83,-14,128,-20xm334,-502v1,110,-46,170,-148,172v-130,3,-148,-105,-148,-247v0,-110,46,-171,148,-171v102,0,149,61,148,171r0,75xm654,-81v63,3,47,-95,47,-160v0,-55,-6,-83,-47,-85v-63,-3,-48,94,-48,160v0,55,7,83,48,85xm186,-416v62,3,47,-95,47,-161v0,-55,-6,-83,-47,-85v-63,-3,-48,94,-48,160v0,55,7,84,48,86","w":839},"&":{"d":"665,-358v0,95,-15,162,-58,226r102,108v8,7,7,24,-7,24r-151,-2v-14,-10,-26,-26,-38,-38v-49,29,-109,50,-186,49v-156,-2,-279,-46,-277,-205v1,-102,63,-148,133,-194v-40,-55,-100,-95,-97,-189v4,-127,101,-170,237,-173v156,-4,265,91,217,244v-23,73,-92,106,-152,145r130,137v14,-35,17,-76,17,-132v0,-10,8,-20,18,-20r93,0v10,0,19,10,19,20xm323,-640v-90,0,-112,82,-63,138v9,11,24,30,38,43v41,-33,107,-44,104,-120v-1,-42,-31,-61,-79,-61xm216,-196v-9,104,143,104,211,66r-153,-163v-40,25,-54,45,-58,97","w":732},"'":{"d":"218,-767v12,0,14,9,10,19r-75,219v-5,11,-6,18,-19,19r-101,0v-9,1,-11,-11,-8,-19r54,-219v3,-13,9,-19,20,-19r119,0","w":253,"k":{".":75,",":75}},"(":{"d":"323,168v6,12,9,26,-7,26v-45,0,-110,13,-134,-14v-149,-166,-176,-590,-56,-816v16,-32,33,-64,56,-93v22,-28,89,-14,134,-14v16,0,14,15,7,26v-119,183,-146,576,-41,801v14,30,27,59,41,84","w":361,"k":{"j":-37}},")":{"d":"236,-636v97,170,99,551,0,724v-18,31,-34,63,-57,92v-22,28,-89,14,-134,14v-16,0,-14,-15,-7,-26v119,-183,143,-576,40,-802v-16,-36,-34,-63,-45,-99v0,-7,4,-10,12,-10v45,4,111,-14,134,14v23,28,39,62,57,93","w":361},"*":{"d":"207,-749v30,3,81,-14,81,21r-1,119r124,-40v7,0,11,3,13,10r21,69v0,7,-5,12,-15,15r-115,34v25,38,57,69,77,112v0,5,-2,9,-6,12v-21,13,-37,31,-61,41v-6,0,-11,-3,-16,-10r-69,-100r-69,100v-7,9,-15,14,-25,7r-53,-38v-11,-5,-6,-18,-1,-26r72,-98r-114,-34v-36,-14,2,-56,5,-84v1,-11,14,-12,24,-8r115,38r-3,-119v0,-10,5,-22,16,-21","w":479},"+":{"d":"573,-346v0,11,-10,16,-20,16r-170,0r0,169v0,10,-5,20,-16,20r-90,0v-11,0,-16,-10,-16,-20r0,-169r-169,0v-10,0,-20,-5,-20,-16r0,-90v0,-11,10,-16,20,-16r169,0r0,-170v0,-10,5,-20,16,-20r90,0v11,0,16,10,16,20r0,170r170,0v10,0,20,5,20,16r0,90"},",":{"d":"26,98v-10,0,-19,-9,-16,-20r64,-224v3,-13,10,-19,20,-19r122,0v13,-1,18,9,13,19r-103,238v-21,14,-68,2,-100,6","w":274,"k":{"*":76,"'":75,"\"":75}},"-":{"d":"268,-344v-4,34,16,98,-20,98r-194,0v-36,-3,-16,-64,-20,-98v-1,-10,10,-19,20,-19r194,0v10,0,21,9,20,19","w":302},".":{"d":"216,-20v0,10,-10,20,-20,20r-117,0v-10,0,-21,-10,-21,-20r0,-126v0,-10,11,-19,21,-19r117,0v10,0,20,9,20,19r0,126","w":274,"k":{"*":76,"'":75,"\"":75}},"\/":{"d":"32,0v-11,0,-22,-10,-18,-21r212,-702v2,-9,9,-20,20,-20v46,2,102,-5,140,5v5,4,6,9,4,15r-211,702v-2,9,-9,21,-20,21r-127,0","w":405,"k":{"q":32,"o":32,"e":50,"c":55,"4":45,"\/":13}},"0":{"d":"592,-414v6,244,-40,423,-270,423v-230,0,-276,-178,-269,-423v6,-205,69,-338,269,-338v200,0,265,133,270,338xm322,-133v116,0,99,-156,99,-281v0,-102,-8,-196,-99,-196v-116,0,-98,158,-98,282v0,101,7,195,98,195"},"1":{"d":"424,-20v0,10,-9,20,-19,20r-131,0v-10,0,-20,-10,-20,-20r0,-552r-124,49v-7,0,-11,-4,-11,-13r0,-114v0,-7,3,-11,10,-14r163,-75v30,-9,76,-2,113,-4v13,0,19,6,19,19r0,704"},"2":{"d":"315,-752v165,0,255,45,255,191v0,167,-162,205,-258,285v-41,35,-86,63,-87,134r316,0v10,0,20,9,20,19r0,103v0,10,-10,20,-20,20r-445,0v-10,0,-20,-10,-20,-20v-1,-101,-1,-183,40,-250v66,-108,183,-152,272,-234v15,-14,18,-26,18,-53v0,-54,-39,-59,-106,-60v-64,0,-140,7,-199,13v-33,-5,-14,-65,-18,-98v-1,-11,9,-16,19,-19v55,-17,140,-31,213,-31"},"3":{"d":"566,-230v21,255,-281,274,-482,204v-13,-20,-5,-62,-5,-92v0,-11,8,-19,20,-18v62,6,136,9,199,9v74,1,99,-30,99,-103v0,-55,-25,-87,-81,-86r-176,0v-35,-6,-19,-69,-19,-105v0,-13,6,-19,19,-19r172,0v61,0,85,-37,85,-101v0,-58,-39,-75,-99,-75v-72,0,-132,6,-199,12v-34,-5,-14,-65,-18,-98v-1,-11,11,-16,20,-19v54,-16,130,-32,204,-31v161,0,265,54,261,219v-2,65,-42,128,-89,153v51,26,83,79,89,150"},"4":{"d":"606,-279v-6,39,17,112,-20,112r-66,0r0,147v0,10,-9,20,-19,20r-133,0v-10,0,-19,-10,-19,-20r0,-147r-289,0v-38,-7,-20,-77,-20,-117v0,-10,4,-20,11,-31r316,-414v22,-28,89,-9,133,-14v10,0,20,10,20,20r0,424v32,3,84,-12,86,20xm354,-519v0,-6,-4,-8,-7,-4r-157,214v-3,3,-3,11,4,10r160,0r0,-220"},"5":{"d":"566,-244v0,207,-159,281,-370,246v-40,-7,-80,-13,-111,-28v-13,-20,-6,-65,-6,-95v0,-11,8,-19,20,-18r180,12v83,2,115,-34,115,-117v0,-132,-176,-82,-297,-92v-8,0,-14,-7,-14,-15r31,-373v1,-10,9,-19,20,-19r389,0v10,0,20,9,20,19r0,100v0,10,-10,19,-20,19r-272,0r-12,138v187,-4,327,39,327,223"},"6":{"d":"589,-252v0,171,-94,261,-264,261v-180,0,-267,-109,-268,-294r0,-153v0,-200,83,-313,278,-314v77,-1,143,8,197,20v41,9,22,69,22,109v0,16,-8,23,-23,21v-55,-8,-119,-14,-182,-14v-99,1,-126,46,-125,153v29,-6,81,-13,118,-12v152,2,247,68,247,223xm325,-121v76,0,97,-52,97,-131v0,-109,-102,-116,-198,-94v0,111,-7,225,101,225"},"7":{"d":"533,-743v46,-1,34,61,34,106v0,18,-9,31,-16,46r-263,572v-6,13,-14,19,-25,19r-137,0v-18,1,-21,-11,-15,-23r273,-576v0,-4,-2,-6,-7,-6r-277,0v-10,0,-21,-9,-21,-19r0,-100v0,-10,11,-19,21,-19r433,0","k":{"\/":112,".":118,",":118}},"8":{"d":"593,-226v1,168,-109,235,-276,235v-160,0,-266,-71,-265,-235v0,-73,40,-127,85,-160v-57,-41,-83,-89,-81,-161v3,-154,114,-206,272,-205v155,1,262,56,262,216v0,63,-27,113,-82,150v45,34,85,86,85,160xm307,-444v77,0,124,-22,122,-92v-2,-63,-39,-91,-112,-91v-69,0,-101,33,-101,96v1,54,32,87,91,87xm317,-117v75,0,114,-39,111,-111v-2,-69,-42,-101,-121,-96v-63,4,-91,42,-90,106v0,60,36,101,100,101"},"9":{"d":"589,-305v0,200,-83,313,-278,314v-77,1,-143,-8,-197,-20v-41,-9,-22,-68,-22,-109v0,-16,8,-23,23,-21v55,8,119,14,182,14v99,-1,126,-46,125,-153v-29,6,-81,13,-118,12v-155,-2,-250,-70,-247,-230v3,-166,97,-254,264,-254v180,0,267,109,268,294r0,153xm331,-387v32,0,63,-6,91,-10v0,-111,7,-225,-101,-225v-76,0,-97,52,-97,131v0,72,37,104,107,104"},":":{"d":"216,-402v0,10,-10,19,-20,19r-117,0v-10,0,-21,-9,-21,-19r0,-126v0,-10,11,-20,21,-20r117,0v10,0,20,10,20,20r0,126xm216,-20v0,10,-10,20,-20,20r-117,0v-10,0,-21,-10,-21,-20r0,-126v0,-10,11,-19,21,-19r117,0v10,0,20,9,20,19r0,126","w":275},";":{"d":"216,-402v0,10,-11,19,-21,19r-117,0v-10,0,-20,-9,-20,-19r0,-126v0,-10,10,-20,20,-20r117,0v10,0,21,10,21,20r0,126xm11,100v-10,0,-19,-9,-16,-20r64,-224v3,-13,10,-19,20,-19r122,0v13,-1,18,9,13,19r-103,238v-22,14,-68,2,-100,6","w":275},"<":{"d":"530,-162v10,7,8,26,-6,25v-50,-2,-107,4,-152,-3r-244,-215v-27,-22,-27,-50,0,-72r244,-215v44,-8,102,-1,152,-3v14,-1,16,18,6,25r-259,229"},"=":{"d":"552,-474v0,11,-10,16,-20,16r-419,0v-10,0,-20,-5,-20,-16r0,-90v0,-11,10,-16,20,-16r419,0v10,0,20,5,20,16r0,90xm552,-218v0,11,-10,16,-20,16r-419,0v-10,0,-20,-5,-20,-16r0,-90v0,-11,10,-16,20,-16r419,0v10,0,20,5,20,16r0,90"},">":{"d":"515,-427v25,13,28,57,0,72r-243,215v-44,8,-102,1,-152,3v-14,1,-16,-18,-6,-25r259,-229r-259,-229v-10,-7,-8,-26,6,-25v50,2,107,-4,152,3"},"?":{"d":"52,-742v159,-40,401,-43,379,162v-14,126,-126,191,-175,291v-6,23,5,62,-27,62r-100,0v-35,-7,-21,-80,-13,-114v23,-91,130,-130,130,-239v0,-26,-18,-37,-49,-37v-55,0,-96,11,-146,11v-11,0,-17,-7,-17,-21v2,-34,-4,-78,4,-106v2,-4,7,-7,14,-9xm262,-19v0,10,-10,19,-20,19r-118,0v-10,0,-20,-9,-20,-19r0,-126v0,-10,10,-20,20,-20r118,0v10,0,20,10,20,20r0,126","w":479},"@":{"d":"512,102v-249,36,-502,-21,-477,-286v10,-105,11,-215,51,-294v57,-114,167,-183,336,-183v198,0,314,109,319,300v6,230,-143,316,-371,315v-108,0,-181,-50,-173,-163v8,-96,8,-199,69,-243v64,-46,182,-45,271,-25v17,4,25,13,24,31r-28,299v97,-17,127,-101,127,-214v0,-146,-88,-228,-239,-229v-175,-2,-274,87,-289,246r-17,194v4,141,102,197,249,198v53,1,105,-10,152,-8v15,1,8,33,8,49v0,8,-4,12,-12,13xm320,-321v-1,75,-47,192,57,180r42,-1r23,-250v-70,-14,-121,-3,-122,71","w":774},"A":{"d":"500,-641r150,625v0,11,-6,16,-17,16r-140,0v-12,0,-18,-8,-20,-18r-36,-164r-205,0r-36,164v-2,10,-8,18,-20,18r-140,0v-13,1,-19,-9,-16,-21r149,-620v13,-110,162,-136,265,-91v34,15,56,47,66,91xm409,-319r-65,-287v-8,-8,-20,-3,-23,11r-61,276r149,0","w":669,"k":{"\u00d8":18,"y":46,"w":29,"v":46,"t":33,"f":33,"Y":76,"W":27,"V":56,"U":20,"T":70,"Q":18,"O":18,"L":20,"G":20,"E":13,"C":20}},"B":{"d":"623,-230v0,254,-264,258,-498,227v-40,-5,-55,-18,-55,-65r0,-608v-4,-91,97,-70,182,-75v199,-13,372,22,366,226v-2,69,-35,123,-84,147v50,25,89,75,89,148xm239,-438v101,-2,214,22,214,-94v0,-93,-116,-80,-214,-79r0,173xm239,-132v108,2,226,13,218,-98v-4,-57,-36,-89,-106,-89r-112,0r0,187","w":669,"k":{"\u00c6":18,"Y":40,"X":22,"V":22,"T":13,"A":12}},"C":{"d":"350,-140v52,1,106,-6,151,-8v13,0,19,7,19,20v0,36,7,86,-6,112v-36,19,-102,25,-165,25v-195,0,-295,-115,-296,-318r0,-126v-13,-259,195,-362,445,-300v14,3,22,6,22,22r0,97v0,14,-7,21,-22,20r-148,-8v-140,-4,-125,155,-124,295v0,101,28,168,124,169","w":561,"k":{"\u00d8":21,"y":9,"Q":21,"O":21,"G":16}},"D":{"d":"631,-307v5,253,-176,350,-441,311v-44,-6,-120,10,-120,-45r0,-661v2,-54,69,-43,120,-45r122,-5v208,1,317,108,319,316r0,129xm312,-136v108,1,148,-60,148,-171r0,-129v1,-111,-39,-172,-148,-171r-71,2r0,467","w":682,"k":{"\u00c6":16,"\u00c5":16,"Z":9,"Y":47,"X":33,"W":6,"V":16,"T":15,"A":16}},"E":{"d":"504,-138v37,6,14,75,20,113v-6,34,-50,22,-90,29v-29,5,-70,5,-124,5v-153,2,-243,-58,-243,-215r0,-332v-17,-232,227,-231,437,-201v13,2,20,9,20,20r0,93v0,10,-10,20,-20,20r-203,0v-84,-9,-60,86,-64,159r259,0v37,7,15,76,20,115v1,10,-10,20,-20,20r-259,0v5,75,-26,174,64,174r203,0","w":580},"F":{"d":"524,-625v0,10,-10,20,-20,20r-203,0v-84,-9,-61,85,-64,158r259,0v37,7,15,76,20,115v1,10,-10,20,-20,20r-259,0r0,292v0,10,-10,20,-20,20r-130,0v-10,0,-20,-10,-20,-20r0,-517v-17,-232,227,-231,437,-201v13,2,20,9,20,20r0,93","w":581,"k":{"\u00e6":36,"\u00e5":36,"\u00c6":58,"\u00c5":58,"u":24,"o":36,"e":30,"a":36,"O":10,"G":21,"A":58,".":106,",":106}},"G":{"d":"580,-608v0,12,-7,13,-18,13r-208,-8v-147,-7,-132,151,-131,295v1,96,26,170,112,170v27,0,53,-1,77,-3r0,-230v0,-10,9,-20,19,-20r128,0v10,0,20,10,20,20r0,336v0,13,-7,20,-20,23v-66,12,-136,24,-224,21v-183,-6,-284,-119,-285,-318r0,-124v-1,-210,105,-315,304,-319v80,-2,154,12,209,23v11,2,17,7,17,15r0,106","k":{"Y":24,"V":6}},"H":{"d":"659,-20v0,10,-10,20,-20,20r-131,0v-10,0,-20,-10,-20,-20r0,-289r-247,0r0,289v0,10,-10,20,-20,20r-131,0v-10,0,-20,-10,-20,-20r0,-704v0,-10,10,-19,20,-19r131,0v10,0,20,9,20,19r0,266r247,0r0,-266v0,-10,10,-19,20,-19r131,0v10,0,20,9,20,19r0,704","w":729},"I":{"d":"241,-20v0,10,-9,20,-19,20r-134,0v-10,0,-18,-10,-18,-20r0,-704v0,-13,6,-19,18,-19r134,0v13,0,19,6,19,19r0,704","w":311},"J":{"d":"241,6v6,143,-99,189,-243,169v-10,-1,-15,-7,-15,-17r0,-102v4,-38,87,17,87,-50r0,-730v0,-10,10,-19,20,-19r131,0v10,0,20,9,20,19r0,730","w":311},"K":{"d":"221,-743v10,0,20,9,20,19r0,318r220,-325v5,-8,13,-12,22,-12r153,0v19,0,19,13,11,25r-238,338r239,359v7,9,6,21,-10,21r-172,0v-13,0,-16,-7,-22,-14r-203,-330r0,324v0,10,-10,20,-20,20r-131,0v-10,0,-20,-10,-20,-20r0,-704v0,-10,10,-19,20,-19r131,0","w":678,"k":{"\u00e6":28,"\u00e5":28,"\u00d8":53,"y":53,"w":50,"v":53,"u":46,"q":25,"o":38,"g":16,"e":50,"d":33,"c":33,"a":28,"Y":10,"W":12,"V":7,"U":7,"T":6,"Q":53,"O":53,"L":13,"G":61,"E":42,"C":61,"-":16}},"L":{"d":"477,-138v37,6,14,75,20,113v-20,45,-114,31,-183,34v-153,7,-244,-57,-244,-215r0,-517v0,-10,10,-20,20,-20r131,0v10,0,20,10,20,20r0,517v1,51,15,67,64,68r172,0","w":519,"k":{"\u00d8":30,"y":63,"w":23,"v":21,"o":10,"e":9,"Y":96,"W":30,"V":64,"U":34,"T":82,"S":7,"Q":30,"O":30,"L":22,"G":27,"E":16,"C":13,"-":16}},"M":{"d":"746,-14v1,10,-8,14,-17,14r-132,0v-10,0,-16,-10,-16,-20r0,-417v0,-12,-9,-9,-13,-1r-90,165v-16,30,-70,17,-110,17v-13,0,-23,-6,-30,-17r-90,-165v-4,-8,-13,-11,-13,1r0,417v0,10,-6,20,-16,20r-132,0v-9,0,-18,-4,-17,-14r0,-695v1,-53,81,-34,130,-34v20,0,35,9,44,27r153,285v9,17,13,17,22,0r153,-285v18,-43,84,-23,138,-27v21,-1,36,14,36,35r0,694","w":816,"k":{"Y":27,"V":16}},"N":{"d":"659,-38v-1,55,-83,38,-137,38v-29,0,-38,-9,-52,-31r-228,-394v-5,-9,-13,-12,-14,0r0,405v0,10,-10,20,-20,20r-118,0v-10,0,-20,-10,-20,-20r0,-685v1,-57,85,-38,139,-38v25,0,31,13,42,31r237,412v5,10,12,12,13,-1r0,-423v0,-10,10,-19,20,-19r118,0v10,0,20,9,20,19r0,686","w":729,"k":{"V":21,"T":26}},"O":{"d":"645,-312v-1,205,-98,321,-296,321v-198,0,-295,-116,-296,-321r0,-119v1,-205,98,-321,296,-321v198,0,295,116,296,321r0,119xm349,-141v138,6,125,-150,124,-290v0,-108,-28,-167,-124,-171v-138,-5,-124,150,-123,290v1,108,27,168,123,171","w":698,"k":{"\u00c6":13,"\u00c5":18,"x":13,"Z":28,"Y":45,"X":49,"W":10,"V":24,"T":30,"A":18}},"P":{"d":"618,-511v0,211,-167,265,-379,248r0,243v0,10,-10,20,-20,20r-129,0v-10,0,-20,-9,-20,-19r0,-672v2,-68,74,-50,138,-57v219,-23,410,21,410,237xm239,-403v109,7,209,6,209,-108v0,-107,-107,-103,-209,-96r0,204","w":651,"k":{"\u00e6":21,"\u00e5":21,"\u00c6":42,"\u00c5":54,"o":7,"e":7,"a":21,"Z":26,"Y":16,"X":36,"T":11,"A":54,".":110,",":105}},"Q":{"d":"645,-312v0,176,-73,281,-215,313v-1,25,-1,45,25,45r90,0v43,-2,18,64,24,98v-11,37,-87,35,-134,35v-112,0,-173,-57,-166,-178v-142,-32,-216,-137,-216,-313r0,-119v1,-205,98,-321,296,-321v198,0,295,116,296,321r0,119xm349,-141v138,6,125,-150,124,-290v0,-108,-28,-167,-124,-171v-138,-5,-124,150,-123,290v1,108,27,168,123,171","w":698,"k":{"\u00c6":13,"\u00c5":18,"Z":28,"Y":45,"X":49,"W":10,"V":24,"T":30,"A":18}},"R":{"d":"619,-518v0,114,-53,181,-129,213r151,282v6,11,4,24,-12,23r-153,0v-12,0,-15,-11,-20,-20r-134,-253v-26,2,-55,-1,-82,-1r0,254v0,10,-10,20,-20,20r-130,0v-10,0,-20,-10,-20,-20r0,-671v-1,-67,76,-51,137,-57v216,-22,412,14,412,230xm240,-412v106,5,209,13,209,-106v0,-95,-111,-93,-209,-86r0,192","w":680,"k":{"\u00d8":21,"y":20,"o":30,"g":6,"e":23,"c":6,"Y":39,"V":31,"T":32,"S":8,"Q":21,"O":21,"L":23,"G":28,"E":23,"C":24}},"S":{"d":"415,-600v-77,1,-199,-32,-199,48v0,44,27,45,67,70v110,67,263,105,263,272v0,219,-261,249,-462,197v-9,-2,-20,-9,-20,-20r0,-98v2,-31,32,-15,62,-15v88,0,244,46,238,-62v-3,-45,-27,-50,-66,-76v-104,-73,-250,-102,-256,-273v-7,-222,274,-214,468,-173v8,2,15,7,15,18r0,101v-2,25,-25,17,-54,15","w":588,"k":{"y":9,"x":6,"w":21,"v":9,"t":23,"Y":16,"W":10,"V":10,"A":8}},"T":{"d":"562,-621v0,10,-11,19,-21,19r-162,0r0,582v0,10,-10,20,-20,20r-131,0v-10,0,-20,-10,-20,-20r0,-582r-163,0v-10,0,-20,-9,-20,-19r0,-103v0,-10,10,-19,20,-19r496,0v10,0,21,9,21,19r0,103","w":587,"k":{"\u00e6":60,"\u00e5":60,"\u00d8":30,"\u00c6":70,"\u00c5":70,"z":15,"y":27,"x":16,"w":13,"v":13,"u":20,"s":58,"r":34,"q":65,"p":16,"o":78,"n":16,"m":16,"g":27,"e":66,"d":50,"c":43,"a":60,"Q":30,"O":30,"G":25,"F":16,"E":23,"C":27,"A":70,"\/":80,".":55,"-":57,",":55}},"U":{"d":"644,-279v1,196,-98,288,-289,288v-191,0,-288,-92,-288,-288r0,-445v0,-10,10,-19,20,-19r131,0v10,0,20,9,20,19r0,445v2,97,22,143,117,145v92,2,118,-53,118,-145r0,-445v0,-10,10,-19,20,-19r130,0v10,0,21,9,21,19r0,445","w":711,"k":{"\u00c6":20,"\u00c5":20,"X":16,"A":20}},"V":{"d":"28,-722v-4,-12,5,-21,17,-21r139,0v12,0,18,8,20,18r125,577v3,20,24,20,28,0r125,-577v3,-10,7,-18,19,-18r140,0v13,-1,19,9,16,21r-149,620v-13,110,-163,137,-266,92v-34,-15,-55,-48,-65,-92","w":686,"k":{"\u00e6":50,"\u00e5":50,"\u00d8":24,"\u00c6":56,"\u00c5":56,"z":12,"y":13,"x":16,"w":10,"v":10,"u":33,"s":44,"r":26,"q":44,"p":10,"o":50,"n":10,"m":10,"g":43,"e":50,"c":43,"a":50,"S":9,"Q":24,"O":24,"G":23,"F":20,"E":33,"C":29,"A":56,"\/":56,".":55,",":55}},"W":{"d":"856,-743v9,0,17,4,16,15r-93,655v-5,76,-68,79,-149,76v-50,-1,-80,-23,-92,-68r-82,-306v-7,-2,-12,-1,-14,7r-79,299v-13,65,-71,71,-149,68v-58,-2,-85,-20,-92,-76r-93,-657v-1,-10,7,-13,16,-13r136,0v9,0,15,6,16,19r57,536v1,18,9,16,13,0r72,-275v10,-65,92,-48,161,-48v34,0,54,15,62,48r72,275v3,17,12,18,13,0r57,-536v1,-13,7,-19,16,-19r136,0","w":889,"k":{"\u00e6":20,"\u00e5":20,"\u00d8":10,"\u00c6":27,"\u00c5":27,"z":15,"x":29,"s":15,"q":15,"o":15,"g":15,"e":15,"d":15,"c":15,"a":20,"S":10,"Q":10,"O":10,"E":10,"A":27}},"X":{"d":"646,-743v9,0,19,10,13,19r-206,353r215,351v6,10,4,20,-10,20v-57,-2,-123,4,-174,-4v-52,-68,-93,-150,-141,-222r-117,206v-6,10,-12,19,-25,20r-148,0v-13,1,-18,-10,-13,-20r209,-361r-213,-349v0,-7,8,-13,15,-13r161,0v12,0,20,11,25,19r124,202r112,-202v5,-8,13,-19,25,-19r148,0","w":703,"k":{"\u00e6":33,"\u00e5":33,"\u00d8":49,"y":46,"v":43,"u":36,"o":40,"e":33,"a":33,"U":16,"Q":49,"O":49,"L":20,"G":47,"E":34,"C":43,"-":43}},"Y":{"d":"610,-743v12,-1,20,11,15,22r-151,346v-17,39,-33,61,-65,77r0,278v0,10,-10,20,-20,20r-131,0v-10,0,-20,-10,-20,-20r0,-278v-32,-16,-50,-38,-66,-77r-151,-346v-4,-11,3,-22,15,-22r144,0v11,0,17,8,20,17r108,282v4,19,23,19,30,0r108,-282v3,-9,9,-17,20,-17r144,0","w":647,"k":{"\u00e6":90,"\u00e5":90,"\u00d8":45,"\u00c6":76,"\u00c5":76,"z":65,"y":41,"x":41,"w":44,"v":47,"u":68,"s":68,"r":69,"q":93,"p":69,"o":96,"n":48,"m":48,"g":93,"e":95,"d":93,"c":93,"a":90,"S":9,"Q":45,"O":45,"G":50,"F":36,"E":35,"C":50,"A":76,"\/":96,".":96,"-":56,",":96}},"Z":{"d":"565,-20v0,10,-10,20,-20,20r-454,0v-22,0,-42,-8,-41,-31v2,-46,-5,-93,15,-124r279,-422v6,-7,6,-19,-7,-18r-249,0v-10,0,-20,-9,-20,-19r0,-110v0,-10,10,-19,20,-19r431,0v56,-5,40,65,40,119v0,9,-3,17,-8,26r-282,432v-7,9,-8,18,6,18r270,0v10,0,20,8,20,18r0,110","w":615,"k":{"\u00e6":20,"\u00e5":20,"\u00d8":20,"y":13,"v":13,"u":13,"o":23,"g":27,"e":20,"c":27,"a":20,"Q":20,"O":20,"G":24,"C":10}},"[":{"d":"344,87v-4,37,16,107,-20,107r-244,0v-11,0,-17,-9,-17,-19r0,-899v0,-10,6,-19,17,-19r243,0v36,5,14,70,20,107v-7,38,-77,14,-116,20r0,683r97,0v10,0,21,10,20,20","w":374,"k":{"A":36}},"\\":{"d":"179,-723r213,711v0,9,-9,17,-19,17r-127,0v-12,0,-16,-12,-19,-21r-214,-711v0,-10,9,-16,19,-16r126,0v11,0,19,11,21,20","w":405},"]":{"d":"311,175v0,10,-6,19,-17,19r-244,0v-36,-5,-14,-70,-20,-107v7,-38,78,-13,117,-20r0,-683r-96,0v-36,-5,-15,-70,-20,-107v-1,-10,10,-20,20,-20r243,0v11,0,17,9,17,19r0,899","w":374},"^":{"d":"571,-586v7,9,8,21,-7,21v-48,-2,-106,5,-148,-3v-33,-30,-62,-69,-93,-101r-80,89v-11,10,-11,15,-31,15r-130,0v-15,0,-14,-12,-7,-21r111,-148v11,-13,12,-18,34,-18r206,0v22,0,23,5,34,18"},"_":{"d":"573,55v-2,26,10,64,-20,64r-564,0v-29,2,-18,-38,-20,-64v0,-11,10,-16,20,-16r564,0v10,0,20,5,20,16","w":541},"`":{"d":"289,-647v6,6,7,17,-5,17v-39,-2,-87,4,-121,-3r-132,-131v-7,-6,-5,-16,7,-15v48,2,107,-6,148,3v37,39,68,87,103,129","w":443},"a":{"d":"502,-20v0,10,-10,20,-20,20r-112,0v-17,0,-22,-16,-20,-36v-38,27,-76,46,-139,45v-112,-1,-172,-62,-171,-181v2,-153,129,-174,300,-169v5,-68,-9,-108,-75,-105r-171,7v-11,0,-19,-6,-18,-18v4,-37,-16,-94,19,-103v42,-10,115,-22,173,-21v145,1,234,58,234,204r0,357xm198,-172v-12,88,105,59,145,37r0,-110v-77,-1,-152,-5,-145,73","w":562,"k":{"y":23,"w":20,"v":23,"t":23,"f":18}},"b":{"d":"555,-247v1,162,-89,258,-251,256v-85,-1,-180,-10,-238,-37v-4,-4,-6,-10,-6,-18r0,-701v0,-10,11,-20,21,-20r121,0v10,0,20,10,20,20r0,173v24,-3,58,-7,82,-7v166,-2,250,96,251,256r0,78xm304,-124v100,0,90,-103,89,-201v0,-70,-18,-123,-89,-122v-24,0,-60,3,-82,5r0,312v22,3,54,6,82,6","w":597,"k":{"y":20,"x":21,"v":18,"t":13,"f":13}},"c":{"d":"411,-135v12,-1,21,6,21,17v-3,34,6,79,-5,104v-36,18,-91,23,-149,23v-147,0,-236,-98,-233,-253r0,-84v-11,-207,164,-289,366,-238v38,10,14,73,21,112v-3,30,-50,12,-74,12v-17,0,-40,-2,-69,-2v-93,-1,-82,106,-82,200v1,67,18,115,82,116v53,1,78,-2,122,-7","w":474,"k":{"o":33,"e":21}},"d":{"d":"516,-767v10,0,21,10,21,20r0,701v-1,22,-9,23,-31,29v-58,15,-139,26,-213,26v-162,1,-251,-94,-251,-256v0,-205,56,-337,251,-334v24,0,58,4,82,7r0,-173v0,-10,10,-20,20,-20r121,0xm293,-124v29,0,59,-3,82,-6r0,-312v-22,-2,-58,-5,-82,-5v-99,-3,-90,103,-89,200v0,71,17,124,89,123","w":597},"e":{"d":"298,-581v183,0,258,124,247,321v0,16,-7,24,-21,24r-319,0v-3,90,57,115,154,110r144,-8v13,0,19,5,19,16v0,37,16,95,-21,103v-68,15,-119,25,-205,24v-183,-3,-262,-120,-251,-327v9,-165,88,-263,253,-263xm297,-451v-62,0,-94,46,-92,115r182,0v2,-70,-27,-115,-90,-115","w":590,"k":{"y":20,"x":23,"v":20,"t":13,"f":13,"T":60}},"f":{"d":"128,-573v-21,-171,83,-229,247,-195v35,7,15,63,19,98v3,27,-45,14,-70,17v-46,-6,-29,39,-33,80v36,5,97,-15,102,20v-5,36,15,101,-20,101r-82,0r0,432v0,10,-10,20,-20,20r-123,0v-10,0,-20,-10,-20,-20r0,-432v-31,-7,-70,-5,-94,-20v-14,-16,-4,-54,-7,-80v4,-35,65,-17,101,-21","w":424,"k":{"s":6,"q":18,"o":23,"g":15,"e":18,"c":9,".":58,",":58}},"g":{"d":"42,-327v-1,-161,89,-257,250,-256v86,2,181,10,240,37v4,4,5,10,5,18r0,528v14,212,-225,228,-407,183v-37,-9,-16,-66,-20,-103v-3,-26,33,-16,54,-16v82,0,215,44,211,-64v-25,3,-58,7,-83,7v-165,2,-249,-97,-250,-256r0,-78xm204,-327v-1,97,-10,202,88,201v24,0,61,-4,83,-6r0,-312v-24,-3,-53,-5,-83,-5v-70,0,-88,52,-88,122","w":597},"h":{"d":"552,-21v0,10,-11,21,-21,21r-121,0v-10,0,-20,-11,-20,-21r0,-333v2,-61,-12,-96,-74,-93v-37,2,-65,17,-94,32r0,394v0,10,-10,21,-20,21r-121,0v-10,0,-21,-11,-21,-21r0,-726v0,-10,10,-20,20,-20r122,0v10,0,20,10,20,20r0,211v47,-30,83,-44,153,-45v137,-2,177,93,177,227r0,333","w":612,"k":{"y":20,"w":18,"v":20,"t":13,"f":13}},"i":{"d":"230,-658v1,10,-10,20,-20,20r-130,0v-37,-6,-15,-75,-20,-113v-1,-10,10,-20,20,-20r130,0v37,6,15,75,20,113xm226,-20v0,10,-10,20,-20,20r-122,0v-10,0,-20,-10,-20,-20r0,-533v0,-10,10,-20,20,-20r122,0v10,0,20,10,20,20r0,533","w":290},"j":{"d":"230,-751v-5,39,17,113,-21,113r-129,0v-37,-6,-15,-75,-20,-113v-1,-10,10,-20,20,-20r129,0v10,0,22,10,21,20xm226,32v2,114,-47,172,-158,171v-26,0,-53,-2,-80,-7v-37,-5,-16,-64,-20,-99v-3,-27,40,-17,65,-18v31,-2,31,-15,31,-47r0,-584v0,-10,9,-21,19,-21r124,0v10,0,19,11,19,21r0,584","w":290},"k":{"d":"202,-767v10,0,20,10,20,20r0,418r152,-229v6,-10,14,-14,26,-15r143,0v15,-1,19,12,11,21r-186,253r185,278v5,8,1,21,-11,21r-151,0v-14,0,-18,-4,-25,-14r-144,-235r0,228v0,10,-10,21,-20,21r-121,0v-10,0,-21,-11,-21,-21r0,-726v0,-10,11,-20,21,-20r121,0","w":588,"k":{"\u00e6":20,"\u00e5":20,"u":25,"q":36,"o":36,"g":36,"e":40,"d":40,"c":35,"a":20}},"l":{"d":"222,-21v0,10,-9,21,-19,21r-122,0v-10,0,-21,-11,-21,-21r0,-726v0,-10,11,-20,21,-20r122,0v10,0,19,10,19,20r0,726","w":282},"m":{"d":"214,-531v61,-51,214,-78,266,-1v46,-25,91,-49,163,-49v132,0,172,88,172,219r0,341v0,10,-11,21,-21,21r-121,0v-10,0,-20,-11,-20,-21r0,-341v-1,-59,-8,-83,-61,-83v-27,0,-54,6,-77,18v2,20,3,42,3,65r0,341v0,10,-10,21,-20,21r-121,0v-10,0,-21,-11,-21,-21r0,-341v-2,-58,-5,-83,-58,-83v-28,0,-52,14,-76,26r0,398v0,10,-10,21,-20,21r-121,0v-10,0,-21,-11,-21,-21r0,-532v0,-10,10,-20,20,-20r114,0v19,0,22,20,20,42","w":875,"k":{"y":15,"v":20,"t":13,"f":20}},"n":{"d":"552,-21v0,10,-11,21,-21,21r-121,0v-10,0,-20,-11,-20,-21r0,-333v2,-61,-12,-96,-74,-93v-37,2,-65,17,-94,32r0,394v0,10,-10,21,-20,21r-121,0v-10,0,-21,-11,-21,-21r0,-532v0,-10,10,-20,20,-20r112,0v20,0,22,22,20,44v50,-35,87,-51,163,-52v137,-2,177,93,177,227r0,333","w":612,"k":{"y":23,"w":16,"v":26,"t":13,"f":18}},"o":{"d":"545,-321v9,205,-61,330,-250,330v-189,0,-261,-124,-251,-330v8,-165,87,-260,251,-260v164,0,243,96,250,260xm205,-321v0,97,-1,193,90,193v83,0,89,-95,89,-193v0,-81,-30,-122,-89,-122v-66,0,-90,49,-90,122","w":589,"k":{"z":16,"y":23,"x":38,"w":15,"v":20,"t":20,"f":18}},"p":{"d":"555,-325v0,205,-56,337,-251,334v-24,0,-58,-4,-82,-7r0,173v0,10,-10,20,-20,20r-121,0v-10,0,-21,-10,-21,-20r0,-701v1,-22,9,-23,31,-29v58,-15,139,-26,213,-26v162,-1,251,94,251,256xm304,-124v99,2,90,-103,89,-201v0,-71,-18,-122,-89,-122v-29,0,-59,2,-82,5r0,312","w":597,"k":{"y":20,"x":28,"w":6,"v":20,"t":13,"f":18}},"q":{"d":"537,175v0,10,-11,20,-21,20r-121,0v-10,0,-20,-10,-20,-20r0,-173v-24,3,-58,7,-82,7v-166,2,-250,-96,-251,-256r0,-78v-1,-162,89,-258,251,-256v85,1,181,10,239,37v4,4,5,10,5,18r0,701xm293,-124v24,0,60,-4,82,-6r0,-312v-22,-3,-54,-5,-82,-5v-99,-3,-90,103,-89,200v0,70,18,123,89,123","w":597},"r":{"d":"374,-466v0,12,-8,20,-23,19v-52,-2,-94,17,-129,35r0,391v0,10,-10,21,-20,21r-121,0v-10,0,-21,-11,-21,-21r0,-532v0,-10,10,-20,20,-20r119,0v18,0,22,19,20,40v33,-27,80,-48,135,-48v38,0,20,76,20,115","w":396,"k":{"\u00e6":23,"\u00e5":23,"q":12,"o":19,"g":16,"e":16,"d":18,"c":14,"a":23,".":30,",":30}},"s":{"d":"258,-448v-42,-3,-66,20,-45,48v88,74,244,86,248,241v5,184,-233,188,-396,146v-35,-9,-19,-67,-19,-104v0,-12,9,-21,23,-19v51,7,115,10,170,14v50,3,71,-26,51,-60v-84,-75,-248,-89,-248,-244v0,-113,80,-156,205,-155v75,0,122,9,178,23v35,9,19,67,19,104v0,14,-7,21,-20,19v-48,-6,-112,-9,-166,-13","w":503,"k":{"v":6,"t":6}},"t":{"d":"287,-161v-10,59,33,45,82,47v40,1,16,62,21,95v4,25,-41,24,-59,26v-135,17,-207,-32,-207,-169r0,-290v-31,-7,-70,-5,-94,-20v-14,-16,-4,-54,-7,-80v4,-35,65,-17,101,-21v5,-36,-16,-96,20,-102r125,-21v10,0,18,6,18,17r0,106v36,5,97,-15,102,20v-5,36,15,101,-20,101r-82,0r0,291","w":421,"k":{"q":6,"o":10}},"u":{"d":"552,-20v0,10,-10,20,-20,20r-112,0v-20,0,-22,-22,-20,-44v-50,35,-87,51,-163,52v-136,1,-177,-93,-177,-227r0,-333v0,-10,11,-21,21,-21r121,0v10,0,20,11,20,21r0,333v-2,61,12,96,74,93v37,-2,65,-17,94,-32r0,-394v0,-10,10,-21,20,-21r121,0v10,0,21,11,21,21r0,532","w":612},"v":{"d":"547,-573v12,0,20,11,16,23r-126,454v-9,114,-202,140,-265,54v-10,-14,-18,-32,-24,-54r-126,-460v0,-11,5,-17,16,-17r132,0v12,0,19,11,21,21r86,392v4,28,25,27,31,0r86,-392v2,-11,9,-21,21,-21r132,0","w":585,"k":{"\u00e6":23,"\u00e5":23,"q":22,"o":23,"g":28,"e":20,"d":20,"a":23,".":55,",":55}},"w":{"d":"801,-573v11,0,17,9,15,21r-89,482v-7,68,-71,70,-149,70v-49,0,-74,-26,-84,-64r-67,-261v-1,-7,-9,-7,-10,0r-67,261v-11,38,-35,64,-84,64v-75,0,-136,4,-149,-70r-89,-486v0,-9,6,-17,15,-17v44,2,96,-4,135,3v3,2,6,7,7,14r59,380v2,18,10,16,14,0r67,-264v6,-60,76,-45,138,-45v37,0,48,13,56,45r67,264v4,16,12,18,14,0r59,-380v2,-13,7,-17,21,-17r121,0","w":845,"k":{"\u00e6":10,"\u00e5":10,"o":15,"e":20,"c":10,"a":10,".":40,",":27}},"x":{"d":"38,-552v-6,-10,3,-21,13,-21r149,0v14,1,19,10,26,21r89,138r82,-138v8,-11,11,-21,26,-21r134,0v11,-2,15,13,10,21r-165,262r181,269v6,10,-2,21,-12,21r-151,0v-15,-1,-18,-10,-26,-21r-99,-155r-93,156v-8,12,-11,20,-26,20r-134,0v-11,1,-13,-12,-9,-20r175,-278","w":617,"k":{"w":23,"u":31,"t":25,"q":46,"o":43,"g":43,"e":43,"d":47,"c":31}},"y":{"d":"283,-178v5,17,6,20,21,19r93,-395v2,-10,10,-19,21,-19r133,0v12,0,22,10,18,23r-168,589v-13,152,-200,197,-355,141v-16,-18,-3,-64,-6,-93v-1,-11,10,-19,22,-19v73,0,178,36,191,-44r9,-31v-73,5,-92,-35,-108,-93r-133,-457v0,-11,7,-16,20,-16r133,0v12,0,16,9,19,19","w":592,"k":{"\u00e6":24,"\u00e5":24,"q":20,"o":23,"g":25,"e":20,"d":13,"c":27,"a":24,".":61,",":55}},"z":{"d":"472,-20v0,10,-10,20,-20,20r-375,0v-47,1,-35,-73,-31,-116v2,-5,6,-12,11,-19r217,-296v4,-6,5,-11,-4,-12r-201,0v-11,0,-17,-5,-17,-16r0,-94v0,-10,10,-20,20,-20r365,0v49,1,32,78,31,125v-1,6,-4,11,-9,18r-207,283v-4,5,-5,11,4,11r198,0v10,0,18,5,18,16r0,100","w":515,"k":{"o":16,"e":23,"d":6}},"{":{"d":"377,87v0,38,16,104,-20,107v-163,12,-270,-23,-260,-185r0,-131v0,-53,-23,-80,-57,-103r0,-95v34,-23,55,-50,56,-103r0,-135v-9,-162,96,-197,260,-185v36,3,20,70,20,107v0,30,-48,18,-78,20v-38,2,-38,14,-38,58r0,135v-1,77,-27,122,-83,150v56,28,83,74,83,151r0,131v2,44,1,56,39,58v30,2,78,-11,78,20","w":407},"|":{"d":"227,173v0,10,-10,21,-20,21r-123,0v-10,0,-21,-11,-21,-21r0,-896v0,-10,11,-20,21,-20r123,0v10,0,20,10,20,20r0,896","w":290},"}":{"d":"367,-225v-34,23,-56,50,-57,103r0,131v10,163,-96,197,-260,185v-36,-3,-20,-70,-20,-107v0,-30,48,-18,78,-20v38,-2,39,-14,39,-58r0,-131v1,-77,27,-123,83,-151v-56,-28,-83,-73,-83,-150r0,-135v-2,-44,0,-56,-38,-58v-30,-2,-78,11,-78,-20v0,-38,-16,-104,20,-107v163,-12,271,22,260,185r0,135v0,53,22,80,56,103r0,95","w":407},"~":{"d":"576,-505v0,158,-119,214,-234,147v-36,-21,-65,-50,-114,-56v-51,-7,-10,78,-49,78r-89,0v-21,1,-20,-18,-20,-38v0,-132,103,-191,216,-141v45,20,77,60,133,68v33,5,29,-27,29,-58v0,-13,6,-20,19,-20r89,0v13,0,20,7,20,20"},"\u00c5":{"d":"500,-641r150,625v0,11,-6,16,-17,16r-140,0v-12,0,-18,-8,-20,-18r-36,-164r-205,0r-36,164v-2,10,-8,18,-20,18r-140,0v-13,1,-19,-9,-16,-21r149,-620v13,-110,162,-136,265,-91v34,15,56,47,66,91xm409,-319r-65,-287v-8,-8,-20,-3,-23,11r-61,276r149,0xm334,-1012v70,0,117,47,117,117v0,70,-47,117,-117,117v-70,0,-117,-47,-117,-117v0,-70,47,-117,117,-117xm334,-851v23,0,44,-21,44,-44v0,-23,-21,-44,-44,-44v-23,0,-44,21,-44,44v0,23,21,44,44,44","w":669,"k":{"\u00d8":18,"y":46,"w":29,"v":46,"t":33,"f":33,"Y":76,"W":27,"V":56,"U":20,"T":70,"Q":18,"O":18,"G":20,"C":20}},"\u00c6":{"d":"847,-138v37,6,14,75,20,113v-3,31,-47,24,-77,29v-33,6,-67,5,-112,5v-146,2,-235,-52,-242,-191r-204,0r-36,164v-2,10,-8,18,-20,18r-140,0v-13,1,-19,-9,-16,-21r149,-620v16,-77,74,-102,166,-102r512,0v13,0,20,7,20,20r0,97v0,10,-10,20,-20,20r-242,0r0,159r234,0v37,7,15,76,20,115v1,10,-10,20,-20,20r-234,0v5,75,-26,174,64,174r178,0xm435,-610r-100,0v-7,0,-12,5,-14,15r-61,276r175,0r0,-291","w":923},"\u00d8":{"d":"349,-752v72,0,130,16,176,46v13,-15,21,-39,44,-44r97,0v11,0,14,11,8,19r-75,103v48,71,47,193,46,316v-2,205,-98,321,-296,321v-67,0,-125,-15,-174,-46v-14,16,-21,41,-45,46r-97,0v-11,1,-14,-12,-8,-19r75,-104v-48,-72,-48,-193,-47,-317v2,-205,98,-321,296,-321xm349,-602v-144,0,-124,166,-122,311r204,-284v-20,-18,-47,-27,-82,-27xm349,-141v145,0,124,-163,124,-310r-204,284v19,17,46,26,80,26","w":698,"k":{"\u00c5":18,"Z":28,"Y":45,"X":49,"W":10,"V":24,"T":30,"A":18}},"\u00e5":{"d":"502,-20v0,10,-10,20,-20,20r-112,0v-17,0,-22,-16,-20,-36v-38,27,-76,46,-139,45v-112,-1,-172,-62,-171,-181v2,-153,129,-174,300,-169v5,-68,-9,-108,-75,-105r-171,7v-11,0,-19,-6,-18,-18v4,-37,-16,-94,19,-103v42,-10,115,-22,173,-21v145,1,234,58,234,204r0,357xm198,-172v-12,88,105,59,145,37r0,-110v-77,-1,-152,-5,-145,73xm283,-858v70,0,117,47,117,117v0,70,-47,117,-117,117v-70,0,-117,-47,-117,-117v0,-70,47,-117,117,-117xm283,-697v23,0,44,-21,44,-44v0,-23,-21,-44,-44,-44v-23,0,-44,21,-44,44v0,23,21,44,44,44","w":562,"k":{"y":23,"w":20,"v":23,"t":23,"f":18}},"\u00e6":{"d":"835,-329v0,33,11,85,-21,85r-310,0r0,41v5,118,181,67,294,69v11,0,16,5,16,16v0,35,14,89,-19,98v-98,30,-266,53,-339,-17v-50,28,-121,46,-195,46v-130,0,-222,-56,-219,-192v3,-147,146,-160,301,-158v0,-72,-11,-108,-78,-105r-166,7v-11,0,-17,-6,-17,-18v0,-38,-15,-95,20,-103v109,-27,268,-38,333,39v39,-37,85,-60,158,-60v162,1,242,91,242,252xm592,-456v-69,0,-91,51,-88,124r176,0v2,-73,-16,-124,-88,-124xm196,-183v0,86,94,88,152,64r0,-134v-77,0,-152,-5,-152,70","w":881},"\u00f8":{"d":"44,-251v0,-205,62,-328,251,-330v60,0,110,13,150,40v16,-21,30,-44,48,-63v16,-4,39,-1,58,-2v11,-1,9,15,4,19r-65,87v50,57,58,143,55,249v-4,164,-86,260,-250,260v-60,0,-110,-13,-150,-40r-50,65v-16,4,-39,0,-58,1v-11,0,-9,-13,-4,-19r66,-89v-37,-45,-55,-104,-55,-178xm295,-443v-101,-3,-94,122,-88,224r148,-201v-15,-15,-35,-23,-60,-23xm384,-251r-2,-102r-148,201v15,16,36,24,61,24v59,0,91,-41,89,-123","w":589},"\u00a0":{"w":260}}});

;;;/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/

var swfobject = function () {var D = "undefined", r = "object", S = "Shockwave Flash", W = "ShockwaveFlash.ShockwaveFlash", q = "application/x-shockwave-flash", R = "SWFObjectExprInst", x = "onreadystatechange", O = window, j = document, t = navigator, T = false, U = [h], o = [], N = [], I = [], l, Q, E, B, J = false, a = false, n, G, m = true, M = function () { var aa = typeof j.getElementById != D && typeof j.getElementsByTagName != D && typeof j.createElement != D, ah = t.userAgent.toLowerCase(), Y = t.platform.toLowerCase(), ae = Y ? /win/.test(Y) : /win/.test(ah), ac = Y ? /mac/.test(Y) : /mac/.test(ah), af = /webkit/.test(ah) ? parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, X = ! +"\v1", ag = [0, 0, 0], ab = null; if (typeof t.plugins != D && typeof t.plugins[S] == r) { ab = t.plugins[S].description; if (ab && !(typeof t.mimeTypes != D && t.mimeTypes[q] && !t.mimeTypes[q].enabledPlugin)) { T = true; X = false; ab = ab.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); ag[0] = parseInt(ab.replace(/^(.*)\..*$/, "$1"), 10); ag[1] = parseInt(ab.replace(/^.*\.(.*)\s.*$/, "$1"), 10); ag[2] = /[a-zA-Z]/.test(ab) ? parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0 } } else { if (typeof O.ActiveXObject != D) { try { var ad = new ActiveXObject(W); if (ad) { ab = ad.GetVariable("$version"); if (ab) { X = true; ab = ab.split(" ")[1].split(","); ag = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)] } } } catch (Z) { } } } return { w3: aa, pv: ag, wk: af, ie: X, win: ae, mac: ac} } (), k = function () { if (!M.w3) { return } if ((typeof j.readyState != D && j.readyState == "complete") || (typeof j.readyState == D && (j.getElementsByTagName("body")[0] || j.body))) { f() } if (!J) { if (typeof j.addEventListener != D) { j.addEventListener("DOMContentLoaded", f, false) } if (M.ie && M.win) { j.attachEvent(x, function () { if (j.readyState == "complete") { j.detachEvent(x, arguments.callee); f() } }); if (O == top) { (function () { if (J) { return } try { j.documentElement.doScroll("left") } catch (X) { setTimeout(arguments.callee, 0); return } f() })() } } if (M.wk) { (function () { if (J) { return } if (!/loaded|complete/.test(j.readyState)) { setTimeout(arguments.callee, 0); return } f() })() } s(f) } } (); function f() { if (J) { return } try { var Z = j.getElementsByTagName("body")[0].appendChild(C("span")); Z.parentNode.removeChild(Z) } catch (aa) { return } J = true; var X = U.length; for (var Y = 0; Y < X; Y++) { U[Y]() } } function K(X) { if (J) { X() } else { U[U.length] = X } } function s(Y) { if (typeof O.addEventListener != D) { O.addEventListener("load", Y, false) } else { if (typeof j.addEventListener != D) { j.addEventListener("load", Y, false) } else { if (typeof O.attachEvent != D) { i(O, "onload", Y) } else { if (typeof O.onload == "function") { var X = O.onload; O.onload = function () { X(); Y() } } else { O.onload = Y } } } } } function h() { if (T) { V() } else { H() } } function V() { var X = j.getElementsByTagName("body")[0]; var aa = C(r); aa.setAttribute("type", q); var Z = X.appendChild(aa); if (Z) { var Y = 0; (function () { if (typeof Z.GetVariable != D) { var ab = Z.GetVariable("$version"); if (ab) { ab = ab.split(" ")[1].split(","); M.pv = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)] } } else { if (Y < 10) { Y++; setTimeout(arguments.callee, 10); return } } X.removeChild(aa); Z = null; H() })() } else { H() } } function H() { var ag = o.length; if (ag > 0) { for (var af = 0; af < ag; af++) { var Y = o[af].id; var ab = o[af].callbackFn; var aa = { success: false, id: Y }; if (M.pv[0] > 0) { var ae = c(Y); if (ae) { if (F(o[af].swfVersion) && !(M.wk && M.wk < 312)) { w(Y, true); if (ab) { aa.success = true; aa.ref = z(Y); ab(aa) } } else { if (o[af].expressInstall && A()) { var ai = {}; ai.data = o[af].expressInstall; ai.width = ae.getAttribute("width") || "0"; ai.height = ae.getAttribute("height") || "0"; if (ae.getAttribute("class")) { ai.styleclass = ae.getAttribute("class") } if (ae.getAttribute("align")) { ai.align = ae.getAttribute("align") } var ah = {}; var X = ae.getElementsByTagName("param"); var ac = X.length; for (var ad = 0; ad < ac; ad++) { if (X[ad].getAttribute("name").toLowerCase() != "movie") { ah[X[ad].getAttribute("name")] = X[ad].getAttribute("value") } } P(ai, ah, Y, ab) } else { p(ae); if (ab) { ab(aa) } } } } } else { w(Y, true); if (ab) { var Z = z(Y); if (Z && typeof Z.SetVariable != D) { aa.success = true; aa.ref = Z } ab(aa) } } } } } function z(aa) { var X = null; var Y = c(aa); if (Y && Y.nodeName == "OBJECT") { if (typeof Y.SetVariable != D) { X = Y } else { var Z = Y.getElementsByTagName(r)[0]; if (Z) { X = Z } } } return X } function A() { return !a && F("6.0.65") && (M.win || M.mac) && !(M.wk && M.wk < 312) } function P(aa, ab, X, Z) { a = true; E = Z || null; B = { success: false, id: X }; var ae = c(X); if (ae) { if (ae.nodeName == "OBJECT") { l = g(ae); Q = null } else { l = ae; Q = X } aa.id = R; if (typeof aa.width == D || (!/%$/.test(aa.width) && parseInt(aa.width, 10) < 310)) { aa.width = "310" } if (typeof aa.height == D || (!/%$/.test(aa.height) && parseInt(aa.height, 10) < 137)) { aa.height = "137" } j.title = j.title.slice(0, 47) + " - Flash Player Installation"; var ad = M.ie && M.win ? "ActiveX" : "PlugIn", ac = "MMredirectURL=" + O.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + ad + "&MMdoctitle=" + j.title; if (typeof ab.flashvars != D) { ab.flashvars += "&" + ac } else { ab.flashvars = ac } if (M.ie && M.win && ae.readyState != 4) { var Y = C("div"); X += "SWFObjectNew"; Y.setAttribute("id", X); ae.parentNode.insertBefore(Y, ae); ae.style.display = "none"; (function () { if (ae.readyState == 4) { ae.parentNode.removeChild(ae) } else { setTimeout(arguments.callee, 10) } })() } u(aa, ab, X) } } function p(Y) { if (M.ie && M.win && Y.readyState != 4) { var X = C("div"); Y.parentNode.insertBefore(X, Y); X.parentNode.replaceChild(g(Y), X); Y.style.display = "none"; (function () { if (Y.readyState == 4) { Y.parentNode.removeChild(Y) } else { setTimeout(arguments.callee, 10) } })() } else { Y.parentNode.replaceChild(g(Y), Y) } } function g(ab) { var aa = C("div"); if (M.win && M.ie) { aa.innerHTML = ab.innerHTML } else { var Y = ab.getElementsByTagName(r)[0]; if (Y) { var ad = Y.childNodes; if (ad) { var X = ad.length; for (var Z = 0; Z < X; Z++) { if (!(ad[Z].nodeType == 1 && ad[Z].nodeName == "PARAM") && !(ad[Z].nodeType == 8)) { aa.appendChild(ad[Z].cloneNode(true)) } } } } } return aa } function u(ai, ag, Y) { var X, aa = c(Y); if (M.wk && M.wk < 312) { return X } if (aa) { if (typeof ai.id == D) { ai.id = Y } if (M.ie && M.win) { var ah = ""; for (var ae in ai) { if (ai[ae] != Object.prototype[ae]) { if (ae.toLowerCase() == "data") { ag.movie = ai[ae] } else { if (ae.toLowerCase() == "styleclass") { ah += ' class="' + ai[ae] + '"' } else { if (ae.toLowerCase() != "classid") { ah += " " + ae + '="' + ai[ae] + '"' } } } } } var af = ""; for (var ad in ag) { if (ag[ad] != Object.prototype[ad]) { af += '<param name="' + ad + '" value="' + ag[ad] + '" />' } } aa.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ah + ">" + af + "</object>"; N[N.length] = ai.id; X = c(ai.id) } else { var Z = C(r); Z.setAttribute("type", q); for (var ac in ai) { if (ai[ac] != Object.prototype[ac]) { if (ac.toLowerCase() == "styleclass") { Z.setAttribute("class", ai[ac]) } else { if (ac.toLowerCase() != "classid") { Z.setAttribute(ac, ai[ac]) } } } } for (var ab in ag) { if (ag[ab] != Object.prototype[ab] && ab.toLowerCase() != "movie") { e(Z, ab, ag[ab]) } } aa.parentNode.replaceChild(Z, aa); X = Z } } return X } function e(Z, X, Y) { var aa = C("param"); aa.setAttribute("name", X); aa.setAttribute("value", Y); Z.appendChild(aa) } function y(Y) { var X = c(Y); if (X && X.nodeName == "OBJECT") { if (M.ie && M.win) { X.style.display = "none"; (function () { if (X.readyState == 4) { b(Y) } else { setTimeout(arguments.callee, 10) } })() } else { X.parentNode.removeChild(X) } } } function b(Z) { var Y = c(Z); if (Y) { for (var X in Y) { if (typeof Y[X] == "function") { Y[X] = null } } Y.parentNode.removeChild(Y) } } function c(Z) { var X = null; try { X = j.getElementById(Z) } catch (Y) { } return X } function C(X) { return j.createElement(X) } function i(Z, X, Y) { Z.attachEvent(X, Y); I[I.length] = [Z, X, Y] } function F(Z) { var Y = M.pv, X = Z.split("."); X[0] = parseInt(X[0], 10); X[1] = parseInt(X[1], 10) || 0; X[2] = parseInt(X[2], 10) || 0; return (Y[0] > X[0] || (Y[0] == X[0] && Y[1] > X[1]) || (Y[0] == X[0] && Y[1] == X[1] && Y[2] >= X[2])) ? true : false } function v(ac, Y, ad, ab) { if (M.ie && M.mac) { return } var aa = j.getElementsByTagName("head")[0]; if (!aa) { return } var X = (ad && typeof ad == "string") ? ad : "screen"; if (ab) { n = null; G = null } if (!n || G != X) { var Z = C("style"); Z.setAttribute("type", "text/css"); Z.setAttribute("media", X); n = aa.appendChild(Z); if (M.ie && M.win && typeof j.styleSheets != D && j.styleSheets.length > 0) { n = j.styleSheets[j.styleSheets.length - 1] } G = X } if (M.ie && M.win) { if (n && typeof n.addRule == r) { n.addRule(ac, Y) } } else { if (n && typeof j.createTextNode != D) { n.appendChild(j.createTextNode(ac + " {" + Y + "}")) } } } function w(Z, X) { if (!m) { return } var Y = X ? "visible" : "hidden"; if (J && c(Z)) { c(Z).style.visibility = Y } else { v("#" + Z, "visibility:" + Y) } } function L(Y) { var Z = /[\\\"<>\.;]/; var X = Z.exec(Y) != null; return X && typeof encodeURIComponent != D ? encodeURIComponent(Y) : Y } var d = function () { if (M.ie && M.win) { window.attachEvent("onunload", function () { var ac = I.length; for (var ab = 0; ab < ac; ab++) { I[ab][0].detachEvent(I[ab][1], I[ab][2]) } var Z = N.length; for (var aa = 0; aa < Z; aa++) { y(N[aa]) } for (var Y in M) { M[Y] = null } M = null; for (var X in swfobject) { swfobject[X] = null } swfobject = null }) } } (); return { registerObject: function (ab, X, aa, Z) { if (M.w3 && ab && X) { var Y = {}; Y.id = ab; Y.swfVersion = X; Y.expressInstall = aa; Y.callbackFn = Z; o[o.length] = Y; w(ab, false) } else { if (Z) { Z({ success: false, id: ab }) } } }, getObjectById: function (X) { if (M.w3) { return z(X) } }, embedSWF: function (ab, ah, ae, ag, Y, aa, Z, ad, af, ac) { var X = { success: false, id: ah }; if (M.w3 && !(M.wk && M.wk < 312) && ab && ah && ae && ag && Y) { w(ah, false); K(function () { ae += ""; ag += ""; var aj = {}; if (af && typeof af === r) { for (var al in af) { aj[al] = af[al] } } aj.data = ab; aj.width = ae; aj.height = ag; var am = {}; if (ad && typeof ad === r) { for (var ak in ad) { am[ak] = ad[ak] } } if (Z && typeof Z === r) { for (var ai in Z) { if (typeof am.flashvars != D) { am.flashvars += "&" + ai + "=" + Z[ai] } else { am.flashvars = ai + "=" + Z[ai] } } } if (F(Y)) { var an = u(aj, am, ah); if (aj.id == ah) { w(ah, true) } X.success = true; X.ref = an } else { if (aa && A()) { aj.data = aa; P(aj, am, ah, ac); return } else { w(ah, true) } } if (ac) { ac(X) } }) } else { if (ac) { ac(X) } } }, switchOffAutoHideShow: function () { m = false }, ua: M, getFlashPlayerVersion: function () { return { major: M.pv[0], minor: M.pv[1], release: M.pv[2]} }, hasFlashPlayerVersion: F, createSWF: function (Z, Y, X) { if (M.w3) { return u(Z, Y, X) } else { return undefined } }, showExpressInstall: function (Z, aa, X, Y) { if (M.w3 && A()) { P(Z, aa, X, Y) } }, removeSWF: function (X) { if (M.w3) { y(X) } }, createCSS: function (aa, Z, Y, X) { if (M.w3) { v(aa, Z, Y, X) } }, addDomLoadEvent: K, addLoadEvent: s, getQueryParamValue: function (aa) { var Z = j.location.search || j.location.hash; if (Z) { if (/\?/.test(Z)) { Z = Z.split("?")[1] } if (aa == null) { return L(Z) } var Y = Z.split("&"); for (var X = 0; X < Y.length; X++) { if (Y[X].substring(0, Y[X].indexOf("=")) == aa) { return L(Y[X].substring((Y[X].indexOf("=") + 1))) } } } return "" }, expressInstallCallback: function () { if (a) { var X = c(R); if (X && l) { X.parentNode.replaceChild(l, X); if (Q) { w(Q, true); if (M.ie && M.win) { l.style.display = "block" } } if (E) { E(B) } } a = false } } } } ();
;;;var MinWidth = 880;
var MinHeight = 240;
var ExpandWidth = 900;
var ExpandHeight = 490;

function ResizeFlashDiv(Expand) {
    if (Expand == "true") {
        $("#flashcontent, .calculatorWebpart, .productCalculatorWebpart").css('width', MinWidth).css('height', ExpandHeight);
	} else {
        $("#flashcontent, .calculatorWebpart, .productCalculatorWebpart").css('width', MinWidth).css('height', MinHeight);
    }    
}
function ResizeFlashDiv2(NewSize) {
    $("#flashcontent, .calculatorWebpart, .productCalculatorWebpart").css('width', MinWidth).css('height', parseInt(NewSize) + 20);
}

function EmbedFlashCalculator(SWFfile, embedDiv, Parameters, wrapContainer) {
	
	var flashvars = {};
	var params = {};
	var attributes = {};
	
	if (Parameters !== undefined) {
		flashvars = Parameters;
	}
	params.wmode = "transparent";
	params.allowscriptaccess = "always";
	params.allowfullscreen = true;
	
	flashvars.MinWidth = MinWidth;
	flashvars.MinHeight = MinHeight;
	flashvars.ExpandWidth = ExpandWidth;
	flashvars.ExpandHeight = ExpandHeight;
	params.bgcolor = "#FFFFFF";
	attributes.id = embedDiv;
	
	swfobject.embedSWF(SWFfile, embedDiv, "100%", "100%", "9.0.0", false, flashvars, params, attributes);
	//if (navigator.appVersion.indexOf("Mac") != -1) swfmacmousewheel.registerObject(attributes.id);
	
    try {
	    setTimeout(function () {
		
		        if ($(wrapContainer).html().toLowerCase().indexOf("<object") == -1) {
		            $(wrapContainer).replaceWith("<div class=\"" + wrapContainer + "\"><a href=\"http://get.adobe.com/flashplayer/\" target=\"_blank\"><img src=\"/templates/fjordkraft/styles/images/fk/ProductSelectorNoFlash.jpg\" alt=\"\"/></a></div>");
			    }
	    }
	    , 1000);
    } catch (err) {
    }
}

;;;(function($) {
    $.fn.tipsy = function(options) {

        options = $.extend({}, $.fn.tipsy.defaults, options);
        
        return this.each(function() {
            
            var opts = $.fn.tipsy.elementOptions(this, options);
            
            $(this).hover(function() {

                $.data(this, 'cancel.tipsy', true);

                var tip = $.data(this, 'active.tipsy');
                if (!tip) {
                    tip = $('<div class="tipsy"><div class="tipsy-inner"/></div>');
                    tip.css({position: 'absolute', zIndex: 100000});
                    $.data(this, 'active.tipsy', tip);
                }

                if ($(this).attr('title') || typeof($(this).attr('original-title')) != 'string') {
                    $(this).attr('original-title', $(this).attr('title') || '').removeAttr('title');
                }

                var title;
                if (typeof opts.title == 'string') {
                    title = $(this).attr(opts.title == 'title' ? 'original-title' : opts.title);
                } else if (typeof opts.title == 'function') {
                    title = opts.title.call(this);
                }

                tip.find('.tipsy-inner')[opts.html ? 'html' : 'text'](title || opts.fallback);

                var pos = $.extend({}, $(this).offset(), {width: this.offsetWidth, height: this.offsetHeight});
                tip.get(0).className = 'tipsy'; // reset classname in case of dynamic gravity
                tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body);
                var actualWidth = tip[0].offsetWidth, actualHeight = tip[0].offsetHeight;
                var gravity = (typeof opts.gravity == 'function') ? opts.gravity.call(this) : opts.gravity;

                switch (gravity.charAt(0)) {
                    case 'n':
                        tip.css({top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-north');
                        break;
                    case 's':
                        tip.css({top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-south');
                        break;
                    case 'e':
                        tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}).addClass('tipsy-east');
                        break;
                    case 'w':
                        tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}).addClass('tipsy-west');
                        break;
                }

                if (opts.fade) {
                    tip.css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: 0.8});
                } else {
                    tip.css({visibility: 'visible'});
                }

            }, function() {
                $.data(this, 'cancel.tipsy', false);
                var self = this;
                setTimeout(function() {
                    if ($.data(this, 'cancel.tipsy')) return;
                    var tip = $.data(self, 'active.tipsy');
                    if (opts.fade) {
                        tip.stop().fadeOut(function() { $(this).remove(); });
                    } else {
                        tip.remove();
                    }
                }, 100);

            });
            
        });
        
    };
    
    // Overwrite this method to provide options on a per-element basis.
    // For example, you could store the gravity in a 'tipsy-gravity' attribute:
    // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
    // (remember - do not modify 'options' in place!)
    $.fn.tipsy.elementOptions = function(ele, options) {
        return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
    };
    
    $.fn.tipsy.defaults = {
        fade: false,
        fallback: '',
        gravity: 'n',
        html: false,
        title: 'title'
    };
    
    $.fn.tipsy.autoNS = function() {
        return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
    };
    
    $.fn.tipsy.autoWE = function() {
        return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
    };
    
})(jQuery);

;;;///////// TEST SETTLEMENT/////////



///////// RADIO BUTTONS SLIDER COMPANY/////////

$(".Radios-Step2-Company li .ConsumptionTypes a").live('click', function () {
    $(".Radios-Step2-Company li .ConsumptionTypes a").removeClass('selected');
    //$(this).siblings().removeClass('selected');
    $(this).addClass('selected');

    return false;
});
$(".Radios-Step2-Company li .UsageTypes a").live('click', function () {
    $(".Radios-Step2-Company li .UsageTypes a").removeClass('selected');
    //$(this).siblings().removeClass('selected');
    $(this).addClass('selected');

    return false;
});

///////// RADIO BUTTONS SLIDER PRIVAT///////
$(".Radios-Step2 li a").live('click', function () {
    $(".Radios-Step2 li a").removeClass('selected');
    //$(this).siblings().removeClass('selected');
    $(this).addClass('selected');

    return false;
});


$(".Radios-Step3 li a").live('click', function () {
    $(".Radios-Step3 li a").removeClass('selected');
    //$(this).siblings().removeClass('selected');
    $(this).addClass('selected');

    return false;
});


$(document).ready(function () {
    try {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(RebindTestSettlement);
    } catch (err) {
        //alert(err);
    }

    SetupTestSettlement();
});

function RebindTestSettlement() {
    SetupTestSettlement();
    SetupSliderUsage();
    SetupSliderCorporateUsage();
}

function SetupTestSettlement(){
    // Zipcode - Place box Replace default text and style.
    if($(".inputWidth01").val() == 'Postnummer'){
        $(".inputWidth01").addClass("txtdefault");
        $(".txtPostalAddress").addClass("txtdefault");
    }

    $(".inputWidth01").keypress(function () {
          if ($(this).val() == 'Postnummer') {
            $(this).val('');
            $(".inputWidth01").removeClass("txtdefault");
            $(".txtPostalAddress").val("");
            $(".txtPostalAddress").removeClass("txtdefault");
        }
    });

    $("#interval1").click(function () {
        $("input[name*=hdnBillingInterval]").attr("value", "1");
        calculateMonthlyConsumption();
    });
    $("#interval2").click(function () {
        $("input[name*=hdnBillingInterval]").attr("value", "2");
        calculateMonthlyConsumption();
    });
    $("#interval3").click(function () {
        $("input[name*=hdnBillingInterval]").attr("value", "3");
        calculateMonthlyConsumption();
    });

    //Privat
    $(".CompPanelContainer .sliderUsage .IconsWrapper").bind(
        'click',
        function () {
            setTimeout(
                function () {
                    calculateMonthlyConsumption();
                }
                ,
                0
            );
        }
    );
    $(".CompPanelContainer .sliderUsage .slider-range-min").bind(
        'slide',
        function () {
            setTimeout(
                function () {
                    calculateMonthlyConsumption();
                }
                ,
                0
            );
        }
    );
    //Bedrift
    $(".CompPanelContainer .sliderCorporateUsage .IconsWrapper").bind(
        'click',
        function () {
            setTimeout(
                function () {
                    calculateConsumption();
                },
                0
            );
        }
    );
    $(".CompPanelContainer .sliderCorporateUsage .slider-range-min").bind(
        'slide',
        function () {
            setTimeout(
                function () {
                    calculateConsumption();
                }
                ,
                0
            );
        }
    );

            setTimeout(
                function () {
                    $(".isValidPostNo").focus();
                }
                ,
                10
            );

}
function calculateConsumption() {
    var yearlyUsage = parseInt($(".txtSliderUsageValue").val());
    if (yearlyUsage >= 1000000) {
        yearlyUsage = yearlyUsage / 1000000;
        $('.ConsumptionType1Infotext').text('GWh');
        $('.ConsumptionType2Infotext').text('mill.kr');
    }else {
        $('.ConsumptionType1Infotext').text('kWh');
        $('.ConsumptionType2Infotext').text('kr');
    }
    $('.SliderValue').val(yearlyUsage.toString().replace('.',',').replace('+', '').replace('-', ''));
}

function calculateMonthlyConsumption() {
    var yearlyUsage = $(".txtSliderUsageValue").val();
    var lastMonth = yearlyUsage * consumptionFactorList[0];
    var last2Month = yearlyUsage * consumptionFactorList[1];
    var last3Month = yearlyUsage * consumptionFactorList[2];

    if ($("input[name*=hdnBillingInterval]").val() == "1") {
        $(".SliderValue").val(lastMonth);
    }
    else if ($("input[name*=hdnBillingInterval]").val() == "2") {
        $(".SliderValue").val(lastMonth + last2Month);
    }
    else if ($("input[name*=hdnBillingInterval]").val() == "3") {
        $(".SliderValue").val(lastMonth + last2Month + last3Month);
    }
}

$(".usageTypes li.usageConsumptionType2 a").live('click', function () {
    $(".ConsumptionType1Infotext").hide("fast");
    $(".ConsumptionType2Infotext").show("fast");
   return false;
});
$(".usageTypes li.usageConsumptionType1 a").live('click', function () {
    $(".ConsumptionType2Infotext").hide("fast");
    $(".ConsumptionType1Infotext").show("fast");
   return false;
});

$(".Radios-Step2-Company li.ConsuptionType1 a").live('click', function () {
    $("#ConsumptionInput").slideDown("fast");
    //$(".ConsumptionType1Infotext").slideDown("fast");
    $(".ConsumptionInputSlider").hide("fast");
    $(".ConsumptionSlider").hide("fast");
    $("#CompPanel2").attr("style", "height:280px;");
    $(".SliderValue").val("");
    $(".txtConsumptionInput").addClass("required");
    return false;
});
$(".Radios-Step2-Company li.ConsuptionType2 a").live('click', function () {
    $(".ConsumptionInputSlider").slideDown("fast");
    $(".ConsumptionInput").hide("fast");
    //$(".ConsumptionType1Infotext").hide("fast");
    $("#CompPanel2").attr("style", "height:352px;");
    $(".ConsumptionSlider").slideDown("fast");
    $(".txtConsumptionInput").val("");
    $(".txtConsumptionInput").removeClass("required");
    calculateMonthlyConsumption();
    return false;
});



$(".Radios-Step2 li.ConsuptionType1 a").live('click', function () {
    $("#ConsumptionInput").slideDown("fast");
    $(".ConsumptionType1Infotext").slideDown("fast");
    $(".ConsumptionInputSlider").hide("fast");
    $(".ConsumptionSlider").hide("fast");
    $("#CompPanel2").attr("style", "height:156px;");
    $(".SliderValue").val("");
    $(".txtConsumptionInput").addClass("required");
    return false;
});
$(".Radios-Step2 li.ConsuptionType2 a").live('click', function () {
    $(".ConsumptionInputSlider").slideDown("fast");
    $(".ConsumptionInput").hide("fast");
    $(".ConsumptionType1Infotext").hide("fast");
    $("#CompPanel2").attr("style", "height:352px;");
    $(".ConsumptionSlider").slideDown("fast");
    $(".txtConsumptionInput").val("");
    $(".txtConsumptionInput").removeClass("required");
    calculateMonthlyConsumption();
    return false;
});

;;;var ShowArea;
var list = null;

$(document).ready(function () {
    SetupSliderUsage();
});

function SetupSliderUsage() {

    if (list == null) return;
  try {
        // FIX TO GET SLIDER WORKING ON MOBILE TOUCH DEVICES
        function touchHandler(event) {
            var touches = event.changedTouches,
			first = touches[0],
			type = "";
            switch (event.type) {
                case "touchstart": type = "mousedown"; break;
                case "touchmove": type = "mousemove"; break;
                case "touchend": type = "mouseup"; break;
                default: return;
            }

            //initMouseEvent(type, canBubble, cancelable, view, clickCount, 
            // screenX, screenY, clientX, clientY, ctrlKey, 
            //altKey, shiftKey, metaKey, button, relatedTarget);

            var simulatedEvent = document.createEvent("MouseEvent");
            simulatedEvent.initMouseEvent(type, true, true, window, 1,
									first.screenX, first.screenY,
									first.clientX, first.clientY, false,
									false, false, false, 0/*left*/, null);

            first.target.dispatchEvent(simulatedEvent);
            //event.preventDefault();
        }

        function init() {
            document.addEventListener("touchstart", touchHandler, true);
            document.addEventListener("touchmove", touchHandler, true);
            document.addEventListener("touchend", touchHandler, true);
            document.addEventListener("touchcancel", touchHandler, true);
        }

        init();

    } catch (err) {
        //alert(err);
    }


    ///////// SLIDER /////////

    Intervals = list;
    var IconIdsArr = [];
    var MaxValue = Intervals.length == 0 ? 0 : Intervals.length - 1;
    var DefaultIndexValue = GetDefaultValue(Intervals);
    $('.sliderUsage .IconsWrapper').append(GetIcons(Intervals, IconIdsArr));
    SetupIconToolTips(IconIdsArr);


    $(".sliderUsage .slider-range-min").slider({
        range: "min",
        value: DefaultIndexValue,
        min: 0,
        max: MaxValue,
        animate: true,
        slide: function (event, ui) {
            $(".txtSliderUsageValue").val(Intervals[ui.value].Label);
            $(".sliderUsage .area").text(Intervals[ui.value].Desc);
        }
    });

    ////// Setup  /////
    if (ShowArea) {
        $('.sliderUsage .ui-slider-handle').addClass('area');
    }
    $(".txtSliderUsageValue").val(Intervals[DefaultIndexValue].Label);
    $(".sliderUsage .area").text(Intervals[DefaultIndexValue].Desc);

    $(".sliderUsage img").click(function () {
        $('.sliderUsage .slider-range-min').slider('option', 'value', this.id);
        $(".txtSliderUsageValue").val(Intervals[this.id].Label);
        $(".sliderUsage .area").text(Intervals[this.id].Desc);
    });

    // UTILITIES
    function GetDefaultValue(array) {
        var defaultIndex = 0;
        $.each(array, function (index, value) {
            if (Intervals[index].Default == "true") {
                defaultIndex = index;
            }
        });
        return defaultIndex;
    }
    function GetIcons(array, IconIds) {
        var imagesStr = "";
        $.each(array, function (index, value) {
            if (Intervals[index].IconID !== "") {
                imagesStr += "<img id='" + index + "' title='" + Intervals[index].ToolTip + "' src='" + Intervals[index].IconID + "'/>";
                IconIds.push(index);
            }
        });
        return imagesStr;
    }

    // Add tooltip functions
    function SetupIconToolTips(array) {
        $.each(array, function (index, value) {
            $("#" + value + "").tipsy({ gravity: 's', fade: true });
        });
    }
}

;;;var ShowArea;
var corporatelist = null;

$(document).ready(function () {
    SetupSliderCorporateUsage();
});

function SetupSliderCorporateUsage() {

    if (corporatelist == null) return;
    try {
        // FIX TO GET SLIDER WORKING ON MOBILE TOUCH DEVICES
        function touchHandler(event) {
            var touches = event.changedTouches,
			first = touches[0],
			type = "";
            switch (event.type) {
                case "touchstart": type = "mousedown"; break;
                case "touchmove": type = "mousemove"; break;
                case "touchend": type = "mouseup"; break;
                default: return;
            }

            //initMouseEvent(type, canBubble, cancelable, view, clickCount, 
            // screenX, screenY, clientX, clientY, ctrlKey, 
            //altKey, shiftKey, metaKey, button, relatedTarget);

            var simulatedEvent = document.createEvent("MouseEvent");
            simulatedEvent.initMouseEvent(type, true, true, window, 1,
									first.screenX, first.screenY,
									first.clientX, first.clientY, false,
									false, false, false, 0/*left*/, null);

            first.target.dispatchEvent(simulatedEvent);
            //event.preventDefault();
        }

        function init() {
            document.addEventListener("touchstart", touchHandler, true);
            document.addEventListener("touchmove", touchHandler, true);
            document.addEventListener("touchend", touchHandler, true);
            document.addEventListener("touchcancel", touchHandler, true);
        }

        init();

    } catch (err) {
        //alert(err);
    }


    ///////// SLIDER /////////

    var cIntervals = corporatelist;
    var IconIdsArr = [];
    var MaxValue = cIntervals.length == 0 ? 0 : cIntervals.length - 1;
    var DefaultIndexValue = GetDefaultValue(cIntervals);
    $('.sliderCorporateUsage .IconsWrapper').append(GetIcons(cIntervals, IconIdsArr));
    SetupIconToolTips(IconIdsArr);


    $(".sliderCorporateUsage .slider-range-min").slider({
        range: "min",
        value: DefaultIndexValue,
        min: 0,
        max: MaxValue,
        animate: true,
        slide: function (event, ui) {
            $(".txtSliderUsageValue").val(cIntervals[ui.value].Label);
        }
    });

    ////// Setup  /////
    $(".txtSliderUsageValue").val(cIntervals[DefaultIndexValue].Label);
    //alert(cIntervals[0].Label);
    $(".sliderCorporateUsage img").click(function () {
        $('.sliderCorporateUsage .slider-range-min').slider('option', 'value', this.id);
        $(".txtSliderUsageValue").val(cIntervals[this.id].Label);
    });

    // UTILITIES
    function GetDefaultValue(array) {
        var DefaultIndex = 0;
        $.each(array, function (index, value) {
            if (cIntervals[index].Default == "true") {
                DefaultIndex = index;
            }
        });
        return DefaultIndex;
    }
    function GetIcons(array, IconIds) {
        var ImagesStr = "";
        $.each(array, function (index, value) {
            if (cIntervals[index].IconID !== "") {
                ImagesStr += "<img id='" + index + "' title='" + cIntervals[index].ToolTip + "' src='" + cIntervals[index].IconID + "'/>";
                IconIds.push(index);
            }
        });
        return ImagesStr;
    }

    // Add tooltip functions
    function SetupIconToolTips(array) {
        $.each(array, function (index, value) {
            $("#" + value + "").tipsy({ gravity: 's', fade: true });
        });
    }
}

;;;/* javascript:alert(ProductSelector.Debug=true); */
$(document).ready(function () {
    CustomerServiceContact.Setup();
});
var CustomerServiceContact = {
    Setup: function () {
        CustomerServiceContact.CallMe.Setup();
        CustomerServiceContact.Email.Setup();
        CustomerServiceContact.Chat.Setup();
    },
    Chat: {
        Setup: function () {
            if ($.browser.msie && $.browser.version == '9.0') return;
            CustomerServiceContact.Chat.ActivateChatCallMeButtons();
            $(CustomerServiceContact.Chat.Selectors.Button).watch(
                'src',
                function () {
                    $(this).unbind("propertychange"); //unbind event to prevent loop
                    $(this).unbind("DOMAttrModified"); //unbind event to prevent loop
                    CustomerServiceContact.Chat.ActivateChatCallMeButtons();
                },
                1000
            );
        },
        ActivateChatCallMeButtons: function () {
            
            try
            {
                var src = $(CustomerServiceContact.Chat.Selectors.Button).attr('src');
                $(CustomerServiceContact.Chat.Selectors.Button).each(function() {
                    if (CustomerServiceContact.Chat.IsActivated(src)) {
                        //$(this).attr('onclick', $(this).attr('onclick') + " _gaq.push(['_trackEvent', 'Kundeserviceboks', 'Start chat']);");
                        $(this).hover(
                            function() {
                                $(this).attr('src', CustomerServiceContact.Chat.Images.Hover);
                            },
                            function() {
                                $(this).attr('src', CustomerServiceContact.Chat.Images.Active);
                            }
                    );
                        var edialogClickFunction = $(this).attr('onclick');
                        var fkTracking = "CustomerServiceContact.Chat.TrackClick();";
                        if (edialogClickFunction.indexOf(fkTracking) == -1) {
                            edialogClickFunction = edialogClickFunction + fkTracking;
                        }

                        $(this).attr('onclick', edialogClickFunction);
                    } else {
                        CustomerServiceContact.CallMe.Deactivate();
                    }
                });
            }
            catch (err) {
                //alert(err);
            }
            
        },
        TrackClick: function () {
//            try {
//                _gaq.push(['_trackEvent', 'Kundeserviceboks', 'Start chat']);
//            } catch (e) {
//            }
        },
        IsActivated: function (value) {
            return value.indexOf(CustomerServiceContact.Chat.Images.Active) != -1 ||
                   value.indexOf(CustomerServiceContact.Chat.Images.Hover) != -1;
        },
        Images: {
            Active: '',
            Hover: '',
            Deactivated: ''
        },
        Selectors: {
            Button: '.CustomerServiceContact img[name*="e24contact"]'
        }
    },
    Email: {
        Setup: function () {
            CustomerServiceContact.Email.ActivateEmailButton();
            CustomerServiceContact.Email.SetFormVisibility();
            CustomerServiceContact.Email.SetupXformButton();
        },
        SetFormVisibility: function () {
            if ($(CustomerServiceContact.Email.Selectors.ThankYouMessage).length > 0) {
                CustomerServiceContact.Email.ShowForm();
            }
        },
        ActivateEmailButton: function () {
            $(CustomerServiceContact.Email.Selectors.Button).unbind('hover');
            if ($(CustomerServiceContact.Email.Selectors.Form).is(":visible")) {
                CustomerServiceContact.Email.SetActiveButton();
            } else {
                //form is not visible
                CustomerServiceContact.Email.SetNotActiveButton();
            }
            $(CustomerServiceContact.Email.Selectors.Button).click(function () {
                if ($(CustomerServiceContact.Email.Selectors.Form).is(":visible")) {
                    CustomerServiceContact.Email.HideForm();
                } else {
                    CustomerServiceContact.Email.ShowForm();
                    CustomerServiceContact.Email.TrackClick();
                }
            });
        },
        TrackClick: function () {
//            try {
//                _gaq.push(['_trackEvent', 'Kundeserviceboks', 'Send e-post']);
//            } catch (e) {
//                //ignore...
//            }
        },
        SetupXformButton: function () {
            try {

                $(CustomerServiceContact.Email.Selectors.XFormButton).hide();
                $(CustomerServiceContact.Email.Selectors.XFormButton).parent().append('<img class="customerServiceXFormSubmit" alt="" />');
                $("img.customerServiceXFormSubmit").click(function () {
                    jQuery(".defaulttext").each(function () {
                        if ($(this).val() == $(this).attr('title')) {
                            $(this).val('');
                        }
                    });
                    $("#aspnetForm").unbind('submit');
                    $(CustomerServiceContact.Email.Selectors.XFormButton).click();
                });

                $("img.customerServiceXFormSubmit").attr('src', CustomerServiceContact.Email.Images.XFormButton).hover(
                    function () {
                        $(this).attr('src', CustomerServiceContact.Email.Images.XFormButtonHover);
                    },
                    function () {
                        $(this).attr('src', CustomerServiceContact.Email.Images.XFormButton);
                    }
                );

            } catch (err) {
                //ignore...
            }
        },
        HideForm: function () {
            $(CustomerServiceContact.Email.Selectors.Form).slideUp();
            CustomerServiceContact.Email.SetNotActiveButton();
        },
        ShowForm: function () {
            CustomerServiceContact.CallMe.HideForm();
            $(CustomerServiceContact.Email.Selectors.Form).slideDown();
            CustomerServiceContact.Email.SetActiveButton();
        },
        SetNotActiveButton: function () {
            $(CustomerServiceContact.Email.Selectors.Button).attr('src', CustomerServiceContact.Email.Images.Image);
            $(CustomerServiceContact.Email.Selectors.Button).hover(
                function () {
                    $(this).attr('src', CustomerServiceContact.Email.Images.ImageHover);
                },
                function () {
                    $(this).attr('src', CustomerServiceContact.Email.Images.Image);
                }
            );
        },
        SetActiveButton: function () {
            $(CustomerServiceContact.Email.Selectors.Button).attr('src', CustomerServiceContact.Email.Images.ImageActive);
            $(CustomerServiceContact.Email.Selectors.Button).hover(
                    function () {
                        $(this).attr('src', CustomerServiceContact.Email.Images.ImageActive);
                    },
                    function () {
                        $(this).attr('src', CustomerServiceContact.Email.Images.ImageActive);
                    }
                );
        },
        Selectors: {
            Form: '.CustomerServiceContact .email .form',
            Button: '.CustomerServiceContact .email .imgEmail',
            ThankYouMessage: '.CustomerServiceContact .email .thankyoumessage',
            XFormButton: '.CustomerServiceContact .email .customerServiceFormButton'
        },
        Images: {
            Image: '',
            ImageHover: '',
            ImageActive: '',
            XFormButton: '',
            XFormButtonHover: ''
        }
    },
    CallMe: {
        Setup: function () {

            CustomerServiceContact.CallMe.ActivateCallMeButton();
            CustomerServiceContact.CallMe.ActivateFormHelpText();
            CustomerServiceContact.CallMe.ActivateActionButton();
            if (CustomerServiceContact.CallMe.Form.ShowFormOnStartup == 'true') {
                CustomerServiceContact.CallMe.ShowForm();
            }
        },
        Deactivate: function () {
            $(CustomerServiceContact.CallMe.Selectors.Button).attr('src', CustomerServiceContact.CallMe.Images.ImageDeactivated);
            $(CustomerServiceContact.CallMe.Selectors.Button).attr('onmouseover', '').attr('onmouseout', '').unbind('hover click');
        },
        ActivateCallMeButton: function () {
            $(CustomerServiceContact.CallMe.Selectors.Button).click(function () {
                //remove mouse over from code
                $(this).attr('onmouseover', '').attr('onmouseout', '');
                //remove hover action
                $(this).unbind('hover');
                if ($(CustomerServiceContact.CallMe.Selectors.Form).is(":visible")) {
                    CustomerServiceContact.CallMe.HideForm();
                } else {
                    CustomerServiceContact.CallMe.ShowForm();
                    CustomerServiceContact.CallMe.TrackClick();
                }
            });

        },
        TrackClick: function () {
//            try {
//                _gaq.push(['_trackEvent', 'Kundeserviceboks', 'Ring meg']);
//            } catch (e) {
//                //ignore..
//            }
        },
        ActivateActionButton: function () {
            $(CustomerServiceContact.CallMe.Selectors.ActionButton).click(function () {
                if (CustomerServiceContact.CallMe.Send()) {
                    $(CustomerServiceContact.CallMe.Selectors.Form + ' .inner').hide();
                    var msg = '<span class="thankyoumessage">' + CustomerServiceContact.CallMe.Form.ThankYouMessage + '</span>';
                    $(CustomerServiceContact.CallMe.Selectors.Form).append(msg);
                }
            });
        },
        Send: function () {
            var stateOk = true;
            $(CustomerServiceContact.CallMe.Selectors.Form + " .validator").remove();
            if ($(CustomerServiceContact.CallMe.Selectors.Name).val() == CustomerServiceContact.CallMe.Form.NameHelpText ||
                $(CustomerServiceContact.CallMe.Selectors.Name).val() == '') {
                $(CustomerServiceContact.CallMe.Selectors.Name).val('');
                $(CustomerServiceContact.CallMe.Selectors.Name).parent().append(CustomerServiceContact.CallMe.ValidatorImage());
                stateOk = false;
            }

            if ($(CustomerServiceContact.CallMe.Selectors.Number).val() == CustomerServiceContact.CallMe.Form.PhoneHelpText ||
                $(CustomerServiceContact.CallMe.Selectors.Number).val() == '') {
                $(CustomerServiceContact.CallMe.Selectors.Number).val('');
                $(CustomerServiceContact.CallMe.Selectors.Number).parent().append(CustomerServiceContact.CallMe.ValidatorImage());
                stateOk = false;
            }
            if (stateOk) {
                document.getElementById('sendKnapp').click();
            }
            return stateOk;
        },
        ValidatorImage: function () {
            return '<img class="validation" src="/templates/fjordkraft/styles/images/fk/warn.png" alt="" />';
        },
        HideForm: function () {
            $(CustomerServiceContact.CallMe.Selectors.Form).slideUp();
            $(CustomerServiceContact.CallMe.Selectors.Button).attr('src', CustomerServiceContact.CallMe.Images.Image);

            $(CustomerServiceContact.CallMe.Selectors.Button).hover(
                function () {
                    $(this).attr('src', CustomerServiceContact.CallMe.Images.ImageHover);
                },
                function () {
                    $(this).attr('src', CustomerServiceContact.CallMe.Images.Image);
                }
            );
        },
        ShowForm: function () {
            CustomerServiceContact.Email.HideForm();
            $(CustomerServiceContact.CallMe.Selectors.Button).attr('src', CustomerServiceContact.CallMe.Images.ImageActive);
            $(CustomerServiceContact.CallMe.Selectors.Form).slideDown();
            $(CustomerServiceContact.CallMe.Selectors.Button).hover(
                function () {
                    $(this).attr('src', CustomerServiceContact.CallMe.Images.ImageActive);
                },
                function () {
                    $(this).attr('src', CustomerServiceContact.CallMe.Images.ImageActive);
                }
            );

        },
        ActivateFormHelpText: function () {
            $(CustomerServiceContact.CallMe.Selectors.Number).focus(function () {
                if ($(this).val() == CustomerServiceContact.CallMe.Form.PhoneHelpText) $(this).val('');
            });
            $(CustomerServiceContact.CallMe.Selectors.Number).blur(function () {
                if ($(this).val() == '') $(this).val(CustomerServiceContact.CallMe.Form.PhoneHelpText);
            });

            $(CustomerServiceContact.CallMe.Selectors.Name).focus(function () {
                if ($(this).val() == CustomerServiceContact.CallMe.Form.NameHelpText) $(this).val('');
            });
            $(CustomerServiceContact.CallMe.Selectors.Name).blur(function () {
                if ($(this).val() == '') $(this).val(CustomerServiceContact.CallMe.Form.NameHelpText);
            });

        },
        Selectors: {
            Button: '.CustomerServiceContact .callMe .imgCallMe',
            ActionButton: '.CustomerServiceContact .callMe .btnAction',
            Form: '.CustomerServiceContact .callMe .form',
            Number: '#nummer',
            Name: '#navn'
        },
        Form: {
            PhoneHelpText: '',
            NameHelpText: '',
            ThankYouMessage: '',
            ShowFormOnStartup: false
        },
        Images: {
            Image: '',
            ImageHover: '',
            ImageActive: '',
            ImageDeactivated: ''
        }
    },
    Debug: false
}
;;;var familylist = null;

$(document).ready(function () {
    SetupSliderFamliy();
    try {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(SetupSliderFamliy);
    } catch (err) {
        //alert(err);
    }
});

function SetupSliderFamliy() {


    if (familylist == null) return;
    ///////// SLIDER /////////
    
    var Intervals = familylist;
    var IconIdsArr = [];
    var MaxValue = Intervals.length == 0 ? 0 : Intervals.length - 1;
    var DefaultIndexValue = GetFamilyDefaultValue(Intervals);

    $('.sliderFamily .IconsWrapper').append(GetFamilyIcons(Intervals, IconIdsArr));
    
    //SetupFamilyIconToolTips(IconIdsArr);


    $(".sliderFamily .slider-range-min").slider({
        range: "min",
        value: DefaultIndexValue,
        min: 0,
        max: MaxValue,
        animate: true,
        slide: function (event, ui) {
            $(".txtSliderFamilyValue").val(Intervals[ui.value].Label);
        }
    });

    ////// Setup  /////
    $(".txtSliderFamilyValue").val(Intervals[DefaultIndexValue].Label);

    $(".sliderFamily img").click(function () {
        $('.sliderFamily .slider-range-min').slider('option', 'value', $(this).index());
        $(".txtSliderFamilyValue").val(Intervals[$(this).index()].Label);

    });

    // UTILITIES
    function GetFamilyDefaultValue(array) {
        var defaultIndex = 0;
        $.each(array, function (index, value) {
            if (Intervals[index].Default == "true") {
                defaultIndex = index;
            }
        });
        return defaultIndex;
    }
    function GetFamilyIcons(array, iconIds) {
        var imagesStr = "";
        $.each(array, function (index, value) {
            if (Intervals[index].IconID !== "") {
                imagesStr += "<img id='family"+index+"' title='" + Intervals[index].ToolTip + "' src='" + Intervals[index].IconID + "'/>";
                iconIds.push(index);
            }
        });
        return imagesStr;
    }
    
}

;;;var risklist = null;

$(document).ready(function () {
    SetupSliderRisk();
    try {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(SetupSliderRisk);
    } catch (err) {
        //alert(err);
    }
});

function SetupSliderRisk() {


    if (risklist == null) return;

    ///////// SLIDER /////////
    
    var Intervals = risklist;
    var IconIdsArr = [];
    var MaxValue = Intervals.length == 0 ? 0 : Intervals.length - 1;
    var DefaultIndexValue = GetRiskDefaultValue(Intervals);

    $('.sliderRisk .IconsWrapper').append(GetRiskIcons(Intervals, IconIdsArr));
    
    //SetupRiskIconToolTips(IconIdsArr);


    $(".sliderRisk .slider-range-min").slider({
        range: "min",
        value: DefaultIndexValue,
        min: 0,
        max: MaxValue,
        animate: true,
        slide: function (event, ui) {
            $(".txtSliderRiskValue").val(Intervals[ui.value].Value);
        }
    });

    ////// Setup  /////
    $(".txtSliderRiskValue").val(Intervals[DefaultIndexValue].Value);

    $(".sliderRisk img").click(function () {
        $('.sliderRisk .slider-range-min').slider('option', 'value', $(this).attr("rel"));
        $(".txtSliderRiskValue").val(Intervals[$(this).attr("rel")].Value);

    });

    // UTILITIES
    function GetRiskDefaultValue(array) {
        var defaultIndex = 0;
        $.each(array, function (index, value) {
            if (Intervals[index].Default == "true") {
                defaultIndex = index;
            }
        });
        return defaultIndex;
    }
    function GetRiskIcons(array, IconIds) {
        var imagesStr = "";
        $.each(array, function (index, value) {
            if (Intervals[index].IconID !== "" && Intervals[index].Enabled !== "false" && Intervals[index].Visible=="true") {
                imagesStr += "<img id='risk" + index + "' rel='" + index + "' title='" + Intervals[index].ToolTip + "' src='" + Intervals[index].IconID + "'/>";
                IconIds.push(index);
            }
        });
        return imagesStr;
    }
   
}

;;;/* javascript:alert(ProductSelector.Debug=true); */
$(document).ready(function () {
    if ($('.productSelectorJQWebpart').length == 0) return;

    ProductSelector.Setup();
    try {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(ProductSelector.Setup);
    } catch (err) {
        //ignore
    }
});

var ProductSelector = {
    Images: {
        Calculate: '',
        CalculateHover: '',
        ReCalculate: '',
        ReCalculateHover: '',
        Order: '',
        OrderHover: ''
    },
    CustomerType: {
        Private: true
    },
    Error: {
        NoProducts: ''
    },
    State: {
        Calculated: false,
        CalulateButtonAdded: false,
        PostalCodeOk: false
    },
    Factor: {
        kwh: 'kWh',
        gwh: 'GWh',
        kr: 'kr',
        mkr: 'mill.kr',
        WhSelected: true
    },
    Settings: {
        MapImageBase: '/templates/fjordkraft/styles/ProductSelector/',
        MapFileType: '.gif',
        ShowBox: true
    },
    County: null,
    PostalCode: '',
    Result: '',
    Debug: false,
    ReadMore: '',
    WS: {
        Private: '/Templates/Fjordkraft/webservices/PriceCalculator/ProductCalculator.asmx',
        Corporate: '/Templates/Fjordkraft/webservices/PriceCalculator/CorporateProductCalculator.asmx'
    },
    Setup: function() {
        //Do postback on postalcode filled out
        PostalCodeFunctions();

        //set correct calculated value on load
        $.doTimeout('CalculateKWH', 10, function() { CalculateKWH(); });

        //Register events
        ProductSelector.Events.RegisterStartupEvents();

        //Show button
        ShowButton();

        //LoadProducts
        LoadProducts();

        //tipsy
        $(".productSelectorJQWebpart .help").tipsy({ gravity: 's', fade: true });
        $(".productSelectorJQWebpart .helpOrange").tipsy({ gravity: 's', fade: true });

        //focus postalcode
        $(ProductSelector.Selectors.PostalCodeTextBox).focus();
        if ($(ProductSelector.Selectors.PostalCodeTextBox).val().length == 4) {
            $(ProductSelector.Selectors.PostalCodeTextBox).trigger('keyup');
        }

        //add image
        ProductSelector.InitialButton.Add();

        ProductSelector.Events.PostalCodeFocusEvents();
    },
    Events: {
        RegisterStartupEvents: function() {
            //Calculate on slide
            $(ProductSelector.Selectors.AllSliders).bind(
                'slide',
                function() {
                    $.doTimeout('CalculateKWH', 10, function() { CalculateKWH(); });
                }
            );

            //Recalculate on slide
            $(".productSelectorJQWebpart .sliderRisk .slider-range-min").bind(
                'slide',
                function() {
                    $(this).trigger('ProductSelectorJQCountyRecalculate');
                }
            );

            //recalculate on kwh changed
            $(ProductSelector.Selectors.CalculatedValue).bind(
                'keyup',
                function() {
                    $(this).trigger('ProductSelectorJQCountyRecalculate');
                }
            );

            //Calculate on click
            $(".productSelectorJQWebpart .IconsWrapper img").bind(
                'click',
                function() {
                    $.doTimeout('CalculateKWH', 10, function() { CalculateKWH(); });
                }
            );

            //Map functions
            $('.productSelectorMapJQWebpart').bind(
                "ProductSelectorJQCountyBound",
                function() {
                    LoadMap(ProductSelector.County, ProductSelector.Settings.MapImageBase, ProductSelector.Settings.MapFileType, ProductSelector.Settings.ShowBox);
                }
            );

            //RecalculateButton event
            $(".productSelectorJQWebpart").bind(
                'ProductSelectorJQCountyRecalculate',
                function() {
                    RecalculateButton();
                }
            );

            //Corporate FactorTypeSelector
            $(".productSelectorJQWebpart .usageType a").click(function() {
                ToggleCorporateUsageType();
            });
        },
        PostalCodeFocusEvents: function() {
            var postalCodeSelector = ".productSelectorJQWebpart .postalcode";
            $(postalCodeSelector).focus(function() {
                //clear error...
                $(this).parent().parent().removeClass("errorPostalCode");
            });
            $(postalCodeSelector).blur(function() {
                if (ProductSelector.State.PostalCodeOk) {
                    //no error
                } else {
                    //error
                    $(this).parent().parent().addClass("errorPostalCode");
                }
            });
        },
        RegisterInitialButtonClickEvent: function(element) {
            $(element).click(function() {
                $(ProductSelector.Selectors.PostalCodeTextBox).trigger('keyup');
            });
        }
    },
    Selectors: {
        AllSliders: '.productSelectorJQWebpart .sliderFamily .slider-range-min, .productSelectorJQWebpart .sliderUsage .slider-range-min, .productSelectorJQWebpart .sliderCorporateUsage .slider-range-min',
        PostalCodeTextBox: '.productSelectorJQWebpart .postalcode',
        FactorText: '.productSelectorJQWebpart .factor',
        CalculatedValue: '.productSelectorJQWebpart input.sliderUsageCalculatedValue',
        FactorType: '.productSelectorJQWebpart .usageType a'
    },
    InitialButton: {
        Add: function() {
            var wrapper = '.productSelectorJQWebpart .wrapper';

            var gaqscript;
            if ($('.productSelectorMapJQWebpart').length != 0) {
                //map
                gaqscript = "_gaq.push(['_trackEvent', 'Avtalevelger', 'Start beregning']);";
            } else {
                //no map
                gaqscript = "_gaq.push(['_trackEvent', 'Avtalevelger forside', 'Start beregning']);";
            }

            $(wrapper).append('<img src="' + ProductSelector.Images.Calculate + '" onClick="' + gaqscript + '" alt="" class="initial" /> ');
            $(wrapper + ' .initial').hover(
                function() {
                    $(this).attr('src', ProductSelector.Images.CalculateHover);
                },
                function() {
                    $(this).attr('src', ProductSelector.Images.Calculate);
                }
            );
            ProductSelector.Events.RegisterInitialButtonClickEvent($(wrapper + ' .initial'));
        },
        Remove: function() {
            $('.productSelectorJQWebpart .wrapper .initial').remove();
        }
    }
};

function ToggleCorporateUsageType() {
    $(ProductSelector.Selectors.FactorType).toggleClass("on");
    ProductSelector.Factor.WhSelected = $(ProductSelector.Selectors.FactorType).first().hasClass('on');
    SetFactorText();
}

function RecalculateButton(){
    var button = $('.productSelectorJQWebpart .calculate');
    if(ProductSelector.State.Calculated){
        $(button).unbind('hover');
        $(button).addClass("reCalculate");
        $(button).attr('src', ProductSelector.Images.ReCalculateHover);
        $(button).hover(
            function () {
                $(this).attr('src', ProductSelector.Images.ReCalculateHover);
            },
            function () {
                $(this).attr('src', ProductSelector.Images.ReCalculate);
            }
        );
        $(button).removeClass('hideme');
    }
}

function PostalCodeFunctions() {
    $(ProductSelector.Selectors.PostalCodeTextBox).keyup(function () {
        var element = this;
        $('.postalCodeError').hide();
        $.doTimeout('ShowPostalCodeErrorTimeout');
        if ($(this).val().length != 4 || !IsNumeric($(this).val())) {
            ProductSelector.State.PostalCodeOk = false;
            return;
        }
        //Prevent multiple calls within short timespan
        $.doTimeout('FetchPostalCode', 50, function () {
            GetPostalCode(element);
        });
    });
}

function GetPostalCode(element){
    $(element).trigger('ProductSelectorJQCountyRecalculate');
    ProductSelector.PostalCode = $(element).val();
    var message = ["customerType", "1", "postalcode", ProductSelector.PostalCode, "language", "no"];
    PageMethod("/Templates/Fjordkraft/webservices/PriceCalculator/ProductCalculator.asmx", "GetSelectedCountyInfo", message,
    function (msg) {
        if (msg.d.length > 0) {
            $('.postalCodeError').hide();
            if (ProductSelector.Debug) alert("PostalCodeFunctions: " + msg.d);

            var recalculate = ProductSelector.County != null;
            ProductSelector.County = eval('(' + msg.d + ')');
            if (recalculate) {
                $(element).trigger('ProductSelectorJQCountyRecalculate');
            } else {
                $(element).trigger('ProductSelectorJQCountyBound');
            }
            ProductSelector.State.PostalCodeOk = true;
        } else {
            //handle error?
            $('.postalCodeError').show();
        }
    },
    function (msg) {
        //error ignored...
        if (ProductSelector.Debug) alert("PostalCodeFunctions: " + msg.responseText);
    });
}

function ShowButton() {
    $('.productSelectorJQWebpart').bind(
        "ProductSelectorJQCountyBound",
        function () {
            if (ProductSelector.State.CalulateButtonAdded == false) {
                ProductSelector.InitialButton.Remove();
                //add image
                $('.productSelectorJQWebpart .wrapper').append('<img src="' + ProductSelector.Images.Calculate + '" alt="" class="calculate" /> ');
                ProductSelector.State.CalulateButtonAdded = true;
            }
            var button = $('.productSelectorJQWebpart .calculate');

            //hover effects
            if (ProductSelector.State.Calculated == false) {
                $(button).hover(
                    function () {
                        $(this).attr('src', ProductSelector.Images.CalculateHover);
                    },
                    function () {
                        $(this).attr('src', ProductSelector.Images.Calculate);
                    }
                );
            }
            $(button).removeClass("reCalculate");

            //click event
            $(button).unbind('click');
            $(button).click(function () {
                ProductSelector.State.Calculated = true;
                $(button).addClass("hideme");
                var element = $(this);
                if ($(ProductSelector.Selectors.CalculatedValue).val() == '') {
                    CalculateKWH();
                }
                var message = [
                    "postNo", ProductSelector.PostalCode,
                    "installationTypeId", "",
                    "consumption", GetConsumption(),
                    "people", $('.productSelectorJQWebpart .txtSliderFamilyValue').val(),
                    "risk", $('.productSelectorJQWebpart .txtSliderRiskValue').val(),
                ];
                if (ProductSelector.Debug) alert("Message to post: " + message);
                PageMethod(ProductSelector.CustomerType.Private ? ProductSelector.WS.Private : ProductSelector.WS.Corporate, "GetProductInformation", message,
                function (msg) {
                    if (msg.d.length > 0) {
                        if (ProductSelector.Debug) alert("ShowButton: " + msg.d);
                        ProductSelector.Result = eval('(' + msg.d + ')');
                        if (ProductSelector.Debug) alert("Successfully evaluated");
                        $(element).trigger('ProductSelectorJQProductsBound');
                    } else {
                        //handle error?
                        ProductError();
                    }
                },
                function (msg) {
                    //error ignored...
                    ProductError();
                    if (ProductSelector.Debug) alert("ShowButton: " + msg.responseText);
                });
            });
        }
    );
}

function GetConsumption() {
    var val = parseFloat($(ProductSelector.Selectors.CalculatedValue).val().toString().replace(',', '.').replace('+', '').replace('-', ''));
    if (val <= 10) {
        val = val * 1000000;
    }
    return val.toString();
}

function ProductError(){
    var resultpanel = ".productSelectorJQWebpart .result ";
    ShowProductPanel(resultpanel);

    $(resultpanel + " .product").addClass("hideme");
    $(resultpanel + " .error").removeClass("hideme");
    $(resultpanel + " .error").text(ProductSelector.Error.NoProducts);
}

function ShowProductPanel(resultpanel){
    //hide map (if any)
    $(resultpanel).parent().addClass("flap");
    $(".productSelectorMapJQWebpart .map, " + resultpanel + " .error").addClass("hideme");
    //show result
    $(resultpanel).removeClass("hideme");
}

function LoadProducts() {
    $('.productSelectorJQWebpart').bind(
        "ProductSelectorJQProductsBound",
        function () {
            var resultpanel = ".productSelectorJQWebpart .result ";
            ShowProductPanel(resultpanel);

            $(resultpanel + " .heading h2").text(ProductSelector.Result.Text[0].Heading);
            $(resultpanel + " .heading p").text(ProductSelector.Result.Text[1].IntroText);
            $(resultpanel + " .product").removeClass("hideme");
            $(resultpanel + " .product h3").text(ProductSelector.Result.Products[0].Title);
            $(resultpanel + " .product p.text").text(ProductSelector.Result.Products[0].Description);
            $(resultpanel + " .product a").attr('href', ProductSelector.Result.Products[0].Url);
            $(resultpanel + " .product .img img").attr('src', ProductSelector.Result.Products[0].IconPath);
            $(resultpanel + " .product .img img").attr('alt', ProductSelector.Result.Products[0].Title);

            if ($('.productSelectorMapJQWebpart').length != 0) {
                //with map

                $(resultpanel + " .product .content img").attr('src', ProductSelector.Images.Order);
                $(resultpanel + " .product .content img").hover(
                    function () {
                        $(this).attr('src', ProductSelector.Images.OrderHover);
                    },
                    function () {
                        $(this).attr('src', ProductSelector.Images.Order);
                    }
                );
                $(resultpanel + " .product .content img").attr('alt', ProductSelector.Result.Products[0].BtnLabel);
                $(resultpanel + " .product .content img").attr('onclick', "_gaq.push(['_trackEvent', 'Avtalevelger', 'Start " + ProductSelector.Result.Products[0].Title + " bestilling']);");

            } else {
                //no map
                $(resultpanel + " .product .content img").addClass("hideme");
                $(resultpanel + " .product .content a").text(ProductSelector.ReadMore);
                $(resultpanel + " .product .content a").attr('onclick', "_gaq.push(['_trackEvent', 'Avtalevelger forside', 'Start " + ProductSelector.Result.Products[0].Title + " bestilling']);");
                $(resultpanel + " .product .content a").addClass("readmore");
            }

            if (ProductSelector.Result.Products[0].PriceVisible == 'False') {
                $(resultpanel + " .product p.price").addClass("hideme");
            } else {
                $(resultpanel + " .product p.price").text(ProductSelector.Result.Products[0].Price);
                $(resultpanel + " .product span.helpOrange").attr("title", ProductSelector.Result.Text[3].PriceCalculationText);
                
            }
            Cufon.refresh();
        }
    );
}

function CalculateKWH() {
    var val;
    if (ProductSelector.CustomerType.Private) {
        var factor = familylist[$(".productSelectorJQWebpart .txtSliderFamilyValue").val() - 1].KWHFactor;
        val = $(".productSelectorJQWebpart .txtSliderUsageValue").val();
        $(ProductSelector.Selectors.CalculatedValue).val((parseInt(factor) + parseInt(val)));
    } else {
        val = parseInt($(".productSelectorJQWebpart .txtSliderUsageValue").val());
        if (val >= 1000000) {
            val = val / 1000000;
            if (val == 10) val = ''+val + '+';
        }
        SetFactorText();
        $(ProductSelector.Selectors.CalculatedValue).val(val.toString().replace('.',','));
    }
    $(".productSelectorJQWebpart").trigger('ProductSelectorJQCountyRecalculate');
}
function SetFactorText() {
    var val = parseInt($(".productSelectorJQWebpart .txtSliderUsageValue").val());
    var text;
    if (val >= 1000000) {
        if (ProductSelector.Factor.WhSelected) {
            text = ProductSelector.Factor.gwh;
        } else {
            text = ProductSelector.Factor.mkr;
        }
    } else {
        if (ProductSelector.Factor.WhSelected) {
            text = ProductSelector.Factor.kwh;
        } else {
            text = ProductSelector.Factor.kr;
        }
    }
    $(ProductSelector.Selectors.FactorText).text(text);
}

function LoadMap(county, imgbase, filetype, showbox) {
    var mapSelector = ".productSelectorMapJQWebpart .map";
    
    $(".productSelectorMapJQWebpart .map").css('background-image', 'url(' + imgbase + county.CountyNo + filetype+')');
    try {
        $(".productSelectorMapJQWebpart .map span").remove();
    } catch (err) {
        //alert(err);
    }

    if(showbox){
        var readmore = '<span class="readmore">' + county.ReadMoreText + '</span>';
        var desc = '<span class="description">' + county.ShortDescription + '</span>';
        var bottom = '<span class="bleft"></span><span class="bcenter"></span><span class="bright"></span>';
        var smallbox = '<span class="smallbox"><span class="rcol"></span><span class="lcol"><span class="heading">' + county.CountyName + '</span>' + readmore + desc + '</span>' + bottom + '</span>';

        $(mapSelector).append(smallbox);
        $(mapSelector + " .smallbox .description").hide();
        $(mapSelector + " .smallbox").hover(
            function () {
                $(mapSelector + " .smallbox .readmore").hide();
                $(mapSelector + " .smallbox .description").show();
                $(this).addClass("bigbox");
            },
            function () {
                $(mapSelector + " .smallbox .readmore").show();
                $(mapSelector + " .smallbox .description").hide();
                $(this).removeClass("bigbox");
            }
        );
    }
}
;;;
