(function(a,f){function c(a){var b=z[a]={},d,f,a=a.split(/\s+/);for(d=0,f=a.length;d<f;d++)b[a[d]]=!0;return b}function g(a,b,d){if(d===f&&1===a.nodeType)if(d="data-"+b.replace(C,"-$1").toLowerCase(),d=a.getAttribute(d),"string"===typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:h.isNumeric(d)?parseFloat(d):O.test(d)?h.parseJSON(d):d}catch(e){}h.data(a,b,d)}else d=f;return d}function e(a){for(var b in a)if(!("data"===b&&h.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function b(a,
b,d){var f=b+"defer",e=b+"queue",c=b+"mark",g=h._data(a,f);g&&("queue"===d||!h._data(a,e))&&("mark"===d||!h._data(a,c))&&setTimeout(function(){!h._data(a,e)&&!h._data(a,c)&&(h.removeData(a,f,!0),g.fire())},0)}function d(){return!1}function i(){return!0}function j(a,b,d){b=b||0;if(h.isFunction(b))return h.grep(a,function(a,f){return!!b.call(a,f,a)===d});if(b.nodeType)return h.grep(a,function(a){return a===b===d});if("string"===typeof b){var f=h.grep(a,function(a){return 1===a.nodeType});if(ia.test(b))return h.filter(b,
f,!d);b=h.filter(b,f)}return h.grep(a,function(a){return 0<=h.inArray(a,b)===d})}function l(a){var b=ra.split(" "),a=a.createDocumentFragment();if(a.createElement)for(;b.length;)a.createElement(b.pop());return a}function n(a,b){if(1===b.nodeType&&h.hasData(a)){var d,f,e;f=h._data(a);var c=h._data(b,f),g=f.events;if(g)for(d in delete c.handle,c.events={},g)for(f=0,e=g[d].length;f<e;f++)h.event.add(b,d+(g[d][f].namespace?".":"")+g[d][f].namespace,g[d][f],g[d][f].data);c.data&&(c.data=h.extend({},c.data))}}
function m(a,b){var d;if(1===b.nodeType){b.clearAttributes&&b.clearAttributes();b.mergeAttributes&&b.mergeAttributes(a);d=b.nodeName.toLowerCase();if("object"===d)b.outerHTML=a.outerHTML;else if("input"===d&&("checkbox"===a.type||"radio"===a.type))a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);else if("option"===d)b.selected=a.defaultSelected;else if("input"===d||"textarea"===d)b.defaultValue=a.defaultValue;b.removeAttribute(h.expando)}}function k(a){return"undefined"!==
typeof a.getElementsByTagName?a.getElementsByTagName("*"):"undefined"!==typeof a.querySelectorAll?a.querySelectorAll("*"):[]}function p(a){if("checkbox"===a.type||"radio"===a.type)a.defaultChecked=a.checked}function q(a){var b=(a.nodeName||"").toLowerCase();"input"===b?p(a):"script"!==b&&"undefined"!==typeof a.getElementsByTagName&&h.grep(a.getElementsByTagName("input"),p)}function y(a,b){b.src?h.ajax({url:b.src,async:!1,dataType:"script"}):h.globalEval((b.text||b.textContent||b.innerHTML||"").replace(Ca,
"/*$0*/"));b.parentNode&&b.parentNode.removeChild(b)}function u(a,b,d){var f="width"===b?a.offsetWidth:a.offsetHeight,e="width"===b?jb:kb;if(0<f)return"border"!==d&&h.each(e,function(){d||(f-=parseFloat(h.css(a,"padding"+this))||0);f="margin"===d?f+(parseFloat(h.css(a,d+this))||0):f-(parseFloat(h.css(a,"border"+this+"Width"))||0)}),f+"px";f=Da(a,b,b);if(0>f||null==f)f=a.style[b]||0;f=parseFloat(f)||0;d&&h.each(e,function(){f+=parseFloat(h.css(a,"padding"+this))||0;"padding"!==d&&(f+=parseFloat(h.css(a,
"border"+this+"Width"))||0);"margin"===d&&(f+=parseFloat(h.css(a,d+this))||0)});return f+"px"}function v(a){return function(b,d){"string"!==typeof b&&(d=b,b="*");if(h.isFunction(d))for(var f=b.toLowerCase().split(Ya),e=0,c=f.length,g,i;e<c;e++)g=f[e],(i=/^\+/.test(g))&&(g=g.substr(1)||"*"),g=a[g]=a[g]||[],g[i?"unshift":"push"](d)}}function s(a,b,d,e,c,g){c=c||b.dataTypes[0];g=g||{};g[c]=!0;for(var c=a[c],h=0,i=c?c.length:0,j=a===Ua,k;h<i&&(j||!k);h++)k=c[h](b,d,e),"string"===typeof k&&(!j||g[k]?k=
f:(b.dataTypes.unshift(k),k=s(a,b,d,e,k,g)));if((j||!k)&&!g["*"])k=s(a,b,d,e,"*",g);return k}function w(a,b){var d,e,c=h.ajaxSettings.flatOptions||{};for(d in b)b[d]!==f&&((c[d]?a:e||(e={}))[d]=b[d]);e&&h.extend(!0,a,e)}function o(a,b,d,f){if(h.isArray(b))h.each(b,function(b,e){d||lb.test(a)?f(a,e):o(a+"["+("object"===typeof e||h.isArray(e)?b:"")+"]",e,d,f)});else if(!d&&null!=b&&"object"===typeof b)for(var e in b)o(a+"["+e+"]",b[e],d,f);else f(a,b)}function A(){try{return new a.XMLHttpRequest}catch(b){}}
function N(){setTimeout(B,0);return Oa=h.now()}function B(){Oa=f}function J(a,b){var d={};h.each(Za.concat.apply([],Za.slice(0,b)),function(){d[this]=a});return d}function Q(a){if(!Va[a]){var b=r.body,d=h("<"+a+">").appendTo(b),f=d.css("display");d.remove();if("none"===f||""===f){la||(la=r.createElement("iframe"),la.frameBorder=la.width=la.height=0);b.appendChild(la);if(!Ea||!la.createElement)Ea=(la.contentWindow||la.contentDocument).document,Ea.write(("CSS1Compat"===r.compatMode?"<!doctype html>":
"")+"<html><body>"),Ea.close();d=Ea.createElement(a);Ea.body.appendChild(d);f=h.css(d,"display");b.removeChild(la)}Va[a]=f}return Va[a]}function P(a){return h.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var r=a.document,D=a.navigator,K=a.location,h=function(){function b(){if(!d.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(b,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,c=a.$,g,h=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,p=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,m=/^[\],:{}\s]*$/,n=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,o=/(?:^|:|,)(?:\s*\[)+/g,y=/(webkit)[ \/]([\w.]+)/,u=/(opera)(?:.*version)?[ \/]([\w.]+)/,K=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,s=/-([a-z]|[0-9])/ig,z=/^-ms-/,X=function(a,b){return(b+"").toUpperCase()},Ka=D.userAgent,Pa,Fa,mb=Object.prototype.toString,Wa=Object.prototype.hasOwnProperty,w=Array.prototype.push,
Z=Array.prototype.slice,$a=String.prototype.trim,A=Array.prototype.indexOf,I={};d.fn=d.prototype={constructor:d,init:function(a,b,e){var c;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if("body"===a&&!b&&r.body)return this.context=r,this[0]=r.body,this.selector=a,this.length=1,this;if("string"===typeof a){if((c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&3<=a.length?[null,a,null]:h.exec(a))&&(c[1]||!b)){if(c[1])return e=(b=b instanceof d?b[0]:b)?b.ownerDocument||
b:r,(a=p.exec(a))?d.isPlainObject(b)?(a=[r.createElement(a[1])],d.fn.attr.call(a,b,!0)):a=[e.createElement(a[1])]:(a=d.buildFragment([c[1]],[e]),a=(a.cacheable?d.clone(a.fragment):a.fragment).childNodes),d.merge(this,a);if((b=r.getElementById(c[2]))&&b.parentNode){if(b.id!==c[2])return e.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}return!b||b.jquery?(b||e).find(a):this.constructor(b).find(a)}if(d.isFunction(a))return e.ready(a);a.selector!==f&&(this.selector=a.selector,
this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return Z.call(this,0)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a,b,f){var e=this.constructor();d.isArray(a)?w.apply(e,a):d.merge(e,a);e.prevObject=this;e.context=this.context;"find"===b?e.selector=this.selector+(this.selector?" ":"")+f:b&&(e.selector=this.selector+"."+b+"("+f+")");return e},each:function(a,
b){return d.each(this,a,b)},ready:function(a){d.bindReady();Pa.add(a);return this},eq:function(a){return-1===a?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(Z.apply(this,arguments),"slice",Z.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:w,sort:[].sort,splice:[].splice};
d.fn.init.prototype=d.fn;d.extend=d.fn.extend=function(){var a,b,e,c,M,g=arguments[0]||{},h=1,i=arguments.length,j=!1;"boolean"===typeof g&&(j=g,g=arguments[1]||{},h=2);"object"!==typeof g&&!d.isFunction(g)&&(g={});i===h&&(g=this,--h);for(;h<i;h++)if(null!=(a=arguments[h]))for(b in a)e=g[b],c=a[b],g!==c&&(j&&c&&(d.isPlainObject(c)||(M=d.isArray(c)))?(M?(M=!1,e=e&&d.isArray(e)?e:[]):e=e&&d.isPlainObject(e)?e:{},g[b]=d.extend(j,e,c)):c!==f&&(g[b]=c));return g};d.extend({noConflict:function(b){a.$===
d&&(a.$=c);b&&a.jQuery===d&&(a.jQuery=e);return d},isReady:!1,readyWait:1,holdReady:function(a){a?d.readyWait++:d.ready(!0)},ready:function(a){if(!0===a&&!--d.readyWait||!0!==a&&!d.isReady){if(!r.body)return setTimeout(d.ready,1);d.isReady=!0;!0!==a&&0<--d.readyWait||(Pa.fireWith(r,[d]),d.fn.trigger&&d(r).trigger("ready").unbind("ready"))}},bindReady:function(){if(!Pa){Pa=d.Callbacks("once memory");if("complete"===r.readyState)return setTimeout(d.ready,1);if(r.addEventListener)r.addEventListener("DOMContentLoaded",
Fa,!1),a.addEventListener("load",d.ready,!1);else if(r.attachEvent){r.attachEvent("onreadystatechange",Fa);a.attachEvent("onload",d.ready);var f=!1;try{f=null==a.frameElement}catch(e){}r.documentElement.doScroll&&f&&b()}}},isFunction:function(a){return"function"===d.type(a)},isArray:Array.isArray||function(a){return"array"===d.type(a)},isWindow:function(a){return a&&"object"===typeof a&&"setInterval"in a},isNumeric:function(a){return null!=a&&l.test(a)&&!isNaN(a)},type:function(a){return null==a?
""+a:I[mb.call(a)]||"object"},isPlainObject:function(a){if(!a||"object"!==d.type(a)||a.nodeType||d.isWindow(a))return!1;try{if(a.constructor&&!Wa.call(a,"constructor")&&!Wa.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}for(var e in a);return e===f||Wa.call(a,e)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a;},parseJSON:function(b){if("string"!==typeof b||!b)return null;b=d.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(m.test(b.replace(n,
"@").replace(q,"]").replace(o,"")))return(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b){var e,c;try{a.DOMParser?(c=new DOMParser,e=c.parseFromString(b,"text/xml")):(e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(b))}catch(g){e=f}(!e||!e.documentElement||e.getElementsByTagName("parsererror").length)&&d.error("Invalid XML: "+b);return e},noop:function(){},globalEval:function(b){b&&i.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(z,
"ms-").replace(s,X)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,e){var c,g=0,M=a.length,h=M===f||d.isFunction(a);if(e)if(h)for(c in a){if(!1===b.apply(a[c],e))break}else for(;g<M&&!(!1===b.apply(a[g++],e)););else if(h)for(c in a){if(!1===b.call(a[c],c,a[c]))break}else for(;g<M&&!(!1===b.call(a[g],g,a[g++])););return a},trim:$a?function(a){return null==a?"":$a.call(a)}:function(a){return null==a?"":a.toString().replace(j,"").replace(k,"")},
makeArray:function(a,b){var f=b||[];if(null!=a){var e=d.type(a);null==a.length||"string"===e||"function"===e||"regexp"===e||d.isWindow(a)?w.call(f,a):d.merge(f,a)}return f},inArray:function(a,b,d){var f;if(b){if(A)return A.call(b,a,d);f=b.length;for(d=d?0>d?Math.max(0,f+d):d:0;d<f;d++)if(d in b&&b[d]===a)return d}return-1},merge:function(a,b){var d=a.length,e=0;if("number"===typeof b.length)for(var c=b.length;e<c;e++)a[d++]=b[e];else for(;b[e]!==f;)a[d++]=b[e++];a.length=d;return a},grep:function(a,
b,d){for(var f=[],e,d=!!d,c=0,g=a.length;c<g;c++)e=!!b(a[c],c),d!==e&&f.push(a[c]);return f},map:function(a,b,e){var c,g,M=[],h=0,i=a.length;if(a instanceof d||i!==f&&"number"===typeof i&&(0<i&&a[0]&&a[i-1]||0===i||d.isArray(a)))for(;h<i;h++)c=b(a[h],h,e),null!=c&&(M[M.length]=c);else for(g in a)c=b(a[g],g,e),null!=c&&(M[M.length]=c);return M.concat.apply([],M)},guid:1,proxy:function(a,b){if("string"===typeof b)var e=a[b],b=a,a=e;if(!d.isFunction(a))return f;var c=Z.call(arguments,2),e=function(){return a.apply(b,
c.concat(Z.call(arguments)))};e.guid=a.guid=a.guid||e.guid||d.guid++;return e},access:function(a,b,e,c,g,M){var h=a.length;if("object"===typeof b){for(var i in b)d.access(a,i,b[i],c,g,e);return a}if(e!==f){c=!M&&c&&d.isFunction(e);for(i=0;i<h;i++)g(a[i],b,c?e.call(a[i],i,g(a[i],b)):e,M);return a}return h?g(a[0],b):f},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();a=y.exec(a)||u.exec(a)||K.exec(a)||0>a.indexOf("compatible")&&v.exec(a)||[];return{browser:a[1]||"",version:a[2]||
"0"}},sub:function(){function a(b,d){return new a.fn.init(b,d)}d.extend(!0,a,this);a.superclass=this;a.fn=a.prototype=this();a.fn.constructor=a;a.sub=this.sub;a.fn.init=function(f,e){e&&e instanceof d&&!(e instanceof a)&&(e=a(e));return d.fn.init.call(this,f,e,b)};a.fn.init.prototype=a.fn;var b=a(r);return a},browser:{}});d.each("Boolean,Number,String,Function,Array,Date,RegExp,Object".split(","),function(a,b){I["[object "+b+"]"]=b.toLowerCase()});Ka=d.uaMatch(Ka);Ka.browser&&(d.browser[Ka.browser]=
!0,d.browser.version=Ka.version);d.browser.webkit&&(d.browser.safari=!0);i.test("\u00a0")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/);g=d(r);r.addEventListener?Fa=function(){r.removeEventListener("DOMContentLoaded",Fa,!1);d.ready()}:r.attachEvent&&(Fa=function(){"complete"===r.readyState&&(r.detachEvent("onreadystatechange",Fa),d.ready())});"function"===typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return d});return d}(),z={};h.Callbacks=function(a){var a=a?z[a]||c(a):{},b=[],d=
[],e,g,i,j,k,l=function(d){var f,e,c,g;for(f=0,e=d.length;f<e;f++)c=d[f],g=h.type(c),"array"===g?l(c):"function"===g&&(!a.unique||!m.has(c))&&b.push(c)},p=function(f,c){c=c||[];e=!a.memory||[f,c];g=!0;k=i||0;i=0;for(j=b.length;b&&k<j;k++)if(!1===b[k].apply(f,c)&&a.stopOnFalse){e=!0;break}g=!1;b&&(a.once?!0===e?m.disable():b=[]:d&&d.length&&(e=d.shift(),m.fireWith(e[0],e[1])))},m={add:function(){if(b){var a=b.length;l(arguments);g?j=b.length:e&&!0!==e&&(i=a,p(e[0],e[1]))}return this},remove:function(){if(b)for(var d=
arguments,f=0,e=d.length;f<e;f++)for(var c=0;c<b.length&&!(d[f]===b[c]&&(g&&c<=j&&(j--,c<=k&&k--),b.splice(c--,1),a.unique));c++);return this},has:function(a){if(b)for(var d=0,f=b.length;d<f;d++)if(a===b[d])return!0;return!1},empty:function(){b=[];return this},disable:function(){b=d=e=f;return this},disabled:function(){return!b},lock:function(){d=f;(!e||!0===e)&&m.disable();return this},locked:function(){return!d},fireWith:function(b,f){d&&(g?a.once||d.push([b,f]):(!a.once||!e)&&p(b,f));return this},
fire:function(){m.fireWith(this,arguments);return this},fired:function(){return!!e}};return m};var W=[].slice;h.extend({Deferred:function(a){var b=h.Callbacks("once memory"),d=h.Callbacks("once memory"),f=h.Callbacks("memory"),e="pending",c={resolve:b,reject:d,notify:f},g={done:b.add,fail:d.add,progress:f.add,state:function(){return e},isResolved:b.fired,isRejected:d.fired,then:function(a,b,d){i.done(a).fail(b).progress(d);return this},always:function(){return i.done.apply(i,arguments).fail.apply(i,
arguments)},pipe:function(a,b,d){return h.Deferred(function(f){h.each({done:[a,"resolve"],fail:[b,"reject"],progress:[d,"notify"]},function(a,b){var d=b[0],e=b[1],c;if(h.isFunction(d))i[a](function(){if((c=d.apply(this,arguments))&&h.isFunction(c.promise))c.promise().then(f.resolve,f.reject,f.notify);else f[e+"With"](this===i?f:this,[c])});else i[a](f[e])})}).promise()},promise:function(a){if(null==a)a=g;else for(var b in g)a[b]=g[b];return a}},i=g.promise({}),j;for(j in c)i[j]=c[j].fire,i[j+"With"]=
c[j].fireWith;i.done(function(){e="resolved"},d.disable,f.lock).fail(function(){e="rejected"},b.disable,f.lock);a&&a.call(i,i);return i},when:function(a){function b(a){return function(b){f[a]=1<arguments.length?W.call(arguments,0):b;--i||j.resolveWith(j,f)}}function d(a){return function(b){g[a]=1<arguments.length?W.call(arguments,0):b;j.notifyWith(k,g)}}var f=W.call(arguments,0),e=0,c=f.length,g=Array(c),i=c,j=1>=c&&a&&h.isFunction(a.promise)?a:h.Deferred(),k=j.promise();if(1<c){for(;e<c;e++)f[e]&&
f[e].promise&&h.isFunction(f[e].promise)?f[e].promise().then(b(e),j.reject,d(e)):--i;i||j.resolveWith(j,f)}else j!==a&&j.resolveWith(j,c?[a]:[]);return k}});h.support=function(){var a=r.createElement("div"),b=r.documentElement,d,f,e,c,g,i,j,k;a.setAttribute("className","t");a.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>";d=a.getElementsByTagName("*");f=a.getElementsByTagName("a")[0];if(!d||!d.length||!f)return{};
e=r.createElement("select");c=e.appendChild(r.createElement("option"));d=a.getElementsByTagName("input")[0];g={leadingWhitespace:3===a.firstChild.nodeType,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(f.getAttribute("style")),hrefNormalized:"/a"===f.getAttribute("href"),opacity:/^0.55/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:"on"===d.value,optSelected:c.selected,
getSetAttribute:"t"!==a.className,enctype:!!r.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0};d.checked=!0;g.noCloneChecked=d.cloneNode(!0).checked;e.disabled=!0;g.optDisabled=!c.disabled;try{delete a.test}catch(l){g.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){g.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick"));
d=r.createElement("input");d.value="t";d.setAttribute("type","radio");g.radioValue="t"===d.value;d.setAttribute("checked","checked");a.appendChild(d);f=r.createDocumentFragment();f.appendChild(a.lastChild);g.checkClone=f.cloneNode(!0).cloneNode(!0).lastChild.checked;a.innerHTML="";a.style.width=a.style.paddingLeft="1px";i=r.getElementsByTagName("body")[0];j=r.createElement(i?"div":"body");f={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};i&&h.extend(f,{position:"absolute",
left:"-999px",top:"-999px"});for(k in f)j.style[k]=f[k];j.appendChild(a);b=i||b;b.insertBefore(j,b.firstChild);g.appendChecked=d.checked;g.boxModel=2===a.offsetWidth;"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,g.inlineBlockNeedsLayout=2===a.offsetWidth,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",g.shrinkWrapBlocks=2!==a.offsetWidth);a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";f=a.getElementsByTagName("td");d=
0===f[0].offsetHeight;f[0].style.display="";f[1].style.display="none";g.reliableHiddenOffsets=d&&0===f[0].offsetHeight;a.innerHTML="";r.defaultView&&r.defaultView.getComputedStyle&&(d=r.createElement("div"),d.style.width="0",d.style.marginRight="0",a.appendChild(d),g.reliableMarginRight=0===(parseInt((r.defaultView.getComputedStyle(d,null)||{marginRight:0}).marginRight,10)||0));if(a.attachEvent)for(k in{submit:1,change:1,focusin:1})f="on"+k,d=f in a,d||(a.setAttribute(f,"return;"),d="function"===
typeof a[f]),g[k+"Bubbles"]=d;h(function(){var a,b,d,f;if(i=r.getElementsByTagName("body")[0])a=r.createElement("div"),a.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(a,i.firstChild),j=r.createElement("div"),j.style.cssText="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;visibility:hidden;border:0;",j.innerHTML="<div style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;'><div></div></div><table style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>",
a.appendChild(j),b=j.firstChild,d=b.firstChild,f={doesNotAddBorder:5!==d.offsetTop,doesAddBorderForTableAndCells:5===b.nextSibling.firstChild.firstChild.offsetTop},d.style.position="fixed",d.style.top="20px",f.fixedPosition=20===d.offsetTop||15===d.offsetTop,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",f.subtractsBorderForOverflowNotVisible=-5===d.offsetTop,f.doesNotIncludeMarginInBodyOffset=1!==i.offsetTop,i.removeChild(a),j=null,h.extend(g,f)});j.innerHTML=
"";b.removeChild(j);j=f=e=c=i=d=a=d=null;return g}();h.boxModel=h.support.boxModel;var O=/^(?:\{.*\}|\[.*\])$/,C=/([A-Z])/g;h.extend({cache:{},uuid:0,expando:"jQuery"+(h.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?h.cache[a[h.expando]]:a[h.expando];return!!a&&!e(a)},data:function(a,b,d,e){if(h.acceptData(a)){var c,g="string"===typeof b,i=(c=a.nodeType)?h.cache:a,j=c?a[h.expando]:a[h.expando]&&
h.expando,k="events"===b;if(j&&i[j]&&(k||e||i[j].data)||!(g&&d===f)){j||(c?a[h.expando]=j=++h.uuid:j=h.expando);i[j]||(i[j]={},c||(i[j].toJSON=h.noop));if("object"===typeof b||"function"===typeof b)e?i[j]=h.extend(i[j],b):i[j].data=h.extend(i[j].data,b);c=a=i[j];e||(a.data||(a.data={}),a=a.data);d!==f&&(a[h.camelCase(b)]=d);if(k&&!a[b])return c.events;g?(d=a[b],null==d&&(d=a[h.camelCase(b)])):d=a;return d}}},removeData:function(a,b,d){if(h.acceptData(a)){var f,c,g,i=a.nodeType,j=i?h.cache:a,k=i?a[h.expando]:
h.expando;if(j[k]){if(b&&(f=d?j[k]:j[k].data)){h.isArray(b)||(b in f?b=[b]:(b=h.camelCase(b),b=b in f?[b]:b.split(" ")));for(c=0,g=b.length;c<g;c++)delete f[b[c]];if(!(d?e:h.isEmptyObject)(f))return}if(!d&&(delete j[k].data,!e(j[k])))return;h.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null;i&&(h.support.deleteExpando?delete a[h.expando]:a.removeAttribute?a.removeAttribute(h.expando):a[h.expando]=null)}}},_data:function(a,b,d){return h.data(a,b,d,!0)},acceptData:function(a){if(a.nodeName){var b=
h.noData[a.nodeName.toLowerCase()];if(b)return!(!0===b||a.getAttribute("classid")!==b)}return!0}});h.fn.extend({data:function(a,b){var d,e,c,i=null;if("undefined"===typeof a){if(this.length&&(i=h.data(this[0]),1===this[0].nodeType&&!h._data(this[0],"parsedAttrs"))){e=this[0].attributes;for(var j=0,k=e.length;j<k;j++)c=e[j].name,0===c.indexOf("data-")&&(c=h.camelCase(c.substring(5)),g(this[0],c,i[c]));h._data(this[0],"parsedAttrs",!0)}return i}if("object"===typeof a)return this.each(function(){h.data(this,
a)});d=a.split(".");d[1]=d[1]?"."+d[1]:"";return b===f?(i=this.triggerHandler("getData"+d[1]+"!",[d[0]]),i===f&&this.length&&(i=h.data(this[0],a),i=g(this[0],a,i)),i===f&&d[1]?this.data(d[0]):i):this.each(function(){var f=h(this),e=[d[0],b];f.triggerHandler("setData"+d[1]+"!",e);h.data(this,a,b);f.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){h.removeData(this,a)})}});h.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",h._data(a,b,(h._data(a,b)||0)+
1))},_unmark:function(a,d,f){!0!==a&&(f=d,d=a,a=!1);if(d){var f=f||"fx",e=f+"mark";(a=a?0:(h._data(d,e)||1)-1)?h._data(d,e,a):(h.removeData(d,e,!0),b(d,f,"mark"))}},queue:function(a,b,d){var f;if(a)return b=(b||"fx")+"queue",f=h._data(a,b),d&&(!f||h.isArray(d)?f=h._data(a,b,h.makeArray(d)):f.push(d)),f||[]},dequeue:function(a,d){var d=d||"fx",f=h.queue(a,d),e=f.shift(),c={};"inprogress"===e&&(e=f.shift());e&&("fx"===d&&f.unshift("inprogress"),h._data(a,d+".run",c),e.call(a,function(){h.dequeue(a,
d)},c));f.length||(h.removeData(a,d+"queue "+d+".run",!0),b(a,d,"queue"))}});h.fn.extend({queue:function(a,b){"string"!==typeof a&&(b=a,a="fx");return b===f?h.queue(this[0],a):this.each(function(){var d=h.queue(this,a,b);"fx"===a&&"inprogress"!==d[0]&&h.dequeue(this,a)})},dequeue:function(a){return this.each(function(){h.dequeue(this,a)})},delay:function(a,b){a=h.fx?h.fx.speeds[a]||a:a;return this.queue(b||"fx",function(b,d){var f=setTimeout(b,a);d.stop=function(){clearTimeout(f)}})},clearQueue:function(a){return this.queue(a||
"fx",[])},promise:function(a){function b(){--g||d.resolveWith(e,[e])}"string"!==typeof a&&(a=f);for(var a=a||"fx",d=h.Deferred(),e=this,c=e.length,g=1,i=a+"defer",j=a+"queue",a=a+"mark",k;c--;)if(k=h.data(e[c],i,f,!0)||(h.data(e[c],j,f,!0)||h.data(e[c],a,f,!0))&&h.data(e[c],i,h.Callbacks("once memory"),!0))g++,k.add(b);b();return d.promise()}});var R=/[\n\t\r]/g,L=/\s+/,ma=/\r/g,x=/^(?:button|input)$/i,I=/^(?:button|input|object|select|textarea)$/i,E=/^a(?:rea)?$/i,F=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
H=h.support.getSetAttribute,G,Y,U;h.fn.extend({attr:function(a,b){return h.access(this,a,b,!0,h.attr)},removeAttr:function(a){return this.each(function(){h.removeAttr(this,a)})},prop:function(a,b){return h.access(this,a,b,!0,h.prop)},removeProp:function(a){a=h.propFix[a]||a;return this.each(function(){try{this[a]=f,delete this[a]}catch(b){}})},addClass:function(a){var b,d,f,e,c,g,i;if(h.isFunction(a))return this.each(function(b){h(this).addClass(a.call(this,b,this.className))});if(a&&"string"===typeof a){b=
a.split(L);for(d=0,f=this.length;d<f;d++)if(e=this[d],1===e.nodeType)if(!e.className&&1===b.length)e.className=a;else{c=" "+e.className+" ";for(g=0,i=b.length;g<i;g++)~c.indexOf(" "+b[g]+" ")||(c+=b[g]+" ");e.className=h.trim(c)}}return this},removeClass:function(a){var b,d,e,c,g,i,j;if(h.isFunction(a))return this.each(function(b){h(this).removeClass(a.call(this,b,this.className))});if(a&&"string"===typeof a||a===f){b=(a||"").split(L);for(d=0,e=this.length;d<e;d++)if(c=this[d],1===c.nodeType&&c.className)if(a){g=
(" "+c.className+" ").replace(R," ");for(i=0,j=b.length;i<j;i++)g=g.replace(" "+b[i]+" "," ");c.className=h.trim(g)}else c.className=""}return this},toggleClass:function(a,b){var d=typeof a,f="boolean"===typeof b;return h.isFunction(a)?this.each(function(d){h(this).toggleClass(a.call(this,d,this.className,b),b)}):this.each(function(){if("string"===d)for(var e,c=0,g=h(this),i=b,j=a.split(L);e=j[c++];)i=f?i:!g.hasClass(e),g[i?"addClass":"removeClass"](e);else if("undefined"===d||"boolean"===d)this.className&&
h._data(this,"__className__",this.className),this.className=this.className||!1===a?"":h._data(this,"__className__")||""})},hasClass:function(a){for(var a=" "+a+" ",b=0,d=this.length;b<d;b++)if(1===this[b].nodeType&&-1<(" "+this[b].className+" ").replace(R," ").indexOf(a))return!0;return!1},val:function(a){var b,d,e,c=this[0];if(!arguments.length){if(c){if((b=h.valHooks[c.nodeName.toLowerCase()]||h.valHooks[c.type])&&"get"in b&&(d=b.get(c,"value"))!==f)return d;d=c.value;return"string"===typeof d?
d.replace(ma,""):null==d?"":d}return f}e=h.isFunction(a);return this.each(function(d){var c=h(this);if(1===this.nodeType&&(d=e?a.call(this,d,c.val()):a,null==d?d="":"number"===typeof d?d+="":h.isArray(d)&&(d=h.map(d,function(a){return null==a?"":a+""})),b=h.valHooks[this.nodeName.toLowerCase()]||h.valHooks[this.type],!b||!("set"in b)||b.set(this,d,"value")===f))this.value=d})}});h.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,
d,f=a.selectedIndex,e=[],c=a.options,g="select-one"===a.type;if(0>f)return null;a=g?f:0;for(d=g?f+1:c.length;a<d;a++)if(b=c[a],b.selected&&(h.support.optDisabled?!b.disabled:null===b.getAttribute("disabled"))&&(!b.parentNode.disabled||!h.nodeName(b.parentNode,"optgroup"))){b=h(b).val();if(g)return b;e.push(b)}return g&&!e.length&&c.length?h(c[f]).val():e},set:function(a,b){var d=h.makeArray(b);h(a).find("option").each(function(){this.selected=0<=h.inArray(h(this).val(),d)});d.length||(a.selectedIndex=
-1);return d}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,b,d,e){var c,g,i=a.nodeType;if(!a||3===i||8===i||2===i)return f;if(e&&b in h.attrFn)return h(a)[b](d);if(!("getAttribute"in a))return h.prop(a,b,d);if(e=1!==i||!h.isXMLDoc(a))b=b.toLowerCase(),g=h.attrHooks[b]||(F.test(b)?Y:G);if(d!==f){if(null===d)return h.removeAttr(a,b),f;if(g&&"set"in g&&e&&(c=g.set(a,d,b))!==f)return c;a.setAttribute(b,""+d);return d}if(g&&"get"in g&&e&&null!==(c=g.get(a,
b)))return c;c=a.getAttribute(b);return null===c?f:c},removeAttr:function(a,b){var d,f,e,c,g=0;if(1===a.nodeType){f=(b||"").split(L);for(c=f.length;g<c;g++)e=f[g].toLowerCase(),d=h.propFix[e]||e,h.attr(a,e,""),a.removeAttribute(H?e:d),F.test(e)&&d in a&&(a[d]=!1)}},attrHooks:{type:{set:function(a,b){if(x.test(a.nodeName)&&a.parentNode)h.error("type property can't be changed");else if(!h.support.radioValue&&"radio"===b&&h.nodeName(a,"input")){var d=a.value;a.setAttribute("type",b);d&&(a.value=d);return b}}},
value:{get:function(a,b){return G&&h.nodeName(a,"button")?G.get(a,b):b in a?a.value:null},set:function(a,b,d){if(G&&h.nodeName(a,"button"))return G.set(a,b,d);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,b,d){var e,c,g=a.nodeType;if(!a||3===g||8===
g||2===g)return f;if(1!==g||!h.isXMLDoc(a))b=h.propFix[b]||b,c=h.propHooks[b];return d!==f?c&&"set"in c&&(e=c.set(a,d,b))!==f?e:a[b]=d:c&&"get"in c&&null!==(e=c.get(a,b))?e:a[b]},propHooks:{tabIndex:{get:function(a){var b=a.getAttributeNode("tabindex");return b&&b.specified?parseInt(b.value,10):I.test(a.nodeName)||E.test(a.nodeName)&&a.href?0:f}}}});h.attrHooks.tabindex=h.propHooks.tabIndex;Y={get:function(a,b){var d,e=h.prop(a,b);return!0===e||"boolean"!==typeof e&&(d=a.getAttributeNode(b))&&!1!==
d.nodeValue?b.toLowerCase():f},set:function(a,b,d){!1===b?h.removeAttr(a,d):(b=h.propFix[d]||d,b in a&&(a[b]=!0),a.setAttribute(d,d.toLowerCase()));return d}};H||(U={name:!0,id:!0},G=h.valHooks.button={get:function(a,b){var d;return(d=a.getAttributeNode(b))&&(U[b]?""!==d.nodeValue:d.specified)?d.nodeValue:f},set:function(a,b,d){var f=a.getAttributeNode(d);f||(f=r.createAttribute(d),a.setAttributeNode(f));return f.nodeValue=b+""}},h.attrHooks.tabindex.set=G.set,h.each(["width","height"],function(a,
b){h.attrHooks[b]=h.extend(h.attrHooks[b],{set:function(a,d){if(""===d)return a.setAttribute(b,"auto"),d}})}),h.attrHooks.contenteditable={get:G.get,set:function(a,b,d){""===b&&(b="false");G.set(a,b,d)}});h.support.hrefNormalized||h.each(["href","src","width","height"],function(a,b){h.attrHooks[b]=h.extend(h.attrHooks[b],{get:function(a){a=a.getAttribute(b,2);return null===a?f:a}})});h.support.style||(h.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||f},set:function(a,b){return a.style.cssText=
""+b}});h.support.optSelected||(h.propHooks.selected=h.extend(h.propHooks.selected,{get:function(a){if(a=a.parentNode)a.selectedIndex,a.parentNode&&a.parentNode.selectedIndex;return null}}));h.support.enctype||(h.propFix.enctype="encoding");h.support.checkOn||h.each(["radio","checkbox"],function(){h.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}});h.each(["radio","checkbox"],function(){h.valHooks[this]=h.extend(h.valHooks[this],{set:function(a,b){if(h.isArray(b))return a.checked=
0<=h.inArray(h(a).val(),b)}})});var va=/^(?:textarea|input|select)$/i,wa=/^([^\.]*)?(?:\.(.+))?$/,ga=/\bhover(\.\S+)?/,ea=/^key/,ca=/^(?:mouse|contextmenu)|click/,ja=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,S=function(a){if(a=ja.exec(a))a[1]=(a[1]||"").toLowerCase(),a[3]=a[3]&&RegExp("(?:^|\\s)"+a[3]+"(?:\\s|$)");return a},ba=function(a){return h.event.special.hover?a:a.replace(ga,"mouseenter$1 mouseleave$1")};h.event={add:function(a,b,d,e,c){var g,i,j,k,l,p,m,n,q;if(!(3===a.nodeType||8===a.nodeType||
!b||!d||!(g=h._data(a)))){d.handler&&(m=d,d=m.handler);d.guid||(d.guid=h.guid++);j=g.events;j||(g.events=j={});i=g.handle;i||(g.handle=i=function(a){return"undefined"!==typeof h&&(!a||h.event.triggered!==a.type)?h.event.dispatch.apply(i.elem,arguments):f},i.elem=a);b=ba(b).split(" ");for(g=0;g<b.length;g++){k=wa.exec(b[g])||[];l=k[1];p=(k[2]||"").split(".").sort();q=h.event.special[l]||{};l=(c?q.delegateType:q.bindType)||l;q=h.event.special[l]||{};k=h.extend({type:l,origType:k[1],data:e,handler:d,
guid:d.guid,selector:c,namespace:p.join(".")},m);c&&(k.quick=S(c),!k.quick&&h.expr.match.POS.test(c)&&(k.isPositional=!0));n=j[l];if(!n&&(n=j[l]=[],n.delegateCount=0,!q.setup||!1===q.setup.call(a,e,p,i)))a.addEventListener?a.addEventListener(l,i,!1):a.attachEvent&&a.attachEvent("on"+l,i);q.add&&(q.add.call(a,k),k.handler.guid||(k.handler.guid=d.guid));c?n.splice(n.delegateCount++,0,k):n.push(k);h.event.global[l]=!0}a=null}},global:{},remove:function(a,b,d,f){var e=h.hasData(a)&&h._data(a),c,g,i,j,
k,l,p,m,n;if(e&&(l=e.events)){b=ba(b||"").split(" ");for(c=0;c<b.length;c++){g=wa.exec(b[c])||[];i=g[1];g=g[2];if(!i){g=g?"."+g:"";for(k in l)h.event.remove(a,k+g,d,f);return}p=h.event.special[i]||{};i=(f?p.delegateType:p.bindType)||i;m=l[i]||[];j=m.length;g=g?RegExp("(^|\\.)"+g.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;if(d||g||f||p.remove)for(k=0;k<m.length;k++){if(n=m[k],!d||d.guid===n.guid)if(!g||g.test(n.namespace))if(!f||f===n.selector||"**"===f&&n.selector)m.splice(k--,1),n.selector&&
m.delegateCount--,p.remove&&p.remove.call(a,n)}else m.length=0;0===m.length&&j!==m.length&&((!p.teardown||!1===p.teardown.call(a,g))&&h.removeEvent(a,i,e.handle),delete l[i])}if(h.isEmptyObject(l)){if(b=e.handle)b.elem=null;h.removeData(a,["events","handle"],!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(b,d,e,c){if(!e||!(3===e.nodeType||8===e.nodeType)){var g=b.type||b,i=[],j,k,l,p;0<=g.indexOf("!")&&(g=g.slice(0,-1),j=!0);0<=g.indexOf(".")&&(i=g.split("."),g=i.shift(),
i.sort());if(e&&!h.event.customEvent[g]||h.event.global[g])if(b="object"===typeof b?b[h.expando]?b:new h.Event(g,b):new h.Event(g),b.type=g,b.isTrigger=!0,b.exclusive=j,b.namespace=i.join("."),b.namespace_re=b.namespace?RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,i=0>g.indexOf(":")?"on"+g:"",(c||!e)&&b.preventDefault(),e){if(b.result=f,b.target||(b.target=e),d=null!=d?h.makeArray(d):[],d.unshift(b),j=h.event.special[g]||{},!(j.trigger&&!1===j.trigger.apply(e,d))){p=[[e,j.bindType||g]];
if(!c&&!j.noBubble&&!h.isWindow(e)){l=j.delegateType||g;k=null;for(c=e.parentNode;c;c=c.parentNode)p.push([c,l]),k=c;k&&k===e.ownerDocument&&p.push([k.defaultView||k.parentWindow||a,l])}for(k=0;k<p.length&&!(c=p[k][0],b.type=p[k][1],(l=(h._data(c,"events")||{})[b.type]&&h._data(c,"handle"))&&l.apply(c,d),(l=i&&c[i])&&h.acceptData(c)&&l.apply(c,d),b.isPropagationStopped());k++);b.type=g;if(!b.isDefaultPrevented()&&(!j._default||!1===j._default.apply(e.ownerDocument,d))&&!("click"===g&&h.nodeName(e,
"a"))&&h.acceptData(e))if(i&&e[g]&&("focus"!==g&&"blur"!==g||0!==b.target.offsetWidth)&&!h.isWindow(e))(k=e[i])&&(e[i]=null),h.event.triggered=g,e[g](),h.event.triggered=f,k&&(e[i]=k);return b.result}}else for(k in e=h.cache,e)e[k].events&&e[k].events[g]&&h.event.trigger(b,d,e[k].handle.elem,!0)}},dispatch:function(b){var b=h.event.fix(b||a.event),d=(h._data(this,"events")||{})[b.type]||[],e=d.delegateCount,c=[].slice.call(arguments,0),g=!b.exclusive&&!b.namespace,i=(h.event.special[b.type]||{}).handle,
j=[],k,l,p,m,n,q,D;c[0]=b;b.delegateTarget=this;if(e&&!b.target.disabled&&!(b.button&&"click"===b.type))for(l=b.target;l!=this;l=l.parentNode||this){m={};n=[];for(k=0;k<e;k++)p=d[k],q=p.selector,D=m[q],p.isPositional?D=0<=(D||(m[q]=h(q))).index(l):D===f&&(D=m[q]=p.quick?(!p.quick[1]||l.nodeName.toLowerCase()===p.quick[1])&&(!p.quick[2]||l.id===p.quick[2])&&(!p.quick[3]||p.quick[3].test(l.className)):h(l).is(q)),D&&n.push(p);n.length&&j.push({elem:l,matches:n})}d.length>e&&j.push({elem:this,matches:d.slice(e)});
for(k=0;k<j.length&&!b.isPropagationStopped();k++){e=j[k];b.currentTarget=e.elem;for(d=0;d<e.matches.length&&!b.isImmediatePropagationStopped();d++)if(p=e.matches[d],g||!b.namespace&&!p.namespace||b.namespace_re&&b.namespace_re.test(p.namespace))b.data=p.data,b.handleObj=p,p=(i||p.handler).apply(e.elem,c),p!==f&&(b.result=p,!1===p&&(b.preventDefault(),b.stopPropagation()))}return b.result},props:"attrChange,attrName,relatedNode,srcElement,altKey,bubbles,cancelable,ctrlKey,currentTarget,eventPhase,metaKey,relatedTarget,shiftKey,target,timeStamp,view,which".split(","),
fixHooks:{},keyHooks:{props:["char","charCode","key","keyCode"],filter:function(a,b){null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button,buttons,clientX,clientY,fromElement,offsetX,offsetY,pageX,pageY,screenX,screenY,toElement,wheelDelta".split(","),filter:function(a,b){var d,e,c=b.button,g=b.fromElement;null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||r,e=d.documentElement,d=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||d&&d.scrollLeft||0)-(e&&
e.clientLeft||d&&d.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||d&&d.scrollTop||0)-(e&&e.clientTop||d&&d.clientTop||0));!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g);!a.which&&c!==f&&(a.which=c&1?1:c&2?3:c&4?2:0);return a}},fix:function(a){if(a[h.expando])return a;var b,d,e=a,c=h.event.fixHooks[a.type]||{},g=c.props?this.props.concat(c.props):this.props,a=h.Event(e);for(b=g.length;b;)d=g[--b],a[d]=e[d];a.target||(a.target=e.srcElement||r);3===a.target.nodeType&&(a.target=
a.target.parentNode);a.metaKey===f&&(a.metaKey=a.ctrlKey);return c.filter?c.filter(a,e):a},special:{ready:{setup:h.bindReady},focus:{delegateType:"focusin",noBubble:!0},blur:{delegateType:"focusout",noBubble:!0},beforeunload:{setup:function(a,b,d){h.isWindow(this)&&(this.onbeforeunload=d)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,d,e){a=h.extend(new h.Event,d,{type:a,isSimulated:!0,originalEvent:{}});e?h.event.trigger(a,null,b):h.event.dispatch.call(b,
a);a.isDefaultPrevented()&&d.preventDefault()}};h.event.handle=h.event.dispatch;h.removeEvent=r.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,!1)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};h.Event=function(a,b){if(!(this instanceof h.Event))return new h.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||!1===a.returnValue||a.getPreventDefault&&a.getPreventDefault()?i:d):this.type=a;b&&h.extend(this,
b);this.timeStamp=a&&a.timeStamp||h.now();this[h.expando]=!0};h.Event.prototype={preventDefault:function(){this.isDefaultPrevented=i;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=i;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i;this.stopPropagation()},isDefaultPrevented:d,isPropagationStopped:d,
isImmediatePropagationStopped:d};h.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){h.event.special[a]=h.event.special[b]={delegateType:b,bindType:b,handle:function(a){var b=a.relatedTarget,d=a.handleObj,e;if(!b||d.origType===a.type||b!==this&&!h.contains(this,b))b=a.type,a.type=d.origType,e=d.handler.apply(this,arguments),a.type=b;return e}}});h.support.submitBubbles||(h.event.special.submit={setup:function(){if(h.nodeName(this,"form"))return!1;h.event.add(this,"click._submit keypress._submit",
function(a){a=a.target;if((a=h.nodeName(a,"input")||h.nodeName(a,"button")?a.form:f)&&!a._submit_attached)h.event.add(a,"submit._submit",function(a){this.parentNode&&h.event.simulate("submit",this.parentNode,a,!0)}),a._submit_attached=!0})},teardown:function(){if(h.nodeName(this,"form"))return!1;h.event.remove(this,"._submit")}});h.support.changeBubbles||(h.event.special.change={setup:function(){if(va.test(this.nodeName)){if("checkbox"===this.type||"radio"===this.type)h.event.add(this,"propertychange._change",
function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),h.event.add(this,"click._change",function(a){this._just_changed&&(this._just_changed=!1,h.event.simulate("change",this,a,!0))});return!1}h.event.add(this,"beforeactivate._change",function(a){a=a.target;va.test(a.nodeName)&&!a._change_attached&&(h.event.add(a,"change._change",function(a){this.parentNode&&!a.isSimulated&&h.event.simulate("change",this.parentNode,a,!0)}),a._change_attached=!0)})},handle:function(a){var b=
a.target;if(this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type)return a.handleObj.handler.apply(this,arguments)},teardown:function(){h.event.remove(this,"._change");return va.test(this.nodeName)}});h.support.focusinBubbles||h.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){h.event.simulate(b,a.target,h.event.fix(a),!0)};h.event.special[b]={setup:function(){0===d++&&r.addEventListener(a,e,!0)},teardown:function(){0===--d&&r.removeEventListener(a,
e,!0)}}});h.fn.extend({on:function(a,b,e,c,g){var i,j;if("object"===typeof a){"string"!==typeof b&&(e=b,b=f);for(j in a)this.on(j,b,e,a[j],g);return this}null==e&&null==c?(c=b,e=b=f):null==c&&("string"===typeof b?(c=e,e=f):(c=e,e=b,b=f));if(!1===c)c=d;else if(!c)return this;1===g&&(i=c,c=function(a){h().off(a);return i.apply(this,arguments)},c.guid=i.guid||(i.guid=h.guid++));return this.each(function(){h.event.add(this,a,c,e,b)})},one:function(a,b,d,e){return this.on.call(this,a,b,d,e,1)},off:function(a,
b,e){if(a&&a.preventDefault&&a.handleObj){var c=a.handleObj;h(a.delegateTarget).off(c.namespace?c.type+"."+c.namespace:c.type,c.selector,c.handler);return this}if("object"===typeof a){for(c in a)this.off(c,b,a[c]);return this}if(!1===b||"function"===typeof b)e=b,b=f;!1===e&&(e=d);return this.each(function(){h.event.remove(this,a,e,b)})},bind:function(a,b,d){return this.on(a,null,b,d)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,d){h(this.context).on(a,this.selector,b,d);return this},
die:function(a,b){h(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,d,e){return this.on(b,a,d,e)},undelegate:function(a,b,d){return 1==arguments.length?this.off(a,"**"):this.off(b,a,d)},trigger:function(a,b){return this.each(function(){h.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return h.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,d=a.guid||h.guid++,e=0,f=function(d){var f=(h._data(this,"lastToggle"+a.guid)||0)%e;h._data(this,
"lastToggle"+a.guid,f+1);d.preventDefault();return b[f].apply(this,arguments)||!1};for(f.guid=d;e<b.length;)b[e++].guid=d;return this.click(f)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});h.each("blur,focus,focusin,focusout,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error,contextmenu".split(","),function(a,b){h.fn[b]=function(a,d){null==d&&(d=a,a=null);return 0<arguments.length?
this.bind(b,a,d):this.trigger(b)};h.attrFn&&(h.attrFn[b]=!0);ea.test(b)&&(h.event.fixHooks[b]=h.event.keyHooks);ca.test(b)&&(h.event.fixHooks[b]=h.event.mouseHooks)});(function(){function a(b,d,f,c,g,h){for(var g=0,i=c.length;g<i;g++){var j=c[g];if(j){for(var k=!1,j=j[b];j;){if(j[e]===f){k=c[j.sizset];break}1===j.nodeType&&!h&&(j[e]=f,j.sizset=g);if(j.nodeName.toLowerCase()===d){k=j;break}j=j[b]}c[g]=k}}}function b(a,d,f,c,g,h){for(var g=0,i=c.length;g<i;g++){var j=c[g];if(j){for(var k=!1,j=j[a];j;){if(j[e]===
f){k=c[j.sizset];break}if(1===j.nodeType)if(h||(j[e]=f,j.sizset=g),"string"!==typeof d){if(j===d){k=!0;break}}else if(0<m.filter(d,[j]).length){k=j;break}j=j[a]}c[g]=k}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e="sizcache"+(Math.random()+"").replace(".",""),c=0,g=Object.prototype.toString,i=!1,j=!0,k=/\\/g,l=/\r\n/g,p=/\W/;[0,0].sort(function(){j=!1;return 0});var m=function(a,b,e,f){var e=e||[],c=
b=b||r;if(1!==b.nodeType&&9!==b.nodeType)return[];if(!a||"string"!==typeof a)return e;var h,i,j,k,l,p=!0,M=m.isXML(b),n=[],da=a;do if(d.exec(""),h=d.exec(da))if(da=h[3],n.push(h[1]),h[2]){k=h[3];break}while(h);if(1<n.length&&D.exec(a))if(2===n.length&&q.relative[n[0]])i=z(n[0]+n[1],b,f);else for(i=q.relative[n[0]]?[b]:m(n.shift(),b);n.length;)a=n.shift(),q.relative[a]&&(a+=n.shift()),i=z(a,i,f);else if(!f&&1<n.length&&9===b.nodeType&&!M&&q.match.ID.test(n[0])&&!q.match.ID.test(n[n.length-1])&&(h=
m.find(n.shift(),b,M),b=h.expr?m.filter(h.expr,h.set)[0]:h.set[0]),b){h=f?{expr:n.pop(),set:u(f)}:m.find(n.pop(),1===n.length&&("~"===n[0]||"+"===n[0])&&b.parentNode?b.parentNode:b,M);i=h.expr?m.filter(h.expr,h.set):h.set;for(0<n.length?j=u(i):p=!1;n.length;)h=l=n.pop(),q.relative[l]?h=n.pop():l="",null==h&&(h=b),q.relative[l](j,h,M)}else j=[];j||(j=i);j||m.error(l||a);if("[object Array]"===g.call(j))if(p)if(b&&1===b.nodeType)for(a=0;null!=j[a];a++)j[a]&&(!0===j[a]||1===j[a].nodeType&&m.contains(b,
j[a]))&&e.push(i[a]);else for(a=0;null!=j[a];a++)j[a]&&1===j[a].nodeType&&e.push(i[a]);else e.push.apply(e,j);else u(j,e);k&&(m(k,c,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(v&&(i=j,a.sort(v),i))for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1);return a};m.matches=function(a,b){return m(a,null,null,b)};m.matchesSelector=function(a,b){return 0<m(b,null,null,[a]).length};m.find=function(a,b,d){var e,f,c,g,h,i;if(!a)return[];for(f=0,c=q.order.length;f<c;f++)if(h=q.order[f],
g=q.leftMatch[h].exec(a))if(i=g[1],g.splice(1,1),"\\"!==i.substr(i.length-1)&&(g[1]=(g[1]||"").replace(k,""),e=q.find[h](g,b,d),null!=e)){a=a.replace(q.match[h],"");break}e||(e="undefined"!==typeof b.getElementsByTagName?b.getElementsByTagName("*"):[]);return{set:e,expr:a}};m.filter=function(a,b,d,e){for(var c,g,h,i,j,k,l,p,M=a,n=[],da=b,D=b&&b[0]&&m.isXML(b[0]);a&&b.length;){for(h in q.filter)if(null!=(c=q.leftMatch[h].exec(a))&&c[2])if(k=q.filter[h],j=c[1],g=!1,c.splice(1,1),"\\"!==j.substr(j.length-
1)){da===n&&(n=[]);if(q.preFilter[h])if(c=q.preFilter[h](c,da,d,n,e,D)){if(!0===c)continue}else g=i=!0;if(c)for(l=0;null!=(j=da[l]);l++)j&&(i=k(j,c,l,da),p=e^i,d&&null!=i?p?g=!0:da[l]=!1:p&&(n.push(j),g=!0));if(i!==f){d||(da=n);a=a.replace(q.match[h],"");if(!g)return[];break}}if(a===M)if(null==g)m.error(a);else break;M=a}return da};m.error=function(a){throw"Syntax error, unrecognized expression: "+a;};var n=m.getText=function(a){var b,d;b=a.nodeType;var e="";if(b)if(1===b){if("string"===typeof a.textContent)return a.textContent;
if("string"===typeof a.innerText)return a.innerText.replace(l,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else{if(3===b||4===b)return a.nodeValue}else for(b=0;d=a[b];b++)8!==d.nodeType&&(e+=n(d));return e},q=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var d=
"string"===typeof b,e=d&&!p.test(b),d=d&&!e;e&&(b=b.toLowerCase());for(var e=0,f=a.length,c;e<f;e++)if(c=a[e]){for(;(c=c.previousSibling)&&1!==c.nodeType;);a[e]=d||c&&c.nodeName.toLowerCase()===b?c||!1:c===b}d&&m.filter(b,a,!0)},">":function(a,b){var d,e="string"===typeof b,f=0,c=a.length;if(e&&!p.test(b))for(b=b.toLowerCase();f<c;f++){if(d=a[f])d=d.parentNode,a[f]=d.nodeName.toLowerCase()===b?d:!1}else{for(;f<c;f++)(d=a[f])&&(a[f]=e?d.parentNode:d.parentNode===b);e&&m.filter(b,a,!0)}},"":function(d,
e,f){var g,h=c++,i=b;"string"===typeof e&&!p.test(e)&&(g=e=e.toLowerCase(),i=a);i("parentNode",e,h,d,g,f)},"~":function(d,e,f){var g,h=c++,i=b;"string"===typeof e&&!p.test(e)&&(g=e=e.toLowerCase(),i=a);i("previousSibling",e,h,d,g,f)}},find:{ID:function(a,b,d){if("undefined"!==typeof b.getElementById&&!d)return(a=b.getElementById(a[1]))&&a.parentNode?[a]:[]},NAME:function(a,b){if("undefined"!==typeof b.getElementsByName){for(var d=[],e=b.getElementsByName(a[1]),f=0,c=e.length;f<c;f++)e[f].getAttribute("name")===
a[1]&&d.push(e[f]);return 0===d.length?null:d}},TAG:function(a,b){if("undefined"!==typeof b.getElementsByTagName)return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,d,e,f,c){a=" "+a[1].replace(k,"")+" ";if(c)return a;for(var c=0,g;null!=(g=b[c]);c++)g&&(f^(g.className&&0<=(" "+g.className+" ").replace(/[\t\n\r]/g," ").indexOf(a))?d||e.push(g):d&&(b[c]=!1));return!1},ID:function(a){return a[1].replace(k,"")},TAG:function(a){return a[1].replace(k,"").toLowerCase()},CHILD:function(a){if("nth"===
a[1]){a[2]||m.error(a[0]);a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===a[2]&&"2n"||"odd"===a[2]&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0;a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=c++;return a},ATTR:function(a,b,d,e,f,c){b=a[1]=a[1].replace(k,"");!c&&q.attrMap[b]&&(a[1]=q.attrMap[b]);a[4]=(a[4]||a[5]||"").replace(k,"");"~="===a[2]&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(a,b,e,f,c){if("not"===a[1])if(1<(d.exec(a[3])||"").length||
/^\w/.test(a[3]))a[3]=m(a[3],null,null,b);else return a=m.filter(a[3],b,e,1^c),e||f.push.apply(f,a),!1;else if(q.match.POS.test(a[0])||q.match.CHILD.test(a[0]))return!0;return a},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return!1===a.disabled&&"hidden"!==a.type},disabled:function(a){return!0===a.disabled},checked:function(a){return!0===a.checked},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return!0===a.selected},parent:function(a){return!!a.firstChild},
empty:function(a){return!a.firstChild},has:function(a,b,d){return!!m(d[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),d=a.type;return"input"===a.nodeName.toLowerCase()&&"text"===d&&(b===d||null===b)},radio:function(a){return"input"===a.nodeName.toLowerCase()&&"radio"===a.type},checkbox:function(a){return"input"===a.nodeName.toLowerCase()&&"checkbox"===a.type},file:function(a){return"input"===a.nodeName.toLowerCase()&&"file"===a.type},
password:function(a){return"input"===a.nodeName.toLowerCase()&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return("input"===b||"button"===b)&&"submit"===a.type},image:function(a){return"input"===a.nodeName.toLowerCase()&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return("input"===b||"button"===b)&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},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 0===b},last:function(a,b,d,e){return b===e.length-1},even:function(a,b){return 0===b%2},odd:function(a,b){return 1===b%2},lt:function(a,b,d){return b<d[3]-0},gt:function(a,b,d){return b>d[3]-0},nth:function(a,b,d){return d[3]-0===b},eq:function(a,b,d){return d[3]-0===b}},filter:{PSEUDO:function(a,b,d,e){var f=b[1],c=q.filters[f];if(c)return c(a,d,b,e);if("contains"===f)return 0<=(a.textContent||a.innerText||
n([a])||"").indexOf(b[3]);if("not"===f){b=b[3];d=0;for(e=b.length;d<e;d++)if(b[d]===a)return!1;return!0}m.error(f)},CHILD:function(a,b){var d,f,c,g,h,i;d=b[1];i=a;switch(d){case "only":case "first":for(;i=i.previousSibling;)if(1===i.nodeType)return!1;if("first"===d)return!0;i=a;case "last":for(;i=i.nextSibling;)if(1===i.nodeType)return!1;return!0;case "nth":d=b[2];f=b[3];if(1===d&&0===f)return!0;c=b[0];if((g=a.parentNode)&&(g[e]!==c||!a.nodeIndex)){h=0;for(i=g.firstChild;i;i=i.nextSibling)1===i.nodeType&&
(i.nodeIndex=++h);g[e]=c}i=a.nodeIndex-f;return 0===d?0===i:0===i%d&&0<=i/d}},ID:function(a,b){return 1===a.nodeType&&a.getAttribute("id")===b},TAG:function(a,b){return"*"===b&&1===a.nodeType||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return-1<(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)},ATTR:function(a,b){var d=b[1],d=m.attr?m.attr(a,d):q.attrHandle[d]?q.attrHandle[d](a):null!=a[d]?a[d]:a.getAttribute(d),e=d+"",f=b[2],c=b[4];return null==d?"!="===f:!f&&m.attr?
null!=d:"="===f?e===c:"*="===f?0<=e.indexOf(c):"~="===f?0<=(" "+e+" ").indexOf(c):!c?e&&!1!==d:"!="===f?e!==c:"^="===f?0===e.indexOf(c):"$="===f?e.substr(e.length-c.length)===c:"|="===f?e===c||e.substr(0,c.length+1)===c+"-":!1},POS:function(a,b,d,e){var f=q.setFilters[b[2]];if(f)return f(a,d,b,e)}}},D=q.match.POS,o=function(a,b){return"\\"+(b-0+1)},y;for(y in q.match)q.match[y]=RegExp(q.match[y].source+/(?![^\[]*\])(?![^\(]*\))/.source),q.leftMatch[y]=RegExp(/(^(?:.|\r|\n)*?)/.source+q.match[y].source.replace(/\\(\d+)/g,
o));var u=function(a,b){a=Array.prototype.slice.call(a,0);return b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(r.documentElement.childNodes,0)[0].nodeType}catch(K){u=function(a,b){var d=0,e=b||[];if("[object Array]"===g.call(a))Array.prototype.push.apply(e,a);else if("number"===typeof a.length)for(var f=a.length;d<f;d++)e.push(a[d]);else for(;a[d];d++)e.push(a[d]);return e}}var v,s;r.documentElement.compareDocumentPosition?v=function(a,b){return a===b?(i=!0,0):!a.compareDocumentPosition||
!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:(v=function(a,b){if(a===b)return i=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var d,e,f=[],c=[];d=a.parentNode;e=b.parentNode;var g=d;if(d===e)return s(a,b);if(d){if(!e)return 1}else return-1;for(;g;)f.unshift(g),g=g.parentNode;for(g=e;g;)c.unshift(g),g=g.parentNode;d=f.length;e=c.length;for(g=0;g<d&&g<e;g++)if(f[g]!==c[g])return s(f[g],c[g]);return g===d?s(a,c[g],-1):s(f[g],
b,1)},s=function(a,b,d){if(a===b)return d;for(a=a.nextSibling;a;){if(a===b)return-1;a=a.nextSibling}return 1});(function(){var a=r.createElement("div"),b="script"+(new Date).getTime(),d=r.documentElement;a.innerHTML="<a name='"+b+"'/>";d.insertBefore(a,d.firstChild);r.getElementById(b)&&(q.find.ID=function(a,b,d){if("undefined"!==typeof b.getElementById&&!d)return(b=b.getElementById(a[1]))?b.id===a[1]||"undefined"!==typeof b.getAttributeNode&&b.getAttributeNode("id").nodeValue===a[1]?[b]:f:[]},q.filter.ID=
function(a,b){var d="undefined"!==typeof a.getAttributeNode&&a.getAttributeNode("id");return 1===a.nodeType&&d&&d.nodeValue===b});d.removeChild(a);d=a=null})();(function(){var a=r.createElement("div");a.appendChild(r.createComment(""));0<a.getElementsByTagName("*").length&&(q.find.TAG=function(a,b){var d=b.getElementsByTagName(a[1]);if("*"===a[1]){for(var e=[],f=0;d[f];f++)1===d[f].nodeType&&e.push(d[f]);d=e}return d});a.innerHTML="<a href='#'></a>";a.firstChild&&"undefined"!==typeof a.firstChild.getAttribute&&
"#"!==a.firstChild.getAttribute("href")&&(q.attrHandle.href=function(a){return a.getAttribute("href",2)});a=null})();r.querySelectorAll&&function(){var a=m,b=r.createElement("div");b.innerHTML="<p class='TEST'></p>";if(!(b.querySelectorAll&&0===b.querySelectorAll(".TEST").length)){m=function(b,d,e,f){d=d||r;if(!f&&!m.isXML(d)){var c=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(c&&(1===d.nodeType||9===d.nodeType)){if(c[1])return u(d.getElementsByTagName(b),e);if(c[2]&&q.find.CLASS&&d.getElementsByClassName)return u(d.getElementsByClassName(c[2]),
e)}if(9===d.nodeType){if("body"===b&&d.body)return u([d.body],e);if(c&&c[3]){var g=d.getElementById(c[3]);if(g&&g.parentNode){if(g.id===c[3])return u([g],e)}else return u([],e)}try{return u(d.querySelectorAll(b),e)}catch(h){}}else if(1===d.nodeType&&"object"!==d.nodeName.toLowerCase()){var c=d,i=(g=d.getAttribute("id"))||"__sizzle__",j=d.parentNode,k=/^\s*[+~]/.test(b);g?i=i.replace(/'/g,"\\$&"):d.setAttribute("id",i);k&&j&&(d=d.parentNode);try{if(!k||j)return u(d.querySelectorAll("[id='"+i+"'] "+
b),e)}catch(l){}finally{g||c.removeAttribute("id")}}}return a(b,d,e,f)};for(var d in a)m[d]=a[d];b=null}}();(function(){var a=r.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(r.createElement("div"),"div"),e=!1;try{b.call(r.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,f){f=f.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!q.match.PSEUDO.test(f)&&!/!=/.test(f)){var c=b.call(a,
f);if(c||!d||a.document&&11!==a.document.nodeType)return c}}catch(g){}return 0<m(f,null,null,[a]).length}}})();(function(){var a=r.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";a.getElementsByClassName&&0!==a.getElementsByClassName("e").length&&(a.lastChild.className="e",1!==a.getElementsByClassName("e").length&&(q.order.splice(1,0,"CLASS"),q.find.CLASS=function(a,b,d){if("undefined"!==typeof b.getElementsByClassName&&!d)return b.getElementsByClassName(a[1])},
a=null))})();m.contains=r.documentElement.contains?function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:r.documentElement.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:function(){return!1};m.isXML=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?"HTML"!==a.nodeName:!1};var z=function(a,b,d){for(var e,f=[],c="",b=b.nodeType?[b]:b;e=q.match.PSEUDO.exec(a);)c+=e[0],a=a.replace(q.match.PSEUDO,"");a=q.relative[a]?a+"*":a;e=0;for(var g=b.length;e<g;e++)m(a,
b[e],f,d);return m.filter(c,f)};m.attr=h.attr;m.selectors.attrMap={};h.find=m;h.expr=m.selectors;h.expr[":"]=h.expr.filters;h.unique=m.uniqueSort;h.text=m.getText;h.isXMLDoc=m.isXML;h.contains=m.contains})();var na=/Until$/,T=/^(?:parents|prevUntil|prevAll)/,Ga=/,/,ia=/^.[^:#\[\.,]*$/,La=Array.prototype.slice,ka=h.expr.match.POS,oa={children:!0,contents:!0,next:!0,prev:!0};h.fn.extend({find:function(a){var b=this,d,e;if("string"!==typeof a)return h(a).filter(function(){for(d=0,e=b.length;d<e;d++)if(h.contains(b[d],
this))return!0});var f=this.pushStack("","find",a),c,g,i;for(d=0,e=this.length;d<e;d++)if(c=f.length,h.find(a,this[d],f),0<d)for(g=c;g<f.length;g++)for(i=0;i<c;i++)if(f[i]===f[g]){f.splice(g--,1);break}return f},has:function(a){var b=h(a);return this.filter(function(){for(var a=0,d=b.length;a<d;a++)if(h.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(j(this,a,!1),"not",a)},filter:function(a){return this.pushStack(j(this,a,!0),"filter",a)},is:function(a){return!!a&&("string"===
typeof a?ka.test(a)?0<=h(a,this.context).index(this[0]):0<h.filter(a,this).length:0<this.filter(a).length)},closest:function(a,b){var d=[],e,f,c=this[0];if(h.isArray(a)){for(f=1;c&&c.ownerDocument&&c!==b;){for(e=0;e<a.length;e++)h(c).is(a[e])&&d.push({selector:a[e],elem:c,level:f});c=c.parentNode;f++}return d}var g=ka.test(a)||"string"!==typeof a?h(a,b||this.context):0;for(e=0,f=this.length;e<f;e++)for(c=this[e];c;)if(g?-1<g.index(c):h.find.matchesSelector(c,a)){d.push(c);break}else if(c=c.parentNode,
!c||!c.ownerDocument||c===b||11===c.nodeType)break;d=1<d.length?h.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){return!a?this[0]&&this[0].parentNode?this.prevAll().length:-1:"string"===typeof a?h.inArray(this[0],h(a)):h.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d="string"===typeof a?h(a,b):h.makeArray(a&&a.nodeType?[a]:a),e=h.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||11===d[0].parentNode.nodeType||!e[0]||!e[0].parentNode||11===e[0].parentNode.nodeType?
e:h.unique(e))},andSelf:function(){return this.add(this.prevObject)}});h.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},parents:function(a){return h.dir(a,"parentNode")},parentsUntil:function(a,b,d){return h.dir(a,"parentNode",d)},next:function(a){return h.nth(a,2,"nextSibling")},prev:function(a){return h.nth(a,2,"previousSibling")},nextAll:function(a){return h.dir(a,"nextSibling")},prevAll:function(a){return h.dir(a,"previousSibling")},nextUntil:function(a,b,d){return h.dir(a,
"nextSibling",d)},prevUntil:function(a,b,d){return h.dir(a,"previousSibling",d)},siblings:function(a){return h.sibling(a.parentNode.firstChild,a)},children:function(a){return h.sibling(a.firstChild)},contents:function(a){return h.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:h.makeArray(a.childNodes)}},function(a,b){h.fn[a]=function(d,e){var f=h.map(this,b,d),c=La.call(arguments);na.test(a)||(e=d);e&&"string"===typeof e&&(f=h.filter(e,f));f=1<this.length&&!oa[a]?h.unique(f):f;if((1<
this.length||Ga.test(e))&&T.test(a))f=f.reverse();return this.pushStack(f,a,c.join(","))}});h.extend({filter:function(a,b,d){d&&(a=":not("+a+")");return 1===b.length?h.find.matchesSelector(b[0],a)?[b[0]]:[]:h.find.matches(a,b)},dir:function(a,b,d){for(var e=[],a=a[b];a&&9!==a.nodeType&&(d===f||1!==a.nodeType||!h(a).is(d));)1===a.nodeType&&e.push(a),a=a[b];return e},nth:function(a,b,d){for(var b=b||1,e=0;a&&!(1===a.nodeType&&++e===b);a=a[d]);return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)1===
a.nodeType&&a!==b&&d.push(a);return d}});var ra="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",xa=/ jQuery\d+="(?:\d+|null)"/g,sa=/^\s+/,ha=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,fa=/<([\w:]+)/,pa=/<tbody/i,ya=/<|&#?\w+;/,za=/<(?:script|style)/i,Ha=/<(?:script|object|embed|option|style)/i,Qa=RegExp("<(?:"+ra.replace(" ","|")+")","i"),qa=/checked\s*(?:[^=]|=\s*.checked.)/i,
Ra=/\/(java|ecma)script/i,Ca=/^\s*<!(?:\[CDATA\[|\-\-)/,V={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,"",""]},Ia=l(r);V.optgroup=V.option;V.tbody=V.tfoot=V.colgroup=V.caption=V.thead;V.th=V.td;h.support.htmlSerialize||(V._default=
[1,"div<div>","</div>"]);h.fn.extend({text:function(a){return h.isFunction(a)?this.each(function(b){var d=h(this);d.text(a.call(this,b,d.text()))}):"object"!==typeof a&&a!==f?this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a)):h.text(this)},wrapAll:function(a){if(h.isFunction(a))return this.each(function(b){h(this).wrapAll(a.call(this,b))});if(this[0]){var b=h(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var a=this;a.firstChild&&
1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return h.isFunction(a)?this.each(function(b){h(this).wrapInner(a.call(this,b))}):this.each(function(){var b=h(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){h(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){h.nodeName(this,"body")||h(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,
!0,function(a){1===this.nodeType&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1===this.nodeType&&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=h(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,h(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;null!=(e=this[d]);d++)if(!a||h.filter(a,[e]).length)!b&&1===e.nodeType&&(h.cleanData(e.getElementsByTagName("*")),h.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;null!=(b=this[a]);a++)for(1===b.nodeType&&h.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return h.clone(this,a,b)})},html:function(a){if(a===f)return this[0]&&1===this[0].nodeType?this[0].innerHTML.replace(xa,""):null;if("string"===typeof a&&!za.test(a)&&(h.support.leadingWhitespace||!sa.test(a))&&!V[(fa.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ha,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)1===this[b].nodeType&&(h.cleanData(this[b].getElementsByTagName("*")),this[b].innerHTML=a)}catch(e){this.empty().append(a)}}else h.isFunction(a)?
this.each(function(b){var d=h(this);d.html(a.call(this,b,d.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(h.isFunction(a))return this.each(function(b){var d=h(this),e=d.html();d.replaceWith(a.call(this,b,e))});"string"!==typeof a&&(a=h(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;h(this).remove();b?h(b).before(a):h(d).append(a)})}return this.length?this.pushStack(h(h.isFunction(a)?a():a),"replaceWith",
a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,b,d){var e,c,g,i=a[0],j=[];if(!h.support.checkClone&&3===arguments.length&&"string"===typeof i&&qa.test(i))return this.each(function(){h(this).domManip(a,b,d,!0)});if(h.isFunction(i))return this.each(function(e){var c=h(this);a[0]=i.call(this,e,b?c.html():f);c.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=h.support.parentNode&&e&&11===e.nodeType&&e.childNodes.length===this.length?{fragment:e}:h.buildFragment(a,this,j);g=
e.fragment;if(c=1===g.childNodes.length?g=g.firstChild:g.firstChild){b=b&&h.nodeName(c,"tr");c=0;for(var k=this.length,l=k-1;c<k;c++)d.call(b?h.nodeName(this[c],"table")?this[c].getElementsByTagName("tbody")[0]||this[c].appendChild(this[c].ownerDocument.createElement("tbody")):this[c]:this[c],e.cacheable||1<k&&c<l?h.clone(g,!0,!0):g)}j.length&&h.each(j,y)}return this}});h.buildFragment=function(a,b,d){var e,f,c,g,i=a[0];b&&b[0]&&(g=b[0].ownerDocument||b[0]);g.createDocumentFragment||(g=r);if(1===
a.length&&"string"===typeof i&&512>i.length&&g===r&&"<"===i.charAt(0)&&!Ha.test(i)&&(h.support.checkClone||!qa.test(i))&&!h.support.unknownElems&&Qa.test(i))f=!0,(c=h.fragments[i])&&1!==c&&(e=c);e||(e=g.createDocumentFragment(),h.clean(a,g,e,d));f&&(h.fragments[i]=c?e:1);return{fragment:e,cacheable:f}};h.fragments={};h.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){h.fn[a]=function(d){var e=[],d=h(d),f=1===this.length&&
this[0].parentNode;if(f&&11===f.nodeType&&1===f.childNodes.length&&1===d.length)return d[b](this[0]),this;for(var f=0,c=d.length;f<c;f++){var g=(0<f?this.clone(!0):this).get();h(d[f])[b](g);e=e.concat(g)}return this.pushStack(e,a,d.selector)}});h.extend({clone:function(a,b,d){var e=a.cloneNode(!0),f,c,g;if((!h.support.noCloneEvent||!h.support.noCloneChecked)&&(1===a.nodeType||11===a.nodeType)&&!h.isXMLDoc(a)){m(a,e);f=k(a);c=k(e);for(g=0;f[g];++g)c[g]&&m(f[g],c[g])}if(b&&(n(a,e),d)){f=k(a);c=k(e);
for(g=0;f[g];++g)n(f[g],c[g])}return e},clean:function(a,b,d,e){b=b||r;"undefined"===typeof b.createElement&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||r);for(var f=[],c,g=0,i;null!=(i=a[g]);g++)if("number"===typeof i&&(i+=""),i){if("string"===typeof i)if(ya.test(i)){i=i.replace(ha,"<$1></$2>");c=(fa.exec(i)||["",""])[1].toLowerCase();var j=V[c]||V._default,k=j[0],p=b.createElement("div");b===r?Ia.appendChild(p):l(b).appendChild(p);for(p.innerHTML=j[1]+i+j[2];k--;)p=p.lastChild;if(!h.support.tbody){k=
pa.test(i);j="table"===c&&!k?p.firstChild&&p.firstChild.childNodes:"<table>"===j[1]&&!k?p.childNodes:[];for(c=j.length-1;0<=c;--c)h.nodeName(j[c],"tbody")&&!j[c].childNodes.length&&j[c].parentNode.removeChild(j[c])}!h.support.leadingWhitespace&&sa.test(i)&&p.insertBefore(b.createTextNode(sa.exec(i)[0]),p.firstChild);i=p.childNodes}else i=b.createTextNode(i);var m;if(!h.support.appendChecked)if(i[0]&&"number"===typeof(m=i.length))for(c=0;c<m;c++)q(i[c]);else q(i);i.nodeType?f.push(i):f=h.merge(f,i)}if(d){a=
function(a){return!a.type||Ra.test(a.type)};for(g=0;f[g];g++)e&&h.nodeName(f[g],"script")&&(!f[g].type||"text/javascript"===f[g].type.toLowerCase())?e.push(f[g].parentNode?f[g].parentNode.removeChild(f[g]):f[g]):(1===f[g].nodeType&&(b=h.grep(f[g].getElementsByTagName("script"),a),f.splice.apply(f,[g+1,0].concat(b))),d.appendChild(f[g]))}return f},cleanData:function(a){for(var b,d,e=h.cache,f=h.event.special,c=h.support.deleteExpando,g=0,i;null!=(i=a[g]);g++)if(!i.nodeName||!h.noData[i.nodeName.toLowerCase()])if(d=
i[h.expando]){if((b=e[d])&&b.events){for(var j in b.events)f[j]?h.event.remove(i,j):h.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}c?delete i[h.expando]:i.removeAttribute&&i.removeAttribute(h.expando);delete e[d]}}});var ta=/alpha\([^)]*\)/i,Ma=/opacity=([^)]*)/,Na=/([A-Z]|^ms)/g,X=/^-?\d+(?:px)?$/i,Z=/^-?\d/,ua=/^([\-+])=([\-+.\de]+)/,nb={position:"absolute",visibility:"hidden",display:"block"},jb=["Left","Right"],kb=["Top","Bottom"],Da,ab,bb;h.fn.css=function(a,b){return 2===arguments.length&&
b===f?this:h.access(this,a,b,!0,function(a,b,d){return d!==f?h.style(a,b,d):h.css(a,b)})};h.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=Da(a,"opacity","opacity");return""===d?"1":d}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":h.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(a&&!(3===a.nodeType||8===a.nodeType||!a.style)){var c,g=h.camelCase(b),i=a.style,j=h.cssHooks[g],
b=h.cssProps[g]||g;if(d!==f){e=typeof d;if("string"===e&&(c=ua.exec(d)))d=+(c[1]+1)*+c[2]+parseFloat(h.css(a,b)),e="number";if(!(null==d||"number"===e&&isNaN(d)))if("number"===e&&!h.cssNumber[g]&&(d+="px"),!j||!("set"in j)||(d=j.set(a,d))!==f)try{i[b]=d}catch(k){}}else return j&&"get"in j&&(c=j.get(a,!1,e))!==f?c:i[b]}},css:function(a,b,d){var e,c,b=h.camelCase(b);c=h.cssHooks[b];b=h.cssProps[b]||b;"cssFloat"===b&&(b="float");if(c&&"get"in c&&(e=c.get(a,!0,d))!==f)return e;if(Da)return Da(a,b)},swap:function(a,
b,d){var e={},f;for(f in b)e[f]=a.style[f],a.style[f]=b[f];d.call(a);for(f in b)a.style[f]=e[f]}});h.curCSS=h.css;h.each(["height","width"],function(a,b){h.cssHooks[b]={get:function(a,d,e){var f;if(d){if(0!==a.offsetWidth)return u(a,b,e);h.swap(a,nb,function(){f=u(a,b,e)});return f}},set:function(a,b){if(X.test(b)){if(b=parseFloat(b),0<=b)return b+"px"}else return b}}});h.support.opacity||(h.cssHooks.opacity={get:function(a,b){return Ma.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||
"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style,e=a.currentStyle,f=h.isNumeric(b)?"alpha(opacity="+100*b+")":"",c=e&&e.filter||d.filter||"";d.zoom=1;if(1<=b&&""===h.trim(c.replace(ta,""))&&(d.removeAttribute("filter"),e&&!e.filter))return;d.filter=ta.test(c)?c.replace(ta,f):c+" "+f}});h(function(){h.support.reliableMarginRight||(h.cssHooks.marginRight={get:function(a,b){var d;h.swap(a,{display:"inline-block"},function(){d=b?Da(a,"margin-right","marginRight"):a.style.marginRight});
return d}})});r.defaultView&&r.defaultView.getComputedStyle&&(ab=function(a,b){var d,e,b=b.replace(Na,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return f;if(e=e.getComputedStyle(a,null))d=e.getPropertyValue(b),""===d&&!h.contains(a.ownerDocument.documentElement,a)&&(d=h.style(a,b));return d});r.documentElement.currentStyle&&(bb=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],c=a.style;if(null===f&&c&&(d=c[b]))f=d;if(!X.test(f)&&Z.test(f)){d=c.left;if(e=a.runtimeStyle&&a.runtimeStyle.left)a.runtimeStyle.left=
a.currentStyle.left;c.left="fontSize"===b?"1em":f||0;f=c.pixelLeft+"px";c.left=d;e&&(a.runtimeStyle.left=e)}return""===f?"auto":f});Da=ab||bb;h.expr&&h.expr.filters&&(h.expr.filters.hidden=function(a){var b=a.offsetHeight;return 0===a.offsetWidth&&0===b||!h.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||h.css(a,"display"))},h.expr.filters.visible=function(a){return!h.expr.filters.hidden(a)});var ob=/%20/g,lb=/\[\]$/,cb=/\r?\n/g,pb=/#.*$/,qb=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,rb=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
sb=/^(?:GET|HEAD)$/,tb=/^\/\//,db=/\?/,ub=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,vb=/^(?:select|textarea)/i,Ya=/\s+/,wb=/([?&])_=[^&]*/,eb=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,fb=h.fn.load,Ua={},gb={},Aa,Ba,hb=["*/"]+["*"];try{Aa=K.href}catch(Cb){Aa=r.createElement("a"),Aa.href="",Aa=Aa.href}Ba=eb.exec(Aa.toLowerCase())||[];h.fn.extend({load:function(a,b,d){if("string"!==typeof a&&fb)return fb.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(0<=
e)var c=a.slice(e,a.length),a=a.slice(0,e);e="GET";b&&(h.isFunction(b)?(d=b,b=f):"object"===typeof b&&(b=h.param(b,h.ajaxSettings.traditional),e="POST"));var g=this;h.ajax({url:a,type:e,dataType:"html",data:b,complete:function(a,b,e){e=a.responseText;a.isResolved()&&(a.done(function(a){e=a}),g.html(c?h("<div>").append(e.replace(ub,"")).find(c):e));d&&g.each(d,[e,b,a])}});return this},serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?
h.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||vb.test(this.nodeName)||rb.test(this.type))}).map(function(a,b){var d=h(this).val();return null==d?null:h.isArray(d)?h.map(d,function(a){return{name:b.name,value:a.replace(cb,"\r\n")}}):{name:b.name,value:d.replace(cb,"\r\n")}}).get()}});h.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(a,b){h.fn[b]=function(a){return this.bind(b,a)}});h.each(["get","post"],
function(a,b){h[b]=function(a,d,e,c){h.isFunction(d)&&(c=c||e,e=d,d=f);return h.ajax({type:b,url:a,data:d,success:e,dataType:c})}});h.extend({getScript:function(a,b){return h.get(a,f,b,"script")},getJSON:function(a,b,d){return h.get(a,b,d,"json")},ajaxSetup:function(a,b){b?w(a,h.ajaxSettings):(b=a,a=h.ajaxSettings);w(a,b);return a},ajaxSettings:{url:Aa,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(Ba[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","*":hb},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":h.parseJSON,"text xml":h.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:v(Ua),ajaxTransport:v(gb),ajax:function(a,b){function d(a,b,p,m){if(2!==u){u=2;o&&clearTimeout(o);D=f;n=m||"";z.readyState=
0<a?4:0;var q,y,M,m=b;if(p){var v=e,da=z,s=v.contents,X=v.dataTypes,w=v.responseFields,aa,r,Z,A;for(r in w)r in p&&(da[w[r]]=p[r]);for(;"*"===X[0];)X.shift(),aa===f&&(aa=v.mimeType||da.getResponseHeader("content-type"));if(aa)for(r in s)if(s[r]&&s[r].test(aa)){X.unshift(r);break}if(X[0]in p)Z=X[0];else{for(r in p){if(!X[0]||v.converters[r+" "+X[0]]){Z=r;break}A||(A=r)}Z=Z||A}Z?(Z!==X[0]&&X.unshift(Z),p=p[Z]):p=void 0}else p=f;if(200<=a&&300>a||304===a){if(e.ifModified){if(aa=z.getResponseHeader("Last-Modified"))h.lastModified[l]=
aa;if(aa=z.getResponseHeader("Etag"))h.etag[l]=aa}if(304===a)m="notmodified",q=!0;else try{aa=e;aa.dataFilter&&(p=aa.dataFilter(p,aa.dataType));var I=aa.dataTypes;r={};var E,W,O=I.length,F,x=I[0],ua,J,C,B,H;for(E=1;E<O;E++){if(1===E)for(W in aa.converters)"string"===typeof W&&(r[W.toLowerCase()]=aa.converters[W]);ua=x;x=I[E];if("*"===x)x=ua;else if("*"!==ua&&ua!==x){J=ua+" "+x;C=r[J]||r["* "+x];if(!C)for(B in H=f,r)if(F=B.split(" "),F[0]===ua||"*"===F[0])if(H=r[F[1]+" "+x]){B=r[B];!0===B?C=H:!0===
H&&(C=B);break}!C&&!H&&h.error("No conversion from "+J.replace(" "," to "));!0!==C&&(p=C?C(p):H(B(p)))}}y=p;m="success";q=!0}catch(N){m="parsererror",M=N}}else if(M=m,!m||a)m="error",0>a&&(a=0);z.status=a;z.statusText=""+(b||m);q?i.resolveWith(c,[y,m,z]):i.rejectWith(c,[z,m,M]);z.statusCode(k);k=f;K&&g.trigger("ajax"+(q?"Success":"Error"),[z,e,q?y:M]);j.fireWith(c,[z,m]);K&&(g.trigger("ajaxComplete",[z,e]),--h.active||h.event.trigger("ajaxStop"))}}"object"===typeof a&&(b=a,a=f);var b=b||{},e=h.ajaxSetup({},
b),c=e.context||e,g=c!==e&&(c.nodeType||c instanceof h)?h(c):h.event,i=h.Deferred(),j=h.Callbacks("once memory"),k=e.statusCode||{},l,p={},m={},n,q,D,o,y,u=0,K,v,z={readyState:0,setRequestHeader:function(a,b){if(!u){var d=a.toLowerCase(),a=m[d]=m[d]||a;p[a]=b}return this},getAllResponseHeaders:function(){return 2===u?n:null},getResponseHeader:function(a){var b;if(2===u){if(!q)for(q={};b=qb.exec(n);)q[b[1].toLowerCase()]=b[2];b=q[a.toLowerCase()]}return b===f?null:b},overrideMimeType:function(a){u||
(e.mimeType=a);return this},abort:function(a){a=a||"abort";D&&D.abort(a);d(0,a);return this}};i.promise(z);z.success=z.done;z.error=z.fail;z.complete=j.add;z.statusCode=function(a){if(a){var b;if(2>u)for(b in a)k[b]=[k[b],a[b]];else b=a[z.status],z.then(b,b)}return this};e.url=((a||e.url)+"").replace(pb,"").replace(tb,Ba[1]+"//");e.dataTypes=h.trim(e.dataType||"*").toLowerCase().split(Ya);null==e.crossDomain&&(y=eb.exec(e.url.toLowerCase()),e.crossDomain=!(!y||!(y[1]!=Ba[1]||y[2]!=Ba[2]||(y[3]||("http:"===
y[1]?80:443))!=(Ba[3]||("http:"===Ba[1]?80:443)))));e.data&&e.processData&&"string"!==typeof e.data&&(e.data=h.param(e.data,e.traditional));s(Ua,e,b,z);if(2===u)return!1;K=e.global;e.type=e.type.toUpperCase();e.hasContent=!sb.test(e.type);K&&0===h.active++&&h.event.trigger("ajaxStart");if(!e.hasContent&&(e.data&&(e.url+=(db.test(e.url)?"&":"?")+e.data,delete e.data),l=e.url,!1===e.cache)){y=h.now();var X=e.url.replace(wb,"$1_="+y);e.url=X+(X===e.url?(db.test(e.url)?"&":"?")+"_="+y:"")}(e.data&&e.hasContent&&
!1!==e.contentType||b.contentType)&&z.setRequestHeader("Content-Type",e.contentType);e.ifModified&&(l=l||e.url,h.lastModified[l]&&z.setRequestHeader("If-Modified-Since",h.lastModified[l]),h.etag[l]&&z.setRequestHeader("If-None-Match",h.etag[l]));z.setRequestHeader("Accept",e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+("*"!==e.dataTypes[0]?", "+hb+"; q=0.01":""):e.accepts["*"]);for(v in e.headers)z.setRequestHeader(v,e.headers[v]);if(e.beforeSend&&(!1===e.beforeSend.call(c,z,
e)||2===u))return z.abort(),!1;for(v in{success:1,error:1,complete:1})z[v](e[v]);if(D=s(gb,e,b,z)){z.readyState=1;K&&g.trigger("ajaxSend",[z,e]);e.async&&0<e.timeout&&(o=setTimeout(function(){z.abort("timeout")},e.timeout));try{u=1,D.send(p,d)}catch(w){2>u?d(-1,w):h.error(w)}}else d(-1,"No Transport");return z},param:function(a,b){var d=[],e=function(a,b){b=h.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};b===f&&(b=h.ajaxSettings.traditional);if(h.isArray(a)||a.jquery&&
!h.isPlainObject(a))h.each(a,function(){e(this.name,this.value)});else for(var c in a)o(c,a[c],b,e);return d.join("&").replace(ob,"+")}});h.extend({active:0,lastModified:{},etag:{}});var xb=h.now(),Sa=/(\=)\?(&|$)|\?\?/i;h.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return h.expando+"_"+xb++}});h.ajaxPrefilter("json jsonp",function(b,d,e){d="application/x-www-form-urlencoded"===b.contentType&&"string"===typeof b.data;if("jsonp"===b.dataTypes[0]||!1!==b.jsonp&&(Sa.test(b.url)||d&&Sa.test(b.data))){var f,
c=b.jsonpCallback=h.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,g=a[c],i=b.url,j=b.data,k="$1"+c+"$2";!1!==b.jsonp&&(i=i.replace(Sa,k),b.url===i&&(d&&(j=j.replace(Sa,k)),b.data===j&&(i+=(/\?/.test(i)?"&":"?")+b.jsonp+"="+c)));b.url=i;b.data=j;a[c]=function(a){f=[a]};e.always(function(){a[c]=g;if(f&&h.isFunction(g))a[c](f[0])});b.converters["script json"]=function(){f||h.error(c+" was not called");return f[0]};b.dataTypes[0]="json";return"script"}});h.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){h.globalEval(a);return a}}});h.ajaxPrefilter("script",function(a){a.cache===f&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});h.ajaxTransport("script",function(a){if(a.crossDomain){var b,d=r.head||r.getElementsByTagName("head")[0]||r.documentElement;return{send:function(e,c){b=r.createElement("script");b.async="async";a.scriptCharset&&(b.charset=a.scriptCharset);b.src=a.url;b.onload=b.onreadystatechange=function(a,
e){if(e||!b.readyState||/loaded|complete/.test(b.readyState))b.onload=b.onreadystatechange=null,d&&b.parentNode&&d.removeChild(b),b=f,e||c(200,"success")};d.insertBefore(b,d.firstChild)},abort:function(){if(b)b.onload(0,1)}}}});var Xa=a.ActiveXObject?function(){for(var a in Ja)Ja[a](0,1)}:!1,yb=0,Ja;h.ajaxSettings.xhr=a.ActiveXObject?function(){var b;if(!(b=!this.isLocal&&A()))a:{try{b=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(d){}b=void 0}return b}:A;(function(a){h.extend(h.support,
{ajax:!!a,cors:!!a&&"withCredentials"in a})})(h.ajaxSettings.xhr());h.support.ajax&&h.ajaxTransport(function(b){if(!b.crossDomain||h.support.cors){var d;return{send:function(e,c){var g=b.xhr(),i,j;b.username?g.open(b.type,b.url,b.async,b.username,b.password):g.open(b.type,b.url,b.async);if(b.xhrFields)for(j in b.xhrFields)g[j]=b.xhrFields[j];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType);!b.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)g.setRequestHeader(j,
e[j])}catch(k){}g.send(b.hasContent&&b.data||null);d=function(a,e){var j,k,l,p,m;try{if(d&&(e||4===g.readyState))if(d=f,i&&(g.onreadystatechange=h.noop,Xa&&delete Ja[i]),e)4!==g.readyState&&g.abort();else{j=g.status;l=g.getAllResponseHeaders();p={};if((m=g.responseXML)&&m.documentElement)p.xml=m;p.text=g.responseText;try{k=g.statusText}catch(n){k=""}!j&&b.isLocal&&!b.crossDomain?j=p.text?200:404:1223===j&&(j=204)}}catch(q){e||c(-1,q)}p&&c(j,k,p,l)};!b.async||4===g.readyState?d():(i=++yb,Xa&&(Ja||
(Ja={},h(a).unload(Xa)),Ja[i]=d),g.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var Va={},la,Ea,zb=/^(?:toggle|show|hide)$/,Ab=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Ta,Za=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],Oa;h.fn.extend({show:function(a,b,d){if(a||0===a)return this.animate(J("show",3),a,b,d);for(var d=0,e=this.length;d<e;d++)a=this[d],a.style&&(b=a.style.display,!h._data(a,"olddisplay")&&
"none"===b&&(b=a.style.display=""),""===b&&"none"===h.css(a,"display")&&h._data(a,"olddisplay",Q(a.nodeName)));for(d=0;d<e;d++)if(a=this[d],a.style&&(b=a.style.display,""===b||"none"===b))a.style.display=h._data(a,"olddisplay")||"";return this},hide:function(a,b,d){if(a||0===a)return this.animate(J("hide",3),a,b,d);for(var d=0,e=this.length;d<e;d++)a=this[d],a.style&&(b=h.css(a,"display"),"none"!==b&&!h._data(a,"olddisplay")&&h._data(a,"olddisplay",b));for(d=0;d<e;d++)this[d].style&&(this[d].style.display=
"none");return this},_toggle:h.fn.toggle,toggle:function(a,b,d){var e="boolean"===typeof a;h.isFunction(a)&&h.isFunction(b)?this._toggle.apply(this,arguments):null==a||e?this.each(function(){var b=e?a:h(this).is(":hidden");h(this)[b?"show":"hide"]()}):this.animate(J("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){function f(){!1===c.queue&&h._mark(this);var b=h.extend({},c),d=
1===this.nodeType,e=d&&h(this).is(":hidden"),g,i,j,k,l;b.animatedProperties={};for(j in a){g=h.camelCase(j);j!==g&&(a[g]=a[j],delete a[j]);i=a[g];h.isArray(i)?(b.animatedProperties[g]=i[1],i=a[g]=i[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if("hide"===i&&e||"show"===i&&!e)return b.complete.call(this);if(d&&("height"===g||"width"===g))b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],"inline"===h.css(this,"display")&&"none"===h.css(this,
"float")&&(!h.support.inlineBlockNeedsLayout||"inline"===Q(this.nodeName)?this.style.display="inline-block":this.style.zoom=1)}null!=b.overflow&&(this.style.overflow="hidden");for(j in a)if(d=new h.fx(this,b,j),i=a[j],zb.test(i))if(g=h._data(this,"toggle"+j)||("toggle"===i?e?"show":"hide":0))h._data(this,"toggle"+j,"show"===g?"hide":"show"),d[g]();else d[i]();else g=Ab.exec(i),k=d.cur(),g?(i=parseFloat(g[2]),l=g[3]||(h.cssNumber[j]?"":"px"),"px"!==l&&(h.style(this,j,(i||1)+l),k*=(i||1)/d.cur(),h.style(this,
j,k+l)),g[1]&&(i=("-="===g[1]?-1:1)*i+k),d.custom(k,i,l)):d.custom(k,i,"");return!0}var c=h.speed(b,d,e);if(h.isEmptyObject(a))return this.each(c.complete,[!1]);a=h.extend({},a);return!1===c.queue?this.each(f):this.queue(c.queue,f)},stop:function(a,b,d){"string"!==typeof a&&(d=b,b=a,a=f);b&&!1!==a&&this.queue(a||"fx",[]);return this.each(function(){var b,e=!1,f=h.timers,c=h._data(this);d||h._unmark(!0,this);if(null==a)for(b in c){if(c[b].stop&&b.indexOf(".run")===b.length-4){var g=c[b];h.removeData(this,
b,!0);g.stop(d)}}else if(c[b=a+".run"]&&c[b].stop)c=c[b],h.removeData(this,b,!0),c.stop(d);for(b=f.length;b--;)if(f[b].elem===this&&(null==a||f[b].queue===a)){if(d)f[b](!0);else f[b].saveState();e=!0;f.splice(b,1)}(!d||!e)&&h.dequeue(this,a)})}});h.each({slideDown:J("show",1),slideUp:J("hide",1),slideToggle:J("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){h.fn[a]=function(a,d,e){return this.animate(b,a,d,e)}});h.extend({speed:function(a,b,
d){var e=a&&"object"===typeof a?h.extend({},a):{complete:d||!d&&b||h.isFunction(a)&&a,duration:a,easing:d&&b||b&&!h.isFunction(b)&&b};e.duration=h.fx.off?0:"number"===typeof e.duration?e.duration:e.duration in h.fx.speeds?h.fx.speeds[e.duration]:h.fx.speeds._default;if(null==e.queue||!0===e.queue)e.queue="fx";e.old=e.complete;e.complete=function(a){h.isFunction(e.old)&&e.old.call(this);e.queue?h.dequeue(this,e.queue):!1!==a&&h._unmark(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},
swing:function(a,b,d,e){return(-Math.cos(a*Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;b.orig=b.orig||{}}});h.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(h.fx.step[this.prop]||h.fx.step._default)(this)},cur:function(){if(null!=this.elem[this.prop]&&(!this.elem.style||null==this.elem.style[this.prop]))return this.elem[this.prop];var a,b=h.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||
"auto"===b?0:b:a},custom:function(a,b,d){function e(a){return c.step(a)}var c=this,g=h.fx;this.startTime=Oa||N();this.end=b;this.now=this.start=a;this.pos=this.state=0;this.unit=d||this.unit||(h.cssNumber[this.prop]?"":"px");e.queue=this.options.queue;e.elem=this.elem;e.saveState=function(){c.options.hide&&h._data(c.elem,"fxshow"+c.prop)===f&&h._data(c.elem,"fxshow"+c.prop,c.start)};e()&&h.timers.push(e)&&!Ta&&(Ta=setInterval(g.tick,g.interval))},show:function(){var a=h._data(this.elem,"fxshow"+this.prop);
this.options.orig[this.prop]=a||h.style(this.elem,this.prop);this.options.show=!0;a!==f?this.custom(this.cur(),a):this.custom("width"===this.prop||"height"===this.prop?1:0,this.cur());h(this.elem).show()},hide:function(){this.options.orig[this.prop]=h._data(this.elem,"fxshow"+this.prop)||h.style(this.elem,this.prop);this.options.hide=!0;this.custom(this.cur(),0)},step:function(a){var b,d=Oa||N(),e=!0,f=this.elem,c=this.options;if(a||d>=c.duration+this.startTime){this.now=this.end;this.pos=this.state=
1;this.update();c.animatedProperties[this.prop]=!0;for(b in c.animatedProperties)!0!==c.animatedProperties[b]&&(e=!1);if(e){null!=c.overflow&&!h.support.shrinkWrapBlocks&&h.each(["","X","Y"],function(a,b){f.style["overflow"+b]=c.overflow[a]});c.hide&&h(f).hide();if(c.hide||c.show)for(b in c.animatedProperties)h.style(f,b,c.orig[b]),h.removeData(f,"fxshow"+b,!0),h.removeData(f,"toggle"+b,!0);if(a=c.complete)c.complete=!1,a.call(f)}return!1}Infinity==c.duration?this.now=d:(a=d-this.startTime,this.state=
a/c.duration,this.pos=h.easing[c.animatedProperties[this.prop]](this.state,a,0,1,c.duration),this.now=this.start+(this.end-this.start)*this.pos);this.update();return!0}};h.extend(h.fx,{tick:function(){for(var a,b=h.timers,d=0;d<b.length;d++)a=b[d],!a()&&b[d]===a&&b.splice(d--,1);b.length||h.fx.stop()},interval:13,stop:function(){clearInterval(Ta);Ta=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){h.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&null!=a.elem.style[a.prop]?
a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}});h.each(["width","height"],function(a,b){h.fx.step[b]=function(a){h.style(a.elem,b,Math.max(0,a.now))}});h.expr&&h.expr.filters&&(h.expr.filters.animated=function(a){return h.grep(h.timers,function(b){return a===b.elem}).length});var Bb=/^t(?:able|d|h)$/i,ib=/^(?:body|html)$/i;h.fn.offset="getBoundingClientRect"in r.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(b){h.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;
if(b===b.ownerDocument.body)return h.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var c=b.ownerDocument,f=c.documentElement;if(!d||!h.contains(f,b))return d?{top:d.top,left:d.left}:{top:0,left:0};b=c.body;c=P(c);return{top:d.top+(c.pageYOffset||h.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(c.pageXOffset||h.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(b){h.offset.setOffset(this,
a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return h.offset.bodyOffset(b);var d,e=b.offsetParent,c=b.ownerDocument,f=c.documentElement,g=c.body;d=(c=c.defaultView)?c.getComputedStyle(b,null):b.currentStyle;for(var i=b.offsetTop,j=b.offsetLeft;(b=b.parentNode)&&b!==g&&b!==f&&!(h.support.fixedPosition&&"fixed"===d.position);){d=c?c.getComputedStyle(b,null):b.currentStyle;i-=b.scrollTop;j-=b.scrollLeft;if(b===e){i+=b.offsetTop;j+=b.offsetLeft;if(h.support.doesNotAddBorder&&
(!h.support.doesAddBorderForTableAndCells||!Bb.test(b.nodeName)))i+=parseFloat(d.borderTopWidth)||0,j+=parseFloat(d.borderLeftWidth)||0;e=b.offsetParent}h.support.subtractsBorderForOverflowNotVisible&&"visible"!==d.overflow&&(i+=parseFloat(d.borderTopWidth)||0,j+=parseFloat(d.borderLeftWidth)||0)}if("relative"===d.position||"static"===d.position)i+=g.offsetTop,j+=g.offsetLeft;h.support.fixedPosition&&"fixed"===d.position&&(i+=Math.max(f.scrollTop,g.scrollTop),j+=Math.max(f.scrollLeft,g.scrollLeft));
return{top:i,left:j}};h.offset={bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;h.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(h.css(a,"marginTop"))||0,d+=parseFloat(h.css(a,"marginLeft"))||0);return{top:b,left:d}},setOffset:function(a,b,d){var e=h.css(a,"position");"static"===e&&(a.style.position="relative");var c=h(a),f=c.offset(),g=h.css(a,"top"),i=h.css(a,"left"),j={},k={};("absolute"===e||"fixed"===e)&&-1<h.inArray("auto",[g,i])?(k=c.position(),e=k.top,i=k.left):(e=parseFloat(g)||
0,i=parseFloat(i)||0);h.isFunction(b)&&(b=b.call(a,d,f));null!=b.top&&(j.top=b.top-f.top+e);null!=b.left&&(j.left=b.left-f.left+i);"using"in b?b.using.call(a,j):c.css(j)}};h.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=ib.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(h.css(a,"marginTop"))||0;d.left-=parseFloat(h.css(a,"marginLeft"))||0;e.top+=parseFloat(h.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(h.css(b[0],
"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||r.body;a&&!ib.test(a.nodeName)&&"static"===h.css(a,"position");)a=a.offsetParent;return a})}});h.each(["Left","Top"],function(a,b){var d="scroll"+b;h.fn[d]=function(b){var e,c;if(b===f){e=this[0];return!e?null:(c=P(e))?"pageXOffset"in c?c[a?"pageYOffset":"pageXOffset"]:h.support.boxModel&&c.document.documentElement[d]||c.document.body[d]:e[d]}return this.each(function(){(c=
P(this))?c.scrollTo(!a?b:h(c).scrollLeft(),a?b:h(c).scrollTop()):this[d]=b})}});h.each(["Height","Width"],function(a,b){var d=b.toLowerCase();h.fn["inner"+b]=function(){var a=this[0];return a?a.style?parseFloat(h.css(a,d,"padding")):this[d]():null};h.fn["outer"+b]=function(a){var b=this[0];return b?b.style?parseFloat(h.css(b,d,a?"margin":"border")):this[d]():null};h.fn[d]=function(a){var e=this[0];if(!e)return null==a?null:this;if(h.isFunction(a))return this.each(function(b){var e=h(this);e[d](a.call(this,
b,e[d]()))});if(h.isWindow(e)){var c=e.document.documentElement["client"+b],g=e.document.body;return"CSS1Compat"===e.document.compatMode&&c||g&&g["client"+b]||c}if(9===e.nodeType)return Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]);return a===f?(e=h.css(e,d),c=parseFloat(e),h.isNumeric(c)?c:e):this.css(d,"string"===typeof a?a:a+"px")}});a.jQuery=a.$=h})(window);
jQuery.cookie=function(a,f,c){if("undefined"!=typeof f){c=c||{};null===f&&(f="",c.expires=-1);var g="";if(c.expires&&("number"==typeof c.expires||c.expires.toUTCString))"number"==typeof c.expires?(g=new Date,g.setTime(g.getTime()+864E5*c.expires)):g=c.expires,g="; expires="+g.toUTCString();var e=c.path?"; path="+c.path:"",b=c.domain?"; domain="+c.domain:"",c=c.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(f),g,e,b,c].join("")}else{f=null;if(document.cookie&&""!=document.cookie){c=
document.cookie.split(";");for(g=0;g<c.length;g++)if(e=jQuery.trim(c[g]),e.substring(0,a.length+1)==a+"="){f=decodeURIComponent(e.substring(a.length+1));break}}return f}};
(function(a,f,c){a.fn.jScrollPane=function(f){function e(b,d){function e(d){var g,l,p,m,q,y=!1,o=!1;x=d;if(E===c)m=b.scrollTop(),q=b.scrollLeft(),b.css({overflow:"hidden",padding:0}),F=b.innerWidth()+qa,H=b.innerHeight(),b.width(F),E=a('<div class="jspPane" />').css("padding",Qa).append(b.children()),G=a('<div class="jspContainer" />').css({width:F+"px",height:H+"px"}).append(E).appendTo(b);else{b.css("width","");y=x.stickToBottom&&D();o=x.stickToRight&&K();if(p=b.innerWidth()+qa!=F||b.outerHeight()!=
H)F=b.innerWidth()+qa,H=b.innerHeight(),G.css({width:F+"px",height:H+"px"});if(!p&&Ra==Y&&E.outerHeight()==U){b.width(F);return}Ra=Y;E.css("width","");b.width(F);G.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}E.css("overflow","auto");Y=d.contentWidth?d.contentWidth:E[0].scrollWidth;U=E[0].scrollHeight;E.css("overflow","");va=Y/F;wa=U/H;ga=1<wa;ea=1<va;if(!ea&&!ga)b.removeClass("jspScrollable"),E.css({top:0,width:G.width()-qa}),G.unbind(Na),E.find(":input,a").unbind("focus.jsp"),b.attr("tabindex",
"-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp"),v(),R();else{b.addClass("jspScrollable");if(d=x.maintainPosition&&(S||T))g=P(),l=r();f();n();k();d&&(J(o?Y-F:g,!1),B(y?U-H:l,!1));W();h();ma();x.enableKeyboardNavigation&&O();x.clickOnTrack&&u();C();x.hijackInternalLinks&&L()}x.autoReinitialise&&!Ha?Ha=setInterval(function(){e(x)},x.autoReinitialiseDelay):!x.autoReinitialise&&Ha&&clearInterval(Ha);m&&b.scrollTop(0)&&B(m,!1);q&&b.scrollLeft(0)&&J(q,!1);b.trigger("jsp-initialised",[ea||
ga])}function f(){ga&&(G.append(a('<div class="jspVerticalBar" />').append(a('<div class="jspCap jspCapTop" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragTop" />'),a('<div class="jspDragBottom" />'))),a('<div class="jspCap jspCapBottom" />'))),Ga=G.find(">.jspVerticalBar"),ia=Ga.find(">.jspTrack"),ca=ia.find(">.jspDrag"),x.showArrows&&(ra=a('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",q(0,-1)).bind("click.jsp",z),xa=a('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",
q(0,1)).bind("click.jsp",z),x.arrowScrollOnHover&&(ra.bind("mouseover.jsp",q(0,-1,ra)),xa.bind("mouseover.jsp",q(0,1,xa))),p(ia,x.verticalArrowPositions,ra,xa)),ka=H,G.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){ka-=a(this).outerHeight()}),ca.hover(function(){ca.addClass("jspHover")},function(){ca.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",z);ca.addClass("jspActive");var d=b.pageY-ca.position().top;
a("html").bind("mousemove.jsp",function(a){w(a.pageY-d,!1)}).bind("mouseup.jsp mouseleave.jsp",s);return!1}),g())}function g(){ia.height(ka+"px");S=0;La=x.verticalGutter+ia.outerWidth();E.width(F-La-qa);try{0===Ga.position().left&&E.css("margin-left",La+"px")}catch(a){}}function n(){ea&&(G.append(a('<div class="jspHorizontalBar" />').append(a('<div class="jspCap jspCapLeft" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragLeft" />'),a('<div class="jspDragRight" />'))),
a('<div class="jspCap jspCapRight" />'))),sa=G.find(">.jspHorizontalBar"),ha=sa.find(">.jspTrack"),ba=ha.find(">.jspDrag"),x.showArrows&&(ya=a('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",q(-1,0)).bind("click.jsp",z),za=a('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",q(1,0)).bind("click.jsp",z),x.arrowScrollOnHover&&(ya.bind("mouseover.jsp",q(-1,0,ya)),za.bind("mouseover.jsp",q(1,0,za))),p(ha,x.horizontalArrowPositions,ya,za)),ba.hover(function(){ba.addClass("jspHover")},
function(){ba.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",z);ba.addClass("jspActive");var d=b.pageX-ba.position().left;a("html").bind("mousemove.jsp",function(a){A(a.pageX-d,!1)}).bind("mouseup.jsp mouseleave.jsp",s);return!1}),fa=G.innerWidth(),m())}function m(){G.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){fa-=a(this).outerWidth()});ha.width(fa+"px");T=0}function k(){if(ea&&ga){var b=ha.outerHeight(),
d=ia.outerWidth();ka-=b;a(sa).find(">.jspCap:visible,>.jspArrow").each(function(){fa+=a(this).outerWidth()});fa-=d;H-=d;F-=b;ha.parent().append(a('<div class="jspCorner" />').css("width",b+"px"));g();m()}ea&&E.width(G.outerWidth()-qa+"px");U=E.outerHeight();wa=U/H;ea&&(pa=Math.ceil(1/va*fa),pa>x.horizontalDragMaxWidth?pa=x.horizontalDragMaxWidth:pa<x.horizontalDragMinWidth&&(pa=x.horizontalDragMinWidth),ba.width(pa+"px"),na=fa-pa,N(T));ga&&(oa=Math.ceil(1/wa*ka),oa>x.verticalDragMaxHeight?oa=x.verticalDragMaxHeight:
oa<x.verticalDragMinHeight&&(oa=x.verticalDragMinHeight),ca.height(oa+"px"),ja=ka-oa,o(S))}function p(a,b,d,e){var c="before",f="after";"os"==b&&(b=/Mac/.test(navigator.platform)?"after":"split");b==c?f=b:b==f&&(c=b,b=d,d=e,e=b);a[c](d)[f](e)}function q(a,b,d){return function(){y(a,b,this,d);this.blur();return!1}}function y(b,d,e,c){var e=a(e).addClass("jspActive"),f,g,i=!0,h=function(){0!==b&&I.scrollByX(b*x.arrowButtonSpeed);0!==d&&I.scrollByY(d*x.arrowButtonSpeed);g=setTimeout(h,i?x.initialDelay:
x.arrowRepeatFreq);i=!1};h();f=c?"mouseout.jsp":"mouseup.jsp";c=c||a("html");c.bind(f,function(){e.removeClass("jspActive");g&&clearTimeout(g);g=null;c.unbind(f)})}function u(){v();ga&&ia.bind("mousedown.jsp",function(b){if(b.originalTarget===c||b.originalTarget==b.currentTarget){var d=a(this),e=d.offset(),f=b.pageY-e.top-S,g,i=!0,h=function(){var a=d.offset(),a=b.pageY-a.top-oa/2,e=H*x.scrollPagePercent,c=ja*e/(U-H);if(0>f)S-c>a?I.scrollByY(-e):w(a);else if(0<f)S+c<a?I.scrollByY(e):w(a);else{j();
return}g=setTimeout(h,i?x.initialDelay:x.trackClickRepeatFreq);i=!1},j=function(){g&&clearTimeout(g);g=null;a(document).unbind("mouseup.jsp",j)};h();a(document).bind("mouseup.jsp",j);return!1}});ea&&ha.bind("mousedown.jsp",function(b){if(b.originalTarget===c||b.originalTarget==b.currentTarget){var d=a(this),e=d.offset(),f=b.pageX-e.left-T,g,i=!0,h=function(){var a=d.offset(),a=b.pageX-a.left-pa/2,e=F*x.scrollPagePercent,c=na*e/(Y-F);if(0>f)T-c>a?I.scrollByX(-e):A(a);else if(0<f)T+c<a?I.scrollByX(e):
A(a);else{j();return}g=setTimeout(h,i?x.initialDelay:x.trackClickRepeatFreq);i=!1},j=function(){g&&clearTimeout(g);g=null;a(document).unbind("mouseup.jsp",j)};h();a(document).bind("mouseup.jsp",j);return!1}})}function v(){ha&&ha.unbind("mousedown.jsp");ia&&ia.unbind("mousedown.jsp")}function s(){a("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");ca&&ca.removeClass("jspActive");ba&&ba.removeClass("jspActive")}function w(a,b){ga&&(0>a?a=0:a>ja&&(a=ja),b===c&&
(b=x.animateScroll),b?I.animate(ca,"top",a,o):(ca.css("top",a),o(a)))}function o(a){a===c&&(a=ca.position().top);G.scrollTop(0);S=a;var d=0===S,e=S==ja,a=-(a/ja)*(U-H);if(Ca!=d||Ia!=e)Ca=d,Ia=e,b.trigger("jsp-arrow-change",[Ca,Ia,V,ta]);x.showArrows&&(ra[d?"addClass":"removeClass"]("jspDisabled"),xa[e?"addClass":"removeClass"]("jspDisabled"));E.css("top",a);b.trigger("jsp-scroll-y",[-a,d,e]).trigger("scroll")}function A(a,b){ea&&(0>a?a=0:a>na&&(a=na),b===c&&(b=x.animateScroll),b?I.animate(ba,"left",
a,N):(ba.css("left",a),N(a)))}function N(a){a===c&&(a=ba.position().left);G.scrollTop(0);T=a;var d=0===T,e=T==na,a=-(a/na)*(Y-F);if(V!=d||ta!=e)V=d,ta=e,b.trigger("jsp-arrow-change",[Ca,Ia,V,ta]);x.showArrows&&(ya[d?"addClass":"removeClass"]("jspDisabled"),za[e?"addClass":"removeClass"]("jspDisabled"));E.css("left",a);b.trigger("jsp-scroll-x",[-a,d,e]).trigger("scroll")}function B(a,b){w(a/(U-H)*ja,b)}function J(a,b){A(a/(Y-F)*na,b)}function Q(b,d,e){var c,f,g=0,i=0,h,j,k;try{c=a(b)}catch(l){return}f=
c.outerHeight();b=c.outerWidth();G.scrollTop(0);for(G.scrollLeft(0);!c.is(".jspPane");)if(g+=c.position().top,i+=c.position().left,c=c.offsetParent(),/^body|html$/i.test(c[0].nodeName))return;c=r();h=c+H;g<c||d?j=g-x.verticalGutter:g+f>h&&(j=g-H+f+x.verticalGutter);j&&B(j,e);g=P();j=g+F;i<g||d?k=i-x.horizontalGutter:i+b>j&&(k=i-F+b+x.horizontalGutter);k&&J(k,e)}function P(){return-E.position().left}function r(){return-E.position().top}function D(){var a=U-H;return 20<a&&10>a-r()}function K(){var a=
Y-F;return 20<a&&10>a-P()}function h(){G.unbind(Na).bind(Na,function(a,b,d,e){a=T;b=S;I.scrollBy(d*x.mouseWheelSpeed,-e*x.mouseWheelSpeed,!1);return a==T&&b==S})}function z(){return!1}function W(){E.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(a){Q(a.target,!1)})}function O(){function d(){var a=T,b=S;switch(e){case 40:I.scrollByY(x.keyboardSpeed,!1);break;case 38:I.scrollByY(-x.keyboardSpeed,!1);break;case 34:case 32:I.scrollByY(H*x.scrollPagePercent,!1);break;case 33:I.scrollByY(-H*
x.scrollPagePercent,!1);break;case 39:I.scrollByX(x.keyboardSpeed,!1);break;case 37:I.scrollByX(-x.keyboardSpeed,!1)}return c=a!=T||b!=S}var e,c,f=[];ea&&f.push(sa[0]);ga&&f.push(Ga[0]);E.focus(function(){b.focus()});b.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(b){if(!(b.target!==this&&(!f.length||!a(b.target).closest(f).length))){var g=T,i=S;switch(b.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:e=b.keyCode;d();break;case 35:B(U-H);e=null;
break;case 36:B(0),e=null}c=b.keyCode==e&&g!=T||i!=S;return!c}}).bind("keypress.jsp",function(a){a.keyCode==e&&d();return!c});x.hideFocus?(b.css("outline","none"),"hideFocus"in G[0]&&b.attr("hideFocus",!0)):(b.css("outline",""),"hideFocus"in G[0]&&b.attr("hideFocus",!1))}function C(){if(location.hash&&1<location.hash.length){var b,d,e=escape(location.hash);try{b=a(e)}catch(c){return}b.length&&E.find(e)&&(0===G.scrollTop()?d=setInterval(function(){0<G.scrollTop()&&(Q(e,!0),a(document).scrollTop(G.position().top),
clearInterval(d))},50):(Q(e,!0),a(document).scrollTop(G.position().top)))}}function R(){a("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack")}function L(){R();a("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack",function(){var a=this.href.split("#");if(1<a.length&&(a=a[1],0<a.length&&0<E.find("#"+a).length))return Q("#"+a,!0),!1})}function ma(){var a,b,d,e,c,f=!1;G.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(g){g=
g.originalEvent.touches[0];a=P();b=r();d=g.pageX;e=g.pageY;c=!1;f=!0}).bind("touchmove.jsp",function(g){if(f){var g=g.originalEvent.touches[0],i=T,h=S;I.scrollTo(a+d-g.pageX,b+e-g.pageY);c=c||5<Math.abs(d-g.pageX)||5<Math.abs(e-g.pageY);return i==T&&h==S}}).bind("touchend.jsp",function(){f=!1}).bind("click.jsp-touchclick",function(){if(c)return c=!1})}var x,I=this,E,F,H,G,Y,U,va,wa,ga,ea,ca,ja,S,ba,na,T,Ga,ia,La,ka,oa,ra,xa,sa,ha,fa,pa,ya,za,Ha,Qa,qa,Ra,Ca=!0,V=!0,Ia=!1,ta=!1,Ma=b.clone(!1,!1).empty(),
Na=a.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";Qa=b.css("paddingTop")+" "+b.css("paddingRight")+" "+b.css("paddingBottom")+" "+b.css("paddingLeft");qa=(parseInt(b.css("paddingLeft"),10)||0)+(parseInt(b.css("paddingRight"),10)||0);a.extend(I,{reinitialise:function(b){b=a.extend({},x,b);e(b)},scrollToElement:function(a,b,d){Q(a,b,d)},scrollTo:function(a,b,d){J(a,d);B(b,d)},scrollToX:function(a,b){J(a,b)},scrollToY:function(a,b){B(a,b)},scrollToPercentX:function(a,b){J(a*(Y-F),b)},scrollToPercentY:function(a,
b){B(a*(U-H),b)},scrollBy:function(a,b,d){I.scrollByX(a,d);I.scrollByY(b,d)},scrollByX:function(a,b){var d=(P()+Math[0>a?"floor":"ceil"](a))/(Y-F);A(d*na,b)},scrollByY:function(a,b){var d=(r()+Math[0>a?"floor":"ceil"](a))/(U-H);w(d*ja,b)},positionDragX:function(a,b){A(a,b)},positionDragY:function(a,b){w(a,b)},animate:function(a,b,d,e){var c={};c[b]=d;a.animate(c,{duration:x.animateDuration,easing:x.animateEase,queue:!1,step:e})},getContentPositionX:function(){return P()},getContentPositionY:function(){return r()},
getContentWidth:function(){return Y},getContentHeight:function(){return U},getPercentScrolledX:function(){return P()/(Y-F)},getPercentScrolledY:function(){return r()/(U-H)},getIsScrollableH:function(){return ea},getIsScrollableV:function(){return ga},getContentPane:function(){return E},scrollToBottom:function(a){w(ja,a)},hijackInternalLinks:function(){L()},destroy:function(){var a=r(),d=P();b.removeClass("jspScrollable").unbind(".jsp");b.replaceWith(Ma.append(E.children()));Ma.scrollTop(a);Ma.scrollLeft(d)}});
e(d)}f=a.extend({},a.fn.jScrollPane.defaults,f);a.each(["mouseWheelSpeed","arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){f[this]=f[this]||f.speed});return this.each(function(){var b=a(this),d=b.data("jsp");d?d.reinitialise(f):(d=new e(b,f),b.data("jsp",d))})};a.fn.jScrollPane.defaults={showArrows:!1,maintainPosition:!0,stickToBottom:!1,stickToRight:!1,clickOnTrack:!0,autoReinitialise:!1,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,
horizontalDragMaxWidth:99999,contentWidth:c,animateScroll:!1,animateDuration:300,animateEase:"linear",hijackInternalLinks:!1,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:0,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:!1,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:!0,hideFocus:!1,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:0.8}})(jQuery,this);
(function(a){function f(e){var b=e||window.event,d=[].slice.call(arguments,1),c=0,f=0,g=0,e=a.event.fix(b);e.type="mousewheel";b.wheelDelta&&(c=b.wheelDelta/120);b.detail&&(c=-b.detail/3);g=c;void 0!==b.axis&&b.axis===b.HORIZONTAL_AXIS&&(g=0,f=-1*c);void 0!==b.wheelDeltaY&&(g=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(f=-1*b.wheelDeltaX/120);d.unshift(e,c,f,g);return(a.event.dispatch||a.event.handle).apply(this,d)}var c=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var g=c.length;g;)a.event.fixHooks[c[--g]]=
a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],f,!1);else this.onmousewheel=f},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],f,!1);else this.onmousewheel=null}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
(function(a){function f(e,b){var d=a(b);return 2>d.length?d:e.parent().find(b)}function c(e,b){var d=this,c=e.add(d),j=e.children(),l=0,n=b.vertical;g||(g=d);1<j.length&&(j=a(b.items,e));a.extend(d,{getConf:function(){return b},getIndex:function(){return l},getSize:function(){return d.getItems().size()},getNaviButtons:function(){return p.add(q)},getRoot:function(){return e},getItemWrap:function(){return j},getItems:function(){return j.children(b.item).not("."+b.clonedClass)},move:function(a,b){return d.seekTo(l+
a,b)},next:function(a){return d.move(1,a)},prev:function(a){return d.move(-1,a)},begin:function(a){return d.seekTo(0,a)},end:function(a){return d.seekTo(d.getSize()-1,a)},focus:function(){return g=d},addItem:function(e){e=a(e);b.circular?(j.children("."+b.clonedClass+":last").before(e),j.children("."+b.clonedClass+":first").replaceWith(e.clone().addClass(b.clonedClass))):j.append(e);c.trigger("onAddItem",[e]);return d},seekTo:function(e,f,k){e.jquery||(e*=1);if(b.circular&&0===e&&-1==l&&0!==f||!b.circular&&
0>e||e>d.getSize()||-1>e)return d;var p=e;e.jquery?e=d.getItems().index(e):p=d.getItems().eq(e);var m=a.Event("onBeforeSeek");if(!k&&(c.trigger(m,[e,f]),m.isDefaultPrevented()||!p.length))return d;p=n?{top:-p.position().top}:{left:-p.position().left};l=e;g=d;void 0===f&&(f=b.speed);j.animate(p,f,b.easing,k||function(){c.trigger("onSeek",[e])});return d}});a.each(["onBeforeSeek","onSeek","onAddItem"],function(e,c){a.isFunction(b[c])&&a(d).bind(c,b[c]);d[c]=function(b){b&&a(d).bind(c,b);return d}});
if(b.circular){var m=d.getItems().slice(-1).clone().prependTo(j),k=d.getItems().eq(1).clone().appendTo(j);m.add(k).addClass(b.clonedClass);d.onBeforeSeek(function(a,b,e){if(!a.isDefaultPrevented()){if(-1==b)return d.seekTo(m,e,function(){d.end(0)}),a.preventDefault();b==d.getSize()&&d.seekTo(k,e,function(){d.begin(0)})}});d.seekTo(0,0,function(){})}var p=f(e,b.prev).click(function(){d.prev()}),q=f(e,b.next).click(function(){d.next()});!b.circular&&1<d.getSize()&&(d.onBeforeSeek(function(a,e){setTimeout(function(){a.isDefaultPrevented()||
(p.toggleClass(b.disabledClass,0>=e),q.toggleClass(b.disabledClass,e>=d.getSize()-1))},1)}),b.initialIndex||p.addClass(b.disabledClass));b.mousewheel&&a.fn.mousewheel&&e.mousewheel(function(a,e){if(b.mousewheel)return d.move(0>e?1:-1,b.wheelSpeed||50),!1});if(b.touch){var y,u;j[0].ontouchstart=function(a){a=a.touches[0];y=a.clientX;u=a.clientY};j[0].ontouchmove=function(a){if(1==a.touches.length&&!j.is(":animated")){var b=a.touches[0],e=y-b.clientX,b=u-b.clientY;d[n&&0<b||!n&&0<e?"next":"prev"]();
a.preventDefault()}}}b.keyboard&&a(document).bind("keydown.scrollable",function(e){if(b.keyboard&&!e.altKey&&!e.ctrlKey&&!a(e.target).is(":input")&&!("static"!=b.keyboard&&g!=d)){var c=e.keyCode;if(n&&(38==c||40==c))return d.move(38==c?-1:1),e.preventDefault();if(!n&&(37==c||39==c))return d.move(37==c?-1:1),e.preventDefault()}});b.initialIndex&&d.seekTo(b.initialIndex,0,function(){})}a.tools=a.tools||{version:"@VERSION"};a.tools.scrollable={conf:{activeClass:"active",circular:!1,clonedClass:"cloned",
disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",speed:400,vertical:!1,touch:!0,wheelSpeed:0}};var g;a.fn.scrollable=function(e){var b=this.data("scrollable");if(b)return b;e=a.extend({},a.tools.scrollable.conf,e);this.each(function(){b=new c(a(this),e);a(this).data("scrollable",b)});return e.api?b:this}})(jQuery);
(function(a){var f=a.tools.scrollable;f.autoscroll={conf:{autoplay:!0,interval:3E3,autopause:!0}};a.fn.autoscroll=function(c){"number"==typeof c&&(c={interval:c});var g=a.extend({},f.autoscroll.conf,c),e;this.each(function(){var b=a(this).data("scrollable");b&&(e=b);var d;b.play=function(){d||(d=setInterval(function(){b.next()},g.interval))};b.pause=function(){d=clearInterval(d)};b.stop=function(){b.pause()};g.autopause&&b.getRoot().add(b.getNaviButtons()).hover(b.pause,b.play);g.autoplay&&b.play()});
return g.api?e:this}})(jQuery);
(function(a){function f(c,e){var b=a(e);return 2>b.length?b:c.parent().find(e)}var c=a.tools.scrollable;c.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,idPrefix:null,history:!1}};a.fn.navigator=function(g){"string"==typeof g&&(g={navi:g});g=a.extend({},c.navigator.conf,g);var e;this.each(function(){function b(a,b,d){l.seekTo(b);if(p)location.hash&&(location.hash=a.attr("href").replace("#",""));else return d.preventDefault()}function d(){return n.find(g.naviItem||"> *")}
function c(d){var e=a("<"+(g.naviItem||"a")+"/>").click(function(e){b(a(this),d,e)}).attr("href","#"+d);0===d&&e.addClass(k);g.indexed&&e.text(d+1);g.idPrefix&&e.attr("id",g.idPrefix+d);return e.appendTo(n)}function j(a,b){var e=d().eq(b.replace("#",""));e.length||(e=d().filter("[href="+b+"]"));e.click()}var l=a(this).data("scrollable"),n=g.navi.jquery?g.navi:f(l.getRoot(),g.navi),m=l.getNaviButtons(),k=g.activeClass,p=g.history&&a.fn.history;l&&(e=l);l.getNaviButtons=function(){return m.add(n)};
d().length?d().each(function(d){a(this).click(function(e){b(a(this),d,e)})}):a.each(l.getItems(),function(a){c(a)});l.onBeforeSeek(function(a,b){setTimeout(function(){if(!a.isDefaultPrevented()){var e=d().eq(b);!a.isDefaultPrevented()&&e.length&&d().removeClass(k).eq(b).addClass(k)}},1)});l.onAddItem(function(a,b){b=c(l.getItems().index(b));p&&b.history(j)});p&&d().history(j)});return g.api?e:this}})(jQuery);
(function(a){function f(e,b){var d=this,f=e.add(d),j=a(window),l,n,m,k=a.tools.expose&&(b.mask||b.expose),p=Math.random().toString().slice(10);k&&("string"==typeof k&&(k={color:k}),k.closeOnClick=k.closeOnEsc=!1);var q=b.target||e.attr("rel");n=q?a(q):e;if(!n.length)throw"Could not find Overlay: "+q;e&&-1==e.index(n)&&e.click(function(a){d.load(a);return a.preventDefault()});a.extend(d,{load:function(e){if(d.isOpened())return d;var l=g[b.effect];if(!l)throw'Overlay: cannot find effect : "'+b.effect+
'"';b.oneInstance&&a.each(c,function(){this.close(e)});e=e||a.Event();e.type="onBeforeLoad";f.trigger(e);if(e.isDefaultPrevented())return d;m=!0;k&&a(n).expose(k);var q=b.top,s=b.left,w=n.outerWidth({margin:!0}),o=n.outerHeight({margin:!0});"string"==typeof q&&(q="center"==q?Math.max((j.height()-o)/2,0):parseInt(q,10)/100*j.height());"center"==s&&(s=Math.max((j.width()-w)/2,0));l[0].call(d,{top:q,left:s},function(){m&&(e.type="onLoad",f.trigger(e))});k&&b.closeOnClick&&a.mask.getMask().one("click",
d.close);b.closeOnClick&&a(document).bind("click."+p,function(b){a(b.target).parents(n).length||d.close(b)});b.closeOnEsc&&a(document).bind("keydown."+p,function(a){27==a.keyCode&&d.close(a)});return d},close:function(e){if(!d.isOpened())return d;e=e||a.Event();e.type="onBeforeClose";f.trigger(e);if(!e.isDefaultPrevented())return m=!1,g[b.effect][1].call(d,function(){e.type="onClose";f.trigger(e)}),a(document).unbind("click."+p).unbind("keydown."+p),k&&a.mask.close(),d},getOverlay:function(){return n},
getTrigger:function(){return e},getClosers:function(){return l},isOpened:function(){return m},getConf:function(){return b}});a.each(["onBeforeLoad","onStart","onLoad","onBeforeClose","onClose"],function(e,c){a.isFunction(b[c])&&a(d).bind(c,b[c]);d[c]=function(b){b&&a(d).bind(c,b);return d}});l=n.find(b.close||".close");!l.length&&!b.close&&(l=a('<a class="close"></a>'),n.prepend(l));l.click(function(a){d.close(a)});b.load&&d.load()}a.tools=a.tools||{version:"@VERSION"};a.tools.overlay={addEffect:function(a,
b,d){g[a]=[b,d]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||6<a.browser.version,left:"center",load:!1,mask:null,oneInstance:!0,speed:"normal",target:null,top:"10%"}};var c=[],g={};a.tools.overlay.addEffect("default",function(e,b){var d=this.getConf(),c=a(window);d.fixed||(e.top+=c.scrollTop(),e.left+=c.scrollLeft());e.position=d.fixed?"fixed":"absolute";this.getOverlay().css(e).fadeIn(d.speed,b)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,
a)});a.fn.overlay=function(e){var b=this.data("overlay");if(b)return b;a.isFunction(e)&&(e={onBeforeLoad:e});e=a.extend(!0,{},a.tools.overlay.conf,e);this.each(function(){b=new f(a(this),e);c.push(b);a(this).data("overlay",b)});return e.api?b:this}})(jQuery);
(function(a){function f(){if(a.browser.msie){var b=a(document).height(),d=a(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,20>b-d?d:b]}return[a(document).width(),a(document).height()]}function c(b){if(b)return b.call(a.mask)}a.tools=a.tools||{version:"@VERSION"};var g;g=a.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:!0,closeOnEsc:!0,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,
onClose:null}};var e,b,d,i,j;a.mask={load:function(l,n){if(d)return this;"string"==typeof l&&(l={color:l});l=l||i;i=l=a.extend(a.extend({},g.conf),l);e=a("#"+l.maskId);e.length||(e=a("<div/>").attr("id",l.maskId),a("body").append(e));var m=f();e.css({position:"absolute",top:0,left:0,width:m[0],height:m[1],display:"none",opacity:l.startOpacity,zIndex:l.zIndex});l.color&&e.css("backgroundColor",l.color);if(!1===c(l.onBeforeLoad))return this;l.closeOnEsc&&a(document).bind("keydown.mask",function(b){27==
b.keyCode&&a.mask.close(b)});l.closeOnClick&&e.bind("click.mask",function(b){a.mask.close(b)});a(window).bind("resize.mask",function(){a.mask.fit()});n&&n.length&&(j=n.eq(0).css("zIndex"),a.each(n,function(){var b=a(this);/relative|absolute|fixed/i.test(b.css("position"))||b.css("position","relative")}),b=n.css({zIndex:Math.max(l.zIndex+1,"auto"==j?0:j)}));e.css({display:"block"}).fadeTo(l.loadSpeed,l.opacity,function(){a.mask.fit();c(l.onLoad);d="full"});d=!0;return this},close:function(){if(d){if(!1===
c(i.onBeforeClose))return this;e.fadeOut(i.closeSpeed,function(){c(i.onClose);b&&b.css({zIndex:j});d=!1});a(document).unbind("keydown.mask");e.unbind("click.mask");a(window).unbind("resize.mask")}return this},fit:function(){if(d){var a=f();e.css({width:a[0],height:a[1]})}},getMask:function(){return e},isLoaded:function(a){return a?"full"==d:d},getConf:function(){return i},getExposed:function(){return b}};a.fn.mask=function(b){a.mask.load(b);return this};a.fn.expose=function(b){a.mask.load(b,this);
return this}})(jQuery);
(function(a,f){function c(c){return!a(c).parents().andSelf().filter(function(){return"hidden"===a.curCSS(this,"visibility")||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,{version:"1.8.11",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}}),a.fn.extend({_focus:a.fn.focus,focus:function(c,e){return"number"===typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus();e&&e.call(b)},c)}):this._focus.apply(this,arguments)},scrollParent:function(){var c;c=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,
"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?a(document):c},zIndex:function(c){if(c!==f)return this.css("zIndex",c);if(this.length)for(var c=a(this[0]),e;c.length&&c[0]!==document;){e=c.css("position");if("absolute"===
e||"relative"===e||"fixed"===e)if(e=parseInt(c.css("zIndex"),10),!isNaN(e)&&0!==e)return e;c=c.parent()}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,e){function b(b,e,c,f){a.each(d,function(){e-=parseFloat(a.curCSS(b,"padding"+this,!0))||0;c&&(e-=parseFloat(a.curCSS(b,"border"+
this+"Width",!0))||0);f&&(e-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)});return e}var d="Width"===e?["Left","Right"]:["Top","Bottom"],i=e.toLowerCase(),j={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+e]=function(d){return d===f?j["inner"+e].call(this):this.each(function(){a(this).css(i,b(this,d)+"px")})};a.fn["outer"+e]=function(d,c){return"number"!==typeof d?j["outer"+e].call(this,d):this.each(function(){a(this).css(i,
b(this,d,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(c,e,b){return!!a.data(c,b[3])},focusable:function(f){var e=f.nodeName.toLowerCase(),b=a.attr(f,"tabindex");if("area"===e){e=f.parentNode;b=e.name;if(!f.href||!b||"map"!==e.nodeName.toLowerCase())return!1;f=a("img[usemap=#"+b+"]")[0];return!!f&&c(f)}return(/input|select|textarea|button|object/.test(e)?!f.disabled:"a"==e?f.href||!isNaN(b):!isNaN(b))&&c(f)},tabbable:function(c){var e=a.attr(c,"tabindex");return(isNaN(e)||0<=e)&&a(c).is(":focusable")}}),
a(function(){var c=document.body,e=c.appendChild(e=document.createElement("div"));a.extend(e.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=100===e.offsetHeight;a.support.selectstart="onselectstart"in e;c.removeChild(e).style.display="none"}),a.extend(a.ui,{plugin:{add:function(c,e,b){var c=a.ui[c].prototype,d;for(d in b)c.plugins[d]=c.plugins[d]||[],c.plugins[d].push([e,b[d]])},call:function(a,e,b){if((e=a.plugins[e])&&a.element[0].parentNode)for(var d=0;d<e.length;d++)a.options[e[d][0]]&&
e[d][1].apply(a.element,b)}},contains:function(a,e){return document.compareDocumentPosition?a.compareDocumentPosition(e)&16:a!==e&&a.contains(e)},hasScroll:function(c,e){if("hidden"===a(c).css("overflow"))return!1;var e=e&&"left"===e?"scrollLeft":"scrollTop",b=!1;if(0<c[e])return!0;c[e]=1;b=0<c[e];c[e]=0;return b},isOverAxis:function(a,e,b){return a>e&&a<e+b},isOver:function(c,e,b,d,f,j){return a.ui.isOverAxis(c,b,f)&&a.ui.isOverAxis(e,d,j)}}))})(jQuery);
(function(a,f){if(a.cleanData){var c=a.cleanData;a.cleanData=function(e){for(var b=0,d;null!=(d=e[b]);b++)a(d).triggerHandler("remove");c(e)}}else{var g=a.fn.remove;a.fn.remove=function(e,b){return this.each(function(){b||(!e||a.filter(e,[this]).length)&&a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return g.call(a(this),e,b)})}}a.widget=function(e,b,d){var c=e.split(".")[0],f,e=e.split(".")[1];f=c+"-"+e;d||(d=b,b=a.Widget);a.expr[":"][f]=function(b){return!!a.data(b,
e)};a[c]=a[c]||{};a[c][e]=function(a,b){arguments.length&&this._createWidget(a,b)};b=new b;b.options=a.extend(!0,{},b.options);a[c][e].prototype=a.extend(!0,b,{namespace:c,widgetName:e,widgetEventPrefix:a[c][e].prototype.widgetEventPrefix||e,widgetBaseClass:f},d);a.widget.bridge(e,a[c][e])};a.widget.bridge=function(e,b){a.fn[e]=function(d){var c="string"===typeof d,g=Array.prototype.slice.call(arguments,1),l=this,d=!c&&g.length?a.extend.apply(null,[!0,d].concat(g)):d;if(c&&"_"===d.charAt(0))return l;
c?this.each(function(){var b=a.data(this,e),c=b&&a.isFunction(b[d])?b[d].apply(b,g):b;if(c!==b&&c!==f)return l=c,!1}):this.each(function(){var c=a.data(this,e);c?c.option(d||{})._init():a.data(this,e,new b(d,this))});return l}};a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(e,b){a.data(b,this.widgetName,this);this.element=a(b);this.options=a.extend(!0,{},this.options,this._getCreateOptions(),
e);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return a.metadata&&a.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(e,b){var d=e;if(0===arguments.length)return a.extend({},this.options);if("string"===typeof e){if(b===f)return this.options[e];d={};d[e]=b}this._setOptions(d);return this},_setOptions:function(e){var b=this;a.each(e,function(a,e){b._setOption(a,e)});return this},_setOption:function(a,b){this.options[a]=b;"disabled"===a&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",b);return this},enable:function(){return this._setOption("disabled",
!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(e,b,d){var c=this.options[e],b=a.Event(b);b.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();d=d||{};if(b.originalEvent)for(var e=a.event.props.length,f;e;)f=a.event.props[--e],b[f]=b.originalEvent[f];this.element.trigger(b,d);return!(a.isFunction(c)&&!1===c.call(this.element[0],b,d)||b.isDefaultPrevented())}}})(jQuery);
(function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var f=this;this.element.bind("mousedown."+this.widgetName,function(a){return f._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,f.widgetName+".preventClickEvent"))return a.removeData(c.target,f.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){f.originalEvent=
f.originalEvent||{};if(!f.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(f);this._mouseDownEvent=f;var c=this,g=1==f.which,e="string"==typeof this.options.cancel?a(f.target).parents().add(f.target).filter(this.options.cancel).length:!1;if(!g||e||!this._mouseCapture(f))return!0;this.mouseDelayMet=!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)&&(this._mouseStarted=
!1!==this._mouseStart(f),!this._mouseStarted))return f.preventDefault(),!0;!0===a.data(f.target,this.widgetName+".preventClickEvent")&&a.removeData(f.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(a){return c._mouseMove(a)};this._mouseUpDelegate=function(a){return c._mouseUp(a)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();return f.originalEvent.mouseHandled=!0}},_mouseMove:function(f){if(a.browser.msie&&
!(9<=document.documentMode)&&!f.button)return this._mouseUp(f);if(this._mouseStarted)return this._mouseDrag(f),f.preventDefault();this._mouseDistanceMet(f)&&this._mouseDelayMet(f)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,f))?this._mouseDrag(f):this._mouseUp(f));return!this._mouseStarted},_mouseUp:function(f){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=
!1,f.target==this._mouseDownEvent.target&&a.data(f.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(f));return!1},_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!0}})})(jQuery);
(function(a){a.ui=a.ui||{};var f=/left|center|right/,c=/top|center|bottom/,g=a.fn.position,e=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);var b=a.extend({},b),d=a(b.of),e=d[0],j=(b.collision||"flip").split(" "),l=b.offset?b.offset.split(" "):[0,0],n,m,k;9===e.nodeType?(n=d.width(),m=d.height(),k={top:0,left:0}):e.setTimeout?(n=d.width(),m=d.height(),k={top:d.scrollTop(),left:d.scrollLeft()}):e.preventDefault?(b.at="left top",n=m=0,k={top:b.of.pageY,left:b.of.pageX}):
(n=d.outerWidth(),m=d.outerHeight(),k=d.offset());a.each(["my","at"],function(){var a=(b[this]||"").split(" ");1===a.length&&(a=f.test(a[0])?a.concat(["center"]):c.test(a[0])?["center"].concat(a):["center","center"]);a[0]=f.test(a[0])?a[0]:"center";a[1]=c.test(a[1])?a[1]:"center";b[this]=a});1===j.length&&(j[1]=j[0]);l[0]=parseInt(l[0],10)||0;1===l.length&&(l[1]=l[0]);l[1]=parseInt(l[1],10)||0;"right"===b.at[0]?k.left+=n:"center"===b.at[0]&&(k.left+=n/2);"bottom"===b.at[1]?k.top+=m:"center"===b.at[1]&&
(k.top+=m/2);k.left+=l[0];k.top+=l[1];return this.each(function(){var d=a(this),e=d.outerWidth(),c=d.outerHeight(),f=parseInt(a.curCSS(this,"marginLeft",!0))||0,g=parseInt(a.curCSS(this,"marginTop",!0))||0,i=e+f+(parseInt(a.curCSS(this,"marginRight",!0))||0),w=c+g+(parseInt(a.curCSS(this,"marginBottom",!0))||0),o=a.extend({},k),A;"right"===b.my[0]?o.left-=e:"center"===b.my[0]&&(o.left-=e/2);"bottom"===b.my[1]?o.top-=c:"center"===b.my[1]&&(o.top-=c/2);o.left=Math.round(o.left);o.top=Math.round(o.top);
A={left:o.left-f,top:o.top-g};a.each(["left","top"],function(d,f){a.ui.position[j[d]]&&a.ui.position[j[d]][f](o,{targetWidth:n,targetHeight:m,elemWidth:e,elemHeight:c,collisionPosition:A,collisionWidth:i,collisionHeight:w,offset:l,my:b.my,at:b.at})});a.fn.bgiframe&&d.bgiframe();d.offset(a.extend(o,{using:b.using}))})};a.ui.position={fit:{left:function(b,d){var e=a(window),e=d.collisionPosition.left+d.collisionWidth-e.width()-e.scrollLeft();b.left=0<e?b.left-e:Math.max(b.left-d.collisionPosition.left,
b.left)},top:function(b,d){var e=a(window),e=d.collisionPosition.top+d.collisionHeight-e.height()-e.scrollTop();b.top=0<e?b.top-e:Math.max(b.top-d.collisionPosition.top,b.top)}},flip:{left:function(b,d){if("center"!==d.at[0]){var e=a(window),e=d.collisionPosition.left+d.collisionWidth-e.width()-e.scrollLeft(),c="left"===d.my[0]?-d.elemWidth:"right"===d.my[0]?d.elemWidth:0,f="left"===d.at[0]?d.targetWidth:-d.targetWidth,g=-2*d.offset[0];b.left+=0>d.collisionPosition.left?c+f+g:0<e?c+f+g:0}},top:function(b,
d){if("center"!==d.at[1]){var e=a(window),e=d.collisionPosition.top+d.collisionHeight-e.height()-e.scrollTop(),c="top"===d.my[1]?-d.elemHeight:"bottom"===d.my[1]?d.elemHeight:0,f="top"===d.at[1]?d.targetHeight:-d.targetHeight,g=-2*d.offset[1];b.top+=0>d.collisionPosition.top?c+f+g:0<e?c+f+g:0}}}};a.offset.setOffset||(a.offset.setOffset=function(b,d){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var e=a(b),c=e.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,
"left",!0),10)||0,c={top:d.top-c.top+f,left:d.left-c.left+g};"using"in d?d.using.call(b,c):e.css(c)},a.fn.offset=function(b){var d=this[0];return!d||!d.ownerDocument?null:b?this.each(function(){a.offset.setOffset(this,b)}):e.call(this)})})(jQuery);
(function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){"original"==this.options.helper&&!/^(?: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"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(f){var c=this.options;if(this.helper||c.disabled||a(f.target).is(".ui-resizable-handle"))return!1;
this.handle=this._getHandle(f);return!this.handle?!1:!0},_mouseStart:function(f){var c=this.options;this.helper=this._createHelper(f);this._cacheHelperProportions();a.ui.ddmanager&&(a.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};a.extend(this.offset,{click:{left:f.pageX-
this.offset.left,top:f.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(f);this.originalPageX=f.pageX;this.originalPageY=f.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);c.containment&&this._setContainment();if(!1===this._trigger("start",f))return this._clear(),!1;this._cacheHelperProportions();a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,f);this.helper.addClass("ui-draggable-dragging");
this._mouseDrag(f,!0);return!0},_mouseDrag:function(f,c){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!c){c=this._uiHash();if(!1===this._trigger("drag",f,c))return this._mouseUp({}),!1;this.position=c.position}if(!this.options.axis||"y"!=this.options.axis)this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||"x"!=this.options.axis)this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,f);return!1},
_mouseStop:function(f){var c=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,f));this.dropped&&(c=this.dropped,this.dropped=!1);if((!this.element[0]||!this.element[0].parentNode)&&"original"==this.options.helper)return!1;if("invalid"==this.options.revert&&!c||"valid"==this.options.revert&&c||!0===this.options.revert||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var g=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,
10),function(){!1!==g._trigger("stop",f)&&g._clear()})}else!1!==this._trigger("stop",f)&&this._clear();return!1},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(f){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;a(this.options.handle,this.element).find("*").andSelf().each(function(){this==f.target&&(c=!0)});return c},_createHelper:function(f){var c=this.options,f=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],
[f])):"clone"==c.helper?this.element.clone():this.element;f.parents("body").length||f.appendTo("parent"==c.appendTo?this.element[0].parentNode:c.appendTo);f[0]!=this.element[0]&&!/(fixed|absolute)/.test(f.css("position"))&&f.css("position","absolute");return f},_adjustOffsetFromHelper:function(f){"string"==typeof f&&(f=f.split(" "));a.isArray(f)&&(f={left:+f[0],top:+f[1]||0});"left"in f&&(this.offset.click.left=f.left+this.margins.left);"right"in f&&(this.offset.click.left=this.helperProportions.width-
f.right+this.margins.left);"top"in f&&(this.offset.click.top=f.top+this.margins.top);"bottom"in f&&(this.offset.click.top=this.helperProportions.height-f.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var f=this.offsetParent.offset();"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(f.left+=this.scrollParent.scrollLeft(),f.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==
document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&a.browser.msie)f={top:0,left:0};return{top:f.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:f.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){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()}}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 f=this.options;"parent"==f.containment&&
(f.containment=this.helper[0].parentNode);if("document"==f.containment||"window"==f.containment)this.containment=[("document"==f.containment?0:a(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,("document"==f.containment?0:a(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,("document"==f.containment?0:a(window).scrollLeft())+a("document"==f.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"==f.containment?0:a(window).scrollTop())+
(a("document"==f.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(f.containment)&&f.containment.constructor!=Array){var c=a(f.containment)[0];if(c){var f=a(f.containment).offset(),g="hidden"!=a(c).css("overflow");this.containment=[f.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0),f.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),
10)||0),f.left+(g?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,f.top+(g?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom]}}else f.containment.constructor==Array&&(this.containment=
f.containment)},_convertPositionTo:function(f,c){c||(c=this.position);var f="absolute"==f?1:-1,g="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName);return{top:c.top+this.offset.relative.top*f+this.offset.parent.top*f-(a.browser.safari&&526>a.browser.version&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():e?0:g.scrollTop())*
f),left:c.left+this.offset.relative.left*f+this.offset.parent.left*f-(a.browser.safari&&526>a.browser.version&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():e?0:g.scrollLeft())*f)}},_generatePosition:function(f){var c=this.options,g="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName),b=f.pageX,d=f.pageY;this.originalPosition&&
(this.containment&&(f.pageX-this.offset.click.left<this.containment[0]&&(b=this.containment[0]+this.offset.click.left),f.pageY-this.offset.click.top<this.containment[1]&&(d=this.containment[1]+this.offset.click.top),f.pageX-this.offset.click.left>this.containment[2]&&(b=this.containment[2]+this.offset.click.left),f.pageY-this.offset.click.top>this.containment[3]&&(d=this.containment[3]+this.offset.click.top)),c.grid&&(d=this.originalPageY+Math.round((d-this.originalPageY)/c.grid[1])*c.grid[1],d=this.containment?
!(d-this.offset.click.top<this.containment[1]||d-this.offset.click.top>this.containment[3])?d:!(d-this.offset.click.top<this.containment[1])?d-c.grid[1]:d+c.grid[1]:d,b=this.originalPageX+Math.round((b-this.originalPageX)/c.grid[0])*c.grid[0],b=this.containment?!(b-this.offset.click.left<this.containment[0]||b-this.offset.click.left>this.containment[2])?b:!(b-this.offset.click.left<this.containment[0])?b-c.grid[0]:b+c.grid[0]:b));return{top:d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+
(a.browser.safari&&526>a.browser.version&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollTop():e?0:g.scrollTop()),left:b-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&526>a.browser.version&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollLeft():e?0:g.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=!1},_trigger:function(f,c,g){g=g||this._uiHash();a.ui.plugin.call(this,f,[c,g]);"drag"==f&&(this.positionAbs=this._convertPositionTo("absolute"));return a.Widget.prototype._trigger.call(this,f,c,g)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.11"});a.ui.plugin.add("draggable","connectToSortable",{start:function(f,
c){var g=a(this).data("draggable"),e=g.options,b=a.extend({},c,{item:g.element});g.sortables=[];a(e.connectToSortable).each(function(){var d=a.data(this,"sortable");d&&!d.options.disabled&&(g.sortables.push({instance:d,shouldRevert:d.options.revert}),d.refreshPositions(),d._trigger("activate",f,b))})},stop:function(f,c){var g=a(this).data("draggable"),e=a.extend({},c,{item:g.element});a.each(g.sortables,function(){this.instance.isOver?(this.instance.isOver=0,g.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=
!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(f),this.instance.options.helper=this.instance.options._helper,"original"==g.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",f,e))})},drag:function(f,c){var g=a(this).data("draggable"),e=this;a.each(g.sortables,function(){this.instance.positionAbs=g.positionAbs;this.instance.helperProportions=g.helperProportions;this.instance.offset.click=
g.offset.click;this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},f.target=this.instance.currentItem[0],this.instance._mouseCapture(f,!0),this.instance._mouseStart(f,!0,!0),this.instance.offset.click.top=g.offset.click.top,this.instance.offset.click.left=
g.offset.click.left,this.instance.offset.parent.left-=g.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=g.offset.parent.top-this.instance.offset.parent.top,g._trigger("toSortable",f),g.dropped=this.instance.element,g.currentItem=g.element,this.instance.fromOutside=g),this.instance.currentItem&&this.instance._mouseDrag(f)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",
f,this.instance._uiHash(this.instance)),this.instance._mouseStop(f,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),g._trigger("fromSortable",f),g.dropped=!1)})}});a.ui.plugin.add("draggable","cursor",{start:function(){var f=a("body"),c=a(this).data("draggable").options;f.css("cursor")&&(c._cursor=f.css("cursor"));f.css("cursor",c.cursor)},stop:function(){var f=a(this).data("draggable").options;
f._cursor&&a("body").css("cursor",f._cursor)}});a.ui.plugin.add("draggable","iframeFix",{start:function(){var f=a(this).data("draggable").options;a(!0===f.iframeFix?"iframe":f.iframeFix).each(function(){a('<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(a(this).offset()).appendTo("body")})},stop:function(){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});
a.ui.plugin.add("draggable","opacity",{start:function(f,c){f=a(c.helper);c=a(this).data("draggable").options;f.css("opacity")&&(c._opacity=f.css("opacity"));f.css("opacity",c.opacity)},stop:function(f,c){f=a(this).data("draggable").options;f._opacity&&a(c.helper).css("opacity",f._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var f=a(this).data("draggable");f.scrollParent[0]!=document&&"HTML"!=f.scrollParent[0].tagName&&(f.overflowOffset=f.scrollParent.offset())},drag:function(f){var c=
a(this).data("draggable"),g=c.options,e=!1;if(c.scrollParent[0]!=document&&"HTML"!=c.scrollParent[0].tagName){if(!g.axis||"x"!=g.axis)c.overflowOffset.top+c.scrollParent[0].offsetHeight-f.pageY<g.scrollSensitivity?c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop+g.scrollSpeed:f.pageY-c.overflowOffset.top<g.scrollSensitivity&&(c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop-g.scrollSpeed);if(!g.axis||"y"!=g.axis)c.overflowOffset.left+c.scrollParent[0].offsetWidth-f.pageX<g.scrollSensitivity?
c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft+g.scrollSpeed:f.pageX-c.overflowOffset.left<g.scrollSensitivity&&(c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft-g.scrollSpeed)}else{if(!g.axis||"x"!=g.axis)f.pageY-a(document).scrollTop()<g.scrollSensitivity?e=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed):a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity&&(e=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed));if(!g.axis||"y"!=
g.axis)f.pageX-a(document).scrollLeft()<g.scrollSensitivity?e=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed):a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity&&(e=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed))}!1!==e&&a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,f)}});a.ui.plugin.add("draggable","snap",{start:function(){var f=a(this).data("draggable"),c=f.options;f.snapElements=[];a(c.snap.constructor!=String?c.snap.items||
":data(draggable)":c.snap).each(function(){var c=a(this),e=c.offset();this!=f.element[0]&&f.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:e.top,left:e.left})})},drag:function(f,c){for(var g=a(this).data("draggable"),e=g.options,b=e.snapTolerance,d=c.offset.left,i=d+g.helperProportions.width,j=c.offset.top,l=j+g.helperProportions.height,n=g.snapElements.length-1;0<=n;n--){var m=g.snapElements[n].left,k=m+g.snapElements[n].width,p=g.snapElements[n].top,q=p+g.snapElements[n].height;
if(m-b<d&&d<k+b&&p-b<j&&j<q+b||m-b<d&&d<k+b&&p-b<l&&l<q+b||m-b<i&&i<k+b&&p-b<j&&j<q+b||m-b<i&&i<k+b&&p-b<l&&l<q+b){if("inner"!=e.snapMode){var y=Math.abs(p-l)<=b,u=Math.abs(q-j)<=b,v=Math.abs(m-i)<=b,s=Math.abs(k-d)<=b;y&&(c.position.top=g._convertPositionTo("relative",{top:p-g.helperProportions.height,left:0}).top-g.margins.top);u&&(c.position.top=g._convertPositionTo("relative",{top:q,left:0}).top-g.margins.top);v&&(c.position.left=g._convertPositionTo("relative",{top:0,left:m-g.helperProportions.width}).left-
g.margins.left);s&&(c.position.left=g._convertPositionTo("relative",{top:0,left:k}).left-g.margins.left)}var w=y||u||v||s;"outer"!=e.snapMode&&(y=Math.abs(p-j)<=b,u=Math.abs(q-l)<=b,v=Math.abs(m-d)<=b,s=Math.abs(k-i)<=b,y&&(c.position.top=g._convertPositionTo("relative",{top:p,left:0}).top-g.margins.top),u&&(c.position.top=g._convertPositionTo("relative",{top:q-g.helperProportions.height,left:0}).top-g.margins.top),v&&(c.position.left=g._convertPositionTo("relative",{top:0,left:m}).left-g.margins.left),
s&&(c.position.left=g._convertPositionTo("relative",{top:0,left:k-g.helperProportions.width}).left-g.margins.left));!g.snapElements[n].snapping&&(y||u||v||s||w)&&g.options.snap.snap&&g.options.snap.snap.call(g.element,f,a.extend(g._uiHash(),{snapItem:g.snapElements[n].item}));g.snapElements[n].snapping=y||u||v||s||w}else g.snapElements[n].snapping&&g.options.snap.release&&g.options.snap.release.call(g.element,f,a.extend(g._uiHash(),{snapItem:g.snapElements[n].item})),g.snapElements[n].snapping=!1}}});
a.ui.plugin.add("draggable","stack",{start:function(){var f=a(this).data("draggable").options,f=a.makeArray(a(f.stack)).sort(function(c,e){return(parseInt(a(c).css("zIndex"),10)||0)-(parseInt(a(e).css("zIndex"),10)||0)});if(f.length){var c=parseInt(f[0].style.zIndex)||0;a(f).each(function(a){this.style.zIndex=c+a});this[0].style.zIndex=c+f.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(f,c){f=a(c.helper);c=a(this).data("draggable").options;f.css("zIndex")&&(c._zIndex=f.css("zIndex"));
f.css("zIndex",c.zIndex)},stop:function(f,c){f=a(this).data("draggable").options;f._zIndex&&a(c.helper).css("zIndex",f._zIndex)}})})(jQuery);
(function(a){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var f=this.options,c=f.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(a){return a.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[f.scope]=a.ui.ddmanager.droppables[f.scope]||[];a.ui.ddmanager.droppables[f.scope].push(this);
f.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var f=a.ui.ddmanager.droppables[this.options.scope],c=0;c<f.length;c++)f[c]==this&&f.splice(c,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(f,c){"accept"==f&&(this.accept=a.isFunction(c)?c:function(a){return a.is(c)});a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(f){var c=a.ui.ddmanager.current;this.options.activeClass&&
this.element.addClass(this.options.activeClass);c&&this._trigger("activate",f,this.ui(c))},_deactivate:function(f){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);c&&this._trigger("deactivate",f,this.ui(c))},_over:function(f){var c=a.ui.ddmanager.current;if(c&&(c.currentItem||c.element)[0]!=this.element[0])if(this.accept.call(this.element[0],c.currentItem||c.element))this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",
f,this.ui(c))},_out:function(f){var c=a.ui.ddmanager.current;if(c&&(c.currentItem||c.element)[0]!=this.element[0])if(this.accept.call(this.element[0],c.currentItem||c.element))this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",f,this.ui(c))},_drop:function(f,c){var g=c||a.ui.ddmanager.current;if(!g||(g.currentItem||g.element)[0]==this.element[0])return!1;var e=!1;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,
"droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope==g.options.scope&&b.accept.call(b.element[0],g.currentItem||g.element)&&a.ui.intersect(g,a.extend(b,{offset:b.element.offset()}),b.options.tolerance))return e=!0,!1});if(e)return!1;return this.accept.call(this.element[0],g.currentItem||g.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",f,this.ui(g)),
this.element):!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.11"});a.ui.intersect=function(f,c,g){if(!c.offset)return!1;var e=(f.positionAbs||f.position.absolute).left,b=e+f.helperProportions.width,d=(f.positionAbs||f.position.absolute).top,i=d+f.helperProportions.height,j=c.offset.left,l=j+c.proportions.width,n=c.offset.top,m=n+c.proportions.height;switch(g){case "fit":return j<=e&&b<=
l&&n<=d&&i<=m;case "intersect":return j<e+f.helperProportions.width/2&&b-f.helperProportions.width/2<l&&n<d+f.helperProportions.height/2&&i-f.helperProportions.height/2<m;case "pointer":return a.ui.isOver((f.positionAbs||f.position.absolute).top+(f.clickOffset||f.offset.click).top,(f.positionAbs||f.position.absolute).left+(f.clickOffset||f.offset.click).left,n,j,c.proportions.height,c.proportions.width);case "touch":return(d>=n&&d<=m||i>=n&&i<=m||d<n&&i>m)&&(e>=j&&e<=l||b>=j&&b<=l||e<j&&b>l);default:return!1}};
a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(f,c){var g=a.ui.ddmanager.droppables[f.options.scope]||[],e=c?c.type:null,b=(f.currentItem||f.element).find(":data(droppable)").andSelf(),d=0;a:for(;d<g.length;d++)if(!(g[d].options.disabled||f&&!g[d].accept.call(g[d].element[0],f.currentItem||f.element))){for(var i=0;i<b.length;i++)if(b[i]==g[d].element[0]){g[d].proportions.height=0;continue a}g[d].visible="none"!=g[d].element.css("display");g[d].visible&&("mousedown"==
e&&g[d]._activate.call(g[d],c),g[d].offset=g[d].element.offset(),g[d].proportions={width:g[d].element[0].offsetWidth,height:g[d].element[0].offsetHeight})}},drop:function(f,c){var g=!1;a.each(a.ui.ddmanager.droppables[f.options.scope]||[],function(){if(this.options&&(!this.options.disabled&&this.visible&&a.ui.intersect(f,this,this.options.tolerance)&&(g=g||this._drop.call(this,c)),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],f.currentItem||f.element)))this.isout=1,this.isover=
0,this._deactivate.call(this,c)});return g},drag:function(f,c){f.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(f,c);a.each(a.ui.ddmanager.droppables[f.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var g=a.ui.intersect(f,this,this.options.tolerance);if(g=!g&&1==this.isover?"isout":g&&0==this.isover?"isover":null){var e;if(this.options.greedy){var b=this.element.parents(":data(droppable):eq(0)");b.length&&(e=a.data(b[0],"droppable"),e.greedyChild=
"isover"==g?1:0)}e&&"isover"==g&&(e.isover=0,e.isout=1,e._out.call(e,c));this[g]=1;this["isout"==g?"isover":"isout"]=0;this["isover"==g?"_over":"_out"].call(this,c);e&&"isout"==g&&(e.isout=0,e.isover=1,e._over.call(e,c))}}})}}})(jQuery);
(function(a){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var c=this,e=this.options;this.element.addClass("ui-resizable");a.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],
_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null});this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(/relative/.test(this.element.css("position"))&&a.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"}),this.element.wrap(a('<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=!0,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=e.handles||(!a(".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){"all"==
this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");var b=this.handles.split(",");this.handles={};for(var d=0;d<b.length;d++){var f=a.trim(b[d]),j=a('<div class="ui-resizable-handle ui-resizable-'+f+'"></div>');/sw|se|ne|nw/.test(f)&&j.css({zIndex:++e.zIndex});"se"==f&&j.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(j)}}this._renderAxis=function(b){var b=b||this.element,d;for(d in this.handles){this.handles[d].constructor==String&&(this.handles[d]=
a(this.handles[d],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var e=a(this.handles[d],this.element),c=0,c=/sw|ne|nw|se|n|s/.test(d)?e.outerHeight():e.outerWidth(),e=["padding",/ne|nw|n/.test(d)?"Top":/se|sw|s/.test(d)?"Bottom":/^e$/.test(d)?"Right":"Left"].join("");b.css(e,c);this._proportionallyResize()}a(this.handles[d])}};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){if(!c.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);c.axis=a&&a[1]?a[1]:"se"}});e.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").hover(function(){a(this).removeClass("ui-resizable-autohide");c._handles.show()},function(){c.resizing||(a(this).addClass("ui-resizable-autohide"),c._handles.hide())}));this._mouseInit()},destroy:function(){this._mouseDestroy();var c=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
if(this.elementIsWrapper){c(this.element);var e=this.element;e.after(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);c(this.originalElement);return this},_mouseCapture:function(c){var e=!1,b;for(b in this.handles)a(this.handles[b])[0]==c.target&&(e=!0);return!this.options.disabled&&e},_mouseStart:function(c){var e=this.options,b=this.element.position(),
d=this.element;this.resizing=!0;this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};(d.is(".ui-draggable")||/absolute/.test(d.css("position")))&&d.css({position:"absolute",top:b.top,left:b.left});a.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();var b=f(this.helper.css("left")),i=f(this.helper.css("top"));e.containment&&(b+=a(e.containment).scrollLeft()||0,i+=a(e.containment).scrollTop()||0);this.offset=
this.helper.offset();this.position={left:b,top:i};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:b,top:i};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:c.pageX,top:c.pageY};this.aspectRatio="number"==typeof e.aspectRatio?e.aspectRatio:
this.originalSize.width/this.originalSize.height||1;e=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor","auto"==e?this.axis+"-resize":e);d.addClass("ui-resizable-resizing");this._propagate("start",c);return!0},_mouseDrag:function(a){var e=this.helper,b=this.originalMousePosition,d=this._change[this.axis];if(!d)return!1;b=d.apply(this,[a,a.pageX-b.left||0,a.pageY-b.top||0]);if(this._aspectRatio||a.shiftKey)b=this._updateRatio(b,a);b=this._respectSize(b,a);this._propagate("resize",
a);e.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(b);this._trigger("resize",a,this.ui());return!1},_mouseStop:function(c){this.resizing=!1;var e=this.options;if(this._helper){var b=this._proportionallyResizeElements,d=b.length&&/textarea/i.test(b[0].nodeName),b=d&&a.ui.hasScroll(b[0],"left")?0:this.sizeDiff.height,d=d?0:
this.sizeDiff.width,d={width:this.helper.width()-d,height:this.helper.height()-b},b=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null,f=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;e.animate||this.element.css(a.extend(d,{top:f,left:b}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!e.animate&&this._proportionallyResize()}a("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");
this._propagate("stop",c);this._helper&&this.helper.remove();return!1},_updateCache:function(a){this.offset=this.helper.offset();c(a.left)&&(this.position.left=a.left);c(a.top)&&(this.position.top=a.top);c(a.height)&&(this.size.height=a.height);c(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var e=this.position,b=this.size,d=this.axis;a.height?a.width=b.height*this.aspectRatio:a.width&&(a.height=b.width/this.aspectRatio);"sw"==d&&(a.left=e.left+(b.width-a.width),a.top=null);"nw"==
d&&(a.top=e.top+(b.height-a.height),a.left=e.left+(b.width-a.width));return a},_respectSize:function(a){var e=this.options,b=this.axis,d=c(a.width)&&e.maxWidth&&e.maxWidth<a.width,f=c(a.height)&&e.maxHeight&&e.maxHeight<a.height,j=c(a.width)&&e.minWidth&&e.minWidth>a.width,l=c(a.height)&&e.minHeight&&e.minHeight>a.height;j&&(a.width=e.minWidth);l&&(a.height=e.minHeight);d&&(a.width=e.maxWidth);f&&(a.height=e.maxHeight);var n=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,
k=/sw|nw|w/.test(b),b=/nw|ne|n/.test(b);j&&k&&(a.left=n-e.minWidth);d&&k&&(a.left=n-e.maxWidth);l&&b&&(a.top=m-e.minHeight);f&&b&&(a.top=m-e.maxHeight);(e=!a.width&&!a.height)&&!a.left&&a.top?a.top=null:e&&!a.top&&a.left&&(a.left=null);return a},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var c=this.helper||this.element,e=0;e<this._proportionallyResizeElements.length;e++){var b=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[b.css("borderTopWidth"),
b.css("borderRightWidth"),b.css("borderBottomWidth"),b.css("borderLeftWidth")],f=[b.css("paddingTop"),b.css("paddingRight"),b.css("paddingBottom"),b.css("paddingLeft")];this.borderDif=a.map(d,function(a,b){a=parseInt(a,10)||0;b=parseInt(f[b],10)||0;return a+b})}a.browser.msie&&(a(c).is(":hidden")||a(c).parents(":hidden").length)||b.css({height:c.height()-this.borderDif[0]-this.borderDif[2]||0,width:c.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var c=this.options;this.elementOffset=
this.element.offset();if(this._helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var e=a.browser.msie&&7>a.browser.version,b=e?1:0,e=e?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-b+"px",top:this.elementOffset.top-b+"px",zIndex:++c.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,e){return{width:this.originalSize.width+
e}},w:function(a,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(a,e,b){return{top:this.originalPosition.top+b,height:this.originalSize.height-b}},s:function(a,e,b){return{height:this.originalSize.height+b}},se:function(c,e,b){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[c,e,b]))},sw:function(c,e,b){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[c,e,b]))},ne:function(c,e,b){return a.extend(this._change.n.apply(this,
arguments),this._change.e.apply(this,[c,e,b]))},nw:function(c,e,b){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[c,e,b]))}},_propagate:function(c,e){a.ui.plugin.call(this,c,[e,this.ui()]);"resize"!=c&&this._trigger(c,e,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}}});a.extend(a.ui.resizable,
{version:"1.8.11"});a.ui.plugin.add("resizable","alsoResize",{start:function(){var c=a(this).data("resizable").options,e=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10),position:b.css("position")})})};"object"==typeof c.alsoResize&&!c.alsoResize.parentNode?c.alsoResize.length?(c.alsoResize=c.alsoResize[0],e(c.alsoResize)):a.each(c.alsoResize,function(a){e(a)}):
e(c.alsoResize)},resize:function(c,e){var b=a(this).data("resizable"),c=b.options,d=b.originalSize,f=b.originalPosition,j={height:b.size.height-d.height||0,width:b.size.width-d.width||0,top:b.position.top-f.top||0,left:b.position.left-f.left||0},l=function(d,c){a(d).each(function(){var d=a(this),f=a(this).data("resizable-alsoresize"),g={},i=c&&c.length?c:d.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(i,function(a,b){if((a=(f[b]||0)+(j[b]||0))&&0<=
a)g[b]=a||null});a.browser.opera&&/relative/.test(d.css("position"))&&(b._revertToRelativePosition=!0,d.css({position:"absolute",top:"auto",left:"auto"}));d.css(g)})};"object"==typeof c.alsoResize&&!c.alsoResize.nodeType?a.each(c.alsoResize,function(a,b){l(a,b)}):l(c.alsoResize)},stop:function(){var c=a(this).data("resizable"),e=c.options,b=function(b){a(b).each(function(){var b=a(this);b.css({position:b.data("resizable-alsoresize").position})})};c._revertToRelativePosition&&(c._revertToRelativePosition=
!1,"object"==typeof e.alsoResize&&!e.alsoResize.nodeType?a.each(e.alsoResize,function(a){b(a)}):b(e.alsoResize));a(this).removeData("resizable-alsoresize")}});a.ui.plugin.add("resizable","animate",{stop:function(c){var e=a(this).data("resizable"),b=e.options,d=e._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),j=f&&a.ui.hasScroll(d[0],"left")?0:e.sizeDiff.height,f={width:e.size.width-(f?0:e.sizeDiff.width),height:e.size.height-j},j=parseInt(e.element.css("left"),10)+(e.position.left-
e.originalPosition.left)||null,l=parseInt(e.element.css("top"),10)+(e.position.top-e.originalPosition.top)||null;e.element.animate(a.extend(f,l&&j?{top:l,left:j}:{}),{duration:b.animateDuration,easing:b.animateEasing,step:function(){var b={width:parseInt(e.element.css("width"),10),height:parseInt(e.element.css("height"),10),top:parseInt(e.element.css("top"),10),left:parseInt(e.element.css("left"),10)};d&&d.length&&a(d[0]).css({width:b.width,height:b.height});e._updateCache(b);e._propagate("resize",
c)}})}});a.ui.plugin.add("resizable","containment",{start:function(){var c=a(this).data("resizable"),e=c.element,b=c.options.containment;if(e=b instanceof a?b.get(0):/parent/.test(b)?e.parent().get(0):b)if(c.containerElement=a(e),/document/.test(b)||b==document)c.containerOffset={left:0,top:0},c.containerPosition={left:0,top:0},c.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var d=a(e),i=[];a(["Top",
"Right","Left","Bottom"]).each(function(a,b){i[a]=f(d.css("padding"+b))});c.containerOffset=d.offset();c.containerPosition=d.position();c.containerSize={height:d.innerHeight()-i[3],width:d.innerWidth()-i[1]};var b=c.containerOffset,j=c.containerSize.height,l=c.containerSize.width,l=a.ui.hasScroll(e,"left")?e.scrollWidth:l,j=a.ui.hasScroll(e)?e.scrollHeight:j;c.parentData={element:e,left:b.left,top:b.top,width:l,height:j}}},resize:function(c){var e=a(this).data("resizable"),b=e.options,d=e.containerOffset,
f=e.position,c=e._aspectRatio||c.shiftKey,j={top:0,left:0},l=e.containerElement;l[0]!=document&&/static/.test(l.css("position"))&&(j=d);if(f.left<(e._helper?d.left:0))e.size.width+=e._helper?e.position.left-d.left:e.position.left-j.left,c&&(e.size.height=e.size.width/b.aspectRatio),e.position.left=b.helper?d.left:0;if(f.top<(e._helper?d.top:0))e.size.height+=e._helper?e.position.top-d.top:e.position.top,c&&(e.size.width=e.size.height*b.aspectRatio),e.position.top=e._helper?d.top:0;e.offset.left=e.parentData.left+
e.position.left;e.offset.top=e.parentData.top+e.position.top;b=Math.abs((e._helper?e.offset.left-j.left:e.offset.left-j.left)+e.sizeDiff.width);d=Math.abs((e._helper?e.offset.top-j.top:e.offset.top-d.top)+e.sizeDiff.height);f=e.containerElement.get(0)==e.element.parent().get(0);j=/relative|absolute/.test(e.containerElement.css("position"));f&&j&&(b-=e.parentData.left);b+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-b,c&&(e.size.height=e.size.width/e.aspectRatio));d+e.size.height>=
e.parentData.height&&(e.size.height=e.parentData.height-d,c&&(e.size.width=e.size.height*e.aspectRatio))},stop:function(){var c=a(this).data("resizable"),e=c.options,b=c.containerOffset,d=c.containerPosition,f=c.containerElement,j=a(c.helper),l=j.offset(),n=j.outerWidth()-c.sizeDiff.width,j=j.outerHeight()-c.sizeDiff.height;c._helper&&!e.animate&&/relative/.test(f.css("position"))&&a(this).css({left:l.left-d.left-b.left,width:n,height:j});c._helper&&!e.animate&&/static/.test(f.css("position"))&&a(this).css({left:l.left-
d.left-b.left,width:n,height:j})}});a.ui.plugin.add("resizable","ghost",{start:function(){var c=a(this).data("resizable"),e=c.options,b=c.size;c.ghost=c.originalElement.clone();c.ghost.css({opacity:0.25,display:"block",position:"relative",height:b.height,width:b.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof e.ghost?e.ghost:"");c.ghost.appendTo(c.helper)},resize:function(){var c=a(this).data("resizable");c.ghost&&c.ghost.css({position:"relative",height:c.size.height,
width:c.size.width})},stop:function(){var c=a(this).data("resizable");c.ghost&&c.helper&&c.helper.get(0).removeChild(c.ghost.get(0))}});a.ui.plugin.add("resizable","grid",{resize:function(){var c=a(this).data("resizable"),e=c.options,b=c.size,d=c.originalSize,f=c.originalPosition,j=c.axis;e.grid="number"==typeof e.grid?[e.grid,e.grid]:e.grid;var l=Math.round((b.width-d.width)/(e.grid[0]||1))*(e.grid[0]||1),e=Math.round((b.height-d.height)/(e.grid[1]||1))*(e.grid[1]||1);/^(se|s|e)$/.test(j)?(c.size.width=
d.width+l,c.size.height=d.height+e):/^(ne)$/.test(j)?(c.size.width=d.width+l,c.size.height=d.height+e,c.position.top=f.top-e):(/^(sw)$/.test(j)?(c.size.width=d.width+l,c.size.height=d.height+e):(c.size.width=d.width+l,c.size.height=d.height+e,c.position.top=f.top-e),c.position.left=f.left-l)}});var f=function(a){return parseInt(a,10)||0},c=function(a){return!isNaN(parseInt(a,10))}})(jQuery);
(function(a){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var f=this;this.element.addClass("ui-selectable");this.dragged=!1;var c;this.refresh=function(){c=a(f.options.filter,f.element[0]);c.each(function(){var c=a(this),e=c.offset();a.data(this,"selectable-item",{element:this,$element:c,left:e.left,top:e.top,right:e.left+c.outerWidth(),bottom:e.top+c.outerHeight(),startselected:!1,selected:c.hasClass("ui-selected"),
selecting:c.hasClass("ui-selecting"),unselecting:c.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a("<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(f){var c=this;this.opos=[f.pageX,
f.pageY];if(!this.options.disabled){var g=this.options;this.selectees=a(g.filter,this.element[0]);this._trigger("start",f);a(g.appendTo).append(this.helper);this.helper.css({left:f.clientX,top:f.clientY,width:0,height:0});g.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=!0;f.metaKey||(e.$element.removeClass("ui-selected"),e.selected=!1,e.$element.addClass("ui-unselecting"),e.unselecting=!0,c._trigger("unselecting",
f,{unselecting:e.element}))});a(f.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){var b=!f.metaKey||!e.$element.hasClass("ui-selected");e.$element.removeClass(b?"ui-unselecting":"ui-selected").addClass(b?"ui-selecting":"ui-unselecting");e.unselecting=!b;e.selecting=b;(e.selected=b)?c._trigger("selecting",f,{selecting:e.element}):c._trigger("unselecting",f,{unselecting:e.element});return!1}})}},_mouseDrag:function(f){var c=this;this.dragged=!0;if(!this.options.disabled){var g=
this.options,e=this.opos[0],b=this.opos[1],d=f.pageX,i=f.pageY;if(e>d)var j=d,d=e,e=j;b>i&&(j=i,i=b,b=j);this.helper.css({left:e,top:b,width:d-e,height:i-b});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(j&&j.element!=c.element[0]){var n=!1;"touch"==g.tolerance?n=!(j.left>d||j.right<e||j.top>i||j.bottom<b):"fit"==g.tolerance&&(n=j.left>e&&j.right<d&&j.top>b&&j.bottom<i);n?(j.selected&&(j.$element.removeClass("ui-selected"),j.selected=!1),j.unselecting&&(j.$element.removeClass("ui-unselecting"),
j.unselecting=!1),j.selecting||(j.$element.addClass("ui-selecting"),j.selecting=!0,c._trigger("selecting",f,{selecting:j.element}))):(j.selecting&&(f.metaKey&&j.startselected?(j.$element.removeClass("ui-selecting"),j.selecting=!1,j.$element.addClass("ui-selected"),j.selected=!0):(j.$element.removeClass("ui-selecting"),j.selecting=!1,j.startselected&&(j.$element.addClass("ui-unselecting"),j.unselecting=!0),c._trigger("unselecting",f,{unselecting:j.element}))),j.selected&&!f.metaKey&&!j.startselected&&
(j.$element.removeClass("ui-selected"),j.selected=!1,j.$element.addClass("ui-unselecting"),j.unselecting=!0,c._trigger("unselecting",f,{unselecting:j.element})))}});return!1}},_mouseStop:function(f){var c=this;this.dragged=!1;a(".ui-unselecting",this.element[0]).each(function(){var g=a.data(this,"selectable-item");g.$element.removeClass("ui-unselecting");g.unselecting=!1;g.startselected=!1;c._trigger("unselected",f,{unselected:g.element})});a(".ui-selecting",this.element[0]).each(function(){var g=
a.data(this,"selectable-item");g.$element.removeClass("ui-selecting").addClass("ui-selected");g.selecting=!1;g.selected=!0;g.startselected=!0;c._trigger("selected",f,{selected:g.element})});this._trigger("stop",f);this.helper.remove();return!1}});a.extend(a.ui.selectable,{version:"1.8.11"})})(jQuery);
(function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=
this.items.length?/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1;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;0<=a;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(f,c){"disabled"===f?(this.options[f]=c,this.widget()[c?
"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(f,c){if(this.reverting||this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(f);var g=null,e=this;a(f.target).parents().each(function(){if(a.data(this,"sortable-item")==e)return g=a(this),!1});a.data(f.target,"sortable-item")==e&&(g=a(f.target));if(!g)return!1;if(this.options.handle&&!c){var b=!1;a(this.options.handle,g).find("*").andSelf().each(function(){this==
f.target&&(b=!0)});if(!b)return!1}this.currentItem=g;this._removeCurrentsFromItems();return!0},_mouseStart:function(f,c,g){c=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(f);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");a.extend(this.offset,{click:{left:f.pageX-this.offset.left,top:f.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(f);this.originalPageX=f.pageX;this.originalPageY=f.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();
c.containment&&this._setContainment();c.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",c.cursor));c.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",c.opacity));c.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",c.zIndex));this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());
this._trigger("start",f,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!g)for(g=this.containers.length-1;0<=g;g--)this.containers[g]._trigger("activate",f,this._uiHash(this));a.ui.ddmanager&&(a.ui.ddmanager.current=this);a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,f);this.dragging=!0;this.helper.addClass("ui-sortable-helper");this._mouseDrag(f);return!0},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");
this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,g=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-f.pageY<c.scrollSensitivity?this.scrollParent[0].scrollTop=g=this.scrollParent[0].scrollTop+c.scrollSpeed:f.pageY-this.overflowOffset.top<c.scrollSensitivity&&(this.scrollParent[0].scrollTop=g=this.scrollParent[0].scrollTop-c.scrollSpeed),this.overflowOffset.left+
this.scrollParent[0].offsetWidth-f.pageX<c.scrollSensitivity?this.scrollParent[0].scrollLeft=g=this.scrollParent[0].scrollLeft+c.scrollSpeed:f.pageX-this.overflowOffset.left<c.scrollSensitivity&&(this.scrollParent[0].scrollLeft=g=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(f.pageY-a(document).scrollTop()<c.scrollSensitivity?g=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed):a(window).height()-(f.pageY-a(document).scrollTop())<c.scrollSensitivity&&(g=a(document).scrollTop(a(document).scrollTop()+
c.scrollSpeed)),f.pageX-a(document).scrollLeft()<c.scrollSensitivity?g=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed):a(window).width()-(f.pageX-a(document).scrollLeft())<c.scrollSensitivity&&(g=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed)));!1!==g&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,f)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||"y"!=this.options.axis)this.helper[0].style.left=this.position.left+"px";
if(!this.options.axis||"x"!=this.options.axis)this.helper[0].style.top=this.position.top+"px";for(c=this.items.length-1;0<=c;c--){var g=this.items[c],e=g.item[0],b=this._intersectsWithPointer(g);if(b&&e!=this.currentItem[0]&&this.placeholder[1==b?"next":"prev"]()[0]!=e&&!a.ui.contains(this.placeholder[0],e)&&("semi-dynamic"==this.options.type?!a.ui.contains(this.element[0],e):1)){this.direction=1==b?"down":"up";if("pointer"==this.options.tolerance||this._intersectsWithSides(g))this._rearrange(f,g);
else break;this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);a.ui.ddmanager&&a.ui.ddmanager.drag(this,f);this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(f,c){if(f){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,f);if(this.options.revert){var g=this,c=g.placeholder.offset();g.reverting=!0;a(this.helper).animate({left:c.left-this.offset.parent.left-g.margins.left+(this.offsetParent[0]==document.body?
0:this.offsetParent[0].scrollLeft),top:c.top-this.offset.parent.top-g.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){g._clear(f)})}else this._clear(f,c);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var f=this.containers.length-1;0<=f;f--)this.containers[f]._trigger("deactivate",
null,this._uiHash(this)),this.containers[f].containerCache.over&&(this.containers[f]._trigger("out",null,this._uiHash(this)),this.containers[f].containerCache.over=0)}this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!=this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):
a(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(f){var c=this._getItemsAsjQuery(f&&f.connected),g=[],f=f||{};a(c).each(function(){var e=(a(f.item||this).attr(f.attribute||"id")||"").match(f.expression||/(.+)[-=_](.+)/);e&&g.push((f.key||e[1]+"[]")+"="+(f.key&&f.expression?e[1]:e[2]))});!g.length&&f.key&&g.push(f.key+"=");return g.join("&")},toArray:function(f){var c=this._getItemsAsjQuery(f&&f.connected),g=[],f=f||{};c.each(function(){g.push(a(f.item||this).attr(f.attribute||
"id")||"")});return g},_intersectsWith:function(a){var c=this.positionAbs.left,g=c+this.helperProportions.width,e=this.positionAbs.top,b=e+this.helperProportions.height,d=a.left,i=d+a.width,j=a.top,l=j+a.height,n=this.offset.click.top,m=this.offset.click.left;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?e+n>j&&e+n<l&&c+m>d&&c+m<i:d<c+this.helperProportions.width/
2&&g-this.helperProportions.width/2<i&&j<e+this.helperProportions.height/2&&b-this.helperProportions.height/2<l},_intersectsWithPointer:function(f){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,f.top,f.height),f=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,f.left,f.width),c=c&&f,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return!c?!1:this.floating?g&&"right"==g||"down"==f?2:1:f&&("down"==f?2:1)},_intersectsWithSides:function(f){var c=
a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,f.top+f.height/2,f.height),f=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,f.left+f.width/2,f.width),g=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?"right"==e&&f||"left"==e&&!f:g&&("down"==g&&c||"up"==g&&!c)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!=a&&(0<a?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-
this.lastPositionAbs.left;return 0!=a&&(0<a?"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(f){var c=[],g=[],e=this._connectWith();if(e&&f)for(f=e.length-1;0<=f;f--)for(var b=a(e[f]),d=b.length-1;0<=d;d--){var i=a.data(b[d],"sortable");i&&i!=this&&!i.options.disabled&&g.push([a.isFunction(i.options.items)?i.options.items.call(i.element):
a(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i])}g.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(f=g.length-1;0<=f;f--)g[f][0].each(function(){c.push(this)});return a(c)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),c=0;c<this.items.length;c++)for(var g=
0;g<a.length;g++)a[g]==this.items[c].item[0]&&this.items.splice(c,1)},_refreshItems:function(f){this.items=[];this.containers=[this];var c=this.items,g=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],f,{item:this.currentItem}):a(this.options.items,this.element),this]],e=this._connectWith();if(e)for(var b=e.length-1;0<=b;b--)for(var d=a(e[b]),i=d.length-1;0<=i;i--){var j=a.data(d[i],"sortable");j&&j!=this&&!j.options.disabled&&(g.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],
f,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}for(b=g.length-1;0<=b;b--){f=g[b][1];e=g[b][0];i=0;for(d=e.length;i<d;i++)j=a(e[i]),j.data("sortable-item",f),c.push({item:j,instance:f,width:0,height:0,left:0,top:0})}},refreshPositions:function(f){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var c=this.items.length-1;0<=c;c--){var g=this.items[c],e=this.options.toleranceElement?a(this.options.toleranceElement,g.item):g.item;f||
(g.width=e.outerWidth(),g.height=e.outerHeight());e=e.offset();g.left=e.left;g.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(c=this.containers.length-1;0<=c;c--)e=this.containers[c].element.offset(),this.containers[c].containerCache.left=e.left,this.containers[c].containerCache.top=e.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight();
return this},_createPlaceholder:function(f){var c=f||this,g=c.options;if(!g.placeholder||g.placeholder.constructor==String){var e=g.placeholder;g.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];e||(b.style.visibility="hidden");return b},update:function(a,d){if(!e||g.forcePlaceholderSize)d.height()||d.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||
0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),d.width()||d.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(g.placeholder.element.call(c.element,c.currentItem));c.currentItem.after(c.placeholder);g.placeholder.update(c,c.placeholder)},_contactContainers:function(f){for(var c=null,g=null,e=this.containers.length-1;0<=e;e--)if(!a.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!c||
!a.ui.contains(this.containers[e].element[0],c.element[0]))c=this.containers[e],g=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",f,this._uiHash(this)),this.containers[e].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[g]._trigger("over",f,this._uiHash(this)),this.containers[g].containerCache.over=1;else if(this.currentContainer!=this.containers[g]){for(var c=1E4,e=null,b=this.positionAbs[this.containers[g].floating?"left":"top"],d=this.items.length-
1;0<=d;d--)if(a.ui.contains(this.containers[g].element[0],this.items[d].item[0])){var i=this.items[d][this.containers[g].floating?"left":"top"];Math.abs(i-b)<c&&(c=Math.abs(i-b),e=this.items[d])}if(e||this.options.dropOnEmpty)this.currentContainer=this.containers[g],e?this._rearrange(f,e,null,!0):this._rearrange(f,null,this.containers[g].element,!0),this._trigger("change",f,this._uiHash()),this.containers[g]._trigger("change",f,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,
this.placeholder),this.containers[g]._trigger("over",f,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(f){var c=this.options,f=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[f,this.currentItem])):"clone"==c.helper?this.currentItem.clone():this.currentItem;f.parents("body").length||a("parent"!=c.appendTo?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(f[0]);f[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")});(""==f[0].style.width||c.forceHelperSize)&&f.width(this.currentItem.width());(""==f[0].style.height||c.forceHelperSize)&&f.height(this.currentItem.height());return f},_adjustOffsetFromHelper:function(f){"string"==typeof f&&(f=f.split(" "));a.isArray(f)&&(f={left:+f[0],top:+f[1]||0});"left"in f&&(this.offset.click.left=f.left+this.margins.left);"right"in f&&(this.offset.click.left=this.helperProportions.width-
f.right+this.margins.left);"top"in f&&(this.offset.click.top=f.top+this.margins.top);"bottom"in f&&(this.offset.click.top=this.helperProportions.height-f.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var f=this.offsetParent.offset();"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(f.left+=this.scrollParent.scrollLeft(),f.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==
document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&a.browser.msie)f={top:0,left:0};return{top:f.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:f.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){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()}}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 f=this.options;"parent"==f.containment&&(f.containment=this.helper[0].parentNode);if("document"==f.containment||"window"==f.containment)this.containment=
[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a("document"==f.containment?document:window).width()-this.helperProportions.width-this.margins.left,(a("document"==f.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(f.containment)){var c=a(f.containment)[0],f=a(f.containment).offset(),g="hidden"!=a(c).css("overflow");this.containment=
[f.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,f.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,f.left+(g?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,f.top+(g?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),
10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,c){c||(c=this.position);var f="absolute"==f?1:-1,g="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName);return{top:c.top+this.offset.relative.top*f+this.offset.parent.top*f-(a.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==
this.cssPosition?-this.scrollParent.scrollTop():e?0:g.scrollTop())*f),left:c.left+this.offset.relative.left*f+this.offset.parent.left*f-(a.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():e?0:g.scrollLeft())*f)}},_generatePosition:function(f){var c=this.options,g="absolute"==this.cssPosition&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName);
"relative"==this.cssPosition&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var b=f.pageX,d=f.pageY;this.originalPosition&&(this.containment&&(f.pageX-this.offset.click.left<this.containment[0]&&(b=this.containment[0]+this.offset.click.left),f.pageY-this.offset.click.top<this.containment[1]&&(d=this.containment[1]+this.offset.click.top),f.pageX-this.offset.click.left>this.containment[2]&&(b=this.containment[2]+this.offset.click.left),
f.pageY-this.offset.click.top>this.containment[3]&&(d=this.containment[3]+this.offset.click.top)),c.grid&&(d=this.originalPageY+Math.round((d-this.originalPageY)/c.grid[1])*c.grid[1],d=this.containment?!(d-this.offset.click.top<this.containment[1]||d-this.offset.click.top>this.containment[3])?d:!(d-this.offset.click.top<this.containment[1])?d-c.grid[1]:d+c.grid[1]:d,b=this.originalPageX+Math.round((b-this.originalPageX)/c.grid[0])*c.grid[0],b=this.containment?!(b-this.offset.click.left<this.containment[0]||
b-this.offset.click.left>this.containment[2])?b:!(b-this.offset.click.left<this.containment[0])?b-c.grid[0]:b+c.grid[0]:b));return{top:d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollTop():e?0:g.scrollTop()),left:b-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollLeft():
e?0:g.scrollLeft())}},_rearrange:function(a,c,g,e){g?g[0].appendChild(this.placeholder[0]):c.item[0].parentNode.insertBefore(this.placeholder[0],"down"==this.direction?c.item[0]:c.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var b=this,d=this.counter;window.setTimeout(function(){d==b.counter&&b.refreshPositions(!e)},0)},_clear:function(f,c){this.reverting=!1;var g=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=
null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if("auto"==this._storedCSS[e]||"static"==this._storedCSS[e])this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&g.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))});(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&
!c&&g.push(function(a){this._trigger("update",a,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||g.push(function(a){this._trigger("remove",a,this._uiHash())});for(e=this.containers.length-1;0<=e;e--)a.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!c&&(g.push(function(a){return function(d){a._trigger("receive",d,this._uiHash(this))}}.call(this,this.containers[e])),g.push(function(a){return function(d){a._trigger("update",d,this._uiHash(this))}}.call(this,
this.containers[e])))}for(e=this.containers.length-1;0<=e;e--)c||g.push(function(a){return function(d){a._trigger("deactivate",d,this._uiHash(this))}}.call(this,this.containers[e])),this.containers[e].containerCache.over&&(g.push(function(a){return function(d){a._trigger("out",d,this._uiHash(this))}}.call(this,this.containers[e])),this.containers[e].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);
this._storedZIndex&&this.helper.css("zIndex","auto"==this._storedZIndex?"":this._storedZIndex);this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",f,this._uiHash());for(e=0;e<g.length;e++)g[e].call(this,f);this._trigger("stop",f,this._uiHash())}return!1}c||this._trigger("beforeStop",f,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!c){for(e=0;e<g.length;e++)g[e].call(this,
f);this._trigger("stop",f,this._uiHash())}this.fromOutside=!1;return!0},_trigger:function(){!1===a.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(f){var c=f||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:f?f.element:null}}});a.extend(a.ui.sortable,{version:"1.8.11"})})(jQuery);
(function(a){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var f=this,c=f.options;f.running=0;f.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
f.headers=f.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){c.disabled||a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){c.disabled||a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){c.disabled||a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){c.disabled||a(this).removeClass("ui-state-focus")});f.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
if(c.navigation){var g=f.element.find("a").filter(c.navigationFilter).eq(0);if(g.length){var e=g.closest(".ui-accordion-header");f.active=e.length?e:g.closest(".ui-accordion-content").prev()}}f.active=f._findActive(f.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");f.active.next().addClass("ui-accordion-content-active");f._createIcons();f.resize();f.element.attr("role","tablist");f.headers.attr("role","tab").bind("keydown.accordion",
function(a){return f._keydown(a)}).next().attr("role","tabpanel");f.headers.not(f.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();f.active.length?f.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):f.headers.eq(0).attr("tabIndex",0);a.browser.safari||f.headers.find("a").attr("tabIndex",-1);c.event&&f.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(a){f._clickHandler.call(f,a,this);a.preventDefault()})},_createIcons:function(){var f=
this.options;f.icons&&(a("<span></span>").addClass("ui-icon "+f.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(f.icons.header).toggleClass(f.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 f=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 c=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");(f.autoHeight||f.fillHeight)&&c.css("height","");return a.Widget.prototype.destroy.call(this)},_setOption:function(f,c){a.Widget.prototype._setOption.apply(this,arguments);"active"==f&&this.activate(c);"icons"==f&&(this._destroyIcons(),
c&&this._createIcons());if("disabled"==f)this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(f){if(!this.options.disabled&&!f.altKey&&!f.ctrlKey){var c=a.ui.keyCode,g=this.headers.length,e=this.headers.index(f.target),b=!1;switch(f.keyCode){case c.RIGHT:case c.DOWN:b=this.headers[(e+1)%g];break;case c.LEFT:case c.UP:b=this.headers[(e-1+g)%g];break;case c.SPACE:case c.ENTER:this._clickHandler({target:f.target},f.target),f.preventDefault()}return b?
(a(f.target).attr("tabIndex",-1),a(b).attr("tabIndex",0),b.focus(),!1):!0}},resize:function(){var f=this.options,c;if(f.fillSpace){if(a.browser.msie){var g=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height();a.browser.msie&&this.element.parent().css("overflow",g);this.headers.each(function(){c-=a(this).outerHeight(!0)});this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow",
"auto")}else f.autoHeight&&(c=0,this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c));return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(f){return f?"number"===typeof f?this.headers.filter(":eq("+f+")"):this.headers.not(this.headers.not(f)):!1===f?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(f,c){var g=this.options;if(!g.disabled)if(f.target){if(f=a(f.currentTarget||
c),c=f[0]===this.active[0],g.active=g.collapsible&&c?!1:this.headers.index(f),!(this.running||!g.collapsible&&c)){var e=this.active,b=f.next(),d=this.active.next(),i={options:g,newHeader:c&&g.collapsible?a([]):f,oldHeader:this.active,newContent:c&&g.collapsible?a([]):b,oldContent:d},j=this.headers.index(this.active[0])>this.headers.index(f[0]);this.active=c?a([]):f;this._toggle(b,d,i,c,j);e.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header);
c||(f.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(g.icons.header).addClass(g.icons.headerSelected),f.next().addClass("ui-accordion-content-active"))}}else if(g.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header);this.active.next().addClass("ui-accordion-content-active");var d=this.active.next(),
i={options:g,newHeader:a([]),oldHeader:g.active,newContent:a([]),oldContent:d},b=this.active=a([]);this._toggle(b,d,i)}},_toggle:function(f,c,g,e,b){var d=this,i=d.options;d.toShow=f;d.toHide=c;d.data=g;var j=function(){if(d)return d._completed.apply(d,arguments)};d._trigger("changestart",null,d.data);d.running=0===c.size()?f.size():c.size();if(i.animated){g={};g=i.collapsible&&e?{toShow:a([]),toHide:c,complete:j,down:b,autoHeight:i.autoHeight||i.fillSpace}:{toShow:f,toHide:c,complete:j,down:b,autoHeight:i.autoHeight||
i.fillSpace};i.proxied||(i.proxied=i.animated);i.proxiedDuration||(i.proxiedDuration=i.duration);i.animated=a.isFunction(i.proxied)?i.proxied(g):i.proxied;i.duration=a.isFunction(i.proxiedDuration)?i.proxiedDuration(g):i.proxiedDuration;var e=a.ui.accordion.animations,l=i.duration,n=i.animated;n&&!e[n]&&!a.easing[n]&&(n="slide");e[n]||(e[n]=function(a){this.slide(a,{easing:n,duration:l||700})});e[n](g)}else i.collapsible&&e?f.toggle():(c.hide(),f.show()),j(!0);c.prev().attr({"aria-expanded":"false",
"aria-selected":"false",tabIndex:-1}).blur();f.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;this.running||(this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&&(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data))}});a.extend(a.ui.accordion,{version:"1.8.11",
animations:{slide:function(f,c){f=a.extend({easing:"swing",duration:300},f,c);if(f.toHide.size())if(f.toShow.size()){var g=f.toShow.css("overflow"),e=0,b={},d={},i,c=f.toShow;i=c[0].style.width;c.width(parseInt(c.parent().width(),10)-parseInt(c.css("paddingLeft"),10)-parseInt(c.css("paddingRight"),10)-(parseInt(c.css("borderLeftWidth"),10)||0)-(parseInt(c.css("borderRightWidth"),10)||0));a.each(["height","paddingTop","paddingBottom"],function(e,c){d[c]="hide";e=(""+a.css(f.toShow[0],c)).match(/^([\d+-.]+)(.*)$/);
b[c]={value:e[1],unit:e[2]||"px"}});f.toShow.css({height:0,overflow:"hidden"}).show();f.toHide.filter(":hidden").each(f.complete).end().filter(":visible").animate(d,{step:function(a,d){"height"==d.prop&&(e=0===d.end-d.start?0:(d.now-d.start)/(d.end-d.start));f.toShow[0].style[d.prop]=e*b[d.prop].value+b[d.prop].unit},duration:f.duration,easing:f.easing,complete:function(){f.autoHeight||f.toShow.css("height","");f.toShow.css({width:i,overflow:g});f.complete()}})}else f.toHide.animate({height:"hide",
paddingTop:"hide",paddingBottom:"hide"},f);else f.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},f)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery);
(function(a){var f=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var c=this,f=this.element[0].ownerDocument,e;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(b){if(!c.options.disabled&&!c.element.attr("readonly")){e=!1;var d=
a.ui.keyCode;switch(b.keyCode){case d.PAGE_UP:c._move("previousPage",b);break;case d.PAGE_DOWN:c._move("nextPage",b);break;case d.UP:c._move("previous",b);b.preventDefault();break;case d.DOWN:c._move("next",b);b.preventDefault();break;case d.ENTER:case d.NUMPAD_ENTER:c.menu.active&&(e=!0,b.preventDefault());case d.TAB:if(!c.menu.active)break;c.menu.select(b);break;case d.ESCAPE:c.element.val(c.term);c.close(b);break;default:clearTimeout(c.searching),c.searching=setTimeout(function(){c.term!=c.element.val()&&
(c.selectedItem=null,c.search(null,b))},c.options.delay)}}}).bind("keypress.autocomplete",function(a){e&&(e=!1,a.preventDefault())}).bind("focus.autocomplete",function(){c.options.disabled||(c.selectedItem=null,c.previous=c.element.val())}).bind("blur.autocomplete",function(a){c.options.disabled||(clearTimeout(c.searching),c.closing=setTimeout(function(){c.close(a);c._change(a)},150))});this._initSource();this.response=function(){return c._response.apply(c,arguments)};this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||
"body",f)[0]).mousedown(function(b){var d=c.menu.element[0];a(b.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(b){b.target!==c.element[0]&&b.target!==d&&!a.ui.contains(d,b.target)&&c.close()})},1);setTimeout(function(){clearTimeout(c.closing)},13)}).menu({focus:function(a,d){d=d.item.data("item.autocomplete");!1!==c._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&c.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),
j=c.previous;c.element[0]!==f.activeElement&&(c.element.focus(),c.previous=j,setTimeout(function(){c.previous=j;c.selectedItem=e},1));!1!==c._trigger("select",a,{item:e})&&c.element.val(e.value);c.term=c.element.val();c.close(a);c.selectedItem=e},blur:function(){c.menu.element.is(":visible")&&c.element.val()!==c.term&&c.element.val(c.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");a.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();a.Widget.prototype.destroy.call(this)},_setOption:function(c,f){a.Widget.prototype._setOption.apply(this,arguments);"source"===c&&this._initSource();"appendTo"===c&&this.menu.element.appendTo(a(f||"body",this.element[0].ownerDocument)[0]);"disabled"===c&&f&&this.xhr&&this.xhr.abort()},_initSource:function(){var c=this,g,e;a.isArray(this.options.source)?(g=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(g,b.term))}):"string"===typeof this.options.source?
(e=this.options.source,this.source=function(b,d){c.xhr&&c.xhr.abort();c.xhr=a.ajax({url:e,data:b,dataType:"json",autocompleteRequest:++f,success:function(a){this.autocompleteRequest===f&&d(a)},error:function(){this.autocompleteRequest===f&&d([])}})}):this.source=this.options.source},search:function(a,f){a=null!=a?a:this.element.val();this.term=this.element.val();if(a.length<this.options.minLength)return this.close(f);clearTimeout(this.closing);if(!1!==this._trigger("search",f))return this._search(a)},
_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:a},this.response)},_response:function(a){!this.options.disabled&&a&&a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close();this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(a){clearTimeout(this.closing);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(c){return c.length&&c[0].label&&c[0].value?c:a.map(c,function(c){return"string"===typeof c?{label:c,value:c}:a.extend({label:c.label||c.value,value:c.value||c.label},c)})},_suggest:function(c){var f=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(f,c);this.menu.deactivate();this.menu.refresh();f.show();this._resizeMenu();f.position(a.extend({of:this.element},this.options.position));
this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(c,f){var e=this;a.each(f,function(a,d){e._renderItem(c,d)})},_renderItem:function(c,f){return a("<li></li>").data("item.autocomplete",f).append(a("<a></a>").text(f.label)).appendTo(c)},_move:function(a,f){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](f);else this.search(null,f)},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(c,f){var e=RegExp(a.ui.autocomplete.escapeRegex(f),"i");return a.grep(c,function(a){return e.test(a.label||a.value||a)})}})})(jQuery);
(function(a){a.widget("ui.menu",{_create:function(){var f=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){a(c.target).closest(".ui-menu-item a").length&&(c.preventDefault(),f.select(c))});this.refresh()},refresh:function(){var f=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(c){f.activate(c,a(this).parent())}).mouseleave(function(){f.deactivate()})},activate:function(a,c){this.deactivate();if(this.hasScroll()){var g=c.offset().top-this.element.offset().top,e=this.element.attr("scrollTop"),b=this.element.height();0>g?this.element.attr("scrollTop",e+g):g>=b&&this.element.attr("scrollTop",e+g-b+c.height())}this.active=c.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",a,{item:c})},deactivate:function(){this.active&&
(this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null)},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},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(a,c,g){this.active?(a=this.active[a+"All"](".ui-menu-item").eq(0),a.length?this.activate(g,
a):this.activate(g,this.element.children(c))):this.activate(g,this.element.children(c))},nextPage:function(f){if(this.hasScroll())if(!this.active||this.last())this.activate(f,this.element.children(".ui-menu-item:first"));else{var c=this.active.offset().top,g=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-g+a(this).height();return 10>b&&-10<b});e.length||(e=this.element.children(".ui-menu-item:last"));this.activate(f,e)}else this.activate(f,
this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(f){if(this.hasScroll())if(!this.active||this.first())this.activate(f,this.element.children(".ui-menu-item:last"));else{var c=this.active.offset().top,g=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var e=a(this).offset().top-c+g-a(this).height();return 10>e&&-10<e});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(f,
result)}else this.activate(f,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})})(jQuery);
(function(a){var f,c=function(e){a(":ui-button",e.target.form).each(function(){var b=a(this).data("button");setTimeout(function(){b.refresh()},1)})},g=function(e){var b=e.name,d=e.form,c=a([]);b&&(c=d?a(d).find("[name='"+b+"']"):a("[name='"+b+"']",e.ownerDocument).filter(function(){return!this.form}));return c};a.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",
c);"boolean"!==typeof this.options.disabled&&(this.options.disabled=this.element.attr("disabled"));this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var e=this,b=this.options,d="checkbox"===this.type||"radio"===this.type,i="ui-state-hover"+(!d?" ui-state-active":"");null===b.label&&(b.label=this.buttonElement.html());this.element.is(":disabled")&&(b.disabled=!0);this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",
function(){b.disabled||(a(this).addClass("ui-state-hover"),this===f&&a(this).addClass("ui-state-active"))}).bind("mouseleave.button",function(){b.disabled||a(this).removeClass(i)}).bind("focus.button",function(){a(this).addClass("ui-state-focus")}).bind("blur.button",function(){a(this).removeClass("ui-state-focus")});d&&this.element.bind("change.button",function(){e.refresh()});"checkbox"===this.type?this.buttonElement.bind("click.button",function(){if(b.disabled)return!1;a(this).toggleClass("ui-state-active");
e.buttonElement.attr("aria-pressed",e.element[0].checked)}):"radio"===this.type?this.buttonElement.bind("click.button",function(){if(b.disabled)return!1;a(this).addClass("ui-state-active");e.buttonElement.attr("aria-pressed",!0);var d=e.element[0];g(d).not(d).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",!1)}):(this.buttonElement.bind("mousedown.button",function(){if(b.disabled)return!1;a(this).addClass("ui-state-active");f=this;a(document).one("mouseup",
function(){f=null})}).bind("mouseup.button",function(){if(b.disabled)return!1;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(d){if(b.disabled)return!1;(d.keyCode==a.ui.keyCode.SPACE||d.keyCode==a.ui.keyCode.ENTER)&&a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()}));this._setOption("disabled",b.disabled)},
_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if("checkbox"===this.type||"radio"===this.type){var a=this.element.parents().filter(":last"),b="label[for="+this.element.attr("id")+"]";this.buttonElement=a.find(b);this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b)));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");a.Widget.prototype.destroy.call(this)},_setOption:function(e,b){a.Widget.prototype._setOption.apply(this,arguments);"disabled"===e&&(b?this.element.attr("disabled",!0):this.element.removeAttr("disabled"));this._resetButton()},refresh:function(){var e=this.element.is(":disabled");e!==this.options.disabled&&this._setOption("disabled",e);"radio"===this.type?g(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
!0):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",!1)}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",!0):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",!1))},_resetButton:function(){if("input"===this.type)this.options.label&&this.element.val(this.options.label);else{var e=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"),
b=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),d=this.options.icons,c=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(c?"s":d.primary?"-primary":"-secondary")),d.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(c?"ui-button-icons-only":
"ui-button-icon-only"),this.hasTitle||e.attr("title",b))):f.push("ui-button-text-only");e.addClass(f.join(" "))}}});a.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(e,b){"disabled"===e&&this.buttons.button("option",e,b);a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},
destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");a.Widget.prototype.destroy.call(this)}})})(jQuery);
(function(a,f){var c={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},g={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(e){var b=a(this).css(e).offset().top;0>b&&a(this).css("top",e.top-b)}},resizable:!0,
show:null,stack:!0,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");"string"!==typeof this.originalTitle&&(this.originalTitle="");this.options.title=this.options.title||this.originalTitle;var e=this,b=e.options,d=b.title||"&#160;",c=a.ui.dialog.getTitleId(e.element),f=(e.uiDialog=a("<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(d){b.closeOnEscape&&d.keyCode&&d.keyCode===a.ui.keyCode.ESCAPE&&(e.close(d),d.preventDefault())}).attr({role:"dialog","aria-labelledby":c}).mousedown(function(a){e.moveToTop(!1,a)});e.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(f);var g=(e.uiDialogTitlebar=a("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(f),n=a('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role",
"button").hover(function(){n.addClass("ui-state-hover")},function(){n.removeClass("ui-state-hover")}).focus(function(){n.addClass("ui-state-focus")}).blur(function(){n.removeClass("ui-state-focus")}).click(function(a){e.close(a);return!1}).appendTo(g);(e.uiDialogTitlebarCloseText=a("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(n);a("<span></span>").addClass("ui-dialog-title").attr("id",c).html(d).prependTo(g);a.isFunction(b.beforeclose)&&!a.isFunction(b.beforeClose)&&
(b.beforeClose=b.beforeclose);g.find("*").add(g).disableSelection();b.draggable&&a.fn.draggable&&e._makeDraggable();b.resizable&&a.fn.resizable&&e._makeResizable();e._createButtons(b.buttons);e._isOpen=!1;a.fn.bgiframe&&f.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();
this.originalTitle&&this.element.attr("title",this.originalTitle);return this},widget:function(){return this.uiDialog},close:function(e){var b=this,d,c;if(!1!==b._trigger("beforeClose",e))return b.overlay&&b.overlay.destroy(),b.uiDialog.unbind("keypress.ui-dialog"),b._isOpen=!1,b.options.hide?b.uiDialog.hide(b.options.hide,function(){b._trigger("close",e)}):(b.uiDialog.hide(),b._trigger("close",e)),a.ui.dialog.overlay.resize(),b.options.modal&&(d=0,a(".ui-dialog").each(function(){this!==b.uiDialog[0]&&
(c=a(this).css("z-index"),isNaN(c)||(d=Math.max(d,c)))}),a.ui.dialog.maxZ=d),b},isOpen:function(){return this._isOpen},moveToTop:function(e,b){var d=this.options;if(d.modal&&!e||!d.stack&&!d.modal)return this._trigger("focus",b);d.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=d.zIndex);this.overlay&&(a.ui.dialog.maxZ+=1,this.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ));e={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};a.ui.dialog.maxZ+=1;
this.uiDialog.css("z-index",a.ui.dialog.maxZ);this.element.attr(e);this._trigger("focus",b);return this},open:function(){if(!this._isOpen){var e=this.options,b=this.uiDialog;this.overlay=e.modal?new a.ui.dialog.overlay(this):null;this._size();this._position(e.position);b.show(e.show);this.moveToTop(!0);e.modal&&b.bind("keypress.ui-dialog",function(b){if(b.keyCode===a.ui.keyCode.TAB){var e=a(":tabbable",this),c=e.filter(":first"),e=e.filter(":last");if(b.target===e[0]&&!b.shiftKey)return c.focus(1),
!1;if(b.target===c[0]&&b.shiftKey)return e.focus(1),!1}});a(this.element.find(":tabbable").get().concat(b.find(".ui-dialog-buttonpane :tabbable").get().concat(b.get()))).eq(0).focus();this._isOpen=!0;this._trigger("open");return this}},_createButtons:function(e){var b=this,d=!1,c=a("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),f=a("<div></div>").addClass("ui-dialog-buttonset").appendTo(c);b.uiDialog.find(".ui-dialog-buttonpane").remove();"object"===typeof e&&
null!==e&&a.each(e,function(){return!(d=!0)});d&&(a.each(e,function(d,e){e=a.isFunction(e)?{click:e,text:d}:e;d=a('<button type="button"></button>').attr(e,!0).unbind("click").click(function(){e.click.apply(b.element[0],arguments)}).appendTo(f);a.fn.button&&d.button()}),c.appendTo(b.uiDialog))},_makeDraggable:function(){function e(a){return{position:a.position,offset:a.offset}}var b=this,d=b.options,c=a(document),f;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",
containment:"document",start:function(c,g){f="auto"===d.height?"auto":a(this).height();a(this).height(a(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",c,e(g))},drag:function(a,d){b._trigger("drag",a,e(d))},stop:function(g,n){d.position=[n.position.left-c.scrollLeft(),n.position.top-c.scrollTop()];a(this).removeClass("ui-dialog-dragging").height(f);b._trigger("dragStop",g,e(n));a.ui.dialog.overlay.resize()}})},_makeResizable:function(e){function b(a){return{originalPosition:a.originalPosition,
originalSize:a.originalSize,position:a.position,size:a.size}}var e=e===f?this.options.resizable:e,d=this,c=d.options,g=d.uiDialog.css("position"),e="string"===typeof e?e:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:c.maxWidth,maxHeight:c.maxHeight,minWidth:c.minWidth,minHeight:d._minHeight(),handles:e,start:function(e,c){a(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",e,b(c))},resize:function(a,e){d._trigger("resize",
a,b(e))},stop:function(e,f){a(this).removeClass("ui-dialog-resizing");c.height=a(this).height();c.width=a(this).width();d._trigger("resizeStop",e,b(f));a.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"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(e){var b=[],d=[0,0],c;if(e){if("string"===typeof e||"object"===typeof e&&"0"in e)b=e.split?e.split(" "):
[e[0],e[1]],1===b.length&&(b[1]=b[0]),a.each(["left","top"],function(a,e){+b[a]===b[a]&&(d[a]=b[a],b[a]=e)}),e={my:b.join(" "),at:b.join(" "),offset:d.join(" ")};e=a.extend({},a.ui.dialog.prototype.options.position,e)}else e=a.ui.dialog.prototype.options.position;(c=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},e));c||this.uiDialog.hide()},_setOptions:function(e){var b=this,d={},f=!1;a.each(e,function(a,e){b._setOption(a,e);a in
c&&(f=!0);a in g&&(d[a]=e)});f&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(e,b){var d=this.uiDialog;switch(e){case "beforeclose":e="beforeClose";break;case "buttons":this._createButtons(b);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":d.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?d.addClass("ui-dialog-disabled"):
d.removeClass("ui-dialog-disabled");break;case "draggable":var c=d.is(":data(draggable)");c&&!b&&d.draggable("destroy");!c&&b&&this._makeDraggable();break;case "position":this._position(b);break;case "resizable":(c=d.is(":data(resizable)"))&&!b&&d.resizable("destroy");c&&"string"===typeof b&&d.resizable("option","handles",b);!c&&!1!==b&&this._makeResizable(b);break;case "title":a(".ui-dialog-title",this.uiDialogTitlebar).html(""+(b||"&#160;"))}a.Widget.prototype._setOption.apply(this,arguments)},
_size:function(){var e=this.options,b,d,c=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});e.minWidth>e.width&&(e.width=e.minWidth);b=this.uiDialog.css({height:"auto",width:e.width}).height();d=Math.max(0,e.minHeight-b);"auto"===e.height?a.support.minHeight?this.element.css({minHeight:d,height:"auto"}):(this.uiDialog.show(),e=this.element.css("height","auto").height(),c||this.uiDialog.hide(),this.element.height(Math.max(e,d))):this.element.height(Math.max(e.height-
b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});a.extend(a.ui.dialog,{version:"1.8.11",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");a||(a=this.uuid+=1);return"ui-dialog-title-"+a},overlay:function(e){this.$el=a.ui.dialog.overlay.create(e)}});a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),
create:function(e){0===this.instances.length&&(setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()<a.ui.dialog.overlay.maxZ)return!1})},1),a(document).bind("keydown.dialog-overlay",function(b){e.options.closeOnEscape&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE&&(e.close(b),b.preventDefault())}),a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize));var b=(this.oldInstances.pop()||a("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
height:this.height()});a.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(e){var b=a.inArray(e,this.instances);-1!=b&&this.oldInstances.push(this.instances.splice(b,1)[0]);0===this.instances.length&&a([document,window]).unbind(".dialog-overlay");e.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var e,b;return a.browser.msie&&7>a.browser.version?(e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),
b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),e<b?a(window).height()+"px":e+"px"):a(document).height()+"px"},width:function(){var e,b;return a.browser.msie&&7>a.browser.version?(e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),e<b?a(window).width()+"px":e+"px"):a(document).width()+"px"},resize:function(){var e=a([]);a.each(a.ui.dialog.overlay.instances,function(){e=e.add(this)});
e.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}});a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(a){a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var f=this,c=this.options;this._mouseSliding=this._keySliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");c.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
this.range=a([]);c.range&&(!0===c.range?(this.range=a("<div></div>"),c.values||(c.values=[this._valueMin(),this._valueMin()]),c.values.length&&2!==c.values.length&&(c.values=[c.values[0],c.values[0]])):this.range=a("<div></div>"),this.range.appendTo(this.element).addClass("ui-slider-range"),("min"===c.range||"max"===c.range)&&this.range.addClass("ui-slider-range-"+c.range),this.range.addClass("ui-widget-header"));0===a(".ui-slider-handle",this.element).length&&a("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
if(c.values&&c.values.length)for(;a(".ui-slider-handle",this.element).length<c.values.length;)a("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){c.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){c.disabled?
a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(c){a(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=!0,b=a(this).data("index.ui-slider-handle"),d,i,j;if(!f.options.disabled){switch(c.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(e=
!1,!f._keySliding&&(f._keySliding=!0,a(this).addClass("ui-state-active"),d=f._start(c,b),!1===d))return}j=f.options.step;d=f.options.values&&f.options.values.length?i=f.values(b):i=f.value();switch(c.keyCode){case a.ui.keyCode.HOME:i=f._valueMin();break;case a.ui.keyCode.END:i=f._valueMax();break;case a.ui.keyCode.PAGE_UP:i=f._trimAlignValue(d+(f._valueMax()-f._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:i=f._trimAlignValue(d-(f._valueMax()-f._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(d===
f._valueMax())return;i=f._trimAlignValue(d+j);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(d===f._valueMin())return;i=f._trimAlignValue(d-j)}f._slide(c,b,i);return e}}).keyup(function(c){var e=a(this).data("index.ui-slider-handle");f._keySliding&&(f._keySliding=!1,f._stop(c,e),f._change(c,e),a(this).removeClass("ui-state-active"))});this._refreshValue();this._animateOff=!1},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(f){var c=this.options,g,e,b,d,i;if(c.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();g=this._normValueFromMouse({x:f.pageX,y:f.pageY});e=this._valueMax()-this._valueMin()+1;d=this;this.handles.each(function(c){var f=Math.abs(g-d.values(c));e>f&&(e=f,b=a(this),i=c)});!0===c.range&&this.values(1)===c.min&&(i+=1,b=a(this.handles[i]));if(!1===this._start(f,
i))return!1;this._mouseSliding=!0;d._handleIndex=i;b.addClass("ui-state-active").focus();c=b.offset();this._clickOffset=!a(f.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:f.pageX-c.left-b.width()/2,top:f.pageY-c.top-b.height()/2-(parseInt(b.css("borderTopWidth"),10)||0)-(parseInt(b.css("borderBottomWidth"),10)||0)+(parseInt(b.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(f,i,g);return this._animateOff=!0},_mouseStart:function(){return!0},
_mouseDrag:function(a){var c=this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,c);return!1},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=!1;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var c;"horizontal"===
this.orientation?(c=this.elementSize.width,a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(c=this.elementSize.height,a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0));c=a/c;1<c&&(c=1);0>c&&(c=0);"vertical"===this.orientation&&(c=1-c);a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+c*a)},_start:function(a,c){var g={handle:this.handles[c],value:this.value()};this.options.values&&this.options.values.length&&(g.value=
this.values(c),g.values=this.values());return this._trigger("start",a,g)},_slide:function(a,c,g){var e;if(this.options.values&&this.options.values.length){e=this.values(c?0:1);if(2===this.options.values.length&&!0===this.options.range&&(0===c&&g>e||1===c&&g<e))g=e;g!==this.values(c)&&(e=this.values(),e[c]=g,a=this._trigger("slide",a,{handle:this.handles[c],value:g,values:e}),this.values(c?0:1),!1!==a&&this.values(c,g,!0))}else g!==this.value()&&(a=this._trigger("slide",a,{handle:this.handles[c],value:g}),
!1!==a&&this.value(g))},_stop:function(a,c){var g={handle:this.handles[c],value:this.value()};this.options.values&&this.options.values.length&&(g.value=this.values(c),g.values=this.values());this._trigger("stop",a,g)},_change:function(a,c){if(!this._keySliding&&!this._mouseSliding){var g={handle:this.handles[c],value:this.value()};this.options.values&&this.options.values.length&&(g.value=this.values(c),g.values=this.values());this._trigger("change",a,g)}},value:function(a){arguments.length&&(this.options.value=
this._trimAlignValue(a),this._refreshValue(),this._change(null,0));return this._value()},values:function(f,c){var g,e,b;1<arguments.length&&(this.options.values[f]=this._trimAlignValue(c),this._refreshValue(),this._change(null,f));if(arguments.length)if(a.isArray(arguments[0])){g=this.options.values;e=arguments[0];for(b=0;b<g.length;b+=1)g[b]=this._trimAlignValue(e[b]),this._change(null,b);this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(f):this.value();
else return this._values()},_setOption:function(f,c){var g,e=0;a.isArray(this.options.values)&&(e=this.options.values.length);a.Widget.prototype._setOption.apply(this,arguments);switch(f){case "disabled":c?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.attr("disabled","disabled"),this.element.addClass("ui-disabled")):(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=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case "values":this._animateOff=!0;this._refreshValue();for(g=0;g<e;g+=1)this._change(null,g);this._animateOff=!1}},_value:function(){return this._trimAlignValue(this.options.value)},_values:function(a){var c,g;if(arguments.length)return c=this.options.values[a],this._trimAlignValue(c);
c=this.options.values.slice();for(g=0;g<c.length;g+=1)c[g]=this._trimAlignValue(c[g]);return c},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var c=0<this.options.step?this.options.step:1,g=(a-this._valueMin())%c;alignValue=a-g;2*Math.abs(g)>=c&&(alignValue+=0<g?c:-c);return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var f=
this.options.range,c=this.options,g=this,e=!this._animateOff?c.animate:!1,b,d={},i,j,l,n;if(this.options.values&&this.options.values.length)this.handles.each(function(f){b=100*((g.values(f)-g._valueMin())/(g._valueMax()-g._valueMin()));d["horizontal"===g.orientation?"left":"bottom"]=b+"%";a(this).stop(1,1)[e?"animate":"css"](d,c.animate);if(!0===g.options.range)if("horizontal"===g.orientation){if(0===f)g.range.stop(1,1)[e?"animate":"css"]({left:b+"%"},c.animate);if(1===f)g.range[e?"animate":"css"]({width:b-
i+"%"},{queue:!1,duration:c.animate})}else{if(0===f)g.range.stop(1,1)[e?"animate":"css"]({bottom:b+"%"},c.animate);if(1===f)g.range[e?"animate":"css"]({height:b-i+"%"},{queue:!1,duration:c.animate})}i=b});else{j=this.value();l=this._valueMin();n=this._valueMax();b=n!==l?100*((j-l)/(n-l)):0;d["horizontal"===g.orientation?"left":"bottom"]=b+"%";this.handle.stop(1,1)[e?"animate":"css"](d,c.animate);if("min"===f&&"horizontal"===this.orientation)this.range.stop(1,1)[e?"animate":"css"]({width:b+"%"},c.animate);
if("max"===f&&"horizontal"===this.orientation)this.range[e?"animate":"css"]({width:100-b+"%"},{queue:!1,duration:c.animate});if("min"===f&&"vertical"===this.orientation)this.range.stop(1,1)[e?"animate":"css"]({height:b+"%"},c.animate);if("max"===f&&"vertical"===this.orientation)this.range[e?"animate":"css"]({height:100-b+"%"},{queue:!1,duration:c.animate})}}});a.extend(a.ui.slider,{version:"1.8.11"})})(jQuery);
(function(a,f){var c=0,g=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,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(!0)},_setOption:function(a,b){"selected"==a?this.options.collapsible&&b==this.options.selected||this.select(b):
(this.options[a]=b,this._tabify())},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+ ++c},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var e=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++g);return a.cookie.apply(null,[e].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var e=
a(this);e.html(e.data("label.tabs")).removeData("label.tabs")})},_tabify:function(e){function b(b,d){b.css("display","");!a.support.opacity&&d.opacity&&b[0].style.removeAttribute("filter")}var d=this,c=this.options,g=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=a(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);this.anchors.each(function(b,e){var f=a(e).attr("href"),k=f.split("#")[0],l;if(k&&(k===location.toString().split("#")[0]||
(l=a("base")[0])&&k===l.href))f=e.hash,e.href=f;g.test(f)?d.panels=d.panels.add(d.element.find(d._sanitizeSelector(f))):f&&"#"!==f?(a.data(e,"href.tabs",f),a.data(e,"load.tabs",f.replace(/#.*$/,"")),f=d._tabId(e),e.href="#"+f,e=d.element.find("#"+f),e.length||(e=a(c.panelTemplate).attr("id",f).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),e.data("destroy.tabs",!0)),d.panels=d.panels.add(e)):c.disabled.push(b)});e?(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"),c.selected===f?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return c.selected=a,!1}),"number"!==typeof c.selected&&c.cookie&&(c.selected=parseInt(d._cookie(),10)),"number"!==typeof c.selected&&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)):null===c.selected&&(c.selected=-1),c.selected=0<=c.selected&&this.anchors[c.selected]||0>c.selected?c.selected:0,c.disabled=a.unique(c.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a){return d.lis.index(a)}))).sort(),-1!=a.inArray(c.selected,c.disabled)&&c.disabled.splice(a.inArray(c.selected,c.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),
0<=c.selected&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[c.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[c.selected],d.element.find(d._sanitizeSelector(d.anchors[c.selected].hash))[0]))}),this.load(c.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs");d.lis=d.anchors=d.panels=null})):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);for(var e=0,l;l=this.lis[e];e++)a(l)[-1!=a.inArray(e,c.disabled)&&!a(l).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");!1===c.cache&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if("mouseover"!==c.event){var n=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",
function(){n("hover",a(this))});this.lis.bind("mouseout.tabs",function(){a(this).removeClass("ui-state-hover")});this.anchors.bind("focus.tabs",function(){n("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){a(this).closest("li").removeClass("ui-state-focus")})}var m,k;c.fx&&(a.isArray(c.fx)?(m=c.fx[0],k=c.fx[1]):m=k=c.fx);var p=k?function(c,e){a(c).closest("li").addClass("ui-tabs-selected ui-state-active");e.hide().removeClass("ui-tabs-hide").animate(k,k.duration||"normal",
function(){b(e,k);d._trigger("show",null,d._ui(c,e[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active");c.removeClass("ui-tabs-hide");d._trigger("show",null,d._ui(b,c[0]))},q=m?function(a,c){c.animate(m,m.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active");c.addClass("ui-tabs-hide");b(c,m);d.element.dequeue("tabs")})}:function(a,b){d.lis.removeClass("ui-tabs-selected ui-state-active");b.addClass("ui-tabs-hide");d.element.dequeue("tabs")};
this.anchors.bind(c.event+".tabs",function(){var b=this,e=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(e.hasClass("ui-tabs-selected")&&!c.collapsible||e.hasClass("ui-state-disabled")||e.hasClass("ui-state-processing")||d.panels.filter(":animated").length||!1===d._trigger("select",null,d._ui(this,g[0])))return this.blur(),!1;c.selected=d.anchors.index(this);d.abort();if(c.collapsible){if(e.hasClass("ui-tabs-selected"))return c.selected=
-1,c.cookie&&d._cookie(c.selected,c.cookie),d.element.queue("tabs",function(){q(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return c.cookie&&d._cookie(c.selected,c.cookie),d.element.queue("tabs",function(){p(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}c.cookie&&d._cookie(c.selected,c.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){q(b,f)}),d.element.queue("tabs",function(){p(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";
a.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){"string"==typeof a&&(a=this.anchors.index(this.anchors.filter("[href$="+a+"]")));return a},destroy:function(){var c=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 b=
a.data(this,"href.tabs");b&&(this.href=b);var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){d.removeData(b+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(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")});c.cookie&&this._cookie(null,c.cookie);return this},add:function(c,
b,d){d===f&&(d=this.anchors.length);var g=this,j=this.options,b=a(j.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,b)),c=!c.indexOf("#")?c.replace("#",""):this._tabId(a("a",b)[0]);b.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var l=g.element.find("#"+c);l.length||(l=a(j.panelTemplate).attr("id",c).data("destroy.tabs",!0));l.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");d>=this.lis.length?(b.appendTo(this.list),l.appendTo(this.list[0].parentNode)):
(b.insertBefore(this.lis[d]),l.insertBefore(this.panels[d]));j.disabled=a.map(j.disabled,function(a){return a>=d?++a:a});this._tabify();1==this.anchors.length&&(j.selected=0,b.addClass("ui-tabs-selected ui-state-active"),l.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){g._trigger("show",null,g._ui(g.anchors[0],g.panels[0]))}),this.load(0));this._trigger("add",null,this._ui(this.anchors[d],this.panels[d]));return this},remove:function(c){var c=this._getIndex(c),b=this.options,d=this.lis.eq(c).remove(),
f=this.panels.eq(c).remove();d.hasClass("ui-tabs-selected")&&1<this.anchors.length&&this.select(c+(c+1<this.anchors.length?1:-1));b.disabled=a.map(a.grep(b.disabled,function(a){return a!=c}),function(a){return a>=c?--a:a});this._tabify();this._trigger("remove",null,this._ui(d.find("a")[0],f[0]));return this},enable:function(c){var c=this._getIndex(c),b=this.options;if(-1!=a.inArray(c,b.disabled))return this.lis.eq(c).removeClass("ui-state-disabled"),b.disabled=a.grep(b.disabled,function(a){return a!=
c}),this._trigger("enable",null,this._ui(this.anchors[c],this.panels[c])),this},disable:function(a){var a=this._getIndex(a),b=this.options;a!=b.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),b.disabled.push(a),b.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a])));return this},select:function(a){a=this._getIndex(a);if(-1==a)if(this.options.collapsible&&-1!=this.options.selected)a=this.options.selected;else return this;this.anchors.eq(a).trigger(this.options.event+
".tabs");return this},load:function(c){var c=this._getIndex(c),b=this,d=this.options,f=this.anchors.eq(c)[0],g=a.data(f,"load.tabs");this.abort();if(!g||0!==this.element.queue("tabs").length&&a.data(f,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(c).addClass("ui-state-processing");if(d.spinner){var l=a("span",f);l.data("label.tabs",l.html()).html(d.spinner)}this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:g,success:function(g,j){b.element.find(b._sanitizeSelector(f.hash)).html(g);b._cleanup();
d.cache&&a.data(f,"cache.tabs",!0);b._trigger("load",null,b._ui(b.anchors[c],b.panels[c]));try{d.ajaxOptions.success(g,j)}catch(k){}},error:function(a,g){b._cleanup();b._trigger("load",null,b._ui(b.anchors[c],b.panels[c]));try{d.ajaxOptions.error(a,g,c,f)}catch(j){}}}));b.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(!1,!0);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));this.xhr&&(this.xhr.abort(),delete this.xhr);this._cleanup();
return this},url:function(a,b){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b);return this},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.8.11"});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var d=this,c=this.options,f=d._rotate||(d._rotate=function(b){clearTimeout(d.rotation);d.rotation=setTimeout(function(){var a=c.selected;d.select(++a<d.anchors.length?a:0)},a);b&&b.stopPropagation()}),b=d._unrotate||(d._unrotate=!b?function(a){a.clientX&&
d.rotate(null)}:function(){t=c.selected;f()});a?(this.element.bind("tabsshow",f),this.anchors.bind(c.event+".tabs",b),f()):(clearTimeout(d.rotation),this.element.unbind("tabsshow",f),this.anchors.unbind(c.event+".tabs",b),delete this._rotate,delete this._unrotate);return this}})})(jQuery);
(function(a,f){function c(){this.debug=!1;this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._inDialog=this._datepickerShowing=!1;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".split(","),monthNamesShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),dayNames:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),dayNamesShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),dayNamesMin:"Su,Mo,Tu,We,Th,Fr,Sa".split(","),
weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,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:!0,showButtonPanel:!1,autoSize:!1};a.extend(this._defaults,this.regional[""]);this.dpDiv=a('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}function g(b,d){a.extend(b,d);for(var c in d)if(null==d[c]||d[c]==f)b[c]=d[c];return b}a.extend(a.ui,{datepicker:{version:"1.8.11"}});
var e=(new Date).getTime();a.extend(c.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){g(this._defaults,a||{});return this},_attachDatepicker:function(b,d){var c=null,e;for(e in this._defaults){var f=b.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(g){c[e]=f}}}e=b.nodeName.toLowerCase();f="div"==e||"span"==e;b.id||(this.uuid+=1,b.id="dp"+this.uuid);var m=this._newInst(a(b),
f);m.settings=a.extend({},d||{},c||{});"input"==e?this._connectDatepicker(b,m):f&&this._inlineDatepicker(b,m)},_newInst:function(b,d){return{id:b[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:d,dpDiv:!d?this.dpDiv:a('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},_connectDatepicker:function(b,d){var c=a(b);d.append=a([]);d.trigger=a([]);c.hasClass(this.markerClassName)||
(this._attachments(c,d),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,b,c){d.settings[b]=c}).bind("getData.datepicker",function(a,b){return this._get(d,b)}),this._autoSize(d),a.data(b,"datepicker",d))},_attachments:function(b,d){var c=this._get(d,"appendText"),e=this._get(d,"isRTL");d.append&&d.append.remove();c&&(d.append=a('<span class="'+this._appendClass+'">'+c+"</span>"),b[e?"before":"after"](d.append));
b.unbind("focus",this._showDatepicker);d.trigger&&d.trigger.remove();c=this._get(d,"showOn");("focus"==c||"both"==c)&&b.focus(this._showDatepicker);if("button"==c||"both"==c){var c=this._get(d,"buttonText"),f=this._get(d,"buttonImage");d.trigger=a(this._get(d,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):a('<button type="button"></button>').addClass(this._triggerClass).html(""==f?c:a("<img/>").attr({src:f,alt:c,title:c})));b[e?"before":"after"](d.trigger);
d.trigger.click(function(){a.datepicker._datepickerShowing&&a.datepicker._lastInput==b[0]?a.datepicker._hideDatepicker():a.datepicker._showDatepicker(b[0]);return!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var d=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(a){for(var b=0,d=0,c=0;c<a.length;c++)a[c].length>b&&(b=a[c].length,d=c);return d};d.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));d.setDate(e(this._get(a,c.match(/DD/)?
"dayNames":"dayNamesShort"))+20-d.getDay())}a.input.attr("size",this._formatDate(a,d).length)}},_inlineDatepicker:function(b,d){var c=a(b);c.hasClass(this.markerClassName)||(c.addClass(this.markerClassName).append(d.dpDiv).bind("setData.datepicker",function(a,b,c){d.settings[b]=c}).bind("getData.datepicker",function(a,b){return this._get(d,b)}),a.data(b,"datepicker",d),this._setDate(d,this._getDefaultDate(d),!0),this._updateDatepicker(d),this._updateAlternate(d),d.dpDiv.show())},_dialogDatepicker:function(b,
d,c,e,f){b=this._dialogInst;b||(this.uuid+=1,this._dialogInput=a('<input type="text" id="dp'+this.uuid+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),a("body").append(this._dialogInput),b=this._dialogInst=this._newInst(this._dialogInput,!1),b.settings={},a.data(this._dialogInput[0],"datepicker",b));g(b.settings,e||{});d=d&&d.constructor==Date?this._formatDate(b,d):d;this._dialogInput.val(d);this._pos=f?f.length?f:[f.pageX,f.pageY]:
null;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");b.settings.onSelect=c;this._inDialog=!0;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);a.blockUI&&a.blockUI(this.dpDiv);a.data(this._dialogInput[0],
"datepicker",b);return this},_destroyDatepicker:function(b){var d=a(b),c=a.data(b,"datepicker");if(d.hasClass(this.markerClassName)){var e=b.nodeName.toLowerCase();a.removeData(b,"datepicker");"input"==e?(c.append.remove(),c.trigger.remove(),d.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"==e||"span"==e)&&d.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(b){var d=
a(b),c=a.data(b,"datepicker");if(d.hasClass(this.markerClassName)){var e=b.nodeName.toLowerCase();"input"==e?(b.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"==e||"span"==e)&&d.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=a.map(this._disabledInputs,function(a){return a==b?null:a})}},_disableDatepicker:function(b){var d=a(b),c=a.data(b,"datepicker");if(d.hasClass(this.markerClassName)){var e=
b.nodeName.toLowerCase();"input"==e?(b.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"==e||"span"==e)&&d.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=a.map(this._disabledInputs,function(a){return a==b?null:a});this._disabledInputs[this._disabledInputs.length]=b}},_isDisabledDatepicker:function(a){if(!a)return!1;for(var d=0;d<this._disabledInputs.length;d++)if(this._disabledInputs[d]==
a)return!0;return!1},_getInst:function(b){try{return a.data(b,"datepicker")}catch(d){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(b,d,c){var e=this._getInst(b);if(2==arguments.length&&"string"==typeof d)return"defaults"==d?a.extend({},a.datepicker._defaults):e?"all"==d?a.extend({},e.settings):this._get(e,d):null;var l=d||{};"string"==typeof d&&(l={},l[d]=c);if(e){this._curInst==e&&this._hideDatepicker();var n=this._getDateDatepicker(b,!0),m=this._getMinMaxDate(e,
"min"),k=this._getMinMaxDate(e,"max");g(e.settings,l);null!==m&&l.dateFormat!==f&&l.minDate===f&&(e.settings.minDate=this._formatDate(e,m));null!==k&&l.dateFormat!==f&&l.maxDate===f&&(e.settings.maxDate=this._formatDate(e,k));this._attachments(a(b),e);this._autoSize(e);this._setDateDatepicker(b,n);this._updateDatepicker(e)}},_changeDatepicker:function(a,d,c){this._optionDatepicker(a,d,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,
d){if(a=this._getInst(a))this._setDate(a,d),this._updateDatepicker(a),this._updateAlternate(a)},_getDateDatepicker:function(a,d){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,d);return a?this._getDate(a):null},_doKeyDown:function(b){var d=a.datepicker._getInst(b.target),c=!0,e=d.dpDiv.is(".ui-datepicker-rtl");d._keyEvent=!0;if(a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker();c=!1;break;case 13:return c=a("td."+a.datepicker._dayOverClass+":not(."+
a.datepicker._currentClass+")",d.dpDiv),c[0]?a.datepicker._selectDay(b.target,d.selectedMonth,d.selectedYear,c[0]):a.datepicker._hideDatepicker(),!1;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(d,"stepBigMonths"):-a.datepicker._get(d,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(d,"stepBigMonths"):+a.datepicker._get(d,"stepMonths"),"M");break;case 35:(b.ctrlKey||b.metaKey)&&a.datepicker._clearDate(b.target);
c=b.ctrlKey||b.metaKey;break;case 36:(b.ctrlKey||b.metaKey)&&a.datepicker._gotoToday(b.target);c=b.ctrlKey||b.metaKey;break;case 37:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,e?1:-1,"D");c=b.ctrlKey||b.metaKey;b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(d,"stepBigMonths"):-a.datepicker._get(d,"stepMonths"),"M");break;case 38:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,-7,"D");c=b.ctrlKey||b.metaKey;break;case 39:if(b.ctrlKey||
b.metaKey)a.datepicker._adjustDate(b.target,e?-1:1,"D");c=b.ctrlKey||b.metaKey;b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(d,"stepBigMonths"):+a.datepicker._get(d,"stepMonths"),"M");break;case 40:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,7,"D");c=b.ctrlKey||b.metaKey;break;default:c=!1}else 36==b.keyCode&&b.ctrlKey?a.datepicker._showDatepicker(this):c=!1;c&&(b.preventDefault(),b.stopPropagation())},_doKeyPress:function(b){var d=a.datepicker._getInst(b.target);
if(a.datepicker._get(d,"constrainInput")){var d=a.datepicker._possibleChars(a.datepicker._get(d,"dateFormat")),c=String.fromCharCode(b.charCode==f?b.keyCode:b.charCode);return b.ctrlKey||b.metaKey||" ">c||!d||-1<d.indexOf(c)}},_doKeyUp:function(b){b=a.datepicker._getInst(b.target);if(b.input.val()!=b.lastVal)try{if(a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,a.datepicker._getFormatConfig(b)))a.datepicker._setDateFromField(b),a.datepicker._updateAlternate(b),
a.datepicker._updateDatepicker(b)}catch(d){a.datepicker.log(d)}return!0},_showDatepicker:function(b){b=b.target||b;"input"!=b.nodeName.toLowerCase()&&(b=a("input",b.parentNode)[0]);if(!(a.datepicker._isDisabledDatepicker(b)||a.datepicker._lastInput==b)){var d=a.datepicker._getInst(b);a.datepicker._curInst&&a.datepicker._curInst!=d&&a.datepicker._curInst.dpDiv.stop(!0,!0);var c=a.datepicker._get(d,"beforeShow");g(d.settings,c?c.apply(b,[b,d]):{});d.lastVal=null;a.datepicker._lastInput=b;a.datepicker._setDateFromField(d);
a.datepicker._inDialog&&(b.value="");a.datepicker._pos||(a.datepicker._pos=a.datepicker._findPos(b),a.datepicker._pos[1]+=b.offsetHeight);var e=!1;a(b).parents().each(function(){e|="fixed"==a(this).css("position");return!e});e&&a.browser.opera&&(a.datepicker._pos[0]-=document.documentElement.scrollLeft,a.datepicker._pos[1]-=document.documentElement.scrollTop);c={left:a.datepicker._pos[0],top:a.datepicker._pos[1]};a.datepicker._pos=null;d.dpDiv.empty();d.dpDiv.css({position:"absolute",display:"block",
top:"-1000px"});a.datepicker._updateDatepicker(d);c=a.datepicker._checkOffset(d,c,e);d.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!d.inline){var c=a.datepicker._get(d,"showAnim"),f=a.datepicker._get(d,"duration"),n=function(){a.datepicker._datepickerShowing=!0;var b=d.dpDiv.find("iframe.ui-datepicker-cover");if(b.length){var c=a.datepicker._getBorders(d.dpDiv);b.css({left:-c[0],top:-c[1],width:d.dpDiv.outerWidth(),
height:d.dpDiv.outerHeight()})}};d.dpDiv.zIndex(a(b).zIndex()+1);a.effects&&a.effects[c]?d.dpDiv.show(c,a.datepicker._get(d,"showOptions"),f,n):d.dpDiv[c||"show"](c?f:null,n);(!c||!f)&&n();d.input.is(":visible")&&!d.input.is(":disabled")&&d.input.focus();a.datepicker._curInst=d}}},_updateDatepicker:function(b){var d=this,c=a.datepicker._getBorders(b.dpDiv);b.dpDiv.empty().append(this._generateHTML(b));var e=b.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),
height:b.dpDiv.outerHeight()});b.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){a(this).removeClass("ui-state-hover");-1!=this.className.indexOf("ui-datepicker-prev")&&a(this).removeClass("ui-datepicker-prev-hover");-1!=this.className.indexOf("ui-datepicker-next")&&a(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!d._isDisabledDatepicker(b.inline?b.dpDiv.parent()[0]:b.input[0]))a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),
a(this).addClass("ui-state-hover"),-1!=this.className.indexOf("ui-datepicker-prev")&&a(this).addClass("ui-datepicker-prev-hover"),-1!=this.className.indexOf("ui-datepicker-next")&&a(this).addClass("ui-datepicker-next-hover")}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(b);e=c[1];1<e?b.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");b.dpDiv[(1!=
c[0]||1!=c[1]?"add":"remove")+"Class"]("ui-datepicker-multi");b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");b==a.datepicker._curInst&&a.datepicker._datepickerShowing&&b.input&&b.input.is(":visible")&&!b.input.is(":disabled")&&b.input[0]!=document.activeElement&&b.input.focus();if(b.yearshtml){var f=b.yearshtml;setTimeout(function(){f===b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml);f=b.yearshtml=null},0)}},_getBorders:function(a){var d=
function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(d(a.css("border-left-width"))),parseFloat(d(a.css("border-top-width")))]},_checkOffset:function(b,d,c){var e=b.dpDiv.outerWidth(),f=b.dpDiv.outerHeight(),g=b.input?b.input.outerWidth():0,m=b.input?b.input.outerHeight():0,k=document.documentElement.clientWidth+a(document).scrollLeft(),p=document.documentElement.clientHeight+a(document).scrollTop();d.left-=this._get(b,"isRTL")?e-g:0;d.left-=c&&d.left==b.input.offset().left?a(document).scrollLeft():
0;d.top-=c&&d.top==b.input.offset().top+m?a(document).scrollTop():0;d.left-=Math.min(d.left,d.left+e>k&&k>e?Math.abs(d.left+e-k):0);d.top-=Math.min(d.top,d.top+f>p&&p>f?Math.abs(f+m):0);return d},_findPos:function(b){for(var d=this._get(this._getInst(b),"isRTL");b&&("hidden"==b.type||1!=b.nodeType||a.expr.filters.hidden(b));)b=b[d?"previousSibling":"nextSibling"];b=a(b).offset();return[b.left,b.top]},_hideDatepicker:function(b){var d=this._curInst;if(d&&!(b&&d!=a.data(b,"datepicker"))&&this._datepickerShowing){var b=
this._get(d,"showAnim"),c=this._get(d,"duration"),e=function(){a.datepicker._tidyDialog(d);this._curInst=null};a.effects&&a.effects[b]?d.dpDiv.hide(b,a.datepicker._get(d,"showOptions"),c,e):d.dpDiv["slideDown"==b?"slideUp":"fadeIn"==b?"fadeOut":"hide"](b?c:null,e);b||e();if(b=this._get(d,"onClose"))b.apply(d.input?d.input[0]:null,[d.input?d.input.val():"",d]);this._datepickerShowing=!1;this._lastInput=null;this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),a.blockUI&&
(a.unblockUI(),a("body").append(this.dpDiv)));this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){a.datepicker._curInst&&(b=a(b.target),b[0].id!=a.datepicker._mainDivId&&0==b.parents("#"+a.datepicker._mainDivId).length&&!b.hasClass(a.datepicker.markerClassName)&&!b.hasClass(a.datepicker._triggerClass)&&a.datepicker._datepickerShowing&&(!a.datepicker._inDialog||!a.blockUI)&&a.datepicker._hideDatepicker())},
_adjustDate:function(b,d,c){var b=a(b),e=this._getInst(b[0]);this._isDisabledDatepicker(b[0])||(this._adjustInstDate(e,d+("M"==c?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e))},_gotoToday:function(b){var b=a(b),d=this._getInst(b[0]);if(this._get(d,"gotoCurrent")&&d.currentDay)d.selectedDay=d.currentDay,d.drawMonth=d.selectedMonth=d.currentMonth,d.drawYear=d.selectedYear=d.currentYear;else{var c=new Date;d.selectedDay=c.getDate();d.drawMonth=d.selectedMonth=c.getMonth();d.drawYear=
d.selectedYear=c.getFullYear()}this._notifyChange(d);this._adjustDate(b)},_selectMonthYear:function(b,d,c){var b=a(b),e=this._getInst(b[0]);e._selectingMonthYear=!1;e["selected"+("M"==c?"Month":"Year")]=e["draw"+("M"==c?"Month":"Year")]=parseInt(d.options[d.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(b)},_clickMonthYear:function(b){var d=this._getInst(a(b)[0]);d.input&&d._selectingMonthYear&&setTimeout(function(){d.input.focus()},0);d._selectingMonthYear=!d._selectingMonthYear},
_selectDay:function(b,d,c,e){var f=a(b);!a(e).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(f[0])&&(f=this._getInst(f[0]),f.selectedDay=f.currentDay=a("a",e).html(),f.selectedMonth=f.currentMonth=d,f.selectedYear=f.currentYear=c,this._selectDate(b,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(b){b=a(b);this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(b,d){b=this._getInst(a(b)[0]);d=null!=d?d:this._formatDate(b);b.input&&b.input.val(d);
this._updateAlternate(b);var c=this._get(b,"onSelect");c?c.apply(b.input?b.input[0]:null,[d,b]):b.input&&b.input.trigger("change");b.inline?this._updateDatepicker(b):(this._hideDatepicker(),this._lastInput=b.input[0],"object"!=typeof b.input[0]&&b.input.focus(),this._lastInput=null)},_updateAlternate:function(b){var d=this._get(b,"altField");if(d){var c=this._get(b,"altFormat")||this._get(b,"dateFormat"),e=this._getDate(b),f=this.formatDate(c,e,this._getFormatConfig(b));a(d).each(function(){a(this).val(f)})}},
noWeekends:function(a){a=a.getDay();return[0<a&&6>a,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var d=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((d-a)/864E5)/7)+1},parseDate:function(a,d,c){if(null==a||null==d)throw"Invalid arguments";d="object"==typeof d?d.toString():d+"";if(""==d)return null;for(var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff,e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,
10),f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,g=(c?c.dayNames:null)||this._defaults.dayNames,m=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,k=(c?c.monthNames:null)||this._defaults.monthNames,p=c=-1,q=-1,y=-1,u=!1,v=function(d){(d=N+1<a.length&&a.charAt(N+1)==d)&&N++;return d},s=function(a){var b=v(a),a=d.substring(A).match(RegExp("^\\d{1,"+("@"==a?14:"!"==a?20:"y"==a&&b?4:"o"==a?3:2)+"}"));if(!a)throw"Missing number at position "+A;A+=a[0].length;return parseInt(a[0],
10)},w=function(a,b,c){a=v(a)?c:b;for(b=0;b<a.length;b++)if(d.substr(A,a[b].length).toLowerCase()==a[b].toLowerCase())return A+=a[b].length,b+1;throw"Unknown name at position "+A;},o=function(){if(d.charAt(A)!=a.charAt(N))throw"Unexpected literal at position "+A;A++},A=0,N=0;N<a.length;N++)if(u)"'"==a.charAt(N)&&!v("'")?u=!1:o();else switch(a.charAt(N)){case "d":q=s("d");break;case "D":w("D",f,g);break;case "o":y=s("o");break;case "m":p=s("m");break;case "M":p=w("M",m,k);break;case "y":c=s("y");break;
case "@":var B=new Date(s("@")),c=B.getFullYear(),p=B.getMonth()+1,q=B.getDate();break;case "!":B=new Date((s("!")-this._ticksTo1970)/1E4);c=B.getFullYear();p=B.getMonth()+1;q=B.getDate();break;case "'":v("'")?o():u=!0;break;default:o()}-1==c?c=(new Date).getFullYear():100>c&&(c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100));if(-1<y){p=1;q=y;do{e=this._getDaysInMonth(c,p-1);if(q<=e)break;p++;q-=e}while(1)}B=this._daylightSavingAdjust(new Date(c,p-1,q));if(B.getFullYear()!=c||
B.getMonth()+1!=p||B.getDate()!=q)throw"Invalid date";return B},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:864E9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(a,d,c){if(!d)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,
g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,c=(c?c.monthNames:null)||this._defaults.monthNames,m=function(d){(d=u+1<a.length&&a.charAt(u+1)==d)&&u++;return d},k=function(a,b,d){b=""+b;if(m(a))for(;b.length<d;)b="0"+b;return b},p=function(a,b,d,c){return m(a)?c[b]:d[b]},q="",y=!1;if(d)for(var u=0;u<a.length;u++)if(y)"'"==a.charAt(u)&&!m("'")?y=!1:q+=a.charAt(u);else switch(a.charAt(u)){case "d":q+=k("d",d.getDate(),2);break;case "D":q+=p("D",d.getDay(),e,f);break;case "o":q+=k("o",
(d.getTime()-(new Date(d.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":q+=k("m",d.getMonth()+1,2);break;case "M":q+=p("M",d.getMonth(),g,c);break;case "y":q+=m("y")?d.getFullYear():(10>d.getYear()%100?"0":"")+d.getYear()%100;break;case "@":q+=d.getTime();break;case "!":q+=1E4*d.getTime()+this._ticksTo1970;break;case "'":m("'")?q+="'":y=!0;break;default:q+=a.charAt(u)}return q},_possibleChars:function(a){for(var d="",c=!1,e=function(d){(d=f+1<a.length&&a.charAt(f+1)==d)&&f++;return d},f=0;f<
a.length;f++)if(c)"'"==a.charAt(f)&&!e("'")?c=!1:d+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":d+="0123456789";break;case "D":case "M":return null;case "'":e("'")?d+="'":c=!0;break;default:d+=a.charAt(f)}return d},_get:function(a,d){return a.settings[d]!==f?a.settings[d]:this._defaults[d]},_setDateFromField:function(a,d){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,g;f=g=this._getDefaultDate(a);var m=this._getFormatConfig(a);
try{f=this.parseDate(c,e,m)||g}catch(k){this.log(k),e=d?"":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(b,d,c){var e=function(a){var b=new Date;b.setDate(b.getDate()+a);return b};
if(d=(d=null==d||""===d?c:"string"==typeof d?function(d){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),d,a.datepicker._getFormatConfig(b))}catch(c){}for(var e=(d.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,f=e.getFullYear(),g=e.getMonth(),e=e.getDate(),j=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=j.exec(d);i;){switch(i[2]||"d"){case "d":case "D":e+=parseInt(i[1],10);break;case "w":case "W":e+=7*parseInt(i[1],10);break;case "m":case "M":g+=parseInt(i[1],10);
e=Math.min(e,a.datepicker._getDaysInMonth(f,g));break;case "y":case "Y":f+=parseInt(i[1],10),e=Math.min(e,a.datepicker._getDaysInMonth(f,g))}i=j.exec(d)}return new Date(f,g,e)}(d):"number"==typeof d?isNaN(d)?c:e(d):new Date(d.getTime()))&&"Invalid Date"==d.toString()?c:d)d.setHours(0),d.setMinutes(0),d.setSeconds(0),d.setMilliseconds(0);return this._daylightSavingAdjust(d)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(12<a.getHours()?a.getHours()+2:0);return a},_setDate:function(a,
d,c){var e=!d,f=a.selectedMonth,g=a.selectedYear,d=this._restrictMinMax(a,this._determineDate(a,d,new Date));a.selectedDay=a.currentDay=d.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=d.getMonth();a.drawYear=a.selectedYear=a.currentYear=d.getFullYear();(f!=a.selectedMonth||g!=a.selectedYear)&&!c&&this._notifyChange(a);this._adjustInstDate(a);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(b){var d=new Date,d=this._daylightSavingAdjust(new Date(d.getFullYear(),d.getMonth(),d.getDate())),c=this._get(b,"isRTL"),f=this._get(b,"showButtonPanel"),g=this._get(b,"hideIfNoPrevNext"),n=this._get(b,"navigationAsDateFormat"),m=this._getNumberOfMonths(b),k=this._get(b,"showCurrentAtPos"),p=this._get(b,"stepMonths"),q=1!=m[0]||1!=m[1],y=this._daylightSavingAdjust(!b.currentDay?new Date(9999,9,9):new Date(b.currentYear,b.currentMonth,b.currentDay)),
u=this._getMinMaxDate(b,"min"),v=this._getMinMaxDate(b,"max"),k=b.drawMonth-k,s=b.drawYear;0>k&&(k+=12,s--);if(v)for(var w=this._daylightSavingAdjust(new Date(v.getFullYear(),v.getMonth()-m[0]*m[1]+1,v.getDate())),w=u&&w<u?u:w;this._daylightSavingAdjust(new Date(s,k,1))>w;)k--,0>k&&(k=11,s--);b.drawMonth=k;b.drawYear=s;var w=this._get(b,"prevText"),w=!n?w:this.formatDate(w,this._daylightSavingAdjust(new Date(s,k-p,1)),this._getFormatConfig(b)),w=this._canAdjustMonth(b,-1,s,k)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+
e+".datepicker._adjustDate('#"+b.id+"', -"+p+", 'M');\" title=\""+w+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+w+"</span></a>":g?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+w+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+w+"</span></a>",o=this._get(b,"nextText"),o=!n?o:this.formatDate(o,this._daylightSavingAdjust(new Date(s,k+p,1)),this._getFormatConfig(b)),g=this._canAdjustMonth(b,1,s,k)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+
e+".datepicker._adjustDate('#"+b.id+"', +"+p+", 'M');\" title=\""+o+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+o+"</span></a>":g?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+o+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+o+"</span></a>",p=this._get(b,"currentText"),o=this._get(b,"gotoCurrent")&&b.currentDay?y:d,p=!n?p:this.formatDate(p,o,this._getFormatConfig(b)),n=!b.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+
e+'.datepicker._hideDatepicker();">'+this._get(b,"closeText")+"</button>":"",f=f?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?n:"")+(this._isInRange(b,o)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+e+".datepicker._gotoToday('#"+b.id+"');\">"+p+"</button>":"")+(c?"":n)+"</div>":"",n=parseInt(this._get(b,"firstDay"),10),n=isNaN(n)?0:n,p=this._get(b,"showWeek"),o=this._get(b,"dayNames");this._get(b,"dayNamesShort");
var A=this._get(b,"dayNamesMin"),N=this._get(b,"monthNames"),B=this._get(b,"monthNamesShort"),J=this._get(b,"beforeShowDay"),Q=this._get(b,"showOtherMonths"),P=this._get(b,"selectOtherMonths");this._get(b,"calculateWeek");for(var r=this._getDefaultDate(b),D="",K=0;K<m[0];K++){for(var h="",z=0;z<m[1];z++){var W=this._daylightSavingAdjust(new Date(s,k,b.selectedDay)),O=" ui-corner-all",C="";if(q){C+='<div class="ui-datepicker-group';if(1<m[1])switch(z){case 0:C+=" ui-datepicker-group-first";O=" ui-corner-"+
(c?"right":"left");break;case m[1]-1:C+=" ui-datepicker-group-last";O=" ui-corner-"+(c?"left":"right");break;default:C+=" ui-datepicker-group-middle",O=""}C+='">'}for(var C=C+('<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+O+'">'+(/all|left/.test(O)&&0==K?c?g:w:"")+(/all|right/.test(O)&&0==K?c?w:g:"")+this._generateMonthYearHeader(b,k,s,u,v,0<K||0<z,N,B)+'</div><table class="ui-datepicker-calendar"><thead><tr>'),R=p?'<th class="ui-datepicker-week-col">'+this._get(b,"weekHeader")+
"</th>":"",O=0;7>O;O++)var L=(O+n)%7,R=R+("<th"+(5<=(O+n+6)%7?' class="ui-datepicker-week-end"':"")+'><span title="'+o[L]+'">'+A[L]+"</span></th>");C+=R+"</tr></thead><tbody>";R=this._getDaysInMonth(s,k);s==b.selectedYear&&k==b.selectedMonth&&(b.selectedDay=Math.min(b.selectedDay,R));for(var O=(this._getFirstDayOfMonth(s,k)-n+7)%7,R=q?6:Math.ceil((O+R)/7),L=this._daylightSavingAdjust(new Date(s,k,1-O)),ma=0;ma<R;ma++){for(var C=C+"<tr>",x=!p?"":'<td class="ui-datepicker-week-col">'+this._get(b,"calculateWeek")(L)+
"</td>",O=0;7>O;O++){var I=J?J.apply(b.input?b.input[0]:null,[L]):[!0,""],E=L.getMonth()!=k,F=E&&!P||!I[0]||u&&L<u||v&&L>v,x=x+('<td class="'+(5<=(O+n+6)%7?" ui-datepicker-week-end":"")+(E?" ui-datepicker-other-month":"")+(L.getTime()==W.getTime()&&k==b.selectedMonth&&b._keyEvent||r.getTime()==L.getTime()&&r.getTime()==W.getTime()?" "+this._dayOverClass:"")+(F?" "+this._unselectableClass+" ui-state-disabled":"")+(E&&!Q?"":" "+I[1]+(L.getTime()==y.getTime()?" "+this._currentClass:"")+(L.getTime()==
d.getTime()?" ui-datepicker-today":""))+'"'+((!E||Q)&&I[2]?' title="'+I[2]+'"':"")+(F?"":' onclick="DP_jQuery_'+e+".datepicker._selectDay('#"+b.id+"',"+L.getMonth()+","+L.getFullYear()+', this);return false;"')+">"+(E&&!Q?"&#xa0;":F?'<span class="ui-state-default">'+L.getDate()+"</span>":'<a class="ui-state-default'+(L.getTime()==d.getTime()?" ui-state-highlight":"")+(L.getTime()==y.getTime()?" ui-state-active":"")+(E?" ui-priority-secondary":"")+'" href="#">'+L.getDate()+"</a>")+"</td>");L.setDate(L.getDate()+
1);L=this._daylightSavingAdjust(L)}C+=x+"</tr>"}k++;11<k&&(k=0,s++);C+="</tbody></table>"+(q?"</div>"+(0<m[0]&&z==m[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");h+=C}D+=h}D+=f+(a.browser.msie&&7>parseInt(a.browser.version,10)&&!b.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");b._keyEvent=!1;return D},_generateMonthYearHeader:function(b,d,c,f,g,n,m,k){var p=this._get(b,"changeMonth"),q=this._get(b,"changeYear"),y=this._get(b,"showMonthAfterYear"),
u='<div class="ui-datepicker-title">',v="";if(n||!p)v+='<span class="ui-datepicker-month">'+m[d]+"</span>";else{for(var m=f&&f.getFullYear()==c,s=g&&g.getFullYear()==c,v=v+('<select class="ui-datepicker-month" onchange="DP_jQuery_'+e+".datepicker._selectMonthYear('#"+b.id+"', this, 'M');\" onclick=\"DP_jQuery_"+e+".datepicker._clickMonthYear('#"+b.id+"');\">"),w=0;12>w;w++)if((!m||w>=f.getMonth())&&(!s||w<=g.getMonth()))v+='<option value="'+w+'"'+(w==d?' selected="selected"':"")+">"+k[w]+"</option>";
v+="</select>"}y||(u+=v+(n||!p||!q?"&#xa0;":""));b.yearshtml="";if(n||!q)u+='<span class="ui-datepicker-year">'+c+"</span>";else{var k=this._get(b,"yearRange").split(":"),o=(new Date).getFullYear(),m=function(a){a=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?o+parseInt(a,10):parseInt(a,10);return isNaN(a)?o:a},d=m(k[0]),k=Math.max(d,m(k[1]||"")),d=f?Math.max(d,f.getFullYear()):d,k=g?Math.min(k,g.getFullYear()):k;for(b.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+
e+".datepicker._selectMonthYear('#"+b.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+e+".datepicker._clickMonthYear('#"+b.id+"');\">";d<=k;d++)b.yearshtml+='<option value="'+d+'"'+(d==c?' selected="selected"':"")+">"+d+"</option>";b.yearshtml+="</select>";a.browser.mozilla?u+='<select class="ui-datepicker-year"><option value="'+c+'" selected="selected">'+c+"</option></select>":(u+=b.yearshtml,b.yearshtml=null)}u+=this._get(b,"yearSuffix");y&&(u+=(n||!p||!q?"&#xa0;":"")+v);return u+"</div>"},_adjustInstDate:function(a,
d,c){var e=a.drawYear+("Y"==c?d:0),f=a.drawMonth+("M"==c?d:0),d=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+("D"==c?d:0),e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,d)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();("M"==c||"Y"==c)&&this._notifyChange(a)},_restrictMinMax:function(a,d){var c=this._getMinMaxDate(a,"min"),a=this._getMinMaxDate(a,"max"),d=c&&d<c?c:d;return a&&d>a?a:d},_notifyChange:function(a){var d=
this._get(a,"onChangeMonthYear");d&&d.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return null==a?[1,1]:"number"==typeof a?[1,a]:a},_getMinMaxDate:function(a,d){return this._determineDate(a,this._get(a,d+"Date"),null)},_getDaysInMonth:function(a,d){return 32-this._daylightSavingAdjust(new Date(a,d,32)).getDate()},_getFirstDayOfMonth:function(a,d){return(new Date(a,d,1)).getDay()},_canAdjustMonth:function(a,d,c,
e){var f=this._getNumberOfMonths(a),c=this._daylightSavingAdjust(new Date(c,e+(0>d?d:f[0]*f[1]),1));0>d&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,c){var e=this._getMinMaxDate(a,"min"),a=this._getMinMaxDate(a,"max");return(!e||c.getTime()>=e.getTime())&&(!a||c.getTime()<=a.getTime())},_getFormatConfig:function(a){var c=this._get(a,"shortYearCutoff"),c="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10);return{shortYearCutoff:c,
dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,c,e,f){c||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);c=c?"object"==typeof c?c:this._daylightSavingAdjust(new Date(f,e,c)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),c,this._getFormatConfig(a))}});
a.fn.datepicker=function(b){if(!this.length)return this;a.datepicker.initialized||(a(document).mousedown(a.datepicker._checkExternalClick).find("body").append(a.datepicker.dpDiv),a.datepicker.initialized=!0);var c=Array.prototype.slice.call(arguments,1);return"string"==typeof b&&("isDisabled"==b||"getDate"==b||"widget"==b)||"option"==b&&2==arguments.length&&"string"==typeof arguments[1]?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c)):this.each(function(){"string"==typeof b?
a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(c)):a.datepicker._attachDatepicker(this,b)})};a.datepicker=new c;a.datepicker.initialized=!1;a.datepicker.uuid=(new Date).getTime();a.datepicker.version="1.8.11";window["DP_jQuery_"+e]=a})(jQuery);
(function(a,f){a.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=a("<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();a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===f)return this._value();this._setOption("value",a);return this},_setOption:function(c,f){"value"===c&&(this.options.value=f,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete"));a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;"number"!==typeof a&&(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(),f=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change"));this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(f.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});a.extend(a.ui.progressbar,{version:"1.8.11"})})(jQuery);
jQuery.effects||function(a,f){function c(b){var c;return b&&b.constructor==Array&&3==b.length?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[2.55*parseFloat(c[1]),2.55*parseFloat(c[2]),2.55*parseFloat(c[3])]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],
16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:/rgba\(0, 0, 0, 0\)/.exec(b)?j.transparent:j[a.trim(b).toLowerCase()]}function g(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]])for(var e=a.length;e--;)c=a[e],"string"==typeof a[c]&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c]);else for(c in a)"string"===
typeof a[c]&&(b[c]=a[c]);return b}function e(b){var c,d;for(c in b)d=b[c],(null==d||a.isFunction(d)||c in n||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function b(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function d(b,c,d,e){"object"==typeof b&&(e=c,d=null,c=b,b=c.effect);a.isFunction(c)&&(e=c,d=null,c={});if("number"==typeof c||a.fx.speeds[c])e=d,d=c,c={};a.isFunction(d)&&(e=d,d=null);c=c||{};d=d||c.duration;d=a.fx.off?0:"number"==typeof d?
d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default;e=e||c.complete;return[b,c,d,e]}function i(b){return!b||"number"===typeof b||a.fx.speeds[b]||"string"===typeof b&&!a.effects[b]?!0:!1}a.effects={};a.each("backgroundColor,borderBottomColor,borderLeftColor,borderRightColor,borderTopColor,borderColor,color,outlineColor".split(","),function(b,d){a.fx.step[d]=function(b){if(!b.colorInit){var e;e=b.elem;var f=d,g;do{g=a.curCSS(e,f);if(""!=g&&"transparent"!=g||a.nodeName(e,"body"))break;f="backgroundColor"}while(e=
e.parentNode);e=c(g);b.start=e;b.end=c(b.end);b.colorInit=!0}b.elem.style[d]="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 j={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]},l=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(c,d,f,j){a.isFunction(f)&&(j=f,f=null);return this.queue("fx",function(){var i=a(this),n=i.attr("style")||
" ",v=e(g.call(this)),s,w=i.attr("className");a.each(l,function(a,b){c[b]&&i[b+"Class"](c[b])});s=e(g.call(this));i.attr("className",w);i.animate(b(v,s),d,f,function(){a.each(l,function(a,b){c[b]&&i[b+"Class"](c[b])});"object"==typeof i.attr("style")?(i.attr("style").cssText="",i.attr("style").cssText=n):i.attr("style",n);j&&j.apply(this,arguments)});v=a.queue(this);s=v.splice(v.length-1,1)[0];v.splice(1,0,s);a.dequeue(this)})};a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?
a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(b,c,d,e,g){return"boolean"==typeof c||c===f?d?a.effects.animateClass.apply(this,[c?{add:b}:{remove:b},d,e,g]):this._toggleClass(b,c):a.effects.animateClass.apply(this,[{toggle:b},c,d,e])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,
[{add:c,remove:b},d,e,f])}});a.extend(a.effects,{version:"1.8.11",save:function(a,b){for(var c=0;c<b.length;c++)null!==b[c]&&a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c<b.length;c++)null!==b[c]&&a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){"toggle"==b&&(b=a.is(":hidden")?"show":"hide");return b},getBaseline:function(a,b){var c;switch(a[0]){case "top":c=0;break;case "middle":c=0.5;break;case "bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case "left":a=
0;break;case "center":a=0.5;break;case "right":a=1;break;default:a=a[1]/b.width}return{x:a,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});b.wrap(d);d=b.parent();"static"==b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):
(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d);isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));return d.css(c).show()},removeWrapper:function(a){return a.parent().is(".ui-effects-wrapper")?a.parent().replaceWith(a):a},setTransition:function(b,c,d,e){e=e||{};a.each(c,function(a,c){unit=b.cssUnit(c);0<unit[0]&&(e[c]=unit[0]*d+unit[1])});return e}});a.fn.extend({effect:function(b){var c=
d.apply(this,arguments),e={options:c[1],duration:c[2],callback:c[3]},c=e.options.mode,f=a.effects[b];return a.fx.off||!f?c?this[c](e.duration,e.callback):this.each(function(){e.callback&&e.callback.call(this)}):f.call(this,e)},_show:a.fn.show,show:function(a){if(i(a))return this._show.apply(this,arguments);var b=d.apply(this,arguments);b[1].mode="show";return this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(i(a))return this._hide.apply(this,arguments);var b=d.apply(this,arguments);b[1].mode=
"hide";return this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(i(b)||"boolean"===typeof b||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=d.apply(this,arguments);c[1].mode="toggle";return this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];a.each(["em","px","%","pt"],function(a,b){0<c.indexOf(b)&&(d=[parseFloat(c),b])});return d}});a.easing.jswing=a.easing.swing;a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,
c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*
((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,
b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return 0==b?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:1>(b/=e/2)?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return 1>
(b/=e/2)?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=0,g=d;if(0==b)return c;if(1==(b/=e))return c+d;f||(f=0.3*e);g<Math.abs(d)?(g=d,a=f/4):a=f/(2*Math.PI)*Math.asin(d/g);return-(g*Math.pow(2,10*(b-=1))*Math.sin(2*(b*e-a)*Math.PI/f))+c},easeOutElastic:function(a,b,c,d,e){var f=0,g=d;if(0==b)return c;if(1==(b/=e))return c+d;f||(f=0.3*e);g<Math.abs(d)?(g=d,a=f/4):a=f/(2*Math.PI)*Math.asin(d/g);return g*Math.pow(2,-10*b)*Math.sin(2*(b*e-a)*Math.PI/
f)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=0,g=d;if(0==b)return c;if(2==(b/=e/2))return c+d;f||(f=1.5*0.3*e);g<Math.abs(d)?(g=d,a=f/4):a=f/(2*Math.PI)*Math.asin(d/g);return 1>b?-0.5*g*Math.pow(2,10*(b-=1))*Math.sin(2*(b*e-a)*Math.PI/f)+c:0.5*g*Math.pow(2,-10*(b-=1))*Math.sin(2*(b*e-a)*Math.PI/f)+d+c},easeInBack:function(a,b,c,d,e,g){g==f&&(g=1.70158);return d*(b/=e)*b*((g+1)*b-g)+c},easeOutBack:function(a,b,c,d,e,g){g==f&&(g=1.70158);return d*((b=b/e-1)*b*((g+1)*b+g)+1)+c},easeInOutBack:function(a,
b,c,d,e,g){g==f&&(g=1.70158);return 1>(b/=e/2)?d/2*b*b*(((g*=1.525)+1)*b-g)+c:d/2*((b-=2)*b*(((g*=1.525)+1)*b+g)+2)+c},easeInBounce:function(b,c,d,e,f){return e-a.easing.easeOutBounce(b,f-c,0,e,f)+d},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?7.5625*d*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+0.75)+c:b<2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+0.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+0.984375)+c},easeInOutBounce:function(b,c,d,e,f){return c<f/2?0.5*a.easing.easeInBounce(b,2*c,0,e,f)+d:0.5*a.easing.easeOutBounce(b,
2*c-f,0,e,f)+0.5*e+d}})}(jQuery);
(function(a){a.effects.blind=function(f){return this.queue(function(){var c=a(this),g=["position","top","bottom","left","right"],e=a.effects.setMode(c,f.options.mode||"hide"),b=f.options.direction||"vertical";a.effects.save(c,g);c.show();var d=a.effects.createWrapper(c).css({overflow:"hidden"}),i="vertical"==b?"height":"width",b="vertical"==b?d.height():d.width();"show"==e&&d.css(i,0);var j={};j[i]="show"==e?b:0;d.animate(j,f.duration,f.options.easing,function(){"hide"==e&&c.hide();a.effects.restore(c,
g);a.effects.removeWrapper(c);f.callback&&f.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);
(function(a){a.effects.bounce=function(f){return this.queue(function(){var c=a(this),g=["position","top","bottom","left","right"],e=a.effects.setMode(c,f.options.mode||"effect"),b=f.options.direction||"up",d=f.options.distance||20,i=f.options.times||5,j=f.duration||250;/show|hide/.test(e)&&g.push("opacity");a.effects.save(c,g);c.show();a.effects.createWrapper(c);var l="up"==b||"down"==b?"top":"left",b="up"==b||"left"==b?"pos":"neg",d=f.options.distance||("top"==l?c.outerHeight({margin:!0})/3:c.outerWidth({margin:!0})/
3);"show"==e&&c.css("opacity",0).css(l,"pos"==b?-d:d);"hide"==e&&(d/=2*i);"hide"!=e&&i--;if("show"==e){var n={opacity:1};n[l]=("pos"==b?"+=":"-=")+d;c.animate(n,j/2,f.options.easing);d/=2;i--}for(n=0;n<i;n++){var m={},k={};m[l]=("pos"==b?"-=":"+=")+d;k[l]=("pos"==b?"+=":"-=")+d;c.animate(m,j/2,f.options.easing).animate(k,j/2,f.options.easing);d="hide"==e?2*d:d/2}"hide"==e?(n={opacity:0},n[l]=("pos"==b?"-=":"+=")+d,c.animate(n,j/2,f.options.easing,function(){c.hide();a.effects.restore(c,g);a.effects.removeWrapper(c);
f.callback&&f.callback.apply(this,arguments)})):(m={},k={},m[l]=("pos"==b?"-=":"+=")+d,k[l]=("pos"==b?"+=":"-=")+d,c.animate(m,j/2,f.options.easing).animate(k,j/2,f.options.easing,function(){a.effects.restore(c,g);a.effects.removeWrapper(c);f.callback&&f.callback.apply(this,arguments)}));c.queue("fx",function(){c.dequeue()});c.dequeue()})}})(jQuery);
(function(a){a.effects.clip=function(f){return this.queue(function(){var c=a(this),g="position,top,bottom,left,right,height,width".split(","),e=a.effects.setMode(c,f.options.mode||"hide"),b=f.options.direction||"vertical";a.effects.save(c,g);c.show();var d=a.effects.createWrapper(c).css({overflow:"hidden"}),d="IMG"==c[0].tagName?d:c,i="vertical"==b?"height":"width",j="vertical"==b?"top":"left",b="vertical"==b?d.height():d.width();"show"==e&&(d.css(i,0),d.css(j,b/2));var l={};l[i]="show"==e?b:0;l[j]=
"show"==e?0:b/2;d.animate(l,{queue:!1,duration:f.duration,easing:f.options.easing,complete:function(){"hide"==e&&c.hide();a.effects.restore(c,g);a.effects.removeWrapper(c);f.callback&&f.callback.apply(c[0],arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.drop=function(f){return this.queue(function(){var c=a(this),g="position,top,bottom,left,right,opacity".split(","),e=a.effects.setMode(c,f.options.mode||"hide"),b=f.options.direction||"left";a.effects.save(c,g);c.show();a.effects.createWrapper(c);var d="up"==b||"down"==b?"top":"left",b="up"==b||"left"==b?"pos":"neg",i=f.options.distance||("top"==d?c.outerHeight({margin:!0})/2:c.outerWidth({margin:!0})/2);"show"==e&&c.css("opacity",0).css(d,"pos"==b?-i:i);var j={opacity:"show"==
e?1:0};j[d]=("show"==e?"pos"==b?"+=":"-=":"pos"==b?"-=":"+=")+i;c.animate(j,{queue:!1,duration:f.duration,easing:f.options.easing,complete:function(){"hide"==e&&c.hide();a.effects.restore(c,g);a.effects.removeWrapper(c);f.callback&&f.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.explode=function(f){return this.queue(function(){var c=f.options.pieces?Math.round(Math.sqrt(f.options.pieces)):3,g=f.options.pieces?Math.round(Math.sqrt(f.options.pieces)):3;f.options.mode="toggle"==f.options.mode?a(this).is(":visible")?"hide":"show":f.options.mode;var e=a(this).show().css("visibility","hidden"),b=e.offset();b.top-=parseInt(e.css("marginTop"),10)||0;b.left-=parseInt(e.css("marginLeft"),10)||0;for(var d=e.outerWidth(!0),i=e.outerHeight(!0),j=0;j<c;j++)for(var l=
0;l<g;l++)e.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-l*(d/g),top:-j*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:d/g,height:i/c,left:b.left+l*(d/g)+("show"==f.options.mode?(l-Math.floor(g/2))*(d/g):0),top:b.top+j*(i/c)+("show"==f.options.mode?(j-Math.floor(c/2))*(i/c):0),opacity:"show"==f.options.mode?0:1}).animate({left:b.left+l*(d/g)+("show"==f.options.mode?0:(l-Math.floor(g/2))*(d/g)),top:b.top+
j*(i/c)+("show"==f.options.mode?0:(j-Math.floor(c/2))*(i/c)),opacity:"show"==f.options.mode?1:0},f.duration||500);setTimeout(function(){"show"==f.options.mode?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide();f.callback&&f.callback.apply(e[0]);e.dequeue();a("div.ui-effects-explode").remove()},f.duration||500)})}})(jQuery);
(function(a){a.effects.fade=function(f){return this.queue(function(){var c=a(this),g=a.effects.setMode(c,f.options.mode||"hide");c.animate({opacity:g},{queue:!1,duration:f.duration,easing:f.options.easing,complete:function(){f.callback&&f.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.fold=function(f){return this.queue(function(){var c=a(this),g=["position","top","bottom","left","right"],e=a.effects.setMode(c,f.options.mode||"hide"),b=f.options.size||15,d=!!f.options.horizFirst,i=f.duration?f.duration/2:a.fx.speeds._default/2;a.effects.save(c,g);c.show();var j=a.effects.createWrapper(c).css({overflow:"hidden"}),l="show"==e!=d,n=l?["width","height"]:["height","width"],l=l?[j.width(),j.height()]:[j.height(),j.width()],m=/([0-9]+)%/.exec(b);m&&(b=parseInt(m[1],
10)/100*l["hide"==e?0:1]);"show"==e&&j.css(d?{height:0,width:b}:{height:b,width:0});d={};m={};d[n[0]]="show"==e?l[0]:b;m[n[1]]="show"==e?l[1]:0;j.animate(d,i,f.options.easing).animate(m,i,f.options.easing,function(){"hide"==e&&c.hide();a.effects.restore(c,g);a.effects.removeWrapper(c);f.callback&&f.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);
(function(a){a.effects.highlight=function(f){return this.queue(function(){var c=a(this),g=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,f.options.mode||"show"),b={backgroundColor:c.css("backgroundColor")};"hide"==e&&(b.opacity=0);a.effects.save(c,g);c.show().css({backgroundImage:"none",backgroundColor:f.options.color||"#ffff99"}).animate(b,{queue:!1,duration:f.duration,easing:f.options.easing,complete:function(){"hide"==e&&c.hide();a.effects.restore(c,g);"show"==e&&!a.support.opacity&&
this.style.removeAttribute("filter");f.callback&&f.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.pulsate=function(f){return this.queue(function(){var c=a(this),g=a.effects.setMode(c,f.options.mode||"show");times=2*(f.options.times||5)-1;duration=f.duration?f.duration/2:a.fx.speeds._default/2;isVisible=c.is(":visible");animateTo=0;isVisible||(c.css("opacity",0).show(),animateTo=1);("hide"==g&&isVisible||"show"==g&&!isVisible)&&times--;for(g=0;g<times;g++)c.animate({opacity:animateTo},duration,f.options.easing),animateTo=(animateTo+1)%2;c.animate({opacity:animateTo},duration,
f.options.easing,function(){0==animateTo&&c.hide();f.callback&&f.callback.apply(this,arguments)});c.queue("fx",function(){c.dequeue()}).dequeue()})}})(jQuery);
(function(a){a.effects.puff=function(f){return this.queue(function(){var c=a(this),g=a.effects.setMode(c,f.options.mode||"hide"),e=parseInt(f.options.percent,10)||150,b=e/100,d={height:c.height(),width:c.width()};a.extend(f.options,{fade:!0,mode:g,percent:"hide"==g?e:100,from:"hide"==g?d:{height:d.height*b,width:d.width*b}});c.effect("scale",f.options,f.duration,f.callback);c.dequeue()})};a.effects.scale=function(f){return this.queue(function(){var c=a(this),g=a.extend(!0,{},f.options),e=a.effects.setMode(c,
f.options.mode||"effect"),b=parseInt(f.options.percent,10)||(0==parseInt(f.options.percent,10)?0:"hide"==e?0:100),d=f.options.direction||"both",i=f.options.origin;"effect"!=e&&(g.origin=i||["middle","center"],g.restore=!0);i={height:c.height(),width:c.width()};c.from=f.options.from||("show"==e?{height:0,width:0}:i);b={y:"horizontal"!=d?b/100:1,x:"vertical"!=d?b/100:1};c.to={height:i.height*b.y,width:i.width*b.x};f.options.fade&&("show"==e&&(c.from.opacity=0,c.to.opacity=1),"hide"==e&&(c.from.opacity=
1,c.to.opacity=0));g.from=c.from;g.to=c.to;g.mode=e;c.effect("size",g,f.duration,f.callback);c.dequeue()})};a.effects.size=function(f){return this.queue(function(){var c=a(this),g="position,top,bottom,left,right,width,height,overflow,opacity".split(","),e="position,top,bottom,left,right,overflow,opacity".split(","),b=["width","height","overflow"],d=["fontSize"],i=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],j=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
l=a.effects.setMode(c,f.options.mode||"effect"),n=f.options.restore||!1,m=f.options.scale||"both",k=f.options.origin,p={height:c.height(),width:c.width()};c.from=f.options.from||p;c.to=f.options.to||p;k&&(k=a.effects.getBaseline(k,p),c.from.top=(p.height-c.from.height)*k.y,c.from.left=(p.width-c.from.width)*k.x,c.to.top=(p.height-c.to.height)*k.y,c.to.left=(p.width-c.to.width)*k.x);var q=c.from.height/p.height,y=c.from.width/p.width,u=c.to.height/p.height,v=c.to.width/p.width;if("box"==m||"both"==
m)q!=u&&(g=g.concat(i),c.from=a.effects.setTransition(c,i,q,c.from),c.to=a.effects.setTransition(c,i,u,c.to)),y!=v&&(g=g.concat(j),c.from=a.effects.setTransition(c,j,y,c.from),c.to=a.effects.setTransition(c,j,v,c.to));if(("content"==m||"both"==m)&&q!=u)g=g.concat(d),c.from=a.effects.setTransition(c,d,q,c.from),c.to=a.effects.setTransition(c,d,u,c.to);a.effects.save(c,n?g:e);c.show();a.effects.createWrapper(c);c.css("overflow","hidden").css(c.from);if("content"==m||"both"==m)i=i.concat(["marginTop",
"marginBottom"]).concat(d),j=j.concat(["marginLeft","marginRight"]),b=g.concat(i).concat(j),c.find("*[width]").each(function(){child=a(this);n&&a.effects.save(child,b);var c=child.height(),d=child.width();child.from={height:c*q,width:d*y};child.to={height:c*u,width:d*v};q!=u&&(child.from=a.effects.setTransition(child,i,q,child.from),child.to=a.effects.setTransition(child,i,u,child.to));y!=v&&(child.from=a.effects.setTransition(child,j,y,child.from),child.to=a.effects.setTransition(child,j,v,child.to));
child.css(child.from);child.animate(child.to,f.duration,f.options.easing,function(){n&&a.effects.restore(child,b)})});c.animate(c.to,{queue:!1,duration:f.duration,easing:f.options.easing,complete:function(){0===c.to.opacity&&c.css("opacity",c.from.opacity);"hide"==l&&c.hide();a.effects.restore(c,n?g:e);a.effects.removeWrapper(c);f.callback&&f.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.shake=function(f){return this.queue(function(){var c=a(this),g=["position","top","bottom","left","right"];a.effects.setMode(c,f.options.mode||"effect");var e=f.options.direction||"left",b=f.options.distance||20,d=f.options.times||3,i=f.duration||f.options.duration||140;a.effects.save(c,g);c.show();a.effects.createWrapper(c);var j="up"==e||"down"==e?"top":"left",l="up"==e||"left"==e?"pos":"neg",e={},n={},m={};e[j]=("pos"==l?"-=":"+=")+b;n[j]=("pos"==l?"+=":"-=")+2*b;m[j]=("pos"==
l?"-=":"+=")+2*b;c.animate(e,i,f.options.easing);for(b=1;b<d;b++)c.animate(n,i,f.options.easing).animate(m,i,f.options.easing);c.animate(n,i,f.options.easing).animate(e,i/2,f.options.easing,function(){a.effects.restore(c,g);a.effects.removeWrapper(c);f.callback&&f.callback.apply(this,arguments)});c.queue("fx",function(){c.dequeue()});c.dequeue()})}})(jQuery);
(function(a){a.effects.slide=function(f){return this.queue(function(){var c=a(this),g=["position","top","bottom","left","right"],e=a.effects.setMode(c,f.options.mode||"show"),b=f.options.direction||"left";a.effects.save(c,g);c.show();a.effects.createWrapper(c).css({overflow:"hidden"});var d="up"==b||"down"==b?"top":"left",b="up"==b||"left"==b?"pos":"neg",i=f.options.distance||("top"==d?c.outerHeight({margin:!0}):c.outerWidth({margin:!0}));"show"==e&&c.css(d,"pos"==b?isNaN(i)?"-"+i:-i:i);var j={};
j[d]=("show"==e?"pos"==b?"+=":"-=":"pos"==b?"-=":"+=")+i;c.animate(j,{queue:!1,duration:f.duration,easing:f.options.easing,complete:function(){"hide"==e&&c.hide();a.effects.restore(c,g);a.effects.removeWrapper(c);f.callback&&f.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.transfer=function(f){return this.queue(function(){var c=a(this),g=a(f.options.to),e=g.offset(),g={top:e.top,left:e.left,height:g.innerHeight(),width:g.innerWidth()},e=c.offset(),b=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(f.options.className).css({top:e.top,left:e.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(g,f.duration,f.options.easing,function(){b.remove();f.callback&&f.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);
(function(a){function f(a,b){a=""+a;for(b=b||2;a.length<b;)a="0"+a;return a}function c(a,b,c){var d=a.getDate(),e=a.getDay(),g=a.getMonth(),a=a.getFullYear(),j={d:d,dd:f(d),ddd:l[c].shortDays[e],dddd:l[c].days[e],m:g+1,mm:f(g+1),mmm:l[c].shortMonths[g],mmmm:l[c].months[g],yy:(""+a).slice(2),yyyy:a},b=b.replace(n,function(a){return a in j?j[a]:a.slice(1,a.length-1)});return m.html(b).html()}function g(a,b){return a.getFullYear()===b.getFullYear()&&a.getMonth()==b.getMonth()&&a.getDate()==b.getDate()}
function e(a){if(a){if(a.constructor==Date)return a;if("string"==typeof a){var b=a.split("-");if(3==b.length)return new Date(parseInt(b[0],10),parseInt(b[1],10)-1,parseInt(b[2],10));if(!/^-?\d+$/.test(a))return;a=parseInt(a,10)}b=new Date;b.setDate(b.getDate()+a);return b}}function b(b,f){function i(d,e,f){D=d;Q=d.getFullYear();P=d.getMonth();r=d.getDate();f=f||a.Event("api");f.type="change";O.trigger(f,[d]);f.isDefaultPrevented()||(b.val(c(d,e.format,e.lang)),b.data("date",d),m.hide(f))}function n(c){c.type=
"onShow";O.trigger(c);a(document).bind("keydown.d",function(c){if(c.ctrlKey)return!0;var d=c.keyCode;if(8==d)return b.val(""),m.hide(c);if(27==d)return m.hide(c);if(0<=a(j).index(d)){if(!z)return m.show(c),c.preventDefault();var e=a("#"+s.weeks+" a"),f=a("."+s.focus),g=e.index(f);f.removeClass(s.focus);if(74==d||40==d)g+=7;else if(75==d||38==d)g-=7;else if(76==d||39==d)g+=1;else if(72==d||37==d)g-=1;41<g?(m.addMonth(),f=a("#"+s.weeks+" a:eq("+(g-42)+")")):0>g?(m.addMonth(-1),f=a("#"+s.weeks+" a:eq("+
(g+42)+")")):f=e.eq(g);f.addClass(s.focus);return c.preventDefault()}if(34==d)return m.addMonth();if(33==d)return m.addMonth(-1);if(36==d)return m.today();13==d&&(a(c.target).is("select")||a("."+s.focus).click());return 0<=a([16,17,18,9]).index(d)});a(document).bind("click.d",function(c){var d=c.target;!a(d).parents("#"+s.root).length&&d!=b[0]&&(!N||d!=N[0])&&m.hide(c)})}var m=this,v=new Date,s=f.css,w=l[f.lang],o=a("#"+s.root),A=o.find("#"+s.title),N,B,J,Q,P,r,D=b.attr("data-value")||f.value||b.val(),
K=b.attr("min")||f.min,h=b.attr("max")||f.max,z;0===K&&(K="0");D=e(D)||v;K=e(K||365*f.yearRange[0]);h=e(h||365*f.yearRange[1]);if(!w)throw"Dateinput: invalid language: "+f.lang;if("date"==b.attr("type")){var W=a("<input/>");a.each("class,disabled,id,maxlength,name,readonly,required,size,style,tabindex,title,value".split(","),function(a,c){W.attr(c,b.attr(c))});b.replaceWith(W);b=W}b.addClass(s.input);var O=b.add(m);if(!o.length){o=a("<div><div><a/><div/><a/></div><div><div/><div/></div></div>").hide().css({position:"absolute"}).attr("id",
s.root);o.children().eq(0).attr("id",s.head).end().eq(1).attr("id",s.body).children().eq(0).attr("id",s.days).end().eq(1).attr("id",s.weeks).end().end().end().find("a").eq(0).attr("id",s.prev).end().eq(1).attr("id",s.next);A=o.find("#"+s.head).find("div").attr("id",s.title);if(f.selectors){var C=a("<select/>").attr("id",s.month),R=a("<select/>").attr("id",s.year);A.html(C.add(R))}for(var L=o.find("#"+s.days),ma=0;7>ma;ma++)L.append(a("<span/>").text(w.shortDays[(ma+f.firstDay)%7]));a("body").append(o)}f.trigger&&
(N=a("<a/>").attr("href","#").addClass(s.trigger).click(function(a){m.show();return a.preventDefault()}).insertAfter(b));var x=o.find("#"+s.weeks),R=o.find("#"+s.year),C=o.find("#"+s.month);a.extend(m,{show:function(c){if(!b.attr("readonly")&&!b.attr("disabled")&&!z&&(c=c||a.Event(),c.type="onBeforeShow",O.trigger(c),!c.isDefaultPrevented())){a.each(d,function(){this.hide()});z=!0;C.unbind("change").change(function(){m.setValue(R.val(),a(this).val())});R.unbind("change").change(function(){m.setValue(a(this).val(),
C.val())});B=o.find("#"+s.prev).unbind("click").click(function(){B.hasClass(s.disabled)||m.addMonth(-1);return!1});J=o.find("#"+s.next).unbind("click").click(function(){J.hasClass(s.disabled)||m.addMonth();return!1});m.setValue(D);var e=b.offset();/iPad/i.test(navigator.userAgent)&&(e.top-=a(window).scrollTop());o.css({top:e.top+b.outerHeight({margins:!0})+f.offset[0],left:e.left+f.offset[1]});f.speed?o.show(f.speed,function(){n(c)}):(o.show(),n(c));return m}},setValue:function(b,c,d){var e=-1<=parseInt(c,
10)?new Date(parseInt(b,10),parseInt(c,10),parseInt(d||1,10)):b||D;e<K?e=K:e>h&&(e=h);b=e.getFullYear();c=e.getMonth();d=e.getDate();-1==c?(c=11,b--):12==c&&(c=0,b++);if(!z)return i(e,f),m;P=c;Q=b;var d=new Date(b,c,1-f.firstDay),d=d.getDay(),j=32-(new Date(b,c,32)).getDate(),l=32-(new Date(b,c-1,32)).getDate(),k;if(f.selectors){C.empty();a.each(w.months,function(c,d){K<new Date(b,c+1,-1)&&h>new Date(b,c,0)&&C.append(a("<option/>").html(d).attr("value",c))});R.empty();for(var e=v.getFullYear(),n=
e+f.yearRange[0];n<e+f.yearRange[1];n++)K<=new Date(n+1,-1,1)&&h>new Date(n,0,0)&&R.append(a("<option/>").text(n));C.val(c);R.val(b)}else A.html(w.months[c]+" "+b);x.empty();B.add(J).removeClass(s.disabled);for(var n=!d?-7:0,o,r;n<(!d?35:42);n++)o=a("<a/>"),0===n%7&&(k=a("<div/>").addClass(s.week),x.append(k)),n<d?(o.addClass(s.off),r=l-d+n+1,e=new Date(b,c-1,r)):n>=d+j?(o.addClass(s.off),r=n-j-d+1,e=new Date(b,c+1,r)):(r=n-d+1,e=new Date(b,c,r),g(D,e)?o.attr("id",s.current).addClass(s.focus):g(v,
e)&&o.attr("id",s.today)),K&&e<K&&o.add(B).addClass(s.disabled),h&&e>h&&o.add(J).addClass(s.disabled),o.attr("href","#"+r).text(r).data("date",e),k.append(o);x.find("a").click(function(b){var c=a(this);c.hasClass(s.disabled)||(a("#"+s.current).removeAttr("id"),c.attr("id",s.current),i(c.data("date"),f,b));return!1});s.sunday&&x.find(s.week).each(function(){var b=f.firstDay?7-f.firstDay:0;a(this).children().slice(b,b+1).addClass(s.sunday)});return m},setMin:function(a,b){K=e(a);b&&D<K&&m.setValue(K);
return m},setMax:function(a,b){h=e(a);b&&D>h&&m.setValue(h);return m},today:function(){return m.setValue(v)},addDay:function(a){return this.setValue(Q,P,r+(a||1))},addMonth:function(a){return this.setValue(Q,P+(a||1),r)},addYear:function(a){return this.setValue(Q+(a||1),P,r)},hide:function(b){if(z){b=a.Event();b.type="onHide";O.trigger(b);a(document).unbind("click.d").unbind("keydown.d");if(b.isDefaultPrevented())return;o.hide();z=!1}return m},getConf:function(){return f},getInput:function(){return b},
getCalendar:function(){return o},getValue:function(a){return a?c(D,a,f.lang):D},isOpen:function(){return z}});a.each(["onBeforeShow","onShow","change","onHide"],function(b,c){a.isFunction(f[c])&&a(m).bind(c,f[c]);m[c]=function(b){b&&a(m).bind(c,b);return m}});b.bind("focus click",m.show).keydown(function(b){var c=b.keyCode;return!z&&0<=a(j).index(c)?(m.show(b),b.preventDefault()):b.shiftKey||b.ctrlKey||b.altKey||9==c?!0:b.preventDefault()});e(b.val())&&i(D,f)}a.tools=a.tools||{version:"1.2.5"};var d=
[],i,j=[75,76,38,39,74,72,40,37],l={};i=a.tools.dateinput={conf:{format:"mm/dd/yy",selectors:!1,yearRange:[-5,5],lang:"en",offset:[0,0],speed:0,firstDay:0,min:void 0,max:void 0,trigger:!1,css:{prefix:"cal",input:"date",root:0,head:0,title:0,prev:0,next:0,month:0,year:0,days:0,body:0,weeks:0,today:0,current:0,week:0,off:0,sunday:0,focus:0,disabled:0,trigger:0}},localize:function(b,c){a.each(c,function(a,b){c[a]=b.split(",")});l[b]=c}};i.localize("en",{months:"January,February,March,April,May,June,July,August,September,October,November,December",
shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",days:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",shortDays:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"});var n=/d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*'/g,m=a("<a/>");a.expr[":"].date=function(b){var c=b.getAttribute("type");return c&&"date"==c||!!a(b).data("dateinput")};a.fn.dateinput=function(c){if(this.data("dateinput"))return this;c=a.extend(!0,{},i.conf,c);a.each(c.css,function(a,b){!b&&"prefix"!=a&&(c.css[a]=(c.css.prefix||"")+(b||
a))});var e;this.each(function(){var f=new b(a(this),c);d.push(f);f=f.getInput().data("dateinput",f);e=e?e.add(f):f});return e?e:this}})(jQuery);
(function(a){function f(a,b){b=Math.pow(10,b);return Math.round(a*b)/b}function c(a,b){return(b=parseInt(a.css(b),10))?b:(a=a[0].currentStyle)&&a.width&&parseInt(a.width,10)}function g(a){return(a=a.data("events"))&&a.onSlide}function e(b,d){function e(a,c,g,i){void 0===g?g=c/w*N:i&&(g-=d.min);B&&(g=Math.round(g/B)*B);if(void 0===c||B)c=g*w/N;if(isNaN(g))return p;c=Math.max(0,Math.min(c,w));g=c/w*N;if(i||!u)g+=d.min;u&&(i?c=w-c:g=d.max-g);var g=f(g,J),k="click"==a.type;if(D&&void 0!==v&&!k&&(a.type=
"onSlide",r.trigger(a,[g,c]),a.isDefaultPrevented()))return p;i=k?d.speed:0;k=k?function(){a.type="change";r.trigger(a,[g])}:null;u?(o.animate({top:c},i,k),d.progress&&A.animate({height:w-c+o.width()/2},i)):(o.animate({left:c},i,k),d.progress&&A.animate({width:c+o.width()/2},i));v=g;b.val(g);return p}function i(){(u=d.vertical||c(y,"height")>c(y,"width"))?(w=c(y,"height")-c(o,"height"),s=y.offset().top+w):(w=c(y,"width")-c(o,"width"),s=y.offset().left)}function k(){i();p.setValue(void 0!==d.value?
d.value:d.min)}var p=this,q=d.css,y=a("<div><div/><a href='#'/></div>").data("rangeinput",p),u,v,s,w;b.before(y);var o=y.addClass(q.slider).find("a").addClass(q.handle),A=y.find("div").addClass(q.progress);a.each(["min","max","step","value"],function(a,c){a=b.attr(c);parseFloat(a)&&(d[c]=parseFloat(a,10))});var N=d.max-d.min,B="any"==d.step?0:d.step,J=d.precision;if(void 0===J)try{J=B.toString().split(".")[1].length}catch(Q){J=0}if("range"==b.attr("type")){var P=a("<input/>");a.each("class,disabled,id,maxlength,name,readonly,required,size,style,tabindex,title,value".split(","),
function(a,c){P.attr(c,b.attr(c))});P.val(d.value);b.replaceWith(P);b=P}b.addClass(q.input);var r=a(p).add(b),D=!0;a.extend(p,{getValue:function(){return v},setValue:function(b,c){i();return e(c||a.Event("api"),void 0,b,!0)},getConf:function(){return d},getProgress:function(){return A},getHandle:function(){return o},getInput:function(){return b},step:function(b,c){c=c||a.Event();p.setValue(v+("any"==d.step?1:d.step)*(b||1),c)},stepUp:function(a){return p.step(a||1)},stepDown:function(a){return p.step(-a||
-1)}});a.each(["onSlide","change"],function(b,c){a.isFunction(d[c])&&a(p).bind(c,d[c]);p[c]=function(b){b&&a(p).bind(c,b);return p}});o.drag({drag:!1}).bind("dragStart",function(){i();D=g(a(p))||g(b)}).bind("drag",function(a,c,d){if(b.is(":disabled"))return!1;e(a,u?c:d)}).bind("dragEnd",function(a){a.isDefaultPrevented()||(a.type="change",r.trigger(a,[v]))}).click(function(a){return a.preventDefault()});y.click(function(a){if(b.is(":disabled")||a.target==o[0])return a.preventDefault();i();var c=o.width()/
2;e(a,u?w-s-c+a.pageY:a.pageX-s-c)});d.keyboard&&b.keydown(function(c){if(!b.attr("readonly")){var d=c.keyCode,e=-1!=a([75,76,38,33,39]).index(d),f=-1!=a([74,72,40,34,37]).index(d);if((e||f)&&!c.shiftKey&&!c.altKey&&!c.ctrlKey)return e?p.step(33==d?10:1,c):f&&p.step(34==d?-10:-1,c),c.preventDefault()}});b.blur(function(b){var c=a(this).val();c!==v&&p.setValue(c,b)});a.extend(b[0],{stepUp:p.stepUp,stepDown:p.stepDown});k();w||a(window).load(k)}a.tools=a.tools||{version:"1.2.5"};var b;b=a.tools.rangeinput=
{conf:{min:0,max:100,step:"any",steps:0,value:0,precision:void 0,vertical:0,keyboard:!0,progress:!1,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var d,i;a.fn.drag=function(b){document.ondragstart=function(){return!1};b=a.extend({x:!0,y:!0,drag:!0},b);d=d||a(document).bind("mousedown mouseup",function(c){var e=a(c.target);if("mousedown"==c.type&&e.data("drag")){var f=e.position(),g=c.pageX-f.left,p=c.pageY-f.top,q=!0;d.bind("mousemove.drag",function(a){var c=
a.pageX-g,a=a.pageY-p,d={};b.x&&(d.left=c);b.y&&(d.top=a);q&&(e.trigger("dragStart"),q=!1);b.drag&&e.css(d);e.trigger("drag",[a,c]);i=e});c.preventDefault()}else try{i&&i.trigger("dragEnd")}finally{d.unbind("mousemove.drag"),i=null}});return this.data("drag",!0)};a.expr[":"].range=function(b){var c=b.getAttribute("type");return c&&"range"==c||!!a(b).filter("input").data("rangeinput")};a.fn.rangeinput=function(c){if(this.data("rangeinput"))return this;var c=a.extend(!0,{},b.conf,c),d;this.each(function(){var b=
new e(a(this),a.extend(!0,{},c)),b=b.getInput().data("rangeinput",b);d=d?d.add(b):b});return d?d:this}})(jQuery);
(function(a){function f(b,c,d){var e=b.offset().top,f=b.offset().left,g=d.position.split(/,?\s+/),j=g[0],g=g[1],e=e-(c.outerHeight()-d.offset[0]),f=f+(b.outerWidth()+d.offset[1]);/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());d=c.outerHeight()+b.outerHeight();"center"==j&&(e+=d/2);"bottom"==j&&(e+=d);b=b.outerWidth();"center"==g&&(f-=(b+c.outerWidth())/2);"left"==g&&(f-=b);return{top:e,left:f}}function c(a){function b(){return this.getAttribute("type")==a}b.key="[type="+a+"]";return b}
function g(b,c,e){function g(b,c,d){if(e.grouped||!b.length){var f;!1===d||a.isArray(d)?(f=l.messages[c.key||c]||l.messages["*"],f=f[e.lang]||l.messages["*"].en,(c=f.match(/\$\d/g))&&a.isArray(d)&&a.each(c,function(a){f=f.replace(this,d[a])})):f=d[e.lang]||d;b.push(f)}}var j=this,i=c.add(j),b=b.not(":button, :image, :reset, :submit");a.extend(j,{getConf:function(){return e},getForm:function(){return c},getInputs:function(){return b},reflow:function(){b.each(function(){var b=a(this),c=b.data("msg.el");
c&&(b=f(b,c,e),c.css({top:b.top,left:b.left}))});return j},invalidate:function(c,d){if(!d){var f=[];a.each(c,function(a,c){a=b.filter("[name='"+a+"']");a.length&&(a.trigger("OI",[c]),f.push({input:a,messages:[c]}))});c=f;d=a.Event()}d.type="onFail";i.trigger(d,[c]);d.isDefaultPrevented()||m[e.effect][0].call(j,c,d);return j},reset:function(c){c=c||b;c.removeClass(e.errorClass).each(function(){var b=a(this).data("msg.el");b&&(b.remove(),a(this).data("msg.el",null))}).unbind(e.errorInputEvent||"");
return j},destroy:function(){c.unbind(e.formEvent+".V").unbind("reset.V");b.unbind(e.inputEvent+".V").unbind("change.V");return j.reset()},checkValidity:function(c,f){c=c||b;c=c.not(":disabled");if(!c.length)return!0;f=f||a.Event();f.type="onBeforeValidate";i.trigger(f,[c]);if(f.isDefaultPrevented())return f.result;var l=[];c.not(":radio:not(:checked)").each(function(){var b=[],c=a(this).data("messages",b),k=d&&c.is(":date")?"onHide.v":e.errorInputEvent+".v";c.unbind(k);a.each(n,function(){var a=
this,d=a[0];if(c.filter(d).length&&(a=a[1].call(j,c,c.val()),!0!==a)){f.type="onBeforeFail";i.trigger(f,[c,d]);if(f.isDefaultPrevented())return!1;var k=c.attr(e.messageAttr);if(k)return b=[k],!1;g(b,d,a)}});b.length&&(l.push({input:c,messages:b}),c.trigger("OI",[b]),e.errorInputEvent&&c.bind(k,function(a){j.checkValidity(c,a)}));if(e.singleError&&l.length)return!1});var p=m[e.effect];if(!p)throw'Validator: cannot find effect "'+e.effect+'"';if(l.length)return j.invalidate(l,f),!1;p[1].call(j,c,f);
f.type="onSuccess";i.trigger(f,[c]);c.unbind(e.errorInputEvent+".v");return!0}});a.each(["onBeforeValidate","onBeforeFail","onFail","onSuccess"],function(b,c){a.isFunction(e[c])&&a(j).bind(c,e[c]);j[c]=function(b){b&&a(j).bind(c,b);return j}});e.formEvent&&c.bind(e.formEvent+".V",function(a){if(!j.checkValidity(null,a))return a.preventDefault()});c.bind("reset.V",function(){j.reset()});b[0]&&b[0].validity&&b.each(function(){this.oninvalid=function(){return!1}});c[0]&&(c[0].checkValidity=j.checkValidity);
e.inputEvent&&b.bind(e.inputEvent+".V",function(b){j.checkValidity(a(this),b)});b.filter(":checkbox, select").filter("[required]").bind("change.V",function(b){var c=a(this);(this.checked||c.is("select")&&a(this).val())&&m[e.effect][1].call(j,c,b)});var s=b.filter(":radio").change(function(a){j.checkValidity(s,a)});a(window).resize(function(){j.reflow()})}a.tools=a.tools||{version:"1.2.5"};var e=/\[type=([a-z]+)\]/,b=/^-?[0-9]*(\.[0-9]+)?$/,d=a.tools.dateinput,i=/^([a-z0-9_\.\-\+]+)@([\da-z\.\-]+)\.([a-z\.]{2,6})$/i,
j=/^(https?:\/\/)?[\da-z\.\-]+\.[a-z\.]{2,6}[#&+_\?\/\w \.\-=]*$/i,l;l=a.tools.validator={conf:{grouped:!1,effect:"default",errorClass:"invalid",inputEvent:null,errorInputEvent:"keyup",formEvent:"submit",lang:"en",message:"<div/>",messageAttr:"data-message",messageClass:"error",offset:[0,0],position:"center right",singleError:!1,speed:"normal"},messages:{"*":{en:"Please correct this value"}},localize:function(b,c){a.each(c,function(a,c){l.messages[a]=l.messages[a]||{};l.messages[a][b]=c})},localizeFn:function(b,
c){l.messages[b]=l.messages[b]||{};a.extend(l.messages[b],c)},fn:function(b,d,f){a.isFunction(d)?f=d:("string"==typeof d&&(d={en:d}),this.messages[b.key||b]=d);if(d=e.exec(b))b=c(d[1]);n.push([b,f])},addEffect:function(a,b,c){m[a]=[b,c]}};var n=[],m={"default":[function(b){var c=this.getConf();a.each(b,function(b,d){b=d.input;b.addClass(c.errorClass);var e=b.data("msg.el");e||(e=a(c.message).addClass(c.messageClass).appendTo(document.body),b.data("msg.el",e));e.css({visibility:"hidden"}).find("p").remove();
a.each(d.messages,function(b,c){a("<p/>").html(c).appendTo(e)});e.outerWidth()==e.parent().width()&&e.add(e.find("p")).css({display:"inline"});d=f(b,e,c);e.css({visibility:"visible",position:"absolute",top:d.top,left:d.left}).fadeIn(c.speed)})},function(b){var c=this.getConf();b.removeClass(c.errorClass).each(function(){var b=a(this).data("msg.el");b&&b.css({visibility:"hidden"})})}]};a.each(["email","url","number"],function(b,c){a.expr[":"][c]=function(a){return a.getAttribute("type")===c}});a.fn.oninvalid=
function(a){return this[a?"bind":"trigger"]("OI",a)};l.fn(":email","Please enter a valid email address",function(a,b){return!b||i.test(b)});l.fn(":url","Please enter a valid URL",function(a,b){return!b||j.test(b)});l.fn(":number","Please enter a numeric value.",function(a,c){return b.test(c)});l.fn("[max]","Please enter a value smaller than $1",function(a,b){if(""===b||d&&a.is(":date"))return!0;a=a.attr("max");return parseFloat(b)<=parseFloat(a)?!0:[a]});l.fn("[min]","Please enter a value larger than $1",
function(a,b){if(""===b||d&&a.is(":date"))return!0;a=a.attr("min");return parseFloat(b)>=parseFloat(a)?!0:[a]});l.fn("[required]","Please complete this mandatory field.",function(a,b){return a.is(":checkbox")?a.is(":checked"):!!b});l.fn("[pattern]",function(a){return RegExp("^"+a.attr("pattern")+"$").test(a.val())});a.fn.validator=function(b){var c=this.data("validator");c&&(c.destroy(),this.removeData("validator"));b=a.extend(!0,{},l.conf,b);if(this.is("form"))return this.each(function(){var d=a(this);
c=new g(d.find(":input"),d,b);d.data("validator",c)});c=new g(this,this.eq(0).closest("form"),b);return this.data("validator",c)}})(jQuery);
(function(a){function f(){var c=window.innerHeight,f=document.compatMode;if(f||!a.support.boxModel)c="CSS1Compat"==f?document.documentElement.clientHeight:document.body.clientHeight;return c}a(window).scroll(function(){var c=f(),g=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,e=[];a.each(a.cache,function(){for(var a in this)this.hasOwnProperty(a)&&this[a].events&&this[a].events.inview&&e.push(this[a].handle.elem)});e.length&&a(e).each(function(){var b=
a(this),d=b.offset().top,e=b.height(),f=b.data("inview")||!1;g>d+e||g+c<d?f&&(b.data("inview",!1),b.trigger("inview",[!1])):g<d+e&&!f&&(b.data("inview",!0),b.trigger("inview",[!0]))})});a(function(){a(window).scroll()})})(jQuery);
(function(){var a=this,f=a._,c={},g=Array.prototype,e=Object.prototype,b=g.slice,d=g.unshift,i=e.toString,j=e.hasOwnProperty,l=g.forEach,n=g.map,m=g.reduce,k=g.reduceRight,p=g.filter,q=g.every,y=g.some,u=g.indexOf,v=g.lastIndexOf,e=Array.isArray,s=Object.keys,w=Function.prototype.bind,o=function(a){return new Q(a)};"undefined"!==typeof module&&module.exports?(module.exports=o,o._=o):a._=o;o.VERSION="1.1.7";var A=o.each=o.forEach=function(a,b,d){if(null!=a)if(l&&a.forEach===l)a.forEach(b,d);else if(a.length===
+a.length)for(var e=0,f=a.length;e<f&&!(e in a&&b.call(d,a[e],e,a)===c);e++);else for(e in a)if(j.call(a,e)&&b.call(d,a[e],e,a)===c)break};o.map=function(a,b,c){var d=[];if(null==a)return d;if(n&&a.map===n)return a.map(b,c);A(a,function(a,e,f){d[d.length]=b.call(c,a,e,f)});return d};o.reduce=o.foldl=o.inject=function(a,b,c,d){var e=void 0!==c;null==a&&(a=[]);if(m&&a.reduce===m)return d&&(b=o.bind(b,d)),e?a.reduce(b,c):a.reduce(b);A(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)});if(!e)throw new TypeError("Reduce of empty array with no initial value");
return c};o.reduceRight=o.foldr=function(a,b,c,d){null==a&&(a=[]);if(k&&a.reduceRight===k)return d&&(b=o.bind(b,d)),void 0!==c?a.reduceRight(b,c):a.reduceRight(b);a=(o.isArray(a)?a.slice():o.toArray(a)).reverse();return o.reduce(a,b,c,d)};o.find=o.detect=function(a,b,c){var d;N(a,function(a,e,f){if(b.call(c,a,e,f))return d=a,!0});return d};o.filter=o.select=function(a,b,c){var d=[];if(null==a)return d;if(p&&a.filter===p)return a.filter(b,c);A(a,function(a,e,f){b.call(c,a,e,f)&&(d[d.length]=a)});return d};
o.reject=function(a,b,c){var d=[];if(null==a)return d;A(a,function(a,e,f){b.call(c,a,e,f)||(d[d.length]=a)});return d};o.every=o.all=function(a,b,d){var e=!0;if(null==a)return e;if(q&&a.every===q)return a.every(b,d);A(a,function(a,f,g){if(!(e=e&&b.call(d,a,f,g)))return c});return e};var N=o.some=o.any=function(a,b,d){var b=b||o.identity,e=!1;if(null==a)return e;if(y&&a.some===y)return a.some(b,d);A(a,function(a,f,g){if(e|=b.call(d,a,f,g))return c});return!!e};o.include=o.contains=function(a,b){var c=
!1;if(null==a)return c;if(u&&a.indexOf===u)return-1!=a.indexOf(b);N(a,function(a){if(c=a===b)return!0});return c};o.invoke=function(a,c){var d=b.call(arguments,2);return o.map(a,function(a){return(c.call?c||a:a[c]).apply(a,d)})};o.pluck=function(a,b){return o.map(a,function(a){return a[b]})};o.max=function(a,b,c){if(!b&&o.isArray(a))return Math.max.apply(Math,a);var d={computed:-Infinity};A(a,function(a,e,f){e=b?b.call(c,a,e,f):a;e>=d.computed&&(d={value:a,computed:e})});return d.value};o.min=function(a,
b,c){if(!b&&o.isArray(a))return Math.min.apply(Math,a);var d={computed:Infinity};A(a,function(a,e,f){e=b?b.call(c,a,e,f):a;e<d.computed&&(d={value:a,computed:e})});return d.value};o.sortBy=function(a,b,c){return o.pluck(o.map(a,function(a,d,e){return{value:a,criteria:b.call(c,a,d,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};o.groupBy=function(a,b){var c={};A(a,function(a,d){var e=b(a,d);(c[e]||(c[e]=[])).push(a)});return c};o.sortedIndex=function(a,b,c){c||
(c=o.identity);for(var d=0,e=a.length;d<e;){var f=d+e>>1;c(a[f])<c(b)?d=f+1:e=f}return d};o.toArray=function(a){return!a?[]:a.toArray?a.toArray():o.isArray(a)||o.isArguments(a)?b.call(a):o.values(a)};o.size=function(a){return o.toArray(a).length};o.first=o.head=function(a,c,d){return null!=c&&!d?b.call(a,0,c):a[0]};o.rest=o.tail=function(a,c,d){return b.call(a,null==c||d?1:c)};o.last=function(a){return a[a.length-1]};o.compact=function(a){return o.filter(a,function(a){return!!a})};o.flatten=function(a){return o.reduce(a,
function(a,b){if(o.isArray(b))return a.concat(o.flatten(b));a[a.length]=b;return a},[])};o.without=function(a){return o.difference(a,b.call(arguments,1))};o.uniq=o.unique=function(a,b){return o.reduce(a,function(a,c,d){if(0==d||(!0===b?o.last(a)!=c:!o.include(a,c)))a[a.length]=c;return a},[])};o.union=function(){return o.uniq(o.flatten(arguments))};o.intersection=o.intersect=function(a){var c=b.call(arguments,1);return o.filter(o.uniq(a),function(a){return o.every(c,function(b){return 0<=o.indexOf(b,
a)})})};o.difference=function(a,b){return o.filter(a,function(a){return!o.include(b,a)})};o.zip=function(){for(var a=b.call(arguments),c=o.max(o.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=o.pluck(a,""+e);return d};o.indexOf=function(a,b,c){if(null==a)return-1;var d;if(c)return c=o.sortedIndex(a,b),a[c]===b?c:-1;if(u&&a.indexOf===u)return a.indexOf(b);c=0;for(d=a.length;c<d;c++)if(a[c]===b)return c;return-1};o.lastIndexOf=function(a,b){if(null==a)return-1;if(v&&a.lastIndexOf===v)return a.lastIndexOf(b);
for(var c=a.length;c--;)if(a[c]===b)return c;return-1};o.range=function(a,b,c){1>=arguments.length&&(b=a||0,a=0);for(var c=arguments[2]||1,d=Math.max(Math.ceil((b-a)/c),0),e=0,f=Array(d);e<d;)f[e++]=a,a+=c;return f};o.bind=function(a,c){if(a.bind===w&&w)return w.apply(a,b.call(arguments,1));var d=b.call(arguments,2);return function(){return a.apply(c,d.concat(b.call(arguments)))}};o.bindAll=function(a){var c=b.call(arguments,1);0==c.length&&(c=o.functions(a));A(c,function(b){a[b]=o.bind(a[b],a)});
return a};o.memoize=function(a,b){var c={};b||(b=o.identity);return function(){var d=b.apply(this,arguments);return j.call(c,d)?c[d]:c[d]=a.apply(this,arguments)}};o.delay=function(a,c){var d=b.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},c)};o.defer=function(a){return o.delay.apply(o,[a,1].concat(b.call(arguments,1)))};var B=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null;a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}};o.throttle=
function(a,b){return B(a,b,!1)};o.debounce=function(a,b){return B(a,b,!0)};o.once=function(a){var b=!1,c;return function(){if(b)return c;b=!0;return c=a.apply(this,arguments)}};o.wrap=function(a,c){return function(){var d=[a].concat(b.call(arguments));return c.apply(this,d)}};o.compose=function(){var a=b.call(arguments);return function(){for(var c=b.call(arguments),d=a.length-1;0<=d;d--)c=[a[d].apply(this,c)];return c[0]}};o.after=function(a,b){return function(){if(1>--a)return b.apply(this,arguments)}};
o.keys=s||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],c;for(c in a)j.call(a,c)&&(b[b.length]=c);return b};o.values=function(a){return o.map(a,o.identity)};o.functions=o.methods=function(a){var b=[],c;for(c in a)o.isFunction(a[c])&&b.push(c);return b.sort()};o.extend=function(a){A(b.call(arguments,1),function(b){for(var c in b)void 0!==b[c]&&(a[c]=b[c])});return a};o.defaults=function(a){A(b.call(arguments,1),function(b){for(var c in b)null==a[c]&&(a[c]=b[c])});return a};
o.clone=function(a){return o.isArray(a)?a.slice():o.extend({},a)};o.tap=function(a,b){b(a);return a};o.isEqual=function(a,b){if(a===b)return!0;var c=typeof a;if(c!=typeof b)return!1;if(a==b)return!0;if(!a&&b||a&&!b)return!1;a._chain&&(a=a._wrapped);b._chain&&(b=b._wrapped);if(a.isEqual)return a.isEqual(b);if(b.isEqual)return b.isEqual(a);if(o.isDate(a)&&o.isDate(b))return a.getTime()===b.getTime();if(o.isNaN(a)&&o.isNaN(b))return!1;if(o.isRegExp(a)&&o.isRegExp(b))return a.source===b.source&&a.global===
b.global&&a.ignoreCase===b.ignoreCase&&a.multiline===b.multiline;if("object"!==c||a.length&&a.length!==b.length)return!1;var c=o.keys(a),d=o.keys(b);if(c.length!=d.length)return!1;for(var e in a)if(!(e in b)||!o.isEqual(a[e],b[e]))return!1;return!0};o.isEmpty=function(a){if(o.isArray(a)||o.isString(a))return 0===a.length;for(var b in a)if(j.call(a,b))return!1;return!0};o.isElement=function(a){return!!(a&&1==a.nodeType)};o.isArray=e||function(a){return"[object Array]"===i.call(a)};o.isObject=function(a){return a===
Object(a)};o.isArguments=function(a){return!(!a||!j.call(a,"callee"))};o.isFunction=function(a){return!(!a||!a.constructor||!a.call||!a.apply)};o.isString=function(a){return!!(""===a||a&&a.charCodeAt&&a.substr)};o.isNumber=function(a){return!!(0===a||a&&a.toExponential&&a.toFixed)};o.isNaN=function(a){return a!==a};o.isBoolean=function(a){return!0===a||!1===a};o.isDate=function(a){return!(!a||!a.getTimezoneOffset||!a.setUTCFullYear)};o.isRegExp=function(a){return!(!a||!a.test||!a.exec||!(a.ignoreCase||
!1===a.ignoreCase))};o.isNull=function(a){return null===a};o.isUndefined=function(a){return void 0===a};o.noConflict=function(){a._=f;return this};o.identity=function(a){return a};o.times=function(a,b,c){for(var d=0;d<a;d++)b.call(c,d)};o.mixin=function(a){A(o.functions(a),function(b){r(b,o[b]=a[b])})};var J=0;o.uniqueId=function(a){var b=J++;return a?a+b:b};o.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};o.template=function(a,b){var c=o.templateSettings,c="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+
a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(c.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(c.evaluate||null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",c=new Function("obj",c);return b?c(b):c};var Q=function(a){this._wrapped=a};o.prototype=Q.prototype;var P=function(a,b){return b?o(a).chain():a},r=function(a,c){Q.prototype[a]=function(){var a=
b.call(arguments);d.call(a,this._wrapped);return P(c.apply(o,a),this._chain)}};o.mixin(o);A("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=g[a];Q.prototype[a]=function(){b.apply(this._wrapped,arguments);return P(this._wrapped,this._chain)}});A(["concat","join","slice"],function(a){var b=g[a];Q.prototype[a]=function(){return P(b.apply(this._wrapped,arguments),this._chain)}});Q.prototype.chain=function(){this._chain=!0;return this};Q.prototype.value=function(){return this._wrapped}})();
window.debug=function(){function a(a){b&&(d||!g||!g.log)&&b.apply(f,a)}for(var f=this,c=Array.prototype.slice,g=f.console,e={},b,d,i=9,j=["error","warn","info","debug","log"],l="assert,clear,count,dir,dirxml,exception,group,groupCollapsed,groupEnd,profile,profileEnd,table,time,timeEnd,trace".split(","),n=l.length,m=[];0<=--n;)(function(a){e[a]=function(){0!==i&&g&&g[a]&&g[a].apply(g,arguments)}})(l[n]);for(n=j.length;0<=--n;)(function(b,d){e[d]=function(){var e=c.call(arguments),l=[d].concat(e);m.push(l);
a(l);if(g&&(0<i?i>b:j.length+i<=b))g.firebug?g[d].apply(f,e):g[d]?g[d](e):g.log(e)}})(n,j[n]);e.setLevel=function(a){i="number"===typeof a?a:9};e.setCallback=function(){var e=c.call(arguments),f=m.length,g=f;b=e.shift()||null;d="boolean"===typeof e[0]?e.shift():!1;for(g-="number"===typeof e[0]?e.shift():f;g<f;)a(m[g++])};return e}();
(function(a,f){var c=null,g={},e=!1,b=[],d=function(){var a;$("ul.links > lo").removeClass("selected");SF.selectedPage&&""!==SF.selectedPage&&$("ul.links > ."+SF.selectedPage).addClass("selected");$("ul.links").fadeIn();for(a=0;a<b.length;a++)b[a](SF.currentUser);e=!0};a.SF={testGroup:null,currentUser:null,readonly:!1,signInLink:"/?sign_in=optional",signOutLink:"/",onAppReady:function(a){e?a(SF.currentUser):b.push(a)},stash:function(a,b){g[a]=b},unstash:function(a){data=g[a];delete g[a];return data},
userMessage:function(a,b,d){var e="#user-message";c&&(clearTimeout(c),c=null);b===f&&(b=3E3);d&&(e=e+","+d);$(e).html(a).slideDown(200);0<b&&(c=setTimeout(function(){$(e).slideUp(200)},b))},setCurrentUser:function(a){this.currentUser=a;this.currentUser.settings||(this.currentUser.settings={})}};SF.onAppReady(function(a){"undefined"!==typeof _kmq&&_kmq&&(_kmq.push(["identify",a.id]),_kmq.push(["set",{category:a.category||"organic"}]),a.anonymous&&_kmq.push(["set",{anonymous:a.anonymous}]))});$(document).ready(function(){SF.currentUser?
d():$(".navigation").find(".nav-container").load("/users/current/navigation",function(){d()})})})(this);
(function(a){SF.Bindings={newPartyButton:function(){$("#new-party-button").click(function(){SF.Modal.open("modal-new-party-form");return!1});$("#cancel-goto-party-button, #cancel-new-party-button").click(function(){SF.Modal.close("modal-new-party-form");return!1})}};$(document).ready(function(){$(".link[data-href]").live("click",function(){document.location=$(this).attr("data-href");return!1});$(".sign_in_link").live("click",function(){a.location=SF.signInLink;return!1});$(".sign_out_link").live("click",
function(){a.location=SF.signOutLink;return!1});var f=!1;SF.readonly&&($(".readonly-notice-link").live("click",function(){SF.Modal.open("modal-readonly",{allowAnonymous:!0});return!1}),$(".modal-readonly-close").live("click",function(){SF.Modal.close("modal-readonly");return!1}));$(".checkbox_with_label").find("span").live("click",function(){var a=$(this).closest(".checkbox_with_label"),f=a.find('input[type="checkbox"]');a.hasClass("disabled")||f.attr("checked",!f.is(":checked"));return!1});$("#profile_menu").live("mouseenter",
function(){!f&&!$("#login_drop_down").is(":visible")&&(f=!0,$("#profile_menu").addClass("selected"),$("#login_drop_down").slideDown(200,function(){f=!1}))});$("#profile_menu").live("mouseleave",function(){!f&&$("#login_drop_down").is(":visible")&&(f=!0,$("#profile_menu").removeClass("selected"),$("#login_drop_down").slideUp(200,function(){f=!1}))});$(".closeable_container").find(".close").live("click",function(){var a=$(this).closest(".closeable_container");a.hasClass("user_setting")&&SF.Models.User.updateCurrentUserSetting(a[0].id+
"_closed",!0);a.slideUp(function(){a.remove()})});$("#facebook-friends-container .big-connect-button").live("click",function(){var a,f;if(SF.Player)a=SF.Player.Channels.find($("#facebook-button").attr("data-channel-id"));else if(SF.ChannelEditor)a=SF.ChannelEditor.getCurrentChannel();else return!1;f=a.image_urls.small;f.match(/\/channel_defaults\/small\.png/)&&(f="http://www.shortform.com/images/mobius-black-medium.png");SF.Modal.close("modal-facebook-friends");SF.Utils.facebookFeedDialog("Check out my new channel on Shortform",
"http://www.shortform.com/"+a.user.user_name+"/"+a.name,f,a.display_name,a.description);return!1})})})(this);(function(){SF.Timer={init:function(a){a||(new Date).getTime()},record:function(){(new Date).getTime()},track:function(a){this.record(a)}}})();
(function(a){var f=function(){var a=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/,c=!1,b=function(a){return $(a).closest(".input_box").find(".label").html()||$(a).closest(".my_channel_input_box").find("h4").html()},d=function(a){$(a).closest("div").addClass("fieldWithErrors");c||(c=!0,a.focus())};return{isEmail:function(c){var e=c.value;return e&&$.trim(e)&&!1===a.test($.trim(e))?(d(c),b(c)+" should be an email address"):null},isEmailList:function(c){for(var e=c.value.split(","),f=
0;f<e.length;f++)if($.trim(e[f])&&!1===a.test($.trim(e[f])))return d(c),b(c)+" should be a list of email addresses";return null},isNotBlank:function(a){return!a.value||""==a.value?(d(a),b(a)+" should not be blank"):null},maxLength:function(a,c){return a.value&&a.value.length>c?(d(a),b(a)+" should not be longer than "+c+" character"+(1<c?"s":"")):null},minLength:function(a,c){return a.value&&a.value.length<c?(d(a),b(a)+" should at least "+c+" character"+(1<c?"s":"")):null},validate:function(a,b,d){if(d&&
SF.currentUser.anonymous)return['You must <a href="#" onclick="$(\'.login-nav-link\').click(); return false;">login</a> first.'];d=[];c=!1;for(var f in b)if(b.hasOwnProperty(f))for(var g=0;g<b[f].length;g++){var k=null;(k=b[f][g](a[f]))&&d.push(k)}return d}}}(),c=function(a,c){if(0==c.length)return!0;$("#"+a).html("<p>There were problems with the following fields:</p>");$("<ul>").appendTo("#"+a);for(var b=0;b<c.length;b++)$("<li>"+c[b]+"</li>").appendTo("#"+a);$("</ul>").appendTo("#"+a);$("#"+a).show();
return!1};SF.Form={submitEmailForm:function(a){$("#email-share-errors").hide();party=SF.livePlayer&&SF.livePlayer.party;var e=f.validate(a,{from_name:[f.isNotBlank],from_email:[f.isNotBlank,f.isEmail],to_email_list:[f.isNotBlank,f.isEmailList]});0==e.length?(e=$("#share-email-form").serialize(),party?$.ajax({url:"/email/invite",type:"POST",data:e,success:function(){SF.Tracker.trackEvent("SHARE",SF.Utils.SHARING.EMAIL,party.getPath);SF.userMessage("Message sent")},error:function(){$("#email-share-errors").html("<p>There was an unknown error with your email.  Please try again later.</p>")}}):
$.ajax({url:"/email/share",type:"POST",data:e,success:function(){var b=a["video[title_for_url]"];b||(b=SF.Player?SF.Player.Channels.current():SF.ChannelEditor.getCurrentChannel(),b=SF.Helpers.Channel.watchPath(b));SF.Tracker.trackEvent("SHARE",SF.Utils.SHARING.EMAIL,b);SF.userMessage("Message sent")},error:function(){$("#email-share-errors").html("<p>There was an unknown error with your email.  Please try again later.</p>")}})):c("email-share-errors",e);return!1},validateChannelForm:function(a){a=
f.validate(a,{channel_display_name_input:[f.isNotBlank,function(a){return f.maxLength(a,40)}],channel_description_input:[function(a){return f.maxLength(a,160)}]},!0);return c("channel-form-errors",a)},submitFriendsWallPost:function(a){var c=$("#congrats_form").serializeArray(),b=[];$.each(c,function(a,c){b.push(c.value)});SF.Tracker.trackFeature("share_the_love","shared:"+b.length);$.post("/users/wallpost/"+a,{"friends[]":b},function(){$("#friends-wallposted").html("Messages Sent to your Facebook Friends.")});
return!1},submitSearch:function(c,e){SF.Guide?($("#channel_guide_container").show(),SF.Tracker.trackFeature(e,"search"),$('input[name="search"]').each(function(a,d){d.value=c.search.value}),SF.Guide.addFilters({search:c.search.value}),SF.Modal.Scroll.channelGuide()):a.location="/channels?filters[search]="+$('input[name="search"]').val()}}})(this);
(function(a,f){var c="source,protocol,authority,userInfo,user,password,host,port,relative,path,directory,file,query,anchor".split(","),g=/(?:^|&)([^&=]*)=?([^&]*)/g,e={strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},
b=function(a){return a.replace(/"/g,"&quot;").replace(/>/g,"&gt;").replace(/</g,"&lt;")},d=function(a,b){return function(){a();b()}},i=null;SF.Utils={SHARING:{TWITTER:"twitter",FACEBOOK:"facebook",MYSPACE:"myspace",DIGG:"digg",REDDIT:"reddit",STUMBLEUPON:"stumble",EMAIL:"email"},KEY_CODE:{CTRL:17,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,SPACE:32,M_LOWER:77,ZERO:48},parseJsonDate:function(a){var b=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/.exec(a);if(!b)throw Error("::Error, #dp could not parse dateStr "+
a);return new Date(b[1],b[2]-1,b[3],b[4],b[5],b[6])},parseUri:function(a){for(var a=e.loose.exec(a),b={},d=14;d--;)b[c[d]]=a[d]||"";b.queryKey={};b[c[12]].replace(g,function(a,c,d){c&&(b.queryKey[c]=d)});return b},currentUri:function(){return SF.Utils.parseUri(document.location.href)},facebookFeedDialog:function(a,b,c,d,e){FB.ui({method:"feed",display:"popup",name:a,link:b,picture:c,caption:d,description:e,actions:'{"name": "Watch Now!", "link": "'+b+'"}'},function(){})},replaceHistoryState:function(b,
c,d){"function"===typeof a.history.replaceState&&a.history.replaceState(b,c,d);if("function"!==typeof a.history.replaceState||"undefined"===typeof a.history.state)i=b},getHistoryState:function(){return"function"===typeof a.history.replaceState&&"undefined"!==typeof a.history.state?a.history.state:i},setLocationHashParam:function(a,b){var c=document.location.hash.replace(/^#/,"").split("&"),d=[a+"="+b],e,f;for(f=0;f<c.length;f++)e=c[f].split("=")[0],""!==e&&e!=a&&d.push(c[f]);document.location.hash=
d.join("&")},getLocationHashValue:function(a){var b=document.location.hash.replace(/^#/,"").split("&"),c;for(c=0;c<b.length;c++)if(b[c].split("=")[0]==a)return b[c].split("=")[1];return null},objectToHttpParams:function(a,b){var c="",d=!0,e,f,g;for(f in a)if(d?d=!1:c+="&",a.hasOwnProperty(f))if(g=b?b+"["+f+"]":f,a[f]instanceof Array){g+="[]";for(e=0;e<a[f].length;e++)0<e&&(c+="&"),c+=g+"="+encodeURIComponent(a[f][e])}else c+=g+"="+encodeURIComponent(a[f]);return c},httpParamsToObject:function(a){var b=
{},a=a.split("&"),c,d;for(d=0;d<a.length;d++)c=a[d].split("="),b[c[0]]=c[1];return b},post:function(a,b){var c=document.createElement("div"),d='<form id="post_form_'+(new Date).getTime()+'" action="'+a+'" method="post">',e,b=b||{};for(e in b)b.hasOwnProperty(e)&&(d+='<input type="hidden" name="'+e+'" value="'+b[e]+'" />');c.innerHTML=d+"</form>";document.body.appendChild(c);c.firstChild.submit()},requiresConnection:function(a,b,c){switch(a){case "facebook":return!0;case "youtube":return b.match(/^users\/default\//);
case "twitter":return!c.screen_name;case "vimeo":return!c.user_id}return!1},requestConnection:function(a,b){a=a||{};if(a.requireFacebook&&-1===$.inArray("facebook",SF.currentUser.connections))return SF.Modal.facebookConnect(b),!1;if(a.requireGoogle&&-1===$.inArray("google",SF.currentUser.connections))return SF.Modal.googleConnect(b),!1;if(a.requireTwitter&&-1===$.inArray("twitter",SF.currentUser.connections))return SF.Modal.twitterConnect(b),!1;return a.requireVimeo&&-1===$.inArray("vimeo",SF.currentUser.connections)?
(SF.Modal.vimeoConnect(b),!1):!0},connectionForSite:function(a){switch(a){case "youtube":return"google";default:return a}},toggleMyChannelConnection:function(a){$("#my_channel_connection_"+a+" .import-opener").toggleClass("closed");$("#my_channel_connection_"+a+" .video-site").toggle()},permanentCookie:function(a,b){if(b===f)return $.cookie(a);$.cookie(a,b,{path:"/",expires:9999})},cookieForOnload:function(a,b){if(b===f)return b=$.cookie(a),$.cookie(a,null,{path:"/"}),b;$.cookie(a,b,{path:"/",expires:5/
1440})},stashObjectForOnload:function(a){var b=null,c=null;for(b in a)a.hasOwnProperty(b)&&(c=a[b],"object"==typeof c&&(c=SF.Utils.objectToHttpParams(c)),SF.Utils.cookieForOnload(b,c))},mergeObjects:function(a,b){var c={},e=null;for(e in a)a.hasOwnProperty(e)&&(c[e]=a[e]);for(e in b)b.hasOwnProperty(e)&&(c[e]=a.hasOwnProperty(e)&&"function"===typeof a[e]&&"function"===typeof b[e]?d(a[e],b[e]):b[e]);return c},padNumber:function(a,b){for(var c=""+a;c.length<b;)c="0"+c;return c},setEllipsisText:function(a,
b){$.browser.mozilla&&0<$(a+" .ellipsis_text").length&&($(a+" .ellipsis_text")[0].style.MozBinding="",$(a).html(""));$(a).html('<span class="ellipsis_text">'+b+"</span>");$.browser.mozilla&&0<$(a+" .ellipsis_text").length&&($(a+" .ellipsis_text")[0].style.MozBinding="url('/assets/xml/ellipsis.xml#ellipsis')")},getVideoTooltip:function(a){return b(a.title||"")},getChannelTooltip:function(a){return b(a.description||"")},getAjaxPayload:function(a){var b=a;"string"!==typeof a&&(b=a.responseText);return eval("("+
b+")")},setCharactersLeft:function(a,b,c){a-=b.value.length;$("#"+c).html(a);0>a?$("#"+c).addClass("negative"):$("#"+c).removeClass("negative")},shareOnFacebook:function(a,b,c){var d,e,f=c&&c.url?c.url:SF.Helpers.Channel.watchUrl(a,b),g=a.display_name+(a.user&&a.user.user_name?" by VJ "+a.user.user_name:"");e=a.description;if(b){if(c=b.title,d=b.thumb_url,!e||""===e)e=b.description}else c=a.display_name,d=a.image_urls.thumb,e=a.description;if(!e||""===e)e="Check out this video on ShortForm!";SF.Utils.facebookFeedDialog(c,
f,d,g,e)},shareOnTwitter:function(b,c){a.open("http://twitter.com/home?status="+encodeURIComponent(b+" "+c))},shareOnStumble:function(b,c){a.open("http://www.stumbleupon.com/submit?url="+encodeURIComponent(c)+"&title="+encodeURIComponent(b))},shareOnEmail:function(a,b){document.location="mailto:?subject="+encodeURIComponent(a)+"&body="+encodeURIComponent(b)},shareOnMixi:function(a,b){$.ajax({url:"/mixi_consumers/share.js",type:"post",data:"consumer_key="+a+"&auth_code="+b,success:function(){$("#modal_dialog").text(SF.Locale.SUCCESSFUL_SHARE);
SF.Utils.debug("Successfully shared");SF.Modal.open("modal_dialog",{allowAnonymous:!0},{mask:{opacity:0}})},error:function(a){var b=SF.Utils.getAjaxPayload(a);$("#modal_dialog").html(SF.Locale.FAILED_SHARE);SF.Utils.debug("Failed to share page on Mixi");SF.Utils.debug(b.message);SF.Utils.debug(a.responseText);SF.Modal.open("modal_dialog",{allowAnonymous:!0},{mask:{opacity:0}})}});SF.Mixi.opts.auth_code=null},actsAsLink:function(b,c){var d=$(this).attr("target");!c&&$(this).attr("href")&&(c=$(this).attr("href"));
d&&""!==d?a.open(c):1<b.which||b.metaKey?a.open(c):a.location=c;return!1},debug:function(a){"undefined"!==typeof console&&"function"===typeof console.log&&console.log(a)}};SF.Utils.Channels={add:function(a){SF.Player?SF.Player.Channels.add(a):SF.ChannelEditor&&SF.ChannelEditor.addChannel(a)},find:function(a){return SF.Player?SF.Player.Channels.find(a):SF.ChannelEditor?SF.ChannelEditor.findChannel(a):null},current:function(){return SF.Player?SF.Player.Channels.current():SF.ChannelEditor?SF.ChannelEditor.getCurrentChannel():
SF.Page?SF.Page.channel:null},subscribe:function(a,b,c){var d={channel_id:a},c=c||{};if(SF.currentUser.anonymous)return SF.Modal.signIn({action_on_load:(b?"":"un")+"subscribe_to_channel",channel_id_on_load:a}),!1;"function"===typeof c.before&&c.before();b?(SF.Player&&!SF.Player.Channels.find(a)&&(d.load_channel=!0),SF.Models.ChannelSubscription.create(d,c)):SF.Models.ChannelSubscription.destroy(d,c)},select:function(b){b=b||{};SF.Player&&b.channelId?(SF.Player.Controller.playVideo(b.videoId,b.channelId),
SF.Modal.Scroll.home()):b.url&&(b=b.url,SF.Guide&&(b=SF.Guide.appendFiltersToUrl(b)),a.location=b)}}})(this);(function(){String.prototype.capitalize=function(){return this.replace(/(^|\s)([a-z])/g,function(a,f,c){return f+c.toUpperCase()})}})();
(function(){SF.Locale={SUCCESSFUL_SHARE:"You have shared the channel.",FAILED_SHARE:"There was an error with sharing the channel, please try again later.",UNSUPPORTED_BROWSER:'You are visiting ShortForm on a browser we don\'t support. ShortForm performs best on <a href="http://www.mozilla.com/" target="_blank">Firefox 3.5 or greater</a>, <a href="http://www.google.com/chrome/" target="_blank">Google Chrome</a>, <a href="www.apple.com/safari/" target="_blank">Safari</a> and <a href="http://windows.microsoft.com/en-us/internet-explorer/products/ie/home" target="_blank">Internet Explorer 8 or greater</a>. You will enjoy ShortForm even more by updating your browser to one of these!',VIDEO_NOT_PLAYABLE:"This video is unavailable.",
VIDEO_NOT_PLAYABLE_SUB:'"<video_title>" is no longer available.',EMPTY_CHANNEL:"Looks like this channel is empty.",EMPTY_CHANNEL_SUB:'Enjoy our <a href="#" onclick="SF.Player.Alert.hide();">another channel</a> instead.',EMPTY_MY_CHANNEL:"Your channel is empty.",EMPTY_MY_CHANNEL_SUB:'You can add videos from other channels to your channel by clicking the "add" button, or visit <a href="/channels/my">My Channels page</a> for more options.',CHANNEL_NOT_FOUND:"We can't find the channel you requested.",
CHANNEL_NOT_FOUND_SUB:"Enjoy our favorite channel instead!",FRIENDS_CHANNEL_NOT_LOGGED_IN:"You must be signed in to watch your friends channel.",FRIENDS_CHANNEL_NOT_LOGGED_IN_SUB:'Your friends channel is a collection of videos your Facebook friends have posted on your Facebook wall. <a href="/login?next=/watch">Sign in</a> to watch.',EMPTY_FRIENDS_CHANNEL:"Your friends channel is empty.",EMPTY_FRIENDS_CHANNEL_SUB_NOT_CONNECTED:'<a href="#" onclick="SF.Modal.facebookConnect(); return false;">Connect your Facebook account</a> to automatically import videos your friends have posted on Facebook.',
EMPTY_FRIENDS_CHANNEL_SUB_WAITING:"We are searching Facebook for videos posted to your wall.  This may take several minutes.",LIKES_CHANNEL_NOT_LOGGED_IN:"You must be signed in to watch your likes channel.",LIKES_CHANNEL_NOT_LOGGED_IN_SUB:'Your likes channel is a collection of videos you have liked on ShortForm. <a href="/login?next=/watch">Sign in</a> to watch.',EMPTY_LIKES_CHANNEL:"Your likes channel is empty.",EMPTY_LIKES_CHANNEL_SUB:'When you see a video you like on ShortForm, click the "Like" button and the video will automatically be added to this channel.',
EMPTY_GROUP_CHANNEL:"This channel allows you and others to add videos.",EMPTY_GROUP_CHANNEL_SUB:'<a href="#" onclick="SF.Modal.Scroll.currentChannel(); return false;">Add your own video.</a>',EMPTY_GROUP_CHANNEL_SUB_NOT_LOGGED:'<a href="/login?next=/watch">Sign in</a> and add a video of your own.',PRIVATE_CHANNEL:"This channel is private",PRIVATE_CHANNEL_NOT_LOGGED_IN_SUB:'You cannot view this channel because the owner has marked it as private. If this is your channel, please <a href="/login?next=/watch">login</a> to watch it.',
PRIVATE_CHANNEL_LOGGED_IN_SUB:"You cannot view this channel because the owner has marked it as private."}})(this);
(function(){"undefined"===typeof SF&&(SF={});SF.Tracker={trackPageView:function(a){_gaq.push(["_trackPageview",a])},trackEvent:function(a,f,c,g){g?_gaq.push(["_trackEvent",a,f,c,g]):c?_gaq.push(["_trackEvent",a,f,c]):_gaq.push(["_trackEvent",a,f])},trackEmbed:function(a,f){this.trackEvent("EMBED",a,f)},trackFeature:function(a,f){this.trackEvent("FEATURE",a,f)},setCustomVar:function(a,f,c,g){_gaq.push(["_setCustomVar",a,f,c,g||3])},setAuthenticated:function(){this.setCustomVar(1,"authenticated","true",
1)},setCampaign:function(a){this.setCustomVar(3,"campaign",a,2)}};$(document).ready(function(){SF.currentUser&&!SF.currentUser.anonymous&&SF.Tracker.setAuthenticated()})})(this);
(function(a){var f=function(a,c,e,f,l,n){$("#share-"+a).unbind("click");$("#share-"+a).click(function(){g(a,c,e,f,l,n);return!1})},c=function(a){var c=a.party||null,e=a.channel,g=a.video;$("#share-facebook, #share-twitter, #share-stumble, #share-digg").unbind("click");var a=c?SF.Helpers.Channel.watchPartyUrl(c):SF.Helpers.Channel.watchUrl(e,g),l=!g?e.display_name:g.title,n=c?c.description:!g?e.description:g.description;c&&(c.data?l=c.data.party.name:(paths=document.location.href.split("/"),l=paths[paths.length-
1]));$("#share-url")[0].value="loading...";for(var e=[SF.Utils.SHARING.FACEBOOK,SF.Utils.SHARING.TWITTER,SF.Utils.SHARING.STUMBLEUPON,SF.Utils.SHARING.DIGG],m=0;m<e.length;m++)f(e[m],c,g,a,l,n);$.ajax({type:"POST",url:"/shorten_web_share_url",data:"long_url="+a+"&media=url",success:function(a){for(var b in a.short_urls)a.short_urls.hasOwnProperty(b)&&("url"==b?$("#share-url")[0].value=a.short_urls[b]:f(b,c,g,a.short_urls[b],l,n))}})},g=function(b,c,e,f,g,n){var m=SF.Utils.Channels.current();c&&(f=
"http://"+a.location.hostname+"/party"+c.getPath());var k="",k=SF.Helpers.Channel.watchPath(m);e&&(k=e.title_for_url,e.has_shared||(e.has_shared=!0,e.share_count++));SF.Tracker.trackEvent("SHARE",b,k);e&&!c&&SF.Models.VideoAction.update({channel_id:m.id,video_id:e&&e.id});switch(b){case SF.Utils.SHARING.FACEBOOK:c?FB.ui({method:"feed",display:"popup",name:g,link:f},function(){}):SF.Utils.shareOnFacebook(m,e,{});break;case SF.Utils.SHARING.MYSPACE:a.open("http://www.myspace.com/index.cfm?fuseaction=postto&t="+
encodeURIComponent(g)+"&c="+encodeURIComponent(n)+"&u="+encodeURIComponent(f)+"&l=");break;case SF.Utils.SHARING.TWITTER:k=c?c.data?c.data.owner_user_name==SF.currentUser.user_name?'Join my ShortForm #LiveVJParty "'+c.data.party.name+'". Watch videos and chat with friends live '+f:"Join me at VJ "+c.data.owner_user_name+"'s ShortForm #LiveVJParty \""+c.data.party.name+'". Watch videos and chat with friends live '+f:'Join me at ShortForm #LiveVJParty "'+g+'". Watch videos and chat with friends live '+
f:e?"Check out this video I loved in "+m.display_name+" on @shortform_tv! "+f:m.user.id==SF.currentUser.id?"Check out my channel "+m.display_name+" on @shortform_tv! "+f:"Check out "+m.display_name+" on @shortform_tv! "+f;a.open("http://twitter.com/home?status="+encodeURIComponent(k));break;case SF.Utils.SHARING.DIGG:c&&(c.data?c.data.owner_user_name==SF.currentUser.user_name?(g="I'm VJ-ing live now. Join in the fun at my ShortForm video party "+c.data.party.name+".",n="Chat live with everyone as you watch my selections."):
(g='Having a blast at the "'+c.data.party.name+'" ShortForm live video party by VJ '+c.data.owner_user_name+".",n="Drop in as we dish it out via live chat."):(g="Having a blast at the ShortForm live video party.",n="Drop in as we dish it out via live chat."));a.open("http://digg.com/submit?url="+f+"&title="+encodeURIComponent(g)+"&bodytext="+encodeURIComponent(n)+"&media=video");break;case SF.Utils.SHARING.REDDIT:a.open("http://reddit.com/submit?url="+encodeURIComponent(f)+"&title="+encodeURIComponent(g));
break;case SF.Utils.SHARING.STUMBLEUPON:a.open("http://www.stumbleupon.com/submit?url="+encodeURIComponent(f)+"&title="+encodeURIComponent(g));break;case SF.Utils.SHARING.EMAIL:k=c?c.data?c.data.owner_user_name==SF.currentUser.user_name?'Join my ShortForm #LiveVJParty "'+c.data.party.name+'". Watch videos and chat with friends live : '+f:"Join me at VJ "+c.data.owner_user_name+"'s ShortForm #LiveVJParty \""+c.data.party.name+'". Watch videos and chat with friends live : '+f:'Join me at ShortForm #LiveVJParty "'+
g+'". Watch videos and chat with friends live : '+f:e?"Check out this video I loved in "+(m.displayName||m.display_name)+" on ShortForm.com! "+f:m.user.id==SF.currentUser.id?"Check out my channel "+(m.displayName||m.display_name)+" on ShortForm.com "+f:"Check out "+(m.displayName||m.display_name)+" on ShortForm.com "+f,a.open("mailto:?subject="+encodeURIComponent(g)+"&body="+k)}return!1};SF.share=g;var e=function(a,c,e){a=Math.floor($("#"+a).offset().top);$("html, body").animate({scrollTop:a},c?0:
1E3,"swing",function(){e&&"function"===typeof e&&e()})};SF.Modal={Scroll:{toId:function(a){e(a)},home:function(){SF.Player&&e("home_page")},channelGuide:function(){SF.Player&&e("guide_page")}},open:function(b,c,e){var c=c||{},e=e||{},f={modal_on_load:b};if(!c.allowAnonymous&&SF.currentUser.anonymous)SF.Modal.signIn(f);else if(SF.Utils.requestConnection(c,f))if(c.redirectTo)SF.Utils.stashObjectForOnload(f),a.location=c.redirectTo;else{f={closeOnClick:!1,closeOnEsc:!0,fixed:!1,oneInstance:!1,mask:{color:"#666666"}};
if(!SF.livePlayer||!SF.livePlayer.have_remote)f.onLoad=function(){SF.Player&&SF.Player.Alert&&SF.Player.Alert.show({duration:0})},f.onClose=function(){SF.Player&&SF.Player.Alert&&SF.Player.Alert.hide()};c.onLoad&&(f.onLoad=c.onLoad);c.onClose&&(f.onClose=c.onClose);$("#"+b).addClass("modal");$("#"+b).overlay(SF.Utils.mergeObjects(f,e,{mergeFunctions:!0}));$("#"+b).data("overlay").load()}},close:function(a){$("#"+a).overlay().close()},signIn:function(b){if(SF.Player&&SF.Player.embedded)return!1;b&&
SF.Utils.stashObjectForOnload(b);a.location="/login?next="+encodeURIComponent(b.next||a.location.href)},facebookConnect:function(){return a.location="/oauth2_consumer_tokens/authorize?next="+a.location},googleConnect:function(){return a.location="/consumer_tokens/google?next="+a.location},twitterConnect:function(){return a.location="/consumer_tokens/twitter?next="+a.location},vimeoConnect:function(){a.location="/consumer_tokens/vimeo?next="+a.location},connect:function(a,c){switch(a){case "facebook":return this.facebookConnect(c);
case "google":return this.googleConnect(c);case "twitter":return this.twitterConnect(c);case "vimeo":return this.vimeoConnect(c)}},blankContentUrl:null,blank:function(a,c,e){var f="modal-blank";c&&c.modalId&&(f=c.modalId);e=e||{};SF.Modal.blankContentUrl=a;SF.Utils.stashObjectForOnload({url_on_load:a});SF.Modal.open(f,c,SF.Utils.mergeObjects({onBeforeLoad:function(){$("#"+f).find(".content-wrap").load(SF.Modal.blankContentUrl,function(){$("#"+f).find(".progress-indicator").hide()})},onClose:function(){$("#"+
f).find(".content-wrap").html("");$("#"+f).find(".progress-indicator").show()}},e,{mergeFunctions:!0}))},simpleTitle:null,simpleContent:null,simple:function(a,c){SF.Modal.simpleTitle=a;SF.Modal.simpleContent=c;SF.Modal.open("modal-simple",{},{onBeforeLoad:function(){$("#modal-simple .simple-title").html(SF.Modal.simpleTitle);$("#modal-simple .simple-content").html(SF.Modal.simpleContent)}})},facebookFriends:function(a){SF.livePlayer||(SF.Tracker.trackFeature("share_the_love","show"),a.settings=a.settings||
{},a.settings.share_the_love_shown=!0,SF.Models.Channel.update({id:a.id,settings:a.settings}),SF.Modal.blank("/users/facebook_friends?channel_id="+a.id,{modalId:"modal-facebook-friends"},{}))},contestLeaderboard:function(a){SF.Modal.blank("/contests/leaderboard/"+a+"?timestamp="+(new Date).getTime(),{allowAnonymous:!0},{onBeforeLoad:function(){SF.Tracker&&SF.Tracker.trackFeature("contest","leader_board")}})},contestLike:function(){SF.Modal.open("modal-contest-like",{allowAnonymous:!0},{onBeforeLoad:function(){SF.Tracker&&
SF.Tracker.trackFeature("contest","vote")}})},shareParty:null,shareChannel:null,shareVideo:null,share:function(b){SF.Modal.shareParty=b.party;SF.Modal.shareChannel=b.channel;SF.Modal.shareVideo=b.video;b.channel&&SF.Utils.cookieForOnload("channel_id_on_load",b.channel.id);SF.Modal.shareParty&&$("#share_modal h1").html("Invite others to a live video party!");b.video&&SF.Utils.cookieForOnload("video_id_on_load",b.video.id);$("#modal-share .share-type").html(SF.Modal.shareParty?"party":b.video?"video":
"channel");SF.Modal.open("modal-share",{},{onBeforeLoad:function(){c({video:SF.Modal.shareVideo,channel:SF.Modal.shareChannel,party:SF.Modal.shareParty});$("#share-email-form input[type=hidden]").remove();SF.Modal.shareParty?($("#embed-channel-section").hide(),$('<input type="hidden" name="party[id]" value="'+SF.Modal.shareParty.id+'"/>').appendTo("#share-email-form"),$('<input type="hidden" name="party[url]" value="'+SF.Modal.shareParty.getPath()+'"/>').appendTo("#share-email-form")):($('<input type="hidden" name="channel[id]" value="'+
SF.Modal.shareChannel.id+'"/>').appendTo("#share-email-form"),$('<input type="hidden" name="authenticityToken" value="<%= form_authenticity_token %>"/>').appendTo("#share-email-form"),SF.Modal.shareVideo&&$('<input type="hidden" name="video[id]" value="'+SF.Modal.shareVideo.id+'"/>').appendTo("#share-email-form"))},onLoad:function(){$("#share-embed-button").click(function(){SF.Tracker.trackEmbed("current_channel","embed_button");a.location="/widget?current_channel=true&user_name="+SF.Modal.shareChannel.user.user_name+
"&channel_name="+SF.Modal.shareChannel.name})}})}}})(this);
(function(){var a={};SF.UI={bind:function(f,c,g){if(f=$(f)[0])a[f.id]=a[f.id]||{},a[f.id][c]=a[f.id][c]||[],a[f.id][c].push(g)}};$(function(){$(".fancy_select").addClass("closed")});$(".fancy_select").find("li").live("click",function(f){var c=$(this).closest(".fancy_select");0<c.length&&$(".fancy_select").not("#"+c[0].id).addClass("closed");if(c.hasClass("closed"))c.toggleClass("closed");else{c.find("input").val($(this).attr("data-select-id"));c.find("li.selected").removeClass("selected");$(this).addClass("selected");
var g,e;if((g=$(c)[0])&&a[g.id]&&a[g.id].select)for(e=0;e<a[g.id].select.length;e++)a[g.id].select[e]();c.addClass("closed")}f.stopPropagation()});$(".fancy_select").find(".arrow").live("click",function(a){$(".fancy_select").not(".closed").addClass("closed");$(this).closest(".fancy_select").removeClass("closed");a.stopPropagation()});$("html").live("click",function(){$(".fancy_select").not(".closed").addClass("closed")})})(this);
(function(){var a=function(a,b){return g.hasOwnProperty(b)&&"function"===typeof g[b]?g[b](a):!0},f=function(a){var b=!1;$.each($("#tab-container > a"),function(){this.id===a&&(b=!0)});return b},c=function(c){f(c)||(c=$("#tab-container > a")[0].id);return a(SF.Tabs.selected,"ondeselect")?(SF.Tabs.selected=c,0===$("#tab-container.no_anchor").length&&SF.Utils.setLocationHashParam("tab",c),$(".tab").hide(),$(".tab."+c).show(),$("#tab-container > a").removeClass("selected"),$("#"+c).addClass("selected"),
a(SF.Tabs.selected,"onselect")):!1},g={};SF.Tabs={selected:null,setCallbacks:function(a){g=a}};$(document).ready(function(){var a=document.location.hash&&SF.Utils.getLocationHashValue("tab");$("#tab-container > a").click(function(){c(this.id);return!1});SF.Tabs.selected?c(SF.Tabs.selected):a?c(a):0<$("#tab-container > a").length&&c($("#tab-container > a")[0].id)})})();
(function(){var a=function(){var a="/actions/aggregate";f&&(a+="?happened_after="+f);$.ajax({url:a,type:"get",success:function(a){$(c).find(".progress").hide();$(c).prepend(a)}});f=Math.floor((new Date).getTime()/1E3)},f=null,c=null;"undefined"==typeof SF.Actions&&(SF.Actions={});SF.Actions.NewsFeed={load:function(f,e){c=f;setInterval(a,1E3*(e||60));a()},show:function(a){var e=$(c).find(".aggregate_action:not(.staged)[data-aggregate-action-id="+a+"]"),a=$(c).find(".aggregate_action.staged[data-aggregate-action-id="+
a+"]");0<e.length?(e.html(a.html()),a.remove()):a.removeClass("staged")}};$(function(){$(".subjects_modal_link").live("click",function(){var a=$(this).attr("data-aggregate-action-id");SF.Modal.open("subjects_modal_"+a,{allowAnonymous:!0});return!1});$(".subjects_modal").find(".buttons").find(".close_button").live("click",function(){var a=$(this).closest(".subjects_modal").attr("data-aggregate-action-id");SF.Modal.close("subjects_modal_"+a);return!1});0<$("#actions_news_feed").length&&SF.Actions.NewsFeed.load("#actions_news_feed")})})(this);
(function(){SF.Mixi={opts:{}};$(document).ready(function(){SF.Mixi.opts.auth_code&&setTimeout(function(){SF.Mixi.opts.auth_code=null},17E4)})})(this);
