/*!
 * jQuery JavaScript Library v1.10.2
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2013-07-03T13:48Z
 */
function _ajax_request(e,t,i,n,s){return jQuery.isFunction(t)&&(i=t,t={}),jQuery.ajax({type:s,url:e,data:t,success:i,dataType:n})}!function(e,t){function i(e){var t=e.length,i=ct.type(e);return ct.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===i||"function"!==i&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function n(e){var t=Tt[e]={};return ct.each(e.match(ht)||[],function(e,i){t[i]=!0}),t}function s(e,i,n,s){if(ct.acceptData(e)){var o,a,r=ct.expando,l=e.nodeType,u=l?ct.cache:e,c=l?e[r]:e[r]&&r;if(c&&u[c]&&(s||u[c].data)||n!==t||"string"!=typeof i)return c||(c=l?e[r]=tt.pop()||ct.guid++:r),u[c]||(u[c]=l?{}:{toJSON:ct.noop}),("object"==typeof i||"function"==typeof i)&&(s?u[c]=ct.extend(u[c],i):u[c].data=ct.extend(u[c].data,i)),a=u[c],s||(a.data||(a.data={}),a=a.data),n!==t&&(a[ct.camelCase(i)]=n),"string"==typeof i?(o=a[i],null==o&&(o=a[ct.camelCase(i)])):o=a,o}}function o(e,t,i){if(ct.acceptData(e)){var n,s,o=e.nodeType,a=o?ct.cache:e,l=o?e[ct.expando]:ct.expando;if(a[l]){if(t&&(n=i?a[l]:a[l].data)){ct.isArray(t)?t=t.concat(ct.map(t,ct.camelCase)):t in n?t=[t]:(t=ct.camelCase(t),t=t in n?[t]:t.split(" ")),s=t.length;for(;s--;)delete n[t[s]];if(i?!r(n):!ct.isEmptyObject(n))return}(i||(delete a[l].data,r(a[l])))&&(o?ct.cleanData([e],!0):ct.support.deleteExpando||a!=a.window?delete a[l]:a[l]=null)}}}function a(e,i,n){if(n===t&&1===e.nodeType){var s="data-"+i.replace(Et,"-$1").toLowerCase();if(n=e.getAttribute(s),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Dt.test(n)?ct.parseJSON(n):n}catch(o){}ct.data(e,i,n)}else n=t}return n}function r(e){var t;for(t in e)if(("data"!==t||!ct.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function l(){return!0}function u(){return!1}function c(){try{return J.activeElement}catch(e){}}function d(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function h(e,t,i){if(ct.isFunction(t))return ct.grep(e,function(e,n){return!!t.call(e,n,e)!==i});if(t.nodeType)return ct.grep(e,function(e){return e===t!==i});if("string"==typeof t){if(Ft.test(t))return ct.filter(t,e,i);t=ct.filter(t,e)}return ct.grep(e,function(e){return ct.inArray(e,t)>=0!==i})}function p(e){var t=Yt.split("|"),i=e.createDocumentFragment();if(i.createElement)for(;t.length;)i.createElement(t.pop());return i}function f(e,t){return ct.nodeName(e,"table")&&ct.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function m(e){return e.type=(null!==ct.find.attr(e,"type"))+"/"+e.type,e}function g(e){var t=si.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function v(e,t){for(var i,n=0;null!=(i=e[n]);n++)ct._data(i,"globalEval",!t||ct._data(t[n],"globalEval"))}function y(e,t){if(1===t.nodeType&&ct.hasData(e)){var i,n,s,o=ct._data(e),a=ct._data(t,o),r=o.events;if(r){delete a.handle,a.events={};for(i in r)for(n=0,s=r[i].length;s>n;n++)ct.event.add(t,i,r[i][n])}a.data&&(a.data=ct.extend({},a.data))}}function b(e,t){var i,n,s;if(1===t.nodeType){if(i=t.nodeName.toLowerCase(),!ct.support.noCloneEvent&&t[ct.expando]){s=ct._data(t);for(n in s.events)ct.removeEvent(t,n,s.handle);t.removeAttribute(ct.expando)}"script"===i&&t.text!==e.text?(m(t).text=e.text,g(t)):"object"===i?(t.parentNode&&(t.outerHTML=e.outerHTML),ct.support.html5Clone&&e.innerHTML&&!ct.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===i&&ti.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===i?t.defaultSelected=t.selected=e.defaultSelected:("input"===i||"textarea"===i)&&(t.defaultValue=e.defaultValue)}}function w(e,i){var n,s,o=0,a=typeof e.getElementsByTagName!==X?e.getElementsByTagName(i||"*"):typeof e.querySelectorAll!==X?e.querySelectorAll(i||"*"):t;if(!a)for(a=[],n=e.childNodes||e;null!=(s=n[o]);o++)!i||ct.nodeName(s,i)?a.push(s):ct.merge(a,w(s,i));return i===t||i&&ct.nodeName(e,i)?ct.merge([e],a):a}function _(e){ti.test(e.type)&&(e.defaultChecked=e.checked)}function x(e,t){if(t in e)return t;for(var i=t.charAt(0).toUpperCase()+t.slice(1),n=t,s=Ci.length;s--;)if(t=Ci[s]+i,t in e)return t;return n}function k(e,t){return e=t||e,"none"===ct.css(e,"display")||!ct.contains(e.ownerDocument,e)}function C(e,t){for(var i,n,s,o=[],a=0,r=e.length;r>a;a++)n=e[a],n.style&&(o[a]=ct._data(n,"olddisplay"),i=n.style.display,t?(o[a]||"none"!==i||(n.style.display=""),""===n.style.display&&k(n)&&(o[a]=ct._data(n,"olddisplay",S(n.nodeName)))):o[a]||(s=k(n),(i&&"none"!==i||!s)&&ct._data(n,"olddisplay",s?i:ct.css(n,"display"))));for(a=0;r>a;a++)n=e[a],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?o[a]||"":"none"));return e}function T(e,t,i){var n=vi.exec(t);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):t}function D(e,t,i,n,s){for(var o=i===(n?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===i&&(a+=ct.css(e,i+ki[o],!0,s)),n?("content"===i&&(a-=ct.css(e,"padding"+ki[o],!0,s)),"margin"!==i&&(a-=ct.css(e,"border"+ki[o]+"Width",!0,s))):(a+=ct.css(e,"padding"+ki[o],!0,s),"padding"!==i&&(a+=ct.css(e,"border"+ki[o]+"Width",!0,s)));return a}function E(e,t,i){var n=!0,s="width"===t?e.offsetWidth:e.offsetHeight,o=ci(e),a=ct.support.boxSizing&&"border-box"===ct.css(e,"boxSizing",!1,o);if(0>=s||null==s){if(s=di(e,t,o),(0>s||null==s)&&(s=e.style[t]),yi.test(s))return s;n=a&&(ct.support.boxSizingReliable||s===e.style[t]),s=parseFloat(s)||0}return s+D(e,t,i||(a?"border":"content"),n,o)+"px"}function S(e){var t=J,i=wi[e];return i||(i=N(e,t),"none"!==i&&i||(ui=(ui||ct("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(ui[0].contentWindow||ui[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),i=N(e,t),ui.detach()),wi[e]=i),i}function N(e,t){var i=ct(t.createElement(e)).appendTo(t.body),n=ct.css(i[0],"display");return i.remove(),n}function M(e,t,i,n){var s;if(ct.isArray(t))ct.each(t,function(t,s){i||Di.test(e)?n(e,s):M(e+"["+("object"==typeof s?t:"")+"]",s,i,n)});else if(i||"object"!==ct.type(t))n(e,t);else for(s in t)M(e+"["+s+"]",t[s],i,n)}function z(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,s=0,o=t.toLowerCase().match(ht)||[];if(ct.isFunction(i))for(;n=o[s++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function $(e,t,i,n){function s(r){var l;return o[r]=!0,ct.each(e[r]||[],function(e,r){var u=r(t,i,n);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),s(u),!1)}),l}var o={},a=e===Bi;return s(t.dataTypes[0])||!o["*"]&&s("*")}function A(e,i){var n,s,o=ct.ajaxSettings.flatOptions||{};for(s in i)i[s]!==t&&((o[s]?e:n||(n={}))[s]=i[s]);return n&&ct.extend(!0,e,n),e}function H(e,i,n){for(var s,o,a,r,l=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),o===t&&(o=e.mimeType||i.getResponseHeader("Content-Type"));if(o)for(r in l)if(l[r]&&l[r].test(o)){u.unshift(r);break}if(u[0]in n)a=u[0];else{for(r in n){if(!u[0]||e.converters[r+" "+u[0]]){a=r;break}s||(s=r)}a=a||s}return a?(a!==u[0]&&u.unshift(a),n[a]):void 0}function O(e,t,i,n){var s,o,a,r,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(i[e.responseFields[o]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(s in u)if(r=s.split(" "),r[1]===o&&(a=u[l+" "+r[0]]||u["* "+r[0]])){a===!0?a=u[s]:u[s]!==!0&&(o=r[0],c.unshift(r[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function P(){try{return new e.XMLHttpRequest}catch(t){}}function I(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function j(){return setTimeout(function(){Qi=t}),Qi=ct.now()}function R(e,t,i){for(var n,s=(on[t]||[]).concat(on["*"]),o=0,a=s.length;a>o;o++)if(n=s[o].call(i,t,e))return n}function L(e,t,i){var n,s,o=0,a=sn.length,r=ct.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var t=Qi||j(),i=Math.max(0,u.startTime+u.duration-t),n=i/u.duration||0,o=1-n,a=0,l=u.tweens.length;l>a;a++)u.tweens[a].run(o);return r.notifyWith(e,[u,o,i]),1>o&&l?i:(r.resolveWith(e,[u]),!1)},u=r.promise({elem:e,props:ct.extend({},t),opts:ct.extend(!0,{specialEasing:{}},i),originalProperties:t,originalOptions:i,startTime:Qi||j(),duration:i.duration,tweens:[],createTween:function(t,i){var n=ct.Tween(e,u.opts,t,i,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(n),n},stop:function(t){var i=0,n=t?u.tweens.length:0;if(s)return this;for(s=!0;n>i;i++)u.tweens[i].run(1);return t?r.resolveWith(e,[u,t]):r.rejectWith(e,[u,t]),this}}),c=u.props;for(W(c,u.opts.specialEasing);a>o;o++)if(n=sn[o].call(u,e,c,u.opts))return n;return ct.map(c,R,u),ct.isFunction(u.opts.start)&&u.opts.start.call(e,u),ct.fx.timer(ct.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function W(e,t){var i,n,s,o,a;for(i in e)if(n=ct.camelCase(i),s=t[n],o=e[i],ct.isArray(o)&&(s=o[1],o=e[i]=o[0]),i!==n&&(e[n]=o,delete e[i]),a=ct.cssHooks[n],a&&"expand"in a){o=a.expand(o),delete e[n];for(i in o)i in e||(e[i]=o[i],t[i]=s)}else t[n]=s}function F(e,t,i){var n,s,o,a,r,l,u=this,c={},d=e.style,h=e.nodeType&&k(e),p=ct._data(e,"fxshow");i.queue||(r=ct._queueHooks(e,"fx"),null==r.unqueued&&(r.unqueued=0,l=r.empty.fire,r.empty.fire=function(){r.unqueued||l()}),r.unqueued++,u.always(function(){u.always(function(){r.unqueued--,ct.queue(e,"fx").length||r.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(i.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===ct.css(e,"display")&&"none"===ct.css(e,"float")&&(ct.support.inlineBlockNeedsLayout&&"inline"!==S(e.nodeName)?d.zoom=1:d.display="inline-block")),i.overflow&&(d.overflow="hidden",ct.support.shrinkWrapBlocks||u.always(function(){d.overflow=i.overflow[0],d.overflowX=i.overflow[1],d.overflowY=i.overflow[2]}));for(n in t)if(s=t[n],en.exec(s)){if(delete t[n],o=o||"toggle"===s,s===(h?"hide":"show"))continue;c[n]=p&&p[n]||ct.style(e,n)}if(!ct.isEmptyObject(c)){p?"hidden"in p&&(h=p.hidden):p=ct._data(e,"fxshow",{}),o&&(p.hidden=!h),h?ct(e).show():u.done(function(){ct(e).hide()}),u.done(function(){var t;ct._removeData(e,"fxshow");for(t in c)ct.style(e,t,c[t])});for(n in c)a=R(h?p[n]:0,n,u),n in p||(p[n]=a.start,h&&(a.end=a.start,a.start="width"===n||"height"===n?1:0))}}function B(e,t,i,n,s){return new B.prototype.init(e,t,i,n,s)}function q(e,t){var i,n={height:e},s=0;for(t=t?1:0;4>s;s+=2-t)i=ki[s],n["margin"+i]=n["padding"+i]=e;return t&&(n.opacity=n.width=e),n}function U(e){return ct.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var Y,G,X=typeof t,V=e.location,J=e.document,K=J.documentElement,Q=e.jQuery,Z=e.$,et={},tt=[],it="1.10.2",nt=tt.concat,st=tt.push,ot=tt.slice,at=tt.indexOf,rt=et.toString,lt=et.hasOwnProperty,ut=it.trim,ct=function(e,t){return new ct.fn.init(e,t,G)},dt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ht=/\S+/g,pt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ft=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,mt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,gt=/^[\],:{}\s]*$/,vt=/(?:^|:|,)(?:\s*\[)+/g,yt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,bt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,wt=/^-ms-/,_t=/-([\da-z])/gi,xt=function(e,t){return t.toUpperCase()},kt=function(e){(J.addEventListener||"load"===e.type||"complete"===J.readyState)&&(Ct(),ct.ready())},Ct=function(){J.addEventListener?(J.removeEventListener("DOMContentLoaded",kt,!1),e.removeEventListener("load",kt,!1)):(J.detachEvent("onreadystatechange",kt),e.detachEvent("onload",kt))};ct.fn=ct.prototype={jquery:it,constructor:ct,init:function(e,i,n){var s,o;if(!e)return this;if("string"==typeof e){if(s="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ft.exec(e),!s||!s[1]&&i)return!i||i.jquery?(i||n).find(e):this.constructor(i).find(e);if(s[1]){if(i=i instanceof ct?i[0]:i,ct.merge(this,ct.parseHTML(s[1],i&&i.nodeType?i.ownerDocument||i:J,!0)),mt.test(s[1])&&ct.isPlainObject(i))for(s in i)ct.isFunction(this[s])?this[s](i[s]):this.attr(s,i[s]);return this}if(o=J.getElementById(s[2]),o&&o.parentNode){if(o.id!==s[2])return n.find(e);this.length=1,this[0]=o}return this.context=J,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ct.isFunction(e)?n.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),ct.makeArray(e,this))},selector:"",length:0,toArray:function(){return ot.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=ct.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ct.each(this,e,t)},ready:function(e){return ct.ready.promise().done(e),this},slice:function(){return this.pushStack(ot.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,i=+e+(0>e?t:0);return this.pushStack(i>=0&&t>i?[this[i]]:[])},map:function(e){return this.pushStack(ct.map(this,function(t,i){return e.call(t,i,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:st,sort:[].sort,splice:[].splice},ct.fn.init.prototype=ct.fn,ct.extend=ct.fn.extend=function(){var e,i,n,s,o,a,r=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[1]||{},l=2),"object"==typeof r||ct.isFunction(r)||(r={}),u===l&&(r=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(s in o)e=r[s],n=o[s],r!==n&&(c&&n&&(ct.isPlainObject(n)||(i=ct.isArray(n)))?(i?(i=!1,a=e&&ct.isArray(e)?e:[]):a=e&&ct.isPlainObject(e)?e:{},r[s]=ct.extend(c,a,n)):n!==t&&(r[s]=n));return r},ct.extend({expando:"jQuery"+(it+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===ct&&(e.$=Z),t&&e.jQuery===ct&&(e.jQuery=Q),ct},isReady:!1,readyWait:1,holdReady:function(e){e?ct.readyWait++:ct.ready(!0)},ready:function(e){if(e===!0?!--ct.readyWait:!ct.isReady){if(!J.body)return setTimeout(ct.ready);ct.isReady=!0,e!==!0&&--ct.readyWait>0||(Y.resolveWith(J,[ct]),ct.fn.trigger&&ct(J).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===ct.type(e)},isArray:Array.isArray||function(e){return"array"===ct.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?et[rt.call(e)]||"object":typeof e},isPlainObject:function(e){var i;if(!e||"object"!==ct.type(e)||e.nodeType||ct.isWindow(e))return!1;try{if(e.constructor&&!lt.call(e,"constructor")&&!lt.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(ct.support.ownLast)for(i in e)return lt.call(e,i);for(i in e);return i===t||lt.call(e,i)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,i){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(i=t,t=!1),t=t||J;var n=mt.exec(e),s=!i&&[];return n?[t.createElement(n[1])]:(n=ct.buildFragment([e],t,s),s&&ct(s).remove(),ct.merge([],n.childNodes))},parseJSON:function(t){return e.JSON&&e.JSON.parse?e.JSON.parse(t):null===t?t:"string"==typeof t&&(t=ct.trim(t),t&&gt.test(t.replace(yt,"@").replace(bt,"]").replace(vt,"")))?new Function("return "+t)():(ct.error("Invalid JSON: "+t),void 0)},parseXML:function(i){var n,s;if(!i||"string"!=typeof i)return null;try{e.DOMParser?(s=new DOMParser,n=s.parseFromString(i,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(i))}catch(o){n=t}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ct.error("Invalid XML: "+i),n},noop:function(){},globalEval:function(t){t&&ct.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(wt,"ms-").replace(_t,xt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var s,o=0,a=e.length,r=i(e);if(n){if(r)for(;a>o&&(s=t.apply(e[o],n),s!==!1);o++);else for(o in e)if(s=t.apply(e[o],n),s===!1)break}else if(r)for(;a>o&&(s=t.call(e[o],o,e[o]),s!==!1);o++);else for(o in e)if(s=t.call(e[o],o,e[o]),s===!1)break;return e},trim:ut&&!ut.call("﻿ ")?function(e){return null==e?"":ut.call(e)}:function(e){return null==e?"":(e+"").replace(pt,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?ct.merge(n,"string"==typeof e?[e]:e):st.call(n,e)),n},inArray:function(e,t,i){var n;if(t){if(at)return at.call(t,e,i);for(n=t.length,i=i?0>i?Math.max(0,n+i):i:0;n>i;i++)if(i in t&&t[i]===e)return i}return-1},merge:function(e,i){var n=i.length,s=e.length,o=0;if("number"==typeof n)for(;n>o;o++)e[s++]=i[o];else for(;i[o]!==t;)e[s++]=i[o++];return e.length=s,e},grep:function(e,t,i){var n,s=[],o=0,a=e.length;for(i=!!i;a>o;o++)n=!!t(e[o],o),i!==n&&s.push(e[o]);return s},map:function(e,t,n){var s,o=0,a=e.length,r=i(e),l=[];if(r)for(;a>o;o++)s=t(e[o],o,n),null!=s&&(l[l.length]=s);else for(o in e)s=t(e[o],o,n),null!=s&&(l[l.length]=s);return nt.apply([],l)},guid:1,proxy:function(e,i){var n,s,o;return"string"==typeof i&&(o=e[i],i=e,e=o),ct.isFunction(e)?(n=ot.call(arguments,2),s=function(){return e.apply(i||this,n.concat(ot.call(arguments)))},s.guid=e.guid=e.guid||ct.guid++,s):t},access:function(e,i,n,s,o,a,r){var l=0,u=e.length,c=null==n;if("object"===ct.type(n)){o=!0;for(l in n)ct.access(e,i,l,n[l],!0,a,r)}else if(s!==t&&(o=!0,ct.isFunction(s)||(r=!0),c&&(r?(i.call(e,s),i=null):(c=i,i=function(e,t,i){return c.call(ct(e),i)})),i))for(;u>l;l++)i(e[l],n,r?s:s.call(e[l],l,i(e[l],n)));return o?e:c?i.call(e):u?i(e[0],n):a},now:function(){return(new Date).getTime()},swap:function(e,t,i,n){var s,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];s=i.apply(e,n||[]);for(o in t)e.style[o]=a[o];return s}}),ct.ready.promise=function(t){if(!Y)if(Y=ct.Deferred(),"complete"===J.readyState)setTimeout(ct.ready);else if(J.addEventListener)J.addEventListener("DOMContentLoaded",kt,!1),e.addEventListener("load",kt,!1);else{J.attachEvent("onreadystatechange",kt),e.attachEvent("onload",kt);var i=!1;try{i=null==e.frameElement&&J.documentElement}catch(n){}i&&i.doScroll&&function s(){if(!ct.isReady){try{i.doScroll("left")}catch(e){return setTimeout(s,50)}Ct(),ct.ready()}}()}return Y.promise(t)},ct.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){et["[object "+t+"]"]=t.toLowerCase()}),G=ct(J),/*!
 * Sizzle CSS Selector Engine v1.10.2
 * http://sizzlejs.com/
 *
 * Copyright 2013 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2013-07-03
 */
function(e,t){function i(e,t,i,n){var s,o,a,r,l,u,c,d,f,m;if((t?t.ownerDocument||t:L)!==$&&z(t),t=t||$,i=i||[],!e||"string"!=typeof e)return i;if(1!==(r=t.nodeType)&&9!==r)return[];if(H&&!n){if(s=bt.exec(e))if(a=s[1]){if(9===r){if(o=t.getElementById(a),!o||!o.parentNode)return i;if(o.id===a)return i.push(o),i}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&j(t,o)&&o.id===a)return i.push(o),i}else{if(s[2])return et.apply(i,t.getElementsByTagName(e)),i;if((a=s[3])&&k.getElementsByClassName&&t.getElementsByClassName)return et.apply(i,t.getElementsByClassName(a)),i}if(k.qsa&&(!O||!O.test(e))){if(d=c=R,f=t,m=9===r&&e,1===r&&"object"!==t.nodeName.toLowerCase()){for(u=h(e),(c=t.getAttribute("id"))?d=c.replace(xt,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",l=u.length;l--;)u[l]=d+p(u[l]);f=pt.test(e)&&t.parentNode||t,m=u.join(",")}if(m)try{return et.apply(i,f.querySelectorAll(m)),i}catch(g){}finally{c||t.removeAttribute("id")}}}return _(e.replace(ut,"$1"),t,i,n)}function n(){function e(i,n){return t.push(i+=" ")>T.cacheLength&&delete e[t.shift()],e[i]=n}var t=[];return e}function s(e){return e[R]=!0,e}function o(e){var t=$.createElement("div");try{return!!e(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var i=e.split("|"),n=e.length;n--;)T.attrHandle[i[n]]=t}function r(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function l(e){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===e}}function u(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function c(e){return s(function(t){return t=+t,s(function(i,n){for(var s,o=e([],i.length,t),a=o.length;a--;)i[s=o[a]]&&(i[s]=!(n[s]=i[s]))})})}function d(){}function h(e,t){var n,s,o,a,r,l,u,c=q[e+" "];if(c)return t?0:c.slice(0);for(r=e,l=[],u=T.preFilter;r;){(!n||(s=dt.exec(r)))&&(s&&(r=r.slice(s[0].length)||r),l.push(o=[])),n=!1,(s=ht.exec(r))&&(n=s.shift(),o.push({value:n,type:s[0].replace(ut," ")}),r=r.slice(n.length));for(a in T.filter)!(s=vt[a].exec(r))||u[a]&&!(s=u[a](s))||(n=s.shift(),o.push({value:n,type:a,matches:s}),r=r.slice(n.length));if(!n)break}return t?r.length:r?i.error(e):q(e,l).slice(0)}function p(e){for(var t=0,i=e.length,n="";i>t;t++)n+=e[t].value;return n}function f(e,t,i){var n=t.dir,s=i&&"parentNode"===n,o=F++;return t.first?function(t,i,o){for(;t=t[n];)if(1===t.nodeType||s)return e(t,i,o)}:function(t,i,a){var r,l,u,c=W+" "+o;if(a){for(;t=t[n];)if((1===t.nodeType||s)&&e(t,i,a))return!0}else for(;t=t[n];)if(1===t.nodeType||s)if(u=t[R]||(t[R]={}),(l=u[n])&&l[0]===c){if((r=l[1])===!0||r===C)return r===!0}else if(l=u[n]=[c],l[1]=e(t,i,a)||C,l[1]===!0)return!0}}function m(e){return e.length>1?function(t,i,n){for(var s=e.length;s--;)if(!e[s](t,i,n))return!1;return!0}:e[0]}function g(e,t,i,n,s){for(var o,a=[],r=0,l=e.length,u=null!=t;l>r;r++)(o=e[r])&&(!i||i(o,n,s))&&(a.push(o),u&&t.push(r));return a}function v(e,t,i,n,o,a){return n&&!n[R]&&(n=v(n)),o&&!o[R]&&(o=v(o,a)),s(function(s,a,r,l){var u,c,d,h=[],p=[],f=a.length,m=s||w(t||"*",r.nodeType?[r]:r,[]),v=!e||!s&&t?m:g(m,h,e,r,l),y=i?o||(s?e:f||n)?[]:a:v;if(i&&i(v,y,r,l),n)for(u=g(y,p),n(u,[],r,l),c=u.length;c--;)(d=u[c])&&(y[p[c]]=!(v[p[c]]=d));if(s){if(o||e){if(o){for(u=[],c=y.length;c--;)(d=y[c])&&u.push(v[c]=d);o(null,y=[],u,l)}for(c=y.length;c--;)(d=y[c])&&(u=o?it.call(s,d):h[c])>-1&&(s[u]=!(a[u]=d))}}else y=g(y===a?y.splice(f,y.length):y),o?o(null,a,y,l):et.apply(a,y)})}function y(e){for(var t,i,n,s=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],r=o?1:0,l=f(function(e){return e===t},a,!0),u=f(function(e){return it.call(t,e)>-1},a,!0),c=[function(e,i,n){return!o&&(n||i!==N)||((t=i).nodeType?l(e,i,n):u(e,i,n))}];s>r;r++)if(i=T.relative[e[r].type])c=[f(m(c),i)];else{if(i=T.filter[e[r].type].apply(null,e[r].matches),i[R]){for(n=++r;s>n&&!T.relative[e[n].type];n++);return v(r>1&&m(c),r>1&&p(e.slice(0,r-1).concat({value:" "===e[r-2].type?"*":""})).replace(ut,"$1"),i,n>r&&y(e.slice(r,n)),s>n&&y(e=e.slice(n)),s>n&&p(e))}c.push(i)}return m(c)}function b(e,t){var n=0,o=t.length>0,a=e.length>0,r=function(s,r,l,u,c){var d,h,p,f=[],m=0,v="0",y=s&&[],b=null!=c,w=N,_=s||a&&T.find.TAG("*",c&&r.parentNode||r),x=W+=null==w?1:Math.random()||.1;for(b&&(N=r!==$&&r,C=n);null!=(d=_[v]);v++){if(a&&d){for(h=0;p=e[h++];)if(p(d,r,l)){u.push(d);break}b&&(W=x,C=++n)}o&&((d=!p&&d)&&m--,s&&y.push(d))}if(m+=v,o&&v!==m){for(h=0;p=t[h++];)p(y,f,r,l);if(s){if(m>0)for(;v--;)y[v]||f[v]||(f[v]=Q.call(u));f=g(f)}et.apply(u,f),b&&!s&&f.length>0&&m+t.length>1&&i.uniqueSort(u)}return b&&(W=x,N=w),y};return o?s(r):r}function w(e,t,n){for(var s=0,o=t.length;o>s;s++)i(e,t[s],n);return n}function _(e,t,i,n){var s,o,a,r,l,u=h(e);if(!n&&1===u.length){if(o=u[0]=u[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&k.getById&&9===t.nodeType&&H&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(kt,Ct),t)||[])[0],!t)return i;e=e.slice(o.shift().value.length)}for(s=vt.needsContext.test(e)?0:o.length;s--&&(a=o[s],!T.relative[r=a.type]);)if((l=T.find[r])&&(n=l(a.matches[0].replace(kt,Ct),pt.test(o[0].type)&&t.parentNode||t))){if(o.splice(s,1),e=n.length&&p(o),!e)return et.apply(i,n),i;break}}return S(e,u)(n,t,!H,i,pt.test(e)),i}var x,k,C,T,D,E,S,N,M,z,$,A,H,O,P,I,j,R="sizzle"+-new Date,L=e.document,W=0,F=0,B=n(),q=n(),U=n(),Y=!1,G=function(e,t){return e===t?(Y=!0,0):0},X=typeof t,V=1<<31,J={}.hasOwnProperty,K=[],Q=K.pop,Z=K.push,et=K.push,tt=K.slice,it=K.indexOf||function(e){for(var t=0,i=this.length;i>t;t++)if(this[t]===e)return t;return-1},nt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",st="[\\x20\\t\\r\\n\\f]",ot="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",at=ot.replace("w","w#"),rt="\\["+st+"*("+ot+")"+st+"*(?:([*^$|!~]?=)"+st+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+at+")|)|)"+st+"*\\]",lt=":("+ot+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+rt.replace(3,8)+")*)|.*)\\)|)",ut=new RegExp("^"+st+"+|((?:^|[^\\\\])(?:\\\\.)*)"+st+"+$","g"),dt=new RegExp("^"+st+"*,"+st+"*"),ht=new RegExp("^"+st+"*([>+~]|"+st+")"+st+"*"),pt=new RegExp(st+"*[+~]"),ft=new RegExp("="+st+"*([^\\]'\"]*)"+st+"*\\]","g"),mt=new RegExp(lt),gt=new RegExp("^"+at+"$"),vt={ID:new RegExp("^#("+ot+")"),CLASS:new RegExp("^\\.("+ot+")"),TAG:new RegExp("^("+ot.replace("w","w*")+")"),ATTR:new RegExp("^"+rt),PSEUDO:new RegExp("^"+lt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+st+"*(even|odd|(([+-]|)(\\d*)n|)"+st+"*(?:([+-]|)"+st+"*(\\d+)|))"+st+"*\\)|)","i"),bool:new RegExp("^(?:"+nt+")$","i"),needsContext:new RegExp("^"+st+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+st+"*((?:-\\d)?\\d*)"+st+"*\\)|)(?=[^-]|$)","i")},yt=/^[^{]+\{\s*\[native \w/,bt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,wt=/^(?:input|select|textarea|button)$/i,_t=/^h\d$/i,xt=/'|\\/g,kt=new RegExp("\\\\([\\da-f]{1,6}"+st+"?|("+st+")|.)","ig"),Ct=function(e,t,i){var n="0x"+t-65536;return n!==n||i?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{et.apply(K=tt.call(L.childNodes),L.childNodes),K[L.childNodes.length].nodeType}catch(Tt){et={apply:K.length?function(e,t){Z.apply(e,tt.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}E=i.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},k=i.support={},z=i.setDocument=function(e){var t=e?e.ownerDocument||e:L,i=t.defaultView;return t!==$&&9===t.nodeType&&t.documentElement?($=t,A=t.documentElement,H=!E(t),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){z()}),k.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),k.getElementsByTagName=o(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),k.getElementsByClassName=o(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),k.getById=o(function(e){return A.appendChild(e).id=R,!t.getElementsByName||!t.getElementsByName(R).length}),k.getById?(T.find.ID=function(e,t){if(typeof t.getElementById!==X&&H){var i=t.getElementById(e);return i&&i.parentNode?[i]:[]}},T.filter.ID=function(e){var t=e.replace(kt,Ct);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(kt,Ct);return function(e){var i=typeof e.getAttributeNode!==X&&e.getAttributeNode("id");return i&&i.value===t}}),T.find.TAG=k.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==X?t.getElementsByTagName(e):void 0}:function(e,t){var i,n=[],s=0,o=t.getElementsByTagName(e);if("*"===e){for(;i=o[s++];)1===i.nodeType&&n.push(i);return n}return o},T.find.CLASS=k.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==X&&H?t.getElementsByClassName(e):void 0},P=[],O=[],(k.qsa=yt.test(t.querySelectorAll))&&(o(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||O.push("\\["+st+"*(?:value|"+nt+")"),e.querySelectorAll(":checked").length||O.push(":checked")}),o(function(e){var i=t.createElement("input");i.setAttribute("type","hidden"),e.appendChild(i).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&O.push("[*^$]="+st+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")})),(k.matchesSelector=yt.test(I=A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&o(function(e){k.disconnectedMatch=I.call(e,"div"),I.call(e,"[s!='']:x"),P.push("!=",lt)}),O=O.length&&new RegExp(O.join("|")),P=P.length&&new RegExp(P.join("|")),j=yt.test(A.contains)||A.compareDocumentPosition?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=A.compareDocumentPosition?function(e,i){if(e===i)return Y=!0,0;var n=i.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(i);return n?1&n||!k.sortDetached&&i.compareDocumentPosition(e)===n?e===t||j(L,e)?-1:i===t||j(L,i)?1:M?it.call(M,e)-it.call(M,i):0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,i){var n,s=0,o=e.parentNode,a=i.parentNode,l=[e],u=[i];if(e===i)return Y=!0,0;if(!o||!a)return e===t?-1:i===t?1:o?-1:a?1:M?it.call(M,e)-it.call(M,i):0;if(o===a)return r(e,i);for(n=e;n=n.parentNode;)l.unshift(n);for(n=i;n=n.parentNode;)u.unshift(n);for(;l[s]===u[s];)s++;return s?r(l[s],u[s]):l[s]===L?-1:u[s]===L?1:0},t):$},i.matches=function(e,t){return i(e,null,null,t)},i.matchesSelector=function(e,t){if((e.ownerDocument||e)!==$&&z(e),t=t.replace(ft,"='$1']"),!(!k.matchesSelector||!H||P&&P.test(t)||O&&O.test(t)))try{var n=I.call(e,t);if(n||k.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(s){}return i(t,$,null,[e]).length>0},i.contains=function(e,t){return(e.ownerDocument||e)!==$&&z(e),j(e,t)},i.attr=function(e,i){(e.ownerDocument||e)!==$&&z(e);var n=T.attrHandle[i.toLowerCase()],s=n&&J.call(T.attrHandle,i.toLowerCase())?n(e,i,!H):t;return s===t?k.attributes||!H?e.getAttribute(i):(s=e.getAttributeNode(i))&&s.specified?s.value:null:s},i.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},i.uniqueSort=function(e){var t,i=[],n=0,s=0;if(Y=!k.detectDuplicates,M=!k.sortStable&&e.slice(0),e.sort(G),Y){for(;t=e[s++];)t===e[s]&&(n=i.push(s));for(;n--;)e.splice(i[n],1)}return e},D=i.getText=function(e){var t,i="",n=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=D(e)}else if(3===s||4===s)return e.nodeValue}else for(;t=e[n];n++)i+=D(t);return i},T=i.selectors={cacheLength:50,createPseudo:s,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(kt,Ct),e[3]=(e[4]||e[5]||"").replace(kt,Ct),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||i.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&i.error(e[0]),e},PSEUDO:function(e){var i,n=!e[5]&&e[2];return vt.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:n&&mt.test(n)&&(i=h(n,!0))&&(i=n.indexOf(")",n.length-i)-n.length)&&(e[0]=e[0].slice(0,i),e[2]=n.slice(0,i)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(kt,Ct).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=B[e+" "];return t||(t=new RegExp("(^|"+st+")"+e+"("+st+"|$)"))&&B(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==X&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(s){var o=i.attr(s,e);return null==o?"!="===t:t?(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o+" ").indexOf(n)>-1:"|="===t?o===n||o.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,i,n,s){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),r="of-type"===t;return 1===n&&0===s?function(e){return!!e.parentNode}:function(t,i,l){var u,c,d,h,p,f,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=r&&t.nodeName.toLowerCase(),y=!l&&!r;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(r?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?g.firstChild:g.lastChild],a&&y){for(c=g[R]||(g[R]={}),u=c[e]||[],p=u[0]===W&&u[1],h=u[0]===W&&u[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(h=p=0)||f.pop();)if(1===d.nodeType&&++h&&d===t){c[e]=[W,p,h];break}}else if(y&&(u=(t[R]||(t[R]={}))[e])&&u[0]===W)h=u[1];else for(;(d=++p&&d&&d[m]||(h=p=0)||f.pop())&&((r?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++h||(y&&((d[R]||(d[R]={}))[e]=[W,h]),d!==t)););return h-=s,h===n||0===h%n&&h/n>=0}}},PSEUDO:function(e,t){var n,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||i.error("unsupported pseudo: "+e);return o[R]?o(t):o.length>1?(n=[e,e,"",t],T.setFilters.hasOwnProperty(e.toLowerCase())?s(function(e,i){for(var n,s=o(e,t),a=s.length;a--;)n=it.call(e,s[a]),e[n]=!(i[n]=s[a])}):function(e){return o(e,0,n)}):o}},pseudos:{not:s(function(e){var t=[],i=[],n=S(e.replace(ut,"$1"));return n[R]?s(function(e,t,i,s){for(var o,a=n(e,null,s,[]),r=e.length;r--;)(o=a[r])&&(e[r]=!(t[r]=o))}):function(e,s,o){return t[0]=e,n(t,null,o,i),!i.pop()}}),has:s(function(e){return function(t){return i(e,t).length>0}}),contains:s(function(e){return function(t){return(t.textContent||t.innerText||D(t)).indexOf(e)>-1}}),lang:s(function(e){return gt.test(e||"")||i.error("unsupported lang: "+e),e=e.replace(kt,Ct).toLowerCase(),function(t){var i;do if(i=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===e||0===i.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===A},focus:function(e){return e===$.activeElement&&(!$.hasFocus||$.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return _t.test(e.nodeName)},input:function(e){return wt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,i){return[0>i?i+t:i]}),even:c(function(e,t){for(var i=0;t>i;i+=2)e.push(i);return e}),odd:c(function(e,t){for(var i=1;t>i;i+=2)e.push(i);return e}),lt:c(function(e,t,i){for(var n=0>i?i+t:i;--n>=0;)e.push(n);return e}),gt:c(function(e,t,i){for(var n=0>i?i+t:i;++n<t;)e.push(n);return e})}},T.pseudos.nth=T.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[x]=l(x);for(x in{submit:!0,reset:!0})T.pseudos[x]=u(x);d.prototype=T.filters=T.pseudos,T.setFilters=new d,S=i.compile=function(e,t){var i,n=[],s=[],o=U[e+" "];if(!o){for(t||(t=h(e)),i=t.length;i--;)o=y(t[i]),o[R]?n.push(o):s.push(o);o=U(e,b(s,n))}return o},k.sortStable=R.split("").sort(G).join("")===R,k.detectDuplicates=Y,z(),k.sortDetached=o(function(e){return 1&e.compareDocumentPosition($.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,i){return i?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),k.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,i){return i||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||a(nt,function(e,t,i){var n;return i?void 0:(n=e.getAttributeNode(t))&&n.specified?n.value:e[t]===!0?t.toLowerCase():null}),ct.find=i,ct.expr=i.selectors,ct.expr[":"]=ct.expr.pseudos,ct.unique=i.uniqueSort,ct.text=i.getText,ct.isXMLDoc=i.isXML,ct.contains=i.contains}(e);var Tt={};ct.Callbacks=function(e){e="string"==typeof e?Tt[e]||n(e):ct.extend({},e);var i,s,o,a,r,l,u=[],c=!e.once&&[],d=function(t){for(s=e.memory&&t,o=!0,r=l||0,l=0,a=u.length,i=!0;u&&a>r;r++)if(u[r].apply(t[0],t[1])===!1&&e.stopOnFalse){s=!1;break}i=!1,u&&(c?c.length&&d(c.shift()):s?u=[]:h.disable())},h={add:function(){if(u){var t=u.length;!function n(t){ct.each(t,function(t,i){var s=ct.type(i);"function"===s?e.unique&&h.has(i)||u.push(i):i&&i.length&&"string"!==s&&n(i)})}(arguments),i?a=u.length:s&&(l=t,d(s))}return this},remove:function(){return u&&ct.each(arguments,function(e,t){for(var n;(n=ct.inArray(t,u,n))>-1;)u.splice(n,1),i&&(a>=n&&a--,r>=n&&r--)}),this},has:function(e){return e?ct.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],a=0,this},disable:function(){return u=c=s=t,this},disabled:function(){return!u},lock:function(){return c=t,s||h.disable(),this},locked:function(){return!c},fireWith:function(e,t){return!u||o&&!c||(t=t||[],t=[e,t.slice?t.slice():t],i?c.push(t):d(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!o}};return h},ct.extend({Deferred:function(e){var t=[["resolve","done",ct.Callbacks("once memory"),"resolved"],["reject","fail",ct.Callbacks("once memory"),"rejected"],["notify","progress",ct.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ct.Deferred(function(i){ct.each(t,function(t,o){var a=o[0],r=ct.isFunction(e[t])&&e[t];s[o[1]](function(){var e=r&&r.apply(this,arguments);e&&ct.isFunction(e.promise)?e.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[a+"With"](this===n?i.promise():this,r?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ct.extend(e,n):n}},s={};return n.pipe=n.then,ct.each(t,function(e,o){var a=o[2],r=o[3];n[o[1]]=a.add,r&&a.add(function(){i=r},t[1^e][2].disable,t[2][2].lock),s[o[0]]=function(){return s[o[0]+"With"](this===s?n:this,arguments),this},s[o[0]+"With"]=a.fireWith}),n.promise(s),e&&e.call(s,s),s},when:function(e){var t,i,n,s=0,o=ot.call(arguments),a=o.length,r=1!==a||e&&ct.isFunction(e.promise)?a:0,l=1===r?e:ct.Deferred(),u=function(e,i,n){return function(s){i[e]=this,n[e]=arguments.length>1?ot.call(arguments):s,n===t?l.notifyWith(i,n):--r||l.resolveWith(i,n)}};if(a>1)for(t=new Array(a),i=new Array(a),n=new Array(a);a>s;s++)o[s]&&ct.isFunction(o[s].promise)?o[s].promise().done(u(s,n,o)).fail(l.reject).progress(u(s,i,t)):--r;return r||l.resolveWith(n,o),l.promise()}}),ct.support=function(t){var i,n,s,o,a,r,l,u,c,d=J.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=d.getElementsByTagName("*")||[],n=d.getElementsByTagName("a")[0],!n||!n.style||!i.length)return t;o=J.createElement("select"),r=o.appendChild(J.createElement("option")),s=d.getElementsByTagName("input")[0],n.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(n.getAttribute("style")),t.hrefNormalized="/a"===n.getAttribute("href"),t.opacity=/^0.5/.test(n.style.opacity),t.cssFloat=!!n.style.cssFloat,t.checkOn=!!s.value,t.optSelected=r.selected,t.enctype=!!J.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==J.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,s.checked=!0,t.noCloneChecked=s.cloneNode(!0).checked,o.disabled=!0,t.optDisabled=!r.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}s=J.createElement("input"),s.setAttribute("value",""),t.input=""===s.getAttribute("value"),s.value="t",s.setAttribute("type","radio"),t.radioValue="t"===s.value,s.setAttribute("checked","t"),s.setAttribute("name","t"),a=J.createDocumentFragment(),a.appendChild(s),t.appendChecked=s.checked,t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(c in{submit:!0,change:!0,focusin:!0})d.setAttribute(l="on"+c,"t"),t[c+"Bubbles"]=l in e||d.attributes[l].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(c in ct(t))break;return t.ownLast="0"!==c,ct(function(){var i,n,s,o="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",a=J.getElementsByTagName("body")[0];a&&(i=J.createElement("div"),i.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(i).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=d.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",u=0===s[0].offsetHeight,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=u&&0===s[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",ct.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,n=d.appendChild(J.createElement("div")),n.style.cssText=d.style.cssText=o,n.style.marginRight=n.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(n,null)||{}).marginRight)),typeof d.style.zoom!==X&&(d.innerHTML="",d.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(a.style.zoom=1)),a.removeChild(i),i=d=s=n=null)}),i=o=a=r=n=s=null,t}({});var Dt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Et=/([A-Z])/g;ct.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?ct.cache[e[ct.expando]]:e[ct.expando],!!e&&!r(e)},data:function(e,t,i){return s(e,t,i)},removeData:function(e,t){return o(e,t)},_data:function(e,t,i){return s(e,t,i,!0)},_removeData:function(e,t){return o(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&ct.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),ct.fn.extend({data:function(e,i){var n,s,o=null,r=0,l=this[0];if(e===t){if(this.length&&(o=ct.data(l),1===l.nodeType&&!ct._data(l,"parsedAttrs"))){for(n=l.attributes;r<n.length;r++)s=n[r].name,0===s.indexOf("data-")&&(s=ct.camelCase(s.slice(5)),a(l,s,o[s]));ct._data(l,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){ct.data(this,e)}):arguments.length>1?this.each(function(){ct.data(this,e,i)}):l?a(l,e,ct.data(l,e)):null},removeData:function(e){return this.each(function(){ct.removeData(this,e)})}}),ct.extend({queue:function(e,t,i){var n;return e?(t=(t||"fx")+"queue",n=ct._data(e,t),i&&(!n||ct.isArray(i)?n=ct._data(e,t,ct.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(e,t){t=t||"fx";var i=ct.queue(e,t),n=i.length,s=i.shift(),o=ct._queueHooks(e,t),a=function(){ct.dequeue(e,t)};"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===t&&i.unshift("inprogress"),delete o.stop,s.call(e,a,o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return ct._data(e,i)||ct._data(e,i,{empty:ct.Callbacks("once memory").add(function(){ct._removeData(e,t+"queue"),ct._removeData(e,i)})})}}),ct.fn.extend({queue:function(e,i){var n=2;return"string"!=typeof e&&(i=e,e="fx",n--),arguments.length<n?ct.queue(this[0],e):i===t?this:this.each(function(){var t=ct.queue(this,e,i);ct._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&ct.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ct.dequeue(this,e)})},delay:function(e,t){return e=ct.fx?ct.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,i){var n=setTimeout(t,e);i.stop=function(){clearTimeout(n)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,i){var n,s=1,o=ct.Deferred(),a=this,r=this.length,l=function(){--s||o.resolveWith(a,[a])};for("string"!=typeof e&&(i=e,e=t),e=e||"fx";r--;)n=ct._data(a[r],e+"queueHooks"),n&&n.empty&&(s++,n.empty.add(l));return l(),o.promise(i)}});var St,Nt,Mt=/[\t\r\n\f]/g,zt=/\r/g,$t=/^(?:input|select|textarea|button|object)$/i,At=/^(?:a|area)$/i,Ht=/^(?:checked|selected)$/i,Ot=ct.support.getSetAttribute,Pt=ct.support.input;ct.fn.extend({attr:function(e,t){return ct.access(this,ct.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ct.removeAttr(this,e)})},prop:function(e,t){return ct.access(this,ct.prop,e,t,arguments.length>1)},removeProp:function(e){return e=ct.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(i){}})},addClass:function(e){var t,i,n,s,o,a=0,r=this.length,l="string"==typeof e&&e;if(ct.isFunction(e))return this.each(function(t){ct(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(ht)||[];r>a;a++)if(i=this[a],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(Mt," "):" ")){for(o=0;s=t[o++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");i.className=ct.trim(n)}return this},removeClass:function(e){var t,i,n,s,o,a=0,r=this.length,l=0===arguments.length||"string"==typeof e&&e;if(ct.isFunction(e))return this.each(function(t){ct(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(ht)||[];r>a;a++)if(i=this[a],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(Mt," "):"")){for(o=0;s=t[o++];)for(;n.indexOf(" "+s+" ")>=0;)n=n.replace(" "+s+" "," ");i.className=e?ct.trim(n):""}return this},toggleClass:function(e,t){var i=typeof e;return"boolean"==typeof t&&"string"===i?t?this.addClass(e):this.removeClass(e):ct.isFunction(e)?this.each(function(i){ct(this).toggleClass(e.call(this,i,this.className,t),t)}):this.each(function(){if("string"===i)for(var t,n=0,s=ct(this),o=e.match(ht)||[];t=o[n++];)s.hasClass(t)?s.removeClass(t):s.addClass(t);else(i===X||"boolean"===i)&&(this.className&&ct._data(this,"__className__",this.className),this.className=this.className||e===!1?"":ct._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",i=0,n=this.length;n>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(Mt," ").indexOf(t)>=0)return!0;return!1},val:function(e){var i,n,s,o=this[0];{if(arguments.length)return s=ct.isFunction(e),this.each(function(i){var o;1===this.nodeType&&(o=s?e.call(this,i,ct(this).val()):e,null==o?o="":"number"==typeof o?o+="":ct.isArray(o)&&(o=ct.map(o,function(e){return null==e?"":e+""})),n=ct.valHooks[this.type]||ct.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==t||(this.value=o))});if(o)return n=ct.valHooks[o.type]||ct.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(i=n.get(o,"value"))!==t?i:(i=o.value,"string"==typeof i?i.replace(zt,""):null==i?"":i)}}}),ct.extend({valHooks:{option:{get:function(e){var t=ct.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){for(var t,i,n=e.options,s=e.selectedIndex,o="select-one"===e.type||0>s,a=o?null:[],r=o?s+1:n.length,l=0>s?r:o?s:0;r>l;l++)if(i=n[l],!(!i.selected&&l!==s||(ct.support.optDisabled?i.disabled:null!==i.getAttribute("disabled"))||i.parentNode.disabled&&ct.nodeName(i.parentNode,"optgroup"))){if(t=ct(i).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var i,n,s=e.options,o=ct.makeArray(t),a=s.length;a--;)n=s[a],(n.selected=ct.inArray(ct(n).val(),o)>=0)&&(i=!0);return i||(e.selectedIndex=-1),o}}},attr:function(e,i,n){var s,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return typeof e.getAttribute===X?ct.prop(e,i,n):(1===a&&ct.isXMLDoc(e)||(i=i.toLowerCase(),s=ct.attrHooks[i]||(ct.expr.match.bool.test(i)?Nt:St)),n===t?s&&"get"in s&&null!==(o=s.get(e,i))?o:(o=ct.find.attr(e,i),null==o?t:o):null!==n?s&&"set"in s&&(o=s.set(e,n,i))!==t?o:(e.setAttribute(i,n+""),n):(ct.removeAttr(e,i),void 0))},removeAttr:function(e,t){var i,n,s=0,o=t&&t.match(ht);if(o&&1===e.nodeType)for(;i=o[s++];)n=ct.propFix[i]||i,ct.expr.match.bool.test(i)?Pt&&Ot||!Ht.test(i)?e[n]=!1:e[ct.camelCase("default-"+i)]=e[n]=!1:ct.attr(e,i,""),e.removeAttribute(Ot?i:n)},attrHooks:{type:{set:function(e,t){if(!ct.support.radioValue&&"radio"===t&&ct.nodeName(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,i,n){var s,o,a,r=e.nodeType;if(e&&3!==r&&8!==r&&2!==r)return a=1!==r||!ct.isXMLDoc(e),a&&(i=ct.propFix[i]||i,o=ct.propHooks[i]),n!==t?o&&"set"in o&&(s=o.set(e,n,i))!==t?s:e[i]=n:o&&"get"in o&&null!==(s=o.get(e,i))?s:e[i]},propHooks:{tabIndex:{get:function(e){var t=ct.find.attr(e,"tabindex");return t?parseInt(t,10):$t.test(e.nodeName)||At.test(e.nodeName)&&e.href?0:-1}}}}),Nt={set:function(e,t,i){return t===!1?ct.removeAttr(e,i):Pt&&Ot||!Ht.test(i)?e.setAttribute(!Ot&&ct.propFix[i]||i,i):e[ct.camelCase("default-"+i)]=e[i]=!0,i}},ct.each(ct.expr.match.bool.source.match(/\w+/g),function(e,i){var n=ct.expr.attrHandle[i]||ct.find.attr;ct.expr.attrHandle[i]=Pt&&Ot||!Ht.test(i)?function(e,i,s){var o=ct.expr.attrHandle[i],a=s?t:(ct.expr.attrHandle[i]=t)!=n(e,i,s)?i.toLowerCase():null;return ct.expr.attrHandle[i]=o,a}:function(e,i,n){return n?t:e[ct.camelCase("default-"+i)]?i.toLowerCase():null}}),Pt&&Ot||(ct.attrHooks.value={set:function(e,t,i){return ct.nodeName(e,"input")?(e.defaultValue=t,void 0):St&&St.set(e,t,i)}}),Ot||(St={set:function(e,i,n){var s=e.getAttributeNode(n);return s||e.setAttributeNode(s=e.ownerDocument.createAttribute(n)),s.value=i+="","value"===n||i===e.getAttribute(n)?i:t}},ct.expr.attrHandle.id=ct.expr.attrHandle.name=ct.expr.attrHandle.coords=function(e,i,n){var s;return n?t:(s=e.getAttributeNode(i))&&""!==s.value?s.value:null},ct.valHooks.button={get:function(e,i){var n=e.getAttributeNode(i);return n&&n.specified?n.value:t},set:St.set},ct.attrHooks.contenteditable={set:function(e,t,i){St.set(e,""===t?!1:t,i)}},ct.each(["width","height"],function(e,t){ct.attrHooks[t]={set:function(e,i){return""===i?(e.setAttribute(t,"auto"),i):void 0}}})),ct.support.hrefNormalized||ct.each(["href","src"],function(e,t){ct.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ct.support.style||(ct.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""
}}),ct.support.optSelected||(ct.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),ct.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ct.propFix[this.toLowerCase()]=this}),ct.support.enctype||(ct.propFix.enctype="encoding"),ct.each(["radio","checkbox"],function(){ct.valHooks[this]={set:function(e,t){return ct.isArray(t)?e.checked=ct.inArray(ct(e).val(),t)>=0:void 0}},ct.support.checkOn||(ct.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var It=/^(?:input|select|textarea)$/i,jt=/^key/,Rt=/^(?:mouse|contextmenu)|click/,Lt=/^(?:focusinfocus|focusoutblur)$/,Wt=/^([^.]*)(?:\.(.+)|)$/;ct.event={global:{},add:function(e,i,n,s,o){var a,r,l,u,c,d,h,p,f,m,g,v=ct._data(e);if(v){for(n.handler&&(u=n,n=u.handler,o=u.selector),n.guid||(n.guid=ct.guid++),(r=v.events)||(r=v.events={}),(d=v.handle)||(d=v.handle=function(e){return typeof ct===X||e&&ct.event.triggered===e.type?t:ct.event.dispatch.apply(d.elem,arguments)},d.elem=e),i=(i||"").match(ht)||[""],l=i.length;l--;)a=Wt.exec(i[l])||[],f=g=a[1],m=(a[2]||"").split(".").sort(),f&&(c=ct.event.special[f]||{},f=(o?c.delegateType:c.bindType)||f,c=ct.event.special[f]||{},h=ct.extend({type:f,origType:g,data:s,handler:n,guid:n.guid,selector:o,needsContext:o&&ct.expr.match.needsContext.test(o),namespace:m.join(".")},u),(p=r[f])||(p=r[f]=[],p.delegateCount=0,c.setup&&c.setup.call(e,s,m,d)!==!1||(e.addEventListener?e.addEventListener(f,d,!1):e.attachEvent&&e.attachEvent("on"+f,d))),c.add&&(c.add.call(e,h),h.handler.guid||(h.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,h):p.push(h),ct.event.global[f]=!0);e=null}},remove:function(e,t,i,n,s){var o,a,r,l,u,c,d,h,p,f,m,g=ct.hasData(e)&&ct._data(e);if(g&&(c=g.events)){for(t=(t||"").match(ht)||[""],u=t.length;u--;)if(r=Wt.exec(t[u])||[],p=m=r[1],f=(r[2]||"").split(".").sort(),p){for(d=ct.event.special[p]||{},p=(n?d.delegateType:d.bindType)||p,h=c[p]||[],r=r[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=h.length;o--;)a=h[o],!s&&m!==a.origType||i&&i.guid!==a.guid||r&&!r.test(a.namespace)||n&&n!==a.selector&&("**"!==n||!a.selector)||(h.splice(o,1),a.selector&&h.delegateCount--,d.remove&&d.remove.call(e,a));l&&!h.length&&(d.teardown&&d.teardown.call(e,f,g.handle)!==!1||ct.removeEvent(e,p,g.handle),delete c[p])}else for(p in c)ct.event.remove(e,p+t[u],i,n,!0);ct.isEmptyObject(c)&&(delete g.handle,ct._removeData(e,"events"))}},trigger:function(i,n,s,o){var a,r,l,u,c,d,h,p=[s||J],f=lt.call(i,"type")?i.type:i,m=lt.call(i,"namespace")?i.namespace.split("."):[];if(l=d=s=s||J,3!==s.nodeType&&8!==s.nodeType&&!Lt.test(f+ct.event.triggered)&&(f.indexOf(".")>=0&&(m=f.split("."),f=m.shift(),m.sort()),r=f.indexOf(":")<0&&"on"+f,i=i[ct.expando]?i:new ct.Event(f,"object"==typeof i&&i),i.isTrigger=o?2:3,i.namespace=m.join("."),i.namespace_re=i.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,i.result=t,i.target||(i.target=s),n=null==n?[i]:ct.makeArray(n,[i]),c=ct.event.special[f]||{},o||!c.trigger||c.trigger.apply(s,n)!==!1)){if(!o&&!c.noBubble&&!ct.isWindow(s)){for(u=c.delegateType||f,Lt.test(u+f)||(l=l.parentNode);l;l=l.parentNode)p.push(l),d=l;d===(s.ownerDocument||J)&&p.push(d.defaultView||d.parentWindow||e)}for(h=0;(l=p[h++])&&!i.isPropagationStopped();)i.type=h>1?u:c.bindType||f,a=(ct._data(l,"events")||{})[i.type]&&ct._data(l,"handle"),a&&a.apply(l,n),a=r&&l[r],a&&ct.acceptData(l)&&a.apply&&a.apply(l,n)===!1&&i.preventDefault();if(i.type=f,!o&&!i.isDefaultPrevented()&&(!c._default||c._default.apply(p.pop(),n)===!1)&&ct.acceptData(s)&&r&&s[f]&&!ct.isWindow(s)){d=s[r],d&&(s[r]=null),ct.event.triggered=f;try{s[f]()}catch(g){}ct.event.triggered=t,d&&(s[r]=d)}return i.result}},dispatch:function(e){e=ct.event.fix(e);var i,n,s,o,a,r=[],l=ot.call(arguments),u=(ct._data(this,"events")||{})[e.type]||[],c=ct.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(r=ct.event.handlers.call(this,e,u),i=0;(o=r[i++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,a=0;(s=o.handlers[a++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(s.namespace))&&(e.handleObj=s,e.data=s.data,n=((ct.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l),n!==t&&(e.result=n)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,i){var n,s,o,a,r=[],l=i.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)s=i[a],n=s.selector+" ",o[n]===t&&(o[n]=s.needsContext?ct(n,this).index(u)>=0:ct.find(n,this,null,[u]).length),o[n]&&o.push(s);o.length&&r.push({elem:u,handlers:o})}return l<i.length&&r.push({elem:this,handlers:i.slice(l)}),r},fix:function(e){if(e[ct.expando])return e;var t,i,n,s=e.type,o=e,a=this.fixHooks[s];for(a||(this.fixHooks[s]=a=Rt.test(s)?this.mouseHooks:jt.test(s)?this.keyHooks:{}),n=a.props?this.props.concat(a.props):this.props,e=new ct.Event(o),t=n.length;t--;)i=n[t],e[i]=o[i];return e.target||(e.target=o.srcElement||J),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,i){var n,s,o,a=i.button,r=i.fromElement;return null==e.pageX&&null!=i.clientX&&(s=e.target.ownerDocument||J,o=s.documentElement,n=s.body,e.pageX=i.clientX+(o&&o.scrollLeft||n&&n.scrollLeft||0)-(o&&o.clientLeft||n&&n.clientLeft||0),e.pageY=i.clientY+(o&&o.scrollTop||n&&n.scrollTop||0)-(o&&o.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&r&&(e.relatedTarget=r===e.target?i.toElement:r),e.which||a===t||(e.which=1&a?1:2&a?3:4&a?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==c()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===c()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return ct.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return ct.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,i,n){var s=ct.extend(new ct.Event,i,{type:e,isSimulated:!0,originalEvent:{}});n?ct.event.trigger(s,null,t):ct.event.dispatch.call(t,s),s.isDefaultPrevented()&&i.preventDefault()}},ct.removeEvent=J.removeEventListener?function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i,!1)}:function(e,t,i){var n="on"+t;e.detachEvent&&(typeof e[n]===X&&(e[n]=null),e.detachEvent(n,i))},ct.Event=function(e,t){return this instanceof ct.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?l:u):this.type=e,t&&ct.extend(this,t),this.timeStamp=e&&e.timeStamp||ct.now(),this[ct.expando]=!0,void 0):new ct.Event(e,t)},ct.Event.prototype={isDefaultPrevented:u,isPropagationStopped:u,isImmediatePropagationStopped:u,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=l,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=l,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=l,this.stopPropagation()}},ct.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){ct.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,s=e.relatedTarget,o=e.handleObj;return(!s||s!==n&&!ct.contains(n,s))&&(e.type=o.origType,i=o.handler.apply(this,arguments),e.type=t),i}}}),ct.support.submitBubbles||(ct.event.special.submit={setup:function(){return ct.nodeName(this,"form")?!1:(ct.event.add(this,"click._submit keypress._submit",function(e){var i=e.target,n=ct.nodeName(i,"input")||ct.nodeName(i,"button")?i.form:t;n&&!ct._data(n,"submitBubbles")&&(ct.event.add(n,"submit._submit",function(e){e._submit_bubble=!0}),ct._data(n,"submitBubbles",!0))}),void 0)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&ct.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return ct.nodeName(this,"form")?!1:(ct.event.remove(this,"._submit"),void 0)}}),ct.support.changeBubbles||(ct.event.special.change={setup:function(){return It.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(ct.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),ct.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),ct.event.simulate("change",this,e,!0)})),!1):(ct.event.add(this,"beforeactivate._change",function(e){var t=e.target;It.test(t.nodeName)&&!ct._data(t,"changeBubbles")&&(ct.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||ct.event.simulate("change",this.parentNode,e,!0)}),ct._data(t,"changeBubbles",!0))}),void 0)},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return ct.event.remove(this,"._change"),!It.test(this.nodeName)}}),ct.support.focusinBubbles||ct.each({focus:"focusin",blur:"focusout"},function(e,t){var i=0,n=function(e){ct.event.simulate(t,e.target,ct.event.fix(e),!0)};ct.event.special[t]={setup:function(){0===i++&&J.addEventListener(e,n,!0)},teardown:function(){0===--i&&J.removeEventListener(e,n,!0)}}}),ct.fn.extend({on:function(e,i,n,s,o){var a,r;if("object"==typeof e){"string"!=typeof i&&(n=n||i,i=t);for(a in e)this.on(a,i,n,e[a],o);return this}if(null==n&&null==s?(s=i,n=i=t):null==s&&("string"==typeof i?(s=n,n=t):(s=n,n=i,i=t)),s===!1)s=u;else if(!s)return this;return 1===o&&(r=s,s=function(e){return ct().off(e),r.apply(this,arguments)},s.guid=r.guid||(r.guid=ct.guid++)),this.each(function(){ct.event.add(this,e,s,n,i)})},one:function(e,t,i,n){return this.on(e,t,i,n,1)},off:function(e,i,n){var s,o;if(e&&e.preventDefault&&e.handleObj)return s=e.handleObj,ct(e.delegateTarget).off(s.namespace?s.origType+"."+s.namespace:s.origType,s.selector,s.handler),this;if("object"==typeof e){for(o in e)this.off(o,i,e[o]);return this}return(i===!1||"function"==typeof i)&&(n=i,i=t),n===!1&&(n=u),this.each(function(){ct.event.remove(this,e,n,i)})},trigger:function(e,t){return this.each(function(){ct.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];return i?ct.event.trigger(e,t,i,!0):void 0}});var Ft=/^.[^:#\[\.,]*$/,Bt=/^(?:parents|prev(?:Until|All))/,qt=ct.expr.match.needsContext,Ut={children:!0,contents:!0,next:!0,prev:!0};ct.fn.extend({find:function(e){var t,i=[],n=this,s=n.length;if("string"!=typeof e)return this.pushStack(ct(e).filter(function(){for(t=0;s>t;t++)if(ct.contains(n[t],this))return!0}));for(t=0;s>t;t++)ct.find(e,n[t],i);return i=this.pushStack(s>1?ct.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},has:function(e){var t,i=ct(e,this),n=i.length;return this.filter(function(){for(t=0;n>t;t++)if(ct.contains(this,i[t]))return!0})},not:function(e){return this.pushStack(h(this,e||[],!0))},filter:function(e){return this.pushStack(h(this,e||[],!1))},is:function(e){return!!h(this,"string"==typeof e&&qt.test(e)?ct(e):e||[],!1).length},closest:function(e,t){for(var i,n=0,s=this.length,o=[],a=qt.test(e)||"string"!=typeof e?ct(e,t||this.context):0;s>n;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(a?a.index(i)>-1:1===i.nodeType&&ct.find.matchesSelector(i,e))){i=o.push(i);break}return this.pushStack(o.length>1?ct.unique(o):o)},index:function(e){return e?"string"==typeof e?ct.inArray(this[0],ct(e)):ct.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var i="string"==typeof e?ct(e,t):ct.makeArray(e&&e.nodeType?[e]:e),n=ct.merge(this.get(),i);return this.pushStack(ct.unique(n))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ct.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ct.dir(e,"parentNode")},parentsUntil:function(e,t,i){return ct.dir(e,"parentNode",i)},next:function(e){return d(e,"nextSibling")},prev:function(e){return d(e,"previousSibling")},nextAll:function(e){return ct.dir(e,"nextSibling")},prevAll:function(e){return ct.dir(e,"previousSibling")},nextUntil:function(e,t,i){return ct.dir(e,"nextSibling",i)},prevUntil:function(e,t,i){return ct.dir(e,"previousSibling",i)},siblings:function(e){return ct.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ct.sibling(e.firstChild)},contents:function(e){return ct.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ct.merge([],e.childNodes)}},function(e,t){ct.fn[e]=function(i,n){var s=ct.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=ct.filter(n,s)),this.length>1&&(Ut[e]||(s=ct.unique(s)),Bt.test(e)&&(s=s.reverse())),this.pushStack(s)}}),ct.extend({filter:function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?ct.find.matchesSelector(n,e)?[n]:[]:ct.find.matches(e,ct.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,i,n){for(var s=[],o=e[i];o&&9!==o.nodeType&&(n===t||1!==o.nodeType||!ct(o).is(n));)1===o.nodeType&&s.push(o),o=o[i];return s},sibling:function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i}});var Yt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Gt=/ jQuery\d+="(?:null|\d+)"/g,Xt=new RegExp("<(?:"+Yt+")[\\s/>]","i"),Vt=/^\s+/,Jt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Kt=/<([\w:]+)/,Qt=/<tbody/i,Zt=/<|&#?\w+;/,ei=/<(?:script|style|link)/i,ti=/^(?:checkbox|radio)$/i,ii=/checked\s*(?:[^=]|=\s*.checked.)/i,ni=/^$|\/(?:java|ecma)script/i,si=/^true\/(.*)/,oi=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ai={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ct.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},ri=p(J),li=ri.appendChild(J.createElement("div"));ai.optgroup=ai.option,ai.tbody=ai.tfoot=ai.colgroup=ai.caption=ai.thead,ai.th=ai.td,ct.fn.extend({text:function(e){return ct.access(this,function(e){return e===t?ct.text(this):this.empty().append((this[0]&&this[0].ownerDocument||J).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=f(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=f(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var i,n=e?ct.filter(e,this):this,s=0;null!=(i=n[s]);s++)t||1!==i.nodeType||ct.cleanData(w(i)),i.parentNode&&(t&&ct.contains(i.ownerDocument,i)&&v(w(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&ct.cleanData(w(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&ct.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return ct.clone(this,e,t)})},html:function(e){return ct.access(this,function(e){var i=this[0]||{},n=0,s=this.length;if(e===t)return 1===i.nodeType?i.innerHTML.replace(Gt,""):t;if(!("string"!=typeof e||ei.test(e)||!ct.support.htmlSerialize&&Xt.test(e)||!ct.support.leadingWhitespace&&Vt.test(e)||ai[(Kt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Jt,"<$1></$2>");try{for(;s>n;n++)i=this[n]||{},1===i.nodeType&&(ct.cleanData(w(i,!1)),i.innerHTML=e);i=0}catch(o){}}i&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=ct.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(i){var n=e[t++],s=e[t++];s&&(n&&n.parentNode!==s&&(n=this.nextSibling),ct(this).remove(),s.insertBefore(i,n))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,i){e=nt.apply([],e);var n,s,o,a,r,l,u=0,c=this.length,d=this,h=c-1,p=e[0],f=ct.isFunction(p);if(f||!(1>=c||"string"!=typeof p||ct.support.checkClone)&&ii.test(p))return this.each(function(n){var s=d.eq(n);f&&(e[0]=p.call(this,n,s.html())),s.domManip(e,t,i)});if(c&&(l=ct.buildFragment(e,this[0].ownerDocument,!1,!i&&this),n=l.firstChild,1===l.childNodes.length&&(l=n),n)){for(a=ct.map(w(l,"script"),m),o=a.length;c>u;u++)s=l,u!==h&&(s=ct.clone(s,!0,!0),o&&ct.merge(a,w(s,"script"))),t.call(this[u],s,u);if(o)for(r=a[a.length-1].ownerDocument,ct.map(a,g),u=0;o>u;u++)s=a[u],ni.test(s.type||"")&&!ct._data(s,"globalEval")&&ct.contains(r,s)&&(s.src?ct._evalUrl(s.src):ct.globalEval((s.text||s.textContent||s.innerHTML||"").replace(oi,"")));l=n=null}return this}}),ct.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ct.fn[e]=function(e){for(var i,n=0,s=[],o=ct(e),a=o.length-1;a>=n;n++)i=n===a?this:this.clone(!0),ct(o[n])[t](i),st.apply(s,i.get());return this.pushStack(s)}}),ct.extend({clone:function(e,t,i){var n,s,o,a,r,l=ct.contains(e.ownerDocument,e);if(ct.support.html5Clone||ct.isXMLDoc(e)||!Xt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(li.innerHTML=e.outerHTML,li.removeChild(o=li.firstChild)),!(ct.support.noCloneEvent&&ct.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ct.isXMLDoc(e)))for(n=w(o),r=w(e),a=0;null!=(s=r[a]);++a)n[a]&&b(s,n[a]);if(t)if(i)for(r=r||w(e),n=n||w(o),a=0;null!=(s=r[a]);a++)y(s,n[a]);else y(e,o);return n=w(o,"script"),n.length>0&&v(n,!l&&w(e,"script")),n=r=s=null,o},buildFragment:function(e,t,i,n){for(var s,o,a,r,l,u,c,d=e.length,h=p(t),f=[],m=0;d>m;m++)if(o=e[m],o||0===o)if("object"===ct.type(o))ct.merge(f,o.nodeType?[o]:o);else if(Zt.test(o)){for(r=r||h.appendChild(t.createElement("div")),l=(Kt.exec(o)||["",""])[1].toLowerCase(),c=ai[l]||ai._default,r.innerHTML=c[1]+o.replace(Jt,"<$1></$2>")+c[2],s=c[0];s--;)r=r.lastChild;if(!ct.support.leadingWhitespace&&Vt.test(o)&&f.push(t.createTextNode(Vt.exec(o)[0])),!ct.support.tbody)for(o="table"!==l||Qt.test(o)?"<table>"!==c[1]||Qt.test(o)?0:r:r.firstChild,s=o&&o.childNodes.length;s--;)ct.nodeName(u=o.childNodes[s],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(ct.merge(f,r.childNodes),r.textContent="";r.firstChild;)r.removeChild(r.firstChild);r=h.lastChild}else f.push(t.createTextNode(o));for(r&&h.removeChild(r),ct.support.appendChecked||ct.grep(w(f,"input"),_),m=0;o=f[m++];)if((!n||-1===ct.inArray(o,n))&&(a=ct.contains(o.ownerDocument,o),r=w(h.appendChild(o),"script"),a&&v(r),i))for(s=0;o=r[s++];)ni.test(o.type||"")&&i.push(o);return r=null,h},cleanData:function(e,t){for(var i,n,s,o,a=0,r=ct.expando,l=ct.cache,u=ct.support.deleteExpando,c=ct.event.special;null!=(i=e[a]);a++)if((t||ct.acceptData(i))&&(s=i[r],o=s&&l[s])){if(o.events)for(n in o.events)c[n]?ct.event.remove(i,n):ct.removeEvent(i,n,o.handle);l[s]&&(delete l[s],u?delete i[r]:typeof i.removeAttribute!==X?i.removeAttribute(r):i[r]=null,tt.push(s))}},_evalUrl:function(e){return ct.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),ct.fn.extend({wrapAll:function(e){if(ct.isFunction(e))return this.each(function(t){ct(this).wrapAll(e.call(this,t))});if(this[0]){var t=ct(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return ct.isFunction(e)?this.each(function(t){ct(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ct(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)})},wrap:function(e){var t=ct.isFunction(e);return this.each(function(i){ct(this).wrapAll(t?e.call(this,i):e)})},unwrap:function(){return this.parent().each(function(){ct.nodeName(this,"body")||ct(this).replaceWith(this.childNodes)}).end()}});var ui,ci,di,hi=/alpha\([^)]*\)/i,pi=/opacity\s*=\s*([^)]*)/,fi=/^(top|right|bottom|left)$/,mi=/^(none|table(?!-c[ea]).+)/,gi=/^margin/,vi=new RegExp("^("+dt+")(.*)$","i"),yi=new RegExp("^("+dt+")(?!px)[a-z%]+$","i"),bi=new RegExp("^([+-])=("+dt+")","i"),wi={BODY:"block"},_i={position:"absolute",visibility:"hidden",display:"block"},xi={letterSpacing:0,fontWeight:400},ki=["Top","Right","Bottom","Left"],Ci=["Webkit","O","Moz","ms"];ct.fn.extend({css:function(e,i){return ct.access(this,function(e,i,n){var s,o,a={},r=0;if(ct.isArray(i)){for(o=ci(e),s=i.length;s>r;r++)a[i[r]]=ct.css(e,i[r],!1,o);return a}return n!==t?ct.style(e,i,n):ct.css(e,i)},e,i,arguments.length>1)},show:function(){return C(this,!0)},hide:function(){return C(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){k(this)?ct(this).show():ct(this).hide()})}}),ct.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=di(e,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ct.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,i,n,s){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,r,l=ct.camelCase(i),u=e.style;if(i=ct.cssProps[l]||(ct.cssProps[l]=x(u,l)),r=ct.cssHooks[i]||ct.cssHooks[l],n===t)return r&&"get"in r&&(o=r.get(e,!1,s))!==t?o:u[i];if(a=typeof n,"string"===a&&(o=bi.exec(n))&&(n=(o[1]+1)*o[2]+parseFloat(ct.css(e,i)),a="number"),!(null==n||"number"===a&&isNaN(n)||("number"!==a||ct.cssNumber[l]||(n+="px"),ct.support.clearCloneStyle||""!==n||0!==i.indexOf("background")||(u[i]="inherit"),r&&"set"in r&&(n=r.set(e,n,s))===t)))try{u[i]=n}catch(c){}}},css:function(e,i,n,s){var o,a,r,l=ct.camelCase(i);return i=ct.cssProps[l]||(ct.cssProps[l]=x(e.style,l)),r=ct.cssHooks[i]||ct.cssHooks[l],r&&"get"in r&&(a=r.get(e,!0,n)),a===t&&(a=di(e,i,s)),"normal"===a&&i in xi&&(a=xi[i]),""===n||n?(o=parseFloat(a),n===!0||ct.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(ci=function(t){return e.getComputedStyle(t,null)},di=function(e,i,n){var s,o,a,r=n||ci(e),l=r?r.getPropertyValue(i)||r[i]:t,u=e.style;return r&&(""!==l||ct.contains(e.ownerDocument,e)||(l=ct.style(e,i)),yi.test(l)&&gi.test(i)&&(s=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=r.width,u.width=s,u.minWidth=o,u.maxWidth=a)),l}):J.documentElement.currentStyle&&(ci=function(e){return e.currentStyle},di=function(e,i,n){var s,o,a,r=n||ci(e),l=r?r[i]:t,u=e.style;return null==l&&u&&u[i]&&(l=u[i]),yi.test(l)&&!fi.test(i)&&(s=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===i?"1em":l,l=u.pixelLeft+"px",u.left=s,a&&(o.left=a)),""===l?"auto":l}),ct.each(["height","width"],function(e,t){ct.cssHooks[t]={get:function(e,i,n){return i?0===e.offsetWidth&&mi.test(ct.css(e,"display"))?ct.swap(e,_i,function(){return E(e,t,n)}):E(e,t,n):void 0},set:function(e,i,n){var s=n&&ci(e);return T(e,i,n?D(e,t,n,ct.support.boxSizing&&"border-box"===ct.css(e,"boxSizing",!1,s),s):0)}}}),ct.support.opacity||(ct.cssHooks.opacity={get:function(e,t){return pi.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var i=e.style,n=e.currentStyle,s=ct.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=n&&n.filter||i.filter||"";i.zoom=1,(t>=1||""===t)&&""===ct.trim(o.replace(hi,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===t||n&&!n.filter)||(i.filter=hi.test(o)?o.replace(hi,s):o+" "+s)}}),ct(function(){ct.support.reliableMarginRight||(ct.cssHooks.marginRight={get:function(e,t){return t?ct.swap(e,{display:"inline-block"},di,[e,"marginRight"]):void 0}}),!ct.support.pixelPosition&&ct.fn.position&&ct.each(["top","left"],function(e,t){ct.cssHooks[t]={get:function(e,i){return i?(i=di(e,t),yi.test(i)?ct(e).position()[t]+"px":i):void 0}}})}),ct.expr&&ct.expr.filters&&(ct.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!ct.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||ct.css(e,"display"))},ct.expr.filters.visible=function(e){return!ct.expr.filters.hidden(e)}),ct.each({margin:"",padding:"",border:"Width"},function(e,t){ct.cssHooks[e+t]={expand:function(i){for(var n=0,s={},o="string"==typeof i?i.split(" "):[i];4>n;n++)s[e+ki[n]+t]=o[n]||o[n-2]||o[0];return s}},gi.test(e)||(ct.cssHooks[e+t].set=T)});var Ti=/%20/g,Di=/\[\]$/,Ei=/\r?\n/g,Si=/^(?:submit|button|image|reset|file)$/i,Ni=/^(?:input|select|textarea|keygen)/i;ct.fn.extend({serialize:function(){return ct.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ct.prop(this,"elements");return e?ct.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ct(this).is(":disabled")&&Ni.test(this.nodeName)&&!Si.test(e)&&(this.checked||!ti.test(e))}).map(function(e,t){var i=ct(this).val();return null==i?null:ct.isArray(i)?ct.map(i,function(e){return{name:t.name,value:e.replace(Ei,"\r\n")}}):{name:t.name,value:i.replace(Ei,"\r\n")}}).get()}}),ct.param=function(e,i){var n,s=[],o=function(e,t){t=ct.isFunction(t)?t():null==t?"":t,s[s.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(i===t&&(i=ct.ajaxSettings&&ct.ajaxSettings.traditional),ct.isArray(e)||e.jquery&&!ct.isPlainObject(e))ct.each(e,function(){o(this.name,this.value)});else for(n in e)M(n,e[n],i,o);return s.join("&").replace(Ti,"+")},ct.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(e,t){ct.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}),ct.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)}});var Mi,zi,$i=ct.now(),Ai=/\?/,Hi=/#.*$/,Oi=/([?&])_=[^&]*/,Pi=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ii=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ji=/^(?:GET|HEAD)$/,Ri=/^\/\//,Li=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Wi=ct.fn.load,Fi={},Bi={},qi="*/".concat("*");try{zi=V.href}catch(Ui){zi=J.createElement("a"),zi.href="",zi=zi.href}Mi=Li.exec(zi.toLowerCase())||[],ct.fn.load=function(e,i,n){if("string"!=typeof e&&Wi)return Wi.apply(this,arguments);var s,o,a,r=this,l=e.indexOf(" ");return l>=0&&(s=e.slice(l,e.length),e=e.slice(0,l)),ct.isFunction(i)?(n=i,i=t):i&&"object"==typeof i&&(a="POST"),r.length>0&&ct.ajax({url:e,type:a,dataType:"html",data:i}).done(function(e){o=arguments,r.html(s?ct("<div>").append(ct.parseHTML(e)).find(s):e)}).complete(n&&function(e,t){r.each(n,o||[e.responseText,t,e])}),this},ct.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ct.fn[t]=function(e){return this.on(t,e)}}),ct.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zi,type:"GET",isLocal:Ii.test(Mi[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qi,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ct.parseJSON,"text xml":ct.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?A(A(e,ct.ajaxSettings),t):A(ct.ajaxSettings,e)},ajaxPrefilter:z(Fi),ajaxTransport:z(Bi),ajax:function(e,i){function n(e,i,n,s){var o,d,y,b,_,k=i;2!==w&&(w=2,l&&clearTimeout(l),c=t,r=s||"",x.readyState=e>0?4:0,o=e>=200&&300>e||304===e,n&&(b=H(h,x,n)),b=O(h,b,x,o),o?(h.ifModified&&(_=x.getResponseHeader("Last-Modified"),_&&(ct.lastModified[a]=_),_=x.getResponseHeader("etag"),_&&(ct.etag[a]=_)),204===e||"HEAD"===h.type?k="nocontent":304===e?k="notmodified":(k=b.state,d=b.data,y=b.error,o=!y)):(y=k,(e||!k)&&(k="error",0>e&&(e=0))),x.status=e,x.statusText=(i||k)+"",o?m.resolveWith(p,[d,k,x]):m.rejectWith(p,[x,k,y]),x.statusCode(v),v=t,u&&f.trigger(o?"ajaxSuccess":"ajaxError",[x,h,o?d:y]),g.fireWith(p,[x,k]),u&&(f.trigger("ajaxComplete",[x,h]),--ct.active||ct.event.trigger("ajaxStop")))}"object"==typeof e&&(i=e,e=t),i=i||{};var s,o,a,r,l,u,c,d,h=ct.ajaxSetup({},i),p=h.context||h,f=h.context&&(p.nodeType||p.jquery)?ct(p):ct.event,m=ct.Deferred(),g=ct.Callbacks("once memory"),v=h.statusCode||{},y={},b={},w=0,_="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!d)for(d={};t=Pi.exec(r);)d[t[1].toLowerCase()]=t[2];t=d[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?r:null},setRequestHeader:function(e,t){var i=e.toLowerCase();return w||(e=b[i]=b[i]||e,y[e]=t),this},overrideMimeType:function(e){return w||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>w)for(t in e)v[t]=[v[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||_;return c&&c.abort(t),n(0,t),this}};if(m.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,h.url=((e||h.url||zi)+"").replace(Hi,"").replace(Ri,Mi[1]+"//"),h.type=i.method||i.type||h.method||h.type,h.dataTypes=ct.trim(h.dataType||"*").toLowerCase().match(ht)||[""],null==h.crossDomain&&(s=Li.exec(h.url.toLowerCase()),h.crossDomain=!(!s||s[1]===Mi[1]&&s[2]===Mi[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(Mi[3]||("http:"===Mi[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=ct.param(h.data,h.traditional)),$(Fi,h,i,x),2===w)return x;u=h.global,u&&0===ct.active++&&ct.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!ji.test(h.type),a=h.url,h.hasContent||(h.data&&(a=h.url+=(Ai.test(a)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=Oi.test(a)?a.replace(Oi,"$1_="+$i++):a+(Ai.test(a)?"&":"?")+"_="+$i++)),h.ifModified&&(ct.lastModified[a]&&x.setRequestHeader("If-Modified-Since",ct.lastModified[a]),ct.etag[a]&&x.setRequestHeader("If-None-Match",ct.etag[a])),(h.data&&h.hasContent&&h.contentType!==!1||i.contentType)&&x.setRequestHeader("Content-Type",h.contentType),x.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+qi+"; q=0.01":""):h.accepts["*"]);for(o in h.headers)x.setRequestHeader(o,h.headers[o]);if(h.beforeSend&&(h.beforeSend.call(p,x,h)===!1||2===w))return x.abort();_="abort";for(o in{success:1,error:1,complete:1})x[o](h[o]);if(c=$(Bi,h,i,x)){x.readyState=1,u&&f.trigger("ajaxSend",[x,h]),h.async&&h.timeout>0&&(l=setTimeout(function(){x.abort("timeout")},h.timeout));try{w=1,c.send(y,n)}catch(k){if(!(2>w))throw k;n(-1,k)}}else n(-1,"No Transport");return x},getJSON:function(e,t,i){return ct.get(e,t,i,"json")},getScript:function(e,i){return ct.get(e,t,i,"script")}}),ct.each(["get","post"],function(e,i){ct[i]=function(e,n,s,o){return ct.isFunction(n)&&(o=o||s,s=n,n=t),ct.ajax({url:e,type:i,dataType:o,data:n,success:s})}}),ct.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ct.globalEval(e),e}}}),ct.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)
}),ct.ajaxTransport("script",function(e){if(e.crossDomain){var i,n=J.head||ct("head")[0]||J.documentElement;return{send:function(t,s){i=J.createElement("script"),i.async=!0,e.scriptCharset&&(i.charset=e.scriptCharset),i.src=e.url,i.onload=i.onreadystatechange=function(e,t){(t||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),i=null,t||s(200,"success"))},n.insertBefore(i,n.firstChild)},abort:function(){i&&i.onload(t,!0)}}}});var Yi=[],Gi=/(=)\?(?=&|$)|\?\?/;ct.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yi.pop()||ct.expando+"_"+$i++;return this[e]=!0,e}}),ct.ajaxPrefilter("json jsonp",function(i,n,s){var o,a,r,l=i.jsonp!==!1&&(Gi.test(i.url)?"url":"string"==typeof i.data&&!(i.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gi.test(i.data)&&"data");return l||"jsonp"===i.dataTypes[0]?(o=i.jsonpCallback=ct.isFunction(i.jsonpCallback)?i.jsonpCallback():i.jsonpCallback,l?i[l]=i[l].replace(Gi,"$1"+o):i.jsonp!==!1&&(i.url+=(Ai.test(i.url)?"&":"?")+i.jsonp+"="+o),i.converters["script json"]=function(){return r||ct.error(o+" was not called"),r[0]},i.dataTypes[0]="json",a=e[o],e[o]=function(){r=arguments},s.always(function(){e[o]=a,i[o]&&(i.jsonpCallback=n.jsonpCallback,Yi.push(o)),r&&ct.isFunction(a)&&a(r[0]),r=a=t}),"script"):void 0});var Xi,Vi,Ji=0,Ki=e.ActiveXObject&&function(){var e;for(e in Xi)Xi[e](t,!0)};ct.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&P()||I()}:P,Vi=ct.ajaxSettings.xhr(),ct.support.cors=!!Vi&&"withCredentials"in Vi,Vi=ct.support.ajax=!!Vi,Vi&&ct.ajaxTransport(function(i){if(!i.crossDomain||ct.support.cors){var n;return{send:function(s,o){var a,r,l=i.xhr();if(i.username?l.open(i.type,i.url,i.async,i.username,i.password):l.open(i.type,i.url,i.async),i.xhrFields)for(r in i.xhrFields)l[r]=i.xhrFields[r];i.mimeType&&l.overrideMimeType&&l.overrideMimeType(i.mimeType),i.crossDomain||s["X-Requested-With"]||(s["X-Requested-With"]="XMLHttpRequest");try{for(r in s)l.setRequestHeader(r,s[r])}catch(u){}l.send(i.hasContent&&i.data||null),n=function(e,s){var r,u,c,d;try{if(n&&(s||4===l.readyState))if(n=t,a&&(l.onreadystatechange=ct.noop,Ki&&delete Xi[a]),s)4!==l.readyState&&l.abort();else{d={},r=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(d.text=l.responseText);try{c=l.statusText}catch(h){c=""}r||!i.isLocal||i.crossDomain?1223===r&&(r=204):r=d.text?200:404}}catch(p){s||o(-1,p)}d&&o(r,c,d,u)},i.async?4===l.readyState?setTimeout(n):(a=++Ji,Ki&&(Xi||(Xi={},ct(e).unload(Ki)),Xi[a]=n),l.onreadystatechange=n):n()},abort:function(){n&&n(t,!0)}}}});var Qi,Zi,en=/^(?:toggle|show|hide)$/,tn=new RegExp("^(?:([+-])=|)("+dt+")([a-z%]*)$","i"),nn=/queueHooks$/,sn=[F],on={"*":[function(e,t){var i=this.createTween(e,t),n=i.cur(),s=tn.exec(t),o=s&&s[3]||(ct.cssNumber[e]?"":"px"),a=(ct.cssNumber[e]||"px"!==o&&+n)&&tn.exec(ct.css(i.elem,e)),r=1,l=20;if(a&&a[3]!==o){o=o||a[3],s=s||[],a=+n||1;do r=r||".5",a/=r,ct.style(i.elem,e,a+o);while(r!==(r=i.cur()/n)&&1!==r&&--l)}return s&&(a=i.start=+a||+n||0,i.unit=o,i.end=s[1]?a+(s[1]+1)*s[2]:+s[2]),i}]};ct.Animation=ct.extend(L,{tweener:function(e,t){ct.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var i,n=0,s=e.length;s>n;n++)i=e[n],on[i]=on[i]||[],on[i].unshift(t)},prefilter:function(e,t){t?sn.unshift(e):sn.push(e)}}),ct.Tween=B,B.prototype={constructor:B,init:function(e,t,i,n,s,o){this.elem=e,this.prop=i,this.easing=s||"swing",this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(ct.cssNumber[i]?"":"px")},cur:function(){var e=B.propHooks[this.prop];return e&&e.get?e.get(this):B.propHooks._default.get(this)},run:function(e){var t,i=B.propHooks[this.prop];return this.pos=t=this.options.duration?ct.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):B.propHooks._default.set(this),this}},B.prototype.init.prototype=B.prototype,B.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=ct.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){ct.fx.step[e.prop]?ct.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ct.cssProps[e.prop]]||ct.cssHooks[e.prop])?ct.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},B.propHooks.scrollTop=B.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ct.each(["toggle","show","hide"],function(e,t){var i=ct.fn[t];ct.fn[t]=function(e,n,s){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(q(t,!0),e,n,s)}}),ct.fn.extend({fadeTo:function(e,t,i,n){return this.filter(k).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var s=ct.isEmptyObject(e),o=ct.speed(t,i,n),a=function(){var t=L(this,ct.extend({},e),o);(s||ct._data(this,"finish"))&&t.stop(!0)};return a.finish=a,s||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,i,n){var s=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=i,i=e,e=t),i&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=ct.timers,a=ct._data(this);if(i)a[i]&&a[i].stop&&s(a[i]);else for(i in a)a[i]&&a[i].stop&&nn.test(i)&&s(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&ct.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,i=ct._data(this),n=i[e+"queue"],s=i[e+"queueHooks"],o=ct.timers,a=n?n.length:0;for(i.finish=!0,ct.queue(this,e,[]),s&&s.stop&&s.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish})}}),ct.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ct.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}}),ct.speed=function(e,t,i){var n=e&&"object"==typeof e?ct.extend({},e):{complete:i||!i&&t||ct.isFunction(e)&&e,duration:e,easing:i&&t||t&&!ct.isFunction(t)&&t};return n.duration=ct.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in ct.fx.speeds?ct.fx.speeds[n.duration]:ct.fx.speeds._default,(null==n.queue||n.queue===!0)&&(n.queue="fx"),n.old=n.complete,n.complete=function(){ct.isFunction(n.old)&&n.old.call(this),n.queue&&ct.dequeue(this,n.queue)},n},ct.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},ct.timers=[],ct.fx=B.prototype.init,ct.fx.tick=function(){var e,i=ct.timers,n=0;for(Qi=ct.now();n<i.length;n++)e=i[n],e()||i[n]!==e||i.splice(n--,1);i.length||ct.fx.stop(),Qi=t},ct.fx.timer=function(e){e()&&ct.timers.push(e)&&ct.fx.start()},ct.fx.interval=13,ct.fx.start=function(){Zi||(Zi=setInterval(ct.fx.tick,ct.fx.interval))},ct.fx.stop=function(){clearInterval(Zi),Zi=null},ct.fx.speeds={slow:600,fast:200,_default:400},ct.fx.step={},ct.expr&&ct.expr.filters&&(ct.expr.filters.animated=function(e){return ct.grep(ct.timers,function(t){return e===t.elem}).length}),ct.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){ct.offset.setOffset(this,e,t)});var i,n,s={top:0,left:0},o=this[0],a=o&&o.ownerDocument;if(a)return i=a.documentElement,ct.contains(i,o)?(typeof o.getBoundingClientRect!==X&&(s=o.getBoundingClientRect()),n=U(a),{top:s.top+(n.pageYOffset||i.scrollTop)-(i.clientTop||0),left:s.left+(n.pageXOffset||i.scrollLeft)-(i.clientLeft||0)}):s},ct.offset={setOffset:function(e,t,i){var n=ct.css(e,"position");"static"===n&&(e.style.position="relative");var s,o,a=ct(e),r=a.offset(),l=ct.css(e,"top"),u=ct.css(e,"left"),c=("absolute"===n||"fixed"===n)&&ct.inArray("auto",[l,u])>-1,d={},h={};c?(h=a.position(),s=h.top,o=h.left):(s=parseFloat(l)||0,o=parseFloat(u)||0),ct.isFunction(t)&&(t=t.call(e,i,r)),null!=t.top&&(d.top=t.top-r.top+s),null!=t.left&&(d.left=t.left-r.left+o),"using"in t?t.using.call(e,d):a.css(d)}},ct.fn.extend({position:function(){if(this[0]){var e,t,i={top:0,left:0},n=this[0];return"fixed"===ct.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ct.nodeName(e[0],"html")||(i=e.offset()),i.top+=ct.css(e[0],"borderTopWidth",!0),i.left+=ct.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-ct.css(n,"marginTop",!0),left:t.left-i.left-ct.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||K;e&&!ct.nodeName(e,"html")&&"static"===ct.css(e,"position");)e=e.offsetParent;return e||K})}}),ct.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,i){var n=/Y/.test(i);ct.fn[e]=function(s){return ct.access(this,function(e,s,o){var a=U(e);return o===t?a?i in a?a[i]:a.document.documentElement[s]:e[s]:(a?a.scrollTo(n?ct(a).scrollLeft():o,n?o:ct(a).scrollTop()):e[s]=o,void 0)},e,s,arguments.length,null)}}),ct.each({Height:"height",Width:"width"},function(e,i){ct.each({padding:"inner"+e,content:i,"":"outer"+e},function(n,s){ct.fn[s]=function(s,o){var a=arguments.length&&(n||"boolean"!=typeof s),r=n||(s===!0||o===!0?"margin":"border");return ct.access(this,function(i,n,s){var o;return ct.isWindow(i)?i.document.documentElement["client"+e]:9===i.nodeType?(o=i.documentElement,Math.max(i.body["scroll"+e],o["scroll"+e],i.body["offset"+e],o["offset"+e],o["client"+e])):s===t?ct.css(i,n,r):ct.style(i,n,s,r)},i,a?s:t,a,null)}})}),ct.fn.size=function(){return this.length},ct.fn.andSelf=ct.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=ct:(e.jQuery=e.$=ct,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ct}))}(window),/*!
 * jQuery UI Core 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/category/ui-core/
 */
function(e,t){function i(t,i){var s,o,a,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,o=s.name,t.href&&o&&"map"===s.nodeName.toLowerCase()?(a=e("img[usemap=#"+o+"]")[0],!!a&&n(a)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,o=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,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,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,o=e(this[0]);o.length&&o[0]!==document;){if(n=o.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(o.css("zIndex"),10),!isNaN(s)&&0!==s))return s;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(o,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var o="Width"===n?["Left","Right"]:["Top","Bottom"],a=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(a,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,o=e.ui[t].prototype;for(s in n)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;n<s.length;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})}(jQuery),/*!
 * jQuery UI Widget 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/jQuery.widget/
 */
function(e,t){var i=0,n=Array.prototype.slice,s=e.cleanData;e.cleanData=function(t){for(var i,n=0;null!=(i=t[n]);n++)try{e(i).triggerHandler("remove")}catch(o){}s(t)},e.widget=function(t,i,n){var s,o,a,r,l={},u=t.split(".")[0];t=t.split(".")[1],s=u+"-"+t,n||(n=i,i=e.Widget),e.expr[":"][s.toLowerCase()]=function(t){return!!e.data(t,s)},e[u]=e[u]||{},o=e[u][t],a=e[u][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new a(e,t)},e.extend(a,o,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(n,function(t,n){return e.isFunction(n)?(l[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},s=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,o=this._superApply;return this._super=e,this._superApply=s,t=n.apply(this,arguments),this._super=i,this._superApply=o,t}}(),void 0):(l[t]=n,void 0)}),a.prototype=e.widget.extend(r,{widgetEventPrefix:o?r.widgetEventPrefix:t},l,{constructor:a,namespace:u,widgetName:t,widgetFullName:s}),o?(e.each(o._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,a,i._proto)}),delete o._childConstructors):i._childConstructors.push(a),e.widget.bridge(t,a)},e.widget.extend=function(i){for(var s,o,a=n.call(arguments,1),r=0,l=a.length;l>r;r++)for(s in a[r])o=a[r][s],a[r].hasOwnProperty(s)&&o!==t&&(i[s]=e.isPlainObject(o)?e.isPlainObject(i[s])?e.widget.extend({},i[s],o):e.widget.extend({},o):o);return i},e.widget.bridge=function(i,s){var o=s.prototype.widgetFullName||i;e.fn[i]=function(a){var r="string"==typeof a,l=n.call(arguments,1),u=this;return a=!r&&l.length?e.widget.extend.apply(null,[a].concat(l)):a,r?this.each(function(){var n,s=e.data(this,o);return s?e.isFunction(s[a])&&"_"!==a.charAt(0)?(n=s[a].apply(s,l),n!==s&&n!==t?(u=n&&n.jquery?u.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+a+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var t=e.data(this,o);t?t.option(a||{})._init():e.data(this,o,new s(a,this))}),u}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,n){var s,o,a,r=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(r={},s=i.split("."),i=s.shift(),s.length){for(o=r[i]=e.widget.extend({},this.options[i]),a=0;a<s.length-1;a++)o[s[a]]=o[s[a]]||{},o=o[s[a]];if(i=s.pop(),n===t)return o[i]===t?null:o[i];o[i]=n}else{if(n===t)return this.options[i]===t?null:this.options[i];r[i]=n}return this._setOptions(r),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,i,n){var s,o=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=s=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),e.each(n,function(n,a){function r(){return t||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+o.eventNamespace,c=l[2];c?s.delegate(c,u,r):i.bind(u,r)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,n){var s,o,a=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(e.isFunction(a)&&a.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,s,o){"string"==typeof s&&(s={effect:s});var a,r=s?s===!0||"number"==typeof s?i:s.effect||i:t;s=s||{},"number"==typeof s&&(s={duration:s}),a=!e.isEmptyObject(s),s.complete=o,s.delay&&n.delay(s.delay),a&&e.effects&&e.effects.effect[r]?n[t](s):r!==t&&n[r]?n[r](s.duration,s.easing,o):n.queue(function(i){e(this)[t](),o&&o.call(n[0]),i()})}})}(jQuery),/*!
 * jQuery UI Button 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/button/
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
function(e){var t,i,n,s,o="ui-button ui-widget ui-state-default ui-corner-all",a="ui-state-hover ui-state-active ",r="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",l=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},u=function(t){var i=t.name,n=t.form,s=e([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,l),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var a=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,d=c?"":"ui-state-active",h="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===t&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||e(this).removeClass(d)}).bind("click"+this.eventNamespace,function(e){r.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){a.buttonElement.addClass(h)}).bind("blur"+this.eventNamespace,function(){a.buttonElement.removeClass(h)}),c&&(this.element.bind("change"+this.eventNamespace,function(){s||a.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(e){r.disabled||(s=!1,i=e.pageX,n=e.pageY)}).bind("mouseup"+this.eventNamespace,function(e){r.disabled||(i!==e.pageX||n!==e.pageY)&&(s=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||s?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||s)return!1;e(this).addClass("ui-state-active"),a.buttonElement.attr("aria-pressed","true");var t=a.element[0];u(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(e(this).addClass("ui-state-active"),t=this,a.document.one("mouseup",function(){t=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(e(this).removeClass("ui-state-active"),void 0)}).bind("keydown"+this.eventNamespace,function(t){return r.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),void 0)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+a+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(t?this.element.prop("disabled",!0):this.element.prop("disabled",!1),void 0):(this._resetButton(),void 0)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?u(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var t=this.buttonElement.removeClass(r),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),n=this.options.icons,s=n.primary&&n.secondary,o=[];n.primary||n.secondary?(this.options.text&&o.push("ui-button-text-icon"+(s?"s":n.primary?"-primary":"-secondary")),n.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(o.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):o.push("ui-button-text-only"),t.addClass(o.join(" "))}}),e.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),/*!
 * jQuery UI Mouse 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/mouse/
 *
 * Depends:
 *	jquery.ui.widget.js
 */
function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var n=this,s=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),/*!
 * jQuery UI Draggable 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/draggable/
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.3",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,drag:null,start:null,stop:null},_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(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e("<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(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(this._trigger("drag",t,n)===!1)return this._mouseUp({}),!1;this.position=n.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,n=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.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 t,i,n,s=this.options;return s.containment?"window"===s.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===s.containment?(this.containment=[0,0,e(document).width()-this.helperProportions.width-this.margins.left,(e(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):s.containment.constructor===Array?(this.containment=s.containment,void 0):("parent"===s.containment&&(s.containment=this.helper[0].parentNode),i=e(s.containment),n=i[0],n&&(t="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:s.scrollTop(),left:s.scrollLeft()}),{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*n}},_generatePosition:function(t){var i,n,s,o,a=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=t.pageX,u=t.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(n=this.relative_container.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(u=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(u=i[3]+this.offset.click.top)),a.grid&&(s=a.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,u=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-a.grid[1]:s+a.grid[1]:s,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_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(t,i,n){return n=n||this._uiHash(),e.ui.plugin.call(this,t,[i,n]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var n=e(this).data("ui-draggable"),s=n.options,o=e.extend({},i,{item:n.element});n.sortables=[],e(s.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(n.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,o))})},stop:function(t,i){var n=e(this).data("ui-draggable"),s=e.extend({},i,{item:n.element});e.each(n.sortables,function(){this.instance.isOver?(this.instance.isOver=0,n.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===n.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,s))})},drag:function(t,i){var n=e(this).data("ui-draggable"),s=this;e.each(n.sortables,function(){var o=!1,a=this;this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,e.each(n.sortables,function(){return this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this!==a&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(s).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=n.offset.click.top,this.instance.offset.click.left=n.offset.click.left,this.instance.offset.parent.left-=n.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=n.offset.parent.top-this.instance.offset.parent.top,n._trigger("toSortable",t),n.dropped=this.instance.element,n.currentItem=n.element,this.instance.fromOutside=n),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),n._trigger("fromSortable",t),n.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var n=e(i.helper),s=e(this).data("ui-draggable").options;n.css("opacity")&&(s._opacity=n.css("opacity")),n.css("opacity",s.opacity)},stop:function(t,i){var n=e(this).data("ui-draggable").options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),n=i.options,s=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?i.scrollParent[0].scrollTop=s=i.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-i.overflowOffset.top<n.scrollSensitivity&&(i.scrollParent[0].scrollTop=s=i.scrollParent[0].scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?i.scrollParent[0].scrollLeft=s=i.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-i.overflowOffset.left<n.scrollSensitivity&&(i.scrollParent[0].scrollLeft=s=i.scrollParent[0].scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(t.pageY-e(document).scrollTop()<n.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<n.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(t.pageX-e(document).scrollLeft()<n.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<n.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+n.scrollSpeed)))),s!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=e(this),n=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:n.top,left:n.left})})},drag:function(t,i){var n,s,o,a,r,l,u,c,d,h,p=e(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,y=i.offset.top,b=y+p.helperProportions.height;for(d=p.snapElements.length-1;d>=0;d--)r=p.snapElements[d].left,l=r+p.snapElements[d].width,u=p.snapElements[d].top,c=u+p.snapElements[d].height,r-m>v||g>l+m||u-m>b||y>c+m||!e.contains(p.snapElements[d].item.ownerDocument,p.snapElements[d].item)?(p.snapElements[d].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[d].item})),p.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=Math.abs(u-b)<=m,s=Math.abs(c-y)<=m,o=Math.abs(r-v)<=m,a=Math.abs(l-g)<=m,n&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),s&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),h=n||s||o||a,"outer"!==f.snapMode&&(n=Math.abs(u-y)<=m,s=Math.abs(c-b)<=m,o=Math.abs(r-g)<=m,a=Math.abs(l-v)<=m,n&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),s&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[d].snapping&&(n||s||o||a||h)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[d].item})),p.snapElements[d].snapping=n||s||o||a||h)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,n=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});n.length&&(t=parseInt(e(n[0]).css("zIndex"),10)||0,e(n).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+n.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var n=e(i.helper),s=e(this).data("ui-draggable").options;n.css("zIndex")&&(s._zIndex=n.css("zIndex")),n.css("zIndex",s.zIndex)},stop:function(t,i){var n=e(this).data("ui-draggable").options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}})}(jQuery),/*!
 * jQuery UI Position 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/position/
 */
function(e,t){function i(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function n(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var o,a=Math.max,r=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(o!==t)return o;var i,n,s=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=s.children()[0];return e("body").append(s),i=a.offsetWidth,s.css("overflow","scroll"),n=a.offsetWidth,i===n&&(n=s[0].clientWidth),s.remove(),o=i-n},getScrollInfo:function(t){var i=t.isWindow?"":t.element.css("overflow-x"),n=t.isWindow?"":t.element.css("overflow-y"),s="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,o="scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight;return{width:o?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=e.isWindow(i[0]);return{element:i,isWindow:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return f.apply(this,arguments);t=e.extend({},t);var o,p,m,g,v,y,b=e(t.of),w=e.position.getWithinInfo(t.within),_=e.position.getScrollInfo(w),x=(t.collision||"flip").split(" "),k={};return y=s(b),b[0].preventDefault&&(t.at="left top"),p=y.width,m=y.height,g=y.offset,v=e.extend({},g),e.each(["my","at"],function(){var e,i,n=(t[this]||"").split(" ");1===n.length&&(n=u.test(n[0])?n.concat(["center"]):c.test(n[0])?["center"].concat(n):["center","center"]),n[0]=u.test(n[0])?n[0]:"center",n[1]=c.test(n[1])?n[1]:"center",e=d.exec(n[0]),i=d.exec(n[1]),k[this]=[e?e[0]:0,i?i[0]:0],t[this]=[h.exec(n[0])[0],h.exec(n[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===t.at[0]?v.left+=p:"center"===t.at[0]&&(v.left+=p/2),"bottom"===t.at[1]?v.top+=m:"center"===t.at[1]&&(v.top+=m/2),o=i(k.at,p,m),v.left+=o[0],v.top+=o[1],this.each(function(){var s,u,c=e(this),d=c.outerWidth(),h=c.outerHeight(),f=n(this,"marginLeft"),y=n(this,"marginTop"),C=d+f+n(this,"marginRight")+_.width,T=h+y+n(this,"marginBottom")+_.height,D=e.extend({},v),E=i(k.my,c.outerWidth(),c.outerHeight());"right"===t.my[0]?D.left-=d:"center"===t.my[0]&&(D.left-=d/2),"bottom"===t.my[1]?D.top-=h:"center"===t.my[1]&&(D.top-=h/2),D.left+=E[0],D.top+=E[1],e.support.offsetFractions||(D.left=l(D.left),D.top=l(D.top)),s={marginLeft:f,marginTop:y},e.each(["left","top"],function(i,n){e.ui.position[x[i]]&&e.ui.position[x[i]][n](D,{targetWidth:p,targetHeight:m,elemWidth:d,elemHeight:h,collisionPosition:s,collisionWidth:C,collisionHeight:T,offset:[o[0]+E[0],o[1]+E[1]],my:t.my,at:t.at,within:w,elem:c})}),t.using&&(u=function(e){var i=g.left-D.left,n=i+p-d,s=g.top-D.top,o=s+m-h,l={target:{element:b,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:D.left,top:D.top,width:d,height:h},horizontal:0>n?"left":i>0?"right":"center",vertical:0>o?"top":s>0?"bottom":"middle"};d>p&&r(i+n)<p&&(l.horizontal="center"),h>m&&r(s+o)<m&&(l.vertical="middle"),l.important=a(r(i),r(n))>a(r(s),r(o))?"horizontal":"vertical",t.using.call(this,e,l)}),c.offset(e.extend(D,{using:u}))})},e.ui.position={fit:{left:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,r=e.left-t.collisionPosition.marginLeft,l=s-r,u=r+t.collisionWidth-o-s;t.collisionWidth>o?l>0&&0>=u?(i=e.left+l+t.collisionWidth-o-s,e.left+=l-i):e.left=u>0&&0>=l?s:l>u?s+o-t.collisionWidth:s:l>0?e.left+=l:u>0?e.left-=u:e.left=a(e.left-r,e.left)},top:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollTop:n.offset.top,o=t.within.height,r=e.top-t.collisionPosition.marginTop,l=s-r,u=r+t.collisionHeight-o-s;t.collisionHeight>o?l>0&&0>=u?(i=e.top+l+t.collisionHeight-o-s,e.top+=l-i):e.top=u>0&&0>=l?s:l>u?s+o-t.collisionHeight:s:l>0?e.top+=l:u>0?e.top-=u:e.top=a(e.top-r,e.top)}},flip:{left:function(e,t){var i,n,s=t.within,o=s.offset.left+s.scrollLeft,a=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,u=e.left-t.collisionPosition.marginLeft,c=u-l,d=u+t.collisionWidth-a-l,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>c?(i=e.left+h+p+f+t.collisionWidth-a-o,(0>i||i<r(c))&&(e.left+=h+p+f)):d>0&&(n=e.left-t.collisionPosition.marginLeft+h+p+f-l,(n>0||r(n)<d)&&(e.left+=h+p+f))},top:function(e,t){var i,n,s=t.within,o=s.offset.top+s.scrollTop,a=s.height,l=s.isWindow?s.scrollTop:s.offset.top,u=e.top-t.collisionPosition.marginTop,c=u-l,d=u+t.collisionHeight-a-l,h="top"===t.my[1],p=h?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>c?(n=e.top+p+f+m+t.collisionHeight-a-o,e.top+p+f+m>c&&(0>n||n<r(c))&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-l,e.top+p+f+m>d&&(i>0||r(i)<d)&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,n,s,o,a=document.getElementsByTagName("body")[0],r=document.createElement("div");t=document.createElement(a?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&e.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in n)t.style[o]=n[o];t.appendChild(r),i=a||document.documentElement,i.insertBefore(t,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",s=e(r).offset().left,e.support.offsetFractions=s>10&&11>s,t.innerHTML="",i.removeChild(t)}()}(jQuery),/*!
 * jQuery UI Resizable 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/resizable/
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.3",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:90,resize:null,start:null,stop:null},_create:function(){var t,i,n,s,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-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=r.handles||(e(".ui-resizable-handle",this.element).length?{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"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;i<t.length;i++)n=e.trim(t[i]),o="ui-resizable-"+n,s=e("<div class='ui-resizable-handle "+o+"'></div>"),s.css({zIndex:r.zIndex}),"se"===n&&s.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[n]=".ui-resizable-"+n,this.element.append(s);this._renderAxis=function(t){var i,n,s,o;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(n=e(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(s,o),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=s&&s[1]?s[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(e(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,n,s=!1;for(i in this.handles)n=e(this.handles[i])[0],(n===t.target||e.contains(n,t.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(i){var n,s,o,a=this.options,r=this.element.position(),l=this.element;return this.resizing=!0,/absolute/.test(l.css("position"))?l.css({position:"absolute",top:l.css("top"),left:l.css("left")}):l.is(".ui-draggable")&&l.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),n=t(this.helper.css("left")),s=t(this.helper.css("top")),a.containment&&(n+=e(a.containment).scrollLeft()||0,s+=e(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:s},this.size=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalSize=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalPosition={left:n,top:s},this.sizeDiff={width:l.outerWidth()-l.width(),height:l.outerHeight()-l.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===o?this.axis+"-resize":o),l.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i,n=this.helper,s={},o=this.originalMousePosition,a=this.axis,r=this.position.top,l=this.position.left,u=this.size.width,c=this.size.height,d=t.pageX-o.left||0,h=t.pageY-o.top||0,p=this._change[a];return p?(i=p.apply(this,[t,d,h]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==r&&(s.top=this.position.top+"px"),this.position.left!==l&&(s.left=this.position.left+"px"),this.size.width!==u&&(s.width=this.size.width+"px"),this.size.height!==c&&(s.height=this.size.height+"px"),n.css(s),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(s)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,n,s,o,a,r,l,u=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),s=n&&e.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=n?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-s},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,l=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,u.animate||this.element.css(e.extend(a,{top:l,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!u.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,n,s,o,a,r=this.options;a={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,s=a.minWidth/this.aspectRatio,n=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),s>a.minHeight&&(a.minHeight=s),n<a.maxWidth&&(a.maxWidth=n),o<a.maxHeight&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,n=this.size,s=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===s&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"===s&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,n=this.axis,s=i(e.width)&&t.maxWidth&&t.maxWidth<e.width,o=i(e.height)&&t.maxHeight&&t.maxHeight<e.height,a=i(e.width)&&t.minWidth&&t.minWidth>e.width,r=i(e.height)&&t.minHeight&&t.minHeight>e.height,l=this.originalPosition.left+this.originalSize.width,u=this.position.top+this.size.height,c=/sw|nw|w/.test(n),d=/nw|ne|n/.test(n);return a&&(e.width=t.minWidth),r&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),o&&(e.height=t.maxHeight),a&&c&&(e.left=l-t.minWidth),s&&c&&(e.left=l-t.maxWidth),r&&d&&(e.top=u-t.minHeight),o&&d&&(e.top=u-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,n,s,o=this.helper||this.element;for(e=0;e<this._proportionallyResizeElements.length;e++){if(s=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[s.css("borderTopWidth"),s.css("borderRightWidth"),s.css("borderBottomWidth"),s.css("borderLeftWidth")],n=[s.css("paddingTop"),s.css("paddingRight"),s.css("paddingBottom"),s.css("paddingLeft")],t=0;t<i.length;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(n[t],10)||0);s.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,n=this.originalPosition;return{left:n.left+t,width:i.width-t}},n:function(e,t,i){var n=this.originalSize,s=this.originalPosition;return{top:s.top+i,height:n.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},sw:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,n]))},ne:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},nw:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,n]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("ui-resizable"),n=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),a=o&&e.ui.hasScroll(s[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,l={width:i.size.width-r,height:i.size.height-a},u=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(l,c&&u?{top:c,left:u}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i,n,s,o,a,r,l,u=e(this).data("ui-resizable"),c=u.options,d=u.element,h=c.containment,p=h instanceof e?h.get(0):/parent/.test(h)?d.parent().get(0):h;p&&(u.containerElement=e(p),/document/.test(h)||h===document?(u.containerOffset={left:0,top:0},u.containerPosition={left:0,top:0},u.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),n=[],e(["Top","Right","Left","Bottom"]).each(function(e,s){n[e]=t(i.css("padding"+s))}),u.containerOffset=i.offset(),u.containerPosition=i.position(),u.containerSize={height:i.innerHeight()-n[3],width:i.innerWidth()-n[1]},s=u.containerOffset,o=u.containerSize.height,a=u.containerSize.width,r=e.ui.hasScroll(p,"left")?p.scrollWidth:a,l=e.ui.hasScroll(p)?p.scrollHeight:o,u.parentData={element:p,left:s.left,top:s.top,width:r,height:l}))},resize:function(t){var i,n,s,o,a=e(this).data("ui-resizable"),r=a.options,l=a.containerOffset,u=a.position,c=a._aspectRatio||t.shiftKey,d={top:0,left:0},h=a.containerElement;h[0]!==document&&/static/.test(h.css("position"))&&(d=l),u.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-d.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?l.left:0),u.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=a._helper?l.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-d.left:a.offset.left-d.left)+a.sizeDiff.width),n=Math.abs((a._helper?a.offset.top-d.top:a.offset.top-l.top)+a.sizeDiff.height),s=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),s&&o&&(i-=a.parentData.left),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio)),n+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-n,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),i=t.options,n=t.containerOffset,s=t.containerPosition,o=t.containerElement,a=e(t.helper),r=a.offset(),l=a.outerWidth()-t.sizeDiff.width,u=a.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(o.css("position"))&&e(this).css({left:r.left-s.left-n.left,width:l,height:u}),t._helper&&!i.animate&&/static/.test(o.css("position"))&&e(this).css({left:r.left-s.left-n.left,width:l,height:u})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,n=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?n(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],n(i.alsoResize)):e.each(i.alsoResize,function(e){n(e)})},resize:function(t,i){var n=e(this).data("ui-resizable"),s=n.options,o=n.originalSize,a=n.originalPosition,r={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-a.top||0,left:n.position.left-a.left||0},l=function(t,n){e(t).each(function(){var t=e(this),s=e(this).data("ui-resizable-alsoresize"),o={},a=n&&n.length?n:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(a,function(e,t){var i=(s[t]||0)+(r[t]||0);i&&i>=0&&(o[t]=i||null)}),t.css(o)})};"object"!=typeof s.alsoResize||s.alsoResize.nodeType?l(s.alsoResize):e.each(s.alsoResize,function(e,t){l(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,n=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),i=t.options,n=t.size,s=t.originalSize,o=t.originalPosition,a=t.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=r[0]||1,u=r[1]||1,c=Math.round((n.width-s.width)/l)*l,d=Math.round((n.height-s.height)/u)*u,h=s.width+c,p=s.height+d,f=i.maxWidth&&i.maxWidth<h,m=i.maxHeight&&i.maxHeight<p,g=i.minWidth&&i.minWidth>h,v=i.minHeight&&i.minHeight>p;i.grid=r,g&&(h+=l),v&&(p+=u),f&&(h-=l),m&&(p-=u),/^(se|s|e)$/.test(a)?(t.size.width=h,t.size.height=p):/^(ne)$/.test(a)?(t.size.width=h,t.size.height=p,t.position.top=o.top-d):/^(sw)$/.test(a)?(t.size.width=h,t.size.height=p,t.position.left=o.left-c):(t.size.width=h,t.size.height=p,t.position.top=o.top-d,t.position.left=o.left-c)}})}(jQuery),/*!
 * jQuery UI Dialog 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/dialog/
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *  jquery.ui.button.js
 *	jquery.ui.draggable.js
 *	jquery.ui.mouse.js
 *	jquery.ui.position.js
 *	jquery.ui.resizable.js
 */
function(e){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i=this;this._isOpen&&this._trigger("beforeClose",t)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||e(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",e),i},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._trigger("open"),void 0)},_focusTabbable:function(){var e=this.element.find("[autofocus]");e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),void 0;if(t.keyCode===e.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),s=i.filter(":last");t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==n[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(s.focus(1),t.preventDefault()):(n.focus(1),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(e.each(i,function(i,n){var s,o;n=e.isFunction(n)?{click:n,text:i}:n,n=e.extend({type:"button"},n),s=n.click,n.click=function(){s.apply(t.element[0],arguments)},o={icons:n.icons,text:n.showText},delete n.icons,delete n.showText,e("<button></button>",n).button(o).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,s){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,t(s))},drag:function(e,n){i._trigger("drag",e,t(n))},stop:function(s,o){n.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,t(o))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,n=this.options,s=n.resizable,o=this.uiDialog.css("position"),a="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:a,start:function(n,s){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,t(s))},resize:function(e,n){i._trigger("resize",e,t(n))},stop:function(s,o){n.height=e(this).height(),n.width=e(this).width(),e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,t(o))}}).css("position",o)},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(n){var s=this,o=!1,a={};e.each(n,function(e,n){s._setOption(e,n),e in t&&(o=!0),e in i&&(a[e]=n)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(e,t){var i,n,s=this.uiDialog;"dialogClass"===e&&s.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!t&&s.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=s.is(":data(ui-resizable)"),n&&!t&&s.resizable("destroy"),n&&"string"==typeof t&&s.resizable("option","handles",t),n||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),e=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),t=Math.max(0,n.minHeight-e),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-e):"none","auto"===n.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=this,i=this.widgetFullName;e.ui.dialog.overlayInstances||this._delay(function(){e.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(n){t._allowInteraction(n)||(n.preventDefault(),e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),e.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(e.ui.dialog.overlayInstances--,e.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),e.ui.dialog.overlayInstances=0,e.uiBackCompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{_position:function(){var t,i=this.options.position,n=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(n=i.split?i.split(" "):[i[0],i[1]],1===n.length&&(n[1]=n[0]),e.each(["left","top"],function(e,t){+n[e]===n[e]&&(s[e]=n[e],n[e]=t)}),i={my:n[0]+(s[0]<0?s[0]:"+"+s[0])+" "+n[1]+(s[1]<0?s[1]:"+"+s[1]),at:n.join(" ")}),i=e.extend({},e.ui.dialog.prototype.options.position,i)):i=e.ui.dialog.prototype.options.position,t=this.uiDialog.is(":visible"),t||this.uiDialog.show(),this.uiDialog.position(i),t||this.uiDialog.hide()}})}(jQuery),/*!
 * jQuery UI Tabs 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/tabs/
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
function(e,t){function i(){return++s}function n(e){return e.hash.length>1&&decodeURIComponent(e.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var s=0,o=/#.*$/;e.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===t&&(n&&this.tabs.each(function(i,s){return e(s).attr("aria-controls")===n?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),n=this.tabs.index(i),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:n++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:s=!1,n--;break;case e.ui.keyCode.END:n=this.anchors.length-1;break;case e.ui.keyCode.HOME:n=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(n),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,s),t.ctrlKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function n(){return t>s&&(t=0),0>t&&(t=s),t}for(var s=this.tabs.length-1;-1!==e.inArray(n(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):"disabled"===e?(this._setupDisabled(t),void 0):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t),void 0)},_tabId:function(e){return e.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var o,a,r,l=e(s).uniqueId().attr("id"),u=e(s).closest("li"),c=u.attr("aria-controls");n(s)?(o=s.hash,a=t.element.find(t._sanitizeSelector(o))):(r=t._tabId(u),o="#"+r,a=t.element.find(o),a.length||(a=t._createPanel(r),a.insertAfter(t.panels[i-1]||t.tablist)),a.attr("aria-live","polite")),a.length&&(t.panels=t.panels.add(a)),c&&u.data("ui-tabs-aria-controls",c),u.attr({"aria-controls":o.substring(1),"aria-labelledby":l}),a.attr("aria-labelledby",l)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,n=0;i=this.tabs[n];n++)t===!0||-1!==e.inArray(n,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,n=this.element.parent();"fill"===t?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),n=t.css("position");"absolute"!==n&&"fixed"!==n&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,n=this.active,s=e(t.currentTarget),o=s.closest("li"),a=o[0]===n[0],r=a&&i.collapsible,l=r?e():this._getPanelForTab(o),u=n.length?this._getPanelForTab(n):e(),c={oldTab:n,oldPanel:u,newTab:r?e():o,newPanel:l};t.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",t,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?e():o,this.xhr&&this.xhr.abort(),u.length||l.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),t),this._toggle(t,c))},_toggle:function(t,i){function n(){o.running=!1,o._trigger("activate",t,i)}function s(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,n):(a.show(),n())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),s()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var i,n=this._findActive(t);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var n=this.options.disabled;n!==!1&&(i===t?n=!1:(i=this._getIndex(i),n=e.isArray(n)?e.map(n,function(e){return e!==i?e:null}):e.map(this.tabs,function(e,t){return t!==i?t:null})),this._setupDisabled(n))},disable:function(i){var n=this.options.disabled;if(n!==!0){if(i===t)n=!0;else{if(i=this._getIndex(i),-1!==e.inArray(i,n))return;n=e.isArray(n)?e.merge([i],n).sort():[i]}this._setupDisabled(n)}},load:function(t,i){t=this._getIndex(t);var s=this,o=this.tabs.eq(t),a=o.find(".ui-tabs-anchor"),r=this._getPanelForTab(o),l={tab:o,panel:r};n(a[0])||(this.xhr=e.ajax(this._ajaxSettings(a,i,l)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){r.html(e),s._trigger("load",i,l)},1)}).complete(function(e,t){setTimeout(function(){"abort"===t&&s.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),e===s.xhr&&delete s.xhr},1)})))},_ajaxSettings:function(t,i,n){var s=this;return{url:t.attr("href"),beforeSend:function(t,o){return s._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:o},n))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),/*!
 * jQuery UI Droppable 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/droppable/
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	jquery.ui.mouse.js
 *	jquery.ui.draggable.js
 */
function(e){function t(e,t,i){return e>t&&t+i>e}e.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=e.ui.ddmanager.droppables[this.options.scope];t<i.length;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"===t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var n=i||e.ui.ddmanager.current,s=!1;return n&&(n.currentItem||n.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===n.options.scope&&t.accept.call(t.element[0],n.currentItem||n.element)&&e.ui.intersect(n,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(s=!0,!1):void 0}),s?!1:this.accept.call(this.element[0],n.currentItem||n.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(n)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(e,i,n){if(!i.offset)return!1;var s,o,a=(e.positionAbs||e.position.absolute).left,r=a+e.helperProportions.width,l=(e.positionAbs||e.position.absolute).top,u=l+e.helperProportions.height,c=i.offset.left,d=c+i.proportions.width,h=i.offset.top,p=h+i.proportions.height;switch(n){case"fit":return a>=c&&d>=r&&l>=h&&p>=u;case"intersect":return c<a+e.helperProportions.width/2&&r-e.helperProportions.width/2<d&&h<l+e.helperProportions.height/2&&u-e.helperProportions.height/2<p;case"pointer":return s=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,o=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,t(o,h,i.proportions.height)&&t(s,c,i.proportions.width);case"touch":return(l>=h&&p>=l||u>=h&&p>=u||h>l&&u>p)&&(a>=c&&d>=a||r>=c&&d>=r||c>a&&r>d);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var n,s,o=e.ui.ddmanager.droppables[t.options.scope]||[],a=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(n=0;n<o.length;n++)if(!(o[n].options.disabled||t&&!o[n].accept.call(o[n].element[0],t.currentItem||t.element))){for(s=0;s<r.length;s++)if(r[s]===o[n].element[0]){o[n].proportions.height=0;continue e}o[n].visible="none"!==o[n].element.css("display"),o[n].visible&&("mousedown"===a&&o[n]._activate.call(o[n],i),o[n].offset=o[n].element.offset(),o[n].proportions={width:o[n].element[0].offsetWidth,height:o[n].element[0].offsetHeight})}},drop:function(t,i){var n=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),n},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,s,o,a=e.ui.intersect(t,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(s=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return e.data(this,"ui-droppable").options.scope===s}),o.length&&(n=e.data(o[0],"ui-droppable"),n.greedyChild="isover"===r)),n&&"isover"===r&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),n&&"isout"===r&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}}(jQuery),/*!
 * jQuery UI Datepicker 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/datepicker/
 *
 * Depends:
 *	jquery.ui.core.js
 */
function(e,t){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!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"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!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,disabled:!1},e.extend(this._defaults,this.regional[""]),this.dpDiv=n(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){e.datepicker._isDisabledDatepicker(o.inline?t.parent()[0]:o.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))})}function s(t,i){e.extend(t,i);for(var n in i)null==i[n]&&(t[n]=i[n]);return t}e.extend(e.ui,{datepicker:{version:"1.10.3"}});var o,a="datepicker";e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return s(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var n,s,o;n=t.nodeName.toLowerCase(),s="div"===n||"span"===n,t.id||(this.uuid+=1,t.id="dp"+this.uuid),o=this._newInst(e(t),s),o.settings=e.extend({},i||{}),"input"===n?this._connectDatepicker(t,o):s&&this._inlineDatepicker(t,o)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var n=e(t);i.append=e([]),i.trigger=e([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,a,i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var n,s,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=e("<span class='"+this._appendClass+"'>"+a+"</span>"),t[r?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&t.focus(this._showDatepicker),("button"===n||"both"===n)&&(s=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):e("<button type='button'></button>").addClass(this._triggerClass).html(o?e("<img/>").attr({src:o,alt:s,title:s}):s)),t[r?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,n,s,o=new Date(2009,11,20),a=this._get(e,"dateFormat");a.match(/[DM]/)&&(t=function(e){for(i=0,n=0,s=0;s<e.length;s++)e[s].length>i&&(i=e[s].length,n=s);return n},o.setMonth(t(this._get(e,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(t(this._get(e,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),e.input.attr("size",this._formatDate(e,o).length)}},_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),e.data(t,a,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,n,o,r){var l,u,c,d,h,p=this._dialogInst;return p||(this.uuid+=1,l="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+l+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],a,p)),s(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(u=document.documentElement.clientWidth,c=document.documentElement.clientHeight,d=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[u/2-100+d,c/2-150+h]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],a,p),this},_destroyDatepicker:function(t){var i,n=e(t),s=e.data(t,a);n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,a),"input"===i?(s.append.remove(),s.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,n,s=e(t),o=e.data(t,a);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,n,s=e(t),o=e.data(t,a);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,a)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,n,o){var a,r,l,u,c=this._getInst(i);return 2===arguments.length&&"string"==typeof n?"defaults"===n?e.extend({},e.datepicker._defaults):c?"all"===n?e.extend({},c.settings):this._get(c,n):null:(a=n||{},"string"==typeof n&&(a={},a[n]=o),c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(i,!0),l=this._getMinMaxDate(c,"min"),u=this._getMinMaxDate(c,"max"),s(c.settings,a),null!==l&&a.dateFormat!==t&&a.minDate===t&&(c.settings.minDate=this._formatDate(c,l)),null!==u&&a.dateFormat!==t&&a.maxDate===t&&(c.settings.maxDate=this._formatDate(c,u)),"disabled"in a&&(a.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c)),void 0)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,n,s,o=e.datepicker._getInst(t.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),a=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",o.dpDiv),s[0]&&e.datepicker._selectDay(t.target,o.selectedMonth,o.selectedYear,s[0]),i=e.datepicker._get(o,"onSelect"),i?(n=e.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[n,o])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),a=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),a=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?1:-1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(o,"stepBigMonths"):-e.datepicker._get(o,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),a=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?-1:1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(o,"stepBigMonths"):+e.datepicker._get(o,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),a=t.ctrlKey||t.metaKey;break;default:a=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):a=!1;a&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,n,s=e.datepicker._getInst(t.target);return e.datepicker._get(s,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(s,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">n||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(t){var i,n=e.datepicker._getInst(t.target);if(n.input.val()!==n.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,e.datepicker._getFormatConfig(n)),i&&(e.datepicker._setDateFromField(n),e.datepicker._updateAlternate(n),e.datepicker._updateDatepicker(n))}catch(s){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,o,a,r,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,"beforeShow"),o=n?n.apply(t,[t,i]):{},o!==!1&&(s(i.settings,o),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),a=!1,e(t).parents().each(function(){return a|="fixed"===e(this).css("position"),!a}),r={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),r=e.datepicker._checkOffset(i,r,a),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":a?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,o=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,n=this._getNumberOfMonths(t),s=n[1],a=17;t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",a*s+"em"),t.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,n){var s=t.dpDiv.outerWidth(),o=t.dpDiv.outerHeight(),a=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),u=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-a:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+r?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+o>u&&u>o?Math.abs(o+r):0),i},_findPos:function(t){for(var i,n=this._getInst(t),s=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,n,s,o,r=this._curInst;!r||t&&r!==e.data(t,a)||this._datepickerShowing&&(i=this._get(r,"showAnim"),n=this._get(r,"duration"),s=function(){e.datepicker._tidyDialog(r)},e.effects&&(e.effects.effect[i]||e.effects[i])?r.dpDiv.hide(i,e.datepicker._get(r,"showOptions"),n,s):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==n)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,n){var s=e(t),o=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(t){var i,n=e(t),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},_selectMonthYear:function(t,i,n){var s=e(t),o=this._getInst(s[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(s)},_selectDay:function(t,i,n,s){var o,a=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=e("a",s).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,this._selectDate(t,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var n,s=e(t),o=this._getInst(s[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),n=this._get(o,"onSelect"),n?n.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,n,s,o=this._get(t,"altField");o&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),s=this.formatDate(i,n,this._getFormatConfig(t)),e(o).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,n){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var s,o,a,r,l=0,u=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,h=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,w=function(e){var i=s+1<t.length&&t.charAt(s+1)===e;return i&&s++,i},_=function(e){var t=w(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s=new RegExp("^\\d{1,"+n+"}"),o=i.substring(l).match(s);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},x=function(t,n,s){var o=-1,a=e.map(w(t)?s:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(a,function(e,t){var n=t[1];return i.substr(l,n.length).toLowerCase()===n.toLowerCase()?(o=t[0],l+=n.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},k=function(){if(i.charAt(l)!==t.charAt(s))throw"Unexpected literal at position "+l;l++};for(s=0;s<t.length;s++)if(b)"'"!==t.charAt(s)||w("'")?k():b=!1;else switch(t.charAt(s)){case"d":v=_("d");break;case"D":x("D",d,h);break;case"o":y=_("o");break;case"m":g=_("m");break;case"M":g=x("M",p,f);break;case"y":m=_("y");break;case"@":r=new Date(_("@")),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((_("!")-this._ticksTo1970)/1e4),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"'":w("'")?k():b=!0;break;default:k()}if(l<i.length&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=m?0:-100)),y>-1)for(g=1,v=y;;){if(o=this._getDaysInMonth(m,g-1),o>=v)break;g++,v-=o}if(r=this._daylightSavingAdjust(new Date(m,g-1,v)),r.getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)throw"Invalid date";return r},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:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var n,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},u=function(e,t,i){var n=""+t;if(l(e))for(;n.length<i;)n="0"+n;return n},c=function(e,t,i,n){return l(e)?n[t]:i[t]},d="",h=!1;if(t)for(n=0;n<e.length;n++)if(h)"'"!==e.charAt(n)||l("'")?d+=e.charAt(n):h=!1;else switch(e.charAt(n)){case"d":d+=u("d",t.getDate(),2);break;case"D":d+=c("D",t.getDay(),s,o);break;case"o":d+=u("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=u("m",t.getMonth()+1,2);break;case"M":d+=c("M",t.getMonth(),a,r);break;case"y":d+=l("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?d+="'":h=!0;break;default:d+=e.charAt(n)}return d},_possibleChars:function(e){var t,i="",n=!1,s=function(i){var n=t+1<e.length&&e.charAt(t+1)===i;return n&&t++,n};for(t=0;t<e.length;t++)if(n)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):n=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":n=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),o=s,a=this._getFormatConfig(e);try{o=this.parseDate(i,n,a)||s}catch(r){n=t?"":n}e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),e.currentDay=n?o.getDate():0,e.currentMonth=n?o.getMonth():0,e.currentYear=n?o.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,n){var s=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},o=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(n){}for(var s=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,o=s.getFullYear(),a=s.getMonth(),r=s.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=l.exec(i);u;){switch(u[2]||"d"){case"d":case"D":r+=parseInt(u[1],10);break;case"w":case"W":r+=7*parseInt(u[1],10);break;case"m":case"M":a+=parseInt(u[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(u[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(o,a))}u=l.exec(i)}return new Date(o,a,r)},a=null==i||""===i?n:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?n:s(i):new Date(i.getTime());return a=a&&"Invalid Date"===a.toString()?n:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,s=e.selectedMonth,o=e.selectedYear,a=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=a.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=a.getMonth(),e.drawYear=e.selectedYear=e.currentYear=a.getFullYear(),s===e.selectedMonth&&o===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(n,-i,"M")},next:function(){e.datepicker._adjustDate(n,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,n,s,o,a,r,l,u,c,d,h,p,f,m,g,v,y,b,w,_,x,k,C,T,D,E,S,N,M,z,$,A,H,O,P,I,j,R,L=new Date,W=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),F=this._get(e,"isRTL"),B=this._get(e,"showButtonPanel"),q=this._get(e,"hideIfNoPrevNext"),U=this._get(e,"navigationAsDateFormat"),Y=this._getNumberOfMonths(e),G=this._get(e,"showCurrentAtPos"),X=this._get(e,"stepMonths"),V=1!==Y[0]||1!==Y[1],J=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),K=this._getMinMaxDate(e,"min"),Q=this._getMinMaxDate(e,"max"),Z=e.drawMonth-G,et=e.drawYear;if(0>Z&&(Z+=12,et--),Q)for(t=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-Y[0]*Y[1]+1,Q.getDate())),t=K&&K>t?K:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=U?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-X,1)),this._getFormatConfig(e)):i,n=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"e":"w")+"'>"+i+"</span></a>",s=this._get(e,"nextText"),s=U?this.formatDate(s,this._daylightSavingAdjust(new Date(et,Z+X,1)),this._getFormatConfig(e)):s,o=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"w":"e")+"'>"+s+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"w":"e")+"'>"+s+"</span></a>",a=this._get(e,"currentText"),r=this._get(e,"gotoCurrent")&&e.currentDay?J:W,a=U?this.formatDate(a,r,this._getFormatConfig(e)):a,l=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",u=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(F?l:"")+(this._isInRange(e,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(F?"":l)+"</div>":"",c=parseInt(this._get(e,"firstDay"),10),c=isNaN(c)?0:c,d=this._get(e,"showWeek"),h=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),w="",x=0;x<Y[0];x++){for(k="",this.maxRows=4,C=0;C<Y[1];C++){if(T=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),D=" ui-corner-all",E="",V){if(E+="<div class='ui-datepicker-group",Y[1]>1)switch(C){case 0:E+=" ui-datepicker-group-first",D=" ui-corner-"+(F?"right":"left");break;case Y[1]-1:E+=" ui-datepicker-group-last",D=" ui-corner-"+(F?"left":"right");break;default:E+=" ui-datepicker-group-middle",D=""}E+="'>"}for(E+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+D+"'>"+(/all|left/.test(D)&&0===x?F?o:n:"")+(/all|right/.test(D)&&0===x?F?n:o:"")+this._generateMonthYearHeader(e,Z,et,K,Q,x>0||C>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",S=d?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",_=0;7>_;_++)N=(_+c)%7,S+="<th"+((_+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+h[N]+"'>"+p[N]+"</span></th>";for(E+=S+"</tr></thead><tbody>",M=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,M)),z=(this._getFirstDayOfMonth(et,Z)-c+7)%7,$=Math.ceil((z+M)/7),A=V?this.maxRows>$?this.maxRows:$:$,this.maxRows=A,H=this._daylightSavingAdjust(new Date(et,Z,1-z)),O=0;A>O;O++){for(E+="<tr>",P=d?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(H)+"</td>":"",_=0;7>_;_++)I=g?g.apply(e.input?e.input[0]:null,[H]):[!0,""],j=H.getMonth()!==Z,R=j&&!y||!I[0]||K&&K>H||Q&&H>Q,P+="<td class='"+((_+c+6)%7>=5?" ui-datepicker-week-end":"")+(j?" ui-datepicker-other-month":"")+(H.getTime()===T.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===H.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(j&&!v?"":" "+I[1]+(H.getTime()===J.getTime()?" "+this._currentClass:"")+(H.getTime()===W.getTime()?" ui-datepicker-today":""))+"'"+(j&&!v||!I[2]?"":" title='"+I[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+H.getMonth()+"' data-year='"+H.getFullYear()+"'")+">"+(j&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+H.getDate()+"</span>":"<a class='ui-state-default"+(H.getTime()===W.getTime()?" ui-state-highlight":"")+(H.getTime()===J.getTime()?" ui-state-active":"")+(j?" ui-priority-secondary":"")+"' href='#'>"+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);E+=P+"</tr>"}Z++,Z>11&&(Z=0,et++),E+="</tbody></table>"+(V?"</div>"+(Y[0]>0&&C===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=E}w+=k}return w+=u,e._keyEvent=!1,w},_generateMonthYearHeader:function(e,t,i,n,s,o,a,r){var l,u,c,d,h,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",w="";if(o||!g)w+="<span class='ui-datepicker-month'>"+a[t]+"</span>";else{for(l=n&&n.getFullYear()===i,u=s&&s.getFullYear()===i,w+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=n.getMonth())&&(!u||c<=s.getMonth())&&(w+="<option value='"+c+"'"+(c===t?" selected='selected'":"")+">"+r[c]+"</option>");w+="</select>"}if(y||(b+=w+(!o&&g&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(d=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t},f=p(d[0]),m=Math.max(f,p(d[1]||"")),f=n?Math.max(f,n.getFullYear()):f,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)e.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!o&&g&&v?"":"&#xa0;")+w),b+="</div>"},_adjustInstDate:function(e,t,i){var n=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),o=Math.min(e.selectedDay,this._getDaysInMonth(n,s))+("D"===i?t:0),a=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,s,o)));e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)
},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return n&&s>n?n:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,n){var s=this._getNumberOfMonths(e),o=this._daylightSavingAdjust(new Date(i,n+(0>t?t:s[0]*s[1]),1));return 0>t&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(e,o)},_isInRange:function(e,t){var i,n,s=this._getMinMaxDate(e,"min"),o=this._getMinMaxDate(e,"max"),a=null,r=null,l=this._get(e,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=n),i[1].match(/[+\-].*/)&&(r+=n)),(!s||t.getTime()>=s.getTime())&&(!o||t.getTime()<=o.getTime())&&(!a||t.getFullYear()>=a)&&(!r||t.getFullYear()<=r)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.10.3"}(jQuery),/*!
 * jQuery UI Menu 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/menu/
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	jquery.ui.position.js
 */
function(e){e.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var i=e(t.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(t),i.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=e(t.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,s,o,a,r,l=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:l=!1,s=this.previousFilter||"",o=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),o===s?a=!0:o=s+o,r=new RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(e(this).children("a").text())}),n=a&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(o=String.fromCharCode(t.keyCode),r=new RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(e(this).children("a").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,i=this.options.icons.submenu,n=this.element.find(this.options.menus);n.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),n=t.prev("a"),s=e("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",n.attr("id"))}),t=n.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-\u2014\u2013\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),this._super(e,t)},focus:function(e,t){var i,n;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),n=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,n,s,o,a,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,s=t.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=t.height(),0>s?this.activeMenu.scrollTop(o+s):s+r>a&&this.activeMenu.scrollTop(o+s-a+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(t),this.activeMenu=n},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var n;this.active&&(n="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(".ui-menu-item")[t]()),this.focus(i,n)},nextPage:function(t){var i,n,s;return this.active?(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n-s<0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,n,s;return this.active?(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n+s>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)}})}(jQuery),/*!
 * jQuery UI Tooltip 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/tooltip/
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	jquery.ui.position.js
 */
function(e){function t(t,i){var n=(t.attr("aria-describedby")||"").split(/\s+/);n.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(n.join(" ")))}function i(t){var i=t.data("ui-tooltip-id"),n=(t.attr("aria-describedby")||"").split(/\s+/),s=e.inArray(i,n);-1!==s&&n.splice(s,1),t.removeData("ui-tooltip-id"),n=e.trim(n.join(" ")),n?t.attr("aria-describedby",n):t.removeAttr("aria-describedby")}var n=0;e.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,i){var n=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){n._updateContent(t)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,n){var s=e.Event("blur");s.target=s.currentTarget=n[0],t.close(s,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,n=e(t?t.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&n.parents().each(function(){var t,n=e(this);n.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._updateContent(n,t))},_updateContent:function(e,t){var i,n=this.options.content,s=this,o=t?t.type:null;return"string"==typeof n?this._open(t,e,n):(i=n.call(e[0],function(i){e.data("ui-tooltip-open")&&s._delay(function(){t&&(t.type=o),this._open(t,e,i)})}),i&&this._open(t,e,i),void 0)},_open:function(i,n,s){function o(e){u.of=e,a.is(":hidden")||a.position(u)}var a,r,l,u=e.extend({},this.options.position);if(s){if(a=this._find(n),a.length)return a.find(".ui-tooltip-content").html(s),void 0;n.is("[title]")&&(i&&"mouseover"===i.type?n.attr("title",""):n.removeAttr("title")),a=this._tooltip(n),t(n,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(e.extend({of:n},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(l=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(u.of),clearInterval(l))},e.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var i=e.Event(t);i.currentTarget=n[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,n,r)}},close:function(t){var n=this,s=e(t?t.currentTarget:this.element),o=this._find(s);this.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&s.attr("title",s.data("ui-tooltip-title")),i(s),o.stop(!0),this._hide(o,this.options.hide,function(){n._removeTooltip(e(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete n.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:o}),this.closing=!1)},_tooltip:function(t){var i="ui-tooltip-"+n++,s=e("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return e("<div>").addClass("ui-tooltip-content").appendTo(s),s.appendTo(this.document[0].body),this.tooltips[i]=t,s},_find:function(t){var i=t.data("ui-tooltip-id");return i?e("#"+i):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,n){var s=e.Event("blur");s.target=s.currentTarget=n[0],t.close(s,!0),e("#"+i).remove(),n.data("ui-tooltip-title")&&(n.attr("title",n.data("ui-tooltip-title")),n.removeData("ui-tooltip-title"))})}})}(jQuery),/*!
 * jQuery UI Autocomplete 1.10.3
 * http://jqueryui.com
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/autocomplete/
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	jquery.ui.position.js
 *	jquery.ui.menu.js
 */
function(e){var t=0;e.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,i,n,s=this.element[0].nodeName.toLowerCase(),o="textarea"===s,a="input"===s;this.isMultiLine=o?!0:a?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return t=!0,n=!0,i=!0,void 0;t=!1,n=!1,i=!1;var o=e.ui.keyCode;switch(s.keyCode){case o.PAGE_UP:t=!0,this._move("previousPage",s);break;case o.PAGE_DOWN:t=!0,this._move("nextPage",s);break;case o.UP:t=!0,this._keyEvent("previous",s);break;case o.DOWN:t=!0,this._keyEvent("next",s);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(t=!0,s.preventDefault(),this.menu.select(s));break;case o.TAB:this.menu.active&&this.menu.select(s);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&n.preventDefault(),void 0;if(!i){var s=e.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(e){return n?(n=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(n){n.target===t.element[0]||n.target===i||e.contains(i,n.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0;var n=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:n})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value):this.liveRegion.text(n.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,s){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){s(e)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var e=this,i=++t;return function(n){i===t&&e.__response(n),e.pending--,e.pending||e.element.removeClass("ui-autocomplete-loading")}},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var n=this;e.each(i,function(e,i){n._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})}(jQuery),/*
 * jQuery.weekCalendar v1.2.3-pre
 * http://www.redredred.com.au/
 *
 * Requires:
 * - jquery.weekcalendar.css
 * - jquery 1.3.x
 * - jquery-ui 1.7.x (widget, drag, drop, resize)
 *
 * Copyright (c) 2009 Rob Monie
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *   
 *   If you're after a monthly calendar plugin, check out http://arshaw.com/fullcalendar/
 */
function(e){e.widget("ui.weekCalendar",{_init:function(){var t=this;t._computeOptions(),t._setupEventDelegation(),t._renderCalendar(),t._loadCalEvents(),t._resizeCalendar(),t._scrollToHour(t.options.date.getHours()),e(window).unbind("resize.weekcalendar"),e(window).bind("resize.weekcalendar",function(){t._resizeCalendar()})},refresh:function(){this._loadCalEvents(this.element.data("startDate"))},clear:function(){this._clearCalendar()},today:function(){this._clearCalendar(),this._loadCalEvents(this.options.date),e(".wc-prev").removeAttr("disabled"),e(".wc-next").removeAttr("disabled")},prevWeek:function(){var t=new Date(this.element.data("startDate").getTime()-i/6);this.options.minDate&&t<this.options.minDate&&(t=this.options.minDate,e(".wc-prev").attr("disabled","disabled")),e(".wc-next").removeAttr("disabled"),this._clearCalendar(),this._loadCalEvents(t)},nextWeek:function(){var t=new Date(this.element.data("startDate").getTime()+i+i/7);this.options.maxDate&&t>this.options.maxDate&&(t=this.options.maxDate,e(".wc-next").attr("disabled","disabled")),this._clearCalendar(),this._loadCalEvents(t),e(".wc-prev").removeAttr("disabled")},gotoWeek:function(e){this._clearCalendar(),this._loadCalEvents(e)},removeEvent:function(t){var i=this;i.element.find(".wc-cal-event").each(function(){return e(this).data("calEvent").id===t?(e(this).remove(),!1):void 0}),i.element.find(".wc-day-column-inner").each(function(){i._adjustOverlappingEvents(e(this))})},removeUnsavedEvents:function(){var t=this;t.element.find(".wc-new-cal-event").each(function(){e(this).remove()}),t.element.find(".wc-day-column-inner").each(function(){t._adjustOverlappingEvents(e(this))})},updateEvent:function(e){this._updateEventInCalendar(e)},getTimeslotTimes:function(e){for(var t=this.options,i=t.businessHours.limitDisplay?t.businessHours.start:0,n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),i),s=[],o=n.getTime(),a=0;a<t.timeslotsPerDay;a++){var r=o+t.millisPerTimeslot;s[a]={start:new Date(o),startFormatted:this._formatDate(new Date(o),t.timeFormat),end:new Date(r),endFormatted:this._formatDate(new Date(r),t.timeFormat)},o=r}return s},formatDate:function(e,t){return t?this._formatDate(e,t):this._formatDate(e,this.options.dateFormat)},formatTime:function(e,t){return t?this._formatDate(e,t):this._formatDate(e,this.options.timeFormat)},getData:function(e){return this._getData(e)},dateFirstDayOfWeek:function(e){return this._dateFirstDayOfWeek(e)},timeslotHeight:function(){return this.options.timeslotHeight},getTimeFromEvent:function(t){var i=e(t.target),n=i.closest(".wc-day-column-inner"),s=i.offset().top,o=t.pageY-s;return this._getEventDurationFromPositionedEventElement(n,null,o)},_computeOptions:function(){var e=this.options;e.businessHours.limitDisplay?(e.timeslotsPerDay=e.timeslotsPerHour*(e.businessHours.end-e.businessHours.start),e.millisToDisplay=1e3*60*60*(e.businessHours.end-e.businessHours.start),e.millisPerTimeslot=e.millisToDisplay/e.timeslotsPerDay):(e.timeslotsPerDay=24*e.timeslotsPerHour,e.millisToDisplay=t,e.millisPerTimeslot=t/e.timeslotsPerDay)},_resizeCalendar:function(){var t=this.options;if(t&&e.isFunction(t.height)){var i=t.height(this.element),n=this.element.find(".wc-header").outerHeight(),s=this.element.find(".wc-nav").outerHeight();void 0===s&&(s=0),this.element.find(".wc-scrollable-grid").height(i-s-n)}},_setupEventDelegation:function(){var t=this,i=this.options;this.element.unbind("click").click(function(t){var n=e(t.target);if(!n.data("preventClick"))return n.hasClass("wc-cal-event")?i.eventClick(n.data("calEvent"),n,t):n.parent().hasClass("wc-cal-event")?i.eventClick(n.parent().data("calEvent"),n.parent(),t):n.parent().parent().hasClass("wc-cal-event")?i.eventClick(n.parent().parent().data("calEvent"),n,t):void 0}).mouseover(function(n){var s=e(n.target);t._isDraggingOrResizing(s)||(s.hasClass("wc-cal-event")&&i.eventMouseover(s.data("calEvent"),s,n),s.parent().hasClass("wc-cal-event")&&i.eventMouseover(s.parent().data("calEvent"),s.parent(),n))}).mouseout(function(n){var s=e(n.target);if(!t._isDraggingOrResizing(s)){if(s.hasClass("wc-cal-event")){if(s.data("sizing"))return;i.eventMouseout(s.data("calEvent"),s,n)}if(s.parent().hasClass("wc-cal-event")){if(s.parent().data("sizing"))return;i.eventMouseout(s.parent().data("calEvent"),s.parent(),n)}}})},_isDraggingOrResizing:function(e){return e.hasClass("ui-draggable-dragging")||e.hasClass("ui-resizable-resizing")},_renderCalendar:function(){var t,i,n,s,o,a,r=this,l=this.options;t=e('<div class="wc-container">').appendTo(r.element),l.buttons&&(i='<div class="wc-nav">                    <button title="'+l.buttonTitle.lastWeek+'" class="wc-prev">'+l.buttonText.lastWeek+'</button>                    <button title="'+l.buttonTitle.today+'"class="wc-today">'+l.buttonText.today+'</button>                    <button title="'+l.buttonTitle.nextWeek+'"class="wc-next">'+l.buttonText.nextWeek+"</button>                    </div>",l.buttonsContainer?(e(l.buttonsContainer).html(i),a=e(l.buttonsContainer)):(e(i).appendTo(t),a=a),a.find(".wc-nav .wc-today").click(function(){return r.element.weekCalendar("today"),!1}),a.find(".wc-nav .wc-prev").click(function(){return r.element.weekCalendar("prevWeek"),!1}),a.find(".wc-nav .wc-next").click(function(){return r.element.weekCalendar("nextWeek"),!1})),n='<table class="wc-header"><tbody><tr><td class="wc-time-column-header">'+(l.columnHeader||"")+"</td>";for(var u=1;u<=l.daysToShow;u++)n+='<td class="wc-day-column-header wc-day-'+u+'"></td>';n+='<td class="wc-scrollbar-shim"></td></tr></tbody></table>',s='<div class="wc-scrollable-grid">                <table class="wc-time-slots">                <tbody>                <tr>                <td class="wc-grid-timeslot-header"></td>                <td colspan="'+l.daysToShow+'">                <div class="wc-time-slot-wrapper">                <div class="wc-time-slots">';for(var c=l.businessHours.limitDisplay?l.businessHours.start:0,d=l.businessHours.limitDisplay?l.businessHours.end:24,u=c;d>u;u++){for(var h=0;h<l.timeslotsPerHour-1;h++)s+='<div class="wc-time-slot"></div>';s+='<div class="wc-time-slot wc-hour-end"></div>'}s+='</div></div></td></tr><tr><td class="wc-grid-timeslot-header">';for(var u=c;d>u;u++){var p=l.businessHours.start<=u&&l.businessHours.end>u?"wc-business-hours":"";s+='<div class="wc-hour-header '+p+'">',s+=l.is_monthly?'<div class="wc-time-header-cell">'+r._weekForIndex(u)+"</div>":l.use24Hour?'<div class="wc-time-header-cell">'+r._24HourForIndex(u)+"</div>":'<div class="wc-time-header-cell">'+r._hourForIndex(u)+'<span class="wc-am-pm">'+r._amOrPm(u)+"</span></div>",s+="</div>"}s+="</td>";for(var u=1;u<=l.daysToShow;u++)s+='<td class="wc-day-column day-'+u+'"><div class="wc-day-column-inner"></div></td>';s+="</tr></tbody></table></div>",e(n+s).appendTo(t),o=t.find(".wc-day-column-inner"),o.each(function(){e(this).height(l.timeslotHeight*l.timeslotsPerDay),l.readonly||(r._addDroppableToWeekDay(e(this)),r._setupEventCreationForWeekDay(e(this)))}),t.find(".wc-time-slot").height(l.timeslotHeight-1),t.find(".wc-time-header-cell").css({height:l.timeslotHeight*l.timeslotsPerHour-11,padding:5})},_setupEventCreationForWeekDay:function(t){var i=this,n=this.options;t.mousedown(function(t,i){if(i){var s=e(t.target);if(s.hasClass("wc-day-column-inner")){var o=e('<div class="wc-cal-event wc-new-cal-event wc-new-cal-event-creating"></div>');o.css({lineHeight:n.timeslotHeight-2+"px",fontSize:n.timeslotHeight/2+"px"}),s.append(o);var a=s.offset().top,r=t.pageY-a,l=(r-r%n.timeslotHeight)/n.timeslotHeight,u=l*n.timeslotHeight;o.css({top:u}),s.bind("mousemove.newevent",function(e){o.show(),o.addClass("ui-resizable-resizing");var t=Math.round(e.pageY-a-u),i=t%n.timeslotHeight;if(t/2>i){var s=t-i;o.css("height",s<n.timeslotHeight?n.timeslotHeight:s)}else o.css("height",t+(n.timeslotHeight-i))}).mouseup(function(){s.unbind("mousemove.newevent"),o.addClass("ui-corner-all")})}}}).mouseup(function(t,s){if(s){var o=e(t.target),a=o.closest(".wc-day-column-inner"),r=a.find(".wc-new-cal-event-creating");if(r.length){r.hasClass("ui-resizable-resizing")||r.css({height:n.timeslotHeight*n.defaultEventLength}).show();var l=parseInt(r.css("top")),u=i._getEventDurationFromPositionedEventElement(a,r,l);r.remove();var c={start:u.start,end:u.end,title:n.newEventText},d=i._renderEvent(c,a);n.allowCalEventOverlap?i._adjustOverlappingEvents(a):(i._adjustForEventCollisions(a,d,c,c),i._positionEvent(a,d)),n.eventNew(u,d)}}}).click(function(t){return e(t.target).hasClass("wc-day-column-inner")?n.weeklyClick(t):void 0})},_loadCalEvents:function(t){var i,n,s,o=this,a=this.options;if(i=t||a.date,n=o._dateFirstDayOfWeek(i),weekEndDate=o._dateLastMilliOfWeek(i),a.calendarBeforeLoad(o.element),o.element.data("startDate",n),o.element.data("endDate",weekEndDate),s=o.element.find(".wc-day-column-inner"),o._updateDayColumnHeader(s),"string"==typeof a.data){a.loading&&a.loading(!0);var r={};r[a.startParam||"start"]=Math.round(n.getTime()/1e3),r[a.endParam||"end"]=Math.round(weekEndDate.getTime()/1e3),e.getJSON(a.data,r,function(e){o._renderEvents(e,s),a.loading&&a.loading(!1)})}else e.isFunction(a.data)?a.data(n,weekEndDate,function(e){o._renderEvents(e,s)}):a.data&&o._renderEvents(a.data,s)},_updateDayColumnHeader:function(i){var n,s=this,o=this.options,a=s._cloneDate(s.element.data("startDate"));s.element.find(".wc-header td.wc-day-column-header").each(function(){var t=o.useShortDayNames?o.shortDays[a.getDay()]:o.longDays[a.getDay()];n=t,o.hideDate||(n+="<br/>"+s._formatDate(a,o.dateFormat)),e(this).html(n),s._isToday(a)?e(this).addClass("wc-today"):e(this).removeClass("wc-today"),a=s._addDays(a,1)}),a=s._dateFirstDayOfWeek(s._cloneDate(s.element.data("startDate"))),i.each(function(){e(this).data("startDate",s._cloneDate(a)),e(this).data("endDate",new Date(a.getTime()+t)),s._isToday(a)?e(this).parent().addClass("wc-today"):e(this).parent().removeClass("wc-today"),a=s._addDays(a,1)})},_renderEvents:function(t,i){this._clearCalendar();var n,s=this,o=this.options;if(e.isArray(t)?n=s._cleanEvents(t):t.events&&(n=s._cleanEvents(t.events)),t.options){var a=!1;e.each(t.options,function(e,t){t!==o[e]&&(o[e]=t,a=!0)}),s._computeOptions(),a&&(s.element.empty(),s._renderCalendar(),i=s.element.find(".wc-time-slots .wc-day-column-inner"),s._updateDayColumnHeader(i),s._resizeCalendar())}if(o.drawCurrentTimeLine){var r=new Date;(!s.options.businessHours.limitDisplay||r.getHours()>s.options.businessHours.start&&r.getHours()<s.options.businessHours.end)&&n.push({id:"drawCurrentTimeLine",className:"wc-cal-now",start:r,end:r,readOnly:!0})}e.each(n,function(e,t){var n=s._findWeekDayForEvent(t,i);n&&s._renderEvent(t,n)}),i.each(function(){s._adjustOverlappingEvents(e(this))}),o.calendarAfterLoad(s.element),(!n.length||o.drawCurrentTimeLine&&1==n.length)&&o.noEvents()},_renderFullDayEvent:function(t,i){var n=/day-([0-9])/.exec(i.parent().attr("class")),s=e(".wc-day-column-header.wc-day-"+n[1]);s.append(e("<div/>").addClass(t.className).html(t.title))},_renderEvent:function(t,i){var n=this,s=this.options;if(!(t.start.getTime()>t.end.getTime())){if(t.start.getTime()==t.end.getTime()&&0==t.start.getHours())return n._renderFullDayEvent(t,i);var o,a,r,l;return o=t.id?"wc-cal-event":"wc-cal-event wc-new-cal-event",t.className&&(o+=" "+t.className),a='<div class="'+o+' ui-corner-all">                <div class="wc-time ui-corner-all"></div>                <div class="wc-title"></div></div>',r=e(a),l=s.eventRender(t,r),r=l?l.appendTo(i):r.appendTo(i),r.css({lineHeight:s.timeslotHeight-2+"px",fontSize:s.timeslotHeight/2+"px"}),n._refreshEventDetails(t,r),n._positionEvent(i,r),r.show(),!s.readonly&&s.resizable(t,r)&&n._addResizableToCalEvent(t,r,i),!s.readonly&&s.draggable(t,r)&&n._addDraggableToCalEvent(t,r),s.eventAfterRender(t,r),r}},_adjustOverlappingEvents:function(t){var i=this;if(i.options.allowCalEventOverlap){var n=i._groupOverlappingEventElements(t);e.each(n,function(){var t=this;e.each(t,function(n){var s=this;if(i.options.overlapEventsSeparate)var o=100/t.length,a=n*o;else var o=100-10*(t.length-1),a=10*n;e.each(s,function(){i.options.overlapEventsSeparate||e(this).bind("mouseover.z-index",function(){var t=e(this);e.each(s,function(){e(this).css({"z-index":"1"})}),t.css({"z-index":"3"})}),e(this).css({width:o+"%",left:a+"%"})})})})}},_groupOverlappingEventElements:function(t){var i,n=t.find(".wc-cal-event:visible"),s=n.sort(function(t,i){return e(t).data("calEvent").start.getTime()-e(i).data("calEvent").start.getTime()}),o=new Date(0,0,0),a=[],r=[];return e.each(s,function(){if(i=e(this),"drawCurrentTimeLine"!=i.data("calEvent").id){r.length>0&&o.getTime()<=i.data("calEvent").start.getTime()&&(a.push(r),r=[]);for(var t=0;t<r.length;t++)if(r[t].length>0&&r[t][r[t].length-1].data("calEvent").end.getTime()<=i.data("calEvent").start.getTime())return r[t].push(i),o.getTime()<i.data("calEvent").end.getTime()&&(o=i.data("calEvent").end),void 0;r.push([i]),o.getTime()<i.data("calEvent").end.getTime()&&(o=i.data("calEvent").end)}}),r.length>0&&a.push(r),a},_findWeekDayForEvent:function(t,i){var n;return i.each(function(){return e(this).data("startDate").getTime()<=t.start.getTime()&&e(this).data("endDate").getTime()>=t.end.getTime()?(n=e(this),!1):void 0}),n},_updateEventInCalendar:function(t){var i=this;this.options,i._cleanEvent(t),t.id&&i.element.find(".wc-cal-event").each(function(){return e(this).data("calEvent").id===t.id||e(this).hasClass("wc-new-cal-event")?(e(this).remove(),!1):void 0});var n=i._findWeekDayForEvent(t,i.element.find(".wc-time-slots .wc-day-column-inner"));if(n){var s=i._renderEvent(t,n);i._adjustForEventCollisions(n,s,t,t),i._refreshEventDetails(t,s),i._positionEvent(n,s),i._adjustOverlappingEvents(n)}},_positionEvent:function(e,t){var i=this.options,n=t.data("calEvent"),s=e.height()/i.millisToDisplay,o=i.businessHours.limitDisplay?i.businessHours.start:0,a=n.start.getTime()-new Date(n.start.getFullYear(),n.start.getMonth(),n.start.getDate(),o).getTime(),r=n.end.getTime()-n.start.getTime(),l=s*a,u=s*r;t.css({top:l,height:Math.max(u,1)})},_getEventDurationFromPositionedEventElement:function(e,t,i){var n=this.options,s=n.businessHours.limitDisplay?1e3*60*60*n.businessHours.start:0,o=new Date(e.data("startDate").getTime()+s+Math.round(i/n.timeslotHeight)*n.millisPerTimeslot);if(!t)return o;var a=new Date(o.getTime()+t.height()/n.timeslotHeight*n.millisPerTimeslot);return{start:o,end:a}},_adjustForEventCollisions:function(t,i,n,s,o){var a=this.options;if(!a.allowCalEventOverlap){var r,l,u=this;t.find(".wc-cal-event").not(i).each(function(){var t=e(this).data("calEvent");return n.start.getTime()<t.end.getTime()&&n.end.getTime()>=t.end.getTime()&&(r=t.end),n.end.getTime()>t.start.getTime()&&n.start.getTime()<=t.start.getTime()&&(l=t.start),!s.resizable||n.end.getTime()<=t.end.getTime()&&n.start.getTime()>=t.start.getTime()?(r=s.start,l=s.end,!1):void 0}),n.start=r||n.start,r&&o?(n.end=new Date(r.getTime()+(s.end.getTime()-s.start.getTime())),u._adjustForEventCollisions(t,i,n,s)):n.end=l||n.end,n.start.getTime()>=n.end.getTime()&&(n.start=s.start,n.end=s.end),i.data("calEvent",n)}},_addDraggableToCalEvent:function(e,t){var i=this,n=this.options;i._findWeekDayForEvent(e,i.element.find(".wc-time-slots .wc-day-column-inner")),t.draggable({handle:".wc-time",containment:".wc-scrollable-grid",revert:"valid",opacity:.5,grid:[t.outerWidth()+1,n.timeslotHeight],start:function(t,i){var s=i.draggable;n.eventDrag(e,s)}})},_addDroppableToWeekDay:function(t){var i=this,n=this.options;t.droppable({accept:".wc-cal-event",drop:function(s,o){var a=o.draggable,r=Math.round(parseInt(o.position.top)),l=i._getEventDurationFromPositionedEventElement(t,a,r),u=a.data("calEvent"),c=e.extend(!0,{},u,{start:l.start,end:l.end});i._adjustForEventCollisions(t,a,c,u,!0);var d=i.element.find(".wc-day-column-inner");n.eventDrop(c,u,h);var h=i._renderEvent(c,i._findWeekDayForEvent(c,d));a.hide(),a.data("preventClick",!0);var p=i._findWeekDayForEvent(a.data("calEvent"),i.element.find(".wc-time-slots .wc-day-column-inner"));p.data("startDate")!=t.data("startDate")&&i._adjustOverlappingEvents(p),i._adjustOverlappingEvents(t),setTimeout(function(){a.remove()},1e3)}})},_addResizableToCalEvent:function(t,i,n){var s=this,o=this.options;i.resizable({grid:o.timeslotHeight,containment:n,handles:"s",minHeight:o.timeslotHeight,stop:function(i,a){var r=a.element,l=new Date(r.data("calEvent").start.getTime()+r.height()/o.timeslotHeight*o.millisPerTimeslot),u=e.extend(!0,{},t,{start:t.start,end:l});s._adjustForEventCollisions(n,r,u,t),s._refreshEventDetails(u,r),s._positionEvent(n,r),s._adjustOverlappingEvents(n),o.eventResize(u,t,r),r.data("preventClick",!0),setTimeout(function(){r.removeData("preventClick")},500)}})},_refreshEventDetails:function(e,t){var i=this,n=this.options;n.useTimeSeparator?(t.find(".wc-time").html(i._formatDate(e.start,n.timeFormat)+n.timeSeparator+i._formatDate(e.end,n.timeFormat)),t.find(".wc-title").html(e.title)):(t.find(".wc-time").html(e.title),t.find(".wc-title").html(e.content)),t.data("calEvent",e)},_clearCalendar:function(){this.element.find(".wc-day-column-inner div").remove()},_scrollToHour:function(e){var t=this;this.options;var i=this.element.find(".wc-scrollable-grid"),n=e;t.options.businessHours.limitDisplay&&(n=e<=t.options.businessHours.start?0:e>t.options.businessHours.end?t.options.businessHours.end-t.options.businessHours.start-1:e-t.options.businessHours.start),this.element.find(".wc-grid-timeslot-header .wc-hour-header:eq("+n+")"),i.animate({scrollTop:0},0,function(){})},_hourForIndex:function(e){return 0===e?12:13>e?e:e-12},_24HourForIndex:function(e){return 0===e?"00:00":10>e?"0"+e+":00":e+":00"},_weekForIndex:function(e){var t=36e5,i=7*24*t,n=this.options.date,s=new Date;return s.setTime(n.getTime()+i*e),this._formatDate(s,this.options.dateFormat)},_amOrPm:function(e){return 12>e?"AM":"PM"},_isToday:function(e){var t=this._cloneDate(e);this._clearTime(t);var i=new Date;return this._clearTime(i),i.getTime()===t.getTime()},_cleanEvents:function(t){var i=this;return e.each(t,function(e,t){i._cleanEvent(t)}),t},_cleanEvent:function(e){e.date&&(e.start=e.date),e.start=this._cleanDate(e.start),e.end=this._cleanDate(e.end),e.end||(e.end=this._addDays(this._cloneDate(e.start),1))},_disableTextSelect:function(t){t.each(function(){e.browser.mozilla?e(this).css("MozUserSelect","none"):e.browser.msie?e(this).bind("selectstart",function(){return!1}):e(this).mousedown(function(){return!1})})},_dateFirstDayOfWeek:function(e){var t=this,i=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=864e5*t._getAdjustedDayIndex(i);return new Date(i.getTime()-n)},_dateLastDayOfWeek:function(e){var i=this,n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),s=(6-i._getAdjustedDayIndex(n))*t;return new Date(n.getTime()+s)},_getAdjustedDayIndex:function(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),i=t.getDay(),n=[0,1,2,3,4,5,6];return this._rotate(n,this.options.firstDayOfWeek),n[i]},_dateLastMilliOfWeek:function(e){var i=this._dateLastDayOfWeek(e);return new Date(i.getTime()+t)},_clearTime:function(e){return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e},_addDays:function(e,t,i){return e.setDate(e.getDate()+t),i?e:this._clearTime(e)},_rotate:function(e,t){for(var i,n,s=e.length,t=(Math.abs(t)>=s&&(t%=s),0>t&&(t+=s),t);t;t=(Math.ceil(s/t)-1)*t-s+(s=t))for(i=s;i>t;n=e[--i],e[i]=e[i-t],e[i-t]=n);return e},_cloneDate:function(e){return new Date(e.getTime())},_cleanDate:function(t){return"string"==typeof t?e.weekCalendar.parseISO8601(t,!0)||Date.parse(t)||new Date(parseInt(t)):"number"==typeof t?new Date(t):t},_formatDate:function(t,i){for(var n=this.options,s="",o=0;o<i.length;o++){var a=i.charAt(o);s+=e.isFunction(this._replaceChars[a])?this._replaceChars[a](t,n):a}return s},_replaceChars:{d:function(e){return(e.getDate()<10?"0":"")+e.getDate()},D:function(e,t){return t.shortDays[e.getDay()]},j:function(e){return e.getDate()},l:function(e,t){return t.longDays[e.getDay()]},N:function(e){return e.getDay()+1},S:function(e){return 1==e.getDate()%10&&11!=e.getDate()?"st":2==e.getDate()%10&&12!=e.getDate()?"nd":3==e.getDate()%10&&13!=e.getDate()?"rd":"th"},w:function(e){return e.getDay()},z:function(){return"Not Yet Supported"},W:function(){return"Not Yet Supported"},F:function(e,t){return t.longMonths[e.getMonth()]},m:function(e){return(e.getMonth()<9?"0":"")+(e.getMonth()+1)},M:function(e,t){return t.shortMonths[e.getMonth()]},n:function(e){return e.getMonth()+1},t:function(){return"Not Yet Supported"},L:function(){return"Not Yet Supported"},o:function(){return"Not Supported"},Y:function(e){return e.getFullYear()},y:function(e){return(""+e.getFullYear()).substr(2)},a:function(e){return e.getHours()<12?"am":"pm"},A:function(e){return e.getHours()<12?"AM":"PM"},B:function(){return"Not Yet Supported"},g:function(e){return e.getHours()%12||12},G:function(e){return e.getHours()},h:function(e){return((e.getHours()%12||12)<10?"0":"")+(e.getHours()%12||12)},H:function(e){return(e.getHours()<10?"0":"")+e.getHours()},i:function(e){return(e.getMinutes()<10?"0":"")+e.getMinutes()},s:function(e){return(e.getSeconds()<10?"0":"")+e.getSeconds()},e:function(){return"Not Yet Supported"},I:function(){return"Not Supported"},O:function(e){return(e.getTimezoneOffset()<0?"-":"+")+(e.getTimezoneOffset()/60<10?"0":"")+e.getTimezoneOffset()/60+"00"},T:function(){return"Not Yet Supported"},Z:function(e){return 60*e.getTimezoneOffset()},c:function(){return"Not Yet Supported"},r:function(e){return e.toString()},U:function(e){return e.getTime()/1e3}}}),e.extend(e.ui.weekCalendar,{version:"1.2.2-pre",getter:["getTimeslotTimes","getData","formatDate","formatTime"],defaults:{date:new Date,timeFormat:"h:i a",dateFormat:"M d, Y",use24Hour:!1,daysToShow:7,firstDayOfWeek:0,useShortDayNames:!1,timeSeparator:" to ",startParam:"start",endParam:"end",businessHours:{start:8,end:18,limitDisplay:!1},newEventText:"New Event",timeslotHeight:20,defaultEventLength:2,timeslotsPerHour:4,buttons:!0,buttonTitle:{today:"Today",lastWeek:"Last week",nextWeek:"Next week"},buttonText:{today:"today",lastWeek:"&nbsp;&lt;&nbsp;",nextWeek:"&nbsp;&gt;&nbsp;"},scrollToHourMillis:500,allowCalEventOverlap:!1,overlapEventsSeparate:!1,readonly:!1,draggable:function(){return!0},resizable:function(){return!0},eventClick:function(){},eventRender:function(e,t){return t},eventAfterRender:function(e,t){return t},eventDrag:function(){},eventDrop:function(){},eventResize:function(){},eventNew:function(){},eventMouseover:function(){},eventMouseout:function(){},weeklyClick:function(){},calendarBeforeLoad:function(){},calendarAfterLoad:function(){},noEvents:function(){},shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}});var t=864e5,i=7*t;e.weekCalendar=function(){return{parseISO8601:function(e,t){var i="([0-9]{4})(-([0-9]{2})(-([0-9]{2})(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?",n=e.match(new RegExp(i));if(!n)return null;var s=0,o=new Date(n[1],0,1);return n[3]&&o.setMonth(n[3]-1),n[5]&&o.setDate(n[5]),n[7]&&o.setHours(n[7]),n[8]&&o.setMinutes(n[8]),n[10]&&o.setSeconds(n[10]),n[12]&&o.setMilliseconds(1e3*Number("0."+n[12])),t||(n[14]&&(s=60*Number(n[16])+Number(n[17]),s*="-"==n[15]?1:-1),s-=o.getTimezoneOffset()),new Date(Number(o)+1e3*60*s)},getSunday:function(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),i=864e5*t.getDay(),n=new Date(t.getTime()-i);return n.setTime(n.getTime()-n.getTimezoneOffset()*MINUTE),n},getSaturday:function(e){var t=this.getSunday(e);return t.setTime(t.getTime()+8640*MINUTE),t}}}()}(jQuery),/*
 * Jeditable - jQuery in place edit plugin
 *
 * Copyright (c) 2006-2009 Mika Tuupola, Dylan Verheul
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   http://www.appelsiini.net/projects/jeditable
 *
 * Based on editable by Dylan Verheul <dylan_at_dyve.net>:
 *    http://www.dyve.net/jquery/?editable
 *
 */
function($){$.fn.editable=function(e,t){if("disable"==e)return $(this).data("disabled.editable",!0),void 0;if("enable"==e)return $(this).data("disabled.editable",!1),void 0;if("destroy"==e)return $(this).unbind($(this).data("event.editable")).removeData("disabled.editable").removeData("event.editable"),void 0;var i=$.extend({},$.fn.editable.defaults,{target:e},t),n=$.editable.types[i.type].plugin||function(){},s=$.editable.types[i.type].submit||function(){},o=$.editable.types[i.type].buttons||$.editable.types.defaults.buttons,a=$.editable.types[i.type].content||$.editable.types.defaults.content,r=$.editable.types[i.type].element||$.editable.types.defaults.element,l=$.editable.types[i.type].reset||$.editable.types.defaults.reset,u=i.callback||function(){},c=i.onedit||function(){},d=i.onsubmit||function(){},h=i.onreset||function(){},p=i.onerror||l;return i.tooltip&&$(this).attr("title",i.tooltip),i.autowidth="auto"==i.width,i.autoheight="auto"==i.height,this.each(function(){var e=this,t=$(e).width(),f=$(e).height();$(this).data("event.editable",i.event),$.trim($(this).html())||$(this).html(i.placeholder),$(this).bind(i.event,function(h){if(!0!==$(this).data("disabled.editable")&&!e.editing&&!1!==c.apply(this,[i,e])){h.preventDefault(),h.stopPropagation(),i.tooltip&&$(e).removeAttr("title"),0==$(e).width()?(i.width=t,i.height=f):("none"!=i.width&&(i.width=i.autowidth?$(e).width():i.width),"none"!=i.height&&(i.height=i.autoheight?$(e).height():i.height)),$(this).html().toLowerCase().replace(/(;|")/g,"")==i.placeholder.toLowerCase().replace(/(;|")/g,"")&&$(this).html(""),e.editing=!0,e.revert=$(e).html(),$(e).html("");var m=$("<form />");i.cssclass&&("inherit"==i.cssclass?m.attr("class",$(e).attr("class")):m.attr("class",i.cssclass)),i.style&&("inherit"==i.style?(m.attr("style",$(e).attr("style")),m.css("display",$(e).css("display"))):m.attr("style",i.style));var g,v=r.apply(m,[i,e]);if(i.loadurl){var y=setTimeout(function(){v.disabled=!0,a.apply(m,[i.loadtext,i,e])},100),b={};b[i.id]=e.id,$.isFunction(i.loaddata)?$.extend(b,i.loaddata.apply(e,[e.revert,i])):$.extend(b,i.loaddata),$.ajax({type:i.loadtype,url:i.loadurl,data:b,async:!1,success:function(e){window.clearTimeout(y),g=e,v.disabled=!1}})}else i.data?(g=i.data,$.isFunction(i.data)&&(g=i.data.apply(e,[e.revert,i]))):g=e.revert;a.apply(m,[g,i,e]),v.attr("name",i.name),o.apply(m,[i,e]),$(e).append(m),n.apply(m,[i,e]),$(":input:visible:enabled:first",m).focus(),i.select&&v.select(),v.keydown(function(t){27==t.keyCode&&(t.preventDefault(),l.apply(m,[i,e]))});var y;"cancel"==i.onblur?v.blur(function(){y=setTimeout(function(){l.apply(m,[i,e])},500)}):"submit"==i.onblur?v.blur(function(){y=setTimeout(function(){m.submit()},200)}):$.isFunction(i.onblur)?v.blur(function(){i.onblur.apply(e,[v.val(),i])}):v.blur(function(){}),m.submit(function(t){if(y&&clearTimeout(y),t.preventDefault(),!1!==d.apply(m,[i,e])&&!1!==s.apply(m,[i,e]))if($.isFunction(i.target)){var n=i.target.apply(e,[v.val(),i]);$(e).html(n),e.editing=!1,u.apply(e,[e.innerHTML,i]),$.trim($(e).html())||$(e).html(i.placeholder)}else{var o={};o[i.name]=v.val(),o[i.id]=e.id,$.isFunction(i.submitdata)?$.extend(o,i.submitdata.apply(e,[e.revert,i])):$.extend(o,i.submitdata),"PUT"==i.method&&(o._method="put"),$(e).html(i.indicator);var a={type:"POST",data:o,dataType:"html",url:i.target,success:function(t){"html"==a.dataType&&$(e).html(t),e.editing=!1,u.apply(e,[t,i]),$.trim($(e).html())||$(e).html(i.placeholder)},error:function(t){p.apply(m,[i,e,t])}};$.extend(a,i.ajaxoptions),$.ajax(a)}return $(e).attr("title",i.tooltip),!1})}}),this.reset=function(t){this.editing&&!1!==h.apply(t,[i,e])&&($(e).html(e.revert),e.editing=!1,$.trim($(e).html())||$(e).html(i.placeholder),i.tooltip&&$(e).attr("title",i.tooltip))}})},$.editable={types:{defaults:{element:function(){var e=$('<input type="hidden"></input>');return $(this).append(e),e},content:function(e){$(":input:first",this).val(e)},reset:function(e,t){t.reset(this)},buttons:function(e,t){var i=this;if(e.submit){if(e.submit.match(/>$/))var n=$(e.submit).click(function(){"submit"!=n.attr("type")&&i.submit()});else{var n=$('<button type="submit" />');n.html(e.submit)}$(this).append(n)}if(e.cancel){if(e.cancel.match(/>$/))var s=$(e.cancel);else{var s=$('<button type="cancel" />');s.html(e.cancel)}$(this).append(s),$(s).click(function(){if($.isFunction($.editable.types[e.type].reset))var n=$.editable.types[e.type].reset;else var n=$.editable.types.defaults.reset;return n.apply(i,[e,t]),!1})}}},text:{element:function(e){var t=$("<input />");return"none"!=e.width&&t.width(e.width),"none"!=e.height&&t.height(e.height),t.attr("autocomplete","off"),$(this).append(t),t}},textarea:{element:function(e){var t=$("<textarea />");return e.rows?t.attr("rows",e.rows):"none"!=e.height&&t.height(e.height),e.cols?t.attr("cols",e.cols):"none"!=e.width&&t.width(e.width),$(this).append(t),t}},select:{element:function(){var e=$("<select />");return $(this).append(e),e},content:function(data,settings,original){if(String==data.constructor)eval("var json = "+data);else var json=data;for(var key in json)if(json.hasOwnProperty(key)&&"selected"!=key){var option=$("<option />").val(key).append(json[key]);$("select",this).append(option)}$("select",this).children().each(function(){($(this).val()==json.selected||$(this).text()==$.trim(original.revert))&&$(this).attr("selected","selected")})}}},addInputType:function(e,t){$.editable.types[e]=t}},$.fn.editable.defaults={name:"value",id:"id",type:"text",width:"auto",height:"auto",event:"click.editable",onblur:"cancel",loadtype:"GET",loadtext:"Loading...",placeholder:"Click to edit",loaddata:{},submitdata:{},ajaxoptions:{}}}(jQuery),function(e){function t(e){var t,i=e.originalEvent.changedTouches,n=i[0],s="";switch(e.type){case"touchmove":s="mousemove";break;case"touchend":s="mouseup";break;default:return}t=document.createEvent("MouseEvent"),t.initMouseEvent(s,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(t),e.preventDefault()}e.fn.rateit=function(i,n){var s,o={},a="init",r=function(e){return e.charAt(0).toUpperCase()+e.substr(1)};if(0==this.length)return this;if(s=e.type(i),"object"==s||void 0===i||null==i)o=e.extend({},e.fn.rateit.defaults,i);else{if("string"==s&&void 0===n)return this.data("rateit"+r(i));"string"==s&&(a="setvalue")}return this.each(function(){var s,l,u,c,d,h,p,f=e(this),m=function(e){return arguments[0]="rateit"+r(e),f.data.apply(f,arguments)};if(f.hasClass("rateit")||f.addClass("rateit"),s="rtl"!=f.css("direction"),"setvalue"==a){if(!m("init"))throw"Can't set value before init";"readonly"!=i||m("readonly")||(f.find(".rateit-range").unbind(),m("wired",!1)),"value"==i&&null==n&&(n=m("min")),m("backingfld")&&(l=e(m("backingfld")),"value"==i&&l.val(n),"min"==i&&l[0].min&&(l[0].min=n),"max"==i&&l[0].max&&(l[0].max=n),"step"==i&&l[0].step&&(l[0].step=n)),m(i,n)}m("init")||(m("min",m("min")||o.min),m("max",m("max")||o.max),m("step",m("step")||o.step),m("readonly",void 0!==m("readonly")?m("readonly"):o.readonly),m("resetable",void 0!==m("resetable")?m("resetable"):o.resetable),m("backingfld",m("backingfld")||o.backingfld),m("starwidth",m("starwidth")||o.starwidth),m("starheight",m("starheight")||o.starheight),m("value",m("value")||o.value||o.min),m("ispreset",void 0!==m("ispreset")?m("ispreset"):o.ispreset),m("backingfld")&&(l=e(m("backingfld")),m("value",l.hide().val()),(l.attr("disabled")||l.attr("readonly"))&&m("readonly",!0),"INPUT"==l[0].nodeName&&("range"==l[0].type||"text"==l[0].type)&&(m("min",parseInt(l.attr("min"))||m("min")),m("max",parseInt(l.attr("max"))||m("max")),m("step",parseInt(l.attr("step"))||m("step"))),"SELECT"==l[0].nodeName&&l[0].options.length>1&&(m("min",Number(l[0].options[0].value)),m("max",Number(l[0].options[l[0].length-1].value)),m("step",Number(l[0].options[1].value)-Number(l[0].options[0].value)))),f.append('<div class="rateit-reset"></div><div class="rateit-range"><div class="rateit-selected" style="height:'+m("starheight")+'px"></div><div class="rateit-hover" style="height:'+m("starheight")+'px"></div></div>'),s||(f.find(".rateit-reset").css("float","right"),f.find(".rateit-selected").addClass("rateit-selected-rtl"),f.find(".rateit-hover").addClass("rateit-hover-rtl")),m("init",!0)),u=f.find(".rateit-range"),u.width(m("starwidth")*(m("max")-m("min"))).height(m("starheight")),c="rateit-preset"+(s?"":"-rtl"),m("ispreset")?f.find(".rateit-selected").addClass(c):f.find(".rateit-selected").removeClass(c),null!=m("value")&&(d=(m("value")-m("min"))*m("starwidth"),f.find(".rateit-selected").width(d)),h=f.find(".rateit-reset"),h.data("wired")!==!0&&h.click(function(){m("value",m("min")),u.find(".rateit-hover").hide().width(0),u.find(".rateit-selected").width(0).show(),m("backingfld")&&e(m("backingfld")).val(m("min")),f.trigger("reset")}).data("wired",!0),p=function(t,i){var n=i.changedTouches?i.changedTouches[0].pageX:i.pageX,o=n-e(t).offset().left;return s||(o=u.width()-o),o>u.width()&&(o=u.width()),0>o&&(o=0),d=Math.ceil(o/m("starwidth")*(1/m("step")))},m("readonly")?h.hide():(m("resetable")||h.hide(),m("wired")||(u.bind("touchmove touchend",t),u.mousemove(function(e){var t,i=p(this,e),n=i*m("starwidth")*m("step"),s=u.find(".rateit-hover");s.data("width")!=n&&(u.find(".rateit-selected").hide(),s.width(n).show().data("width",n),t=[i*m("step")+m("min")],f.trigger("hover",t).trigger("over",t))}),u.mouseleave(function(){u.find(".rateit-hover").hide().width(0).data("width",""),f.trigger("hover",[null]).trigger("over",[null]),u.find(".rateit-selected").show()}),u.mouseup(function(t){var i=p(this,t),n=i*m("step")+m("min");m("value",n),m("backingfld")&&e(m("backingfld")).val(n),m("ispreset")&&(u.find(".rateit-selected").removeClass(c),m("ispreset",!1)),u.find(".rateit-hover").hide(),u.find(".rateit-selected").width(i*m("starwidth")*m("step")).show(),f.trigger("hover",[null]).trigger("over",[null]).trigger("rated",[n])}),m("wired",!0)),m("resetable")&&h.show())})},e.fn.rateit.defaults={min:0,max:5,step:.5,starwidth:16,starheight:16,readonly:!1,resetable:!0,ispreset:!1},e(function(){e("div.rateit").rateit()})}(jQuery),/*
 * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
 * http://benalman.com/projects/jquery-bbq-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
function(e,t){function i(e){return"string"==typeof e}function n(e){var t=v.call(arguments,1);return function(){return e.apply(this,t.concat(v.call(arguments)))}}function s(e){return e.replace(/^[^#]*#?(.*)$/,"$1")}function o(e){return e.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function a(n,s,o,a,r){var l,c,h,p,f;return a!==u?(h=o.match(n?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/),f=h[3]||"",2===r&&i(a)?c=a.replace(n?M:N,""):(p=d(h[2]),a=i(a)?d[n?C:k](a):a,c=2===r?a:1===r?e.extend({},a,p):e.extend({},p,a),c=b(c),n&&(c=c.replace(g,y))),l=h[1]+(n?"#":c||!h[1]?"?":"")+c+f):l=s(o!==u?o:t[D][E]),l}function r(e,t,n){return t===u||"boolean"==typeof t?(n=t,t=b[e?C:k]()):t=i(t)?t.replace(e?M:N,""):t,d(t,n)}function l(t,n,s,o){return i(s)||"object"==typeof s||(o=s,s=n,n=u),this.each(function(){var i=e(this),a=n||m()[(this.nodeName||"").toLowerCase()]||"",r=a&&i.attr(a)||"";i.attr(a,b[t](r,s,o))})}var u,c,d,h,p,f,m,g,v=Array.prototype.slice,y=decodeURIComponent,b=e.param,w=e.bbq=e.bbq||{},_=e.event.special,x="hashchange",k="querystring",C="fragment",T="elemUrlAttr",D="location",E="href",S="src",N=/^.*\?|#.*$/g,M=/^.*\#/,z={};b[k]=n(a,0,o),b[C]=c=n(a,1,s),c.noEscape=function(t){t=t||"";var i=e.map(t.split(""),encodeURIComponent);g=new RegExp(i.join("|"),"g")},c.noEscape(",/"),e.deparam=d=function(t,i){var n={},s={"true":!0,"false":!1,"null":null};return e.each(t.replace(/\+/g," ").split("&"),function(t,o){var a,r=o.split("="),l=y(r[0]),c=n,d=0,h=l.split("]["),p=h.length-1;if(/\[/.test(h[0])&&/\]$/.test(h[p])?(h[p]=h[p].replace(/\]$/,""),h=h.shift().split("[").concat(h),p=h.length-1):p=0,2===r.length)if(a=y(r[1]),i&&(a=a&&!isNaN(a)?+a:"undefined"===a?u:s[a]!==u?s[a]:a),p)for(;p>=d;d++)l=""===h[d]?c.length:h[d],c=c[l]=p>d?c[l]||(h[d+1]&&isNaN(h[d+1])?{}:[]):a;else e.isArray(n[l])?n[l].push(a):n[l]=n[l]!==u?[n[l],a]:a;else l&&(n[l]=i?u:"")}),n},d[k]=n(r,0),d[C]=h=n(r,1),e[T]||(e[T]=function(t){return e.extend(z,t)})({a:E,base:E,iframe:S,img:S,input:S,form:"action",link:E,script:S}),m=e[T],e.fn[k]=n(l,k),e.fn[C]=n(l,C),w.pushState=p=function(e,n){i(e)&&/^#/.test(e)&&n===u&&(n=2);var s=e!==u,o=c(t[D][E],s?e:{},s?n:2);t[D][E]=o+(/#/.test(o)?"":"#")},w.getState=f=function(e,t){return e===u||"boolean"==typeof e?h(e):h(t)[e]},w.removeState=function(t){var i={};t!==u&&(i=f(),e.each(e.isArray(t)?t:arguments,function(e,t){delete i[t]})),p(i,2)},_[x]=e.extend(_[x],{add:function(t){function i(e){var t=e[C]=c();e.getState=function(e,i){return e===u||"boolean"==typeof e?d(t,e):d(t,i)[e]},n.apply(this,arguments)}var n;return e.isFunction(t)?(n=t,i):(n=t.handler,t.handler=i,void 0)}})}(jQuery,this),/*
 * jQuery hashchange event - v1.2 - 2/11/2010
 * http://benalman.com/projects/jquery-hashchange-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
function(e,t){function i(e){return e=e||t[o][r],e.replace(/^[^#]*#?(.*)$/,"$1")}var n,s=e.event.special,o="location",a="hashchange",r="href",l=(document.documentMode,!1),u="on"+a in t&&!l;e[a+"Delay"]=100,s[a]=e.extend(s[a],{setup:function(){return u?!1:(e(n.start),void 0)},teardown:function(){return u?!1:(e(n.stop),void 0)}}),n=function(){function n(){c=d=function(e){return e},l&&(u=e('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow,d=function(){return i(u.document[o][r])},c=function(e,t){if(e!==t){var i=u.document;i.open().close(),i[o].hash="#"+e}},c(i()))}var s,u,c,d,h={};return h.start=function(){if(!s){var l=i();c||n(),function u(){var n=i(),h=d(l);n!==l?(c(l=n,h),e(t).trigger(a)):h!==l&&(t[o][r]=t[o][r].replace(/#.*/,"")+"#"+h),s=setTimeout(u,e[a+"Delay"])}()}},h.stop=function(){u||(s&&clearTimeout(s),s=0)},h}()}(jQuery,this),/*!
 * JSizes - JQuery plugin v0.33
 *
 * Licensed under the revised BSD License.
 * Copyright 2008-2010 Bram Stein
 * All rights reserved.
 */
function(e){var t=function(e){return parseInt(e,10)||0};e.each(["min","max"],function(i,n){e.fn[n+"Size"]=function(e){var i,s;return e?(void 0!==e.width&&this.css(n+"-width",e.width),void 0!==e.height&&this.css(n+"-height",e.height),this):(i=this.css(n+"-width"),s=this.css(n+"-height"),{width:"max"===n&&(void 0===i||"none"===i||-1===t(i))&&Number.MAX_VALUE||t(i),height:"max"===n&&(void 0===s||"none"===s||-1===t(s))&&Number.MAX_VALUE||t(s)})}}),e.fn.isVisible=function(){return this.is(":visible")},e.each(["border","margin","padding"],function(i,n){e.fn[n]=function(e){return e?(void 0!==e.top&&this.css(n+"-top"+("border"===n?"-width":""),e.top),void 0!==e.bottom&&this.css(n+"-bottom"+("border"===n?"-width":""),e.bottom),void 0!==e.left&&this.css(n+"-left"+("border"===n?"-width":""),e.left),void 0!==e.right&&this.css(n+"-right"+("border"===n?"-width":""),e.right),this):{top:t(this.css(n+"-top"+("border"===n?"-width":""))),bottom:t(this.css(n+"-bottom"+("border"===n?"-width":""))),left:t(this.css(n+"-left"+("border"===n?"-width":""))),right:t(this.css(n+"-right"+("border"===n?"-width":"")))}}})}(jQuery),/**
 * @preserve jLayout Border Layout - JavaScript Layout Algorithms v0.4
 *
 * Licensed under the new BSD License.
 * Copyright 2008-2009, Bram Stein
 * All rights reserved.
 */
function(){jLayout="undefined"==typeof jLayout?{}:jLayout,jLayout.border=function(e){function t(e){return function(t){var n,u=t.insets(),c=0,d=0;return s&&s.isVisible()&&(n=s[e+"Size"](),c+=n.width+i.hgap,d=n.height),o&&o.isVisible()&&(n=o[e+"Size"](),c+=n.width+i.hgap,d=Math.max(n.height,d)),l&&l.isVisible()&&(n=l[e+"Size"](),c+=n.width,d=Math.max(n.height,d)),a&&a.isVisible()&&(n=a[e+"Size"](),c=Math.max(n.width,c),d+=n.height+i.vgap),r&&r.isVisible()&&(n=r[e+"Size"](),c=Math.max(n.width,c),d+=n.height+i.vgap),{width:c+u.left+u.right,height:d+u.top+u.bottom}}}var i={},n={},s=e.east,o=e.west,a=e.north,r=e.south,l=e.center;return i.hgap=e.hgap||0,i.vgap=e.vgap||0,n.items=function(){var e=[];return s&&e.push(s),o&&e.push(o),a&&e.push(a),r&&e.push(r),l&&e.push(l),e},n.layout=function(e){var t,n=e.bounds(),u=e.insets(),c=u.top,d=n.height-u.bottom,h=u.left,p=n.width-u.right;return a&&a.isVisible()&&(t=a.preferredSize(),a.bounds({x:h,y:c,width:p-h,height:t.height}),a.doLayout(),c+=t.height+i.vgap),r&&r.isVisible()&&(t=r.preferredSize(),r.bounds({x:h,y:d-t.height,width:p-h,height:t.height}),r.doLayout(),d-=t.height+i.vgap),s&&s.isVisible()&&(t=s.preferredSize(),s.bounds({x:p-t.width,y:c,width:t.width,height:d-c}),s.doLayout(),p-=t.width+i.hgap),o&&o.isVisible()&&(t=o.preferredSize(),o.bounds({x:h,y:c,width:t.width,height:d-c}),o.doLayout(),h+=t.width+i.hgap),l&&l.isVisible()&&(l.bounds({x:h,y:c,width:p-h,height:d-c}),l.doLayout()),e},n.preferred=t("preferred"),n.minimum=t("minimum"),n.maximum=t("maximum"),n}}(),/**
 * @preserve jLayout JQuery Plugin v0.17
 *
 * Licensed under the new BSD License.
 * Copyright 2008-2009 Bram Stein
 * All rights reserved.
 */
jQuery&&jLayout&&function(e){function t(t,i){var n={};return e.each(["min","max"],function(e,i){n[i+"imumSize"]=function(e){var s=t.data("jlayout");return s?s[i+"imum"](n):t[i+"Size"](e)}}),e.extend(n,{doLayout:function(){var e=t.data("jlayout");e&&e.layout(n),t.css({position:"absolute"})},isVisible:function(){return t.isVisible()},insets:function(){var e=t.padding(),i=t.border();return{top:e.top,bottom:e.bottom+i.bottom+i.top,left:e.left,right:e.right+i.right+i.left}},bounds:function(e){var i={};return e?("number"==typeof e.x&&(i.left=e.x),"number"==typeof e.y&&(i.top=e.y),"number"==typeof e.width&&(i.width=e.width-(t.outerWidth(!0)-t.width()),i.width=i.width>=0?i.width:0),"number"==typeof e.height&&(i.height=e.height-(t.outerHeight(!0)-t.height()),i.height=i.height>=0?i.height:0),t.css(i),t):(i=t.position(),{x:i.left,y:i.top,width:t.outerWidth(!1),height:t.outerHeight(!1)})},preferredSize:function(){var e,s,o=t.margin(),a={width:0,height:0},r=t.data("jlayout");return r&&i?(a=r.preferred(n),e=n.minimumSize(),s=n.maximumSize(),a.width+=o.left+o.right,a.height+=o.top+o.bottom,a.width<e.width||a.height<e.height?(a.width=Math.max(a.width,e.width),a.height=Math.max(a.height,e.height)):(a.width>s.width||a.height>s.height)&&(a.width=Math.min(a.width,s.width),a.height=Math.min(a.height,s.height))):(a=n.bounds(),a.width+=o.left+o.right,a.height+=o.top+o.bottom),a}}),n}e.fn.layout=function(i){var n=e.extend({},e.fn.layout.defaults,i);return e.each(this,function(){var i=e(this),s=i.data("layout")?e.extend(n,i.data("layout")):n,o=t(i,s.resize);"border"===s.type&&"undefined"!=typeof jLayout.border?(e.each(["north","south","west","east","center"],function(e,n){i.children().hasClass(n)&&(s[n]=t(i.children("."+n+":first")))}),i.data("jlayout",jLayout.border(s))):"grid"===s.type&&"undefined"!=typeof jLayout.grid?(s.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(s.items[i]=t(e(this)))}),i.data("jlayout",jLayout.grid(s))):"flexGrid"===s.type&&"undefined"!=typeof jLayout.flexGrid?(s.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(s.items[i]=t(e(this)))}),i.data("jlayout",jLayout.flexGrid(s))):"column"===s.type&&"undefined"!=typeof jLayout.column?(s.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(s.items[i]=t(e(this)))}),i.data("jlayout",jLayout.column(s))):"flow"===s.type&&"undefined"!=typeof jLayout.flow&&(s.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(s.items[i]=t(e(this)))}),i.data("jlayout",jLayout.flow(s))),s.resize&&o.bounds(o.preferredSize()),o.doLayout(),i.css({position:"relative"}),void 0!==e.ui&&i.addClass("ui-widget")})},e.fn.layout.defaults={resize:!0,type:"grid"}}(jQuery),/*
 * jQuery Templates Plugin 1.0.0pre
 * http://github.com/jquery/jquery-tmpl
 * Requires jQuery 1.4.2
 *
 * Copyright 2011, Software Freedom Conservancy, Inc.
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 */
function(e){function t(t,i,n,s){var o={data:s||0===s||s===!1?s:i?i.data:{},_wrap:i?i._wrap:null,tmpl:null,parent:i||null,nodes:[],calls:u,nest:c,wrap:d,html:h,update:p};return t&&e.extend(o,t,{nodes:[],parent:i}),n&&(o.tmpl=n,o._ctnt=o._ctnt||o.tmpl(e,o),o.key=++_,(k.length?b:y)[_]=o),o}function i(t,s,o){var a,r=o?e.map(o,function(e){return"string"==typeof e?t.key?e.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+g+'="'+t.key+'" $2'):e:i(e,t,e._ctnt)}):t;return s?r:(r=r.join(""),r.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(t,i,s,o){a=e(s).get(),l(a),i&&(a=n(i).concat(a)),o&&(a=a.concat(n(o)))}),a?a:n(r))}function n(t){var i=document.createElement("div");return i.innerHTML=t,e.makeArray(i.childNodes)}function s(t){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+e.trim(t).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(t,i,n,s,o,r,l){var u,c,d,h=e.tmpl.tag[n];if(!h)throw"Unknown template tag: "+n;return u=h._default||[],r&&!/\w$/.test(o)&&(o+=r,r=""),o?(o=a(o),l=l?","+a(l)+")":r?")":"",c=r?o.indexOf(".")>-1?o+a(r):"("+o+").call($item"+l:o,d=r?c:"(typeof("+o+")==='function'?("+o+").call($item):("+o+"))"):d=c=u.$1||"null",s=a(s),"');"+h[i?"close":"open"].split("$notnull_1").join(o?"typeof("+o+")!=='undefined' && ("+o+")!=null":"true").split("$1a").join(d).split("$1").join(c).split("$2").join(s||u.$2||"")+"__.push('"})+"');}return __;")}function o(t,n){t._wrap=i(t,!0,e.isArray(n)?n:[v.test(n)?n:e(n).html()]).join("")}function a(e){return e?e.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function r(e){var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}function l(i){function n(i){function n(e){e+=u,a=c[e]=c[e]||t(a,y[a.parent.key+u]||a.parent)}var s,o,a,r,l=i;if(r=i.getAttribute(g)){for(;l.parentNode&&1===(l=l.parentNode).nodeType&&!(s=l.getAttribute(g)););s!==r&&(l=l.parentNode?11===l.nodeType?0:l.getAttribute(g)||0:0,(a=y[r])||(a=b[r],a=t(a,y[l]||b[l]),a.key=++_,y[_]=a),x&&n(r)),i.removeAttribute(g)}else x&&(a=e.data(i,"tmplItem"))&&(n(a.key),y[a.key]=a,l=e.data(i.parentNode,"tmplItem"),l=l?l.key:0);if(a){for(o=a;o&&o.key!=l;)o.nodes.push(i),o=o.parent;delete a._ctnt,delete a._wrap,e.data(i,"tmplItem",a)}}var s,o,a,r,l,u="_"+x,c={};for(a=0,r=i.length;r>a;a++)if(1===(s=i[a]).nodeType){for(o=s.getElementsByTagName("*"),l=o.length-1;l>=0;l--)n(o[l]);n(s)}}function u(e,t,i,n){return e?(k.push({_:e,tmpl:t,item:this,data:i,options:n}),void 0):k.pop()}function c(t,i,n){return e.tmpl(e.template(t),i,n,this)}function d(t,i){var n=t.options||{};return n.wrapped=i,e.tmpl(e.template(t.tmpl),t.data,n,t.item)}function h(t,i){var n=this._wrap;return e.map(e(e.isArray(n)?n.join(""):n).filter(t||"*"),function(e){return i?e.innerText||e.textContent:e.outerHTML||r(e)})}function p(){var t=this.nodes;e.tmpl(null,null,null,this).insertBefore(t[0]),e(t).remove()}var f,m=e.fn.domManip,g="_tmplitem",v=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,y={},b={},w={key:0,data:{}},_=0,x=0,k=[];e.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,i){e.fn[t]=function(n){var s,o,a,r,l=[],u=e(n),c=1===this.length&&this[0].parentNode;if(f=y||{},c&&11===c.nodeType&&1===c.childNodes.length&&1===u.length)u[i](this[0]),l=this;else{for(o=0,a=u.length;a>o;o++)x=o,s=(o>0?this.clone(!0):this).get(),e(u[o])[i](s),l=l.concat(s);x=0,l=this.pushStack(l,t,u.selector)}return r=f,f=null,e.tmpl.complete(r),l}}),e.fn.extend({tmpl:function(t,i,n){return e.tmpl(this[0],t,i,n)},tmplItem:function(){return e.tmplItem(this[0])},template:function(t){return e.template(t,this[0])},domManip:function(t,i,n){if(t[0]&&e.isArray(t[0])){for(var s,o=e.makeArray(arguments),a=t[0],r=a.length,l=0;r>l&&!(s=e.data(a[l++],"tmplItem")););s&&x&&(o[2]=function(t){e.tmpl.afterManip(this,t,n)}),m.apply(this,o)}else m.apply(this,arguments);return x=0,!f&&e.tmpl.complete(y),this}}),e.extend({tmpl:function(n,s,a,r){var l,u=!r;if(u)r=w,n=e.template[n]||e.template(null,n),b={};else if(!n)return n=r.tmpl,y[r.key]=r,r.nodes=[],r.wrapped&&o(r,r.wrapped),e(i(r,null,r.tmpl(e,r)));return n?("function"==typeof s&&(s=s.call(r||{})),a&&a.wrapped&&o(a,a.wrapped),l=e.isArray(s)?e.map(s,function(e){return e?t(a,r,n,e):null}):[t(a,r,n,s)],u?e(i(r,null,l)):l):[]},tmplItem:function(t){var i;for(t instanceof e&&(t=t[0]);t&&1===t.nodeType&&!(i=e.data(t,"tmplItem"))&&(t=t.parentNode););return i||w},template:function(t,i){return i?("string"==typeof i?i=s(i):i instanceof e&&(i=i[0]||{}),i.nodeType&&(i=e.data(i,"tmpl")||e.data(i,"tmpl",s(i.innerHTML))),"string"==typeof t?e.template[t]=i:i):t?"string"!=typeof t?e.template(null,t):e.template[t]||e.template(null,v.test(t)?t:e(t)):null},encode:function(e){return(""+e).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}}),e.extend(e.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){y={}},afterManip:function(t,i,n){var s=11===i.nodeType?e.makeArray(i.childNodes):1===i.nodeType?[i]:[];n.call(t,i),l(s),x++}})}(jQuery),function(){function e(e){throw e}function t(e){return function(){return e}}function i(i){function d(e,t,i,n,o){var a=[];return e=$.j(function(){var e=t(i,o)||[];0<a.length&&($.a.Ya(h(a),e),n&&$.r.K(n,s,[i,e,o])),a.splice(0,a.length),$.a.P(a,e)},s,{W:e,Ka:function(){return 0==a.length||!$.a.X(a[0])}}),{M:a,j:e.pa()?e:c}}function h(e){for(;e.length&&!$.a.X(e[0]);)e.splice(0,1);if(1<e.length){for(var t=e[0],i=e[e.length-1],n=[t];t!==i;){if(t=t.nextSibling,!t)return;n.push(t)}Array.prototype.splice.apply(e,[0,e.length].concat(n))}return e}function p(e,t,i,n,s){var o,a,r,l,u,c=Math.min,d=Math.max,h=[],p=e.length,f=t.length,m=f-p||1,g=p+f+1;for(o=0;p>=o;o++)for(l=r,h.push(r=[]),u=c(f,o+m),a=d(0,o-1);u>=a;a++)r[a]=a?o?e[o-1]===t[a-1]?l[a-1]:c(l[a]||g,r[a-1]||g)+1:a+1:o+1;for(c=[],d=[],m=[],o=p,a=f;o||a;)f=h[o][a]-1,a&&f===h[o][a-1]?d.push(c[c.length]={status:i,value:t[--a],index:a}):o&&f===h[o-1][a]?m.push(c[c.length]={status:n,value:e[--o],index:o}):(c.push({status:"retained",value:t[--a]}),--o);if(d.length&&m.length){e=10*p;var v;for(t=i=0;(s||e>t)&&(v=d[i]);i++){for(n=0;h=m[n];n++)if(v.value===h.value){v.moved=h.index,h.moved=v.index,m.splice(n,1),t=n=0;break}t+=n}}return c.reverse()}function f(t,i,a,r,l){l=l||{};var u=t&&m(t),u=u&&u.ownerDocument,c=l.templateEngine||X;switch($.za.vb(a,c,u),a=c.renderTemplate(a,r,l,u),("number"!=typeof a.length||0<a.length&&"number"!=typeof a[0].nodeType)&&e(Error("Template engine must return an array of DOM nodes")),u=o,i){case"replaceChildren":$.e.N(t,a),u=n;break;case"replaceNode":$.a.Ya(t,a),u=n;break;case"ignoreTargetNode":break;default:e(Error("Unknown renderMode: "+i))}return u&&(g(a,r),l.afterRender&&$.r.K(l.afterRender,s,[a,r.$data])),a}function m(e){return e.nodeType?e:0<e.length?e[0]:s}function g(e,t){if(e.length){var i=e[0],n=e[e.length-1];v(i,n,function(e){$.Da(t,e)}),v(i,n,function(e){$.s.ib(e,[t])})}}function v(e,t,i){var n;for(t=$.e.nextSibling(t);e&&(n=e)!==t;)e=$.e.nextSibling(n),(1===n.nodeType||8===n.nodeType)&&i(n)}function y(t,i,n){t=$.g.aa(t);for(var s=$.g.Q,o=0;o<t.length;o++){var a=t[o].key;if(s.hasOwnProperty(a)){var r=s[a];"function"==typeof r?(a=r(t[o].value))&&e(Error(a)):r||e(Error("This template engine does not support the '"+a+"' binding within its templates"))}}return t="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+$.g.ba(t)+" } })()})",n.createJavaScriptEvaluatorBlock(t)+i}function b(t,i,n,o){function a(e){return function(){return l[e]}}function r(){return l}var l,u,d=0;return $.j(function(){var s=n&&n instanceof $.z?n:new $.z($.a.d(n)),h=s.$data;if(o&&$.eb(t,s),l=("function"==typeof i?i(s,t):i)||$.J.instance.getBindings(t,s)){if(0===d){d=1;for(var p in l){var f=$.c[p];f&&8===t.nodeType&&!$.e.I[p]&&e(Error("The binding '"+p+"' cannot be used with virtual elements")),f&&"function"==typeof f.init&&(f=f.init(t,a(p),r,h,s))&&f.controlsDescendantBindings&&(u!==c&&e(Error("Multiple bindings ("+u+" and "+p+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")),u=p)}d=2}if(2===d)for(p in l)(f=$.c[p])&&"function"==typeof f.update&&f.update(t,a(p),r,h,s)}},s,{W:t}),{Nb:u===c}}function w(e,t,i){var o=n,a=1===t.nodeType;a&&$.e.Ta(t),(a&&i||$.J.instance.nodeHasBindings(t))&&(o=b(t,s,e,i).Nb),o&&_(e,t,!a)}function _(e,t,i){for(var n=$.e.firstChild(t);t=n;)n=$.e.nextSibling(t),w(e,t,i)}function x(e,t){var i=k(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:s}function k(t,i){for(var n=t,o=1,a=[];n=n.nextSibling;){if(C(n)&&(o--,0===o))return a;a.push(n),T(n)&&o++}return i||e(Error("Cannot find closing comment tag to match: "+t.nodeValue)),s}function C(e){return 8==e.nodeType&&(L?e.text:e.nodeValue).match(F)}function T(e){return 8==e.nodeType&&(L?e.text:e.nodeValue).match(W)}function D(e,t){for(var i=s;e!=i;)i=e,e=e.replace(I,function(e,i){return t[i]});return e}function E(){var e=[],t=[];this.save=function(i,n){var s=$.a.i(e,i);s>=0?t[s]=n:(e.push(i),t.push(n))},this.get=function(i){return i=$.a.i(e,i),i>=0?t[i]:c}}function S(e,t,i){function n(n){var s=t(e[n]);switch(typeof s){case"boolean":case"number":case"string":case"function":o[n]=s;break;case"object":case"undefined":var a=i.get(s);o[n]=a!==c?a:S(s,t,i)}}if(i=i||new E,e=t(e),"object"!=typeof e||e===s||e===c||e instanceof Date)return e;var o=e instanceof Array?[]:{};i.save(e,o);var a=e;if(a instanceof Array){for(var r=0;r<a.length;r++)n(r);"function"==typeof a.toJSON&&n("toJSON")}else for(r in a)n(r);return o}function N(e,t){if(e)if(8==e.nodeType){var i=$.s.Ua(e.nodeValue);i!=s&&t.push({sb:e,Fb:i})}else if(1==e.nodeType)for(var i=0,n=e.childNodes,o=n.length;o>i;i++)N(n[i],t)}function M(e,t,i,s){$.c[e]={init:function(e){return $.a.f.set(e,U,{}),{controlsDescendantBindings:n}},update:function(e,o,a,r,l){a=$.a.f.get(e,U),o=$.a.d(o()),r=!i!=!o;var u=!a.Za;(u||t||r!==a.qb)&&(u&&(a.Za=$.a.Ia($.e.childNodes(e),n)),r?(u||$.e.N(e,$.a.Ia(a.Za)),$.Ea(s?s(l,o):l,e)):$.e.Y(e),a.qb=r)}},$.g.Q[e]=o,$.e.I[e]=n}function z(e,t,i){i&&t!==$.k.q(e)&&$.k.T(e,t),t!==$.k.q(e)&&$.r.K($.a.Ba,s,[e,"change"])}var $="undefined"!=typeof i?i:{};$.b=function(e,t){for(var i=e.split("."),n=$,s=0;s<i.length-1;s++)n=n[i[s]];n[i[i.length-1]]=t},$.p=function(e,t,i){e[t]=i},$.version="2.2.1",$.b("version",$.version),$.a=new function(){function t(e,t){if("input"!==$.a.u(e)||!e.type||"click"!=t.toLowerCase())return o;var i=e.type;return"checkbox"==i||"radio"==i}var i=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,d={},h={};d[/Firefox\/2/i.test(l.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],d.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");for(var p in d){var f=d[p];if(f.length)for(var m=0,g=f.length;g>m;m++)h[f[m]]=p}var v,y={propertychange:n},d=3;for(p=r.createElement("div"),f=p.getElementsByTagName("i");p.innerHTML="<!--[if gt IE "+ ++d+"]><i></i><![endif]-->",f[0];);return v=d>4?d:c,{Na:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],o:function(e,t){for(var i=0,n=e.length;n>i;i++)t(e[i])},i:function(e,t){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(e,t);for(var i=0,n=e.length;n>i;i++)if(e[i]===t)return i;return-1},lb:function(e,t,i){for(var n=0,o=e.length;o>n;n++)if(t.call(i,e[n]))return e[n];return s},ga:function(e,t){var i=$.a.i(e,t);i>=0&&e.splice(i,1)},Ga:function(e){e=e||[];for(var t=[],i=0,n=e.length;n>i;i++)0>$.a.i(t,e[i])&&t.push(e[i]);return t},V:function(e,t){e=e||[];for(var i=[],n=0,s=e.length;s>n;n++)i.push(t(e[n]));return i},fa:function(e,t){e=e||[];for(var i=[],n=0,s=e.length;s>n;n++)t(e[n])&&i.push(e[n]);return i},P:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,n=t.length;n>i;i++)e.push(t[i]);return e},extend:function(e,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},ka:function(e){for(;e.firstChild;)$.removeNode(e.firstChild)},Hb:function(e){e=$.a.L(e);for(var t=r.createElement("div"),i=0,n=e.length;n>i;i++)t.appendChild($.A(e[i]));return t},Ia:function(e,t){for(var i=0,s=e.length,o=[];s>i;i++){var a=e[i].cloneNode(n);o.push(t?$.A(a):a)}return o},N:function(e,t){if($.a.ka(e),t)for(var i=0,n=t.length;n>i;i++)e.appendChild(t[i])},Ya:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var n=i[0],s=n.parentNode,o=0,a=t.length;a>o;o++)s.insertBefore(t[o],n);for(o=0,a=i.length;a>o;o++)$.removeNode(i[o])}},bb:function(e,t){7>v?e.setAttribute("selected",t):e.selected=t},D:function(e){return(e||"").replace(i,"")},Rb:function(e,t){for(var i=[],n=(e||"").split(t),s=0,o=n.length;o>s;s++){var a=$.a.D(n[s]);""!==a&&i.push(a)}return i},Ob:function(e,t){return e=e||"",t.length>e.length?o:e.substring(0,t.length)===t},tb:function(e,t){if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e!=s;){if(e==t)return n;e=e.parentNode}return o},X:function(e){return $.a.tb(e,e.ownerDocument)},u:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},n:function(i,s,a){var r=v&&y[s];if(r||"undefined"==typeof u)r||"function"!=typeof i.addEventListener?"undefined"!=typeof i.attachEvent?i.attachEvent("on"+s,function(e){a.call(i,e)}):e(Error("Browser doesn't support addEventListener or attachEvent")):i.addEventListener(s,a,o);else{if(t(i,s)){var l=a;a=function(e,t){var i=this.checked;t&&(this.checked=t.nb!==n),l.call(this,e),this.checked=i}}u(i).bind(s,a)}},Ba:function(i,s){if((!i||!i.nodeType)&&e(Error("element must be a DOM node when calling triggerEvent")),"undefined"!=typeof u){var l=[];t(i,s)&&l.push({nb:i.checked}),u(i).trigger(s,l)}else"function"==typeof r.createEvent?"function"==typeof i.dispatchEvent?(l=r.createEvent(h[s]||"HTMLEvents"),l.initEvent(s,n,n,a,0,0,0,0,0,o,o,o,o,0,i),i.dispatchEvent(l)):e(Error("The supplied element doesn't support dispatchEvent")):"undefined"!=typeof i.fireEvent?(t(i,s)&&(i.checked=i.checked!==n),i.fireEvent("on"+s)):e(Error("Browser doesn't support triggering events"))},d:function(e){return $.$(e)?e():e},ua:function(e){return $.$(e)?e.t():e},da:function(e,t,i){if(t){var n=/[\w-]+/g,s=e.className.match(n)||[];$.a.o(t.match(n),function(e){var t=$.a.i(s,e);t>=0?i||s.splice(t,1):i&&s.push(e)}),e.className=s.join(" ")}},cb:function(e,t){var i=$.a.d(t);if((i===s||i===c)&&(i=""),3===e.nodeType)e.data=i;else{var n=$.e.firstChild(e);!n||3!=n.nodeType||$.e.nextSibling(n)?$.e.N(e,[r.createTextNode(i)]):n.data=i,$.a.wb(e)}},ab:function(e,t){if(e.name=t,7>=v)try{e.mergeAttributes(r.createElement("<input name='"+e.name+"'/>"),o)}catch(i){}},wb:function(e){v>=9&&(e=1==e.nodeType?e:e.parentNode,e.style&&(e.style.zoom=e.style.zoom))},ub:function(e){if(v>=9){var t=e.style.width;e.style.width=0,e.style.width=t}},Lb:function(e,t){e=$.a.d(e),t=$.a.d(t);for(var i=[],n=e;t>=n;n++)i.push(n);return i},L:function(e){for(var t=[],i=0,n=e.length;n>i;i++)t.push(e[i]);return t},Pb:6===v,Qb:7===v,Z:v,Oa:function(e,t){for(var i=$.a.L(e.getElementsByTagName("input")).concat($.a.L(e.getElementsByTagName("textarea"))),n="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},s=[],o=i.length-1;o>=0;o--)n(i[o])&&s.push(i[o]);return s},Ib:function(e){return"string"==typeof e&&(e=$.a.D(e))?a.JSON&&a.JSON.parse?a.JSON.parse(e):new Function("return "+e)():s},xa:function(t,i,n){return("undefined"==typeof JSON||"undefined"==typeof JSON.stringify)&&e(Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js")),JSON.stringify($.a.d(t),i,n)},Jb:function(e,t,i){i=i||{};var n=i.params||{},s=i.includeFields||this.Na,o=e;if("object"==typeof e&&"form"===$.a.u(e))for(var o=e.action,a=s.length-1;a>=0;a--)for(var l=$.a.Oa(e,s[a]),u=l.length-1;u>=0;u--)n[l[u].name]=l[u].value;t=$.a.d(t);var c=r.createElement("form");c.style.display="none",c.action=o,c.method="post";for(var d in t)e=r.createElement("input"),e.name=d,e.value=$.a.xa($.a.d(t[d])),c.appendChild(e);for(d in n)e=r.createElement("input"),e.name=d,e.value=n[d],c.appendChild(e);r.body.appendChild(c),i.submitter?i.submitter(c):c.submit(),setTimeout(function(){c.parentNode.removeChild(c)},0)}}},$.b("utils",$.a),$.b("utils.arrayForEach",$.a.o),$.b("utils.arrayFirst",$.a.lb),$.b("utils.arrayFilter",$.a.fa),$.b("utils.arrayGetDistinctValues",$.a.Ga),$.b("utils.arrayIndexOf",$.a.i),$.b("utils.arrayMap",$.a.V),$.b("utils.arrayPushAll",$.a.P),$.b("utils.arrayRemoveItem",$.a.ga),$.b("utils.extend",$.a.extend),$.b("utils.fieldsIncludedWithJsonPost",$.a.Na),$.b("utils.getFormFields",$.a.Oa),$.b("utils.peekObservable",$.a.ua),$.b("utils.postJson",$.a.Jb),$.b("utils.parseJson",$.a.Ib),$.b("utils.registerEventHandler",$.a.n),$.b("utils.stringifyJson",$.a.xa),$.b("utils.range",$.a.Lb),$.b("utils.toggleDomNodeCssClass",$.a.da),$.b("utils.triggerEvent",$.a.Ba),$.b("utils.unwrapObservable",$.a.d),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,i=Array.prototype.slice.call(arguments);return e=i.shift(),function(){return t.apply(e,i.concat(Array.prototype.slice.call(arguments)))}}),$.a.f=new function(){var e=0,t="__ko__"+(new Date).getTime(),i={};return{get:function(e,t){var i=$.a.f.la(e,o);return i===c?c:i[t]},set:function(e,t,i){i===c&&$.a.f.la(e,o)===c||($.a.f.la(e,n)[t]=i)},la:function(n,s){var o=n[t];if(!o||"null"===o||!i[o]){if(!s)return c;o=n[t]="ko"+e++,i[o]={}}return i[o]},clear:function(e){var a=e[t];return a?(delete i[a],e[t]=s,n):o}}},$.b("utils.domData",$.a.f),$.b("utils.domData.clear",$.a.f.clear),$.a.F=new function(){function t(e,t){var i=$.a.f.get(e,s);return i===c&&t&&(i=[],$.a.f.set(e,s,i)),i}function i(e){var n=t(e,o);if(n)for(var n=n.slice(0),s=0;s<n.length;s++)n[s](e);if($.a.f.clear(e),"function"==typeof u&&"function"==typeof u.cleanData&&u.cleanData([e]),r[e.nodeType])for(n=e.firstChild;e=n;)n=e.nextSibling,8===e.nodeType&&i(e)}var s="__ko_domNodeDisposal__"+(new Date).getTime(),a={1:n,8:n,9:n},r={1:n,9:n};return{Ca:function(i,s){"function"!=typeof s&&e(Error("Callback must be a function")),t(i,n).push(s)},Xa:function(e,i){var n=t(e,o);n&&($.a.ga(n,i),0==n.length&&$.a.f.set(e,s,c))},A:function(e){if(a[e.nodeType]&&(i(e),r[e.nodeType])){var t=[];$.a.P(t,e.getElementsByTagName("*"));for(var n=0,s=t.length;s>n;n++)i(t[n])}return e},removeNode:function(e){$.A(e),e.parentNode&&e.parentNode.removeChild(e)}}},$.A=$.a.F.A,$.removeNode=$.a.F.removeNode,$.b("cleanNode",$.A),$.b("removeNode",$.removeNode),$.b("utils.domNodeDisposal",$.a.F),$.b("utils.domNodeDisposal.addDisposeCallback",$.a.F.Ca),$.b("utils.domNodeDisposal.removeDisposeCallback",$.a.F.Xa),$.a.ta=function(e){var t;if("undefined"!=typeof u){if(u.parseHTML)t=u.parseHTML(e);else if((t=u.clean([e]))&&t[0]){for(e=t[0];e.parentNode&&11!==e.parentNode.nodeType;)e=e.parentNode;e.parentNode&&e.parentNode.removeChild(e)}}else{var i=$.a.D(e).toLowerCase();for(t=r.createElement("div"),i=i.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!i.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!i.indexOf("<td")||!i.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""],e="ignored<div>"+i[1]+e+i[2]+"</div>","function"==typeof a.innerShiv?t.appendChild(a.innerShiv(e)):t.innerHTML=e;i[0]--;)t=t.lastChild;t=$.a.L(t.lastChild.childNodes)}return t},$.a.ca=function(e,t){if($.a.ka(e),t=$.a.d(t),t!==s&&t!==c)if("string"!=typeof t&&(t=t.toString()),"undefined"!=typeof u)u(e).html(t);else for(var i=$.a.ta(t),n=0;n<i.length;n++)e.appendChild(i[n])},$.b("utils.parseHtmlFragment",$.a.ta),$.b("utils.setHtml",$.a.ca);var A={};$.s={ra:function(t){"function"!=typeof t&&e(Error("You can only pass a function to ko.memoization.memoize()"));var i=(0|4294967296*(1+Math.random())).toString(16).substring(1)+(0|4294967296*(1+Math.random())).toString(16).substring(1);return A[i]=t,"<!--[ko_memo:"+i+"]-->"},hb:function(t,i){var o=A[t];o===c&&e(Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized."));try{return o.apply(s,i||[]),n}finally{delete A[t]}},ib:function(e,t){var i=[];N(e,i);for(var n=0,s=i.length;s>n;n++){var o=i[n].sb,a=[o];t&&$.a.P(a,t),$.s.hb(i[n].Fb,a),o.nodeValue="",o.parentNode&&o.parentNode.removeChild(o)}},Ua:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:s}},$.b("memoization",$.s),$.b("memoization.memoize",$.s.ra),$.b("memoization.unmemoize",$.s.hb),$.b("memoization.parseMemoText",$.s.Ua),$.b("memoization.unmemoizeDomNodeAndDescendants",$.s.ib),$.Ma={throttle:function(e,t){e.throttleEvaluation=t;var i=s;return $.j({read:e,write:function(n){clearTimeout(i),i=setTimeout(function(){e(n)},t)}})},notify:function(e,i){return e.equalityComparer="always"==i?t(o):$.m.fn.equalityComparer,e}},$.b("extenders",$.Ma),$.fb=function(e,t,i){this.target=e,this.ha=t,this.rb=i,$.p(this,"dispose",this.B)},$.fb.prototype.B=function(){this.Cb=n,this.rb()},$.S=function(){this.w={},$.a.extend(this,$.S.fn),$.p(this,"subscribe",this.ya),$.p(this,"extend",this.extend),$.p(this,"getSubscriptionsCount",this.yb)},$.S.fn={ya:function(e,t,i){i=i||"change";var n=new $.fb(this,t?e.bind(t):e,function(){$.a.ga(this.w[i],n)}.bind(this));return this.w[i]||(this.w[i]=[]),this.w[i].push(n),n},notifySubscribers:function(e,t){t=t||"change",this.w[t]&&$.r.K(function(){$.a.o(this.w[t].slice(0),function(t){t&&t.Cb!==n&&t.ha(e)})},this)},yb:function(){var e,t=0;for(e in this.w)this.w.hasOwnProperty(e)&&(t+=this.w[e].length);return t},extend:function(e){var t=this;if(e)for(var i in e){var n=$.Ma[i];"function"==typeof n&&(t=n(t,e[i]))}return t}},$.Qa=function(e){return"function"==typeof e.ya&&"function"==typeof e.notifySubscribers},$.b("subscribable",$.S),$.b("isSubscribable",$.Qa);var H=[];$.r={mb:function(e){H.push({ha:e,La:[]})},end:function(){H.pop()},Wa:function(t){if($.Qa(t)||e(Error("Only subscribable things can act as dependencies")),0<H.length){var i=H[H.length-1];i&&!(0<=$.a.i(i.La,t))&&(i.La.push(t),i.ha(t))}},K:function(e,t,i){try{return H.push(s),e.apply(t,i||[])}finally{H.pop()}}};var O={undefined:n,"boolean":n,number:n,string:n};$.m=function(e){function t(){return 0<arguments.length?(t.equalityComparer&&t.equalityComparer(i,arguments[0])||(t.H(),i=arguments[0],t.G()),this):($.r.Wa(t),i)}var i=e;return $.S.call(t),t.t=function(){return i},t.G=function(){t.notifySubscribers(i)},t.H=function(){t.notifySubscribers(i,"beforeChange")},$.a.extend(t,$.m.fn),$.p(t,"peek",t.t),$.p(t,"valueHasMutated",t.G),$.p(t,"valueWillMutate",t.H),t},$.m.fn={equalityComparer:function(e,t){return e===s||typeof e in O?e===t:o}};var P=$.m.Kb="__ko_proto__";$.m.fn[P]=$.m,$.ma=function(e,t){return e===s||e===c||e[P]===c?o:e[P]===t?n:$.ma(e[P],t)},$.$=function(e){return $.ma(e,$.m)},$.Ra=function(e){return"function"==typeof e&&e[P]===$.m||"function"==typeof e&&e[P]===$.j&&e.zb?n:o},$.b("observable",$.m),$.b("isObservable",$.$),$.b("isWriteableObservable",$.Ra),$.R=function(t){0==arguments.length&&(t=[]),t!==s&&t!==c&&!("length"in t)&&e(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));var i=$.m(t);return $.a.extend(i,$.R.fn),i},$.R.fn={remove:function(e){for(var t=this.t(),i=[],n="function"==typeof e?e:function(t){return t===e},s=0;s<t.length;s++){var o=t[s];n(o)&&(0===i.length&&this.H(),i.push(o),t.splice(s,1),s--)}return i.length&&this.G(),i},removeAll:function(e){if(e===c){var t=this.t(),i=t.slice(0);return this.H(),t.splice(0,t.length),this.G(),i}return e?this.remove(function(t){return 0<=$.a.i(e,t)}):[]},destroy:function(e){var t=this.t(),i="function"==typeof e?e:function(t){return t===e};this.H();for(var s=t.length-1;s>=0;s--)i(t[s])&&(t[s]._destroy=n);this.G()},destroyAll:function(e){return e===c?this.destroy(t(n)):e?this.destroy(function(t){return 0<=$.a.i(e,t)}):[]},indexOf:function(e){var t=this();return $.a.i(t,e)},replace:function(e,t){var i=this.indexOf(e);i>=0&&(this.H(),this.t()[i]=t,this.G())}},$.a.o("pop push reverse shift sort splice unshift".split(" "),function(e){$.R.fn[e]=function(){var t=this.t();return this.H(),t=t[e].apply(t,arguments),this.G(),t}}),$.a.o(["slice"],function(e){$.R.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}}),$.b("observableArray",$.R),$.j=function(i,a,r){function l(){$.a.o(x,function(e){e.B()}),x=[]}function u(){var e=h.throttleEvaluation;e&&e>=0?(clearTimeout(k),k=setTimeout(d,e)):d()}function d(){if(!g)if(m&&w())_();else{g=n;try{var e=$.a.V(x,function(e){return e.target});$.r.mb(function(t){var i;0<=(i=$.a.i(e,t))?e[i]=c:x.push(t.ya(u))});for(var t=v.call(a),i=e.length-1;i>=0;i--)e[i]&&x.splice(i,1)[0].B();m=n,h.notifySubscribers(f,"beforeChange"),f=t}finally{$.r.end()}h.notifySubscribers(f),g=o,x.length||_()}}function h(){return 0<arguments.length?("function"==typeof y?y.apply(a,arguments):e(Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.")),this):(m||d(),$.r.Wa(h),f)}function p(){return!m||0<x.length}var f,m=o,g=o,v=i;v&&"object"==typeof v?(r=v,v=r.read):(r=r||{},v||(v=r.read)),"function"!=typeof v&&e(Error("Pass a function that returns the value of the ko.computed"));var y=r.write,b=r.disposeWhenNodeIsRemoved||r.W||s,w=r.disposeWhen||r.Ka||t(o),_=l,x=[],k=s;if(a||(a=r.owner),h.t=function(){return m||d(),f},h.xb=function(){return x.length},h.zb="function"==typeof r.write,h.B=function(){_()},h.pa=p,$.S.call(h),$.a.extend(h,$.j.fn),$.p(h,"peek",h.t),$.p(h,"dispose",h.B),$.p(h,"isActive",h.pa),$.p(h,"getDependenciesCount",h.xb),r.deferEvaluation!==n&&d(),b&&p()){_=function(){$.a.F.Xa(b,arguments.callee),l()},$.a.F.Ca(b,_);var C=w,w=function(){return!$.a.X(b)||C()}}return h},$.Bb=function(e){return $.ma(e,$.j)},i=$.m.Kb,$.j[i]=$.m,$.j.fn={},$.j.fn[i]=$.j,$.b("dependentObservable",$.j),$.b("computed",$.j),$.b("isComputed",$.Bb),$.gb=function(t){return 0==arguments.length&&e(Error("When calling ko.toJS, pass the object you want to convert.")),S(t,function(e){for(var t=0;$.$(e)&&10>t;t++)e=e();return e})},$.toJSON=function(e,t,i){return e=$.gb(e),$.a.xa(e,t,i)},$.b("toJS",$.gb),$.b("toJSON",$.toJSON),$.k={q:function(e){switch($.a.u(e)){case"option":return e.__ko__hasDomDataOptionValue__===n?$.a.f.get(e,$.c.options.sa):7>=$.a.Z?e.getAttributeNode("value").specified?e.value:e.text:e.value;case"select":return 0<=e.selectedIndex?$.k.q(e.options[e.selectedIndex]):c;default:return e.value}},T:function(e,t){switch($.a.u(e)){case"option":switch(typeof t){case"string":$.a.f.set(e,$.c.options.sa,c),"__ko__hasDomDataOptionValue__"in e&&delete e.__ko__hasDomDataOptionValue__,e.value=t;break;default:$.a.f.set(e,$.c.options.sa,t),e.__ko__hasDomDataOptionValue__=n,e.value="number"==typeof t?t:""}break;case"select":for(var i=e.options.length-1;i>=0;i--)if($.k.q(e.options[i])==t){e.selectedIndex=i;break}break;default:(t===s||t===c)&&(t=""),e.value=t}}},$.b("selectExtensions",$.k),$.b("selectExtensions.readValue",$.k.q),$.b("selectExtensions.writeValue",$.k.T);var I=/\@ko_token_(\d+)\@/g,j=["true","false"],R=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i;$.g={Q:[],aa:function(e){var t=$.a.D(e);if(3>t.length)return[];"{"===t.charAt(0)&&(t=t.substring(1,t.length-1)),e=[];for(var i,n=s,o=0;o<t.length;o++){var a=t.charAt(o);if(n===s)switch(a){case'"':case"'":case"/":n=o,i=a}else if(a==i&&"\\"!==t.charAt(o-1)){a=t.substring(n,o+1),e.push(a);var r="@ko_token_"+(e.length-1)+"@",t=t.substring(0,n)+r+t.substring(o+1),o=o-(a.length-r.length),n=s}}i=n=s;for(var l=0,u=s,o=0;o<t.length;o++){if(a=t.charAt(o),n===s)switch(a){case"{":n=o,u=a,i="}";break;case"(":n=o,u=a,i=")";break;case"[":n=o,u=a,i="]"}a===u?l++:a===i&&(l--,0===l&&(a=t.substring(n,o+1),e.push(a),r="@ko_token_"+(e.length-1)+"@",t=t.substring(0,n)+r+t.substring(o+1),o-=a.length-r.length,n=s))}for(i=[],t=t.split(","),n=0,o=t.length;o>n;n++)l=t[n],u=l.indexOf(":"),u>0&&u<l.length-1?(a=l.substring(u+1),i.push({key:D(l.substring(0,u),e),value:D(a,e)})):i.push({unknown:D(l,e)});return i},ba:function(e){var t="string"==typeof e?$.g.aa(e):e,i=[];e=[];for(var n,a=0;n=t[a];a++)if(0<i.length&&i.push(","),n.key){var r;e:{r=n.key;var l=$.a.D(r);switch(l.length&&l.charAt(0)){case"'":case'"':break e;default:r="'"+l+"'"}}n=n.value,i.push(r),i.push(":"),i.push(n),n=$.a.D(n),0<=$.a.i(j,$.a.D(n).toLowerCase())?n=o:(l=n.match(R),n=l===s?o:l[1]?"Object("+l[1]+")"+l[2]:n),n&&(0<e.length&&e.push(", "),e.push(r+" : function(__ko_value) { "+n+" = __ko_value; }"))}else n.unknown&&i.push(n.unknown);return t=i.join(""),0<e.length&&(t=t+", '_ko_property_writers' : { "+e.join("")+" } "),t},Eb:function(e,t){for(var i=0;i<e.length;i++)if($.a.D(e[i].key)==t)return n;return o},ea:function(e,t,i,n,s){e&&$.Ra(e)?(!s||e.t()!==n)&&e(n):(e=t()._ko_property_writers)&&e[i]&&e[i](n)}},$.b("expressionRewriting",$.g),$.b("expressionRewriting.bindingRewriteValidators",$.g.Q),$.b("expressionRewriting.parseObjectLiteral",$.g.aa),$.b("expressionRewriting.preProcessBindings",$.g.ba),$.b("jsonExpressionRewriting",$.g),$.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",$.g.ba);var L="<!--test-->"===r.createComment("test").text,W=L?/^\x3c!--\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*--\x3e$/:/^\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*$/,F=L?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,B={ul:n,ol:n};$.e={I:{},childNodes:function(e){return T(e)?k(e):e.childNodes},Y:function(e){if(T(e)){e=$.e.childNodes(e);for(var t=0,i=e.length;i>t;t++)$.removeNode(e[t])}else $.a.ka(e)},N:function(e,t){if(T(e)){$.e.Y(e);for(var i=e.nextSibling,n=0,s=t.length;s>n;n++)i.parentNode.insertBefore(t[n],i)}else $.a.N(e,t)},Va:function(e,t){T(e)?e.parentNode.insertBefore(t,e.nextSibling):e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)},Pa:function(e,t,i){i?T(e)?e.parentNode.insertBefore(t,i.nextSibling):i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):$.e.Va(e,t)},firstChild:function(e){return T(e)?!e.nextSibling||C(e.nextSibling)?s:e.nextSibling:e.firstChild},nextSibling:function(e){return T(e)&&(e=x(e)),e.nextSibling&&C(e.nextSibling)?s:e.nextSibling},jb:function(e){return(e=T(e))?e[1]:s},Ta:function(e){if(B[$.a.u(e)]){var t=e.firstChild;if(t)do if(1===t.nodeType){var i;i=t.firstChild;var o=s;if(i)do if(o)o.push(i);else if(T(i)){var a=x(i,n);a?i=a:o=[i]}else C(i)&&(o=[i]);while(i=i.nextSibling);if(i=o)for(o=t.nextSibling,a=0;a<i.length;a++)o?e.insertBefore(i[a],o):e.appendChild(i[a])}while(t=t.nextSibling)}}},$.b("virtualElements",$.e),$.b("virtualElements.allowedBindings",$.e.I),$.b("virtualElements.emptyNode",$.e.Y),$.b("virtualElements.insertAfter",$.e.Pa),$.b("virtualElements.prepend",$.e.Va),$.b("virtualElements.setDomNodeChildren",$.e.N),$.J=function(){this.Ha={}},$.a.extend($.J.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind")!=s;case 8:return $.e.jb(e)!=s;default:return o}},getBindings:function(e,t){var i=this.getBindingsString(e,t);return i?this.parseBindingsString(i,t,e):s},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return $.e.jb(e);default:return s}},parseBindingsString:function(t,i,n){try{var s;if(!(s=this.Ha[t])){var o,a=this.Ha,r="with($context){with($data||{}){return{"+$.g.ba(t)+"}}}";o=new Function("$context","$element",r),s=a[t]=o}return s(i,n)}catch(l){e(Error("Unable to parse bindings.\nMessage: "+l+";\nBindings value: "+t))}}}),$.J.instance=new $.J,$.b("bindingProvider",$.J),$.c={},$.z=function(e,t,i){t?($.a.extend(this,t),this.$parentContext=t,this.$parent=t.$data,this.$parents=(t.$parents||[]).slice(0),this.$parents.unshift(this.$parent)):(this.$parents=[],this.$root=e,this.ko=$),this.$data=e,i&&(this[i]=e)},$.z.prototype.createChildContext=function(e,t){return new $.z(e,this,t)},$.z.prototype.extend=function(e){var t=$.a.extend(new $.z,this);return $.a.extend(t,e)},$.eb=function(e,t){return 2!=arguments.length?$.a.f.get(e,"__ko_bindingContext__"):($.a.f.set(e,"__ko_bindingContext__",t),void 0)},$.Fa=function(e,t,i){return 1===e.nodeType&&$.e.Ta(e),b(e,t,i,n)},$.Ea=function(e,t){(1===t.nodeType||8===t.nodeType)&&_(e,t,n)
},$.Da=function(t,i){i&&1!==i.nodeType&&8!==i.nodeType&&e(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node")),i=i||a.document.body,w(t,i,n)},$.ja=function(e){switch(e.nodeType){case 1:case 8:var t=$.eb(e);if(t)return t;if(e.parentNode)return $.ja(e.parentNode)}return c},$.pb=function(e){return(e=$.ja(e))?e.$data:c},$.b("bindingHandlers",$.c),$.b("applyBindings",$.Da),$.b("applyBindingsToDescendants",$.Ea),$.b("applyBindingsToNode",$.Fa),$.b("contextFor",$.ja),$.b("dataFor",$.pb);var q={"class":"className","for":"htmlFor"};$.c.attr={update:function(e,t){var i,n=$.a.d(t())||{};for(i in n)if("string"==typeof i){var a=$.a.d(n[i]),r=a===o||a===s||a===c;r&&e.removeAttribute(i),8>=$.a.Z&&i in q?(i=q[i],r?e.removeAttribute(i):e[i]=a):r||e.setAttribute(i,a.toString()),"name"===i&&$.a.ab(e,r?"":a.toString())}}},$.c.checked={init:function(e,i,s){$.a.n(e,"click",function(){var t;if("checkbox"==e.type)t=e.checked;else{if("radio"!=e.type||!e.checked)return;t=e.value}var o=i(),a=$.a.d(o);"checkbox"==e.type&&a instanceof Array?(t=$.a.i(a,e.value),e.checked&&0>t?o.push(e.value):!e.checked&&t>=0&&o.splice(t,1)):$.g.ea(o,s,"checked",t,n)}),"radio"==e.type&&!e.name&&$.c.uniqueName.init(e,t(n))},update:function(e,t){var i=$.a.d(t());"checkbox"==e.type?e.checked=i instanceof Array?0<=$.a.i(i,e.value):i:"radio"==e.type&&(e.checked=e.value==i)}},$.c.css={update:function(e,t){var i=$.a.d(t());if("object"==typeof i)for(var s in i){var a=$.a.d(i[s]);$.a.da(e,s,a)}else i=String(i||""),$.a.da(e,e.__ko__cssValue,o),e.__ko__cssValue=i,$.a.da(e,i,n)}},$.c.enable={update:function(e,t){var i=$.a.d(t());i&&e.disabled?e.removeAttribute("disabled"):!i&&!e.disabled&&(e.disabled=n)}},$.c.disable={update:function(e,t){$.c.enable.update(e,function(){return!$.a.d(t())})}},$.c.event={init:function(e,t,i,s){var a,r=t()||{};for(a in r)!function(){var r=a;"string"==typeof r&&$.a.n(e,r,function(e){var a,l=t()[r];if(l){var u=i();try{var c=$.a.L(arguments);c.unshift(s),a=l.apply(s,c)}finally{a!==n&&(e.preventDefault?e.preventDefault():e.returnValue=o)}u[r+"Bubble"]===o&&(e.cancelBubble=n,e.stopPropagation&&e.stopPropagation())}})}()}},$.c.foreach={Sa:function(e){return function(){var t=e(),i=$.a.ua(t);return i&&"number"!=typeof i.length?($.a.d(t),{foreach:i.data,as:i.as,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:$.C.oa}):{foreach:t,templateEngine:$.C.oa}}},init:function(e,t){return $.c.template.init(e,$.c.foreach.Sa(t))},update:function(e,t,i,n,s){return $.c.template.update(e,$.c.foreach.Sa(t),i,n,s)}},$.g.Q.foreach=o,$.e.I.foreach=n,$.c.hasfocus={init:function(e,t,i){function a(s){e.__ko_hasfocusUpdating=n;var a=e.ownerDocument;"activeElement"in a&&(s=a.activeElement===e),a=t(),$.g.ea(a,i,"hasfocus",s,n),e.__ko_hasfocusUpdating=o}var r=a.bind(s,n),l=a.bind(s,o);$.a.n(e,"focus",r),$.a.n(e,"focusin",r),$.a.n(e,"blur",l),$.a.n(e,"focusout",l)},update:function(e,t){var i=$.a.d(t());e.__ko_hasfocusUpdating||(i?e.focus():e.blur(),$.r.K($.a.Ba,s,[e,i?"focusin":"focusout"]))}},$.c.html={init:function(){return{controlsDescendantBindings:n}},update:function(e,t){$.a.ca(e,t())}};var U="__ko_withIfBindingData";M("if"),M("ifnot",o,n),M("with",n,o,function(e,t){return e.createChildContext(t)}),$.c.options={update:function(t,i,s){"select"!==$.a.u(t)&&e(Error("options binding applies only to SELECT elements"));for(var o=0==t.length,a=$.a.V($.a.fa(t.childNodes,function(e){return e.tagName&&"option"===$.a.u(e)&&e.selected}),function(e){return $.k.q(e)||e.innerText||e.textContent}),l=t.scrollTop,u=$.a.d(i());0<t.length;)$.A(t.options[0]),t.remove(0);if(u){s=s();var d=s.optionsIncludeDestroyed;if("number"!=typeof u.length&&(u=[u]),s.optionsCaption){var h=r.createElement("option");$.a.ca(h,s.optionsCaption),$.k.T(h,c),t.appendChild(h)}i=0;for(var p=u.length;p>i;i++){var f=u[i];if(!f||!f._destroy||d){var h=r.createElement("option"),m=function(e,t,i){var n=typeof t;return"function"==n?t(e):"string"==n?e[t]:i},g=m(f,s.optionsValue,f);$.k.T(h,$.a.d(g)),f=m(f,s.optionsText,g),$.a.cb(h,f),t.appendChild(h)}}for(u=t.getElementsByTagName("option"),i=d=0,p=u.length;p>i;i++)0<=$.a.i(a,$.k.q(u[i]))&&($.a.bb(u[i],n),d++);t.scrollTop=l,o&&"value"in s&&z(t,$.a.ua(s.value),n),$.a.ub(t)}}},$.c.options.sa="__ko.optionValueDomData__",$.c.selectedOptions={init:function(e,t,i){$.a.n(e,"change",function(){var n=t(),s=[];$.a.o(e.getElementsByTagName("option"),function(e){e.selected&&s.push($.k.q(e))}),$.g.ea(n,i,"value",s)})},update:function(t,i){"select"!=$.a.u(t)&&e(Error("values binding applies only to SELECT elements"));var n=$.a.d(i());n&&"number"==typeof n.length&&$.a.o(t.getElementsByTagName("option"),function(e){var t=0<=$.a.i(n,$.k.q(e));$.a.bb(e,t)})}},$.c.style={update:function(e,t){var i,n=$.a.d(t()||{});for(i in n)if("string"==typeof i){var s=$.a.d(n[i]);e.style[i]=s||""}}},$.c.submit={init:function(t,i,s,a){"function"!=typeof i()&&e(Error("The value for a submit binding must be a function")),$.a.n(t,"submit",function(e){var s,r=i();try{s=r.call(a,t)}finally{s!==n&&(e.preventDefault?e.preventDefault():e.returnValue=o)}})}},$.c.text={update:function(e,t){$.a.cb(e,t())}},$.e.I.text=n,$.c.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++$.c.uniqueName.ob;$.a.ab(e,i)}}},$.c.uniqueName.ob=0,$.c.value={init:function(e,t,i){function s(){l=o;var n=t(),s=$.k.q(e);$.g.ea(n,i,"value",s)}var a=["change"],r=i().valueUpdate,l=o;r&&("string"==typeof r&&(r=[r]),$.a.P(a,r),a=$.a.Ga(a)),!$.a.Z||"input"!=e.tagName.toLowerCase()||"text"!=e.type||"off"==e.autocomplete||e.form&&"off"==e.form.autocomplete||-1!=$.a.i(a,"propertychange")||($.a.n(e,"propertychange",function(){l=n}),$.a.n(e,"blur",function(){l&&s()})),$.a.o(a,function(t){var i=s;$.a.Ob(t,"after")&&(i=function(){setTimeout(s,0)},t=t.substring(5)),$.a.n(e,t,i)})},update:function(e,t){var i="select"===$.a.u(e),s=$.a.d(t()),a=$.k.q(e),r=s!=a;0===s&&0!==a&&"0"!==a&&(r=n),r&&(a=function(){$.k.T(e,s)},a(),i&&setTimeout(a,0)),i&&0<e.length&&z(e,s,o)}},$.c.visible={update:function(e,t){var i=$.a.d(t()),n="none"!=e.style.display;i&&!n?e.style.display="":!i&&n&&(e.style.display="none")}},$.c.click={init:function(e,t,i,n){return $.c.event.init.call(this,e,function(){var e={};return e.click=t(),e},i,n)}},$.v=function(){},$.v.prototype.renderTemplateSource=function(){e(Error("Override renderTemplateSource"))},$.v.prototype.createJavaScriptEvaluatorBlock=function(){e(Error("Override createJavaScriptEvaluatorBlock"))},$.v.prototype.makeTemplateSource=function(t,i){if("string"==typeof t){i=i||r;var n=i.getElementById(t);return n||e(Error("Cannot find template with ID "+t)),new $.l.h(n)}return 1==t.nodeType||8==t.nodeType?new $.l.O(t):(e(Error("Unknown template type: "+t)),void 0)},$.v.prototype.renderTemplate=function(e,t,i,n){return e=this.makeTemplateSource(e,n),this.renderTemplateSource(e,t,i)},$.v.prototype.isTemplateRewritten=function(e,t){return this.allowTemplateRewriting===o?n:this.makeTemplateSource(e,t).data("isRewritten")},$.v.prototype.rewriteTemplate=function(e,t,i){e=this.makeTemplateSource(e,i),t=t(e.text()),e.text(t),e.data("isRewritten",n)},$.b("templateEngine",$.v);var Y=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,G=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;$.za={vb:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,function(e){return $.za.Gb(e,t)},i)},Gb:function(e,t){return e.replace(Y,function(e,i,n,s,o,a,r){return y(r,i,t)}).replace(G,function(e,i){return y(i,"<!-- ko -->",t)})},kb:function(e){return $.s.ra(function(t,i){t.nextSibling&&$.Fa(t.nextSibling,e,i)})}},$.b("__tr_ambtns",$.za.kb),$.l={},$.l.h=function(e){this.h=e},$.l.h.prototype.text=function(){var e=$.a.u(this.h),e="script"===e?"text":"textarea"===e?"value":"innerHTML";if(0==arguments.length)return this.h[e];var t=arguments[0];"innerHTML"===e?$.a.ca(this.h,t):this.h[e]=t},$.l.h.prototype.data=function(e){return 1===arguments.length?$.a.f.get(this.h,"templateSourceData_"+e):($.a.f.set(this.h,"templateSourceData_"+e,arguments[1]),void 0)},$.l.O=function(e){this.h=e},$.l.O.prototype=new $.l.h,$.l.O.prototype.text=function(){if(0==arguments.length){var e=$.a.f.get(this.h,"__ko_anon_template__")||{};return e.Aa===c&&e.ia&&(e.Aa=e.ia.innerHTML),e.Aa}$.a.f.set(this.h,"__ko_anon_template__",{Aa:arguments[0]})},$.l.h.prototype.nodes=function(){return 0==arguments.length?($.a.f.get(this.h,"__ko_anon_template__")||{}).ia:($.a.f.set(this.h,"__ko_anon_template__",{ia:arguments[0]}),void 0)},$.b("templateSources",$.l),$.b("templateSources.domElement",$.l.h),$.b("templateSources.anonymousTemplate",$.l.O);var X;$.wa=function(t){t!=c&&!(t instanceof $.v)&&e(Error("templateEngine must inherit from ko.templateEngine")),X=t},$.va=function(t,i,n,o,a){if(n=n||{},(n.templateEngine||X)==c&&e(Error("Set a template engine before calling renderTemplate")),a=a||"replaceChildren",o){var r=m(o);return $.j(function(){var e=i&&i instanceof $.z?i:new $.z($.a.d(i)),s="function"==typeof t?t(e.$data,e):t,e=f(o,a,s,e,n);"replaceNode"==a&&(o=e,r=m(o))},s,{Ka:function(){return!r||!$.a.X(r)},W:r&&"replaceNode"==a?r.parentNode:r})}return $.s.ra(function(e){$.va(t,i,n,e,"replaceNode")})},$.Mb=function(e,t,i,n,o){function a(e,t){g(t,l),i.afterRender&&i.afterRender(t,e)}function r(t,n){l=o.createChildContext($.a.d(t),i.as),l.$index=n;var a="function"==typeof e?e(t,l):e;return f(s,"ignoreTargetNode",a,l,i)}var l;return $.j(function(){var e=$.a.d(t)||[];"undefined"==typeof e.length&&(e=[e]),e=$.a.fa(e,function(e){return i.includeDestroyed||e===c||e===s||!$.a.d(e._destroy)}),$.r.K($.a.$a,s,[n,e,r,i,a])},s,{W:n})},$.c.template={init:function(e,t){var i=$.a.d(t());return"string"==typeof i||i.name||1!=e.nodeType&&8!=e.nodeType||(i=1==e.nodeType?e.childNodes:$.e.childNodes(e),i=$.a.Hb(i),new $.l.O(e).nodes(i)),{controlsDescendantBindings:n}},update:function(e,t,i,o,a){t=$.a.d(t()),i={},o=n;var r,l=s;"string"!=typeof t&&(i=t,t=i.name,"if"in i&&(o=$.a.d(i["if"])),o&&"ifnot"in i&&(o=!$.a.d(i.ifnot)),r=$.a.d(i.data)),"foreach"in i?l=$.Mb(t||e,o&&i.foreach||[],i,e,a):o?(a="data"in i?a.createChildContext(r,i.as):a,l=$.va(t||e,a,i,e)):$.e.Y(e),a=l,(r=$.a.f.get(e,"__ko__templateComputedDomDataKey__"))&&"function"==typeof r.B&&r.B(),$.a.f.set(e,"__ko__templateComputedDomDataKey__",a&&a.pa()?a:c)}},$.g.Q.template=function(e){return e=$.g.aa(e),1==e.length&&e[0].unknown||$.g.Eb(e,"name")?s:"This template engine does not support anonymous templates nested within its templates"},$.e.I.template=n,$.b("setTemplateEngine",$.wa),$.b("renderTemplate",$.va),$.a.Ja=function(e,t,i){return e=e||[],t=t||[],e.length<=t.length?p(e,t,"added","deleted",i):p(t,e,"deleted","added",i)},$.b("utils.compareArrays",$.a.Ja),$.a.$a=function(e,t,i,s,o){function a(e,t){w=u[t],v!==t&&(k[e]=w),w.na(v++),h(w.M),m.push(w),b.push(w)}function r(e,t){if(e)for(var i=0,n=t.length;n>i;i++)t[i]&&$.a.o(t[i].M,function(n){e(n,i,t[i].U)})}t=t||[],s=s||{};var l=$.a.f.get(e,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===c,u=$.a.f.get(e,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||[],p=$.a.V(u,function(e){return e.U}),f=$.a.Ja(p,t),m=[],g=0,v=0,y=[],b=[];t=[];for(var w,_,x,k=[],p=[],C=0;_=f[C];C++)switch(x=_.moved,_.status){case"deleted":x===c&&(w=u[g],w.j&&w.j.B(),y.push.apply(y,h(w.M)),s.beforeRemove&&(t[C]=w,b.push(w))),g++;break;case"retained":a(C,g++);break;case"added":x!==c?a(C,x):(w={U:_.value,na:$.m(v++)},m.push(w),b.push(w),l||(p[C]=w))}r(s.beforeMove,k),$.a.o(y,s.beforeRemove?$.A:$.removeNode);for(var T,C=0,l=$.e.firstChild(e);w=b[C];C++){for(w.M||$.a.extend(w,d(e,i,w.U,o,w.na)),g=0;f=w.M[g];l=f.nextSibling,T=f,g++)f!==l&&$.e.Pa(e,f,T);!w.Ab&&o&&(o(w.U,w.M,w.na),w.Ab=n)}r(s.beforeRemove,t),r(s.afterMove,k),r(s.afterAdd,p),$.a.f.set(e,"setDomNodeChildrenFromArrayMapping_lastMappingResult",m)},$.b("utils.setDomNodeChildrenFromArrayMapping",$.a.$a),$.C=function(){this.allowTemplateRewriting=o},$.C.prototype=new $.v,$.C.prototype.renderTemplateSource=function(e){var t=9>$.a.Z||!e.nodes?s:e.nodes();return t?$.a.L(t.cloneNode(n).childNodes):(e=e.text(),$.a.ta(e))},$.C.oa=new $.C,$.wa($.C.oa),$.b("nativeTemplateEngine",$.C),$.qa=function(){var t=this.Db=function(){if("undefined"==typeof u||!u.tmpl)return 0;try{if(0<=u.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(i,n,o){o=o||{},2>t&&e(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));var a=i.data("precompiled");return a||(a=i.text()||"",a=u.template(s,"{{ko_with $item.koBindingContext}}"+a+"{{/ko_with}}"),i.data("precompiled",a)),i=[n.$data],n=u.extend({koBindingContext:n},o.templateOptions),n=u.tmpl(a,i,n),n.appendTo(r.createElement("div")),u.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){r.write("<script type='text/html' id='"+e+"'>"+t+"</script>")},t>0&&(u.tmpl.tag.ko_code={open:"__.push($1 || '');"},u.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},$.qa.prototype=new $.v,i=new $.qa,0<i.Db&&$.wa(i),$.b("jqueryTmplTemplateEngine",$.qa)}var n=!0,s=null,o=!1,a=window,r=document,l=navigator,u=window.jQuery,c=void 0;"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?i(module.exports||exports):"function"==typeof define&&define.amd?define(["exports"],i):i(a.ko={})}(),function(e){var t=function(e,t){return e<<t|e>>>32-t},i=function(e){var t,i,n="";for(t=7;t>=0;t--)i=15&e>>>4*t,n+=i.toString(16);return n},n=function(e){e=e.replace(/\x0d\x0a/g,"\n");for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);128>n?t+=String.fromCharCode(n):n>127&&2048>n?(t+=String.fromCharCode(192|n>>6),t+=String.fromCharCode(128|63&n)):(t+=String.fromCharCode(224|n>>12),t+=String.fromCharCode(128|63&n>>6),t+=String.fromCharCode(128|63&n))}return t};e.extend({sha1:function(e){var s,o,a,r,l,u,c,d,h,p=new Array(80),f=1732584193,m=4023233417,g=2562383102,v=271733878,y=3285377520;e=n(e);var b=e.length,w=new Array;for(o=0;b-3>o;o+=4)a=e.charCodeAt(o)<<24|e.charCodeAt(o+1)<<16|e.charCodeAt(o+2)<<8|e.charCodeAt(o+3),w.push(a);switch(b%4){case 0:o=2147483648;break;case 1:o=8388608|e.charCodeAt(b-1)<<24;break;case 2:o=32768|(e.charCodeAt(b-2)<<24|e.charCodeAt(b-1)<<16);break;case 3:o=128|(e.charCodeAt(b-3)<<24|e.charCodeAt(b-2)<<16|e.charCodeAt(b-1)<<8)}for(w.push(o);14!=w.length%16;)w.push(0);for(w.push(b>>>29),w.push(4294967295&b<<3),s=0;s<w.length;s+=16){for(o=0;16>o;o++)p[o]=w[s+o];for(o=16;79>=o;o++)p[o]=t(p[o-3]^p[o-8]^p[o-14]^p[o-16],1);for(r=f,l=m,u=g,c=v,d=y,o=0;19>=o;o++)h=4294967295&t(r,5)+(l&u|~l&c)+d+p[o]+1518500249,d=c,c=u,u=t(l,30),l=r,r=h;for(o=20;39>=o;o++)h=4294967295&t(r,5)+(l^u^c)+d+p[o]+1859775393,d=c,c=u,u=t(l,30),l=r,r=h;for(o=40;59>=o;o++)h=4294967295&t(r,5)+(l&u|l&c|u&c)+d+p[o]+2400959708,d=c,c=u,u=t(l,30),l=r,r=h;for(o=60;79>=o;o++)h=4294967295&t(r,5)+(l^u^c)+d+p[o]+3395469782,d=c,c=u,u=t(l,30),l=r,r=h;f=4294967295&f+r,m=4294967295&m+l,g=4294967295&g+u,v=4294967295&v+c,y=4294967295&y+d}var h=i(f)+i(m)+i(g)+i(v)+i(y);return h.toLowerCase()}})}(jQuery),function(e){var t=function(){return!1===e.support.boxModel&&e.support.objectAll&&e.support.leadingWhitespace}();e.jGrowl=function(t,i){0==e("#jGrowl").size()&&e('<div id="jGrowl"></div>').addClass(i&&i.position?i.position:e.jGrowl.defaults.position).appendTo("body"),e("#jGrowl").jGrowl(t,i)},e.fn.jGrowl=function(t,i){if(e.isFunction(this.each)){var n=arguments;return this.each(function(){void 0==e(this).data("jGrowl.instance")&&(e(this).data("jGrowl.instance",e.extend(new e.fn.jGrowl,{notifications:[],element:null,interval:null})),e(this).data("jGrowl.instance").startup(this)),e.isFunction(e(this).data("jGrowl.instance")[t])?e(this).data("jGrowl.instance")[t].apply(e(this).data("jGrowl.instance"),e.makeArray(n).slice(1)):e(this).data("jGrowl.instance").create(t,i)})}},e.extend(e.fn.jGrowl.prototype,{defaults:{pool:0,header:"",group:"",sticky:!1,position:"top-right",glue:"after",theme:"default",themeState:"highlight",corners:"10px",check:250,life:3e3,closeDuration:"normal",openDuration:"normal",easing:"swing",closer:!0,closeTemplate:"&times;",closerTemplate:"<div>[ close all ]</div>",log:function(){},beforeOpen:function(){},afterOpen:function(){},open:function(){},beforeClose:function(){},close:function(){},animateOpen:{opacity:"show"},animateClose:{opacity:"hide"}},notifications:[],element:null,interval:null,create:function(t,i){var i=e.extend({},this.defaults,i);void 0!==i.speed&&(i.openDuration=i.speed,i.closeDuration=i.speed),this.notifications.push({message:t,options:i}),i.log.apply(this.element,[this.element,t,i])},render:function(t){var i=this,n=t.message,s=t.options;s.themeState=""==s.themeState?"":"ui-state-"+s.themeState;var t=e("<div/>").addClass("jGrowl-notification "+s.themeState+" ui-corner-all"+(void 0!=s.group&&""!=s.group?" "+s.group:"")).append(e("<div/>").addClass("jGrowl-close").html(s.closeTemplate)).append(e("<div/>").addClass("jGrowl-header").html(s.header)).append(e("<div/>").addClass("jGrowl-message").html(n)).data("jGrowl",s).addClass(s.theme).children("div.jGrowl-close").bind("click.jGrowl",function(){e(this).parent().trigger("jGrowl.beforeClose")}).parent();e(t).bind("mouseover.jGrowl",function(){e("div.jGrowl-notification",i.element).data("jGrowl.pause",!0)}).bind("mouseout.jGrowl",function(){e("div.jGrowl-notification",i.element).data("jGrowl.pause",!1)}).bind("jGrowl.beforeOpen",function(){s.beforeOpen.apply(t,[t,n,s,i.element])!==!1&&e(this).trigger("jGrowl.open")}).bind("jGrowl.open",function(){s.open.apply(t,[t,n,s,i.element])!==!1&&("after"==s.glue?e("div.jGrowl-notification:last",i.element).after(t):e("div.jGrowl-notification:first",i.element).before(t),e(this).animate(s.animateOpen,s.openDuration,s.easing,function(){e.support.opacity===!1&&this.style.removeAttribute("filter"),null!==e(this).data("jGrowl")&&(e(this).data("jGrowl").created=new Date),e(this).trigger("jGrowl.afterOpen")}))}).bind("jGrowl.afterOpen",function(){s.afterOpen.apply(t,[t,n,s,i.element])}).bind("jGrowl.beforeClose",function(){s.beforeClose.apply(t,[t,n,s,i.element])!==!1&&e(this).trigger("jGrowl.close")}).bind("jGrowl.close",function(){e(this).data("jGrowl.pause",!0),e(this).animate(s.animateClose,s.closeDuration,s.easing,function(){e.isFunction(s.close)?s.close.apply(t,[t,n,s,i.element])!==!1&&e(this).remove():e(this).remove()})}).trigger("jGrowl.beforeOpen"),""!=s.corners&&void 0!=e.fn.corner&&e(t).corner(s.corners),e("div.jGrowl-notification:parent",i.element).size()>1&&0==e("div.jGrowl-closer",i.element).size()&&this.defaults.closer!==!1&&e(this.defaults.closerTemplate).addClass("jGrowl-closer "+this.defaults.themeState+" ui-corner-all").addClass(this.defaults.theme).appendTo(i.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){e(this).siblings().trigger("jGrowl.beforeClose"),e.isFunction(i.defaults.closer)&&i.defaults.closer.apply(e(this).parent()[0],[e(this).parent()[0]])})},update:function(){e(this.element).find("div.jGrowl-notification:parent").each(function(){void 0!=e(this).data("jGrowl")&&void 0!==e(this).data("jGrowl").created&&e(this).data("jGrowl").created.getTime()+parseInt(e(this).data("jGrowl").life)<(new Date).getTime()&&e(this).data("jGrowl").sticky!==!0&&(void 0==e(this).data("jGrowl.pause")||e(this).data("jGrowl.pause")!==!0)&&e(this).trigger("jGrowl.beforeClose")}),this.notifications.length>0&&(0==this.defaults.pool||e(this.element).find("div.jGrowl-notification:parent").size()<this.defaults.pool)&&this.render(this.notifications.shift()),2>e(this.element).find("div.jGrowl-notification:parent").size()&&e(this.element).find("div.jGrowl-closer").animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){e(this).remove()})},startup:function(i){this.element=e(i).addClass("jGrowl").append('<div class="jGrowl-notification"></div>'),this.interval=setInterval(function(){e(i).data("jGrowl.instance").update()},parseInt(this.defaults.check)),t&&e(this.element).addClass("ie6")},shutdown:function(){e(this.element).removeClass("jGrowl").find("div.jGrowl-notification").trigger("jGrowl.close").parent().empty()},close:function(){e(this.element).find("div.jGrowl-notification").each(function(){e(this).trigger("jGrowl.beforeClose")})}}),e.jGrowl.defaults=e.fn.jGrowl.prototype.defaults}(jQuery),/*
  html2canvas 0.4.1 <http://html2canvas.hertzen.com>
  Copyright (c) 2013 Niklas von Hertzen

  Released under MIT License
*/
function(e,t,i){"use strict";function n(e,t,i){var n,s=e.runtimeStyle&&e.runtimeStyle[t],o=e.style;return!/^-?[0-9]+\.?[0-9]*(?:px)?$/i.test(i)&&/^-?\d/.test(i)&&(n=o.left,s&&(e.runtimeStyle.left=e.currentStyle.left),o.left="fontSize"===t?"1em":i||0,i=o.pixelLeft+"px",o.left=n,s&&(e.runtimeStyle.left=s)),/^(thin|medium|thick)$/i.test(i)?i:Math.round(parseFloat(i))+"px"}function s(e){return parseInt(e,10)}function o(e,t,s,o){if(e=(e||"").split(","),e=e[o||0]||e[0]||"auto",e=d.Util.trimText(e).split(" "),"backgroundSize"!==s||e[0]&&!e[0].match(/cover|contain|auto/)){if(e[0]=-1===e[0].indexOf("%")?n(t,s+"X",e[0]):e[0],e[1]===i){if("backgroundSize"===s)return e[1]="auto",e;e[1]=e[0]}e[1]=-1===e[1].indexOf("%")?n(t,s+"Y",e[1]):e[1]}else;return e}function a(e,t,i,n,s,o){var a,r,l,u,c=d.Util.getCSS(t,e,s);if(1===c.length&&(u=c[0],c=[],c[0]=u,c[1]=u),-1!==c[0].toString().indexOf("%"))l=parseFloat(c[0])/100,r=i.width*l,"backgroundSize"!==e&&(r-=(o||n).width*l);else if("backgroundSize"===e)if("auto"===c[0])r=n.width;else if(/contain|cover/.test(c[0])){var h=d.Util.resizeBounds(n.width,n.height,i.width,i.height,c[0]);r=h.width,a=h.height}else r=parseInt(c[0],10);else r=parseInt(c[0],10);return"auto"===c[1]?a=r/n.width*n.height:-1!==c[1].toString().indexOf("%")?(l=parseFloat(c[1])/100,a=i.height*l,"backgroundSize"!==e&&(a-=(o||n).height*l)):a=parseInt(c[1],10),[r,a]}function r(e,t){var i=[];return{storage:i,width:e,height:t,clip:function(){i.push({type:"function",name:"clip",arguments:arguments})},translate:function(){i.push({type:"function",name:"translate",arguments:arguments})},fill:function(){i.push({type:"function",name:"fill",arguments:arguments})},save:function(){i.push({type:"function",name:"save",arguments:arguments})},restore:function(){i.push({type:"function",name:"restore",arguments:arguments})},fillRect:function(){i.push({type:"function",name:"fillRect",arguments:arguments})},createPattern:function(){i.push({type:"function",name:"createPattern",arguments:arguments})},drawShape:function(){var e=[];return i.push({type:"function",name:"drawShape",arguments:e}),{moveTo:function(){e.push({name:"moveTo",arguments:arguments})},lineTo:function(){e.push({name:"lineTo",arguments:arguments})},arcTo:function(){e.push({name:"arcTo",arguments:arguments})},bezierCurveTo:function(){e.push({name:"bezierCurveTo",arguments:arguments})},quadraticCurveTo:function(){e.push({name:"quadraticCurveTo",arguments:arguments})}}},drawImage:function(){i.push({type:"function",name:"drawImage",arguments:arguments})},fillText:function(){i.push({type:"function",name:"fillText",arguments:arguments})},setVariable:function(e,t){return i.push({type:"variable",name:e,arguments:t}),t}}}function l(e){return{zindex:e,children:[]}}var u,c,d={};d.Util={},d.Util.log=function(t){d.logging&&e.console&&e.console.log&&e.console.log(t)},d.Util.trimText=function(e){return function(t){return e?e.apply(t):((t||"")+"").replace(/^\s+|\s+$/g,"")}}(String.prototype.trim),d.Util.asFloat=function(e){return parseFloat(e)},function(){var e=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,t=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g;d.Util.parseTextShadows=function(i){if(!i||"none"===i)return[];for(var n=i.match(e),s=[],o=0;n&&o<n.length;o++){var a=n[o].match(t);s.push({color:a[0],offsetX:a[1]?a[1].replace("px",""):0,offsetY:a[2]?a[2].replace("px",""):0,blur:a[3]?a[3].replace("px",""):0})}return s}}(),d.Util.parseBackgroundImage=function(e){var t,i,n,s,o,a,r,l,u=" \r\n	",c=[],d=0,h=0,p=function(){t&&('"'===i.substr(0,1)&&(i=i.substr(1,i.length-2)),i&&l.push(i),"-"===t.substr(0,1)&&(s=t.indexOf("-",1)+1)>0&&(n=t.substr(0,s),t=t.substr(s)),c.push({prefix:n,method:t.toLowerCase(),value:o,args:l})),l=[],t=n=i=o=""};p();for(var f=0,m=e.length;m>f;f++)if(a=e[f],!(0===d&&u.indexOf(a)>-1)){switch(a){case'"':r?r===a&&(r=null):r=a;break;case"(":if(r)break;if(0===d){d=1,o+=a;continue}h++;break;case")":if(r)break;if(1===d){if(0===h){d=0,o+=a,p();continue}h--}break;case",":if(r)break;if(0===d){p();continue}if(1===d&&0===h&&!t.match(/^url$/i)){l.push(i),i="",o+=a;continue}}o+=a,0===d?t+=a:i+=a}return p(),c},d.Util.Bounds=function(e){var t,i={};return e.getBoundingClientRect&&(t=e.getBoundingClientRect(),i.top=t.top,i.bottom=t.bottom||t.top+t.height,i.left=t.left,i.width=e.offsetWidth,i.height=e.offsetHeight),i},d.Util.OffsetBounds=function(e){var t=e.offsetParent?d.Util.OffsetBounds(e.offsetParent):{top:0,left:0};return{top:e.offsetTop+t.top,bottom:e.offsetTop+e.offsetHeight+t.top,left:e.offsetLeft+t.left,width:e.offsetWidth,height:e.offsetHeight}},d.Util.getCSS=function(e,i,n){u!==e&&(c=t.defaultView.getComputedStyle(e,null));var a=c[i];if(/^background(Size|Position)$/.test(i))return o(a,e,i,n);if(/border(Top|Bottom)(Left|Right)Radius/.test(i)){var r=a.split(" ");return r.length<=1&&(r[1]=r[0]),r.map(s)}return a},d.Util.resizeBounds=function(e,t,i,n,s){var o,a,r=i/n,l=e/t;return s&&"auto"!==s?l>r^"contain"===s?(a=n,o=n*l):(o=i,a=i/l):(o=i,a=n),{width:o,height:a}},d.Util.BackgroundPosition=function(e,t,i,n,s){var o=a("backgroundPosition",e,t,i,n,s);return{left:o[0],top:o[1]}},d.Util.BackgroundSize=function(e,t,i,n){var s=a("backgroundSize",e,t,i,n);return{width:s[0],height:s[1]}},d.Util.Extend=function(e,t){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},/*
 * Derived from jQuery.contents()
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 */
d.Util.Children=function(e){var t;try{t=e.nodeName&&"IFRAME"===e.nodeName.toUpperCase()?e.contentDocument||e.contentWindow.document:function(e){var t=[];return null!==e&&function(e,t){var n=e.length,s=0;if("number"==typeof t.length)for(var o=t.length;o>s;s++)e[n++]=t[s];else for(;t[s]!==i;)e[n++]=t[s++];return e.length=n,e}(t,e),t}(e.childNodes)}catch(n){d.Util.log("html2canvas.Util.Children failed with exception: "+n.message),t=[]}return t},d.Util.isTransparent=function(e){return"transparent"===e||"rgba(0, 0, 0, 0)"===e},d.Util.Font=function(){var e={};return function(t,n,s){if(e[t+"-"+n]!==i)return e[t+"-"+n];var o,a,r,l=s.createElement("div"),u=s.createElement("img"),c=s.createElement("span"),d="Hidden Text";return l.style.visibility="hidden",l.style.fontFamily=t,l.style.fontSize=n,l.style.margin=0,l.style.padding=0,s.body.appendChild(l),u.src="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=",u.width=1,u.height=1,u.style.margin=0,u.style.padding=0,u.style.verticalAlign="baseline",c.style.fontFamily=t,c.style.fontSize=n,c.style.margin=0,c.style.padding=0,c.appendChild(s.createTextNode(d)),l.appendChild(c),l.appendChild(u),o=u.offsetTop-c.offsetTop+1,l.removeChild(c),l.appendChild(s.createTextNode(d)),l.style.lineHeight="normal",u.style.verticalAlign="super",a=u.offsetTop-l.offsetTop+1,r={baseline:o,lineWidth:1,middle:a},e[t+"-"+n]=r,s.body.removeChild(l),r}}(),function(){function e(e){return function(t){try{e.addColorStop(t.stop,t.color)}catch(n){i.log(["failed to add color stop: ",n,"; tried to add: ",t])}}}var i=d.Util,n={};d.Generate=n;var s=[/^(-webkit-linear-gradient)\(([a-z\s]+)([\w\d\.\s,%\(\)]+)\)$/,/^(-o-linear-gradient)\(([a-z\s]+)([\w\d\.\s,%\(\)]+)\)$/,/^(-webkit-gradient)\((linear|radial),\s((?:\d{1,3}%?)\s(?:\d{1,3}%?),\s(?:\d{1,3}%?)\s(?:\d{1,3}%?))([\w\d\.\s,%\(\)\-]+)\)$/,/^(-moz-linear-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?))([\w\d\.\s,%\(\)]+)\)$/,/^(-webkit-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s([a-z\-]+)([\w\d\.\s,%\(\)]+)\)$/,/^(-moz-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s?([a-z\-]*)([\w\d\.\s,%\(\)]+)\)$/,/^(-o-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s([a-z\-]+)([\w\d\.\s,%\(\)]+)\)$/];n.parseGradient=function(e,t){var i,n,o,a,r,l,u,c,d,h,p,f,m=s.length;for(n=0;m>n&&!(o=e.match(s[n]));n+=1);if(o)switch(o[1]){case"-webkit-linear-gradient":case"-o-linear-gradient":if(i={type:"linear",x0:null,y0:null,x1:null,y1:null,colorStops:[]},r=o[2].match(/\w+/g))for(l=r.length,n=0;l>n;n+=1)switch(r[n]){case"top":i.y0=0,i.y1=t.height;break;case"right":i.x0=t.width,i.x1=0;break;case"bottom":i.y0=t.height,i.y1=0;break;case"left":i.x0=0,i.x1=t.width}if(null===i.x0&&null===i.x1&&(i.x0=i.x1=t.width/2),null===i.y0&&null===i.y1&&(i.y0=i.y1=t.height/2),r=o[3].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}(?:%|px))?)+/g))for(l=r.length,u=1/Math.max(l-1,1),n=0;l>n;n+=1)c=r[n].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/),c[2]?(a=parseFloat(c[2]),a/="%"===c[3]?100:t.width):a=n*u,i.colorStops.push({color:c[1],stop:a});break;case"-webkit-gradient":if(i={type:"radial"===o[2]?"circle":o[2],x0:0,y0:0,x1:0,y1:0,colorStops:[]},r=o[3].match(/(\d{1,3})%?\s(\d{1,3})%?,\s(\d{1,3})%?\s(\d{1,3})%?/),r&&(i.x0=r[1]*t.width/100,i.y0=r[2]*t.height/100,i.x1=r[3]*t.width/100,i.y1=r[4]*t.height/100),r=o[4].match(/((?:from|to|color-stop)\((?:[0-9\.]+,\s)?(?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)\))+/g))for(l=r.length,n=0;l>n;n+=1)c=r[n].match(/(from|to|color-stop)\(([0-9\.]+)?(?:,\s)?((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\)/),a=parseFloat(c[2]),"from"===c[1]&&(a=0),"to"===c[1]&&(a=1),i.colorStops.push({color:c[3],stop:a});break;case"-moz-linear-gradient":if(i={type:"linear",x0:0,y0:0,x1:0,y1:0,colorStops:[]},r=o[2].match(/(\d{1,3})%?\s(\d{1,3})%?/),r&&(i.x0=r[1]*t.width/100,i.y0=r[2]*t.height/100,i.x1=t.width-i.x0,i.y1=t.height-i.y0),r=o[3].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}%)?)+/g))for(l=r.length,u=1/Math.max(l-1,1),n=0;l>n;n+=1)c=r[n].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%)?/),c[2]?(a=parseFloat(c[2]),c[3]&&(a/=100)):a=n*u,i.colorStops.push({color:c[1],stop:a});break;case"-webkit-radial-gradient":case"-moz-radial-gradient":case"-o-radial-gradient":if(i={type:"circle",x0:0,y0:0,x1:t.width,y1:t.height,cx:0,cy:0,rx:0,ry:0,colorStops:[]},r=o[2].match(/(\d{1,3})%?\s(\d{1,3})%?/),r&&(i.cx=r[1]*t.width/100,i.cy=r[2]*t.height/100),r=o[3].match(/\w+/),c=o[4].match(/[a-z\-]*/),r&&c)switch(c[0]){case"farthest-corner":case"cover":case"":d=Math.sqrt(Math.pow(i.cx,2)+Math.pow(i.cy,2)),h=Math.sqrt(Math.pow(i.cx,2)+Math.pow(i.y1-i.cy,2)),p=Math.sqrt(Math.pow(i.x1-i.cx,2)+Math.pow(i.y1-i.cy,2)),f=Math.sqrt(Math.pow(i.x1-i.cx,2)+Math.pow(i.cy,2)),i.rx=i.ry=Math.max(d,h,p,f);break;case"closest-corner":d=Math.sqrt(Math.pow(i.cx,2)+Math.pow(i.cy,2)),h=Math.sqrt(Math.pow(i.cx,2)+Math.pow(i.y1-i.cy,2)),p=Math.sqrt(Math.pow(i.x1-i.cx,2)+Math.pow(i.y1-i.cy,2)),f=Math.sqrt(Math.pow(i.x1-i.cx,2)+Math.pow(i.cy,2)),i.rx=i.ry=Math.min(d,h,p,f);break;case"farthest-side":"circle"===r[0]?i.rx=i.ry=Math.max(i.cx,i.cy,i.x1-i.cx,i.y1-i.cy):(i.type=r[0],i.rx=Math.max(i.cx,i.x1-i.cx),i.ry=Math.max(i.cy,i.y1-i.cy));break;case"closest-side":case"contain":"circle"===r[0]?i.rx=i.ry=Math.min(i.cx,i.cy,i.x1-i.cx,i.y1-i.cy):(i.type=r[0],i.rx=Math.min(i.cx,i.x1-i.cx),i.ry=Math.min(i.cy,i.y1-i.cy))}if(r=o[5].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}(?:%|px))?)+/g))for(l=r.length,u=1/Math.max(l-1,1),n=0;l>n;n+=1)c=r[n].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/),c[2]?(a=parseFloat(c[2]),a/="%"===c[3]?100:t.width):a=n*u,i.colorStops.push({color:c[1],stop:a})}return i},n.Gradient=function(i,n){if(0!==n.width&&0!==n.height){var s,o,a=t.createElement("canvas"),r=a.getContext("2d");if(a.width=n.width,a.height=n.height,s=d.Generate.parseGradient(i,n))switch(s.type){case"linear":o=r.createLinearGradient(s.x0,s.y0,s.x1,s.y1),s.colorStops.forEach(e(o)),r.fillStyle=o,r.fillRect(0,0,n.width,n.height);break;case"circle":o=r.createRadialGradient(s.cx,s.cy,0,s.cx,s.cy,s.rx),s.colorStops.forEach(e(o)),r.fillStyle=o,r.fillRect(0,0,n.width,n.height);break;case"ellipse":var l=t.createElement("canvas"),u=l.getContext("2d"),c=Math.max(s.rx,s.ry),h=2*c;l.width=l.height=h,o=u.createRadialGradient(s.rx,s.ry,0,s.rx,s.ry,c),s.colorStops.forEach(e(o)),u.fillStyle=o,u.fillRect(0,0,h,h),r.fillStyle=s.colorStops[s.colorStops.length-1].color,r.fillRect(0,0,a.width,a.height),r.drawImage(l,s.cx-s.rx,s.cy-s.ry,2*s.rx,2*s.ry)}return a}},n.ListAlpha=function(e){var t,i="";do t=e%26,i=String.fromCharCode(t+64)+i,e/=26;while(26*e>26);return i},n.ListRoman=function(e){var t,i=["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"],n=[1e3,900,500,400,100,90,50,40,10,9,5,4,1],s="",o=i.length;if(0>=e||e>=4e3)return e;for(t=0;o>t;t+=1)for(;e>=n[t];)e-=n[t],s+=i[t];return s}}(),d.Parse=function(n,s){function o(){return Math.max(Math.max(ct.body.scrollWidth,ct.documentElement.scrollWidth),Math.max(ct.body.offsetWidth,ct.documentElement.offsetWidth),Math.max(ct.body.clientWidth,ct.documentElement.clientWidth))}function a(){return Math.max(Math.max(ct.body.scrollHeight,ct.documentElement.scrollHeight),Math.max(ct.body.offsetHeight,ct.documentElement.offsetHeight),Math.max(ct.body.clientHeight,ct.documentElement.clientHeight))}function u(e,t){var i=parseInt(mt(e,t),10);return isNaN(i)?0:i}function c(e,t,i,n,s,o){"transparent"!==o&&(e.setVariable("fillStyle",o),e.fillRect(t,i,n,s),ut+=1)}function h(e,t,i){return e.length>0?t+i.toUpperCase():void 0}function p(e,t){switch(t){case"lowercase":return e.toLowerCase();case"capitalize":return e.replace(/(^|\s|:|-|\(|\))([a-z])/g,h);case"uppercase":return e.toUpperCase();default:return e}}function f(e){return/^(normal|none|0px)$/.test(e)}function m(e,t,i,n){null!==e&&dt.trimText(e).length>0&&(n.fillText(e,t,i),ut+=1)}function g(e,t,i,n){var s=!1,o=mt(t,"fontWeight"),a=mt(t,"fontFamily"),r=mt(t,"fontSize"),l=dt.parseTextShadows(mt(t,"textShadow"));switch(parseInt(o,10)){case 401:o="bold";break;case 400:o="normal"}return e.setVariable("fillStyle",n),e.setVariable("font",[mt(t,"fontStyle"),mt(t,"fontVariant"),o,r,a].join(" ")),e.setVariable("textAlign",s?"right":"left"),l.length&&(e.setVariable("shadowColor",l[0].color),e.setVariable("shadowOffsetX",l[0].offsetX),e.setVariable("shadowOffsetY",l[0].offsetY),e.setVariable("shadowBlur",l[0].blur)),"none"!==i?dt.Font(a,r,ct):void 0}function v(e,t,i,n,s){switch(t){case"underline":c(e,i.left,Math.round(i.top+n.baseline+n.lineWidth),i.width,1,s);break;case"overline":c(e,i.left,Math.round(i.top),i.width,1,s);break;case"line-through":c(e,i.left,Math.ceil(i.top+n.middle+n.lineWidth),i.width,1,s)}}function y(e,t,i,n,s){var o;if(ht.rangeBounds&&!s)("none"!==i||0!==dt.trimText(t).length)&&(o=b(t,e.node,e.textOffset)),e.textOffset+=t.length;else if(e.node&&"string"==typeof e.node.nodeValue){var a=n?e.node.splitText(t.length):null;o=w(e.node,s),e.node=a}return o}function b(e,t,i){var n=ct.createRange();return n.setStart(t,i),n.setEnd(t,i+e.length),n.getBoundingClientRect()}function w(e,t){var i=e.parentNode,n=ct.createElement("wrapper"),s=e.cloneNode(!0);n.appendChild(e.cloneNode(!0)),i.replaceChild(n,e);var o=t?dt.OffsetBounds(n):dt.Bounds(n);return i.replaceChild(s,n),o}function _(e,t,i){var n,o,a=i.ctx,r=mt(e,"color"),l=mt(e,"textDecoration"),u=mt(e,"textAlign"),c={node:t,textOffset:0};dt.trimText(t.nodeValue).length>0&&(t.nodeValue=p(t.nodeValue,mt(e,"textTransform")),u=u.replace(["-webkit-auto"],["auto"]),o=!s.letterRendering&&/^(left|right|justify|auto)$/.test(u)&&f(mt(e,"letterSpacing"))?t.nodeValue.split(/(\b| )/):t.nodeValue.split(""),n=g(a,e,l,r),s.chinese&&o.forEach(function(e,t){/.*[\u4E00-\u9FA5].*$/.test(e)&&(e=e.split(""),e.unshift(t,1),o.splice.apply(o,e))}),o.forEach(function(e,t){var s=y(c,e,l,t<o.length-1,i.transform.matrix);s&&(m(e,s.left,s.bottom,a),v(a,l,s,n,r))}))}function x(e,t){var i,n,s=ct.createElement("boundelement");return s.style.display="inline",i=e.style.listStyleType,e.style.listStyleType="none",s.appendChild(ct.createTextNode(t)),e.insertBefore(s,e.firstChild),n=dt.Bounds(s),e.removeChild(s),e.style.listStyleType=i,n}function k(e){var t=-1,i=1,n=e.parentNode.childNodes;if(e.parentNode){for(;n[++t]!==e;)1===n[t].nodeType&&i++;return i}return-1}function C(e,t){var i,n=k(e);switch(t){case"decimal":i=n;break;case"decimal-leading-zero":i=1===n.toString().length?n="0"+n.toString():n.toString();break;case"upper-roman":i=d.Generate.ListRoman(n);break;case"lower-roman":i=d.Generate.ListRoman(n).toLowerCase();break;case"lower-alpha":i=d.Generate.ListAlpha(n).toLowerCase();break;case"upper-alpha":i=d.Generate.ListAlpha(n)}return i+". "}function T(e,t,i){var n,s,o,a=t.ctx,r=mt(e,"listStyleType");if(/^(decimal|decimal-leading-zero|upper-alpha|upper-latin|upper-roman|lower-alpha|lower-greek|lower-latin|lower-roman)$/i.test(r)){if(s=C(e,r),o=x(e,s),g(a,e,"none",mt(e,"color")),"inside"!==mt(e,"listStylePosition"))return;a.setVariable("textAlign","left"),n=i.left,m(s,n,o.bottom,a)}}function D(e){var t=n[e];return t&&t.succeeded===!0?t.img:!1}function E(e,t){var i=Math.max(e.left,t.left),n=Math.max(e.top,t.top),s=Math.min(e.left+e.width,t.left+t.width),o=Math.min(e.top+e.height,t.top+t.height);return{left:i,top:n,width:s-i,height:o-n}}function S(e,t,i){var n,s="static"!==t.cssPosition,o=s?mt(e,"zIndex"):"auto",a=mt(e,"opacity"),r="none"!==mt(e,"cssFloat");t.zIndex=n=l(o),n.isPositioned=s,n.isFloated=r,n.opacity=a,n.ownStacking="auto"!==o||1>a,i&&i.zIndex.children.push(t)}function N(e,t,i,n,s){var o=u(t,"paddingLeft"),a=u(t,"paddingTop"),r=u(t,"paddingRight"),l=u(t,"paddingBottom");W(e,i,0,0,i.width,i.height,n.left+o+s[3].width,n.top+a+s[0].width,n.width-(s[1].width+s[3].width+o+r),n.height-(s[0].width+s[2].width+a+l))}function M(e){return["Top","Right","Bottom","Left"].map(function(t){return{width:u(e,"border"+t+"Width"),color:mt(e,"border"+t+"Color")}})}function z(e){return["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(t){return mt(e,"border"+t+"Radius")})}function $(e,t,i,n){var s=function(e,t,i){return{x:e.x+(t.x-e.x)*i,y:e.y+(t.y-e.y)*i}};return{start:e,startControl:t,endControl:i,end:n,subdivide:function(o){var a=s(e,t,o),r=s(t,i,o),l=s(i,n,o),u=s(a,r,o),c=s(r,l,o),d=s(u,c,o);return[$(e,a,u,d),$(d,c,l,n)]},curveTo:function(e){e.push(["bezierCurve",t.x,t.y,i.x,i.y,n.x,n.y])},curveToReversed:function(n){n.push(["bezierCurve",i.x,i.y,t.x,t.y,e.x,e.y])}}}function A(e,t,i,n,s,o,a){t[0]>0||t[1]>0?(e.push(["line",n[0].start.x,n[0].start.y]),n[0].curveTo(e),n[1].curveTo(e)):e.push(["line",o,a]),(i[0]>0||i[1]>0)&&e.push(["line",s[0].start.x,s[0].start.y])}function H(e,t,i,n,s,o,a){var r=[];return t[0]>0||t[1]>0?(r.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(r)):r.push(["line",e.c1[0],e.c1[1]]),i[0]>0||i[1]>0?(r.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(r),r.push(["line",a[0].end.x,a[0].end.y]),a[0].curveToReversed(r)):(r.push(["line",e.c2[0],e.c2[1]]),r.push(["line",e.c3[0],e.c3[1]])),t[0]>0||t[1]>0?(r.push(["line",s[1].end.x,s[1].end.y]),s[1].curveToReversed(r)):r.push(["line",e.c4[0],e.c4[1]]),r}function O(e,t,i){var n=e.left,s=e.top,o=e.width,a=e.height,r=t[0][0],l=t[0][1],u=t[1][0],c=t[1][1],d=t[2][0],h=t[2][1],p=t[3][0],f=t[3][1],m=o-u,g=a-h,v=o-d,y=a-f;return{topLeftOuter:yt(n,s,r,l).topLeft.subdivide(.5),topLeftInner:yt(n+i[3].width,s+i[0].width,Math.max(0,r-i[3].width),Math.max(0,l-i[0].width)).topLeft.subdivide(.5),topRightOuter:yt(n+m,s,u,c).topRight.subdivide(.5),topRightInner:yt(n+Math.min(m,o+i[3].width),s+i[0].width,m>o+i[3].width?0:u-i[3].width,c-i[0].width).topRight.subdivide(.5),bottomRightOuter:yt(n+v,s+g,d,h).bottomRight.subdivide(.5),bottomRightInner:yt(n+Math.min(v,o+i[3].width),s+Math.min(g,a+i[0].width),Math.max(0,d-i[1].width),Math.max(0,h-i[2].width)).bottomRight.subdivide(.5),bottomLeftOuter:yt(n,s+y,p,f).bottomLeft.subdivide(.5),bottomLeftInner:yt(n+i[3].width,s+y,Math.max(0,p-i[3].width),Math.max(0,f-i[2].width)).bottomLeft.subdivide(.5)}}function P(e,t,i,n,s){var o=mt(e,"backgroundClip"),a=[];switch(o){case"content-box":case"padding-box":A(a,n[0],n[1],t.topLeftInner,t.topRightInner,s.left+i[3].width,s.top+i[0].width),A(a,n[1],n[2],t.topRightInner,t.bottomRightInner,s.left+s.width-i[1].width,s.top+i[0].width),A(a,n[2],n[3],t.bottomRightInner,t.bottomLeftInner,s.left+s.width-i[1].width,s.top+s.height-i[2].width),A(a,n[3],n[0],t.bottomLeftInner,t.topLeftInner,s.left+i[3].width,s.top+s.height-i[2].width);break;default:A(a,n[0],n[1],t.topLeftOuter,t.topRightOuter,s.left,s.top),A(a,n[1],n[2],t.topRightOuter,t.bottomRightOuter,s.left+s.width,s.top),A(a,n[2],n[3],t.bottomRightOuter,t.bottomLeftOuter,s.left+s.width,s.top+s.height),A(a,n[3],n[0],t.bottomLeftOuter,t.topLeftOuter,s.left,s.top+s.height)}return a}function I(e,t,i){var n,s,o,a,r,l,u=t.left,c=t.top,d=t.width,h=t.height,p=z(e),f=O(t,p,i),m={clip:P(e,f,i,p,t),borders:[]};for(n=0;4>n;n++)if(i[n].width>0){switch(s=u,o=c,a=d,r=h-i[2].width,n){case 0:r=i[0].width,l=H({c1:[s,o],c2:[s+a,o],c3:[s+a-i[1].width,o+r],c4:[s+i[3].width,o+r]},p[0],p[1],f.topLeftOuter,f.topLeftInner,f.topRightOuter,f.topRightInner);break;case 1:s=u+d-i[1].width,a=i[1].width,l=H({c1:[s+a,o],c2:[s+a,o+r+i[2].width],c3:[s,o+r],c4:[s,o+i[0].width]},p[1],p[2],f.topRightOuter,f.topRightInner,f.bottomRightOuter,f.bottomRightInner);break;case 2:o=o+h-i[2].width,r=i[2].width,l=H({c1:[s+a,o+r],c2:[s,o+r],c3:[s+i[3].width,o],c4:[s+a-i[3].width,o]},p[2],p[3],f.bottomRightOuter,f.bottomRightInner,f.bottomLeftOuter,f.bottomLeftInner);break;case 3:a=i[3].width,l=H({c1:[s,o+r+i[2].width],c2:[s,o],c3:[s+a,o+i[0].width],c4:[s+a,o+r]},p[3],p[0],f.bottomLeftOuter,f.bottomLeftInner,f.topLeftOuter,f.topLeftInner)}m.borders.push({args:l,color:i[n].color})}return m}function j(e,t){var i=e.drawShape();return t.forEach(function(e,t){i[0===t?"moveTo":e[0]+"To"].apply(null,e.slice(1))}),i}function R(e,t,i){"transparent"!==i&&(e.setVariable("fillStyle",i),j(e,t),e.fill(),ut+=1)}function L(e,t,i){var n,s,o=ct.createElement("valuewrap"),a=["lineHeight","textAlign","fontFamily","color","fontSize","paddingLeft","paddingTop","width","height","border","borderLeftWidth","borderTopWidth"];a.forEach(function(t){try{o.style[t]=mt(e,t)}catch(i){dt.log("html2canvas: Parse: Exception caught in renderFormValue: "+i.message)}}),o.style.borderColor="black",o.style.borderStyle="solid",o.style.display="block",o.style.position="absolute",(/^(submit|reset|button|text|password)$/.test(e.type)||"SELECT"===e.nodeName)&&(o.style.lineHeight=mt(e,"height")),o.style.top=t.top+"px",o.style.left=t.left+"px",n="SELECT"===e.nodeName?(e.options[e.selectedIndex]||0).text:e.value,n||(n=e.placeholder),s=ct.createTextNode(n),o.appendChild(s),ft.appendChild(o),_(e,s,i),ft.removeChild(o)}function W(e){e.drawImage.apply(e,Array.prototype.slice.call(arguments,1)),ut+=1}function F(i,n){var s=e.getComputedStyle(i,n);if(s&&s.content&&"none"!==s.content&&"-moz-alt-content"!==s.content&&"none"!==s.display){var o=s.content+"",a=o.substr(0,1);a===o.substr(o.length-1)&&a.match(/'|"/)&&(o=o.substr(1,o.length-2));var r="url"===o.substr(0,3),l=t.createElement(r?"img":"span");return l.className=gt+"-before "+gt+"-after",Object.keys(s).filter(B).forEach(function(e){try{l.style[e]=s[e]}catch(t){dt.log(["Tried to assign readonly property ",e,"Error:",t])}}),r?l.src=dt.parseBackgroundImage(o)[0].args[0]:l.innerHTML=o,l}}function B(t){return isNaN(e.parseInt(t,10))}function q(e,t){var i=F(e,":before"),n=F(e,":after");(i||n)&&(i&&(e.className+=" "+gt+"-before",e.parentNode.insertBefore(i,e),ot(i,t,!0),e.parentNode.removeChild(i),e.className=e.className.replace(gt+"-before","").trim()),n&&(e.className+=" "+gt+"-after",e.appendChild(n),ot(n,t,!0),e.removeChild(n),e.className=e.className.replace(gt+"-after","").trim()))}function U(e,t,i,n){var s=Math.round(n.left+i.left),o=Math.round(n.top+i.top);e.createPattern(t),e.translate(s,o),e.fill(),e.translate(-s,-o)}function Y(e,t,i,n,s,o,a,r){var l=[];l.push(["line",Math.round(s),Math.round(o)]),l.push(["line",Math.round(s+a),Math.round(o)]),l.push(["line",Math.round(s+a),Math.round(r+o)]),l.push(["line",Math.round(s),Math.round(r+o)]),j(e,l),e.save(),e.clip(),U(e,t,i,n),e.restore()}function G(e,t,i){c(e,t.left,t.top,t.width,t.height,i)}function X(e,t,i,n,s){var o=dt.BackgroundSize(e,t,n,s),a=dt.BackgroundPosition(e,t,n,s,o),r=mt(e,"backgroundRepeat").split(",").map(dt.trimText);switch(n=J(n,o),r=r[s]||r[0]){case"repeat-x":Y(i,n,a,t,t.left,t.top+a.top,99999,n.height);break;case"repeat-y":Y(i,n,a,t,t.left+a.left,t.top,n.width,99999);break;case"no-repeat":Y(i,n,a,t,t.left+a.left,t.top+a.top,n.width,n.height);break;default:U(i,n,a,{top:t.top,left:t.left,width:n.width,height:n.height})}}function V(e,t,i){for(var n,s=mt(e,"backgroundImage"),o=dt.parseBackgroundImage(s),a=o.length;a--;)if(s=o[a],s.args&&0!==s.args.length){var r="url"===s.method?s.args[0]:s.value;n=D(r),n?X(e,t,i,n,a):dt.log("html2canvas: Error loading background:",s)}}function J(e,t){if(e.width===t.width&&e.height===t.height)return e;var i,n=ct.createElement("canvas");return n.width=t.width,n.height=t.height,i=n.getContext("2d"),W(i,e,0,0,e.width,e.height,0,0,t.width,t.height),n}function K(e,t,i){return e.setVariable("globalAlpha",mt(t,"opacity")*(i?i.opacity:1))}function Q(e){return e.replace("px","")}function Z(e){var t=mt(e,"transform")||mt(e,"-webkit-transform")||mt(e,"-moz-transform")||mt(e,"-ms-transform")||mt(e,"-o-transform"),i=mt(e,"transform-origin")||mt(e,"-webkit-transform-origin")||mt(e,"-moz-transform-origin")||mt(e,"-ms-transform-origin")||mt(e,"-o-transform-origin")||"0px 0px";i=i.split(" ").map(Q).map(dt.asFloat);var n;if(t&&"none"!==t){var s=t.match(bt);if(s)switch(s[1]){case"matrix":n=s[2].split(",").map(dt.trimText).map(dt.asFloat)}}return{origin:i,matrix:n}}function et(e,t,i,n){var l=r(t?i.width:o(),t?i.height:a()),u={ctx:l,opacity:K(l,e,t),cssPosition:mt(e,"position"),borders:M(e),transform:n,clip:t&&t.clip?dt.Extend({},t.clip):null};return S(e,u,t),s.useOverflow===!0&&/(hidden|scroll|auto)/.test(mt(e,"overflow"))===!0&&/(BODY)/i.test(e.nodeName)===!1&&(u.clip=u.clip?E(u.clip,i):i),u}function tt(e,t,i){var n={left:t.left+e[3].width,top:t.top+e[0].width,width:t.width-(e[1].width+e[3].width),height:t.height-(e[0].width+e[2].width)};return i&&(n=E(n,i)),n}function it(e,t){var i=t.matrix?dt.OffsetBounds(e):dt.Bounds(e);return t.origin[0]+=i.left,t.origin[1]+=i.top,i}function nt(e,t,i,n){var s,o=Z(e,t),a=it(e,o),r=et(e,t,a,o),l=r.borders,u=r.ctx,c=tt(l,a,r.clip),d=I(e,a,l),h=pt.test(e.nodeName)?"#efefef":mt(e,"backgroundColor");switch(j(u,d.clip),u.save(),u.clip(),c.height>0&&c.width>0&&!n?(G(u,a,h),V(e,c,u)):n&&(r.backgroundColor=h),u.restore(),d.borders.forEach(function(e){R(u,e.args,e.color)}),i||q(e,r),e.nodeName){case"IMG":(s=D(e.getAttribute("src")))?N(u,e,s,a,l):dt.log("html2canvas: Error loading <img>:"+e.getAttribute("src"));break;case"INPUT":/^(text|url|email|submit|button|reset)$/.test(e.type)&&(e.value||e.placeholder||"").length>0&&L(e,a,r);break;case"TEXTAREA":(e.value||e.placeholder||"").length>0&&L(e,a,r);break;case"SELECT":(e.options||e.placeholder||"").length>0&&L(e,a,r);break;case"LI":T(e,r,c);break;case"CANVAS":N(u,e,e,a,l)}return r}function st(e){return"none"!==mt(e,"display")&&"hidden"!==mt(e,"visibility")&&!e.hasAttribute("data-html2canvas-ignore")}function ot(e,t,i){st(e)&&(t=nt(e,t,i,!1)||t,pt.test(e.nodeName)||at(e,t,i))}function at(e,t,i){dt.Children(e).forEach(function(n){n.nodeType===n.ELEMENT_NODE?ot(n,t,i):n.nodeType===n.TEXT_NODE&&_(e,n,t)})}function rt(){var e=mt(t.documentElement,"backgroundColor"),i=dt.isTransparent(e)&&lt===t.body,n=nt(lt,null,!1,i);return at(lt,n),i&&(e=n.backgroundColor),ft.removeChild(vt),{backgroundColor:e,stack:n}}e.scroll(0,0);var lt=s.elements===i?t.body:s.elements[0],ut=0,ct=lt.ownerDocument,dt=d.Util,ht=dt.Support(s,ct),pt=new RegExp("("+s.ignoreElements+")"),ft=ct.body,mt=dt.getCSS,gt="___html2canvas___pseudoelement",vt=ct.createElement("style");vt.innerHTML="."+gt+'-before:before { content: "" !important; display: none !important; }'+"."+gt+'-after:after { content: "" !important; display: none !important; }',ft.appendChild(vt),n=n||{};var yt=function(e){return function(t,i,n,s){var o=n*e,a=s*e,r=t+n,l=i+s;return{topLeft:$({x:t,y:l},{x:t,y:l-a},{x:r-o,y:i},{x:r,y:i}),topRight:$({x:t,y:i},{x:t+o,y:i},{x:r,y:l-a},{x:r,y:l}),bottomRight:$({x:r,y:i},{x:r,y:i+a},{x:t+o,y:l},{x:t,y:l}),bottomLeft:$({x:r,y:l},{x:r-o,y:l},{x:t,y:i+a},{x:t,y:i})}}}(4*((Math.sqrt(2)-1)/3)),bt=/(matrix)\((.+)\)/;return rt()},d.Preload=function(n){function s(e){D.href=e,D.href=D.href;var t=D.protocol+D.host;return t===m}function o(){w.log("html2canvas: start: images: "+b.numLoaded+" / "+b.numTotal+" (failed: "+b.numFailed+")"),!b.firstRun&&b.numLoaded>=b.numTotal&&(w.log("Finished loading images: # "+b.numTotal+" (failed: "+b.numFailed+")"),"function"==typeof n.complete&&n.complete(b))}function a(t,s,a){var r,l,u=n.proxy;D.href=t,t=D.href,r="html2canvas_"+_++,a.callbackname=r,u+=u.indexOf("?")>-1?"&":"?",u+="url="+encodeURIComponent(t)+"&callback="+r,l=k.createElement("script"),e[r]=function(t){"error:"===t.substring(0,6)?(a.succeeded=!1,b.numLoaded++,b.numFailed++,o()):(f(s,a),s.src=t),e[r]=i;try{delete e[r]}catch(n){}l.parentNode.removeChild(l),l=null,delete a.script,delete a.callbackname},l.setAttribute("type","text/javascript"),l.setAttribute("src",u),a.script=l,e.document.body.appendChild(l)}function r(t,i){var n=e.getComputedStyle(t,i),s=n.content;"url"===s.substr(0,3)&&g.loadImage(d.Util.parseBackgroundImage(s)[0].args[0]),h(n.backgroundImage,t)}function l(e){r(e,":before"),r(e,":after")}function u(e,t){var n=d.Generate.Gradient(e,t);n!==i&&(b[e]={img:n,succeeded:!0},b.numTotal++,b.numLoaded++,o())}function c(e){return e&&e.method&&e.args&&e.args.length>0}function h(e,t){var n;d.Util.parseBackgroundImage(e).filter(c).forEach(function(e){"url"===e.method?g.loadImage(e.args[0]):e.method.match(/\-?gradient$/)&&(n===i&&(n=d.Util.Bounds(t)),u(e.value,n))})}function p(e){var t=!1;try{w.Children(e).forEach(p)}catch(n){}try{t=e.nodeType}catch(s){t=!1,w.log("html2canvas: failed to access some element's nodeType - Exception: "+s.message)}if(1===t||t===i){l(e);try{h(w.getCSS(e,"backgroundImage"),e)}catch(n){w.log("html2canvas: failed to get background-image - Exception: "+n.message)}h(e)}}function f(t,s){t.onload=function(){s.timer!==i&&e.clearTimeout(s.timer),b.numLoaded++,s.succeeded=!0,t.onerror=t.onload=null,o()},t.onerror=function(){if("anonymous"===t.crossOrigin&&(e.clearTimeout(s.timer),n.proxy)){var i=t.src;return t=new Image,s.img=t,t.src=i,a(t.src,t,s),void 0}b.numLoaded++,b.numFailed++,s.succeeded=!1,t.onerror=t.onload=null,o()}}var m,g,v,y,b={numLoaded:0,numFailed:0,numTotal:0,cleanupDone:!1},w=d.Util,_=0,x=n.elements[0]||t.body,k=x.ownerDocument,C=x.getElementsByTagName("img"),T=C.length,D=k.createElement("a"),E=function(e){return e.crossOrigin!==i}(new Image);for(D.href=e.location.href,m=D.protocol+D.host,g={loadImage:function(e){var t,o;e&&b[e]===i&&(t=new Image,e.match(/data:image\/.*;base64,/i)?(t.src=e.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),o=b[e]={img:t},b.numTotal++,f(t,o)):s(e)||n.allowTaint===!0?(o=b[e]={img:t},b.numTotal++,f(t,o),t.src=e):E&&!n.allowTaint&&n.useCORS?(t.crossOrigin="anonymous",o=b[e]={img:t},b.numTotal++,f(t,o),t.src=e):n.proxy&&(o=b[e]={img:t},b.numTotal++,a(e,t,o)))},cleanupDOM:function(s){var a,r;if(!b.cleanupDone){s&&"string"==typeof s?w.log("html2canvas: Cleanup because: "+s):w.log("html2canvas: Cleanup after timeout: "+n.timeout+" ms.");for(r in b)if(b.hasOwnProperty(r)&&(a=b[r],"object"==typeof a&&a.callbackname&&a.succeeded===i)){e[a.callbackname]=i;try{delete e[a.callbackname]}catch(l){}a.script&&a.script.parentNode&&(a.script.setAttribute("src","about:blank"),a.script.parentNode.removeChild(a.script)),b.numLoaded++,b.numFailed++,w.log("html2canvas: Cleaned up failed img: '"+r+"' Steps: "+b.numLoaded+" / "+b.numTotal)}e.stop!==i?e.stop():t.execCommand!==i&&t.execCommand("Stop",!1),t.close!==i&&t.close(),b.cleanupDone=!0,s&&"string"==typeof s||o()}},renderingDone:function(){y&&e.clearTimeout(y)}},n.timeout>0&&(y=e.setTimeout(g.cleanupDOM,n.timeout)),w.log("html2canvas: Preload starts: finding background-images"),b.firstRun=!0,p(x),w.log("html2canvas: Preload: Finding images"),v=0;T>v;v+=1)g.loadImage(C[v].getAttribute("src"));return b.firstRun=!1,w.log("html2canvas: Preload: Done."),b.numTotal===b.numLoaded&&o(),g},d.Renderer=function(e,n){function s(e){function t(e){Object.keys(e).sort().forEach(function(i){var n=[],o=[],a=[],r=[];e[i].forEach(function(e){e.node.zIndex.isPositioned||e.node.zIndex.opacity<1?a.push(e):e.node.zIndex.isFloated?o.push(e):n.push(e)}),function l(e){e.forEach(function(e){r.push(e),e.children&&l(e.children)})}(n.concat(o,a)),r.forEach(function(e){e.context?t(e.context):s.push(e.node)})})}var n,s=[];return n=function(e){function t(e,n,s){var o="auto"===n.zIndex.zindex?0:Number(n.zIndex.zindex),a=e,r=n.zIndex.isPositioned,l=n.zIndex.isFloated,u={node:n},c=s;n.zIndex.ownStacking?(a=u.context={"!":[{node:n,children:[]}]},c=i):(r||l)&&(c=u.children=[]),0===o&&s?s.push(u):(e[o]||(e[o]=[]),e[o].push(u)),n.zIndex.children.forEach(function(e){t(a,e,c)})}var n={};return t(n,e),n}(e),t(n),s}function o(e){var t;if("string"==typeof n.renderer&&d.Renderer[e]!==i)t=d.Renderer[e](n);else{if("function"!=typeof e)throw new Error("Unknown renderer");t=e(n)}if("function"!=typeof t)throw new Error("Invalid renderer defined");return t}return o(n.renderer)(e,n,t,s(e.stack),d)},d.Util.Support=function(e,t){function n(){var e=new Image,n=t.createElement("canvas"),s=n.getContext===i?!1:n.getContext("2d");if(s===!1)return!1;n.width=n.height=10,e.src=["data:image/svg+xml,","<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'>","<foreignObject width='10' height='10'>","<div xmlns='http://www.w3.org/1999/xhtml' style='width:10;height:10;'>","sup","</div>","</foreignObject>","</svg>"].join("");try{s.drawImage(e,0,0),n.toDataURL()}catch(o){return!1}return d.Util.log("html2canvas: Parse: SVG powered rendering available"),!0}function s(){var e,i,n,s,o=!1;return t.createRange&&(e=t.createRange(),e.getBoundingClientRect&&(i=t.createElement("boundtest"),i.style.height="123px",i.style.display="block",t.body.appendChild(i),e.selectNode(i),n=e.getBoundingClientRect(),s=n.height,123===s&&(o=!0),t.body.removeChild(i))),o}return{rangeBounds:s(),svgRendering:e.svgRendering&&n()}},e.html2canvas=function(t,i){t=t.length?t:[t];var n,s,o={logging:!1,elements:t,background:"#fff",proxy:null,timeout:0,useCORS:!1,allowTaint:!1,svgRendering:!1,ignoreElements:"IFRAME|OBJECT|PARAM",useOverflow:!0,letterRendering:!1,chinese:!1,width:null,height:null,taintTest:!0,renderer:"Canvas"};return o=d.Util.Extend(i,o),d.logging=o.logging,o.complete=function(e){("function"!=typeof o.onpreloaded||o.onpreloaded(e)!==!1)&&(n=d.Parse(e,o),("function"!=typeof o.onparsed||o.onparsed(n)!==!1)&&(s=d.Renderer(n,o),"function"==typeof o.onrendered&&o.onrendered(s)))},e.setTimeout(function(){d.Preload(o)},0),{render:function(e,t){return d.Renderer(e,d.Util.Extend(t,o))},parse:function(e,t){return d.Parse(e,d.Util.Extend(t,o))},preload:function(e){return d.Preload(d.Util.Extend(e,o))},log:d.Util.log}},e.html2canvas.log=d.Util.log,e.html2canvas.Renderer={Canvas:i},d.Renderer.Canvas=function(e){function n(e,t){e.beginPath(),t.forEach(function(t){e[t.name].apply(e,t.arguments)}),e.closePath()}function s(e){if(-1===r.indexOf(e.arguments[0].src)){u.drawImage(e.arguments[0],0,0);try{u.getImageData(0,0,1,1)}catch(t){return l=a.createElement("canvas"),u=l.getContext("2d"),!1}r.push(e.arguments[0].src)}return!0}function o(t,i){switch(i.type){case"variable":t[i.name]=i.arguments;break;case"function":switch(i.name){case"createPattern":if(i.arguments[0].width>0&&i.arguments[0].height>0)try{t.fillStyle=t.createPattern(i.arguments[0],"repeat")}catch(o){c.log("html2canvas: Renderer: Error creating pattern",o.message)}break;case"drawShape":n(t,i.arguments);break;case"drawImage":i.arguments[8]>0&&i.arguments[7]>0&&(!e.taintTest||e.taintTest&&s(i))&&t.drawImage.apply(t,i.arguments);break;default:t[i.name].apply(t,i.arguments)}}}e=e||{};var a=t,r=[],l=t.createElement("canvas"),u=l.getContext("2d"),c=d.Util,h=e.canvas||a.createElement("canvas");return function(e,t,n,s,a){var r,l,u,d=h.getContext("2d"),p=e.stack;return h.width=h.style.width=t.width||p.ctx.width,h.height=h.style.height=t.height||p.ctx.height,u=d.fillStyle,d.fillStyle=c.isTransparent(p.backgroundColor)&&t.background!==i?t.background:e.backgroundColor,d.fillRect(0,0,h.width,h.height),d.fillStyle=u,s.forEach(function(e){d.textBaseline="bottom",d.save(),e.transform.matrix&&(d.translate(e.transform.origin[0],e.transform.origin[1]),d.transform.apply(d,e.transform.matrix),d.translate(-e.transform.origin[0],-e.transform.origin[1])),e.clip&&(d.beginPath(),d.rect(e.clip.left,e.clip.top,e.clip.width,e.clip.height),d.clip()),e.ctx.storage&&e.ctx.storage.forEach(function(e){o(d,e)}),d.restore()}),c.log("html2canvas: Renderer: Canvas renderer done - returning canvas obj"),1===t.elements.length&&"object"==typeof t.elements[0]&&"BODY"!==t.elements[0].nodeName?(l=a.Util.Bounds(t.elements[0]),r=n.createElement("canvas"),r.width=Math.ceil(l.width),r.height=Math.ceil(l.height),d=r.getContext("2d"),d.drawImage(h,l.left,l.top,l.width,l.height,0,0,l.width,l.height),h=null,r):h}}}(window,document);var saveAs=saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(e){"use strict";var t=e.document,i=function(){return e.URL||e.webkitURL||e},n=e.URL||e.webkitURL||e,s=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o=!e.externalHost&&"download"in s,a=e.webkitRequestFileSystem,r=e.requestFileSystem||a||e.mozRequestFileSystem,l=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},u="application/octet-stream",c=0,d=[],h=function(){for(var e=d.length;e--;){var t=d[e];"string"==typeof t?n.revokeObjectURL(t):t.remove()}d.length=0},p=function(e,t,i){t=[].concat(t);for(var n=t.length;n--;){var s=e["on"+t[n]];if("function"==typeof s)try{s.call(e,i||e)}catch(o){l(o)}}},f=function(n,l){var h,f,m,g=this,v=n.type,y=!1,b=function(){var e=i().createObjectURL(n);return d.push(e),e},w=function(){p(g,"writestart progress write writeend".split(" "))},_=function(){(y||!h)&&(h=b(n)),f?f.location.href=h:window.open(h,"_blank"),g.readyState=g.DONE,w()},x=function(e){return function(){return g.readyState!==g.DONE?e.apply(this,arguments):void 0}},k={create:!0,exclusive:!1};
if(g.readyState=g.INIT,l||(l="download"),o){h=b(n),t=e.document,s=t.createElementNS("http://www.w3.org/1999/xhtml","a"),s.href=h,s.download=l;var C=t.createEvent("MouseEvents");return C.initMouseEvent("click",!0,!1,e,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(C),g.readyState=g.DONE,w(),void 0}return e.chrome&&v&&v!==u&&(m=n.slice||n.webkitSlice,n=m.call(n,0,n.size,u),y=!0),a&&"download"!==l&&(l+=".download"),(v===u||a)&&(f=e),r?(c+=n.size,r(e.TEMPORARY,c,x(function(e){e.root.getDirectory("saved",k,x(function(e){var t=function(){e.getFile(l,k,x(function(e){e.createWriter(x(function(t){t.onwriteend=function(t){f.location.href=e.toURL(),d.push(e),g.readyState=g.DONE,p(g,"writeend",t)},t.onerror=function(){var e=t.error;e.code!==e.ABORT_ERR&&_()},"writestart progress write abort".split(" ").forEach(function(e){t["on"+e]=g["on"+e]}),t.write(n),g.abort=function(){t.abort(),g.readyState=g.DONE},g.readyState=g.WRITING}),_)}),_)};e.getFile(l,{create:!1},x(function(e){e.remove(),t()}),x(function(e){e.code===e.NOT_FOUND_ERR?t():_()}))}),_)}),_),void 0):(_(),void 0)},m=f.prototype,g=function(e,t){return new f(e,t)};return m.abort=function(){var e=this;e.readyState=e.DONE,p(e,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,e.addEventListener("unload",h,!1),g}(this.self||this.window||this.content);"undefined"!=typeof module&&(module.exports=saveAs),function(e){"use strict";var t,i=e.Uint8Array,n=e.HTMLCanvasElement,s=/\s*;\s*base64\s*(?:;|$)/i,o=function(e){for(var n,s,o,a=e.length,r=new i(0|3*(a/4)),l=0,u=0,c=[0,0],d=0,h=0;a--;)s=e.charCodeAt(l++),n=t[s-43],255!==n&&n!==o&&(c[1]=c[0],c[0]=s,h=h<<6|n,d++,4===d&&(r[u++]=h>>>16,61!==c[1]&&(r[u++]=h>>>8),61!==c[0]&&(r[u++]=h),d=0));return r};i&&(t=new i([62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51])),n&&!n.prototype.toBlob&&(n.prototype.toBlob=function(e,t){if(t||(t="image/png"),this.mozGetAsFile)return e(this.mozGetAsFile("canvas",t)),void 0;var n,a=Array.prototype.slice.call(arguments,1),r=this.toDataURL.apply(this,a),l=r.indexOf(","),u=r.substring(l+1),c=s.test(r.substring(0,l));Blob.fake?(n=new Blob,n.encoding=c?"base64":"URI",n.data=u,n.size=u.length):i&&(n=c?new Blob([o(u)],{type:t}):new Blob([decodeURIComponent(u)],{type:t})),e(n)})}(self);var myCourses={data:[],saved:!1},worker,shortDays=["א","ב","ג","ד","ה","ו","ש"],longDays=["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],longMonths=["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],isReadOnly,MINUTE=6e4,HOUR=60*MINUTE,DAY=24*HOUR,WEEK=7*DAY;String.prototype.crs=function(){return this.replace(/[.]/g,"_")},String.prototype.escapeHTML=function(){return $("<div/>").text(this).html()},Number.prototype.tos2=function(){return(10>this?"0":"")+this},Date.prototype.to_weekly=function(e){var t=new Date(e),i=t.getTimezoneOffset()*MINUTE;return 0==this.getDay()&&(i-=60*MINUTE),t.setUTCHours(parseInt((this.getTime()-t.getTime())/WEEK)),t.setTime(t.getTime()+this.getUTCDay()*DAY+i),t},Date.prototype.notz=function(){return this.setTime(this.getTime()-this.getTimezoneOffset()*MINUTE),this},Date.prototype.hours=function(){var e=this.getUTCHours(),t=this.getUTCMinutes();return e+":"+(10>t?"0":"")+t},Date.prototype.date=function(){return this.getDate()+"-"+$.datepicker.regional.he.monthNamesShort[this.getMonth()]},Number.prototype.hour=function(){var e,t;return e=parseInt(this,10),t=60*(this-e),e+":"+(t||"00")},jQuery.extend({put:function(e,t,i,n){return _ajax_request(e,t,i,n,"PUT")},restDelete:function(e,t,i,n){return _ajax_request(e,t,i,n,"DELETE")}}),function(){function t(){var e=$("input#search-value").val();if(0==e.length)return Et.Error("אפשר לחפש קורס על פי שם או מספר.<br/>הקלד את הטקסט בשורת החיפוש ולחץ על הכפתור שנית"),void 0;var t="<h2>קורסים</h2><div id='res-courses' class='loading'></div><h2>אירועים ציבורים</h2><div id='res-events' class='loading'></div>",i=$("#results-dialog div").html(t);$("#results-dialog").dialog({minWidth:720,resizable:!1,height:400,maxHeight:400,title:"מחפש: "+e.escapeHTML(),buttons:[{text:"סגור",click:function(){$(this).dialog("close")}}]}),$.getJSON("/search/"+encodeURIComponent(e),function(e){var t,i=$("#results-dialog div"),n=$("<ul/>");if(e.name)return $("#results-dialog").dialog("close"),Et.addCourse(e,1),void 0;for(t=0;e.results&&t<e.results.length;t++){var s=e.results[t].number,o=e.results[t].name,a=$("<li/>").html($("<a/>").text(s+" "+o).attr("href","#").data("key",s).data("name",o).after((e.results[t].semester?" סמסטר "+e.results[t].semester+" ":"")+(e.results[t].info||"")));n.append(a)}$("#res-courses",i).removeClass("loading"),t?($("li a",n).click(Et.addCourseFromSearch),$("#res-courses",i).html(n)):$("#res-courses",i).html("לא נמצאו תוצאות לחיפוש")}).error(function(){str="אירעה שגיאה בחיפוש קורס: "+e.escapeHTML()+"<br/>"+"נשמח אם תדווחו על השגיאה ל"+"<a href='mailto:ziggi@ziggi.co'>ziggi@ziggi.co</a><br/>"+"וצרפו את הנתונים הבאים:<br/>"+"["+e.escapeHTML()+","+university.lat+","+semester.name+"]",$("#res-courses",i).removeClass("loading").html(str)}),$.getJSON("/public/"+encodeURIComponent(e),function(e){var t,n=$("<ul/>");for(t=0;t<e.length;t++){var s=e[t].id,o=e[t].title,a=$("<li/>").html($("<a/>").text(o).attr("href","#").data("id",s));n.append(a)}$("#res-events",i).removeClass("loading"),t?($("li a",n).click(Et.addEventFromSearch),$("#res-events",i).html(n)):$("#res-events",i).html("לא נמצאו תוצאות לחיפוש")}).error(function(){$("#res-events",i).removeClass("loading"),$("#res-events",i).html("לא נמצאו תוצאות לחיפוש"),$("#res-events",i).html(ul)})}function i(e){var t="<h2>קורסים</h2><div id='res-courses' class='loading'></div>",i=$("#results-dialog div").html(t);$("#results-dialog").dialog({minWidth:720,resizable:!1,height:400,maxHeight:400,title:"מחפש קורס ספורט: "+Et.timeRange(e,null,!0),buttons:[{text:"סגור",click:function(){$(this).dialog("close")}}]}),$.getJSON("/sport/"+(e.getDay()+1)+"/"+e.getUTCHours(),function(e){var t,i=$("#results-dialog div"),n=$("<ul/>");for(t=0;e.results&&t<e.results.length;t++){var s=e.results[t].number,o=e.results[t].name,a=$("<li/>").html($("<a/>").text(s+" "+o).attr("href","#").data("key",s).data("name",o));n.append(a)}$("#res-courses",i).removeClass("loading"),t?($("li a",n).click(Et.addCourseFromSearch),$("#res-courses",i).html(n)):$("#res-courses",i).html("לא נמצאו תוצאות לחיפוש")}).error(function(){str="אירעה שגיאה בחיפוש".$("#res-courses",i).removeClass("loading").html(str)})}function n(){"week"!=Tt?F():$("#calendar").weekCalendar("refresh")}function s(){et(0),J()}function o(){$("#courses").html($("#courses-tabs-template").tmpl(Et.data())),$("#menu-tab").tabs(),$("#courses-tab").tabs({collapsible:!0,beforeActivate:function(e,t){if($("#menu-tab").tabs("option",{active:1}),$("#menu-tab div#course-tab").scrollTop(0),t.newTab.length>0){var i=$($(t.newTab.context).attr("href").replace(/[.]/g,"\\."));$("#menu-tab div#course-tab").scrollTop(i.position().top-i.parent().position().top)}return!1}}),$("#courses-tab ul li").removeClass("ui-state-active"),$(window).trigger("resize"),a(),p(),l()}function a(){$("ul li.group-hour").unbind().hover(function(){y($(this).data("group"),!0)},function(){y($(this).data("group"),!1)}),$("ul li.group-hour, ul.exams li").click(function(){if(isReadOnly)return!1;var e=$(this).data("group");if("E"==e[0])v(A(e));else if("G"==e[0]){var t=H(e.substr(1));m(t.group,!t.group.selected)}else if("X"==e[0]){var i=$(this).data("date").split("T");i=i[0].split("-"),$("#calendar").weekCalendar("gotoWeek",new Date(i[0],i[1]-1,i[2]))}n()}),$(".groups ul li span.staff").click(function(){return Et.loadStaffInfo($(this).attr("data"),0),!1})}function r(e,t,i){if(e){var n=$("#mc_"+e.getDate()+"_"+e.getMonth()+"_"+e.getFullYear()),s=n.attr("title");s=(s?s+"<br/>":"")+t,"exam"==i&&n.hasClass("exam")&&(i="collision"),n.addClass(i).attr("title",s)}}function l(){var e;for(e=0;e<wt.length;e++){var t=wt[e];if(0!=t.university_id){if(t.selected)if(t.weekly)for(var i=new Date(t.date_start);new Date(i)<=new Date(semester.end);)r(i,t.title,"event"),i.setTime(i.getTime()+6048e5);else r(new Date(t.date_start),t.title,"event")}else r(new Date(t.date_start),t.title,"holiday")}for(r(semester.start,"פתיחת סמסטר "+semester.name,"semester"),r(semester.end,"סיום סמסטר "+semester.name,"semester"),r(semester.exams_start,"תחילת בחינות סמסטר "+semester.name,"semester"),r(semester.exams_end,"סיום בחינות סמסטר "+semester.name,"semester"),c=0;c<bt.length;c++)for(e=0;bt[c].exams&&e<bt[c].exams.length;e++){var n=bt[c].exams[e];r(new Date(n.date_start),"מועד "+n.type+" "+bt[c].name+"<br/>"+Et.timeRange(n.date_start,n.date_end,!1),"exam")}$("#mini-cal table tr td.day").click(function(){var e=$(this).attr("id").split("_");$("#edit-mode a").removeClass("selected"),$("#edit-btn").addClass("selected"),U(0),F(),$("#calendar").weekCalendar("gotoWeek",new Date(e[3],e[2],e[1])),window.history.pushState("schedule#","schedule#","schedule#")})}function u(e){var t,i=null;return lt(function(n){if(n.reception_hours)for(t=0;t<n.reception_hours.length;t++)n.reception_hours[t].staff_id==e&&(i=n.reception_hours[t])}),i}function h(){$("#save-button button").removeAttr("disabled"),clearTimeout(kt),kt=setTimeout(function(){Et.saveGroups()},1500)}function p(){var e=0,t=0;lt(function(i){var n;if(i.groups)for(n=0;n<i.groups.length;n++)if(i.groups[n].selected)return e+=i.hours||0,t+=i.points||0,void 0}),$("#points").html("&nbsp;נקודות זכות : "+t),$("#hours").html("&nbsp;שעות שבועיות : "+e)}function f(e,t){var i;for(i=0;i<xt.groups.length;i++)if(xt.groups[i].id==e.id){xt.groups[i].selected=t;break}i==xt.groups.length&&xt.groups.push({id:e.id,s:t}),e.selected=t,t?$('li[data-group="G'+e.id+'"]').addClass("selected"):$('li[data-group="G'+e.id+'"]').removeClass("selected")}function m(e,t){f(e,t),p(),h()}function v(e,t){var i;for("undefined"==typeof t&&(t=!e.selected),i=0;i<xt.events.length;i++)if(xt.events[i].id==e.id){xt.events[i].s=t;break}i==xt.events.length&&xt.events.push({id:e.id,s:t}),e.selected=t,t?$("#E"+e.id).addClass("selected"):$("#E"+e.id).removeClass("selected"),h()}function y(e,t){if(void 0===$.bbq.getState("m")||"edit"==$.bbq.getState("m")){t||$("#calendar").weekCalendar("removeUnsavedEvents");var i=$("."+e);if(i.length)return t?i.addClass("hovering"):i.removeClass("hovering"),void 0;if(t){var n,s=[];if("E"==e[0]){var o=A(e);M(s,o,"placeholder"+(o.staff_id?" reception":""))}else if("G"==e[0]){var a=H(e.substr(1));N(s,a.course,a.group,"placeholder")}for(n=0;n<s.length;n++)s[n].id=null,$("#calendar").weekCalendar("updateEvent",s[n])}}}function w(e,t,i){var s={id:0,date_start:e.notz().toJSON(),date_end:t.notz().toJSON(),title:"אירוע חדש"};$("#info").addClass("loading"),$.post("/event",s,function(e){$("#info").removeClass("loading"),wt.push(e),i.weekCalendar("removeUnsavedEvents"),Et.refreshPersonalEvents(),Et.refreshMiniCal(),l(),n()},"json")}function _(e,t){var i=e;return $.isPlainObject(t)&&(i=e,e={id:t.submitdata.id},e[t.submitdata.data]=i),$.post("/event",e,function(t){var i;for(i=0;i<wt.length;i++)if(wt[i].id==e.id){var s=wt[i].selected;wt[i]=t,wt[i].selected=s;break}lt(function(n){if(n.reception_hours)for(i=0;i<n.reception_hours.length;i++)if(n.reception_hours[i].id==e.id){var s=n.reception_hours[i].selected;return n.reception_hours[i]=t,n.reception_hours[i].selected=s,void 0}}),Et.refreshPersonalEvents(),Et.refreshMiniCal(),l(),n()},"json"),i}function x(){switch($.bbq.getState("m")){case"edit":case"super":case void 0:n();break;case"calendar":rt()}}function k(){x(),o()}function C(e,t){for(var i=e.length;i--;)if(e[i].id===t.id)return!0;return!1}function T(e){var t;for(t=0;t<bt.length&&bt[t].number!=e;t++);bt.splice(t,1),k()}function D(e,t,i,n,s,o,a){var r={};return r.id=e,r.name=t,r.start=i,r.end=n,r.title=s,r.content=o,r.className=a,r.readOnly=!0,r}function E(){var e=new Date;return e<semester.start&&(e=semester.start),e.setUTCHours(0,0),e}function S(){var e=vt.getTime(),t=new Date;return t.setTime(e+24*HOUR),vt.getTimezoneOffset()!=t.getTimezoneOffset()&&(e-=MINUTE*(vt.getTimezoneOffset()-t.getTimezoneOffset())),e}function N(e,t,i,n){var s,o,a,r;for(a='<span class="ui-icon ui-icon-plus" title="בחר קבוצה"></span>',r='<span class="ui-icon ui-icon-minus" title="הסר קבוצה"></span>',o=S(),s=0;s<i.hours.length;s++){var l,u,c,d=i.hours[s];u=Et.newDateConstructor(d.date_start),c=Et.newDateConstructor(d.date_end),u.setTime(o+u.getUTCDay()*DAY+u.getUTCHours()*HOUR),c.setTime(o+c.getUTCDay()*DAY+c.getUTCHours()*HOUR),c-u==HOUR&&(n+=" one-hour"),l=D(t.number+"_"+i.number,t.number,u,c,"("+i.number+") "+t.name+(isReadOnly?"":i.selected?r:a),(i.staff.name?i.staff.name:"")+"<br/>"+"<span><a class='' href='#m=map' onclick='ziggi.markRoom(\""+ft(d.room)+"\")' role='button' aria-disabled='false'>"+d.room+"</a></span>",t.number+" "+i.type+" "+"G"+i.id+" "+n||""),l.course=t,l.group=i,e.push(l)}return e}function M(e,t,i){var n,s,o,a=S();if(n=Et.newDateConstructor(t.date_start),s=Et.newDateConstructor(t.date_end),t.weekly){var r=$.weekCalendar.getSunday(n).getTime();n=new Date(a+n.getTime()-r),r=$.weekCalendar.getSunday(s).getTime(),s=new Date(a+s.getTime()-r)}else o=n.getTimezoneOffset()*MINUTE,n.setTime(n.getTime()+o),s.setTime(s.getTime()+o);t.isReadOnly=isReadOnly;var l=D("E"+t.id,t.title,n,s,$("#event-template").tmpl(t),$("#event-location-template").tmpl(t),"E"+t.id+" event "+i);return l.readOnly=!1,l.isManual=!0,e.push(l),e}function z(e,t){var i,n,s;return i=new Date(t.date_start),n=new Date(t.date_end),i.setHours(0),n.setHours(0),i.setMinutes(1),n.setMinutes(1),s=D("fullday_"+t.id,t.title,i,n,t.title,"","full-day"),e.push(s),e}function A(e){var t,i=null;for("E"==e[0]&&(e=parseInt(e.substr(1))),t=0;t<wt.length;t++)if(wt[t].id==e)return wt[t];return lt(function(n){if(n.reception_hours)for(t=0;t<n.reception_hours.length;t++)n.reception_hours[t].id==e&&(i=n.reception_hours[t])}),i}function H(e){var t={course:null,group:null};return ct(function(i,n){n.id==e&&(t.course=i,t.group=n)}),t}function O(e){var t=A(e.id);if(t){var i=new Date(e.start),n=new Date(e.end),s={id:t.id,date_start:i.notz().toJSON(),date_end:n.notz().toJSON()};t.date_start=i,t.date_end=n,$(".groups li#event"+t.id+" .ctime").html(Et.timeRange(t.date_start,t.date_end,t.weekly)),$("#info").addClass("loading"),$.post("/event",s,function(){$("#info").removeClass("loading")},"json")}}function P(e,t,i,n,s,o,a,r){if(t){"string"==typeof t&&(t=new Date(t));var l=new Date,u=new Date,c=t.getTimezoneOffset()*MINUTE;l.setTime(t.getTime()+i*HOUR+c),u.setTime(t.getTime()+n*HOUR+c),e.push(D(s,o,l,u,r?a:"",r||a,"msg"))}}function I(t,i){var n=[];if(vt=t,yt=i,t<semester.end||Ct){if(ct(function(e,t){(t.selected||Ct)&&N(n,e,t,Ct&&!t.selected?"placeholder":"")}),Ct)return n;lt(function(t){if(t.events){for(e=0;e<t.events.length;e++)ev=t.events[e],ev.selected&&M(n,ev,"event");for(e=0;e<t.reception_hours.length;e++)ev=t.reception_hours[e],ev.selected&&M(n,ev,"reception")}})}else for(c=0;c<bt.length;c++)for(e=0;bt[c].exams&&e<bt[c].exams.length;e++){var s=bt[c].exams[e];P(n,s.date_start,0,1,"e"+e,"e"+e,"מועד "+s.type,bt[c].name+"<br/>"+Et.timeRange(s.date_start,s.date_end,!1))}for(e=0;e<wt.length;e++)if(ev=wt[e],ev.university_id){if(ev.selected){var o=new Date(ev.date_start);1==ev.weekly&&new Date(o)>new Date(t)?new Date(o)<new Date(i)&&M(n,ev,"event"):M(n,ev,"event")}}else z(n,ev);return P(n,semester.start,8,8.5,"open","open_semester","פתיחת סמסטר "+semester.name),P(n,semester.end,8,8.5,"close","close_semester","סיום סמסטר "+semester.name),P(n,semester.exams_start,8,8.5,"open_exam","open_exam","תחילת בחינות סמסטר "+semester.name),P(n,semester.exams_end,8,8.5,"close_exam","close_exam","סיום בחינות סמסטר "+semester.name),n}function j(e,t){var i=[];return vt=e,yt=t,dt(function(e,t){t.selected&&N(i,e,t,Ct&&!t.selected?"placeholder":"")}),i}function R(e,t){for(var i,n,s=$.weekCalendar.getSunday(semester.start),o=[],t=$.weekCalendar.getSaturday(semester.exams_end),a=s.getTime();t>=a;a+=DAY){var r=new Date(a);st(o,s,r,Et.dateString(r),"")}for(ot(o,new Date,"","wc-today","drawCurrentTimeLine"),ot(o,semester.start,"פתיחת סמסטר "+semester.name),ot(o,semester.end,"סיום סמסטר "+semester.name,Et.dateString(semester.end)),ot(o,semester.exams_start,"תחילת בחינות סמסטר "+semester.name,Et.dateString(semester.exams_start)),ot(o,semester.exams_end,"סיום בחינות סמסטר "+semester.name,Et.dateString(semester.exams_end)),n=0;n<bt.length;n++){var l=bt[n].exams;if(l)for(i=0;i<l.length;i++){var u=l[i];ot(o,u.date_start,Et.hourString(u.date_start,u.date_end)+"מועד "+u.type+bt[n].name)}}return o}function L(){$("button").button(),$("#search-menu").buttonset(),$("#cal-buttons, #zoom-buttons, #semester-buttons, #advancedMenu2").buttonset(),$("#search-course, #recommended-btn").buttonset(),$("#save-button").buttonset(),isReadOnly||(title="לחץ לעבור בין מסך מלא למצב עריכת מערכת",$(".wc-scrollbar-shim").attr("title",title).html($("<span/>").addClass("ui-icon ui-icon-triangle-1-nw")).unbind("click").click(function(){$(".south,.east,.north,#info").toggle(),$(".wc-scrollbar-shim span.ui-icon").toggleClass("ui-icon-triangle-1-nw").toggleClass("ui-icon-triangle-1-se"),$(window).trigger("resize")}))}function W(e,t,i){var n=A(e);if(t.hasClass("ui-icon-minus"))0==n.isReadOnly?Et.deleteEvent(n.id):v(n,!1);else if(t.hasClass("ui-icon-calculator"))_({id:n.id,weekly:!0});else if(t.hasClass("ui-icon-arrowrefresh-1-s"))_({id:n.id,weekly:!1});else if(t.hasClass("ui-icon-pencil")){var s={placeholder:"",submitdata:{id:n.id,data:"title"},callback:function(e){$(this).editable("destroy"),$(this).html(e)}};$("div.edit",t.parent()).editable(_,s).trigger("click"),$("input",t.parent()).select()}else"disabled"!=t.attr("disabled")&&(t.hasClass("ui-icon-locked")||t.hasClass("ui-icon-unlocked"))&&($("#event-menu a").removeClass("selected"),n.public?$("#event-menu-public").addClass("selected"):$("#event-menu-private").addClass("selected"),$("#event-menu").show().position({my:"right top",of:i}),$(document).one("click",function(){$("#event-menu").hide()}),$("#event-menu a").click(function(){var e={id:n.id};return e["public"]="event-menu-private"!=$(this).attr("id"),_(e),$(document).trigger("click"),!1}))}function F(e){var t=$("#calendar");Tt="week",t.html(""),$("body").removeClass("monthly").removeClass("summary").removeClass("map").removeClass("advanced"),t.weekCalendar($.extend({},Dt,{date:E(),dateFormat:"M d, Y",businessHours:{start:8,end:22,limitDisplay:!0},drawCurrentTimeLine:!0,buttons:!Ct,buttonsContainer:"#cal-buttons",timeslotHeight:e?e:20,buttonText:{today:"היום",lastWeek:"&nbsp;&lt;&nbsp;",nextWeek:"&nbsp;&gt;&nbsp;"},buttonTitle:{today:"עבור להיום",lastWeek:"שבוע אחורה",nextWeek:"שבוע קדימה"},readonly:isReadOnly,minDate:semester.start,maxDate:semester.exams_end||semester.end,draggable:function(e){return!e.readOnly&&!isReadOnly},resizable:function(e){return!e.readOnly&&!isReadOnly},eventDrop:function(e){return isReadOnly?!1:(O(e),Et.refreshPersonalEvents(),Et.refreshMiniCal(),l(),void 0)},eventResize:function(e){return isReadOnly?!1:(O(e),Et.refreshPersonalEvents(),Et.refreshMiniCal(),l(),void 0)},eventNew:function(e){return isReadOnly?!1:(w(e.start,e.end,t),void 0)},eventClick:function(e,t,i){return isReadOnly?!1:t.hasClass("ui-icon")?(e.isManual?W(e.id,t,i):(m(e.group,t.hasClass("ui-icon-plus")),n()),!1):!1},weeklyClick:function(e){if(isReadOnly)return!1;var t=e,n=$("#calendar").weekCalendar("getTimeFromEvent",e);return n.notz(),$("#week-menu #week-menu-day").html(Et.timeRange(n,null,!0)),$("#week-menu .group-hour").remove(),ht(function(e,t,i){if(!t.selected){var s=Et.newDateConstructor(i.date_start),o=Et.newDateConstructor(i.date_end);s.getDay()!=n.getDay()||s.getUTCHours()>n.getUTCHours()||o.getUTCHours()<n.getUTCHours()||$("#week-menu #week-menu-day").after('<li class="group-hour ui-menu-item '+t.type+'" data-group="G'+t.id+'">'+'<a href="#">'+e.name+" ("+t.number+")"+"</a></li>")}}),a(),$("#week-menu").show().position({my:"right top",of:e}),$(document).one("click",function(){$("#week-menu").hide()}),$("#add-event a").unbind("click").bind("click",function(){var e=$.Event("mousedown",{pageX:t.pageX,pageY:t.pageY});$(t.target).trigger(e,!0).trigger("mouseup",!0)}),$("#search-free-hour a").unbind("click").bind("click",function(){i(n)}),!1},eventMouseover:function(e){e.course&&$("."+e.course.number.crs()+"_"+e.group.number).addClass("hovering")},eventMouseout:function(e){e.course&&$("."+e.course.number.crs()+"_"+e.group.number).removeClass("hovering")},data:function(e,t,i){i(I(e,t))},columnHeader:"סמסטר  "+semester.name+(isReadOnly?"<br/>(קריאה בלבד)":""),hideDate:!1}))}function B(){var e;for(e=0;e<g_courses.length;e++)g_courses[e].hours?Et.addCourse(g_courses[e],0):loadCourseByNumber(g_courses[e].number,g_courses[e].name)}function q(){$("#select_semester").change(function(){window.location.replace("user/"+$(this).val())})}function U(e){Ct=e,Ct?$("body").addClass("super"):$("body").removeClass("super"),F(),n()}function Y(){var e,t,i,n,s,o,a=[],t=E(),r=t.getTimezoneOffset()*MINUTE,l=$.weekCalendar.getSunday(t).getTime();for(n=new Date(l),n.setTime(n.getTime()+8*HOUR+r),e=0;e<_t.length;e++){var c=_t[e];for(i=new Date(n),i.setTime(n.getTime()),n=new Date(l),n.setTime(i.getTime()+.5*(c.staff.length||1)*HOUR),a.push(D("","",i,n,"",c.name+"<br/>"+c.number,"")),t=0;t<c.staff.length;t++){var d=c.staff[t];s=new Date(i),s.setTime(s.getTime()+DAY+.5*t*HOUR),o=new Date(s),o.setTime(o.getTime()+.5*HOUR),a.push(D(d.id,"",s,o,"",d.name,"staff_name")),s=new Date(s),s.setTime(s.getTime()+DAY),o=new Date(s),o.setTime(o.getTime()+.5*HOUR),a.push(D("",d.id,s,o,"",d.email,"staff_email")),s=new Date(s),s.setTime(s.getTime()+DAY),o=new Date(s),o.setTime(o.getTime()+.5*HOUR),a.push(D("",d.id,s,o,"",d.phone,"staff_phone")),s=new Date(s),s.setTime(s.getTime()+DAY),o=new Date(s),o.setTime(o.getTime()+.5*HOUR),a.push(D("",d.id,s,o,"",d.room,"staff_room"));var h,p="...";h=u(d.id),h&&(p=Et.timeRange(h.date_start,h.date_end,!0)),s=new Date(s),s.setTime(s.getTime()+DAY),o=new Date(s),o.setTime(o.getTime()+.5*HOUR),a.push(D("",d.id,s,o,"",d.reception,"staff_reception"))}}return a}function G(){var e=$("#calendar");Tt="summary",e.html(""),$("body").removeClass("monthly").addClass("summary").removeClass("map"),e.weekCalendar($.extend({},Dt,{date:E(),dateFormat:"M d, Y",businessHours:{start:8,end:22,limitDisplay:!0},drawCurrentTimeLine:!1,data:function(e,t,i){i(Y())},timeslotHeight:20,calendarAfterLoad:function(){L();var e={method:"POST",loadtext:"טוען..",placeholder:"...",submitdata:function(){return{id:$($(this).parent()).attr("sid"),editable:!0}}};e.name="email",$(".staff_email .wc-title").editable("/staff",e),e.name="phone",$(".staff_phone .wc-title").editable("/staff",e),e.name="room",$(".staff_room .wc-title").editable("/staff",e),e.name="reception",$(".staff_reception .wc-title").editable("/staff",e)},eventRender:function(e,t){return t.attr("sid",e.name),t},eventClick:function(e){"staff_name"==e.className&&Et.loadStaffInfo(e.id)},daysToShow:6,longDays:["קורס","מרצה","אימייל","טלפון","חדר","שעות קבלה","&nbsp;"],columnHeader:"סמסטר  "+semester.name,hideDate:!0}))}function X(){$.getJSON("/summary",function(e){_t=e,"summary"!=Tt?G():$("#calendar").weekCalendar("refresh")})}function V(){et(0)}function J(){St.length>0?$("#asb_prev").removeAttr("disabled").removeClass("ui-state-disabled"):$("#asb_prev").attr("disabled",!0).addClass("ui-state-disabled"),myCourses.saved?$("#saveSchedFuture").html("<span class='ui-button-text'>מחק מהשוואה</span>"):$("#saveSchedFuture").html("<span class='ui-button-text'>שמור להשוואה</span>")}function K(){var e=[];return $('input[name="asb_day"]').each(function(){this.checked||e.push(this.value)}),e}function Q(e){var t,i="",n="";switch(zt=K(),e){case"nav":n="none",i="",Mt=!0,t=!0;break;default:i="none",n="",Mt=!1,t=!1}$("#asb_build").css("display",n),$("#advancedHafifot").css("display",n),$("#asb_txtInter").css("display",n),$("#asb_prev").css("display",i),$("#asb_next").css("display",i),$("#asb_cancel").css("display",i),$("#saveSchedAlways").css("display",i),$("#saveSchedFuture").css("display",i),$("#asb_inters").css("display",i),$("#asb_inters").html("מס' חפיפות: "+$("#advancedHafifot")[0].value),$('input[name="asb_day"]').attr("disabled",!0)}function Z(){null==worker&&(worker=new Worker("assets/schedBuild.js"),worker.addEventListener("message",function(e){var t=e.data;switch(t.cmd){case"result":myCourses={data:[],saved:!1},myCourses.data=t.sched,myCourses.saved=!1,s();break;case"noResult":Et.dialogOneOption("לא נמצאה תוצאה","לא ניתן למצוא מערכת התואמת לאילוצים שהגדרת<br/>נא לנסות שנית עם מספר חפיפות גדול יותר.");break;default:document.getElementById("result").textContent="data.grp.id"}},!1))}function et(e){Z();var t=$("#calendar");Tt="advanced",t.html(""),$("body").removeClass("monthly").addClass("advanced").removeClass("map").removeClass("summary"),t.weekCalendar($.extend({},Dt,{date:E(),dateFormat:"M d, Y",businessHours:{start:8,end:22,limitDisplay:!0},drawCurrentTimeLine:!1,buttons:!Ct,buttonsContainer:"#cal-buttons",timeslotHeight:e?e:20,buttonText:{today:"היום",lastWeek:"&nbsp;&lt;&nbsp;",nextWeek:"&nbsp;&gt;&nbsp;"},buttonTitle:{today:"עבור להיום",lastWeek:"שבוע אחורה",nextWeek:"שבוע קדימה"},readonly:isReadOnly,minDate:semester.start,maxDate:semester.exams_end,draggable:function(e){return!e.readOnly&&!isReadOnly},resizable:function(e){return!e.readOnly&&!isReadOnly},eventDrop:function(e){return isReadOnly?!1:(O(e),void 0)},eventResize:function(e){return isReadOnly?!1:(O(e),void 0)},eventNew:function(e){return isReadOnly?!1:(w(e.start,e.end,t),void 0)},eventClick:function(e,t,i){return isReadOnly?!1:t.hasClass("ui-icon")?(e.isManual?W(e.id,t,i):(m(e.group,t.hasClass("ui-icon-plus")),n()),!1):!1},weeklyClick:function(e){if(isReadOnly)return!1;var t=e,n=$("#calendar").weekCalendar("getTimeFromEvent",e);return $("#week-menu #week-menu-day").html(Et.timeRange(n,null,!0)),$("#week-menu .group-hour").remove(),ht(function(e,t,i){if(!t.selected){var s=Et.newDateConstructor(i.date_start),o=Et.newDateConstructor(i.date_end);s.getDay()!=n.getDay()||s.getUTCHours()>n.getUTCHours()||o.getUTCHours()<n.getUTCHours()||$("#week-menu #week-menu-day").after('<li class="group-hour ui-menu-item '+t.type+'" data-group="G'+t.id+'">'+'<a href="#">'+e.name+" ("+t.number+")"+"</a></li>")}}),a(),$("#week-menu").show().position({my:"right top",of:e}),$(document).one("click",function(){$("#week-menu").hide()}),$("#add-event a").unbind("click").bind("click",function(){var e=$.Event("mousedown",{pageX:t.pageX,pageY:t.pageY});$(t.target).trigger(e,!0).trigger("mouseup",!0)}),$("#search-free-hour a").unbind("click").bind("click",function(){i(n)}),!1},eventMouseover:function(e){e.course&&$("."+e.course.number.crs()+"_"+e.group.number).addClass("hovering")},eventMouseout:function(e){e.course&&$("."+e.course.number.crs()+"_"+e.group.number).removeClass("hovering")},data:function(e,t,i){i(j(e,t))},longDays:["ראשון&nbsp"+it(tt(0),nt("advanced-day1","asb_day","0",tt(0),Mt),"advanced-day1-div"),"שני&nbsp"+it(tt(1),nt("advanced-day2","asb_day","1",tt(1),Mt),"advanced-day2-div"),"שלישי&nbsp"+it(tt(2),nt("advanced-day3","asb_day","2",tt(2),Mt),"advanced-day3-div"),"רביעי&nbsp"+it(tt(3),nt("advanced-day4","asb_day","3",tt(3),Mt),"advanced-day4-div"),"חמישי&nbsp"+it(tt(4),nt("advanced-day5","asb_day","4",tt(4),Mt),"advanced-day5-div"),"שישי&nbsp"+it(tt(5),nt("advanced-day6","asb_day","5",tt(5),Mt),"advanced-day6-div"),"&nbsp;"],hideDate:!0}))}function tt(e){for(var t=0;t<zt.length;t++)if(zt[t]==e)return!1;return!0}function it(e,t,i){return"<div id='"+i+"' class='advanced-days-"+(e?"checked":"unchecked")+"'>"+t+"</div>"}function nt(e,t,i,n,s){return"<input type='checkbox' title='תסמן את הימים שבהם תרצה ללמוד' class='advanced-days' onchange='ziggi.changeDivBackground(\""+e+"\");' "+" id='"+e+"' "+(n?"checked ":"")+(s?"disabled ":"")+"name='"+t+"'"+"value='"+i+"'"+"/>"}function st(e,t,i,n,s,o,a){var r,l;if(!i)return null;"string"==typeof i&&(i=new Date(i)),r=i.to_weekly(t),l=new Date,l.setTime(r.getTime()+HOUR);var u={start:r,end:l,title:n,content:s};void 0!==o&&(u.className=o),void 0!==a&&(u.id=a),e.push(u)}function ot(e,t,i,n,s){"string"==typeof t&&(t=new Date(t)),d=parseInt((t.getTime()-e[0].start.getTime())/DAY),void 0!==e[d]&&(e[d].content+=i+"<br/>",void 0!==n&&(e[d].className+=" "+n),void 0!==s&&(e[d].id=s))}function at(){var e=$("#calendar");Tt="month",e.html(""),$("body").addClass("monthly").removeClass("summary").removeClass("map"),e.weekCalendar($.extend({},Dt,{is_monthly:!0,date:$.weekCalendar.getSunday(semester.start),dateFormat:"",daysToShow:7,businessHours:{start:0,end:((semester.exams_end||semester.end)-semester.start)/WEEK,limitDisplay:!0},data:function(e,t,i){i(R(e,t))},columnHeader:"סמסטר  "+semester.name,hideDate:!0})),$("#semester-name").text(semester.name)}function rt(){"month"!=Tt?at():$("#calendar").weekCalendar("refresh")}function lt(e){var t;for(t=0;t<bt.length;t++)e(bt[t])}function ut(e){var t;for(t=0;t<myCourses.data.length;t++)e(myCourses.data[t])}function ct(e){lt(function(t){if(t.groups)for(g=0;g<t.groups.length;g++)group=t.groups[g],e(t,group)})}function dt(e){ut(function(t){if(t.groups)for(g=0;g<t.groups.length;g++)group=t.groups[g],e(t,group)})}function ht(e){ct(function(t,i){var n;for(n=0;n<i.hours.length;n++){var s=i.hours[n];e(t,i,s)}})}function pt(e){var t=[];return ht(function(i,n,s){if(n.selected){var o=/\[([0-9].)\]/.exec(s.room);o&&o[1]&&o[1]==e&&t.push({course:i,group:n,hour:s})}}),t}function ft(e){var t=/\[([0-9].)\]/.exec(e);return null!=t&&0!=t.length?t[1]:""}function mt(e){e.style.padding="5px";var t=document.createElement("DIV");t.style.backgroundColor="white",t.style.borderStyle="solid",t.style.borderWidth="1px",t.title="Legend",e.appendChild(t);var i=document.createElement("DIV");i.style.fontFamily="Arial,sans-serif",i.style.fontSize="12px",i.style.paddingLeft="4px",i.style.paddingRight="4px",i.style.textAlign="right",i.innerHTML='<div style="text-align: center;"><b>מקרא</b></div><br /><img src="http://maps.google.com/mapfiles/ms/micons/red-dot.png" /> בניין <br /> <img src="http://maps.google.com/mapfiles/ms/micons/green-dot.png" />בניין לימודים<br /><img src="http://maps.google.com/mapfiles/ms/micons/blue-dot.png" />בניין מבוקש<br />',t.appendChild(i)}function gt(){var e={center:new google.maps.LatLng(university.lat,university.lng),zoom:17,mapTypeId:google.maps.MapTypeId.ROADMAP},t=new google.maps.Map(document.getElementById("calendar"),e),i=document.createElement("DIV");new mt(i,t),i.index=1,t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(i),Tt=null,$.getJSON("/rooms",function(e){var i=$("#calendar").data("roomname");$.each(e,function(e,n){var s,o,a,o,r=new google.maps.LatLng(n.lat,n.lng),l="ff776b",u=n.name+(n.comment?": "+n.comment:"");for(o=pt(n.name),a=0;a<o.length;a++){var c=o[a];l="4ae14a",u+="\n"+c.course.name+" ["+c.group.number+"]"+" "+Et.timeRange(c.hour.date_start,c.hour.date_end,!0)}i&&n.name==i&&(l="6b6bf9",$("#calendar").data("roomname","")),s="http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld="+n.name+"|"+l,new google.maps.Marker({position:r,map:t,icon:s,title:u})})})}var vt,yt,bt=[],wt=[],_t=[],xt={groups:[],events:[]},kt=null,Ct=!1,Tt=null,Dt={is_monthly:!1,timeFormat:"h:i a",daysToShow:6,use24Hour:!0,firstDayOfWeek:0,useShortDayNames:!1,timeSeparator:" עד ",useTimeSeparator:!1,startParam:"start",endParam:"end",newEventText:"יוצר אירוע חדש...",timeslotHeight:18,timeslotsPerHour:2,defaultEventLength:2,buttons:!1,readonly:!0,scrollToHourMillis:500,allowCalEventOverlap:!0,overlapEventsSeparate:!0,eventRender:function(e,t){return t},eventAfterRender:function(e,t){return t},eventClick:function(){},eventMouseover:function(){},eventMouseout:function(){},draggable:function(){return!1},resizable:function(){return!1},eventDrag:function(){},eventDrop:function(){},eventResize:function(){},eventNew:function(){},weeklyClick:function(){},calendarBeforeLoad:function(){},calendarAfterLoad:function(){L()},noEvents:function(){},shortMonths:["ינו","פבר","מרץ","אפר","מאי","יונ","יולי","אוג","ספט","אוק","נוב","דצמ"],longMonths:longMonths,shortDays:shortDays,longDays:longDays,height:function(){return $("#calendar").height()}},Et=function(){return new Et.fn.init};Et.data=function(){var e,t,i,n=[],s=new Date;s.setUTCHours(0,0,0,0),s=s.getTime(),e=semester.start.getTime();var o=semester.exams_end||semester.end;for(t=o.getTime(),i=e;t>=i;i+=DAY){var a=new Date(i);n.push({month:a.getMonth(),day:a.getDate(),year:a.getFullYear(),today:s==i})}return{courses:bt,events:wt,dates:n}},Et.fn=Et.prototype={constructor:Et,init:function(){return this
}},Et.newDateConstructor=function(e){if(null==e)return new Date;if(e instanceof Date)return new Date(e);var t=e.split("T"),i=t[0].split("-"),n=t[1].split("Z")[0].split(":");return new Date(Date.UTC(i[0],i[1]-1,i[2],n[0],n[1],n[2]))},Et.dateString=function(e){var t="{day}",i=Et.newDateConstructor(e);return t.replace(/\{day\}/,i.date())},Et.hourString=function(e,t){var i="{hour}",n=Et.newDateConstructor(e),s=Et.newDateConstructor(t);return i.replace(/\{hour\}/,n.hours()+(t?" - "+s.hours():""))},Et.timeRange=function(e,t,i){var n="{day} {hour}",s=Et.newDateConstructor(e),o=Et.newDateConstructor(t);return n.replace(/\{day\}/,i?"יום "+shortDays[s.getDay()]:s.date()).replace(/\{hour\}/,s.hours()+(t?" - "+o.hours():""))},Et.loadStaffInfo=function(e,t){return t||$("#staff-dialog").data("staff_id")!==e?($("#staff-dialog").data("staff_id",e),$.getJSON("staff/"+e,Et.staffInfo),$.getJSON("rank/"+e,Et.staffRank),void 0):($("#staff-dialog").dialog("isOpen")?$("#staff-dialog").dialog("close"):$("#staff-dialog").dialog("open"),void 0)},Et.staffInfo=function(e){var t=e.name.match(/[^ .'"]+/);t&&(t=t[0]),$("#staff-dialog div#image").removeClass().addClass(t);var i={method:"POST",loadtext:"טוען..",placeholder:"הקלק על מנת לערוך",submitdata:{id:e.id,editable:!0}};$("#staff-dialog span#email").editable("destroy"),$("#staff-dialog span#phone").editable("destroy"),$("#staff-dialog span#room").editable("destroy"),$("#staff-dialog span#reception").editable("destroy"),i.name="email",$("#staff-dialog span#email").html(e.email).editable("/staff",i),i.name="phone",$("#staff-dialog span#phone").html(e.phone).editable("/staff",i),i.name="room",$("#staff-dialog span#room").html(e.room).editable("/staff",i),i.name="reception",$("#staff-dialog span#reception").html(e.reception).editable("/staff",i);var n,s="";n=u(e.id),s=n?Et.timeRange(n.date_start,n.date_end,!0):"הקלק על מנת לערוך",$("span#updated_at").html($.datepicker.formatDate("d/mm/yy",new Date(e.updated))),e.updated_by||(e.updated_by="זיגי"),$("span#updated_by").html(e.updated_by),$("#staff-dialog").dialog({minWidth:450,resizable:!1,height:450,buttons:[{text:"סגור",click:function(){$(this).dialog("close")}}],title:e.name})},Et.staffRank=function(e){function t(t){$.post("/rank",{id:e.id,rank:t},Et.staffRank,"json")}var i;for(e.sums=[],e.sums[0]=e.avg=0,i=1;5>=i;i++)e.sums[i]=e.rank[i]+e.sums[i-1],e.avg+=e.rank[i]*i;e.avg=e.sums[5]?(e.avg/e.sums[5]).toPrecision(2):0,$("#rank-wrap").html($("#rank-template").tmpl(e)),$(".rateit").rateit(),$(".rateit").unbind("rated").bind("rated",function(){t($(this).rateit("value"))}),$(".rateit").unbind("reset").bind("reset",function(){t(0)})},Et.showMore=function(e){return $(e).parent().hide().next().show(),!1},Et.sendRank=function(e){$("#user-rank-comment").addClass("loading"),$.post("/rank",{id:e,comment:$("#user-rank-comment").val()},Et.staffRank,"json")},Et.saveGroups=function(){$("#save-button button").addClass("saving"),$.post("/groups",xt,function(){$("#save-button button").removeClass("saving").attr("disabled","disabled")},"json")},Et.groupSelectAll=function(e,t){var i,s,o=null;for(i=0;!o&&i<bt.length;i++)bt[i].number===e&&(o=bt[i]);if(o){for(s in o.groups)m(o.groups[s],t);n()}},Et.deleteEvent=function(e){Et.Confirm("האם אתה בטוח שברצונך למחוק את האירוע?</br>",function(){$.restDelete("/event/"+e,function(){var t;for($("#event-dialog").dialog("close"),$("#results-dialog").dialog("close"),t=0;t<wt.length;t++)wt[t].id==e&&wt.splice(t,1);lt(function(i){if(i.reception_hours)for(t=0;t<i.reception_hours.length;t++)i.reception_hours[t].id==e&&i.reception_hours.splice(t,1)}),$("#calendar").weekCalendar("removeEvent","E"+e),$("#event"+e).remove(),Et.refreshPersonalEvents(),Et.refreshMiniCal(),l(),$("#calendar").weekCalendar("refresh")},"json")})},Et.Message=function(e,t){$("#results-dialog div").html(t).removeClass("loading"),$("#results-dialog").dialog({minWidth:350,resizable:!1,height:200,modal:!0,title:e,buttons:[{text:"סגור",click:function(){$(this).dialog("close")}}]})},Et.Error=function(e){Et.Message("מצטערים, אבל אירעה שגיאה",e)},Et.Confirm=function(e,t){$("#results-dialog div").html(e),$("#results-dialog").dialog({minWidth:350,resizable:!1,height:200,modal:!0,title:"אישור",buttons:[{text:"אישור",click:t},{text:"ביטול",click:function(){$(this).dialog("close")}}]})},Et.confirmView=function(e){$("#results-dialog div").html(e),$("#results-dialog").dialog({minWidth:350,resizable:!1,height:200,modal:!0,title:"אישור",buttons:[{text:"אישור",click:function(){$(this).dialog("close")}}]})},Et.dialogTwoOptions=function(e,t,i,n){$("#results-dialog div").html(t),$("#results-dialog").dialog({minWidth:500,height:300,resizable:!1,modal:!0,title:e,buttons:[{text:n,click:i},{text:"ביטול",click:function(){$(this).dialog("close")}}]})},Et.dialogOneOption=function(e,t,i,n,s){$("#results-dialog div").html(t),$("#results-dialog").dialog({minWidth:500,height:s?s:300,resizable:!1,modal:!0,title:e,buttons:[{id:"dialog-btn-save",text:i?i:"סגור",click:n?n:function(){$(this).dialog("close")}}]})},Et.addCourses=function(e){var t;for("string"==typeof e&&(e=$.parseJSON(e)),t=0;t<bt.length&&bt[t].number!=e.number;t++);for(var i=0;i<e.length;i++)C(bt,e[i])||(bt[t]=e[i],t++);k()},Et.addCourse=function(e,t){var i;for("string"==typeof e&&(e=$.parseJSON(e)),t&&(1==e.groups.length&&m(e.number,e.groups[0]),n()),i=0;i<bt.length&&bt[i].number!=e.number;i++);bt[i]=e,k()},loadCourseByNumber=function(e,t){Et.addCourse({number:e,name:t},0),$.getJSON("/course/"+e,function(e){return e.name?(Et.addCourse(e,0),void 0):void 0})},Et.removeCourse=function(e){Et.Confirm("האם אתה בטוח שברצונך להסיר את הקורס "+e+" מהרשימה?",function(){$.getJSON("/remove/"+e,function(){T(e),$("#results-dialog").dialog("close")})})},Et.addCourseFromSearch=function(){$("#results-dialog").dialog("close");var e=$(this).data("key"),t=$(this).data("name");Et.addCourse({number:e,name:t},0),$.getJSON("/course/"+e,function(t){return t.id?($.getJSON("/add/course/"+t.id,function(){Et.addCourse(t,1)}),void 0):(T(e),Et.Error("לא נמצא קורס מספר "+e+" יתכן שהקורס לא פעיל בסמסטר שנבחר"),void 0)})},Et.addEventFromSearch=function(){$("#results-dialog").dialog("close"),$(this).data("key"),$(this).data("name"),$.getJSON("/add/event/"+$(this).data("id"),function(e){A(e.id)||(wt.push(e),k())})},Et.zoom=function(e){var t=$("#calendar").weekCalendar("timeslotHeight");0>e&&16>t||e>0&&t>30||F(t+2*e)},Et.staticDialog=function(e,t,i){$("#static-dialog div").load(t,function(){$("#static-dialog").dialog({minWidth:800,resizable:!1,height:450,maxHeight:450,title:e,buttons:[{text:"סגור",click:function(){$(this).dialog("close")}}]}),i&&i()})},Et.changePassword=function(){Et.staticDialog("שינוי סיסמא","/change_password",function(){function e(){this.password=ko.observable(""),this.isValid=ko.computed(function(){return this.password().length>2},this)}var t;t=new e,$("#change-pass").unbind("click").click(function(){$.getJSON("/pass",{password:$.sha1(t.password())},function(){$("#pass-answer").html("הסיסמא עודכנה בהצלחה")})}),ko.applyBindings(t,document.getElementById("ko-pass"))})},Et.exportImage=function(){b=$("#calendar"),html2canvas(b,{onrendered:function(e){Et.staticDialog("שמור כתמונה","/export_image",function(){$("#canvas-container").html(e)})}})},Et.putImage=function(){html2canvas($("#calendar"),{onrendered:function(e){e.toBlob(function(e){saveAs(e,"yourSchedule.jpg")})}})},Et.markRoom=function(e){$("#calendar").data("roomname",e)},Et.modeMap=function(){"undefined"==typeof google?($("div#calendar").html(""),$("body").addClass("map").removeClass("monthly").removeClass("summary").removeClass("advanced"),$.getScript("http://maps.googleapis.com/maps/api/js?key=&sensor=false&language=he&callback=ziggi.map",function(){})):gt()},Et.showRecommendedFill=function(e){var t=$("<div/>"),i="<h2>טוען נתונים, אנא המתן...</h2><div id='res-loading' class='loading'></div>";t.attr("id","res-result").html(i),Et.dialogOneOption("עדכון נתונים",t,e?"שמור והמשך":"שמור",function(){var t=$("select#degree :selected").val(),i=$("select#department :selected").val(),n=$("select#year_in_degree :selected").val();$("#rec-degree").css("color","black"),$("#rec-department").css("color","black"),t?i?$.post("/save_degree_data",{degree:t,department:i,year_in_degree:n},function(t){var i=JSON.parse(t);1==i.success?e?Et.showRecommended():Et.dialogOneOption("עדכון נתונים","הנתונים נשמרו בהצלחה"):Et.dialogOneOption("שגיאה","אירעה שגיאה בעת שמירת הנתונים<br/>נשמח אם תדווחו על השגיאה ל<a href='mailto:ziggi@ziggi.co'>ziggi@ziggi.co</a><br/>")}):$("#rec-department").css("color","red"):$("#rec-degree").css("color","red")},320),$("#dialog-btn-save").attr("disabled",!0),$.getJSON("/recommended",function(e){if("failed"==e.status)return Et.dialogOneOption("שגיאה","אירעה שגיאה לא ידועה<br/>נשמח אם תדווחו על השגיאה ל<a href='mailto:ziggi@ziggi.co'>ziggi@ziggi.co</a><br/>"),void 0;for(var t=e.degrees,i=e.departments,n=e.degree,s=e.department,o=e.year_in_degree,a=$("<p/>").append($("<span/>").attr("id","rec-degree").html("*רמת תואר: ")),r=$("<select/>").attr("id","degree"),l=0;l<t.length;l++){var u=$("<option/>").attr("value",t[l].value).html(t[l].text);t[l].value==n&&u.attr("selected",!0),r.append(u)}a.append($("<br/>")).append(r);for(var c=$("<p/>").append($("<span/>").attr("id","rec-department").html("*מחלקה: ")),d=$("<select/>").attr("id","department"),l=0;l<i.length;l++){var u=$("<option/>").attr("value",i[l].value).html(i[l].value+" - "+i[l].text);i[l].value==s&&u.attr("selected",!0),d.append(u)}c.append($("<br/>")).append(d);for(var h=$("<p/>").append($("<span/>").attr("id","rec-currYear").html("שנה נוכחית בתואר: ")),p=$("<select/>").attr("id","year_in_degree"),f=["א","ב","ג","ד","ה","ו","ז","ט"],l=0;l<f.length;l++){var u=$("<option/>").attr("value",l+1).html(f[l]);o==l+1&&u.attr("selected",!0),p.append(u)}h.append($("<br/>")).append(p),$("#results-dialog div").html("").append(a).append(c).append(h),$("#dialog-btn-save").attr("disabled",!1)})},Et.resetSchedBuild=function(){worker.terminate(),worker=null,Q("init"),St=[],Nt=[],myCourses.data=[],myCourses.saved=!1,J(),s()};var St=[],Nt=[];Et.saveBuildSched=function(){$("#info").addClass("loading"),bt=myCourses.data;for(var e={groups:[],events:[]},t=0;t<bt.length;t++)for(var i=bt[t],n=0;n<i.groups.length;n++){var s=i.groups[n];e.groups.push({id:s.id,s:s.selected}),s.selected?$('li[data-group="G'+s.id+'"]').addClass("selected"):$('li[data-group="G'+s.id+'"]').removeClass("selected")}$.post("/groups",e,function(){$("#info").removeClass("loading")},"json")},Et.saveSchedBuild4Cmpr=function(){null!=myCourses.data&&myCourses.data.length>0&&(myCourses.saved=!myCourses.saved,J())},Et.getPrevBuildSched=function(){St.length>0&&(myCourses.saved&&Nt.push(myCourses),myCourses=St.pop(),s())},Et.nextBuildSched=function(){myCourses.saved&&St.push(myCourses),Nt.length>0?(myCourses=Nt.pop(),s()):worker.postMessage({cmd:"buildNext"})},Et.buildSched=function(){""==$("#advancedHafifot")[0].value||$("#advancedHafifot")[0].value>"5"||$("#advancedHafifot")[0].value<"0"?Et.confirmView("הכנס מס' חפיפות הרצוי(בין 0 ל5)</br>"):0==$("#advanced-day1")[0].checked&&0==$("#advanced-day2")[0].checked&&0==$("#advanced-day3")[0].checked&&0==$("#advanced-day4")[0].checked&&0==$("#advanced-day5")[0].checked&&0==$("#advanced-day6")[0].checked?Et.confirmView("סמן את הימים שברצונך ללמוד בהם(לפחות אחד)</br>"):(Q("nav"),worker.postMessage({cmd:"build",json:JSON.stringify(Et.data().courses),intersects:$("#advancedHafifot")[0].value,days:K()}))};var Mt=!1,zt=[];Et.changeDivBackground=function(e){document.getElementById(e+"-div").className=$("#"+e)[0].checked?"advanced-days-checked":"advanced-days-unchecked"},Et.map=function(){gt()},Et.share=function(e){e?$.getJSON("/share",function(){Et.staticDialog("שתף מערכת-לינק/פייסבוק/גוגל+","/share_info")}):$.restDelete("/share",function(){Et.staticDialog("שתף מערכת-לינק/פייסבוק/גוגל+","/share_info")})},Et.selectSemester=function(e){$.post("/semester",{id:e},function(){location.reload()},"json")},Et.beer=function(){Et.staticDialog("הזמן את זיגי לבירה","/buy_beer")},Et.load=function(){$("li.ui-menu-item").css("list-style","none"),$("button#search-course").click(t),$("input#search-value").keypress(function(e){13==e.which&&t()}),$("button#recommended-btn").click(Et.showRecommended),$("#saveSchedFuture").click(Et.saveSchedBuild4Cmpr),$("#saveSchedAlways").click(Et.saveBuildSched),isNaN(new Date(semester.start))?($.jGrowl("זיגי משתמש בטכנולוגיות אינטרנט מתקדמות שאינן נתמכות במלואן על ידי הדפדפן שלך. מומלץ להשתמש בדפדפני פיירפוקס או כרום לתמיכה מלאה של האתר.",{sticky:!0}),semester.start=$.weekCalendar.parseISO8601(semester.start,!0),semester.end=$.weekCalendar.parseISO8601(semester.end,!0),semester.exams_start&&(semester.exams_start=$.weekCalendar.parseISO8601(semester.exams_start,!0)),semester.exams_end&&(semester.exams_end=$.weekCalendar.parseISO8601(semester.exams_end,!0))):(semester.start=new Date(semester.start),semester.end=new Date(semester.end),semester.exams_start&&(semester.exams_start=new Date(semester.exams_start)),semester.exams_end&&(semester.exams_end=new Date(semester.exams_end))),B(),wt=g_events,q(),k();var e=function(){return new e.fn.init};e.f=function(){$(document).tooltip({open:function(){e.tmr=setTimeout(function(){$(document).tooltip("destroy"),e.f()},1500)},close:function(){clearTimeout(e.tmr)},content:function(){return $(this).attr("title")}})},e.f(),$(window).bind("hashchange",function(){switch($("#edit-mode a").removeClass("selected"),$.bbq.getState("m")){case"super":return $("#super-btn").addClass("selected"),U(1);case"summary":return $("#summary-btn").addClass("selected"),X();case"calendar":return $("#exams-btn").addClass("selected"),rt();case"map":return $("#map-btn").addClass("selected"),Et.modeMap();case"recommended":return $("#recommended-btn").addClass("selected"),modeRecommended();case"advanced":return $("#advanced-btn").addClass("selected"),V();default:return $("#edit-btn").addClass("selected"),U(0)}}),$(window).trigger("hashchange")},window.ziggi=Et,Et.showRecommended=function(){var e=function(){$("#dialog-btn-add").attr("disabled",!0);var e=[];$("input[name='recommended-course']").each(function(t,i){if(i.disabled=!0,i.checked){var n={number:i.value,name:$(i).data("name")};e.push(n)}}),$.post("/add/courses/get",JSON.stringify(e),function(e){Et.addCourses(e),$("#results-dialog").dialog("close")})},t="<h2>קורסים</h2><div id='res-courses' class='loading'></div>";$("#results-dialog div").html(t),$("#results-dialog").dialog({minWidth:720,resizable:!1,height:400,maxHeight:400,title:"קורסים למחלקה",buttons:[{id:"dialog-btn-add",text:"הוסף",click:e},{text:"סגור",click:function(){$(this).dialog("close")}}],open:function(){$("#dialog-btn-add").hide()}}),$.post("/recommended",function(e){var t=$("#results-dialog div"),i=JSON.parse(e);if(i.error){var n=$("<a/>").text("נא ללחוץ כאן על מנת להשלים את הנתונים החסרים").attr("href","#").click(function(){Et.showRecommendedFill(!0)});return $("#res-courses",t).html("לא ניתן למצוא קורסים מומלצים עקב נתונים חסרים").append($("<br/>")).append(n),$("#dialog-btn-add").hide(),$("#res-courses",t).removeClass("loading"),void 0}$("#dialog-btn-add").show();for(var s=i.courses,o=$("<ul/>"),a=0;s&&a<s.length;a++){var r=s[a].number,l=s[a].name,u=$("<li/>").html($("<input/>").attr("type","checkbox").attr("id","recommended-course-option-"+a).attr("name","recommended-course").attr("value",r).data("name",l)).append($("<label/>").attr("for","recommended-course-option-"+a).html(r+" - "+l));o.append(u)}$("#res-courses",t).removeClass("loading"),$("#res-courses",t).html(o)})}}(),jQuery(function(e){e.datepicker.regional.he={closeText:"סגור",prevText:"&#x3C;הקודם",nextText:"הבא&#x3E;",currentText:"היום",monthNames:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],monthNamesShort:["ינו","פבר","מרץ","אפר","מאי","יוני","יולי","אוג","ספט","אוק","נוב","דצמ"],dayNames:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],dayNamesShort:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],dayNamesMin:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.he),e.extend(jQuery.tmpl.tag,{"for":{_default:{$2:"var i=1;i<=1;i++"},open:"for ($2){",close:"};"}})}),$(document).ready(function(){function e(){if($(".layout").layout({resize:!1}),$("div.east").length){var e=parseInt($("div.east").css("height")),t=parseInt($("#E").css("height"));$("div#calendar").css("height",e-24),$("#courses").css("height",e),$("#menu-tab > div").css("height",e-4-parseInt($("#menu-tab.tabs > ul").css("height"))),$("#E").css("height",t>e?t:e)}else $("div#calendar").css("height","100%")}isReadOnly=$("body").hasClass("share"),isReadOnly|=!semester.active,$("body").addClass(university.code),e(),$(window).resize(e),$("#edit-mode").buttonset(),$(".profile-btn").button().click(function(){var e=$(this).next().show().position({my:"right top",at:"right bottom",of:this});return $(".main-profile-btn").mouseleave(function(){e.hide()}),$(document).one("click",function(){e.hide()}),!1}).next().hide().menu(),$("#week-menu").hide().menu(),$("#event-menu").hide().menu(),$("a").click(function(){var e=$(this).data("link");if(void 0!==e)return ziggi.staticDialog($(this).html(),e),!1}),ziggi.load(),$.getJSON("/messages",function(e){var t;for(t=0;t<e.length;t++){var i=e[t];$.jGrowl(i.content,{header:i.title,sticky:!0,position:i.position})}}),$(document).ajaxSend(function(e,t){var i=$("meta[name='csrf-token']").attr("content");t.setRequestHeader("X-CSRF-Token",i)})}),ziggi.refreshPersonalEvents=function(){for(var e="",t=0;t<ziggi.data().events.length;t++){var i=ziggi.data().events[t];i.public&&i.course_id>0||!i.university_id||(e+=i.selected?"<li class='event selected' data-group='E"+i.id+"'>":"<li class='event' data-group='E"+i.id+"'>",e+="<div class='menu2'><br />",e+="<a href='javascript:ziggi.deleteEvent(\""+i.id+"\")' class='ui-accordion-header-icon ui-icon ui-icon-trashMe' title='הסר אירוע'></a>",e+="</div>",e+="<div><span class='title'>"+i.title+"</span></div>",e+=i.room?"<div class='ctime' title='"+i.room+"'>"+ziggi.timeRange(i.date_start,i.date_end,i.weekly)+"</div>":"<div class='ctime'>"+ziggi.timeRange(i.date_start,i.date_end,i.weekly)+"</div>",e+="</li>")}document.getElementById("allEventsL").innerHTML=e},ziggi.refreshMiniCal=function(){var e="";e+="<table width='100%' cellpadding='0' cellspacing='0'>",e+="<thead>",e+="<th>א</th>",e+="<th>ב</th>",e+="<th>ג</th>",e+="<th>ד</th>",e+="<th>ה</th>",e+="<th>ו</th>",e+="<th>ש</th>",e+="</thead>",e+="<tr>";var t,i=ziggi.data().dates;e+="<td colspan='7' class='month'>"+longMonths[i[0].month]+"</td>",e+="</tr>",e+="<tr>";for(var n=0;n<ziggi.data().dates.length;n++){var s=ziggi.data().dates[n];if(1==s.day)for(e+="</tr>",e+="<tr>",e+="<td colspan='7' class='month'>"+longMonths[s.month]+"</td>",e+="</tr>",e+="<tr>",t=0;n%7>t;t++)e+="<td></td>";e+="<td id='mc_"+s.day+"_"+s.month+"_"+s.year+"'",e+=s.today?" class='day today' title='היום'":" class='day'",e+=">"+s.day+"</td>",6==n%7&&(e+="</tr><tr>")}e+="</tr>",e+="</table>",document.getElementById("mini-cal").innerHTML=e};