text: /**
   * almond 0.2.5 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved.
   * Available via the MIT or new BSD license.
   * see: http://github.com/jrburke/almond for details
   */
  
  // > http://underscorejs.org
  // > (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
  // > Underscore may be freely distributed under the MIT license.
  
  /*!
   * jQuery JavaScript Library v1.7.1
   * http://jquery.com/
   *
   * Copyright 2011, John Resig
   * Dual licensed under the MIT or GPL Version 2 licenses.
   * http://jquery.org/license
   *
   * Includes Sizzle.js
   * http://sizzlejs.com/
   * Copyright 2011, The Dojo Foundation
   * Released under the MIT, BSD, and GPL Licenses.
   *
   * Date: Mon Nov 21 21:11:03 2011 -0500
   */
  
  /*!
   * Sizzle CSS Selector Engine
   *  Copyright 2011, The Dojo Foundation
   *  Released under the MIT, BSD, and GPL Licenses.
   *  More information: http://sizzlejs.com/
   */
  
  //     (c) 2010-2013 Jeremy Ashkenas, DocumentCloud Inc.
  //     Backbone may be freely distributed under the MIT license.
  //     For all details and documentation:
  //     http://backbonejs.org
  
  // moment.js
  // version : 2.0.0
  // author : Tim Wood
  // license : MIT
  // momentjs.com
  
  /**
   * @license RequireJS text 2.0.7 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
   * Available via the MIT or new BSD license.
   * see: http://github.com/requirejs/text for details
   */
  
  /**
  * @version: 1.1
  * @author: Dan Grossman http://www.dangrossman.info/
  * @date: 2013-03-04
  * @copyright: Copyright (c) 2012 Dan Grossman. All rights reserved.
  * @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0
  * @website: http://www.improvely.com/
  */
  
  /* =============================================================
   * bootstrap-collapse.js v2.1.1
   * http://twitter.github.com/bootstrap/javascript.html#collapse
   * =============================================================
   * Copyright 2012 Twitter, Inc.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   * ============================================================ */
  
  /* ===================================================
   * bootstrap-transition.js v2.1.1
   * http://twitter.github.com/bootstrap/javascript.html#transitions
   * ===================================================
   * Copyright 2012 Twitter, Inc.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   * ========================================================== */
  
  var requirejs,require,define;!function(e){function t(e,t){return y.call(e,t)}function n(e,t){var n,i,r,a,s,o,l,u,c,h,d=t&&t.split("/"),f=m.map,p=f&&f["*"]||{};if(e&&"."===e.charAt(0))if(t){for(d=d.slice(0,d.length-1),e=d.concat(e.split("/")),u=0;u<e.length;u+=1)if("."===(h=e[u]))e.splice(u,1),u-=1;else if(".."===h){if(1===u&&(".."===e[2]||".."===e[0]))break;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((d||p)&&f){for(n=e.split("/"),u=n.length;u>0;u-=1){if(i=n.slice(0,u).join("/"),d)for(c=d.length;c>0;c-=1)if((r=f[d.slice(0,c).join("/")])&&(r=r[i])){a=r,s=u;break}if(a)break;!o&&p&&p[i]&&(o=p[i],l=u)}!a&&o&&(a=o,s=l),a&&(n.splice(0,s,a),e=n.join("/"))}return e}function i(t,n){return function(){return c.apply(e,v.call(arguments,0).concat([t,n]))}}function r(e){return function(t){return n(t,e)}}function a(e){return function(t){f[e]=t}}function s(n){if(t(p,n)){var i=p[n];delete p[n],g[n]=!0,u.apply(e,i)}if(!t(f,n)&&!t(g,n))throw new Error("No "+n);return f[n]}function o(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function l(e){return function(){return m&&m.config&&m.config[e]||{}}}var u,c,h,d,f={},p={},m={},g={},y=Object.prototype.hasOwnProperty,v=[].slice;h=function(e,t){var i,a=o(e),l=a[0];return e=a[1],l&&(l=n(l,t),i=s(l)),l?e=i&&i.normalize?i.normalize(e,r(t)):n(e,t):(e=n(e,t),a=o(e),l=a[0],e=a[1],l&&(i=s(l))),{f:l?l+"!"+e:e,n:e,pr:l,p:i}},d={require:function(e){return i(e)},exports:function(e){var t=f[e];return void 0!==t?t:f[e]={}},module:function(e){return{id:e,uri:"",exports:f[e],config:l(e)}}},u=function(n,r,o,l){var u,c,m,y,v,b,w=[];if(l=l||n,"function"==typeof o){for(r=!r.length&&o.length?["require","exports","module"]:r,v=0;v<r.length;v+=1)if(y=h(r[v],l),"require"===(c=y.f))w[v]=d.require(n);else if("exports"===c)w[v]=d.exports(n),b=!0;else if("module"===c)u=w[v]=d.module(n);else if(t(f,c)||t(p,c)||t(g,c))w[v]=s(c);else{if(!y.p)throw new Error(n+" missing "+c);y.p.load(y.n,i(l,!0),a(c),{}),w[v]=f[c]}m=o.apply(f[n],w),n&&(u&&u.exports!==e&&u.exports!==f[n]?f[n]=u.exports:m===e&&b||(f[n]=m))}else n&&(f[n]=o)},requirejs=require=c=function(t,n,i,r,a){return"string"==typeof t?d[t]?d[t](n):s(h(t,n).f):(t.splice||(m=t,n.splice?(t=n,n=i,i=null):t=e),n=n||function(){},"function"==typeof i&&(i=r,r=a),r?u(e,t,n,i):setTimeout(function(){u(e,t,n,i)},4),c)},c.config=function(e){return m=e,m.deps&&c(m.deps,m.callback),c},define=function(e,n,i){n.splice||(i=n,n=[]),t(f,e)||t(p,e)||(p[e]=[e,n,i])},define.amd={jQuery:!0}}(),define("vendor/almond",function(){}),function(){var e=this,t=e._,n={},i=Array.prototype,r=Object.prototype,a=Function.prototype,s=i.push,o=i.slice,l=i.concat,u=r.toString,c=r.hasOwnProperty,h=i.forEach,d=i.map,f=i.reduce,p=i.reduceRight,m=i.filter,g=i.every,y=i.some,v=i.indexOf,b=i.lastIndexOf,w=Array.isArray,x=Object.keys,_=a.bind,k=function(e){return e instanceof k?e:this instanceof k?void(this._wrapped=e):new k(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=k),exports._=k):e._=k,k.VERSION="1.4.4";var D=k.each=k.forEach=function(e,t,i){if(null!=e)if(h&&e.forEach===h)e.forEach(t,i);else if(e.length===+e.length){for(var r=0,a=e.length;r<a;r++)if(t.call(i,e[r],r,e)===n)return}else for(var s in e)if(k.has(e,s)&&t.call(i,e[s],s,e)===n)return};k.map=k.collect=function(e,t,n){var i=[];return null==e?i:d&&e.map===d?e.map(t,n):(D(e,function(e,r,a){i[i.length]=t.call(n,e,r,a)}),i)};var C="Reduce of empty array with no initial value";k.reduce=k.foldl=k.inject=function(e,t,n,i){var r=arguments.length>2;if(null==e&&(e=[]),f&&e.reduce===f)return i&&(t=k.bind(t,i)),r?e.reduce(t,n):e.reduce(t);if(D(e,function(e,a,s){r?n=t.call(i,n,e,a,s):(n=e,r=!0)}),!r)throw new TypeError(C);return n},k.reduceRight=k.foldr=function(e,t,n,i){var r=arguments.length>2;if(null==e&&(e=[]),p&&e.reduceRight===p)return i&&(t=k.bind(t,i)),r?e.reduceRight(t,n):e.reduceRight(t);var a=e.length;if(a!==+a){var s=k.keys(e);a=s.length}if(D(e,function(o,l,u){l=s?s[--a]:--a,r?n=t.call(i,n,e[l],l,u):(n=e[l],r=!0)}),!r)throw new TypeError(C);return n},k.find=k.detect=function(e,t,n){var i;return T(e,function(e,r,a){if(t.call(n,e,r,a))return i=e,!0}),i},k.filter=k.select=function(e,t,n){var i=[];return null==e?i:m&&e.filter===m?e.filter(t,n):(D(e,function(e,r,a){t.call(n,e,r,a)&&(i[i.length]=e)}),i)},k.reject=function(e,t,n){return k.filter(e,function(e,i,r){return!t.call(n,e,i,r)},n)},k.every=k.all=function(e,t,i){t||(t=k.identity);var r=!0;return null==e?r:g&&e.every===g?e.every(t,i):(D(e,function(e,a,s){if(!(r=r&&t.call(i,e,a,s)))return n}),!!r)};var T=k.some=k.any=function(e,t,i){t||(t=k.identity);var r=!1;return null==e?r:y&&e.some===y?e.some(t,i):(D(e,function(e,a,s){if(r||(r=t.call(i,e,a,s)))return n}),!!r)};k.contains=k.include=function(e,t){return null!=e&&(v&&e.indexOf===v?-1!=e.indexOf(t):T(e,function(e){return e===t}))},k.invoke=function(e,t){var n=o.call(arguments,2),i=k.isFunction(t);return k.map(e,function(e){return(i?t:e[t]).apply(e,n)})},k.pluck=function(e,t){return k.map(e,function(e){return e[t]})},k.where=function(e,t,n){return k.isEmpty(t)?n?null:[]:k[n?"find":"filter"](e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},k.findWhere=function(e,t){return k.where(e,t,!0)},k.max=function(e,t,n){if(!t&&k.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&k.isEmpty(e))return-1/0;var i={computed:-1/0,value:-1/0};return D(e,function(e,r,a){var s=t?t.call(n,e,r,a):e;s>=i.computed&&(i={value:e,computed:s})}),i.value},k.min=function(e,t,n){if(!t&&k.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&k.isEmpty(e))return 1/0;var i={computed:1/0,value:1/0};return D(e,function(e,r,a){var s=t?t.call(n,e,r,a):e;s<i.computed&&(i={value:e,computed:s})}),i.value},k.shuffle=function(e){var t,n=0,i=[];return D(e,function(e){t=k.random(n++),i[n-1]=i[t],i[t]=e}),i};var S=function(e){return k.isFunction(e)?e:function(t){return t[e]}};k.sortBy=function(e,t,n){var i=S(t);return k.pluck(k.map(e,function(e,t,r){return{value:e,index:t,criteria:i.call(n,e,t,r)}}).sort(function(e,t){var n=e.criteria,i=t.criteria;if(n!==i){if(n>i||void 0===n)return 1;if(n<i||void 0===i)return-1}return e.index<t.index?-1:1}),"value")};var N=function(e,t,n,i){var r={},a=S(t||k.identity);return D(e,function(t,s){var o=a.call(n,t,s,e);i(r,o,t)}),r};k.groupBy=function(e,t,n){return N(e,t,n,function(e,t,n){(k.has(e,t)?e[t]:e[t]=[]).push(n)})},k.countBy=function(e,t,n){return N(e,t,n,function(e,t){k.has(e,t)||(e[t]=0),e[t]++})},k.sortedIndex=function(e,t,n,i){n=null==n?k.identity:S(n);for(var r=n.call(i,t),a=0,s=e.length;a<s;){var o=a+s>>>1;n.call(i,e[o])<r?a=o+1:s=o}return a},k.toArray=function(e){return e?k.isArray(e)?o.call(e):e.length===+e.length?k.map(e,k.identity):k.values(e):[]},k.size=function(e){return null==e?0:e.length===+e.length?e.length:k.keys(e).length},k.first=k.head=k.take=function(e,t,n){if(null!=e)return null==t||n?e[0]:o.call(e,0,t)},k.initial=function(e,t,n){return o.call(e,0,e.length-(null==t||n?1:t))},k.last=function(e,t,n){if(null!=e)return null==t||n?e[e.length-1]:o.call(e,Math.max(e.length-t,0))},k.rest=k.tail=k.drop=function(e,t,n){return o.call(e,null==t||n?1:t)},k.compact=function(e){return k.filter(e,k.identity)};var E=function(e,t,n){return D(e,function(e){k.isArray(e)?t?s.apply(n,e):E(e,t,n):n.push(e)}),n};k.flatten=function(e,t){return E(e,t,[])},k.without=function(e){return k.difference(e,o.call(arguments,1))},k.uniq=k.unique=function(e,t,n,i){k.isFunction(t)&&(i=n,n=t,t=!1);var r=n?k.map(e,n,i):e,a=[],s=[];return D(r,function(n,i){(t?i&&s[s.length-1]===n:k.contains(s,n))||(s.push(n),a.push(e[i]))}),a},k.union=function(){return k.uniq(l.apply(i,arguments))},k.intersection=function(e){var t=o.call(arguments,1);return k.filter(k.uniq(e),function(e){return k.every(t,function(t){return k.indexOf(t,e)>=0})})},k.difference=function(e){var t=l.apply(i,o.call(arguments,1));return k.filter(e,function(e){return!k.contains(t,e)})},k.zip=function(){for(var e=o.call(arguments),t=k.max(k.pluck(e,"length")),n=new Array(t),i=0;i<t;i++)n[i]=k.pluck(e,""+i);return n},k.object=function(e,t){if(null==e)return{};for(var n={},i=0,r=e.length;i<r;i++)t?n[e[i]]=t[i]:n[e[i][0]]=e[i][1];return n},k.indexOf=function(e,t,n){if(null==e)return-1;var i=0,r=e.length;if(n){if("number"!=typeof n)return i=k.sortedIndex(e,t),e[i]===t?i:-1;i=n<0?Math.max(0,r+n):n}if(v&&e.indexOf===v)return e.indexOf(t,n);for(;i<r;i++)if(e[i]===t)return i;return-1},k.lastIndexOf=function(e,t,n){if(null==e)return-1;var i=null!=n;if(b&&e.lastIndexOf===b)return i?e.lastIndexOf(t,n):e.lastIndexOf(t);for(var r=i?n:e.length;r--;)if(e[r]===t)return r;return-1},k.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;for(var i=Math.max(Math.ceil((t-e)/n),0),r=0,a=new Array(i);r<i;)a[r++]=e,e+=n;return a},k.bind=function(e,t){if(e.bind===_&&_)return _.apply(e,o.call(arguments,1));var n=o.call(arguments,2);return function(){return e.apply(t,n.concat(o.call(arguments)))}},k.partial=function(e){var t=o.call(arguments,1);return function(){return e.apply(this,t.concat(o.call(arguments)))}},k.bindAll=function(e){var t=o.call(arguments,1);return 0===t.length&&(t=k.functions(e)),D(t,function(t){e[t]=k.bind(e[t],e)}),e},k.memoize=function(e,t){var n={};return t||(t=k.identity),function(){var i=t.apply(this,arguments);return k.has(n,i)?n[i]:n[i]=e.apply(this,arguments)}},k.delay=function(e,t){var n=o.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},k.defer=function(e){return k.delay.apply(k,[e,1].concat(o.call(arguments,1)))},k.throttle=function(e,t){var n,i,r,a,s=0,o=function(){s=new Date,r=null,a=e.apply(n,i)};return function(){var l=new Date,u=t-(l-s);return n=this,i=arguments,u<=0?(clearTimeout(r),r=null,s=l,a=e.apply(n,i)):r||(r=setTimeout(o,u)),a}},k.debounce=function(e,t,n){var i,r;return function(){var a=this,s=arguments,o=function(){i=null,n||(r=e.apply(a,s))},l=n&&!i;return clearTimeout(i),i=setTimeout(o,t),l&&(r=e.apply(a,s)),r}},k.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},k.wrap=function(e,t){return function(){var n=[e];return s.apply(n,arguments),t.apply(this,n)}},k.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},k.after=function(e,t){return e<=0?t():function(){if(--e<1)return t.apply(this,arguments)}},k.keys=x||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)k.has(e,n)&&(t[t.length]=n);return t},k.values=function(e){var t=[];for(var n in e)k.has(e,n)&&t.push(e[n]);return t},k.pairs=function(e){var t=[];for(var n in e)k.has(e,n)&&t.push([n,e[n]]);return t},k.invert=function(e){var t={};for(var n in e)k.has(e,n)&&(t[e[n]]=n);return t},k.functions=k.methods=function(e){var t=[];for(var n in e)k.isFunction(e[n])&&t.push(n);return t.sort()},k.extend=function(e){return D(o.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},k.pick=function(e){var t={},n=l.apply(i,o.call(arguments,1));return D(n,function(n){n in e&&(t[n]=e[n])}),t},k.omit=function(e){var t={},n=l.apply(i,o.call(arguments,1));for(var r in e)k.contains(n,r)||(t[r]=e[r]);return t},k.defaults=function(e){return D(o.call(arguments,1),function(t){if(t)for(var n in t)null==e[n]&&(e[n]=t[n])}),e},k.clone=function(e){return k.isObject(e)?k.isArray(e)?e.slice():k.extend({},e):e},k.tap=function(e,t){return t(e),e};var M=function(e,t,n,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof k&&(e=e._wrapped),t instanceof k&&(t=t._wrapped);var r=u.call(e);if(r!=u.call(t))return!1;switch(r){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;for(var a=n.length;a--;)if(n[a]==e)return i[a]==t;n.push(e),i.push(t);var s=0,o=!0;if("[object Array]"==r){if(s=e.length,o=s==t.length)for(;s--&&(o=M(e[s],t[s],n,i)););}else{var l=e.constructor,c=t.constructor;if(l!==c&&!(k.isFunction(l)&&l instanceof l&&k.isFunction(c)&&c instanceof c))return!1;for(var h in e)if(k.has(e,h)&&(s++,!(o=k.has(t,h)&&M(e[h],t[h],n,i))))break;if(o){for(h in t)if(k.has(t,h)&&!s--)break;o=!s}}return n.pop(),i.pop(),o};k.isEqual=function(e,t){return M(e,t,[],[])},k.isEmpty=function(e){if(null==e)return!0;if(k.isArray(e)||k.isString(e))return 0===e.length;for(var t in e)if(k.has(e,t))return!1;return!0},k.isElement=function(e){return!(!e||1!==e.nodeType)},k.isArray=w||function(e){return"[object Array]"==u.call(e)},k.isObject=function(e){return e===Object(e)},D(["Arguments","Function","String","Number","Date","RegExp"],function(e){k["is"+e]=function(t){return u.call(t)=="[object "+e+"]"}}),k.isArguments(arguments)||(k.isArguments=function(e){return!(!e||!k.has(e,"callee"))}),"function"!=typeof/./&&(k.isFunction=function(e){return"function"==typeof e}),k.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},k.isNaN=function(e){return k.isNumber(e)&&e!=+e},k.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"==u.call(e)},k.isNull=function(e){return null===e},k.isUndefined=function(e){return void 0===e},k.has=function(e,t){return c.call(e,t)},k.noConflict=function(){return e._=t,this},k.identity=function(e){return e},k.times=function(e,t,n){for(var i=Array(e),r=0;r<e;r++)i[r]=t.call(n,r);return i},k.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var j={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};j.unescape=k.invert(j.escape);var O={escape:new RegExp("["+k.keys(j.escape).join("")+"]","g"),unescape:new RegExp("("+k.keys(j.unescape).join("|")+")","g")};k.each(["escape","unescape"],function(e){k[e]=function(t){return null==t?"":(""+t).replace(O[e],function(t){return j[e][t]})}}),k.result=function(e,t){if(null==e)return null;var n=e[t];return k.isFunction(n)?n.call(e):n},k.mixin=function(e){D(k.functions(e),function(t){var n=k[t]=e[t];k.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),B.call(this,n.apply(k,e))}})};var A=0;k.uniqueId=function(e){var t=++A+"";return e?e+t:t},k.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var L=/(.)^/,F={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},R=/\\|'|\r|\n|\t|\u2028|\u2029/g;k.template=function(e,t,n){var i;n=k.defaults({},n,k.templateSettings);var r=new RegExp([(n.escape||L).source,(n.interpolate||L).source,(n.evaluate||L).source].join("|")+"|$","g"),a=0,s="__p+='";e.replace(r,function(t,n,i,r,o){return s+=e.slice(a,o).replace(R,function(e){return"\\"+F[e]}),n&&(s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),i&&(s+="'+\n((__t=("+i+"))==null?'':__t)+\n'"),r&&(s+="';\n"+r+"\n__p+='"),a=o+t.length,t}),s+="';\n",n.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{i=new Function(n.variable||"obj","_",s)}catch(e){throw e.source=s,e}if(t)return i(t,k);var o=function(e){return i.call(this,e,k)};return o.source="function("+(n.variable||"obj")+"){\n"+s+"}",o},k.chain=function(e){return k(e).chain()};var B=function(e){return this._chain?k(e).chain():e};k.mixin(k),D(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=i[e];k.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!=e&&"splice"!=e||0!==n.length||delete n[0],B.call(this,n)}}),D(["concat","join","slice"],function(e){var t=i[e];k.prototype[e]=function(){return B.call(this,t.apply(this._wrapped,arguments))}}),k.extend(k.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),define("underscore",function(e){return function(){return e._}}(this)),function(e,t){function n(e){var t,n,i=B[e]={};for(e=e.split(/\s+/),t=0,n=e.length;t<n;t++)i[e[t]]=!0;return i}function i(e,n,i){if(i===t&&1===e.nodeType){var r="data-"+n.replace(Y,"-$1").toLowerCase();if("string"==typeof(i=e.getAttribute(r))){try{i="true"===i||"false"!==i&&("null"===i?null:R.isNumeric(i)?parseFloat(i):H.test(i)?R.parseJSON(i):i)}catch(e){}R.data(e,n,i)}else i=t}return i}function r(e){for(var t in e)if(("data"!==t||!R.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function a(e,t,n){var i=t+"defer",r=t+"queue",a=t+"mark",s=R._data(e,i);!s||"queue"!==n&&R._data(e,r)||"mark"!==n&&R._data(e,a)||setTimeout(function(){R._data(e,r)||R._data(e,a)||(R.removeData(e,i,!0),s.fire())},0)}function s(){return!1}function o(){return!0}function l(e){return!e||!e.parentNode||11===e.parentNode.nodeType}function u(e,t,n){if(t=t||0,R.isFunction(t))return R.grep(e,function(e,i){return!!t.call(e,i,e)===n});if(t.nodeType)return R.grep(e,function(e,i){return e===t===n});if("string"==typeof t){var i=R.grep(e,function(e){return 1===e.nodeType});if(he.test(t))return R.filter(t,i,!n);t=R.filter(t,i)}return R.grep(e,function(e,i){return R.inArray(e,t)>=0===n})}function c(e){var t=me.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){return R.nodeName(e,"table")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function d(e,t){if(1===t.nodeType&&R.hasData(e)){var n,i,r,a=R._data(e),s=R._data(t,a),o=a.events;if(o){delete s.handle,s.events={};for(n in o)for(i=0,r=o[n].length;i<r;i++)R.event.add(t,n+(o[n][i].namespace?".":"")+o[n][i].namespace,o[n][i],o[n][i].data)}s.data&&(s.data=R.extend({},s.data))}}function f(e,t){var n;1===t.nodeType&&(t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),"object"===n?t.outerHTML=e.outerHTML:"input"!==n||"checkbox"!==e.type&&"radio"!==e.type?"option"===n?t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue):(e.checked&&(t.defaultChecked=t.checked=e.checked),t.value!==e.value&&(t.value=e.value)),t.removeAttribute(R.expando))}function p(e){return void 0!==e.getElementsByTagName?e.getElementsByTagName("*"):void 0!==e.querySelectorAll?e.querySelectorAll("*"):[]}function m(e){"checkbox"!==e.type&&"radio"!==e.type||(e.defaultChecked=e.checked)}function g(e){var t=(e.nodeName||"").toLowerCase();"input"===t?m(e):"script"!==t&&void 0!==e.getElementsByTagName&&R.grep(e.getElementsByTagName("input"),m)}function y(e){var t=A.createElement("div");return Ee.appendChild(t),t.innerHTML=e.outerHTML,t.firstChild}function v(e,t){t.src?R.ajax({url:t.src,async:!1,dataType:"script"}):R.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Se,"/*$0*/")),t.parentNode&&t.parentNode.removeChild(t)}function b(e,t,n){var i="width"===t?e.offsetWidth:e.offsetHeight,r="width"===t?Ye:$e,a=0,s=r.length;if(i>0){if("border"!==n)for(;a<s;a++)n||(i-=parseFloat(R.css(e,"padding"+r[a]))||0),"margin"===n?i+=parseFloat(R.css(e,n+r[a]))||0:i-=parseFloat(R.css(e,"border"+r[a]+"Width"))||0;return i+"px"}if(i=Me(e,t,t),(i<0||null==i)&&(i=e.style[t]||0),i=parseFloat(i)||0,n)for(;a<s;a++)i+=parseFloat(R.css(e,"padding"+r[a]))||0,"padding"!==n&&(i+=parseFloat(R.css(e,"border"+r[a]+"Width"))||0),"margin"===n&&(i+=parseFloat(R.css(e,n+r[a]))||0);return i+"px"}function w(e){return function(t,n){if("string"!=typeof t&&(n=t,t="*"),R.isFunction(n))for(var i,r,a,s=t.toLowerCase().split(nt),o=0,l=s.length;o<l;o++)i=s[o],a=/^\+/.test(i),a&&(i=i.substr(1)||"*"),r=e[i]=e[i]||[],r[a?"unshift":"push"](n)}}function x(e,n,i,r,a,s){a=a||n.dataTypes[0],s=s||{},s[a]=!0;for(var o,l=e[a],u=0,c=l?l.length:0,h=e===st;u<c&&(h||!o);u++)"string"==typeof(o=l[u](n,i,r))&&(!h||s[o]?o=t:(n.dataTypes.unshift(o),o=x(e,n,i,r,o,s)));return!h&&o||s["*"]||(o=x(e,n,i,r,"*",s)),o}function _(e,n){var i,r,a=R.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((a[i]?e:r||(r={}))[i]=n[i]);r&&R.extend(!0,e,r)}function k(e,t,n,i){if(R.isArray(t))R.each(t,function(t,r){n||ze.test(e)?i(e,r):k(e+"["+("object"==typeof r||R.isArray(r)?t:"")+"]",r,n,i)});else if(n||null==t||"object"!=typeof t)i(e,t);else for(var r in t)k(e+"["+r+"]",t[r],n,i)}function D(e,n,i){var r,a,s,o,l=e.contents,u=e.dataTypes,c=e.responseFields;for(a in c)a in i&&(n[c[a]]=i[a]);for(;"*"===u[0];)u.shift(),r===t&&(r=e.mimeType||n.getResponseHeader("content-type"));if(r)for(a in l)if(l[a]&&l[a].test(r)){u.unshift(a);break}if(u[0]in i)s=u[0];else{for(a in i){if(!u[0]||e.converters[a+" "+u[0]]){s=a;break}o||(o=a)}s=s||o}if(s)return s!==u[0]&&u.unshift(s),i[s]}function C(e,n){e.dataFilter&&(n=e.dataFilter(n,e.dataType));var i,r,a,s,o,l,u,c,h=e.dataTypes,d={},f=h.length,p=h[0];for(i=1;i<f;i++){if(1===i)for(r in e.converters)"string"==typeof r&&(d[r.toLowerCase()]=e.converters[r]);if(s=p,"*"===(p=h[i]))p=s;else if("*"!==s&&s!==p){if(o=s+" "+p,!(l=d[o]||d["* "+p])){c=t;for(u in d)if(a=u.split(" "),(a[0]===s||"*"===a[0])&&(c=d[a[1]+" "+p])){u=d[u],!0===u?l=c:!0===c&&(l=u);break}}l||c||R.error("No conversion from "+o.replace(" "," to ")),!0!==l&&(n=l?l(n):c(u(n)))}}return n}function T(){try{return new e.XMLHttpRequest}catch(e){}}function S(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function N(){return setTimeout(E,0),yt=R.now()}function E(){yt=t}function M(e,t){var n={};return R.each(xt.concat.apply([],xt.slice(0,t)),function(){n[this]=e}),n}function j(e){if(!vt[e]){var t=A.body,n=R("<"+e+">").appendTo(t),i=n.css("display");n.remove(),"none"!==i&&""!==i||(pt||(pt=A.createElement("iframe"),pt.frameBorder=pt.width=pt.height=0),t.appendChild(pt),mt&&pt.createElement||(mt=(pt.contentWindow||pt.contentDocument).document,mt.write(("CSS1Compat"===A.compatMode?"<!doctype html>":"")+"<html><body>"),mt.close()),n=mt.createElement(e),mt.body.appendChild(n),i=R.css(n,"display"),t.removeChild(pt)),vt[e]=i}return vt[e]}function O(e){return R.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var A=e.document,L=e.navigator,F=e.location,R=function(){function n(){if(!o.isReady){try{A.documentElement.doScroll("left")}catch(e){return void setTimeout(n,1)}o.ready()}}var i,r,a,s,o=function(e,t){return new o.fn.init(e,t,i)},l=e.jQuery,u=e.$,c=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,h=/\S/,d=/^\s+/,f=/\s+$/,p=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,m=/^[\],:{}\s]*$/,g=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,y=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,b=/(webkit)[ \/]([\w.]+)/,w=/(opera)(?:.*version)?[ \/]([\w.]+)/,x=/(msie) ([\w.]+)/,_=/(mozilla)(?:.*? rv:([\w.]+))?/,k=/-([a-z]|[0-9])/gi,D=/^-ms-/,C=function(e,t){return(t+"").toUpperCase()},T=L.userAgent,S=Object.prototype.toString,N=Object.prototype.hasOwnProperty,E=Array.prototype.push,M=Array.prototype.slice,j=String.prototype.trim,O=Array.prototype.indexOf,F={};return o.fn=o.prototype={constructor:o,init:function(e,n,i){var r,a,s,l;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("body"===e&&!n&&A.body)return this.context=A,this[0]=A.body,this.selector=e,this.length=1,this;if("string"==typeof e){if(!(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:c.exec(e))||!r[1]&&n)return!n||n.jquery?(n||i).find(e):this.constructor(n).find(e);if(r[1])return n=n instanceof o?n[0]:n,l=n?n.ownerDocument||n:A,s=p.exec(e),s?o.isPlainObject(n)?(e=[A.createElement(s[1])],o.fn.attr.call(e,n,!0)):e=[l.createElement(s[1])]:(s=o.buildFragment([r[1]],[l]),e=(s.cacheable?o.clone(s.fragment):s.fragment).childNodes),o.merge(this,e);if((a=A.getElementById(r[2]))&&a.parentNode){if(a.id!==r[2])return i.find(e);this.length=1,this[0]=a}return this.context=A,this.selector=e,this}return o.isFunction(e)?i.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),o.makeArray(e,this))},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return M.call(this,0)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var i=this.constructor();return o.isArray(e)?E.apply(i,e):o.merge(i,e),i.prevObject=this,i.context=this.context,"find"===t?i.selector=this.selector+(this.selector?" ":"")+n:t&&(i.selector=this.selector+"."+t+"("+n+")"),i},each:function(e,t){return o.each(this,e,t)},ready:function(e){return o.bindReady(),a.add(e),this},eq:function(e){return e=+e,-1===e?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(M.apply(this,arguments),"slice",M.call(arguments).join(","))},map:function(e){return this.pushStack(o.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},o.fn.init.prototype=o.fn,o.extend=o.fn.extend=function(){var e,n,i,r,a,s,l=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof l&&(h=l,l=arguments[1]||{},u=2),"object"==typeof l||o.isFunction(l)||(l={}),c===u&&(l=this,--u);u<c;u++)if(null!=(e=arguments[u]))for(n in e)i=l[n],r=e[n],l!==r&&(h&&r&&(o.isPlainObject(r)||(a=o.isArray(r)))?(a?(a=!1,s=i&&o.isArray(i)?i:[]):s=i&&o.isPlainObject(i)?i:{},l[n]=o.extend(h,s,r)):r!==t&&(l[n]=r));return l},o.extend({noConflict:function(t){return e.$===o&&(e.$=u),t&&e.jQuery===o&&(e.jQuery=l),o},isReady:!1,readyWait:1,holdReady:function(e){e?o.readyWait++:o.ready(!0)},ready:function(e){if(!0===e&&!--o.readyWait||!0!==e&&!o.isReady){if(!A.body)return setTimeout(o.ready,1);if(o.isReady=!0,!0!==e&&--o.readyWait>0)return;a.fireWith(A,[o]),o.fn.trigger&&o(A).trigger("ready").off("ready")}},bindReady:function(){if(!a){if(a=o.Callbacks("once memory"),"complete"===A.readyState)return setTimeout(o.ready,1);if(A.addEventListener)A.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",o.ready,!1);else if(A.attachEvent){A.attachEvent("onreadystatechange",s),e.attachEvent("onload",o.ready);var t=!1;try{t=null==e.frameElement}catch(e){}A.documentElement.doScroll&&t&&n()}}},isFunction:function(e){return"function"===o.type(e)},isArray:Array.isArray||function(e){return"array"===o.type(e)},isWindow:function(e){return e&&"object"==typeof e&&"setInterval"in e},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):F[S.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==o.type(e)||e.nodeType||o.isWindow(e))return!1;try{if(e.constructor&&!N.call(e,"constructor")&&!N.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}var n;for(n in e);return n===t||N.call(e,n)},isEmptyObject:function(e){for(var t in e)return!1;return!0},error:function(e){throw new Error(e)},parseJSON:function(t){return"string"==typeof t&&t?(t=o.trim(t),e.JSON&&e.JSON.parse?e.JSON.parse(t):m.test(t.replace(g,"@").replace(y,"]").replace(v,""))?new Function("return "+t)():void o.error("Invalid JSON: "+t)):null},parseXML:function(n){var i,r;try{e.DOMParser?(r=new DOMParser,i=r.parseFromString(n,"text/xml")):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(n))}catch(e){i=t}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||o.error("Invalid XML: "+n),i},noop:function(){},globalEval:function(t){t&&h.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(k,C)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,i){var r,a=0,s=e.length,l=s===t||o.isFunction(e);if(i)if(l){for(r in e)if(!1===n.apply(e[r],i))break}else for(;a<s&&!1!==n.apply(e[a++],i););else if(l){for(r in e)if(!1===n.call(e[r],r,e[r]))break}else for(;a<s&&!1!==n.call(e[a],a,e[a++]););return e},trim:j?function(e){return null==e?"":j.call(e)}:function(e){return null==e?"":e.toString().replace(d,"").replace(f,"")},makeArray:function(e,t){var n=t||[];if(null!=e){var i=o.type(e);null==e.length||"string"===i||"function"===i||"regexp"===i||o.isWindow(e)?E.call(n,e):o.merge(n,e)}return n},inArray:function(e,t,n){var i;if(t){if(O)return O.call(t,e,n);for(i=t.length,n=n?n<0?Math.max(0,i+n):n:0;n<i;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var i=e.length,r=0;if("number"==typeof n.length)for(var a=n.length;r<a;r++)e[i++]=n[r];else for(;n[r]!==t;)e[i++]=n[r++];return e.length=i,e},grep:function(e,t,n){var i,r=[];n=!!n;for(var a=0,s=e.length;a<s;a++)i=!!t(e[a],a),n!==i&&r.push(e[a]);return r},map:function(e,n,i){var r,a,s=[],l=0,u=e.length;if(e instanceof o||u!==t&&"number"==typeof u&&(u>0&&e[0]&&e[u-1]||0===u||o.isArray(e)))for(;l<u;l++)null!=(r=n(e[l],l,i))&&(s[s.length]=r);else for(a in e)null!=(r=n(e[a],a,i))&&(s[s.length]=r);return s.concat.apply([],s)},guid:1,proxy:function(e,n){if("string"==typeof n){var i=e[n];n=e,e=i}if(!o.isFunction(e))return t;var r=M.call(arguments,2),a=function(){return e.apply(n,r.concat(M.call(arguments)))};return a.guid=e.guid=e.guid||a.guid||o.guid++,a},access:function(e,n,i,r,a,s){var l=e.length;if("object"==typeof n){for(var u in n)o.access(e,u,n[u],r,a,i);return e}if(i!==t){r=!s&&r&&o.isFunction(i);for(var c=0;c<l;c++)a(e[c],n,r?i.call(e[c],c,a(e[c],n)):i,s);return e}return l?a(e[0],n):t},now:function(){return(new Date).getTime()},uaMatch:function(e){e=e.toLowerCase();var t=b.exec(e)||w.exec(e)||x.exec(e)||e.indexOf("compatible")<0&&_.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},sub:function(){function e(t,n){return new e.fn.init(t,n)}o.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(n,i){return i&&i instanceof o&&!(i instanceof e)&&(i=e(i)),o.fn.init.call(this,n,i,t)},e.fn.init.prototype=e.fn;var t=e(A);return e},browser:{}}),o.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){F["[object "+t+"]"]=t.toLowerCase()}),r=o.uaMatch(T),r.browser&&(o.browser[r.browser]=!0,o.browser.version=r.version),o.browser.webkit&&(o.browser.safari=!0),h.test(" ")&&(d=/^[\s\xA0]+/,f=/[\s\xA0]+$/),i=o(A),A.addEventListener?s=function(){A.removeEventListener("DOMContentLoaded",s,!1),o.ready()}:A.attachEvent&&(s=function(){"complete"===A.readyState&&(A.detachEvent("onreadystatechange",s),o.ready())}),o}(),B={};R.Callbacks=function(e){e=e?B[e]||n(e):{};var i,r,a,s,o,l=[],u=[],c=function(t){var n,i,r,a;for(n=0,i=t.length;n<i;n++)r=t[n],a=R.type(r),"array"===a?c(r):"function"===a&&(e.unique&&d.has(r)||l.push(r))},h=function(t,n){for(n=n||[],i=!e.memory||[t,n],r=!0,o=a||0,a=0,s=l.length;l&&o<s;o++)if(!1===l[o].apply(t,n)&&e.stopOnFalse){i=!0;break}r=!1,l&&(e.once?!0===i?d.disable():l=[]:u&&u.length&&(i=u.shift(),d.fireWith(i[0],i[1])))},d={add:function(){if(l){var e=l.length;c(arguments),r?s=l.length:i&&!0!==i&&(a=e,h(i[0],i[1]))}return this},remove:function(){if(l)for(var t=arguments,n=0,i=t.length;n<i;n++)for(var a=0;a<l.length&&(t[n]!==l[a]||(r&&a<=s&&(s--,a<=o&&o--),l.splice(a--,1),!e.unique));a++);return this},has:function(e){if(l)for(var t=0,n=l.length;t<n;t++)if(e===l[t])return!0;return!1},empty:function(){return l=[],this},disable:function(){return l=u=i=t,this},disabled:function(){return!l},lock:function(){return u=t,i&&!0!==i||d.disable(),this},locked:function(){return!u},fireWith:function(t,n){return u&&(r?e.once||u.push([t,n]):e.once&&i||h(t,n)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d};var P=[].slice;R.extend({Deferred:function(e){var t,n=R.Callbacks("once memory"),i=R.Callbacks("once memory"),r=R.Callbacks("memory"),a="pending",s={resolve:n,reject:i,notify:r},o={done:n.add,fail:i.add,progress:r.add,state:function(){return a},isResolved:n.fired,isRejected:i.fired,then:function(e,t,n){return l.done(e).fail(t).progress(n),this},always:function(){return l.done.apply(l,arguments).fail.apply(l,arguments),this},
  pipe:function(e,t,n){return R.Deferred(function(i){R.each({done:[e,"resolve"],fail:[t,"reject"],progress:[n,"notify"]},function(e,t){var n,r=t[0],a=t[1];R.isFunction(r)?l[e](function(){n=r.apply(this,arguments),n&&R.isFunction(n.promise)?n.promise().then(i.resolve,i.reject,i.notify):i[a+"With"](this===l?i:this,[n])}):l[e](i[a])})}).promise()},promise:function(e){if(null==e)e=o;else for(var t in o)e[t]=o[t];return e}},l=o.promise({});for(t in s)l[t]=s[t].fire,l[t+"With"]=s[t].fireWith;return l.done(function(){a="resolved"},i.disable,r.lock).fail(function(){a="rejected"},n.disable,r.lock),e&&e.call(l,l),l},when:function(e){var t=P.call(arguments,0),n=0,i=t.length,r=new Array(i),a=i,s=i<=1&&e&&R.isFunction(e.promise)?e:R.Deferred(),o=s.promise();if(i>1){for(;n<i;n++)t[n]&&t[n].promise&&R.isFunction(t[n].promise)?t[n].promise().then(function(e){return function(n){t[e]=arguments.length>1?P.call(arguments,0):n,--a||s.resolveWith(s,t)}}(n),s.reject,function(e){return function(t){r[e]=arguments.length>1?P.call(arguments,0):t,s.notifyWith(o,r)}}(n)):--a;a||s.resolveWith(s,t)}else s!==e&&s.resolveWith(s,i?[e]:[]);return o}}),R.support=function(){var t,n,i,r,a,s,o,l,u,c,h,d,f=A.createElement("div");A.documentElement;if(f.setAttribute("className","t"),f.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",n=f.getElementsByTagName("*"),i=f.getElementsByTagName("a")[0],!n||!n.length||!i)return{};r=A.createElement("select"),a=r.appendChild(A.createElement("option")),s=f.getElementsByTagName("input")[0],t={leadingWhitespace:3===f.firstChild.nodeType,tbody:!f.getElementsByTagName("tbody").length,htmlSerialize:!!f.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:"/a"===i.getAttribute("href"),opacity:/^0.55/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:"on"===s.value,optSelected:a.selected,getSetAttribute:"t"!==f.className,enctype:!!A.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==A.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},s.checked=!0,t.noCloneChecked=s.cloneNode(!0).checked,r.disabled=!0,t.optDisabled=!a.disabled;try{delete f.test}catch(e){t.deleteExpando=!1}if(!f.addEventListener&&f.attachEvent&&f.fireEvent&&(f.attachEvent("onclick",function(){t.noCloneEvent=!1}),f.cloneNode(!0).fireEvent("onclick")),s=A.createElement("input"),s.value="t",s.setAttribute("type","radio"),t.radioValue="t"===s.value,s.setAttribute("checked","checked"),f.appendChild(s),l=A.createDocumentFragment(),l.appendChild(f.lastChild),t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=s.checked,l.removeChild(s),l.appendChild(f),f.innerHTML="",e.getComputedStyle&&(o=A.createElement("div"),o.style.width="0",o.style.marginRight="0",f.style.width="2px",f.appendChild(o),t.reliableMarginRight=0===(parseInt((e.getComputedStyle(o,null)||{marginRight:0}).marginRight,10)||0)),f.attachEvent)for(h in{submit:1,change:1,focusin:1})c="on"+h,d=c in f,d||(f.setAttribute(c,"return;"),d="function"==typeof f[c]),t[h+"Bubbles"]=d;return l.removeChild(f),l=r=a=o=f=s=null,R(function(){var e,n,i,r,a,s,o,l,c,h,p=A.getElementsByTagName("body")[0];p&&(s=1,o="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",c="style='"+o+"border:5px solid #000;padding:0;'",h="<div "+c+"><div></div></div><table "+c+" cellpadding='0' cellspacing='0'><tr><td></td></tr></table>",e=A.createElement("div"),e.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+s+"px",p.insertBefore(e,p.firstChild),f=A.createElement("div"),e.appendChild(f),f.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",u=f.getElementsByTagName("td"),d=0===u[0].offsetHeight,u[0].style.display="",u[1].style.display="none",t.reliableHiddenOffsets=d&&0===u[0].offsetHeight,f.innerHTML="",f.style.width=f.style.paddingLeft="1px",R.boxModel=t.boxModel=2===f.offsetWidth,void 0!==f.style.zoom&&(f.style.display="inline",f.style.zoom=1,t.inlineBlockNeedsLayout=2===f.offsetWidth,f.style.display="",f.innerHTML="<div style='width:4px;'></div>",t.shrinkWrapBlocks=2!==f.offsetWidth),f.style.cssText=o+l,f.innerHTML=h,n=f.firstChild,i=n.firstChild,r=n.nextSibling.firstChild.firstChild,a={doesNotAddBorder:5!==i.offsetTop,doesAddBorderForTableAndCells:5===r.offsetTop},i.style.position="fixed",i.style.top="20px",a.fixedPosition=20===i.offsetTop||15===i.offsetTop,i.style.position=i.style.top="",n.style.overflow="hidden",n.style.position="relative",a.subtractsBorderForOverflowNotVisible=-5===i.offsetTop,a.doesNotIncludeMarginInBodyOffset=p.offsetTop!==s,p.removeChild(e),f=e=null,R.extend(t,a))}),t}();var H=/^(?:\{.*\}|\[.*\])$/,Y=/([A-Z])/g;R.extend({cache:{},uuid:0,expando:"jQuery"+(R.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return!!(e=e.nodeType?R.cache[e[R.expando]]:e[R.expando])&&!r(e)},data:function(e,n,i,r){if(R.acceptData(e)){var a,s,o,l=R.expando,u="string"==typeof n,c=e.nodeType,h=c?R.cache:e,d=c?e[l]:e[l]&&l,f="events"===n;if(d&&h[d]&&(f||r||h[d].data)||!u||i!==t)return d||(c?e[l]=d=++R.uuid:d=l),h[d]||(h[d]={},c||(h[d].toJSON=R.noop)),"object"!=typeof n&&"function"!=typeof n||(r?h[d]=R.extend(h[d],n):h[d].data=R.extend(h[d].data,n)),a=s=h[d],r||(s.data||(s.data={}),s=s.data),i!==t&&(s[R.camelCase(n)]=i),f&&!s[n]?a.events:(u?null==(o=s[n])&&(o=s[R.camelCase(n)]):o=s,o)}},removeData:function(e,t,n){if(R.acceptData(e)){var i,a,s,o=R.expando,l=e.nodeType,u=l?R.cache:e,c=l?e[o]:o;if(u[c]){if(t&&(i=n?u[c]:u[c].data)){R.isArray(t)||(t in i?t=[t]:(t=R.camelCase(t),t=t in i?[t]:t.split(" ")));for(a=0,s=t.length;a<s;a++)delete i[t[a]];if(!(n?r:R.isEmptyObject)(i))return}(n||(delete u[c].data,r(u[c])))&&(R.support.deleteExpando||!u.setInterval?delete u[c]:u[c]=null,l&&(R.support.deleteExpando?delete e[o]:e.removeAttribute?e.removeAttribute(o):e[o]=null))}}},_data:function(e,t,n){return R.data(e,t,n,!0)},acceptData:function(e){if(e.nodeName){var t=R.noData[e.nodeName.toLowerCase()];if(t)return!(!0===t||e.getAttribute("classid")!==t)}return!0}}),R.fn.extend({data:function(e,n){var r,a,s,o=null;if(void 0===e){if(this.length&&(o=R.data(this[0]),1===this[0].nodeType&&!R._data(this[0],"parsedAttrs"))){a=this[0].attributes;for(var l=0,u=a.length;l<u;l++)s=a[l].name,0===s.indexOf("data-")&&(s=R.camelCase(s.substring(5)),i(this[0],s,o[s]));R._data(this[0],"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){R.data(this,e)}):(r=e.split("."),r[1]=r[1]?"."+r[1]:"",n===t?(o=this.triggerHandler("getData"+r[1]+"!",[r[0]]),o===t&&this.length&&(o=R.data(this[0],e),o=i(this[0],e,o)),o===t&&r[1]?this.data(r[0]):o):this.each(function(){var t=R(this),i=[r[0],n];t.triggerHandler("setData"+r[1]+"!",i),R.data(this,e,n),t.triggerHandler("changeData"+r[1]+"!",i)}))},removeData:function(e){return this.each(function(){R.removeData(this,e)})}}),R.extend({_mark:function(e,t){e&&(t=(t||"fx")+"mark",R._data(e,t,(R._data(e,t)||0)+1))},_unmark:function(e,t,n){if(!0!==e&&(n=t,t=e,e=!1),t){n=n||"fx";var i=n+"mark",r=e?0:(R._data(t,i)||1)-1;r?R._data(t,i,r):(R.removeData(t,i,!0),a(t,n,"mark"))}},queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=R._data(e,t),n&&(!i||R.isArray(n)?i=R._data(e,t,R.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=R.queue(e,t),i=n.shift(),r={};"inprogress"===i&&(i=n.shift()),i&&("fx"===t&&n.unshift("inprogress"),R._data(e,t+".run",r),i.call(e,function(){R.dequeue(e,t)},r)),n.length||(R.removeData(e,t+"queue "+t+".run",!0),a(e,t,"queue"))}}),R.fn.extend({queue:function(e,n){return"string"!=typeof e&&(n=e,e="fx"),n===t?R.queue(this[0],e):this.each(function(){var t=R.queue(this,e,n);"fx"===e&&"inprogress"!==t[0]&&R.dequeue(this,e)})},dequeue:function(e){return this.each(function(){R.dequeue(this,e)})},delay:function(e,t){return e=R.fx?R.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){function i(){--l||a.resolveWith(s,[s])}"string"!=typeof e&&(e,e=t),e=e||"fx";for(var r,a=R.Deferred(),s=this,o=s.length,l=1,u=e+"defer",c=e+"queue",h=e+"mark";o--;)(r=R.data(s[o],u,t,!0)||(R.data(s[o],c,t,!0)||R.data(s[o],h,t,!0))&&R.data(s[o],u,R.Callbacks("once memory"),!0))&&(l++,r.add(i));return i(),a.promise()}});var $,I,q,W=/[\n\t\r]/g,z=/\s+/,U=/\r/g,V=/^(?:button|input)$/i,X=/^(?:button|input|object|select|textarea)$/i,G=/^a(?:rea)?$/i,J=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Z=R.support.getSetAttribute;R.fn.extend({attr:function(e,t){return R.access(this,e,t,!0,R.attr)},removeAttr:function(e){return this.each(function(){R.removeAttr(this,e)})},prop:function(e,t){return R.access(this,e,t,!0,R.prop)},removeProp:function(e){return e=R.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(e){}})},addClass:function(e){var t,n,i,r,a,s,o;if(R.isFunction(e))return this.each(function(t){R(this).addClass(e.call(this,t,this.className))});if(e&&"string"==typeof e)for(t=e.split(z),n=0,i=this.length;n<i;n++)if(r=this[n],1===r.nodeType)if(r.className||1!==t.length){for(a=" "+r.className+" ",s=0,o=t.length;s<o;s++)~a.indexOf(" "+t[s]+" ")||(a+=t[s]+" ");r.className=R.trim(a)}else r.className=e;return this},removeClass:function(e){var n,i,r,a,s,o,l;if(R.isFunction(e))return this.each(function(t){R(this).removeClass(e.call(this,t,this.className))});if(e&&"string"==typeof e||e===t)for(n=(e||"").split(z),i=0,r=this.length;i<r;i++)if(a=this[i],1===a.nodeType&&a.className)if(e){for(s=(" "+a.className+" ").replace(W," "),o=0,l=n.length;o<l;o++)s=s.replace(" "+n[o]+" "," ");a.className=R.trim(s)}else a.className="";return this},toggleClass:function(e,t){var n=typeof e,i="boolean"==typeof t;return R.isFunction(e)?this.each(function(n){R(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var r,a=0,s=R(this),o=t,l=e.split(z);r=l[a++];)o=i?o:!s.hasClass(r),s[o?"addClass":"removeClass"](r);else"undefined"!==n&&"boolean"!==n||(this.className&&R._data(this,"__className__",this.className),this.className=this.className||!1===e?"":R._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;n<i;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>-1)return!0;return!1},val:function(e){var n,i,r,a=this[0];{if(arguments.length)return r=R.isFunction(e),this.each(function(i){var a,s=R(this);1===this.nodeType&&(a=r?e.call(this,i,s.val()):e,null==a?a="":"number"==typeof a?a+="":R.isArray(a)&&(a=R.map(a,function(e){return null==e?"":e+""})),(n=R.valHooks[this.nodeName.toLowerCase()]||R.valHooks[this.type])&&"set"in n&&n.set(this,a,"value")!==t||(this.value=a))});if(a)return(n=R.valHooks[a.nodeName.toLowerCase()]||R.valHooks[a.type])&&"get"in n&&(i=n.get(a,"value"))!==t?i:(i=a.value,"string"==typeof i?i.replace(U,""):null==i?"":i)}}}),R.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,i,r,a=e.selectedIndex,s=[],o=e.options,l="select-one"===e.type;if(a<0)return null;for(n=l?a:0,i=l?a+1:o.length;n<i;n++)if(r=o[n],r.selected&&(R.support.optDisabled?!r.disabled:null===r.getAttribute("disabled"))&&(!r.parentNode.disabled||!R.nodeName(r.parentNode,"optgroup"))){if(t=R(r).val(),l)return t;s.push(t)}return l&&!s.length&&o.length?R(o[a]).val():s},set:function(e,t){var n=R.makeArray(t);return R(e).find("option").each(function(){this.selected=R.inArray(R(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(e,n,i,r){var a,s,o,l=e.nodeType;if(e&&3!==l&&8!==l&&2!==l)return r&&n in R.attrFn?R(e)[n](i):void 0===e.getAttribute?R.prop(e,n,i):(o=1!==l||!R.isXMLDoc(e),o&&(n=n.toLowerCase(),s=R.attrHooks[n]||(J.test(n)?I:$)),i!==t?null===i?void R.removeAttr(e,n):s&&"set"in s&&o&&(a=s.set(e,i,n))!==t?a:(e.setAttribute(n,""+i),i):s&&"get"in s&&o&&null!==(a=s.get(e,n))?a:(a=e.getAttribute(n),null===a?t:a))},removeAttr:function(e,t){var n,i,r,a,s=0;if(t&&1===e.nodeType)for(i=t.toLowerCase().split(z),a=i.length;s<a;s++)(r=i[s])&&(n=R.propFix[r]||r,R.attr(e,r,""),e.removeAttribute(Z?r:n),J.test(r)&&n in e&&(e[n]=!1))},attrHooks:{type:{set:function(e,t){if(V.test(e.nodeName)&&e.parentNode)R.error("type property can't be changed");else if(!R.support.radioValue&&"radio"===t&&R.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return $&&R.nodeName(e,"button")?$.get(e,t):t in e?e.value:null},set:function(e,t,n){if($&&R.nodeName(e,"button"))return $.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,i){var r,a,s,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return s=1!==o||!R.isXMLDoc(e),s&&(n=R.propFix[n]||n,a=R.propHooks[n]),i!==t?a&&"set"in a&&(r=a.set(e,i,n))!==t?r:e[n]=i:a&&"get"in a&&null!==(r=a.get(e,n))?r:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):X.test(e.nodeName)||G.test(e.nodeName)&&e.href?0:t}}}}),R.attrHooks.tabindex=R.propHooks.tabIndex,I={get:function(e,n){var i,r=R.prop(e,n);return!0===r||"boolean"!=typeof r&&(i=e.getAttributeNode(n))&&!1!==i.nodeValue?n.toLowerCase():t},set:function(e,t,n){var i;return!1===t?R.removeAttr(e,n):(i=R.propFix[n]||n,i in e&&(e[i]=!0),e.setAttribute(n,n.toLowerCase())),n}},Z||(q={name:!0,id:!0},$=R.valHooks.button={get:function(e,n){var i;return i=e.getAttributeNode(n),i&&(q[n]?""!==i.nodeValue:i.specified)?i.nodeValue:t},set:function(e,t,n){var i=e.getAttributeNode(n);return i||(i=A.createAttribute(n),e.setAttributeNode(i)),i.nodeValue=t+""}},R.attrHooks.tabindex.set=$.set,R.each(["width","height"],function(e,t){R.attrHooks[t]=R.extend(R.attrHooks[t],{set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}})}),R.attrHooks.contenteditable={get:$.get,set:function(e,t,n){""===t&&(t="false"),$.set(e,t,n)}}),R.support.hrefNormalized||R.each(["href","src","width","height"],function(e,n){R.attrHooks[n]=R.extend(R.attrHooks[n],{get:function(e){var i=e.getAttribute(n,2);return null===i?t:i}})}),R.support.style||(R.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=""+t}}),R.support.optSelected||(R.propHooks.selected=R.extend(R.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),R.support.enctype||(R.propFix.enctype="encoding"),R.support.checkOn||R.each(["radio","checkbox"],function(){R.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),R.each(["radio","checkbox"],function(){R.valHooks[this]=R.extend(R.valHooks[this],{set:function(e,t){if(R.isArray(t))return e.checked=R.inArray(R(e).val(),t)>=0}})});var Q=/^(?:textarea|input|select)$/i,K=/^([^\.]*)?(?:\.(.+))?$/,ee=/\bhover(\.\S+)?\b/,te=/^key/,ne=/^(?:mouse|contextmenu)|click/,ie=/^(?:focusinfocus|focusoutblur)$/,re=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,ae=function(e){var t=re.exec(e);return t&&(t[1]=(t[1]||"").toLowerCase(),t[3]=t[3]&&new RegExp("(?:^|\\s)"+t[3]+"(?:\\s|$)")),t},se=function(e,t){var n=e.attributes||{};return(!t[1]||e.nodeName.toLowerCase()===t[1])&&(!t[2]||(n.id||{}).value===t[2])&&(!t[3]||t[3].test((n.class||{}).value))},oe=function(e){return R.event.special.hover?e:e.replace(ee,"mouseenter$1 mouseleave$1")};R.event={add:function(e,n,i,r,a){var s,o,l,u,c,h,d,f,p,m,g;if(3!==e.nodeType&&8!==e.nodeType&&n&&i&&(s=R._data(e))){for(i.handler&&(p=i,i=p.handler),i.guid||(i.guid=R.guid++),l=s.events,l||(s.events=l={}),o=s.handle,o||(s.handle=o=function(e){return void 0===R||e&&R.event.triggered===e.type?t:R.event.dispatch.apply(o.elem,arguments)},o.elem=e),n=R.trim(oe(n)).split(" "),u=0;u<n.length;u++)c=K.exec(n[u])||[],h=c[1],d=(c[2]||"").split(".").sort(),g=R.event.special[h]||{},h=(a?g.delegateType:g.bindType)||h,g=R.event.special[h]||{},f=R.extend({type:h,origType:c[1],data:r,handler:i,guid:i.guid,selector:a,quick:ae(a),namespace:d.join(".")},p),m=l[h],m||(m=l[h]=[],m.delegateCount=0,g.setup&&!1!==g.setup.call(e,r,d,o)||(e.addEventListener?e.addEventListener(h,o,!1):e.attachEvent&&e.attachEvent("on"+h,o))),g.add&&(g.add.call(e,f),f.handler.guid||(f.handler.guid=i.guid)),a?m.splice(m.delegateCount++,0,f):m.push(f),R.event.global[h]=!0;e=null}},global:{},remove:function(e,t,n,i,r){var a,s,o,l,u,c,h,d,f,p,m,g,y=R.hasData(e)&&R._data(e);if(y&&(d=y.events)){for(t=R.trim(oe(t||"")).split(" "),a=0;a<t.length;a++)if(s=K.exec(t[a])||[],o=l=s[1],u=s[2],o){for(f=R.event.special[o]||{},o=(i?f.delegateType:f.bindType)||o,m=d[o]||[],c=m.length,u=u?new RegExp("(^|\\.)"+u.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null,h=0;h<m.length;h++)g=m[h],!r&&l!==g.origType||n&&n.guid!==g.guid||u&&!u.test(g.namespace)||i&&i!==g.selector&&("**"!==i||!g.selector)||(m.splice(h--,1),g.selector&&m.delegateCount--,f.remove&&f.remove.call(e,g));0===m.length&&c!==m.length&&(f.teardown&&!1!==f.teardown.call(e,u)||R.removeEvent(e,o,y.handle),delete d[o])}else for(o in d)R.event.remove(e,o+t[a],n,i,!0);R.isEmptyObject(d)&&(p=y.handle,p&&(p.elem=null),R.removeData(e,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,i,r,a){if(!r||3!==r.nodeType&&8!==r.nodeType){var s,o,l,u,c,h,d,f,p,m,g=n.type||n,y=[];if(!ie.test(g+R.event.triggered)&&(g.indexOf("!")>=0&&(g=g.slice(0,-1),o=!0),g.indexOf(".")>=0&&(y=g.split("."),g=y.shift(),y.sort()),r&&!R.event.customEvent[g]||R.event.global[g]))if(n="object"==typeof n?n[R.expando]?n:new R.Event(g,n):new R.Event(g),n.type=g,n.isTrigger=!0,n.exclusive=o,n.namespace=y.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,h=g.indexOf(":")<0?"on"+g:"",r){if(n.result=t,n.target||(n.target=r),i=null!=i?R.makeArray(i):[],i.unshift(n),d=R.event.special[g]||{},!d.trigger||!1!==d.trigger.apply(r,i)){if(p=[[r,d.bindType||g]],!a&&!d.noBubble&&!R.isWindow(r)){for(m=d.delegateType||g,u=ie.test(m+g)?r:r.parentNode,c=null;u;u=u.parentNode)p.push([u,m]),c=u;c&&c===r.ownerDocument&&p.push([c.defaultView||c.parentWindow||e,m])}for(l=0;l<p.length&&!n.isPropagationStopped();l++)u=p[l][0],n.type=p[l][1],f=(R._data(u,"events")||{})[n.type]&&R._data(u,"handle"),f&&f.apply(u,i),(f=h&&u[h])&&R.acceptData(u)&&!1===f.apply(u,i)&&n.preventDefault();return n.type=g,a||n.isDefaultPrevented()||d._default&&!1!==d._default.apply(r.ownerDocument,i)||"click"===g&&R.nodeName(r,"a")||!R.acceptData(r)||h&&r[g]&&("focus"!==g&&"blur"!==g||0!==n.target.offsetWidth)&&!R.isWindow(r)&&(c=r[h],c&&(r[h]=null),R.event.triggered=g,r[g](),R.event.triggered=t,c&&(r[h]=c)),n.result}}else{s=R.cache;for(l in s)s[l].events&&s[l].events[g]&&R.event.trigger(n,i,s[l].handle.elem,!0)}}},dispatch:function(n){n=R.event.fix(n||e.event);var i,r,a,s,o,l,u,c,h,d,f=(R._data(this,"events")||{})[n.type]||[],p=f.delegateCount,m=[].slice.call(arguments,0),g=!n.exclusive&&!n.namespace,y=[];if(m[0]=n,n.delegateTarget=this,p&&!n.target.disabled&&(!n.button||"click"!==n.type))for(s=R(this),s.context=this.ownerDocument||this,a=n.target;a!=this;a=a.parentNode||this){for(l={},c=[],s[0]=a,i=0;i<p;i++)h=f[i],d=h.selector,l[d]===t&&(l[d]=h.quick?se(a,h.quick):s.is(d)),l[d]&&c.push(h);c.length&&y.push({elem:a,matches:c})}for(f.length>p&&y.push({elem:this,matches:f.slice(p)}),i=0;i<y.length&&!n.isPropagationStopped();i++)for(u=y[i],n.currentTarget=u.elem,r=0;r<u.matches.length&&!n.isImmediatePropagationStopped();r++)h=u.matches[r],(g||!n.namespace&&!h.namespace||n.namespace_re&&n.namespace_re.test(h.namespace))&&(n.data=h.data,n.handleObj=h,(o=((R.event.special[h.origType]||{}).handle||h.handler).apply(u.elem,m))!==t&&(n.result=o,!1===o&&(n.preventDefault(),n.stopPropagation())));return n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(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,n){var i,r,a,s=n.button,o=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||A,r=i.documentElement,a=i.body,e.pageX=n.clientX+(r&&r.scrollLeft||a&&a.scrollLeft||0)-(r&&r.clientLeft||a&&a.clientLeft||0),e.pageY=n.clientY+(r&&r.scrollTop||a&&a.scrollTop||0)-(r&&r.clientTop||a&&a.clientTop||0)),!e.relatedTarget&&o&&(e.relatedTarget=o===e.target?n.toElement:o),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[R.expando])return e;var n,i,r=e,a=R.event.fixHooks[e.type]||{},s=a.props?this.props.concat(a.props):this.props;for(e=R.Event(r),n=s.length;n;)i=s[--n],e[i]=r[i];return e.target||(e.target=r.srcElement||A),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey===t&&(e.metaKey=e.ctrlKey),a.filter?a.filter(e,r):e},special:{ready:{setup:R.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){R.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,i){var r=R.extend(new R.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?R.event.trigger(r,null,t):R.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},R.event.handle=R.event.dispatch,R.removeEvent=A.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent&&e.detachEvent("on"+t,n)},R.Event=function(e,t){if(!(this instanceof R.Event))return new R.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||!1===e.returnValue||e.getPreventDefault&&e.getPreventDefault()?o:s):this.type=e,t&&R.extend(this,t),this.timeStamp=e&&e.timeStamp||R.now(),this[R.expando]=!0},R.Event.prototype={preventDefault:function(){this.isDefaultPrevented=o;var e=this.originalEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=o;var e=this.originalEvent;e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=o,this.stopPropagation()},isDefaultPrevented:s,isPropagationStopped:s,isImmediatePropagationStopped:s},R.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){R.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,a=e.handleObj;a.selector;return r&&(r===i||R.contains(i,r))||(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),R.support.submitBubbles||(R.event.special.submit={setup:function(){if(R.nodeName(this,"form"))return!1;R.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,i=R.nodeName(n,"input")||R.nodeName(n,"button")?n.form:t;i&&!i._submit_attached&&(R.event.add(i,"submit._submit",function(e){this.parentNode&&!e.isTrigger&&R.event.simulate("submit",this.parentNode,e,!0)}),i._submit_attached=!0)})},teardown:function(){if(R.nodeName(this,"form"))return!1;R.event.remove(this,"._submit")}}),R.support.changeBubbles||(R.event.special.change={setup:function(){if(Q.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(R.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),R.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1,R.event.simulate("change",this,e,!0))})),!1;R.event.add(this,"beforeactivate._change",function(e){var t=e.target;Q.test(t.nodeName)&&!t._change_attached&&(R.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||R.event.simulate("change",this.parentNode,e,!0)}),t._change_attached=!0)})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return R.event.remove(this,"._change"),Q.test(this.nodeName)}}),R.support.focusinBubbles||R.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,i=function(e){R.event.simulate(t,e.target,R.event.fix(e),!0)};R.event.special[t]={setup:function(){0==n++&&A.addEventListener(e,i,!0)},teardown:function(){0==--n&&A.removeEventListener(e,i,!0)}}}),R.fn.extend({on:function(e,n,i,r,a){var o,l;if("object"==typeof e){"string"!=typeof n&&(i=n,n=t);for(l in e)this.on(l,n,i,e[l],a);return this}if(null==i&&null==r?(r=n,i=n=t):null==r&&("string"==typeof n?(r=i,i=t):(r=i,i=n,n=t)),!1===r)r=s;else if(!r)return this;return 1===a&&(o=r,r=function(e){return R().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=R.guid++)),this.each(function(){R.event.add(this,e,r,i,n)})},one:function(e,t,n,i){return this.on.call(this,e,t,n,i,1)},off:function(e,n,i){if(e&&e.preventDefault&&e.handleObj){var r=e.handleObj;return R(e.delegateTarget).off(r.namespace?r.type+"."+r.namespace:r.type,r.selector,r.handler),this}if("object"==typeof e){for(var a in e)this.off(a,n,e[a]);return this}return!1!==n&&"function"!=typeof n||(i=n,n=t),!1===i&&(i=s),this.each(function(){R.event.remove(this,e,i,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return R(this.context).on(e,this.selector,t,n),this},die:function(e,t){return R(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1==arguments.length?this.off(e,"**"):this.off(t,e,n)},trigger:function(e,t){return this.each(function(){R.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return R.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||R.guid++,i=0,r=function(n){var r=(R._data(this,"lastToggle"+e.guid)||0)%i;return R._data(this,"lastToggle"+e.guid,r+1),n.preventDefault(),t[r].apply(this,arguments)||!1};for(r.guid=n;i<t.length;)t[i++].guid=n;return this.click(r)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),R.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){R.fn[t]=function(e,n){return null==n&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},R.attrFn&&(R.attrFn[t]=!0),te.test(t)&&(R.event.fixHooks[t]=R.event.keyHooks),ne.test(t)&&(R.event.fixHooks[t]=R.event.mouseHooks)}),function(){function e(e,t,n,i,a,s){for(var o=0,l=i.length;o<l;o++){var u=i[o];if(u){var c=!1;for(u=u[e];u;){if(u[r]===n){c=i[u.sizset];break}if(1!==u.nodeType||s||(u[r]=n,u.sizset=o),u.nodeName.toLowerCase()===t){c=u;break}u=u[e]}i[o]=c}}}function n(e,t,n,i,a,s){for(var o=0,l=i.length;o<l;o++){var u=i[o];if(u){var c=!1;for(u=u[e];u;){if(u[r]===n){c=i[u.sizset];break}if(1===u.nodeType)if(s||(u[r]=n,u.sizset=o),"string"!=typeof t){if(u===t){c=!0;break}}else if(d.filter(t,[u]).length>0){c=u;break}u=u[e]}i[o]=c}}}var i=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,r="sizcache"+(Math.random()+"").replace(".",""),a=0,s=Object.prototype.toString,o=!1,l=!0,u=/\\/g,c=/\r\n/g,h=/\W/;[0,0].sort(function(){return l=!1,0});var d=function(e,t,n,r){n=n||[],t=t||A;var a=t;if(1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return n;var o,l,u,c,h,f,g,y,b=!0,w=d.isXML(t),_=[],k=e;do{if(i.exec(""),(o=i.exec(k))&&(k=o[3],_.push(o[1]),o[2])){c=o[3];break}}while(o);if(_.length>1&&m.exec(e))if(2===_.length&&p.relative[_[0]])l=x(_[0]+_[1],t,r);else for(l=p.relative[_[0]]?[t]:d(_.shift(),t);_.length;)e=_.shift(),p.relative[e]&&(e+=_.shift()),l=x(e,l,r);else if(!r&&_.length>1&&9===t.nodeType&&!w&&p.match.ID.test(_[0])&&!p.match.ID.test(_[_.length-1])&&(h=d.find(_.shift(),t,w),t=h.expr?d.filter(h.expr,h.set)[0]:h.set[0]),t)for(h=r?{expr:_.pop(),set:v(r)}:d.find(_.pop(),1!==_.length||"~"!==_[0]&&"+"!==_[0]||!t.parentNode?t:t.parentNode,w),l=h.expr?d.filter(h.expr,h.set):h.set,_.length>0?u=v(l):b=!1;_.length;)f=_.pop(),g=f,p.relative[f]?g=_.pop():f="",null==g&&(g=t),p.relative[f](u,g,w);else u=_=[];if(u||(u=l),u||d.error(f||e),"[object Array]"===s.call(u))if(b)if(t&&1===t.nodeType)for(y=0;null!=u[y];y++)u[y]&&(!0===u[y]||1===u[y].nodeType&&d.contains(t,u[y]))&&n.push(l[y]);else for(y=0;null!=u[y];y++)u[y]&&1===u[y].nodeType&&n.push(l[y]);else n.push.apply(n,u);else v(u,n);return c&&(d(c,a,n,r),d.uniqueSort(n)),n};d.uniqueSort=function(e){if(b&&(o=l,e.sort(b),o))for(var t=1;t<e.length;t++)e[t]===e[t-1]&&e.splice(t--,1);return e},d.matches=function(e,t){return d(e,null,null,t)},d.matchesSelector=function(e,t){return d(t,null,null,[e]).length>0},d.find=function(e,t,n){var i,r,a,s,o,l;if(!e)return[];for(r=0,a=p.order.length;r<a;r++)if(o=p.order[r],(s=p.leftMatch[o].exec(e))&&(l=s[1],s.splice(1,1),"\\"!==l.substr(l.length-1)&&(s[1]=(s[1]||"").replace(u,""),null!=(i=p.find[o](s,t,n))))){e=e.replace(p.match[o],"");break}return i||(i=void 0!==t.getElementsByTagName?t.getElementsByTagName("*"):[]),{set:i,expr:e}},d.filter=function(e,n,i,r){for(var a,s,o,l,u,c,h,f,m,g=e,y=[],v=n,b=n&&n[0]&&d.isXML(n[0]);e&&n.length;){for(o in p.filter)if(null!=(a=p.leftMatch[o].exec(e))&&a[2]){if(c=p.filter[o],h=a[1],s=!1,a.splice(1,1),"\\"===h.substr(h.length-1))continue;if(v===y&&(y=[]),p.preFilter[o])if(a=p.preFilter[o](a,v,i,y,r,b)){if(!0===a)continue}else s=l=!0;if(a)for(f=0;null!=(u=v[f]);f++)u&&(l=c(u,a,f,v),m=r^l,i&&null!=l?m?s=!0:v[f]=!1:m&&(y.push(u),s=!0));if(l!==t){if(i||(v=y),e=e.replace(p.match[o],""),!s)return[];break}}if(e===g){if(null!=s)break;d.error(e)}g=e}return v},d.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var f=d.getText=function(e){var t,n,i=e.nodeType,r="";if(i){if(1===i||9===i){if("string"==typeof e.textContent)return e.textContent;if("string"==typeof e.innerText)return e.innerText.replace(c,"");for(e=e.firstChild;e;e=e.nextSibling)r+=f(e)}else if(3===i||4===i)return e.nodeValue}else for(t=0;n=e[t];t++)8!==n.nodeType&&(r+=f(n));return r},p=d.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{class:"className",for:"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(e,t){var n="string"==typeof t,i=n&&!h.test(t),r=n&&!i;i&&(t=t.toLowerCase());for(var a,s=0,o=e.length;s<o;s++)if(a=e[s]){for(;(a=a.previousSibling)&&1!==a.nodeType;);e[s]=r||a&&a.nodeName.toLowerCase()===t?a||!1:a===t
  }r&&d.filter(t,e,!0)},">":function(e,t){var n,i="string"==typeof t,r=0,a=e.length;if(i&&!h.test(t)){for(t=t.toLowerCase();r<a;r++)if(n=e[r]){var s=n.parentNode;e[r]=s.nodeName.toLowerCase()===t&&s}}else{for(;r<a;r++)(n=e[r])&&(e[r]=i?n.parentNode:n.parentNode===t);i&&d.filter(t,e,!0)}},"":function(t,i,r){var s,o=a++,l=n;"string"!=typeof i||h.test(i)||(i=i.toLowerCase(),s=i,l=e),l("parentNode",i,o,t,s,r)},"~":function(t,i,r){var s,o=a++,l=n;"string"!=typeof i||h.test(i)||(i=i.toLowerCase(),s=i,l=e),l("previousSibling",i,o,t,s,r)}},find:{ID:function(e,t,n){if(void 0!==t.getElementById&&!n){var i=t.getElementById(e[1]);return i&&i.parentNode?[i]:[]}},NAME:function(e,t){if(void 0!==t.getElementsByName){for(var n=[],i=t.getElementsByName(e[1]),r=0,a=i.length;r<a;r++)i[r].getAttribute("name")===e[1]&&n.push(i[r]);return 0===n.length?null:n}},TAG:function(e,t){if(void 0!==t.getElementsByTagName)return t.getElementsByTagName(e[1])}},preFilter:{CLASS:function(e,t,n,i,r,a){if(e=" "+e[1].replace(u,"")+" ",a)return e;for(var s,o=0;null!=(s=t[o]);o++)s&&(r^(s.className&&(" "+s.className+" ").replace(/[\t\n\r]/g," ").indexOf(e)>=0)?n||i.push(s):n&&(t[o]=!1));return!1},ID:function(e){return e[1].replace(u,"")},TAG:function(e,t){return e[1].replace(u,"").toLowerCase()},CHILD:function(e){if("nth"===e[1]){e[2]||d.error(e[0]),e[2]=e[2].replace(/^\+|\s*/g,"");var t=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===e[2]&&"2n"||"odd"===e[2]&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}else e[2]&&d.error(e[0]);return e[0]=a++,e},ATTR:function(e,t,n,i,r,a){var s=e[1]=e[1].replace(u,"");return!a&&p.attrMap[s]&&(e[1]=p.attrMap[s]),e[4]=(e[4]||e[5]||"").replace(u,""),"~="===e[2]&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(e,t,n,r,a){if("not"===e[1]){if(!((i.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var s=d.filter(e[3],t,n,!0^a);return n||r.push.apply(r,s),!1}e[3]=d(e[3],null,null,t)}else if(p.match.POS.test(e[0])||p.match.CHILD.test(e[0]))return!0;return e},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return!1===e.disabled&&"hidden"!==e.type},disabled:function(e){return!0===e.disabled},checked:function(e){return!0===e.checked},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,t,n){return!!d(n[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){var t=e.getAttribute("type"),n=e.type;return"input"===e.nodeName.toLowerCase()&&"text"===n&&(t===n||null===t)},radio:function(e){return"input"===e.nodeName.toLowerCase()&&"radio"===e.type},checkbox:function(e){return"input"===e.nodeName.toLowerCase()&&"checkbox"===e.type},file:function(e){return"input"===e.nodeName.toLowerCase()&&"file"===e.type},password:function(e){return"input"===e.nodeName.toLowerCase()&&"password"===e.type},submit:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"submit"===e.type},image:function(e){return"input"===e.nodeName.toLowerCase()&&"image"===e.type},reset:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"reset"===e.type},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t){return 0===t},last:function(e,t,n,i){return t===i.length-1},even:function(e,t){return t%2==0},odd:function(e,t){return t%2==1},lt:function(e,t,n){return t<n[3]-0},gt:function(e,t,n){return t>n[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,i){var r=t[1],a=p.filters[r];if(a)return a(e,n,t,i);if("contains"===r)return(e.textContent||e.innerText||f([e])||"").indexOf(t[3])>=0;if("not"===r){for(var s=t[3],o=0,l=s.length;o<l;o++)if(s[o]===e)return!1;return!0}d.error(r)},CHILD:function(e,t){var n,i,a,s,o,l,u=t[1],c=e;switch(u){case"only":case"first":for(;c=c.previousSibling;)if(1===c.nodeType)return!1;if("first"===u)return!0;c=e;case"last":for(;c=c.nextSibling;)if(1===c.nodeType)return!1;return!0;case"nth":if(n=t[2],i=t[3],1===n&&0===i)return!0;if(a=t[0],(s=e.parentNode)&&(s[r]!==a||!e.nodeIndex)){for(o=0,c=s.firstChild;c;c=c.nextSibling)1===c.nodeType&&(c.nodeIndex=++o);s[r]=a}return l=e.nodeIndex-i,0===n?0===l:l%n==0&&l/n>=0}},ID:function(e,t){return 1===e.nodeType&&e.getAttribute("id")===t},TAG:function(e,t){return"*"===t&&1===e.nodeType||!!e.nodeName&&e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var n=t[1],i=d.attr?d.attr(e,n):p.attrHandle[n]?p.attrHandle[n](e):null!=e[n]?e[n]:e.getAttribute(n),r=i+"",a=t[2],s=t[4];return null==i?"!="===a:!a&&d.attr?null!=i:"="===a?r===s:"*="===a?r.indexOf(s)>=0:"~="===a?(" "+r+" ").indexOf(s)>=0:s?"!="===a?r!==s:"^="===a?0===r.indexOf(s):"$="===a?r.substr(r.length-s.length)===s:"|="===a&&(r===s||r.substr(0,s.length+1)===s+"-"):r&&!1!==i},POS:function(e,t,n,i){var r=t[2],a=p.setFilters[r];if(a)return a(e,n,t,i)}}},m=p.match.POS,g=function(e,t){return"\\"+(t-0+1)};for(var y in p.match)p.match[y]=new RegExp(p.match[y].source+/(?![^\[]*\])(?![^\(]*\))/.source),p.leftMatch[y]=new RegExp(/(^(?:.|\r|\n)*?)/.source+p.match[y].source.replace(/\\(\d+)/g,g));var v=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{Array.prototype.slice.call(A.documentElement.childNodes,0)[0].nodeType}catch(e){v=function(e,t){var n=0,i=t||[];if("[object Array]"===s.call(e))Array.prototype.push.apply(i,e);else if("number"==typeof e.length)for(var r=e.length;n<r;n++)i.push(e[n]);else for(;e[n];n++)i.push(e[n]);return i}}var b,w;A.documentElement.compareDocumentPosition?b=function(e,t){return e===t?(o=!0,0):e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t)?-1:1:e.compareDocumentPosition?-1:1}:(b=function(e,t){if(e===t)return o=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,i,r=[],a=[],s=e.parentNode,l=t.parentNode,u=s;if(s===l)return w(e,t);if(!s)return-1;if(!l)return 1;for(;u;)r.unshift(u),u=u.parentNode;for(u=l;u;)a.unshift(u),u=u.parentNode;n=r.length,i=a.length;for(var c=0;c<n&&c<i;c++)if(r[c]!==a[c])return w(r[c],a[c]);return c===n?w(e,a[c],-1):w(r[c],t,1)},w=function(e,t,n){if(e===t)return n;for(var i=e.nextSibling;i;){if(i===t)return-1;i=i.nextSibling}return 1}),function(){var e=A.createElement("div"),n="script"+(new Date).getTime(),i=A.documentElement;e.innerHTML="<a name='"+n+"'/>",i.insertBefore(e,i.firstChild),A.getElementById(n)&&(p.find.ID=function(e,n,i){if(void 0!==n.getElementById&&!i){var r=n.getElementById(e[1]);return r?r.id===e[1]||void 0!==r.getAttributeNode&&r.getAttributeNode("id").nodeValue===e[1]?[r]:t:[]}},p.filter.ID=function(e,t){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&n&&n.nodeValue===t}),i.removeChild(e),i=e=null}(),function(){var e=A.createElement("div");e.appendChild(A.createComment("")),e.getElementsByTagName("*").length>0&&(p.find.TAG=function(e,t){var n=t.getElementsByTagName(e[1]);if("*"===e[1]){for(var i=[],r=0;n[r];r++)1===n[r].nodeType&&i.push(n[r]);n=i}return n}),e.innerHTML="<a href='#'></a>",e.firstChild&&void 0!==e.firstChild.getAttribute&&"#"!==e.firstChild.getAttribute("href")&&(p.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),A.querySelectorAll&&function(){var e=d,t=A.createElement("div");if(t.innerHTML="<p class='TEST'></p>",!t.querySelectorAll||0!==t.querySelectorAll(".TEST").length){d=function(t,n,i,r){if(n=n||A,!r&&!d.isXML(n)){var a=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(a&&(1===n.nodeType||9===n.nodeType)){if(a[1])return v(n.getElementsByTagName(t),i);if(a[2]&&p.find.CLASS&&n.getElementsByClassName)return v(n.getElementsByClassName(a[2]),i)}if(9===n.nodeType){if("body"===t&&n.body)return v([n.body],i);if(a&&a[3]){var s=n.getElementById(a[3]);if(!s||!s.parentNode)return v([],i);if(s.id===a[3])return v([s],i)}try{return v(n.querySelectorAll(t),i)}catch(e){}}else if(1===n.nodeType&&"object"!==n.nodeName.toLowerCase()){var o=n,l=n.getAttribute("id"),u=l||"__sizzle__",c=n.parentNode,h=/^\s*[+~]/.test(t);l?u=u.replace(/'/g,"\\$&"):n.setAttribute("id",u),h&&c&&(n=n.parentNode);try{if(!h||c)return v(n.querySelectorAll("[id='"+u+"'] "+t),i)}catch(e){}finally{l||o.removeAttribute("id")}}}return e(t,n,i,r)};for(var n in e)d[n]=e[n];t=null}}(),function(){var e=A.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){var n=!t.call(A.createElement("div"),"div"),i=!1;try{t.call(A.documentElement,"[test!='']:sizzle")}catch(e){i=!0}d.matchesSelector=function(e,r){if(r=r.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!d.isXML(e))try{if(i||!p.match.PSEUDO.test(r)&&!/!=/.test(r)){var a=t.call(e,r);if(a||!n||e.document&&11!==e.document.nodeType)return a}}catch(e){}return d(r,null,null,[e]).length>0}}}(),function(){var e=A.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>",e.getElementsByClassName&&0!==e.getElementsByClassName("e").length&&(e.lastChild.className="e",1!==e.getElementsByClassName("e").length&&(p.order.splice(1,0,"CLASS"),p.find.CLASS=function(e,t,n){if(void 0!==t.getElementsByClassName&&!n)return t.getElementsByClassName(e[1])},e=null))}(),A.documentElement.contains?d.contains=function(e,t){return e!==t&&(!e.contains||e.contains(t))}:A.documentElement.compareDocumentPosition?d.contains=function(e,t){return!!(16&e.compareDocumentPosition(t))}:d.contains=function(){return!1},d.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return!!t&&"HTML"!==t.nodeName};var x=function(e,t,n){for(var i,r=[],a="",s=t.nodeType?[t]:t;i=p.match.PSEUDO.exec(e);)a+=i[0],e=e.replace(p.match.PSEUDO,"");e=p.relative[e]?e+"*":e;for(var o=0,l=s.length;o<l;o++)d(e,s[o],r,n);return d.filter(a,r)};d.attr=R.attr,d.selectors.attrMap={},R.find=d,R.expr=d.selectors,R.expr[":"]=R.expr.filters,R.unique=d.uniqueSort,R.text=d.getText,R.isXMLDoc=d.isXML,R.contains=d.contains}();var le=/Until$/,ue=/^(?:parents|prevUntil|prevAll)/,ce=/,/,he=/^.[^:#\[\.,]*$/,de=Array.prototype.slice,fe=R.expr.match.POS,pe={children:!0,contents:!0,next:!0,prev:!0};R.fn.extend({find:function(e){var t,n,i=this;if("string"!=typeof e)return R(e).filter(function(){for(t=0,n=i.length;t<n;t++)if(R.contains(i[t],this))return!0});var r,a,s,o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++)if(r=o.length,R.find(e,this[t],o),t>0)for(a=r;a<o.length;a++)for(s=0;s<r;s++)if(o[s]===o[a]){o.splice(a--,1);break}return o},has:function(e){var t=R(e);return this.filter(function(){for(var e=0,n=t.length;e<n;e++)if(R.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(u(this,e,!1),"not",e)},filter:function(e){return this.pushStack(u(this,e,!0),"filter",e)},is:function(e){return!!e&&("string"==typeof e?fe.test(e)?R(e,this.context).index(this[0])>=0:R.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,i,r=[],a=this[0];if(R.isArray(e)){for(var s=1;a&&a.ownerDocument&&a!==t;){for(n=0;n<e.length;n++)R(a).is(e[n])&&r.push({selector:e[n],elem:a,level:s});a=a.parentNode,s++}return r}var o=fe.test(e)||"string"!=typeof e?R(e,t||this.context):0;for(n=0,i=this.length;n<i;n++)for(a=this[n];a;){if(o?o.index(a)>-1:R.find.matchesSelector(a,e)){r.push(a);break}if(!(a=a.parentNode)||!a.ownerDocument||a===t||11===a.nodeType)break}return r=r.length>1?R.unique(r):r,this.pushStack(r,"closest",e)},index:function(e){return e?"string"==typeof e?R.inArray(this[0],R(e)):R.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n="string"==typeof e?R(e,t):R.makeArray(e&&e.nodeType?[e]:e),i=R.merge(this.get(),n);return this.pushStack(l(n[0])||l(i[0])?i:R.unique(i))},andSelf:function(){return this.add(this.prevObject)}}),R.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return R.dir(e,"parentNode")},parentsUntil:function(e,t,n){return R.dir(e,"parentNode",n)},next:function(e){return R.nth(e,2,"nextSibling")},prev:function(e){return R.nth(e,2,"previousSibling")},nextAll:function(e){return R.dir(e,"nextSibling")},prevAll:function(e){return R.dir(e,"previousSibling")},nextUntil:function(e,t,n){return R.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return R.dir(e,"previousSibling",n)},siblings:function(e){return R.sibling(e.parentNode.firstChild,e)},children:function(e){return R.sibling(e.firstChild)},contents:function(e){return R.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:R.makeArray(e.childNodes)}},function(e,t){R.fn[e]=function(n,i){var r=R.map(this,t,n);return le.test(e)||(i=n),i&&"string"==typeof i&&(r=R.filter(i,r)),r=this.length>1&&!pe[e]?R.unique(r):r,(this.length>1||ce.test(i))&&ue.test(e)&&(r=r.reverse()),this.pushStack(r,e,de.call(arguments).join(","))}}),R.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?R.find.matchesSelector(t[0],e)?[t[0]]:[]:R.find.matches(e,t)},dir:function(e,n,i){for(var r=[],a=e[n];a&&9!==a.nodeType&&(i===t||1!==a.nodeType||!R(a).is(i));)1===a.nodeType&&r.push(a),a=a[n];return r},nth:function(e,t,n,i){t=t||1;for(var r=0;e&&(1!==e.nodeType||++r!==t);e=e[n]);return e},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var me="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ge=/ jQuery\d+="(?:\d+|null)"/g,ye=/^\s+/,ve=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,be=/<([\w:]+)/,we=/<tbody/i,xe=/<|&#?\w+;/,_e=/<(?:script|style)/i,ke=/<(?:script|object|embed|option|style)/i,De=new RegExp("<(?:"+me+")","i"),Ce=/checked\s*(?:[^=]|=\s*.checked.)/i,Te=/\/(java|ecma)script/i,Se=/^\s*<!(?:\[CDATA\[|\-\-)/,Ne={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ee=c(A);Ne.optgroup=Ne.option,Ne.tbody=Ne.tfoot=Ne.colgroup=Ne.caption=Ne.thead,Ne.th=Ne.td,R.support.htmlSerialize||(Ne._default=[1,"div<div>","</div>"]),R.fn.extend({text:function(e){return R.isFunction(e)?this.each(function(t){var n=R(this);n.text(e.call(this,t,n.text()))}):"object"!=typeof e&&e!==t?this.empty().append((this[0]&&this[0].ownerDocument||A).createTextNode(e)):R.text(this)},wrapAll:function(e){if(R.isFunction(e))return this.each(function(t){R(this).wrapAll(e.call(this,t))});if(this[0]){var t=R(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 R.isFunction(e)?this.each(function(t){R(this).wrapInner(e.call(this,t))}):this.each(function(){var t=R(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=R.isFunction(e);return this.each(function(n){R(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){R.nodeName(this,"body")||R(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.insertBefore(e,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=R.clean(arguments);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,R.clean(arguments)),e}},remove:function(e,t){for(var n,i=0;null!=(n=this[i]);i++)e&&!R.filter(e,[n]).length||(t||1!==n.nodeType||(R.cleanData(n.getElementsByTagName("*")),R.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&R.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return R.clone(this,e,t)})},html:function(e){if(e===t)return this[0]&&1===this[0].nodeType?this[0].innerHTML.replace(ge,""):null;if("string"!=typeof e||_e.test(e)||!R.support.leadingWhitespace&&ye.test(e)||Ne[(be.exec(e)||["",""])[1].toLowerCase()])R.isFunction(e)?this.each(function(t){var n=R(this);n.html(e.call(this,t,n.html()))}):this.empty().append(e);else{e=e.replace(ve,"<$1></$2>");try{for(var n=0,i=this.length;n<i;n++)1===this[n].nodeType&&(R.cleanData(this[n].getElementsByTagName("*")),this[n].innerHTML=e)}catch(t){this.empty().append(e)}}return this},replaceWith:function(e){return this[0]&&this[0].parentNode?R.isFunction(e)?this.each(function(t){var n=R(this),i=n.html();n.replaceWith(e.call(this,t,i))}):("string"!=typeof e&&(e=R(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;R(this).remove(),t?R(t).before(e):R(n).append(e)})):this.length?this.pushStack(R(R.isFunction(e)?e():e),"replaceWith",e):this},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,i){var r,a,s,o,l=e[0],u=[];if(!R.support.checkClone&&3===arguments.length&&"string"==typeof l&&Ce.test(l))return this.each(function(){R(this).domManip(e,n,i,!0)});if(R.isFunction(l))return this.each(function(r){var a=R(this);e[0]=l.call(this,r,n?a.html():t),a.domManip(e,n,i)});if(this[0]){if(o=l&&l.parentNode,r=R.support.parentNode&&o&&11===o.nodeType&&o.childNodes.length===this.length?{fragment:o}:R.buildFragment(e,this,u),s=r.fragment,a=1===s.childNodes.length?s=s.firstChild:s.firstChild){n=n&&R.nodeName(a,"tr");for(var c=0,d=this.length,f=d-1;c<d;c++)i.call(n?h(this[c],a):this[c],r.cacheable||d>1&&c<f?R.clone(s,!0,!0):s)}u.length&&R.each(u,v)}return this}}),R.buildFragment=function(e,t,n){var i,r,a,s,o=e[0];return t&&t[0]&&(s=t[0].ownerDocument||t[0]),s.createDocumentFragment||(s=A),!(1===e.length&&"string"==typeof o&&o.length<512&&s===A&&"<"===o.charAt(0))||ke.test(o)||!R.support.checkClone&&Ce.test(o)||!R.support.html5Clone&&De.test(o)||(r=!0,(a=R.fragments[o])&&1!==a&&(i=a)),i||(i=s.createDocumentFragment(),R.clean(e,s,i,n)),r&&(R.fragments[o]=a?i:1),{fragment:i,cacheable:r}},R.fragments={},R.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){R.fn[e]=function(n){var i=[],r=R(n),a=1===this.length&&this[0].parentNode;if(a&&11===a.nodeType&&1===a.childNodes.length&&1===r.length)return r[t](this[0]),this;for(var s=0,o=r.length;s<o;s++){var l=(s>0?this.clone(!0):this).get();R(r[s])[t](l),i=i.concat(l)}return this.pushStack(i,e,r.selector)}}),R.extend({clone:function(e,t,n){var i,r,a,s=R.support.html5Clone||!De.test("<"+e.nodeName)?e.cloneNode(!0):y(e);if(!(R.support.noCloneEvent&&R.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||R.isXMLDoc(e)))for(f(e,s),i=p(e),r=p(s),a=0;i[a];++a)r[a]&&f(i[a],r[a]);if(t&&(d(e,s),n))for(i=p(e),r=p(s),a=0;i[a];++a)d(i[a],r[a]);return i=r=null,s},clean:function(e,t,n,i){var r;t=t||A,void 0===t.createElement&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||A);for(var a,s,o=[],l=0;null!=(s=e[l]);l++)if("number"==typeof s&&(s+=""),s){if("string"==typeof s)if(xe.test(s)){s=s.replace(ve,"<$1></$2>");var u=(be.exec(s)||["",""])[1].toLowerCase(),h=Ne[u]||Ne._default,d=h[0],f=t.createElement("div");for(t===A?Ee.appendChild(f):c(t).appendChild(f),f.innerHTML=h[1]+s+h[2];d--;)f=f.lastChild;if(!R.support.tbody){var p=we.test(s),m="table"!==u||p?"<table>"!==h[1]||p?[]:f.childNodes:f.firstChild&&f.firstChild.childNodes;for(a=m.length-1;a>=0;--a)R.nodeName(m[a],"tbody")&&!m[a].childNodes.length&&m[a].parentNode.removeChild(m[a])}!R.support.leadingWhitespace&&ye.test(s)&&f.insertBefore(t.createTextNode(ye.exec(s)[0]),f.firstChild),s=f.childNodes}else s=t.createTextNode(s);var y;if(!R.support.appendChecked)if(s[0]&&"number"==typeof(y=s.length))for(a=0;a<y;a++)g(s[a]);else g(s);s.nodeType?o.push(s):o=R.merge(o,s)}if(n)for(r=function(e){return!e.type||Te.test(e.type)},l=0;o[l];l++)if(!i||!R.nodeName(o[l],"script")||o[l].type&&"text/javascript"!==o[l].type.toLowerCase()){if(1===o[l].nodeType){var v=R.grep(o[l].getElementsByTagName("script"),r);o.splice.apply(o,[l+1,0].concat(v))}n.appendChild(o[l])}else i.push(o[l].parentNode?o[l].parentNode.removeChild(o[l]):o[l]);return o},cleanData:function(e){for(var t,n,i,r=R.cache,a=R.event.special,s=R.support.deleteExpando,o=0;null!=(i=e[o]);o++)if((!i.nodeName||!R.noData[i.nodeName.toLowerCase()])&&(n=i[R.expando])){if((t=r[n])&&t.events){for(var l in t.events)a[l]?R.event.remove(i,l):R.removeEvent(i,l,t.handle);t.handle&&(t.handle.elem=null)}s?delete i[R.expando]:i.removeAttribute&&i.removeAttribute(R.expando),delete r[n]}}});var Me,je,Oe,Ae=/alpha\([^)]*\)/i,Le=/opacity=([^)]*)/,Fe=/([A-Z]|^ms)/g,Re=/^-?\d+(?:px)?$/i,Be=/^-?\d/,Pe=/^([\-+])=([\-+.\de]+)/,He={position:"absolute",visibility:"hidden",display:"block"},Ye=["Left","Right"],$e=["Top","Bottom"];R.fn.css=function(e,n){return 2===arguments.length&&n===t?this:R.access(this,e,n,!0,function(e,n,i){return i!==t?R.style(e,n,i):R.css(e,n)})},R.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Me(e,"opacity","opacity");return""===n?"1":n}return e.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:R.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,i,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a,s,o=R.camelCase(n),l=e.style,u=R.cssHooks[o];if(n=R.cssProps[o]||o,i===t)return u&&"get"in u&&(a=u.get(e,!1,r))!==t?a:l[n];if(!(s=typeof i,"string"===s&&(a=Pe.exec(i))&&(i=+(a[1]+1)*+a[2]+parseFloat(R.css(e,n)),s="number"),null==i||"number"===s&&isNaN(i)||("number"!==s||R.cssNumber[o]||(i+="px"),u&&"set"in u&&(i=u.set(e,i))===t)))try{l[n]=i}catch(e){}}},css:function(e,n,i){var r,a;return n=R.camelCase(n),a=R.cssHooks[n],n=R.cssProps[n]||n,"cssFloat"===n&&(n="float"),a&&"get"in a&&(r=a.get(e,!0,i))!==t?r:Me?Me(e,n):void 0},swap:function(e,t,n){var i={};for(var r in t)i[r]=e.style[r],e.style[r]=t[r];n.call(e);for(r in t)e.style[r]=i[r]}}),R.curCSS=R.css,R.each(["height","width"],function(e,t){R.cssHooks[t]={get:function(e,n,i){var r;if(n)return 0!==e.offsetWidth?b(e,t,i):(R.swap(e,He,function(){r=b(e,t,i)}),r)},set:function(e,t){return Re.test(t)?(t=parseFloat(t))>=0?t+"px":void 0:t}}}),R.support.opacity||(R.cssHooks.opacity={get:function(e,t){return Le.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,r=R.isNumeric(t)?"alpha(opacity="+100*t+")":"",a=i&&i.filter||n.filter||"";n.zoom=1,t>=1&&""===R.trim(a.replace(Ae,""))&&(n.removeAttribute("filter"),i&&!i.filter)||(n.filter=Ae.test(a)?a.replace(Ae,r):a+" "+r)}}),R(function(){R.support.reliableMarginRight||(R.cssHooks.marginRight={get:function(e,t){var n;return R.swap(e,{display:"inline-block"},function(){n=t?Me(e,"margin-right","marginRight"):e.style.marginRight}),n}})}),A.defaultView&&A.defaultView.getComputedStyle&&(je=function(e,t){var n,i,r;return t=t.replace(Fe,"-$1").toLowerCase(),(i=e.ownerDocument.defaultView)&&(r=i.getComputedStyle(e,null))&&(""!==(n=r.getPropertyValue(t))||R.contains(e.ownerDocument.documentElement,e)||(n=R.style(e,t))),n}),A.documentElement.currentStyle&&(Oe=function(e,t){var n,i,r,a=e.currentStyle&&e.currentStyle[t],s=e.style;return null===a&&s&&(r=s[t])&&(a=r),!Re.test(a)&&Be.test(a)&&(n=s.left,i=e.runtimeStyle&&e.runtimeStyle.left,i&&(e.runtimeStyle.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a||0,a=s.pixelLeft+"px",s.left=n,i&&(e.runtimeStyle.left=i)),""===a?"auto":a}),Me=je||Oe,R.expr&&R.expr.filters&&(R.expr.filters.hidden=function(e){var t=e.offsetWidth,n=e.offsetHeight;return 0===t&&0===n||!R.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||R.css(e,"display"))},R.expr.filters.visible=function(e){return!R.expr.filters.hidden(e)});var Ie,qe,We=/%20/g,ze=/\[\]$/,Ue=/\r?\n/g,Ve=/#.*$/,Xe=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ge=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Je=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Ze=/^(?:GET|HEAD)$/,Qe=/^\/\//,Ke=/\?/,et=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,tt=/^(?:select|textarea)/i,nt=/\s+/,it=/([?&])_=[^&]*/,rt=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,at=R.fn.load,st={},ot={},lt=["*/"]+["*"];try{Ie=F.href}catch(e){Ie=A.createElement("a"),Ie.href="",Ie=Ie.href}qe=rt.exec(Ie.toLowerCase())||[],R.fn.extend({load:function(e,n,i){if("string"!=typeof e&&at)return at.apply(this,arguments);if(!this.length)return this;var r=e.indexOf(" ");if(r>=0){var a=e.slice(r,e.length);e=e.slice(0,r)}var s="GET";n&&(R.isFunction(n)?(i=n,n=t):"object"==typeof n&&(n=R.param(n,R.ajaxSettings.traditional),s="POST"));var o=this;return R.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t,n){n=e.responseText,e.isResolved()&&(e.done(function(e){n=e}),o.html(a?R("<div>").append(n.replace(et,"")).find(a):n)),i&&o.each(i,[n,t,e])}}),this},serialize:function(){return R.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?R.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||tt.test(this.nodeName)||Ge.test(this.type))}).map(function(e,t){var n=R(this).val();return null==n?null:R.isArray(n)?R.map(n,function(e,n){return{name:t.name,value:e.replace(Ue,"\r\n")}}):{name:t.name,value:n.replace(Ue,"\r\n")}}).get()}}),R.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){R.fn[t]=function(e){return this.on(t,e)}}),R.each(["get","post"],function(e,n){R[n]=function(e,i,r,a){return R.isFunction(i)&&(a=a||r,r=i,i=t),R.ajax({type:n,url:e,data:i,success:r,dataType:a})}}),R.extend({getScript:function(e,n){return R.get(e,t,n,"script")},getJSON:function(e,t,n){return R.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?_(e,R.ajaxSettings):(t=e,e=R.ajaxSettings),_(e,t),e},ajaxSettings:{url:Ie,isLocal:Je.test(qe[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":lt},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":R.parseJSON,"text xml":R.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:w(st),ajaxTransport:w(ot),ajax:function(e,n){function i(e,n,i,s){if(2!==w){w=2,l&&clearTimeout(l),o=t,a=s||"",_.readyState=e>0?4:0;var u,h,v,b,x,k=n,T=i?D(d,_,i):t;if(e>=200&&e<300||304===e)if(d.ifModified&&((b=_.getResponseHeader("Last-Modified"))&&(R.lastModified[r]=b),(x=_.getResponseHeader("Etag"))&&(R.etag[r]=x)),304===e)k="notmodified",u=!0;else try{h=C(d,T),k="success",u=!0}catch(e){k="parsererror",v=e}else v=k,k&&!e||(k="error",e<0&&(e=0));_.status=e,_.statusText=""+(n||k),u?m.resolveWith(f,[h,k,_]):m.rejectWith(f,[_,k,v]),_.statusCode(y),y=t,c&&p.trigger("ajax"+(u?"Success":"Error"),[_,d,u?h:v]),g.fireWith(f,[_,k]),c&&(p.trigger("ajaxComplete",[_,d]),--R.active||R.event.trigger("ajaxStop"))}}"object"==typeof e&&(n=e,e=t),n=n||{};var r,a,s,o,l,u,c,h,d=R.ajaxSetup({},n),f=d.context||d,p=f!==d&&(f.nodeType||f instanceof R)?R(f):R.event,m=R.Deferred(),g=R.Callbacks("once memory"),y=d.statusCode||{},v={},b={},w=0,_={readyState:0,setRequestHeader:function(e,t){if(!w){var n=e.toLowerCase();e=b[n]=b[n]||e,v[e]=t}return this},getAllResponseHeaders:function(){return 2===w?a:null},getResponseHeader:function(e){var n;if(2===w){if(!s)for(s={};n=Xe.exec(a);)s[n[1].toLowerCase()]=n[2];n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return w||(d.mimeType=e),this},abort:function(e){return e=e||"abort",o&&o.abort(e),i(0,e),this}};if(m.promise(_),_.success=_.done,_.error=_.fail,_.complete=g.add,_.statusCode=function(e){if(e){var t;if(w<2)for(t in e)y[t]=[y[t],e[t]];else t=e[_.status],_.then(t,t)}return this},d.url=((e||d.url)+"").replace(Ve,"").replace(Qe,qe[1]+"//"),d.dataTypes=R.trim(d.dataType||"*").toLowerCase().split(nt),null==d.crossDomain&&(u=rt.exec(d.url.toLowerCase()),d.crossDomain=!(!u||u[1]==qe[1]&&u[2]==qe[2]&&(u[3]||("http:"===u[1]?80:443))==(qe[3]||("http:"===qe[1]?80:443)))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=R.param(d.data,d.traditional)),x(st,d,n,_),2===w)return!1;if(c=d.global,d.type=d.type.toUpperCase(),d.hasContent=!Ze.test(d.type),c&&0==R.active++&&R.event.trigger("ajaxStart"),!d.hasContent&&(d.data&&(d.url+=(Ke.test(d.url)?"&":"?")+d.data,delete d.data),r=d.url,!1===d.cache)){var k=R.now(),T=d.url.replace(it,"$1_="+k);d.url=T+(T===d.url?(Ke.test(d.url)?"&":"?")+"_="+k:"")}(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&_.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(r=r||d.url,R.lastModified[r]&&_.setRequestHeader("If-Modified-Since",R.lastModified[r]),R.etag[r]&&_.setRequestHeader("If-None-Match",R.etag[r])),_.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+lt+"; q=0.01":""):d.accepts["*"]);for(h in d.headers)_.setRequestHeader(h,d.headers[h]);if(d.beforeSend&&(!1===d.beforeSend.call(f,_,d)||2===w))return _.abort(),!1;for(h in{success:1,error:1,complete:1})_[h](d[h]);if(o=x(ot,d,n,_)){_.readyState=1,c&&p.trigger("ajaxSend",[_,d]),d.async&&d.timeout>0&&(l=setTimeout(function(){_.abort("timeout")},d.timeout));try{w=1,o.send(v,i)}catch(e){if(!(w<2))throw e;i(-1,e)}}else i(-1,"No Transport");return _},param:function(e,n){var i=[],r=function(e,t){t=R.isFunction(t)?t():t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=R.ajaxSettings.traditional),R.isArray(e)||e.jquery&&!R.isPlainObject(e))R.each(e,function(){r(this.name,this.value)});else for(var a in e)k(a,e[a],n,r);return i.join("&").replace(We,"+")}}),R.extend({active:0,lastModified:{},etag:{}});var ut=R.now(),ct=/(\=)\?(&|$)|\?\?/i;R.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return R.expando+"_"+ut++}}),R.ajaxPrefilter("json jsonp",function(t,n,i){var r="application/x-www-form-urlencoded"===t.contentType&&"string"==typeof t.data;if("jsonp"===t.dataTypes[0]||!1!==t.jsonp&&(ct.test(t.url)||r&&ct.test(t.data))){var a,s=t.jsonpCallback=R.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,o=e[s],l=t.url,u=t.data,c="$1"+s+"$2";return!1!==t.jsonp&&(l=l.replace(ct,c),t.url===l&&(r&&(u=u.replace(ct,c)),t.data===u&&(l+=(/\?/.test(l)?"&":"?")+t.jsonp+"="+s))),t.url=l,t.data=u,e[s]=function(e){a=[e]},i.always(function(){e[s]=o,a&&R.isFunction(o)&&e[s](a[0])}),t.converters["script json"]=function(){return a||R.error(s+" was not called"),a[0]},t.dataTypes[0]="json","script"}}),R.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return R.globalEval(e),e}}}),R.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),R.ajaxTransport("script",function(e){if(e.crossDomain){var n,i=A.head||A.getElementsByTagName("head")[0]||A.documentElement;return{send:function(r,a){
  n=A.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,r){(r||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,i&&n.parentNode&&i.removeChild(n),n=t,r||a(200,"success"))},i.insertBefore(n,i.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var ht,dt=!!e.ActiveXObject&&function(){for(var e in ht)ht[e](0,1)},ft=0;R.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&T()||S()}:T,function(e){R.extend(R.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(R.ajaxSettings.xhr()),R.support.ajax&&R.ajaxTransport(function(n){if(!n.crossDomain||R.support.cors){var i;return{send:function(r,a){var s,o,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(o in n.xhrFields)l[o]=n.xhrFields[o];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");try{for(o in r)l.setRequestHeader(o,r[o])}catch(e){}l.send(n.hasContent&&n.data||null),i=function(e,r){var o,u,c,h,d;try{if(i&&(r||4===l.readyState))if(i=t,s&&(l.onreadystatechange=R.noop,dt&&delete ht[s]),r)4!==l.readyState&&l.abort();else{o=l.status,c=l.getAllResponseHeaders(),h={},d=l.responseXML,d&&d.documentElement&&(h.xml=d),h.text=l.responseText;try{u=l.statusText}catch(e){u=""}o||!n.isLocal||n.crossDomain?1223===o&&(o=204):o=h.text?200:404}}catch(e){r||a(-1,e)}h&&a(o,u,h,c)},n.async&&4!==l.readyState?(s=++ft,dt&&(ht||(ht={},R(e).unload(dt)),ht[s]=i),l.onreadystatechange=i):i()},abort:function(){i&&i(0,1)}}}});var pt,mt,gt,yt,vt={},bt=/^(?:toggle|show|hide)$/,wt=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,xt=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];R.fn.extend({show:function(e,t,n){var i,r;if(e||0===e)return this.animate(M("show",3),e,t,n);for(var a=0,s=this.length;a<s;a++)i=this[a],i.style&&(r=i.style.display,R._data(i,"olddisplay")||"none"!==r||(r=i.style.display=""),""===r&&"none"===R.css(i,"display")&&R._data(i,"olddisplay",j(i.nodeName)));for(a=0;a<s;a++)i=this[a],i.style&&(""!==(r=i.style.display)&&"none"!==r||(i.style.display=R._data(i,"olddisplay")||""));return this},hide:function(e,t,n){if(e||0===e)return this.animate(M("hide",3),e,t,n);for(var i,r,a=0,s=this.length;a<s;a++)i=this[a],i.style&&("none"===(r=R.css(i,"display"))||R._data(i,"olddisplay")||R._data(i,"olddisplay",r));for(a=0;a<s;a++)this[a].style&&(this[a].style.display="none");return this},_toggle:R.fn.toggle,toggle:function(e,t,n){var i="boolean"==typeof e;return R.isFunction(e)&&R.isFunction(t)?this._toggle.apply(this,arguments):null==e||i?this.each(function(){var t=i?e:R(this).is(":hidden");R(this)[t?"show":"hide"]()}):this.animate(M("toggle",3),e,t,n),this},fadeTo:function(e,t,n,i){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){function r(){!1===a.queue&&R._mark(this);var t,n,i,r,s,o,l,u,c,h=R.extend({},a),d=1===this.nodeType,f=d&&R(this).is(":hidden");h.animatedProperties={};for(i in e){if(t=R.camelCase(i),i!==t&&(e[t]=e[i],delete e[i]),n=e[t],R.isArray(n)?(h.animatedProperties[t]=n[1],n=e[t]=n[0]):h.animatedProperties[t]=h.specialEasing&&h.specialEasing[t]||h.easing||"swing","hide"===n&&f||"show"===n&&!f)return h.complete.call(this);!d||"height"!==t&&"width"!==t||(h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],"inline"===R.css(this,"display")&&"none"===R.css(this,"float")&&(R.support.inlineBlockNeedsLayout&&"inline"!==j(this.nodeName)?this.style.zoom=1:this.style.display="inline-block"))}null!=h.overflow&&(this.style.overflow="hidden");for(i in e)r=new R.fx(this,h,i),n=e[i],bt.test(n)?(c=R._data(this,"toggle"+i)||("toggle"===n?f?"show":"hide":0),c?(R._data(this,"toggle"+i,"show"===c?"hide":"show"),r[c]()):r[n]()):(s=wt.exec(n),o=r.cur(),s?(l=parseFloat(s[2]),u=s[3]||(R.cssNumber[i]?"":"px"),"px"!==u&&(R.style(this,i,(l||1)+u),o=(l||1)/r.cur()*o,R.style(this,i,o+u)),s[1]&&(l=("-="===s[1]?-1:1)*l+o),r.custom(o,l,u)):r.custom(o,n,""));return!0}var a=R.speed(t,n,i);return R.isEmptyObject(e)?this.each(a.complete,[!1]):(e=R.extend({},e),!1===a.queue?this.each(r):this.queue(a.queue,r))},stop:function(e,n,i){return"string"!=typeof e&&(i=n,n=e,e=t),n&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){function t(e,t,n){var r=t[n];R.removeData(e,n,!0),r.stop(i)}var n,r=!1,a=R.timers,s=R._data(this);if(i||R._unmark(!0,this),null==e)for(n in s)s[n]&&s[n].stop&&n.indexOf(".run")===n.length-4&&t(this,s,n);else s[n=e+".run"]&&s[n].stop&&t(this,s,n);for(n=a.length;n--;)a[n].elem!==this||null!=e&&a[n].queue!==e||(i?a[n](!0):a[n].saveState(),r=!0,a.splice(n,1));i&&r||R.dequeue(this,e)})}}),R.each({slideDown:M("show",1),slideUp:M("hide",1),slideToggle:M("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){R.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),R.extend({speed:function(e,t,n){var i=e&&"object"==typeof e?R.extend({},e):{complete:n||!n&&t||R.isFunction(e)&&e,duration:e,easing:n&&t||t&&!R.isFunction(t)&&t};return i.duration=R.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in R.fx.speeds?R.fx.speeds[i.duration]:R.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(e){R.isFunction(i.old)&&i.old.call(this),i.queue?R.dequeue(this,i.queue):!1!==e&&R._unmark(this)},i},easing:{linear:function(e,t,n,i){return n+i*e},swing:function(e,t,n,i){return(-Math.cos(e*Math.PI)/2+.5)*i+n}},timers:[],fx:function(e,t,n){this.options=t,this.elem=e,this.prop=n,t.orig=t.orig||{}}}),R.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(R.fx.step[this.prop]||R.fx.step._default)(this)},cur:function(){if(null!=this.elem[this.prop]&&(!this.elem.style||null==this.elem.style[this.prop]))return this.elem[this.prop];var e,t=R.css(this.elem,this.prop);return isNaN(e=parseFloat(t))?t&&"auto"!==t?t:0:e},custom:function(e,n,i){function r(e){return a.step(e)}var a=this,s=R.fx;this.startTime=yt||N(),this.end=n,this.now=this.start=e,this.pos=this.state=0,this.unit=i||this.unit||(R.cssNumber[this.prop]?"":"px"),r.queue=this.options.queue,r.elem=this.elem,r.saveState=function(){a.options.hide&&R._data(a.elem,"fxshow"+a.prop)===t&&R._data(a.elem,"fxshow"+a.prop,a.start)},r()&&R.timers.push(r)&&!gt&&(gt=setInterval(s.tick,s.interval))},show:function(){var e=R._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=e||R.style(this.elem,this.prop),this.options.show=!0,e!==t?this.custom(this.cur(),e):this.custom("width"===this.prop||"height"===this.prop?1:0,this.cur()),R(this.elem).show()},hide:function(){this.options.orig[this.prop]=R._data(this.elem,"fxshow"+this.prop)||R.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(e){var t,n,i,r=yt||N(),a=!0,s=this.elem,o=this.options;if(e||r>=o.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),o.animatedProperties[this.prop]=!0;for(t in o.animatedProperties)!0!==o.animatedProperties[t]&&(a=!1);if(a){if(null==o.overflow||R.support.shrinkWrapBlocks||R.each(["","X","Y"],function(e,t){s.style["overflow"+t]=o.overflow[e]}),o.hide&&R(s).hide(),o.hide||o.show)for(t in o.animatedProperties)R.style(s,t,o.orig[t]),R.removeData(s,"fxshow"+t,!0),R.removeData(s,"toggle"+t,!0);i=o.complete,i&&(o.complete=!1,i.call(s))}return!1}return o.duration==1/0?this.now=r:(n=r-this.startTime,this.state=n/o.duration,this.pos=R.easing[o.animatedProperties[this.prop]](this.state,n,0,1,o.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},R.extend(R.fx,{tick:function(){for(var e,t=R.timers,n=0;n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||R.fx.stop()},interval:13,stop:function(){clearInterval(gt),gt=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){R.style(e.elem,"opacity",e.now)},_default:function(e){e.elem.style&&null!=e.elem.style[e.prop]?e.elem.style[e.prop]=e.now+e.unit:e.elem[e.prop]=e.now}}}),R.each(["width","height"],function(e,t){R.fx.step[t]=function(e){R.style(e.elem,t,Math.max(0,e.now)+e.unit)}}),R.expr&&R.expr.filters&&(R.expr.filters.animated=function(e){return R.grep(R.timers,function(t){return e===t.elem}).length});var _t=/^t(?:able|d|h)$/i,kt=/^(?:body|html)$/i;"getBoundingClientRect"in A.documentElement?R.fn.offset=function(e){var t,n=this[0];if(e)return this.each(function(t){R.offset.setOffset(this,e,t)});if(!n||!n.ownerDocument)return null;if(n===n.ownerDocument.body)return R.offset.bodyOffset(n);try{t=n.getBoundingClientRect()}catch(e){}var i=n.ownerDocument,r=i.documentElement;if(!t||!R.contains(r,n))return t?{top:t.top,left:t.left}:{top:0,left:0};var a=i.body,s=O(i),o=r.clientTop||a.clientTop||0,l=r.clientLeft||a.clientLeft||0,u=s.pageYOffset||R.support.boxModel&&r.scrollTop||a.scrollTop,c=s.pageXOffset||R.support.boxModel&&r.scrollLeft||a.scrollLeft;return{top:t.top+u-o,left:t.left+c-l}}:R.fn.offset=function(e){var t=this[0];if(e)return this.each(function(t){R.offset.setOffset(this,e,t)});if(!t||!t.ownerDocument)return null;if(t===t.ownerDocument.body)return R.offset.bodyOffset(t);for(var n,i=t.offsetParent,r=t.ownerDocument,a=r.documentElement,s=r.body,o=r.defaultView,l=o?o.getComputedStyle(t,null):t.currentStyle,u=t.offsetTop,c=t.offsetLeft;(t=t.parentNode)&&t!==s&&t!==a&&(!R.support.fixedPosition||"fixed"!==l.position);)n=o?o.getComputedStyle(t,null):t.currentStyle,u-=t.scrollTop,c-=t.scrollLeft,t===i&&(u+=t.offsetTop,c+=t.offsetLeft,!R.support.doesNotAddBorder||R.support.doesAddBorderForTableAndCells&&_t.test(t.nodeName)||(u+=parseFloat(n.borderTopWidth)||0,c+=parseFloat(n.borderLeftWidth)||0),i,i=t.offsetParent),R.support.subtractsBorderForOverflowNotVisible&&"visible"!==n.overflow&&(u+=parseFloat(n.borderTopWidth)||0,c+=parseFloat(n.borderLeftWidth)||0),l=n;return"relative"!==l.position&&"static"!==l.position||(u+=s.offsetTop,c+=s.offsetLeft),R.support.fixedPosition&&"fixed"===l.position&&(u+=Math.max(a.scrollTop,s.scrollTop),c+=Math.max(a.scrollLeft,s.scrollLeft)),{top:u,left:c}},R.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return R.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(R.css(e,"marginTop"))||0,n+=parseFloat(R.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var i=R.css(e,"position");"static"===i&&(e.style.position="relative");var r,a,s=R(e),o=s.offset(),l=R.css(e,"top"),u=R.css(e,"left"),c=("absolute"===i||"fixed"===i)&&R.inArray("auto",[l,u])>-1,h={},d={};c?(d=s.position(),r=d.top,a=d.left):(r=parseFloat(l)||0,a=parseFloat(u)||0),R.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(h.top=t.top-o.top+r),null!=t.left&&(h.left=t.left-o.left+a),"using"in t?t.using.call(e,h):s.css(h)}},R.fn.extend({position:function(){if(!this[0])return null;var e=this[0],t=this.offsetParent(),n=this.offset(),i=kt.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(R.css(e,"marginTop"))||0,n.left-=parseFloat(R.css(e,"marginLeft"))||0,i.top+=parseFloat(R.css(t[0],"borderTopWidth"))||0,i.left+=parseFloat(R.css(t[0],"borderLeftWidth"))||0,{top:n.top-i.top,left:n.left-i.left}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||A.body;e&&!kt.test(e.nodeName)&&"static"===R.css(e,"position");)e=e.offsetParent;return e})}}),R.each(["Left","Top"],function(e,n){var i="scroll"+n;R.fn[i]=function(n){var r,a;return n===t?(r=this[0])?(a=O(r),a?"pageXOffset"in a?a[e?"pageYOffset":"pageXOffset"]:R.support.boxModel&&a.document.documentElement[i]||a.document.body[i]:r[i]):null:this.each(function(){a=O(this),a?a.scrollTo(e?R(a).scrollLeft():n,e?n:R(a).scrollTop()):this[i]=n})}}),R.each(["Height","Width"],function(e,n){var i=n.toLowerCase();R.fn["inner"+n]=function(){var e=this[0];return e?e.style?parseFloat(R.css(e,i,"padding")):this[i]():null},R.fn["outer"+n]=function(e){var t=this[0];return t?t.style?parseFloat(R.css(t,i,e?"margin":"border")):this[i]():null},R.fn[i]=function(e){var r=this[0];if(!r)return null==e?null:this;if(R.isFunction(e))return this.each(function(t){var n=R(this);n[i](e.call(this,t,n[i]()))});if(R.isWindow(r)){var a=r.document.documentElement["client"+n],s=r.document.body;return"CSS1Compat"===r.document.compatMode&&a||s&&s["client"+n]||a}if(9===r.nodeType)return Math.max(r.documentElement["client"+n],r.body["scroll"+n],r.documentElement["scroll"+n],r.body["offset"+n],r.documentElement["offset"+n]);if(e===t){var o=R.css(r,i),l=parseFloat(o);return R.isNumeric(l)?l:o}return this.css(i,"string"==typeof e?e:e+"px")}}),e.jQuery=e.$=R,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return R})}(window),function(){var e,t=this,n=t.Backbone,i=[],r=i.push,a=i.slice,s=i.splice;e="undefined"!=typeof exports?exports:t.Backbone={},e.VERSION="1.0.0";var o=t._;o||void 0===require||(o=require("underscore")),e.$=t.jQuery||t.Zepto||t.ender||t.$,e.noConflict=function(){return t.Backbone=n,this},e.emulateHTTP=!1,e.emulateJSON=!1;var l=e.Events={on:function(e,t,n){return c(this,"on",e,[t,n])&&t?(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:n,ctx:n||this}),this):this},once:function(e,t,n){if(!c(this,"once",e,[t,n])||!t)return this;var i=this,r=o.once(function(){i.off(e,r),t.apply(this,arguments)});return r._callback=t,this.on(e,r,n)},off:function(e,t,n){var i,r,a,s,l,u,h,d;if(!this._events||!c(this,"off",e,[t,n]))return this;if(!e&&!t&&!n)return this._events={},this;for(s=e?[e]:o.keys(this._events),l=0,u=s.length;l<u;l++)if(e=s[l],a=this._events[e]){if(this._events[e]=i=[],t||n)for(h=0,d=a.length;h<d;h++)r=a[h],(t&&t!==r.callback&&t!==r.callback._callback||n&&n!==r.context)&&i.push(r);i.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this;var t=a.call(arguments,1);if(!c(this,"trigger",e,t))return this;var n=this._events[e],i=this._events.all;return n&&h(n,t),i&&h(i,arguments),this},stopListening:function(e,t,n){var i=this._listeners;if(!i)return this;var r=!t&&!n;"object"==typeof t&&(n=this),e&&((i={})[e._listenerId]=e);for(var a in i)i[a].off(t,n,this),r&&delete this._listeners[a];return this}},u=/\s+/,c=function(e,t,n,i){if(!n)return!0;if("object"==typeof n){for(var r in n)e[t].apply(e,[r,n[r]].concat(i));return!1}if(u.test(n)){for(var a=n.split(u),s=0,o=a.length;s<o;s++)e[t].apply(e,[a[s]].concat(i));return!1}return!0},h=function(e,t){var n,i=-1,r=e.length,a=t[0],s=t[1],o=t[2];switch(t.length){case 0:for(;++i<r;)(n=e[i]).callback.call(n.ctx);return;case 1:for(;++i<r;)(n=e[i]).callback.call(n.ctx,a);return;case 2:for(;++i<r;)(n=e[i]).callback.call(n.ctx,a,s);return;case 3:for(;++i<r;)(n=e[i]).callback.call(n.ctx,a,s,o);return;default:for(;++i<r;)(n=e[i]).callback.apply(n.ctx,t)}},d={listenTo:"on",listenToOnce:"once"};o.each(d,function(e,t){l[t]=function(t,n,i){return(this._listeners||(this._listeners={}))[t._listenerId||(t._listenerId=o.uniqueId("l"))]=t,"object"==typeof n&&(i=this),t[e](n,i,this),this}}),l.bind=l.on,l.unbind=l.off,o.extend(e,l);var f=e.Model=function(e,t){var n,i=e||{};t||(t={}),this.cid=o.uniqueId("c"),this.attributes={},o.extend(this,o.pick(t,p)),t.parse&&(i=this.parse(i,t)||{}),(n=o.result(this,"defaults"))&&(i=o.defaults({},i,n)),this.set(i,t),this.changed={},this.initialize.apply(this,arguments)},p=["url","urlRoot","collection"];o.extend(f.prototype,l,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(e){return o.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return o.escape(this.get(e))},has:function(e){return null!=this.get(e)},set:function(e,t,n){var i,r,a,s,l,u,c,h;if(null==e)return this;if("object"==typeof e?(r=e,n=t):(r={})[e]=t,n||(n={}),!this._validate(r,n))return!1;a=n.unset,l=n.silent,s=[],u=this._changing,this._changing=!0,u||(this._previousAttributes=o.clone(this.attributes),this.changed={}),h=this.attributes,c=this._previousAttributes,this.idAttribute in r&&(this.id=r[this.idAttribute]);for(i in r)t=r[i],o.isEqual(h[i],t)||s.push(i),o.isEqual(c[i],t)?delete this.changed[i]:this.changed[i]=t,a?delete h[i]:h[i]=t;if(!l){s.length&&(this._pending=!0);for(var d=0,f=s.length;d<f;d++)this.trigger("change:"+s[d],this,h[s[d]],n)}if(u)return this;if(!l)for(;this._pending;)this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,o.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var n in this.attributes)t[n]=void 0;return this.set(t,o.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!o.isEmpty(this.changed):o.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&o.clone(this.changed);var t,n=!1,i=this._changing?this._previousAttributes:this.attributes;for(var r in e)o.isEqual(i[r],t=e[r])||((n||(n={}))[r]=t);return n},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return o.clone(this._previousAttributes)},fetch:function(e){e=e?o.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,n=e.success;return e.success=function(i){if(!t.set(t.parse(i,e),e))return!1;n&&n(t,i,e),t.trigger("sync",t,i,e)},B(this,e),this.sync("read",this,e)},save:function(e,t,n){var i,r,a,s=this.attributes;if(null==e||"object"==typeof e?(i=e,n=t):(i={})[e]=t,i&&(!n||!n.wait)&&!this.set(i,n))return!1;if(n=o.extend({validate:!0},n),!this._validate(i,n))return!1;i&&n.wait&&(this.attributes=o.extend({},s,i)),void 0===n.parse&&(n.parse=!0);var l=this,u=n.success;return n.success=function(e){l.attributes=s;var t=l.parse(e,n);if(n.wait&&(t=o.extend(i||{},t)),o.isObject(t)&&!l.set(t,n))return!1;u&&u(l,e,n),l.trigger("sync",l,e,n)},B(this,n),r=this.isNew()?"create":n.patch?"patch":"update","patch"===r&&(n.attrs=i),a=this.sync(r,this,n),i&&n.wait&&(this.attributes=s),a},destroy:function(e){e=e?o.clone(e):{};var t=this,n=e.success,i=function(){t.trigger("destroy",t,t.collection,e)};if(e.success=function(r){(e.wait||t.isNew())&&i(),n&&n(t,r,e),t.isNew()||t.trigger("sync",t,r,e)},this.isNew())return e.success(),!1;B(this,e);var r=this.sync("delete",this,e);return e.wait||i(),r},url:function(){var e=o.result(this,"urlRoot")||o.result(this.collection,"url")||R();return this.isNew()?e:e+("/"===e.charAt(e.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(e){return this._validate({},o.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=o.extend({},this.attributes,e);var n=this.validationError=this.validate(e,t)||null;return!n||(this.trigger("invalid",this,n,o.extend(t||{},{validationError:n})),!1)}});var m=["keys","values","pairs","invert","pick","omit"];o.each(m,function(e){f.prototype[e]=function(){var t=a.call(arguments);return t.unshift(this.attributes),o[e].apply(o,t)}});var g=e.Collection=function(e,t){t||(t={}),t.url&&(this.url=t.url),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,o.extend({silent:!0},t))},y={add:!0,remove:!0,merge:!0},v={add:!0,merge:!1,remove:!1};o.extend(g.prototype,l,{model:f,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return e.sync.apply(this,arguments)},add:function(e,t){return this.set(e,o.defaults(t||{},v))},remove:function(e,t){e=o.isArray(e)?e.slice():[e],t||(t={});var n,i,r,a;for(n=0,i=e.length;n<i;n++)(a=this.get(e[n]))&&(delete this._byId[a.id],delete this._byId[a.cid],r=this.indexOf(a),this.models.splice(r,1),this.length--,t.silent||(t.index=r,a.trigger("remove",a,this,t)),this._removeReference(a));return this},set:function(e,t){t=o.defaults(t||{},y),t.parse&&(e=this.parse(e,t)),o.isArray(e)||(e=e?[e]:[]);var n,i,a,l,u,c=t.at,h=this.comparator&&null==c&&!1!==t.sort,d=o.isString(this.comparator)?this.comparator:null,f=[],p=[],m={};for(n=0,i=e.length;n<i;n++)(a=this._prepareModel(e[n],t))&&((l=this.get(a))?(t.remove&&(m[l.cid]=!0),t.merge&&(l.set(a.attributes,t),h&&!u&&l.hasChanged(d)&&(u=!0))):t.add&&(f.push(a),a.on("all",this._onModelEvent,this),this._byId[a.cid]=a,null!=a.id&&(this._byId[a.id]=a)));if(t.remove){for(n=0,i=this.length;n<i;++n)m[(a=this.models[n]).cid]||p.push(a);p.length&&this.remove(p,t)}if(f.length&&(h&&(u=!0),this.length+=f.length,null!=c?s.apply(this.models,[c,0].concat(f)):r.apply(this.models,f)),u&&this.sort({silent:!0}),t.silent)return this;for(n=0,i=f.length;n<i;n++)(a=f[n]).trigger("add",a,this,t);return u&&this.trigger("sort",this,t),this},reset:function(e,t){t||(t={});for(var n=0,i=this.models.length;n<i;n++)this._removeReference(this.models[n]);return t.previousModels=this.models,this._reset(),this.add(e,o.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),this},push:function(e,t){return e=this._prepareModel(e,t),this.add(e,o.extend({at:this.length},t)),e},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return e=this._prepareModel(e,t),this.add(e,o.extend({at:0},t)),e},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(e,t){return this.models.slice(e,t)},get:function(e){if(null!=e)return this._byId[null!=e.id?e.id:e.cid||e]},at:function(e){return this.models[e]},where:function(e,t){return o.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),o.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(o.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},sortedIndex:function(e,t,n){t||(t=this.comparator);var i=o.isFunction(t)?t:function(e){return e.get(t)};return o.sortedIndex(this.models,e,i,n)},pluck:function(e){return o.invoke(this.models,"get",e)},fetch:function(e){e=e?o.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=e.success,n=this;return e.success=function(i){var r=e.reset?"reset":"set";n[r](i,e),t&&t(n,i,e),n.trigger("sync",n,i,e)},B(this,e),this.sync("read",this,e)},create:function(e,t){if(t=t?o.clone(t):{},!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var n=this,i=t.success;return t.success=function(r){t.wait&&n.add(e,t),i&&i(e,r,t)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof f)return e.collection||(e.collection=this),e;t||(t={}),t.collection=this;var n=new this.model(e,t);return n._validate(e,t)?n:(this.trigger("invalid",this,e,t),!1)},_removeReference:function(e){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,i){("add"!==e&&"remove"!==e||n===this)&&("destroy"===e&&this.remove(t,i),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],null!=t.id&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments))}});var b=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];o.each(b,function(e){g.prototype[e]=function(){var t=a.call(arguments);return t.unshift(this.models),o[e].apply(o,t)}});var w=["groupBy","countBy","sortBy"];o.each(w,function(e){g.prototype[e]=function(t,n){var i=o.isFunction(t)?t:function(e){return e.get(t)};return o[e](this.models,i,n)}});var x=e.View=function(e){this.cid=o.uniqueId("view"),this._configure(e||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},_=/^(\S+)\s*(.*)$/,k=["model","collection","el","id","attributes","className","tagName","events"];o.extend(x.prototype,l,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(t,n){return this.$el&&this.undelegateEvents(),this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0],!1!==n&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=o.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var n=e[t];if(o.isFunction(n)||(n=this[e[t]]),n){var i=t.match(_),r=i[1],a=i[2];n=o.bind(n,this),r+=".delegateEvents"+this.cid,""===a?this.$el.on(r,n):this.$el.on(r,a,n)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_configure:function(e){this.options&&(e=o.extend({},o.result(this,"options"),e)),o.extend(this,o.pick(e,k)),this.options=e},_ensureElement:function(){if(this.el)this.setElement(o.result(this,"el"),!1);else{var t=o.extend({},o.result(this,"attributes"));this.id&&(t.id=o.result(this,"id")),this.className&&(t.class=o.result(this,"className"));var n=e.$("<"+o.result(this,"tagName")+">").attr(t);this.setElement(n,!1)}}}),e.sync=function(t,n,i){var r=D[t];o.defaults(i||(i={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:r,dataType:"json"};if(i.url||(a.url=o.result(n,"url")||R()),null!=i.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(a.contentType="application/json",a.data=JSON.stringify(i.attrs||n.toJSON(i))),i.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&("PUT"===r||"DELETE"===r||"PATCH"===r)){a.type="POST",i.emulateJSON&&(a.data._method=r);var s=i.beforeSend;i.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",r),s)return s.apply(this,arguments)}}"GET"===a.type||i.emulateJSON||(a.processData=!1),"PATCH"!==a.type||!window.ActiveXObject||window.external&&window.external.msActiveXFilteringEnabled||(a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var l=i.xhr=e.ajax(o.extend(a,i));return n.trigger("request",n,l,i),l};var D={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var C=e.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},T=/\((.*?)\)/g,S=/(\(\?)?:\w+/g,N=/\*\w+/g,E=/[\-{}\[\]+?.,\\\^$|#\s]/g;o.extend(C.prototype,l,{initialize:function(){},route:function(t,n,i){o.isRegExp(t)||(t=this._routeToRegExp(t)),o.isFunction(n)&&(i=n,n=""),i||(i=this[n]);var r=this;return e.history.route(t,function(a){var s=r._extractParameters(t,a);i&&i.apply(r,s),r.trigger.apply(r,["route:"+n].concat(s)),r.trigger("route",n,s),e.history.trigger("route",r,n,s)}),this},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=o.result(this,"routes");for(var e,t=o.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(E,"\\$&").replace(T,"(?:$1)?").replace(S,function(e,t){return t?e:"([^/]+)"}).replace(N,"(.*?)"),new RegExp("^"+e+"$")},_extractParameters:function(e,t){var n=e.exec(t).slice(1);return o.map(n,function(e){return e?decodeURIComponent(e):null})}});var M=e.History=function(){this.handlers=[],o.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},j=/^[#\/]|\s+$/g,O=/^\/+|\/+$/g,A=/msie [\w.]+/,L=/\/$/;M.started=!1,o.extend(M.prototype,l,{interval:50,getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(null==e)if(this._hasPushState||!this._wantsHashChange||t){e=this.location.pathname;var n=this.root.replace(L,"");e.indexOf(n)||(e=e.substr(n.length))}else e=this.getHash();return e.replace(j,"")},start:function(t){if(M.started)throw new Error("Backbone.history has already been started");M.started=!0,this.options=o.extend({},{root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var n=this.getFragment(),i=document.documentMode,r=A.exec(navigator.userAgent.toLowerCase())&&(!i||i<=7);this.root=("/"+this.root+"/").replace(O,"/"),r&&this._wantsHashChange&&(this.iframe=e.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(n)),this._hasPushState?e.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!r?e.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=n;var a=this.location,s=a.pathname.replace(/[^\/]$/,"$&/")===this.root;return this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!s?(this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0):(this._wantsPushState&&this._hasPushState&&s&&a.hash&&(this.fragment=this.getHash().replace(j,""),this.history.replaceState({},document.title,this.root+this.fragment+a.search)),this.options.silent?void 0:this.loadUrl())},stop:function(){e.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),M.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe))),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(e){var t=this.fragment=this.getFragment(e);return o.any(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0})},navigate:function(e,t){if(!M.started)return!1;if(t&&!0!==t||(t={trigger:t}),e=this.getFragment(e||""),this.fragment!==e){this.fragment=e;var n=this.root+e;if(this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}t.trigger&&this.loadUrl(e)}},_updateHash:function(e,t,n){if(n){var i=e.href.replace(/(javascript:|#).*$/,"");e.replace(i+"#"+t)}else e.hash="#"+t}}),e.history=new M;var F=function(e,t){var n,i=this;n=e&&o.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)},o.extend(n,i,t);var r=function(){this.constructor=n};return r.prototype=i.prototype,n.prototype=new r,e&&o.extend(n.prototype,e),n.__super__=i.prototype,n};f.extend=g.extend=C.extend=x.extend=M.extend=F;var R=function(){throw new Error('A "url" property or function must be specified')},B=function(e,t){var n=t.error;t.error=function(i){n&&n(e,i,t),e.trigger("error",e,i,t)}}}.call(this),define("backbone",["underscore","jquery"],function(e){return function(){return e.Backbone}}(this)),define("app/model/event_collection",["backbone"],function(e){"use strict";return e.Collection.extend({model:e.Model,initialize:function(e,t){this.bind("sync",this.synced,this),this.originalUrl="https://www.googleapis.com/calendar/v3/calendars/:id/events?singleEvents=true&maxResults=2500".split(":id").join(t.calendarId),this.url=this.originalUrl},parse:function(e){return e.items},synced:function(e,t){var n=t.nextPageToken
  ;n?(this.url=this.originalUrl+"&pageToken="+n,this.fetch({remove:!1})):this.trigger("eventsReceived",this)}})}),define("app/model/calendar_model",["backbone","app/model/event_collection"],function(e,t){"use strict";return e.Model.extend({_isSynced:!1,initialize:function(){this.eventsCollection=new t(null,{calendarId:this.id}),this.eventsCollection.bind("eventsReceived",this.eventsReceived,this)},eventsReceived:function(){this._isSynced=!0,this.trigger("eventsReceived",this)},fetchEvents:function(){this.eventsCollection.fetch()},hasCalendarData:function(){return 0!==this.eventsCollection.length},getTitle:function(){return this.get("summary")},getUrl:function(){return this.get("id")},getHours:function(e){var t,n=e.start,i=e.end,r=0;return t="amount"===e.sortBy?{}:[],this.eventsCollection.map(function(a){var s,o,l,u,c=a.get("summary")||"",h=c.toLowerCase().replace(/[^\w.]/g,"");s=new Date(a.get("start").dateTime),o=new Date(a.get("end").dateTime),s>n&&o<i&&(l=new Date(a.get("end").dateTime)-new Date(a.get("start").dateTime),u=l/1e3/60/60,r+=u,"amount"===e.sortBy?void 0===t[h]?t[h]={hours:u,label:c}:t[h].hours+=u:t.push({hours:u,label:c,date:s,end:o}))},this),t="amount"===e.sortBy?this._sortProjectDetails(t):t.sort(function(e,t){return e.date-t.date}),{total:r,projects:t}},isSynced:function(){return this._isSynced},_sortProjectDetails:function(e){var t=[];for(var n in e)t.push(e[n]);return t.sort(function(e,t){return e.hours>t.hours?-1:e.hours<t.hours?1:0}),t}})}),function(e){function t(e,t){return function(n){return o(e.call(this,n),t)}}function n(){}function i(e){a(this,e)}function r(e){var t=this._data={},n=e.years||e.year||e.y||0,i=e.months||e.month||e.M||0,r=e.weeks||e.week||e.w||0,a=e.days||e.day||e.d||0,o=e.hours||e.hour||e.h||0,l=e.minutes||e.minute||e.m||0,u=e.seconds||e.second||e.s||0,c=e.milliseconds||e.millisecond||e.ms||0;this._milliseconds=c+1e3*u+6e4*l+36e5*o,this._days=a+7*r,this._months=i+12*n,t.milliseconds=c%1e3,u+=s(c/1e3),t.seconds=u%60,l+=s(u/60),t.minutes=l%60,o+=s(l/60),t.hours=o%24,a+=s(o/24),a+=7*r,t.days=a%30,i+=s(a/30),t.months=i%12,n+=s(i/12),t.years=n}function a(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function s(e){return e<0?Math.ceil(e):Math.floor(e)}function o(e,t){for(var n=e+"";n.length<t;)n="0"+n;return n}function l(e,t,n,i){var r,a,s,o=t._milliseconds,l=t._days,u=t._months;o&&e._d.setTime(+e._d+o*n),(l||u)&&(r=e.minute(),a=e.hour()),l&&e.date(e.date()+l*n),u&&(s=e.date(),e.date(1).month(e.month()+u*n).date(Math.min(s,e.daysInMonth()))),o&&!i&&j.updateOffset(e),(l||u)&&(e.minute(r),e.hour(a))}function u(e){return"[object Array]"===Object.prototype.toString.call(e)}function c(e,t){var n,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(n=0;n<i;n++)~~e[n]!=~~t[n]&&a++;return a+r}function h(e){return e?ee[e]||e.toLowerCase().replace(/(.)s$/,"$1"):e}function d(e,t){return t.abbr=e,L[e]||(L[e]=new n),L[e].set(t),L[e]}function f(e){return e?(!L[e]&&F&&require("./lang/"+e),L[e]):j.fn._lang}function p(e){return e.match(/\[.*\]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function m(e){var t,n,i=e.match(P);for(t=0,n=i.length;t<n;t++)re[i[t]]?i[t]=re[i[t]]:i[t]=p(i[t]);return function(r){var a="";for(t=0;t<n;t++)a+=i[t]instanceof Function?i[t].call(r,e):i[t];return a}}function g(e,t){function n(t){return e.lang().longDateFormat(t)||t}for(var i=5;i--&&H.test(t);)t=t.replace(H,n);return te[t]||(te[t]=m(t)),te[t](e)}function y(e,t){switch(e){case"DDDD":return I;case"YYYY":return q;case"YYYYY":return W;case"S":case"SS":case"SSS":case"DDD":return $;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return z;case"a":case"A":return f(t._l)._meridiemParse;case"X":return X;case"Z":case"ZZ":return U;case"T":return V;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return Y;default:return new RegExp(e.replace("\\",""))}}function v(e){var t=(U.exec(e)||[])[0],n=(t+"").match(Z)||["-",0,0],i=60*n[1]+~~n[2];return"+"===n[0]?-i:i}function b(e,t,n){var i,r=n._a;switch(e){case"M":case"MM":r[1]=null==t?0:~~t-1;break;case"MMM":case"MMMM":i=f(n._l).monthsParse(t),null!=i?r[1]=i:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":null!=t&&(r[2]=~~t);break;case"YY":r[0]=~~t+(~~t>68?1900:2e3);break;case"YYYY":case"YYYYY":r[0]=~~t;break;case"a":case"A":n._isPm=f(n._l).isPM(t);break;case"H":case"HH":case"h":case"hh":r[3]=~~t;break;case"m":case"mm":r[4]=~~t;break;case"s":case"ss":r[5]=~~t;break;case"S":case"SS":case"SSS":r[6]=~~(1e3*("0."+t));break;case"X":n._d=new Date(1e3*parseFloat(t));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=v(t)}null==t&&(n._isValid=!1)}function w(e){var t,n,i=[];if(!e._d){for(t=0;t<7;t++)e._a[t]=i[t]=null==e._a[t]?2===t?1:0:e._a[t];i[3]+=~~((e._tzm||0)/60),i[4]+=~~((e._tzm||0)%60),n=new Date(0),e._useUTC?(n.setUTCFullYear(i[0],i[1],i[2]),n.setUTCHours(i[3],i[4],i[5],i[6])):(n.setFullYear(i[0],i[1],i[2]),n.setHours(i[3],i[4],i[5],i[6])),e._d=n}}function x(e){var t,n,i=e._f.match(P),r=e._i;for(e._a=[],t=0;t<i.length;t++)n=(y(i[t],e).exec(r)||[])[0],n&&(r=r.slice(r.indexOf(n)+n.length)),re[i[t]]&&b(i[t],n,e);r&&(e._il=r),e._isPm&&e._a[3]<12&&(e._a[3]+=12),!1===e._isPm&&12===e._a[3]&&(e._a[3]=0),w(e)}function _(e){var t,n,r,s,o,l=99;for(s=0;s<e._f.length;s++)t=a({},e),t._f=e._f[s],x(t),n=new i(t),o=c(t._a,n.toArray()),n._il&&(o+=n._il.length),o<l&&(l=o,r=n);a(e,r)}function k(e){var t,n=e._i,i=G.exec(n);if(i){for(e._f="YYYY-MM-DD"+(i[2]||" "),t=0;t<4;t++)if(J[t][1].exec(n)){e._f+=J[t][0];break}U.exec(n)&&(e._f+=" Z"),x(e)}else e._d=new Date(n)}function D(t){var n=t._i,i=R.exec(n);n===e?t._d=new Date:i?t._d=new Date(+i[1]):"string"==typeof n?k(t):u(n)?(t._a=n.slice(0),w(t)):t._d=n instanceof Date?new Date(+n):new Date(n)}function C(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}function T(e,t,n){var i=A(Math.abs(e)/1e3),r=A(i/60),a=A(r/60),s=A(a/24),o=A(s/365),l=i<45&&["s",i]||1===r&&["m"]||r<45&&["mm",r]||1===a&&["h"]||a<22&&["hh",a]||1===s&&["d"]||s<=25&&["dd",s]||s<=45&&["M"]||s<345&&["MM",A(s/30)]||1===o&&["y"]||["yy",o];return l[2]=t,l[3]=e>0,l[4]=n,C.apply({},l)}function S(e,t,n){var i,r=n-t,a=n-e.day();return a>r&&(a-=7),a<r-7&&(a+=7),i=j(e).add("d",a),{week:Math.ceil(i.dayOfYear()/7),year:i.year()}}function N(e){var t=e._i,n=e._f;return null===t||""===t?null:("string"==typeof t&&(e._i=t=f().preparse(t)),j.isMoment(t)?(e=a({},t),e._d=new Date(+t._d)):n?u(n)?_(e):x(e):D(e),new i(e))}function E(e,t){j.fn[e]=j.fn[e+"s"]=function(e){var n=this._isUTC?"UTC":"";return null!=e?(this._d["set"+n+t](e),j.updateOffset(this),this):this._d["get"+n+t]()}}function M(e,t){j.duration.fn["as"+e]=function(){return+this/t}}for(var j,O,A=Math.round,L={},F="undefined"!=typeof module&&module.exports,R=/^\/?Date\((\-?\d+)/i,B=/(\-)?(\d*)?\.?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,P=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,H=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,Y=/\d\d?/,$=/\d{1,3}/,I=/\d{3}/,q=/\d{1,4}/,W=/[+\-]?\d{1,6}/,z=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,U=/Z|[\+\-]\d\d:?\d\d/i,V=/T/i,X=/[\+\-]?\d+(\.\d{1,3})?/,G=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,J=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Z=/([\+\-]|\d\d)/gi,Q="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),K={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},ee={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",w:"week",M:"month",y:"year"},te={},ne="DDD w W M D d".split(" "),ie="M D H h m s w W".split(" "),re={M:function(){return this.month()+1},MMM:function(e){return this.lang().monthsShort(this,e)},MMMM:function(e){return this.lang().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.lang().weekdaysMin(this,e)},ddd:function(e){return this.lang().weekdaysShort(this,e)},dddd:function(e){return this.lang().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return o(this.year()%100,2)},YYYY:function(){return o(this.year(),4)},YYYYY:function(){return o(this.year(),5)},gg:function(){return o(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return o(this.weekYear(),5)},GG:function(){return o(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return o(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return o(~~(this.milliseconds()/10),2)},SSS:function(){return o(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+o(~~(e/60),2)+":"+o(~~e%60,2)},ZZ:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+o(~~(10*e/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}};ne.length;)O=ne.pop(),re[O+"o"]=function(e,t){return function(n){return this.lang().ordinal(e.call(this,n),t)}}(re[O],O);for(;ie.length;)O=ie.pop(),re[O+O]=t(re[O],2);for(re.DDDD=t(re.DDD,3),n.prototype={set:function(e){var t,n;for(n in e)t=e[n],"function"==typeof t?this[n]=t:this["_"+n]=t},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e){var t,n,i;for(this._monthsParse||(this._monthsParse=[]),t=0;t<12;t++)if(this._monthsParse[t]||(n=j([2e3,t]),i="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[t]=new RegExp(i.replace(".",""),"i")),this._monthsParse[t].test(e))return t},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},weekdaysParse:function(e){var t,n,i;for(this._weekdaysParse||(this._weekdaysParse=[]),t=0;t<7;t++)if(this._weekdaysParse[t]||(n=j([2e3,1]).day(t),i="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[t]=new RegExp(i.replace(".",""),"i")),this._weekdaysParse[t].test(e))return t},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},isPM:function(e){return"p"===(e+"").toLowerCase()[0]},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(e,t){var n=this._calendar[e];return"function"==typeof n?n.apply(t):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,i){var r=this._relativeTime[n];return"function"==typeof r?r(e,t,n,i):r.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return"function"==typeof n?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",preparse:function(e){return e},postformat:function(e){return e},week:function(e){return S(e,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6}},j=function(e,t,n){return N({_i:e,_f:t,_l:n,_isUTC:!1})},j.utc=function(e,t,n){return N({_useUTC:!0,_isUTC:!0,_l:n,_i:e,_f:t})},j.unix=function(e){return j(1e3*e)},j.duration=function(e,t){var n,i,a=j.isDuration(e),s="number"==typeof e,o=a?e._data:s?{}:e,l=B.exec(e);return s?t?o[t]=e:o.milliseconds=e:l&&(n="-"===l[1]?-1:1,o={y:0,d:~~l[2]*n,h:~~l[3]*n,m:~~l[4]*n,s:~~l[5]*n,ms:~~l[6]*n}),i=new r(o),a&&e.hasOwnProperty("_lang")&&(i._lang=e._lang),i},j.version="2.0.0",j.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",j.updateOffset=function(){},j.lang=function(e,t){if(!e)return j.fn._lang._abbr;t?d(e,t):L[e]||f(e),j.duration.fn._lang=j.fn._lang=f(e)},j.langData=function(e){return e&&e._lang&&e._lang._abbr&&(e=e._lang._abbr),f(e)},j.isMoment=function(e){return e instanceof i},j.isDuration=function(e){return e instanceof r},j.fn=i.prototype={clone:function(){return j(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return g(j(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return null==this._isValid&&(this._a?this._isValid=!c(this._a,(this._isUTC?j.utc(this._a):j(this._a)).toArray()):this._isValid=!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(e){var t=g(this,e||j.defaultFormat);return this.lang().postformat(t)},add:function(e,t){var n;return n="string"==typeof e?j.duration(+t,e):j.duration(e,t),l(this,n,1),this},subtract:function(e,t){var n;return n="string"==typeof e?j.duration(+t,e):j.duration(e,t),l(this,n,-1),this},diff:function(e,t,n){var i,r,a=this._isUTC?j(e).zone(this._offset||0):j(e).local(),o=6e4*(this.zone()-a.zone());return t=h(t),"year"===t||"month"===t?(i=432e5*(this.daysInMonth()+a.daysInMonth()),r=12*(this.year()-a.year())+(this.month()-a.month()),r+=(this-j(this).startOf("month")-(a-j(a).startOf("month")))/i,r-=6e4*(this.zone()-j(this).startOf("month").zone()-(a.zone()-j(a).startOf("month").zone()))/i,"year"===t&&(r/=12)):(i=this-a,r="second"===t?i/1e3:"minute"===t?i/6e4:"hour"===t?i/36e5:"day"===t?(i-o)/864e5:"week"===t?(i-o)/6048e5:i),n?r:s(r)},from:function(e,t){return j.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!t)},fromNow:function(e){return this.from(j(),e)},calendar:function(){var e=this.diff(j().startOf("day"),"days",!0),t=e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(t,this))},isLeapYear:function(){var e=this.year();return e%4==0&&e%100!=0||e%400==0},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?"string"==typeof e&&"number"!=typeof(e=this.lang().weekdaysParse(e))?this:this.add({d:e-t}):t},month:function(e){var t=this._isUTC?"UTC":"";return null!=e?"string"==typeof e&&"number"!=typeof(e=this.lang().monthsParse(e))?this:(this._d["set"+t+"Month"](e),j.updateOffset(this),this):this._d["get"+t+"Month"]()},startOf:function(e){switch(e=h(e)){case"year":this.month(0);case"month":this.date(1);case"week":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),this},endOf:function(e){return this.startOf(e).add(e,1).subtract("ms",1)},isAfter:function(e,t){return t=void 0!==t?t:"millisecond",+this.clone().startOf(t)>+j(e).startOf(t)},isBefore:function(e,t){return t=void 0!==t?t:"millisecond",+this.clone().startOf(t)<+j(e).startOf(t)},isSame:function(e,t){return t=void 0!==t?t:"millisecond",+this.clone().startOf(t)==+j(e).startOf(t)},min:function(e){return e=j.apply(null,arguments),e<this?this:e},max:function(e){return e=j.apply(null,arguments),e>this?this:e},zone:function(e){var t=this._offset||0;return null==e?this._isUTC?t:this._d.getTimezoneOffset():("string"==typeof e&&(e=v(e)),Math.abs(e)<16&&(e*=60),this._offset=e,this._isUTC=!0,t!==e&&l(this,j.duration(t-e,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},daysInMonth:function(){return j.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(e){var t=A((j(this).startOf("day")-j(this).startOf("year"))/864e5)+1;return null==e?t:this.add("d",e-t)},weekYear:function(e){var t=S(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==e?t:this.add("y",e-t)},isoWeekYear:function(e){var t=S(this,1,4).year;return null==e?t:this.add("y",e-t)},week:function(e){var t=this.lang().week(this);return null==e?t:this.add("d",7*(e-t))},isoWeek:function(e){var t=S(this,1,4).week;return null==e?t:this.add("d",7*(e-t))},weekday:function(e){var t=(this._d.getDay()+7-this.lang()._week.dow)%7;return null==e?t:this.add("d",e-t)},isoWeekday:function(e){var t=(this._d.getDay()+6)%7;return null==e?t:this.add("d",e-t)},lang:function(t){return t===e?this._lang:(this._lang=f(t),this)}},O=0;O<Q.length;O++)E(Q[O].toLowerCase().replace(/s$/,""),Q[O]);E("year","FullYear"),j.fn.days=j.fn.day,j.fn.months=j.fn.month,j.fn.weeks=j.fn.week,j.fn.isoWeeks=j.fn.isoWeek,j.fn.toJSON=j.fn.toISOString,j.duration.fn=r.prototype={weeks:function(){return s(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*~~(this._months/12)},humanize:function(e){var t=+this,n=T(t,!e,this.lang());return e&&(n=this.lang().pastFuture(t,n)),this.lang().postformat(n)},add:function(e,t){var n=j.duration(e,t);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this},subtract:function(e,t){var n=j.duration(e,t);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this},get:function(e){return e=h(e),this[e.toLowerCase()+"s"]()},as:function(e){return e=h(e),this["as"+e.charAt(0).toUpperCase()+e.slice(1)+"s"]()},lang:j.fn.lang};for(O in K)K.hasOwnProperty(O)&&(M(O,K[O]),function(e){j.duration.fn[e]=function(){return this._data[e]}}(O.toLowerCase()));M("Weeks",6048e5),j.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},j.lang("en",{ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),F&&(module.exports=j),"undefined"==typeof ender&&(this.moment=j),"function"==typeof define&&define.amd&&define("moment",[],function(){return j})}.call(this),define("app/model/range_model",["backbone","moment"],function(e,t){"use strict";return e.Model.extend({defaults:{range:null,rangeObj:{},rangeIndex:null},initialize:function(e,n){var i=n.config;this.currentDatePointer=t().startOf("day"),this.currentDatePointerEnd=t().startOf("day"),this.weekStart="sunday",this.sortBy="amount",i&&(null!==i.lastSelectedRangeIndex?(this.updateRangeByIndex(i.lastSelectedRangeIndex),5===i.lastSelectedRangeIndex&&this.updateCustomRange(i.customStart,i.customEnd),i.weekStart&&this.updateWeekStart(i.weekStart),i.sortBy&&this.updateSortBy(i.sortBy)):this.updateRangeByIndex(2))},rangeIndexMappings:["day","week","month","year","total","custom"],updateRangeByIndex:function(e){this.set({range:this.rangeIndexMappings[e]}),this.set({rangeIndex:e}),this.updateRangeObj()},updateCustomRange:function(e,n){this.currentDatePointer=t(e),this.currentDatePointerEnd=t(n),this.updateRangeObj()},updateRangeObj:function(){var e,n,i=this.get("range");"day"===i?(e=this.currentDatePointer.clone(),n=this.currentDatePointer.clone().add("days",1)):"week"===i?(e="sunday"===this.weekStart?this.currentDatePointer.clone().day(0):this.currentDatePointer.clone().subtract("days",1).day(1),n=e.clone().add("weeks",1)):"month"===i?(e=this.currentDatePointer.clone().startOf("month"),n=this.currentDatePointer.clone().startOf("month").add("month",1)):"year"===i?(e=this.currentDatePointer.clone().startOf("year"),n=e.clone().add("year",1)):"total"===i?(e=t(0),n=t("Dec 31, 2040")):"custom"===i&&(e=this.currentDatePointer.clone(),n=this.currentDatePointerEnd.clone()),this.set({rangeObj:{start:e,end:n,type:i,weekStart:this.weekStart,sortBy:this.sortBy}})},getRangeObj:function(){return this.get("rangeObj")},changeRange:function(e,n){var i=this.get("range");if(0===e)return this.currentDatePointer=t().startOf("day"),void this.updateRangeObj();"day"===i?this.currentDatePointer.add("days",e):"week"===i?this.currentDatePointer.add("weeks",e):"month"===i?this.currentDatePointer.add("months",e):"year"===i?this.currentDatePointer.add("years",e):"custom"===i&&(this.currentDatePointer=n.start,this.currentDatePointerEnd=n.end),this.updateRangeObj()},updateWeekStart:function(e){this.weekStart!==e&&(this.weekStart=e,this.currentDatePointer.add("days",1),this.updateRangeObj())},getWeekStart:function(){return this.weekStart},updateSortBy:function(e){this.sortBy!==e&&(this.sortBy=e,this.updateRangeObj())},getSortBy:function(){return this.sortBy}})}),define("app/model/calendar_collection",["backbone","app/model/calendar_model","app/model/range_model"],function(e,t,n){"use strict";return e.Collection.extend({model:t,url:"https://www.googleapis.com/calendar/v3/users/me/calendarList",selectedCalendar:null,selectedRangeObj:null,initialize:function(e,t){this.config=t.config,this.on("sync",this.onSync,this),this.selectedRange=new n(null,{config:this.config}),this.selectedRangeObj=this.selectedRange.getRangeObj(),this.selectedRange.bind("change:rangeObj",this.onRangeObjChange,this)},parse:function(e){return e.items},onSync:function(){var e=this.selectedCalendar&&this.selectedCalendar.id||-1;this.trigger("viewUpdate",e),this.trigger("connectSuccess"),this.config.lastSelectedCalendarCid&&this.setSelectedCalendarById(this.config.lastSelectedCalendarCid)},setSelectedCalendarById:function(e){var t=this.get(e);t&&(this.selectedCalendar=t,this.updateConfig(),this.updateView(),t.hasCalendarData()||(t.fetchEvents(),t.bind("eventsReceived",this.updateView,this)))},getSelectedRange:function(){return this.selectedRange.getRangeObj()},onRangeObjChange:function(){this.updateConfig(),this.updateView()},updateView:function(){this.selectedCalendar&&this.trigger("viewUpdate",this.selectedCalendar.id)},updateConfig:function(){var e=this.selectedCalendar.id,t=this.selectedRange.attributes.rangeIndex,n=this.selectedRange.getRangeObj(),i=n.weekStart,r=n.sortBy,a=null,s=null;5===t&&(a=this.selectedRange.getRangeObj().start.toJSON(),s=this.selectedRange.getRangeObj().end.toJSON()),this.config={lastSelectedRangeIndex:t,lastSelectedCalendarCid:e,weekStart:i,sortBy:r,customStart:a,customEnd:s},localStorage.setItem("config",JSON.stringify(this.config))}})}),define("app/view/intro_view",["jquery","backbone"],function(e,t){"use strict";return t.View.extend({el:e("#intro"),events:{"click a#authBtn":"connectWithGoogle"},connectWithGoogle:function(e){e.preventDefault();var t=location.origin+location.pathname+"auth.html",n="https://accounts.google.com/o/oauth2/auth?client_id=502172359025.apps.googleusercontent.com&redirect_uri="+t+"&scope=https://www.googleapis.com/auth/calendar.readonly https://www.googleapis.com/auth/calendar.events.readonly&response_type=token";window.location=n},show:function(){this.showGoogleBtn(),this.$el.show()},hide:function(){this.$el.hide()},showGoogleBtn:function(){this.$el.find("#authBtn").removeAttr("disabled"),this.$el.find("#authBtn").removeClass("btn btn-large btn-primary"),this.$el.find("#authBtn").html("<img src='/img/btn_google.png' width='191' height='46' />")}})}),define("text",["module"],function(e){"use strict";var t,n,i,r,a=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],s=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,o=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,l="undefined"!=typeof location&&location.href,u=l&&location.protocol&&location.protocol.replace(/\:/,""),c=l&&location.hostname,h=l&&(location.port||void 0),d={},f=e.config&&e.config()||{};return t={version:"2.0.7",strip:function(e){if(e){e=e.replace(s,"");var t=e.match(o);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:f.createXhr||function(){var e,t,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;t<3;t+=1){n=a[t];try{e=new ActiveXObject(n)}catch(e){}if(e){a=[n];break}}return e},parseName:function(e){var t,n,i,r=!1,a=e.indexOf("."),s=0===e.indexOf("./")||0===e.indexOf("../");return-1!==a&&(!s||a>1)?(t=e.substring(0,a),n=e.substring(a+1,e.length)):t=e,i=n||t,a=i.indexOf("!"),-1!==a&&(r="strip"===i.substring(a+1),i=i.substring(0,a),n?n=i:t=i),{moduleName:t,ext:n,strip:r}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,i,r){var a,s,o,l=t.xdRegExp.exec(e);return!l||(a=l[2],s=l[3],s=s.split(":"),o=s[1],s=s[0],!(a&&a!==n||s&&s.toLowerCase()!==i.toLowerCase()||(o||s)&&o!==r))},finishLoad:function(e,n,i,r){i=n?t.strip(i):i,f.isBuild&&(d[e]=i),r(i)},load:function(e,n,i,r){if(r.isBuild&&!r.inlineText)return void i();f.isBuild=r.isBuild;var a=t.parseName(e),s=a.moduleName+(a.ext?"."+a.ext:""),o=n.toUrl(s),d=f.useXhr||t.useXhr;!l||d(o,u,c,h)?t.get(o,function(n){t.finishLoad(e,a.strip,n,i)},function(e){i.error&&i.error(e)}):n([s],function(e){t.finishLoad(a.moduleName+"."+a.ext,a.strip,e,i)})},write:function(e,n,i,r){if(d.hasOwnProperty(n)){var a=t.jsEscape(d[n]);i.asModule(e+"!"+n,"define(function () { return '"+a+"';});\n")}},writeFile:function(e,n,i,r,a){var s=t.parseName(n),o=s.ext?"."+s.ext:"",l=s.moduleName+o,u=i.toUrl(s.moduleName+o)+".js";t.load(l,i,function(n){var i=function(e){return r(u,e)};i.asModule=function(e,t){return r.asModule(e,u,t)},t.write(e,l,i,a)},a)}},"node"===f.env||!f.env&&"undefined"!=typeof process&&process.versions&&process.versions.node?(n=require.nodeRequire("fs"),t.get=function(e,t,i){try{var r=n.readFileSync(e,"utf8");0===r.indexOf("\ufeff")&&(r=r.substring(1)),t(r)}catch(e){i(e)}}):"xhr"===f.env||!f.env&&t.createXhr()?t.get=function(e,n,i,r){var a,s=t.createXhr();if(s.open("GET",e,!0),r)for(a in r)r.hasOwnProperty(a)&&s.setRequestHeader(a.toLowerCase(),r[a]);f.onXhr&&f.onXhr(s,e),s.onreadystatechange=function(t){var r,a;4===s.readyState&&(r=s.status,r>399&&r<600?(a=new Error(e+" HTTP status: "+r),a.xhr=s,i(a)):n(s.responseText),f.onXhrComplete&&f.onXhrComplete(s,e))},s.send(null)}:"rhino"===f.env||!f.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?t.get=function(e,t){var n,i,r=new java.io.File(e),a=java.lang.System.getProperty("line.separator"),s=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(r),"utf-8")),o="";try{for(n=new java.lang.StringBuffer,i=s.readLine(),i&&i.length()&&65279===i.charAt(0)&&(i=i.substring(1)),null!==i&&n.append(i);null!==(i=s.readLine());)n.append(a),n.append(i);o=String(n.toString())}finally{s.close()}t(o)}:("xpconnect"===f.env||!f.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(i=Components.classes,r=Components.interfaces,Components.utils.import("resource://gre/modules/FileUtils.jsm"),t.get=function(e,t){var n,a,s={},o=new FileUtils.File(e);try{n=i["@mozilla.org/network/file-input-stream;1"].createInstance(r.nsIFileInputStream),n.init(o,1,0,!1),a=i["@mozilla.org/intl/converter-input-stream;1"].createInstance(r.nsIConverterInputStream),a.init(n,"utf-8",n.available(),r.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),a.readString(n.available(),s),a.close(),n.close(),t(s.value)}catch(e){throw new Error((o&&o.path||"")+": "+e)}}),t}),define("text!app/templates/calendar_select_list.html",[],function(){return'<% if(!data.cid || data.calendars.length === 0) { %>\n  <div id="spinnerContainer" style="position:relative; left:20px; top:15px;"></div>\n<% } else { %>\n  <select id="calList" style="width:100%;">\n    <% if(data.cid === -1) { %>\n      <option value="" selected="selected" id="pleaseSelect">Please select calendar</option>\n    <% } %>\n    <% for (a in data.calendars) { %>\n      <option value="<%= data.calendars[a].id %>"<% if(data.calendars[a].id === data.cid) { %>selected<% } %>><%= data.calendars[a].summary %></option>\n    <% } %>\n  </select>\n<% } %>'}),$.fn.spin=function(e){return this.each(function(){var t=$(this),n=t.data();n.spinner&&(n.spinner.stop(),delete n.spinner),!1!==e&&(n.spinner=new Spinner($.extend({color:t.css("color")},e)).spin(this))}),this},function(e,t,n){function i(e){for(var t={x:e.offsetLeft,y:e.offsetTop};e=e.offsetParent;)t.x+=e.offsetLeft,t.y+=e.offsetTop;return t}function r(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)e[r]===n&&(e[r]=i[r])}return e}function a(e,t){for(var n in t)e.style[s(e,n)||n]=t[n];return e}function s(e,t){var i,r,a=e.style;if(a[t]!==n)return t;for(t=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<h.length;r++)if(i=h[r]+t,a[i]!==n)return i}function o(e,t,n,i){var r=["opacity",t,~~(100*e),n,i].join("-"),a=.01+n/i*100,s=Math.max(1-(1-e)/t*(100-a),e),o=c.substring(0,c.indexOf("Animation")).toLowerCase(),l=o&&"-"+o+"-"||"";return d[r]||(f.insertRule("@"+l+"keyframes "+r+"{0%{opacity:"+s+"}"+a+"%{opacity:"+e+"}"+(a+.01)+"%{opacity:1}"+(a+t)%100+"%{opacity:"+e+"}100%{opacity:"+s+"}}",0),d[r]=1),r}function l(e){for(var t=1,n=arguments.length;t<n;t++)e.appendChild(arguments[t]);return e}function u(e,n){var i,r=t.createElement(e||"div");for(i in n)r[i]=n[i];return r}var c,h=["webkit","Moz","ms","O"],d={},f=function(){var e=u("style");return l(t.getElementsByTagName("head")[0],e),e.sheet||e.styleSheet}(),p=function e(t){if(!this.spin)return new e(t);this.opts=r(t||{},e.defaults,m)},m=p.defaults={lines:12,length:7,width:5,radius:10,color:"#000",speed:1,trail:100,opacity:.25,fps:20},g=p.prototype={spin:function(e){this.stop();var t,n,r=this,s=r.el=a(u(),{position:"relative"});if(e&&(e.insertBefore(s,e.firstChild||null),n=i(e),t=i(s),a(s,{left:(e.offsetWidth>>1)-t.x+n.x+"px",top:(e.offsetHeight>>1)-t.y+n.y+"px"})),s.setAttribute("aria-role","progressbar"),r.lines(s,r.opts),!c){var o=r.opts,l=0,h=o.fps,d=h/o.speed,f=(1-o.opacity)/(d*o.trail/100),p=d/o.lines;!function e(){l++;for(var t=o.lines;t;t--){var n=Math.max(1-(l+t*p)%d*f,o.opacity);r.opacity(s,o.lines-t,n,o)}r.timeout=r.el&&setTimeout(e,~~(1e3/h))}()}return r},stop:function(){var e=this.el;return e&&(clearTimeout(this.timeout),e.parentNode&&e.parentNode.removeChild(e),this.el=n),this}};g.lines=function(e,t){function n(e,n){return a(u(),{position:"absolute",width:t.length+t.width+"px",height:t.width+"px",background:e,boxShadow:n,transformOrigin:"left",transform:"rotate("+~~(360/t.lines*r)+"deg) translate("+t.radius+"px,0)",borderRadius:(t.width>>1)+"px"})}for(var i,r=0;r<t.lines;r++)i=a(u(),{position:"absolute",top:1+~(t.width/2)+"px",transform:t.hwaccel?"translate3d(0,0,0)":"",opacity:t.opacity,animation:c&&o(t.opacity,t.trail,r,t.lines)+" "+1/t.speed+"s linear infinite"}),t.shadow&&l(i,a(n("#000","0 0 4px #000"),{top:"2px"})),l(e,l(i,n(t.color,"0 0 1px rgba(0,0,0,.1)")));return e},g.opacity=function(e,t,n){t<e.childNodes.length&&(e.childNodes[t].style.opacity=n)},function(){var e,t=a(u("group"),{behavior:"url(#default#VML)"});if(!s(t,"transform")&&t.adj){
  for(e=4;e--;)f.addRule(["group","roundrect","fill","stroke"][e],"behavior:url(#default#VML)");g.lines=function(e,t){function n(e,n,r){l(c,l(a(i(),{rotation:360/t.lines*e+"deg",left:~~n}),l(a(u("roundrect",{arcsize:1}),{width:s,height:t.width,left:t.radius,top:-t.width>>1,filter:r}),u("fill",{color:t.color,opacity:t.opacity}),u("stroke",{opacity:0}))))}function i(){return a(u("group",{coordsize:o+" "+o,coordorigin:-s+" "+-s}),{width:o,height:o})}var r,s=t.length+t.width,o=2*s,c=i(),h=~(t.length+t.radius+t.width)+"px";if(t.shadow)for(r=1;r<=t.lines;r++)n(r,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(r=1;r<=t.lines;r++)n(r);return l(a(e,{margin:h+" 0 0 "+h,zoom:1}),c)},g.opacity=function(e,t,n,i){var r=e.firstChild;i=i.shadow&&i.lines||0,r&&t+i<r.childNodes.length&&(r=r.childNodes[t+i],r=r&&r.firstChild,(r=r&&r.firstChild)&&(r.opacity=n))}}else c=s(t,"animation")}(),e.Spinner=p}(window,document),define("spin",["jquery"],function(){}),define("app/view/calendar_select_list_view",["backbone","underscore","text!app/templates/calendar_select_list.html","spin"],function(e,t,n){"use strict";var i={lines:12,length:1,width:4,radius:10,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1};return e.View.extend({id:"calendars",template:t.template(n),events:{"change select":"calendarChanged"},initialize:function(){this.model.bind("viewUpdate",this.updateView,this)},render:function(){return this.updateView(),this.$el.find("#spinnerContainer").spin(i),this.$el},updateView:function(e){var t={data:{cid:e,calendars:this.model.toJSON()}};this.$el.html(this.template(t))},calendarChanged:function(e){e.preventDefault(),e.stopPropagation(),this.model.setSelectedCalendarById(e.target.value)}})}),define("text!app/templates/range_select_list.html",[],function(){return'<select id="rangeList" style="width:100%">\n  <option value="day"<% if(range === "day") { %>selected<% } %>>Day</option>\n  <option value="week"<% if(range === "week") { %>selected<% } %>>Week</option>\n  <option value="month"<% if(range === "month") { %>selected<% } %>>Month</option>\n  <option value="year"<% if(range === "year") { %>selected<% } %>>Year</option>\n  <option value="total"<% if(range === "total") { %>selected<% } %>>Total</option>\n  <option value="custom"<% if(range === "custom") { %>selected<% } %>>Custom</option>\n</select>'}),define("app/view/range_select_list_view",["backbone","underscore","text!app/templates/range_select_list.html"],function(e,t,n){"use strict";return e.View.extend({template:t.template(n),events:{"change select#rangeList":"rangeSelected"},initialize:function(){this.model.bind("change:range",this.update,this)},render:function(){return this.update(),this.$el},update:function(){this.$el.html(this.template({range:this.model.get("range")}))},rangeSelected:function(e){this.model.updateRangeByIndex(e.target.selectedIndex)},show:function(){this.$el.show()}})}),define("text!app/templates/range_change_btn.html",[],function(){return'<% if(!hide) { %>\n  <a href="#" data-change="-1" class="btn rangeside">PREV</a>\n  <a href="#" data-change="0" class="btn rangecenter">RESET <%= to %></a>\n  <a href="#" data-change="1" class="btn rangeside">NEXT</a>\n<% } %>'}),define("app/view/range_change_btns_view",["backbone","underscore","text!app/templates/range_change_btn.html"],function(e,t,n){"use strict";var i={day:"to today",week:"to this week",month:"to this month",year:"to this year"};return e.View.extend({className:"range-change-btns btn-group",template:t.template(n),events:{"click a":"changeRange"},initialize:function(){this.model.bind("change:range",this.update,this)},render:function(){return this.update(),this.$el},update:function(){var e=this.model.get("range");this.$el.html(this.template({hide:"custom"===e||"total"==e,to:i[e]||""}))},changeRange:function(e){var t=parseInt(this.$(e.target).data("change"),10);e.preventDefault(),this.model.changeRange(t)}})}),function(e){var t=function(t,n,i){var r,a="object"==typeof n;this.startDate=moment().startOf("day"),this.endDate=moment().endOf("day"),this.minDate=!1,this.maxDate=!1,this.changed=!1,this.cleared=!1,this.showDropdowns=!1,this.dropdownAdjusts=!1,this.ranges={},this.dateLimit=!1,this.opens="right",this.cb=function(){},this.format="MM/DD/YYYY",this.separator=" - ",this.showWeekNumbers=!1,this.buttonClasses=["btn"],this.applyClass="btn btn-small btn-success",this.clearClass="btn btn-small",this.locale={applyLabel:"Apply",clearLabel:"Clear",fromLabel:"From",toLabel:"To",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:moment()._lang._weekdaysMin,monthNames:moment()._lang._monthsShort,firstDay:0},r=this.locale,this.leftCalendar={month:moment([this.startDate.year(),this.startDate.month(),1]),calendar:[]},this.rightCalendar={month:moment([this.endDate.year(),this.endDate.month(),1]),calendar:[]},this.element=e(t),this.element.hasClass("pull-right")&&(this.opens="left"),this.element.is("input")?this.element.on({click:e.proxy(this.show,this),focus:e.proxy(this.show,this)}):this.element.on("click",e.proxy(this.show,this)),a&&("object"==typeof n.locale&&e.each(r,function(e,t){r[e]=n.locale[e]||t}),n.applyClass&&(this.applyClass=n.applyClass),n.clearClass&&(this.clearClass=n.clearClass));var s='<div class="daterangepicker dropdown-menu"><div class="calendar left"></div><div class="calendar right"></div><div class="ranges"><div class="range_inputs"><div class="daterangepicker_start_input" style="float: left"><label for="daterangepicker_start">'+this.locale.fromLabel+'</label><input class="input-mini" type="text" name="daterangepicker_start" value="" disabled="disabled" /></div><div class="daterangepicker_end_input" style="float: left; padding-left: 11px"><label for="daterangepicker_end">'+this.locale.toLabel+'</label><input class="input-mini" type="text" name="daterangepicker_end" value="" disabled="disabled" /></div><button class="'+this.applyClass+' applyBtn" disabled="disabled">'+this.locale.applyLabel+'</button>&nbsp;<button class="'+this.clearClass+' clearBtn">'+this.locale.clearLabel+"</button></div></div></div>";if(this.container=e(s).appendTo("body"),a){if("string"==typeof n.format&&(this.format=n.format),"string"==typeof n.separator&&(this.separator=n.separator),"string"==typeof n.startDate&&(this.startDate=moment(n.startDate,this.format).startOf("day")),"string"==typeof n.endDate&&(this.endDate=moment(n.endDate,this.format).endOf("day")),"string"==typeof n.minDate&&(this.minDate=moment(n.minDate,this.format).startOf("day")),"string"==typeof n.maxDate&&(this.maxDate=moment(n.maxDate,this.format).endOf("day")),"object"==typeof n.startDate&&(n.startDate instanceof Date?this.startDate=moment(n.startDate).startOf("day"):this.startDate=n.startDate.startOf("day")),"object"==typeof n.endDate&&(n.endDate instanceof Date?this.endDate=moment(n.endDate).endOf("day"):this.endDate=n.endDate.endOf("day")),"object"==typeof n.minDate&&(n.minDate instanceof Date?this.minDate=moment(n.minDate).startOf("day"):this.minDate=n.minDate.startOf("day")),"object"==typeof n.maxDate&&(n.maxDate instanceof Date?this.maxDate=moment(n.maxDate).endOf("day"):this.maxDate=n.maxDate.endOf("day")),"object"==typeof n.ranges){for(var o in n.ranges){var l=moment(n.ranges[o][0]).startOf("day"),u=moment(n.ranges[o][1]).endOf("day");this.minDate&&l.isBefore(this.minDate)&&(l=moment(this.minDate)),this.maxDate&&u.isAfter(this.maxDate)&&(u=moment(this.maxDate)),this.minDate&&u.isBefore(this.minDate)||this.maxDate&&l.isAfter(this.maxDate)||(this.ranges[o]=[l,u])}var c="<ul>";for(var o in this.ranges)c+="<li>"+o+"</li>";c+="<li>"+this.locale.customRangeLabel+"</li>",c+="</ul>",this.container.find(".ranges").prepend(c)}if("object"==typeof n.dateLimit&&(this.dateLimit=n.dateLimit),"object"==typeof n.locale&&"number"==typeof n.locale.firstDay){this.locale.firstDay=n.locale.firstDay;for(var h=n.locale.firstDay;h>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),h--}"string"==typeof n.opens&&(this.opens=n.opens),"boolean"==typeof n.showWeekNumbers&&(this.showWeekNumbers=n.showWeekNumbers),"string"==typeof n.buttonClasses&&(this.buttonClasses=[n.buttonClasses]),"object"==typeof n.buttonClasses&&(this.buttonClasses=n.buttonClasses),"boolean"==typeof n.showDropdowns&&(this.showDropdowns=n.showDropdowns),"boolean"==typeof n.dropdownAdjusts&&(this.dropdownAdjusts=n.dropdownAdjusts)}var d=this.container;if(e.each(this.buttonClasses,function(e,t){d.find("button").addClass(t)}),"right"==this.opens){var f=this.container.find(".calendar.left"),p=this.container.find(".calendar.right");f.removeClass("left").addClass("right"),p.removeClass("right").addClass("left")}if(void 0!==n&&void 0!==n.ranges||(this.container.find(".calendar").show(),this.move()),"function"==typeof i&&(this.cb=i),this.container.addClass("opens"+this.opens),(!a||void 0===n.startDate&&void 0===n.endDate)&&e(this.element).is("input[type=text]")){var m=e(this.element).val(),g=m.split(this.separator);2==g.length&&(this.startDate=moment(g[0],this.format).startOf("day"),this.endDate=moment(g[1],this.format).endOf("day"))}this.container.on("mousedown",e.proxy(this.mousedown,this)),this.container.find(".calendar").on("click",".prev",e.proxy(this.clickPrev,this)),this.container.find(".calendar").on("click",".next",e.proxy(this.clickNext,this)),this.container.find(".ranges").on("click","button.applyBtn",e.proxy(this.clickApply,this)),this.container.find(".ranges").on("click","button.clearBtn",e.proxy(this.clickClear,this)),this.container.find(".calendar").on("click","td.available",e.proxy(this.clickDate,this)),this.container.find(".calendar").on("mouseenter","td.available",e.proxy(this.enterDate,this)),this.container.find(".calendar").on("mouseleave","td.available",e.proxy(this.updateView,this)),this.container.find(".ranges").on("click","li",e.proxy(this.clickRange,this)),this.container.find(".ranges").on("mouseenter","li",e.proxy(this.enterRange,this)),this.container.find(".ranges").on("mouseleave","li",e.proxy(this.updateView,this)),this.container.find(".calendar").on("change","select.yearselect",e.proxy(this.updateYear,this)),this.container.find(".calendar").on("change","select.monthselect",e.proxy(this.updateMonth,this)),this.element.on("keyup",e.proxy(this.updateFromControl,this)),this.updateView(),this.updateCalendars()};t.prototype={constructor:t,mousedown:function(t){t.stopPropagation(),this.showDropdowns&&!e(t.target).not("select").length||t.preventDefault()},updateView:function(){this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()),this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()),this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.format)),this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.format)),this.startDate.isSame(this.endDate)||this.startDate.isBefore(this.endDate)?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled")},updateFromControl:function(){if(this.element.is("input")&&this.element.val().length){var e=this.element.val().split(this.separator),t=moment(e[0],this.format).startOf("day"),n=moment(e[1],this.format).endOf("day");null!=t&&null!=n&&(n.isBefore(t)||(this.startDate=t,this.endDate=n,this.updateView(),this.cb(this.startDate,this.endDate),this.updateCalendars()))}},notify:function(){this.cleared||this.updateView(),this.element.is("input")&&this.element.val(this.cleared?"":this.startDate.format(this.format)+this.separator+this.endDate.format(this.format));var e=this.cleared?null:this.startDate,t=this.cleared?null:this.endDate;this.cleared=!1,this.cb(e,t)},move:function(){var t=e(this.container).find(".ranges").outerWidth();if(e(this.container).find(".calendar").is(":visible")){t+=2*e(this.container).find(".calendar").outerWidth()+24}"left"==this.opens?(this.container.css({top:this.element.offset().top+this.element.outerHeight(),right:e(window).width()-this.element.offset().left-this.element.outerWidth(),left:"auto","min-width":t}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:this.element.offset().top+this.element.outerHeight(),left:this.element.offset().left,right:"auto","min-width":t}),this.container.offset().left+this.container.outerWidth()>e(window).width()&&this.container.css({left:"auto",right:0}))},show:function(t){this.container.show(),this.move(),t&&(t.stopPropagation(),t.preventDefault()),this.changed=!1,this.element.trigger("shown",{target:t.target,picker:this}),e(document).on("mousedown",e.proxy(this.hide,this))},hide:function(t){this.container.hide(),e(document).off("mousedown",this.hide),this.changed&&(this.changed=!1,this.notify())},enterRange:function(e){var t=e.target.innerHTML;if(t==this.locale.customRangeLabel)this.updateView();else{var n=this.ranges[t];this.container.find("input[name=daterangepicker_start]").val(n[0].format(this.format)),this.container.find("input[name=daterangepicker_end]").val(n[1].format(this.format))}},clickRange:function(e){var t=e.target.innerHTML;if(t==this.locale.customRangeLabel)this.container.find(".calendar").show(),this.move();else{var n=this.ranges[t];this.startDate=n[0],this.endDate=n[1],this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()),this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()),this.updateCalendars(),this.changed=!0,this.container.find(".calendar").hide(),this.move(),this.hide()}},clickPrev:function(t){e(t.target).parents(".calendar").hasClass("left")?this.leftCalendar.month.subtract("month",1):this.rightCalendar.month.subtract("month",1),this.updateCalendars()},clickNext:function(t){e(t.target).parents(".calendar").hasClass("left")?this.leftCalendar.month.add("month",1):this.rightCalendar.month.add("month",1),this.updateCalendars()},enterDate:function(t){var n=e(t.target).attr("data-title"),i=n.substr(1,1),r=n.substr(3,1);e(t.target).parents(".calendar").hasClass("left")?this.container.find("input[name=daterangepicker_start]").val(this.leftCalendar.calendar[i][r].format(this.format)):this.container.find("input[name=daterangepicker_end]").val(this.rightCalendar.calendar[i][r].format(this.format))},clickDate:function(t){var n=e(t.target).attr("data-title"),i=n.substr(1,1),r=n.substr(3,1),a=e(t.target).parents(".calendar");if(a.hasClass("left")){var s=this.leftCalendar.calendar[i][r],o=this.endDate;if("object"==typeof this.dateLimit){var l=moment(s).add(this.dateLimit).endOf("day");o.isAfter(l)&&(o=l)}this.element.trigger("clicked",{dir:"left",picker:this})}else{var s=this.startDate,o=this.rightCalendar.calendar[i][r];if("object"==typeof this.dateLimit){var u=moment(o).subtract(this.dateLimit).startOf("day");s.isBefore(u)&&(s=u)}this.element.trigger("clicked",{dir:"right",picker:this})}a.find("td").removeClass("active"),s.isSame(o)||s.isBefore(o)?(e(t.target).addClass("active"),s.isSame(this.startDate)&&o.isSame(this.endDate)||(this.changed=!0),this.startDate=s,this.endDate=o):s.isAfter(o)&&(e(t.target).addClass("active"),this.changed=!0,this.startDate=s,this.endDate=moment(s).add("day",1).endOf("day")),this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()),this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()),this.updateCalendars()},clickApply:function(e){this.hide()},clickClear:function(e){this.changed=!0,this.cleared=!0,this.hide()},updateYear:function(t){var n=parseInt(e(t.target).val());e(t.target).closest(".calendar").hasClass("left")?this.leftCalendar.month.month(this.startDate.month()).year(n):this.rightCalendar.month.month(this.endDate.month()).year(n),this.updateCalendars()},updateMonth:function(t){var n=parseInt(e(t.target).val());e(t.target).closest(".calendar").hasClass("left")?this.leftCalendar.month.month(n).year(this.startDate.year()):this.rightCalendar.month.month(n).year(this.endDate.year()),this.updateCalendars()},updateCalendars:function(){this.leftCalendar.calendar=this.buildCalendar(this.leftCalendar.month.month(),this.leftCalendar.month.year(),"left"),this.rightCalendar.calendar=this.buildCalendar(this.rightCalendar.month.month(),this.rightCalendar.month.year(),"right"),this.container.find(".calendar.left").html(this.renderCalendar(this.leftCalendar.calendar,this.startDate,this.minDate,this.maxDate)),this.container.find(".calendar.right").html(this.renderCalendar(this.rightCalendar.calendar,this.endDate,this.startDate,this.maxDate)),this.container.find(".ranges li").removeClass("active");var e=!0,t=0;for(var n in this.ranges)this.startDate.isSame(this.ranges[n][0])&&this.endDate.isSame(this.ranges[n][1])&&(e=!1,this.container.find(".ranges li:eq("+t+")").addClass("active")),t++;e&&this.container.find(".ranges li:last").addClass("active"),this.element.trigger("updated",this)},buildCalendar:function(e,t,n){for(var i=moment([t,e,1]),r=moment(i).subtract("month",1).month(),a=moment(i).subtract("month",1).year(),s=moment([a,r]).daysInMonth(),o=i.day(),l=[],u=0;u<6;u++)l[u]=[];var c=s-o+this.locale.firstDay+1;c>s&&(c-=7),o==this.locale.firstDay&&(c=s-6);var h;h="right"==n?moment([a,r,c]).endOf("day"):moment([a,r,c]).startOf("day");for(var u=0,d=0,f=0;u<42;u++,d++,h=moment(h).add("day",1))u>0&&d%7==0&&(d=0,f++),l[f][d]=h;return l},renderDropdowns:function(e,t,n){for(var i=e.month(),r='<select class="monthselect">',a=0;a<12;a++)r+="<option value='"+a+"'"+(a===i?" selected='selected'":"")+">"+this.locale.monthNames[a]+"</option>";r+="</select>";for(var s=e.year(),o=n&&n.year()||s+5,l=t&&t.year()||s-50,u='<select class="yearselect">',c=l;c<=o;c++)u+='<option value="'+c+'"'+(c===s?' selected="selected"':"")+">"+c+"</option>";return u+="</select>",r+u},renderCalendar:function(t,n,i,r){var a='<table class="table-condensed">';a+="<thead>",a+="<tr>",this.showWeekNumbers&&(a+="<th></th>"),!i||i.isBefore(t[1][1])?a+='<th class="prev available"><i class="icon-arrow-left"></i></th>':a+="<th></th>";var s=this.locale.monthNames[t[1][1].month()]+t[1][1].format(" YYYY");this.showDropdowns&&(s=this.renderDropdowns(t[1][1],i,r)),a+='<th colspan="5" style="width: auto">'+s+"</th>",!r||r.isAfter(t[1][1])?a+='<th class="next available"><i class="icon-arrow-right"></i></th>':a+="<th></th>",a+="</tr>",a+="<tr>",this.showWeekNumbers&&(a+='<th class="week">'+this.locale.weekLabel+"</th>"),e.each(this.locale.daysOfWeek,function(e,t){a+="<th>"+t+"</th>"}),a+="</tr>",a+="</thead>",a+="<tbody>";for(var o=0;o<6;o++){a+="<tr>",this.showWeekNumbers&&(a+='<td class="week">'+t[o][0].week()+"</td>");for(var l=0;l<7;l++){var u="available ";u+=t[o][l].month()==t[1][1].month()?"":"off",i&&t[o][l].isBefore(i)||r&&t[o][l].isAfter(r)?u=" off disabled ":t[o][l].isSame(n)?(u+=" active ",t[o][l].isSame(this.startDate)&&(u+=" start-date "),t[o][l].isSame(this.endDate)&&(u+=" end-date ")):t[o][l]>=this.startDate&&t[o][l]<=this.endDate&&(u+=" in-range ",t[o][l].isSame(this.startDate)&&(u+=" start-date "),t[o][l].isSame(this.endDate)&&(u+=" end-date "));var c="r"+o+"c"+l;a+='<td class="'+u.replace(/\s+/g," ").replace(/^\s?(.*?)\s?$/,"$1")+'" data-title="'+c+'">'+t[o][l].date()+"</td>"}a+="</tr>"}return a+="</tbody>",a+="</table>"}},e.fn.daterangepicker=function(n,i){return this.each(function(){var r=e(this);r.data("daterangepicker")||r.data("daterangepicker",new t(r,n,i))}),this}}(window.jQuery),define("daterangepicker",["jquery"],function(){}),define("app/view/date_picker_view",["jquery","backbone","underscore","moment","daterangepicker"],function(e,t,n,i){"use strict";return t.View.extend({config:null,className:"input-prepend",initialize:function(e,t){this.config=t&&t.config,this.$el.hide(),"custom"===this.model.get("range")&&this.$el.show(),this.model.bind("change:range",this.update,this)},render:function(){var t=this,n=e("<input type='text'>");return this.config.customStart&&this.config.customEnd&&n.val(i(this.config.customStart).format("DD.MM.YYYY")+" - "+i(this.config.customEnd).format("DD.MM.YYYY")),n.css("width","250px"),this.$el.append("<span class='add-on'><i class='icon-calendar'></i></span>"),this.$el.append(n),this.$el.find("input").daterangepicker({format:"DD.MM.YYYY"},function(e,n){t.model.changeRange(null,{start:e,end:n})}),this.$el},update:function(e){if("custom"===e.get("range")){this.$el.show();var t=this.$el.find("input");""===t.val()&&t.focus()}else this.$el.hide()}})}),define("text!app/templates/output.html",[],function(){return'<div class="hours"><%= hours %>h</div>\n<div class="hoursrange"><%= range %></div>\n<% if (projects.length > 0) { %>\n<div class="accordion" id="details">\n  <div class="accordion-group">\n    <div class="accordion-heading">\n      <a class="accordion-toggle" data-toggle="collapse" data-parent="#details" href="#showDetails">\n        show/hide details\n      </a>\n    </div>\n    <div id="showDetails" class="accordion-body collapse">\n      <div class="accordion-inner">\n        <ul class="unstyled">\n        <% for (var i=0, l=projects.length;i<l;i++) { %>\n          <li class="eventsItem">\n            <% if (sortBy === "date") { %><span class="date"><%= outputDate(projects[i].date)  %></span><% } %>\n            <span class="label"><%= projects[i].label %></span> <%= projects[i].hours.toFixed(2) %>h\n          </li>\n        <% } %>\n        </ul>\n        <% if (sortBy === "date") { %><a class="btn btn-mini" href="<%= downloadLink %>" download="<%= filename %>">Export as CSV</a><% } %>\n      </div>\n    </div>\n  </div>\n</div>\n<% } %>\n'}),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){return this.$element.hasClass("width")?"width":"height"},show:function(){var t,n,i,r;if(!this.transitioning){if(t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),(i=this.$parent&&this.$parent.find("> .accordion-group > .in"))&&i.length){if((r=i.data("collapse"))&&r.transitioning)return;i.collapse("hide"),r||i.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])}},hide:function(){var t;this.transitioning||(t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0))},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[null!==e?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,i){var r=this,a=function(){"show"==n.type&&r.reset(),r.transitioning=0,r.$element.trigger(i)};this.$element.trigger(n),n.isDefaultPrevented()||(this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,a):a())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var i=e(this),r=i.data("collapse"),a="object"==typeof n&&n;r||i.data("collapse",r=new t(this,a)),"string"==typeof n&&r[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n,i=e(this),r=i.attr("data-target")||t.preventDefault()||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),a=e(r).data("collapse")?"toggle":i.data();i[e(r).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(r).collapse(a)})})}(window.jQuery),define("bootstrap-collapse",["jquery"],function(){}),function(e){e(function(){"use strict";e.support.transition=function(){var e=function(){var e,t=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(e in n)if(void 0!==t.style[e])return n[e]}();return e&&{end:e}}()})}(window.jQuery),define("bootstrap-transition",["jquery"],function(){}),define("app/view/output_view",["jquery","backbone","underscore","text!app/templates/output.html","moment","bootstrap-collapse","bootstrap-transition"],function(e,t,n,i,r){"use strict";var a={lines:12,length:1,width:4,radius:10,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1};return t.View.extend({template:n.template(i),detailsShown:!1,initialize:function(){this.model.bind("viewUpdate",this.updateView,this)},render:function(){return this.updateView(),this.$el},updateView:function(){var t=this.model.selectedCalendar;if(t){if(!t.isSynced()){var n=e("<div id='spinnerContainer' style='position:relative; left:150px; top:40px;'></div>");n.spin(a);return void this.$el.html(n)}var i,s=this.model.selectedRange.getRangeObj(),o=t.getHours(s),l=Math.round(100*o.total)/100,u="",c="",h="";if("date"===s.sortBy){c="Start,End,Title,Hours\n";for(var d=0;d<o.projects.length;d++)c+=r(o.projects[d].date).format("DD.MM.YYYY HH:mm")+",",c+=r(o.projects[d].end).format("DD.MM.YYYY HH:mm")+",",c+='"'+o.projects[d].label+'",',c+=o.projects[d].hours,c+="\n";c=this._getBlobUrl(c),h=t.get("summary").replace('"',"")+"_"+s.start.format("MMMM_YYYY")+"_("+r().format("YYYYMMDDHHmmss")+").csv"}"day"===s.type?u=s.start.format("dddd, MMMM D, YYYY"):"week"===s.type?u=s.start.format("DD.MM.YYYY")+" - "+s.end.format("DD.MM.YYYY"):"month"===s.type?u=s.start.format("MMMM, YYYY"):"year"===s.type&&(u=s.start.format("YYYY")),this.$el.html(this.template({hours:l,projects:o.projects,range:u,sortBy:s.sortBy,outputDate:this.outputDate,downloadLink:c,filename:h})),i=this.$("#showDetails"),i.on("show",e.proxy(this.onDetailsShown,this)),i.on("hide",e.proxy(this.onDetailsHidden,this)),this.detailsShown&&i.collapse("show")}},show:function(){this.$el.show()},outputDate:function(e){return r(e).format("DD.MM.")},onDetailsShown:function(){this.detailsShown=!0},onDetailsHidden:function(){this.detailsShown=!1},_getBlobUrl:function(e){var t=new Blob(["\ufeff"+e],{type:"text/csv;charset=UTF-8"});return window.URL.createObjectURL(t)}})}),define("text!app/templates/options.html",[],function(){return'<div id="startOfTheWeek">\nWeek starts on:\n  <label class="radio inline">\n    <input type="radio" name="optionsRadios" id="optionsRadios1" value="sunday" <% if (checked1 === "sunday") { %> checked="checked" <% }; %> >Sunday\n  </label>\n  <label class="radio inline">\n    <input type="radio" name="optionsRadios" id="optionsRadios2" value="monday" <% if (checked1 === "monday") { %> checked="checked" <% }; %> >Monday\n  </label>\n</div>\n<div id="sortBy">\nSort by:\n  <label class="radio inline">\n    <input type="radio" name="optionsRadiosSortBy" id="optionsRadiosSortBy1" value="amount" <% if (checked2 === "amount") { %> checked="checked" <% }; %> >Amount\n  </label>\n  <label class="radio inline">\n    <input type="radio" name="optionsRadiosSortBy" id="optionsRadiosSortBy2" value="date" <% if (checked2 === "date") { %> checked="checked" <% }; %> >Date\n  </label>\n</div>'}),define("app/view/options_view",["backbone","underscore","text!app/templates/options.html"],function(e,t,n){"use strict";return e.View.extend({template:t.template(n),events:{"change #optionsRadios1":"changeRadioStartOfTheWeek","change #optionsRadios2":"changeRadioStartOfTheWeek","change #optionsRadiosSortBy1":"changeRadioSortBy","change #optionsRadiosSortBy2":"changeRadioSortBy"},initialize:function(){this.model.bind("change:range",this.update,this)},render:function(){return this.$el.html(this.template({checked1:this.model.getWeekStart(),checked2:this.model.getSortBy()})),"week"!==this.model.get("range")&&this.$el.find("#startOfTheWeek").hide(),this.$el},changeRadioStartOfTheWeek:function(e){this.model.updateWeekStart(e.currentTarget.value)},changeRadioSortBy:function(e){this.model.updateSortBy(e.currentTarget.value)},update:function(e,t){var n=this.$el.find("#startOfTheWeek");"week"===t?n.show():n.hide()}})}),define("app/view/app_view",["backbone","underscore","app/view/calendar_select_list_view","app/view/range_select_list_view","app/view/range_change_btns_view","app/view/date_picker_view","app/view/output_view","app/view/options_view"],function(e,t,n,i,r,a,s,o){"use strict";return e.View.extend({id:"app",initialize:function(e,t){var i=new n({model:this.model});this.$el.append(i.render()),this.config=t&&t.config||{},this.model.bind("eventsReceived",this.updateView,this)},updateView:function(){var e=this.model.selectedRange;this.model.off("eventsReceived",this.updateView,this),this.rangeSelectList=new i({model:e}),this.$el.append(this.rangeSelectList.render()),this.rangeChangeBtns=new r({model:e}),this.$el.append(this.rangeChangeBtns.render()),this.datePicker=new a({model:e},{config:this.config}),this.$el.append(this.datePicker.render()),this.output=new s({model:this.model}),this.$el.append(this.output.render());var t=new o({model:e});this.$el.append(t.render())},render:function(){return this.$el},show:function(){this.$el.show()},hide:function(){this.$el.hide()}})}),define("app/view/main_view",["jquery","backbone","app/view/intro_view","app/view/app_view"],function(e,t,n,i){"use strict";return t.View.extend({el:e("body"),initialize:function(t,r){this.model.bind("connectSuccess",this.connectSuccess,this),this.introView=new n;var a=JSON.parse(sessionStorage.getItem("auth")),s=this;a?(this.appView=new i({model:this.model},{config:r.config}),this.$el.find("#container").append(this.appView.render()),this.introView.hide(),e.ajaxSetup({beforeSend:function(e,t){-1!==t.url.indexOf("?")?t.url+="&access_token="+a.accessToken:t.url+="?access_token="+a.accessToken}}),e(document).ajaxError(function(e,t,n){401===t.status||403===t.status?(sessionStorage.removeItem("auth"),s.introView.show(),s.appView.hide()):0!==t.status&&alert("Error - "+t.status+"\n\n"+n.url)}),this.model.fetch()):this.introView.showGoogleBtn()},connectSuccess:function(){this.introView.hide(),this.appView.show()}})}),require.config({paths:{jquery:"vendor/jquery-1.7.1",underscore:"vendor/underscore-1.4.4",backbone:"vendor/backbone-1.0.0",text:"vendor/text-2.0.7",moment:"vendor/moment-2.0.0",spin:"vendor/spin.min",daterangepicker:"vendor/daterangepicker","bootstrap-collapse":"vendor/plugins/bootstrap-collapse","bootstrap-transition":"vendor/plugins/bootstrap-transition"},shim:{underscore:{exports:"_"},backbone:{deps:["underscore","jquery"],exports:"Backbone"},spin:["jquery"],daterangepicker:["jquery"],"bootstrap-collapse":["jquery"],"bootstrap-transition":["jquery"]}}),require(["app/model/calendar_collection","app/view/main_view"],function(e,t){var n={lastSelectedCalendarIndex:null,lastSelectedRangeIndex:null},i=localStorage.getItem("config");i&&(n=JSON.parse(i));var r=new e(null,{config:n});new t({model:r},{config:n})}),define("config",function(){}),require(["config"]);