/*!
 * jQuery JavaScript Library v1.7.2
 * 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: Wed Mar 21 12:46:34 2012 -0700
 */
!function(e,t){
// Convert String-formatted flags into Object-formatted ones and store in cache
function n(e){var t,n,r=O[e]={};for(e=e.split(/\s+/),t=0,n=e.length;t<n;t++)r[e[t]]=!0;return r}function r(e,n,r){
// If nothing was found internally, try to fetch any
// data from the HTML5 data-* attribute
if(r===t&&1===e.nodeType){var i="data-"+n.replace(q,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r||"false"!==r&&("null"===r?null:H.isNumeric(r)?+r:P.test(r)?H.parseJSON(r):r)}catch(o){}
// Make sure we set the data so it isn't changed later
H.data(e,n,r)}else r=t}return r}
// checks a cache object for emptiness
function i(e){for(var t in e)
// if the public data object is empty, the private is still empty
if(("data"!==t||!H.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function o(e,t,n){var r=t+"defer",i=t+"queue",o=t+"mark",a=H._data(e,r);!a||"queue"!==n&&H._data(e,i)||"mark"!==n&&H._data(e,o)||
// Give room for hard-coded callbacks to fire first
// and eventually mark/queue something else on the element
setTimeout(function(){H._data(e,i)||H._data(e,o)||(H.removeData(e,r,!0),a.fire())},0)}function a(){return!1}function s(){return!0}
// A painfully simple check to see if an element is disconnected
// from a document (should be improved, where feasible).
function l(e){return!e||!e.parentNode||11===e.parentNode.nodeType}
// Implement the identical functionality for filter and not
function u(e,t,n){if(
// Can't pass null or undefined to indexOf in Firefox 4
// Set to 0 to skip string check
t=t||0,H.isFunction(t))return H.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return H.grep(e,function(e,r){return e===t===n});if("string"==typeof t){var r=H.grep(e,function(e){return 1===e.nodeType});if(ce.test(t))return H.filter(t,r,!n);t=H.filter(t,r)}return H.grep(e,function(e,r){return H.inArray(e,t)>=0===n})}function c(e){var t=he.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function f(e,t){return H.nodeName(e,"table")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function d(e,t){if(1===t.nodeType&&H.hasData(e)){var n,r,i,o=H._data(e),a=H._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r<i;r++)H.event.add(t,n,s[n][r])}
// make the cloned public data object a copy from the original
a.data&&(a.data=H.extend({},a.data))}}function p(e,t){var n;
// We do not need to do anything for non-Elements
1===t.nodeType&&(
// clearAttributes removes the attributes, which we don't want,
// but also removes the attachEvent events, which we *do* want
t.clearAttributes&&t.clearAttributes(),
// mergeAttributes, in contrast, only merges back on the
// original attributes, not the events
t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),
// IE6-8 fail to clone children inside object elements that use
// the proprietary classid attribute value (rather than the type
// attribute) to identify the type of content to display
"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:"script"===n&&t.text!==e.text&&(t.text=e.text):(
// IE6-8 fails to persist the checked state of a cloned checkbox
// or radio button. Worse, IE6-7 fail to give the cloned element
// a checked appearance if the defaultChecked value isn't also set
e.checked&&(t.defaultChecked=t.checked=e.checked),
// IE6-7 get confused and end up setting the value of a cloned
// checkbox/radio button to an empty string instead of "on"
t.value!==e.value&&(t.value=e.value)),
// Event data gets referenced instead of copied if the expando
// gets copied too
t.removeAttribute(H.expando),
// Clear flags for bubbling special change/submit events, they must
// be reattached when the newly cloned events are first activated
t.removeAttribute("_submit_attached"),t.removeAttribute("_change_attached"))}function h(e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName("*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll("*"):[]}
// Used in clean, fixes the defaultChecked property
function m(e){"checkbox"!==e.type&&"radio"!==e.type||(e.defaultChecked=e.checked)}
// Finds all inputs and passes them to fixDefaultChecked
function g(e){var t=(e.nodeName||"").toLowerCase();"input"===t?m(e):"script"!==t&&"undefined"!=typeof e.getElementsByTagName&&H.grep(e.getElementsByTagName("input"),m)}
// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
function y(e){var t=F.createElement("div");return Ae.appendChild(t),t.innerHTML=e.outerHTML,t.firstChild}function v(e,t,n){
// Start with offset property
var r="width"===t?e.offsetWidth:e.offsetHeight,i="width"===t?1:0,o=4;if(r>0){if("border"!==n)for(;i<o;i+=2)n||(r-=parseFloat(H.css(e,"padding"+We[i]))||0),"margin"===n?r+=parseFloat(H.css(e,n+We[i]))||0:r-=parseFloat(H.css(e,"border"+We[i]+"Width"))||0;return r+"px"}
// Computed unit is not pixels. Stop here and return.
if(
// Fall back to computed then uncomputed css if necessary
r=Le(e,t),(r<0||null==r)&&(r=e.style[t]),Oe.test(r))return r;
// Add padding, border, margin
if(
// Normalize "", auto, and prepare for extra
r=parseFloat(r)||0,n)for(;i<o;i+=2)r+=parseFloat(H.css(e,"padding"+We[i]))||0,"padding"!==n&&(r+=parseFloat(H.css(e,"border"+We[i]+"Width"))||0),"margin"===n&&(r+=parseFloat(H.css(e,n+We[i]))||0);return r+"px"}
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function b(e){
// dataTypeExpression is optional and defaults to "*"
return function(t,n){if("string"!=typeof t&&(n=t,t="*"),H.isFunction(n))
// For each dataType in the dataTypeExpression
for(var r,i,o,a=t.toLowerCase().split(tt),s=0,l=a.length;s<l;s++)r=a[s],
// We control if we're asked to add before
// any existing element
o=/^\+/.test(r),o&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],
// then we add to the structure accordingly
i[o?"unshift":"push"](n)}}
// Base inspection function for prefilters and transports
function x(e,n,r,i,o,a){o=o||n.dataTypes[0],a=a||{},a[o]=!0;for(var s,l=e[o],u=0,c=l?l.length:0,f=e===ot;u<c&&(f||!s);u++)s=l[u](n,r,i),
// If we got redirected to another dataType
// we try there if executing only and not done already
"string"==typeof s&&(!f||a[s]?s=t:(n.dataTypes.unshift(s),s=x(e,n,r,i,s,a)));
// unnecessary when only executing (prefilters)
// but it'll be ignored by the caller in that case
// If we're only executing or nothing was selected
// we try the catchall dataType if not done already
return!f&&s||a["*"]||(s=x(e,n,r,i,"*",a)),s}
// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes #9887
function T(e,n){var r,i,o=H.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);i&&H.extend(!0,e,i)}function w(e,t,n,r){if(H.isArray(t))
// Serialize array item.
H.each(t,function(t,i){n||Xe.test(e)?
// Treat each array item as a scalar.
r(e,i):
// If array item is non-scalar (array or object), encode its
// numeric index to resolve deserialization ambiguity issues.
// Note that rack (as of 1.0.0) can't currently deserialize
// nested arrays properly, and attempting to do so may cause
// a server error. Possible fixes are to modify rack's
// deserialization algorithm or to provide an option or flag
// to force array serialization to be shallow.
w(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==H.type(t))
// Serialize scalar item.
r(e,t);else
// Serialize object item.
for(var i in t)w(e+"["+i+"]",t[i],n,r)}/* Handles responses to an ajax request:
 * - sets all responseXXX fields accordingly
 * - finds the right dataType (mediates between content-type and expected dataType)
 * - returns the corresponding response
 */
function N(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes,c=e.responseFields;
// Fill responseXXX fields
for(o in c)o in r&&(n[c[o]]=r[o]);
// Remove auto dataType and get content-type in the process
for(;"*"===u[0];)u.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));
// Check if we're dealing with a known content-type
if(i)for(o in l)if(l[o]&&l[o].test(i)){u.unshift(o);break}
// Check to see if we have a response for the expected dataType
if(u[0]in r)a=u[0];else{
// Try convertible dataTypes
for(o in r){if(!u[0]||e.converters[o+" "+u[0]]){a=o;break}s||(s=o)}
// Or just use first one
a=a||s}
// If we found a dataType
// We add the dataType to the list if needed
// and return the corresponding response
if(a)return a!==u[0]&&u.unshift(a),r[a]}
// Chain conversions given the request and the original response
function C(e,n){
// Apply the dataFilter if provided
e.dataFilter&&(n=e.dataFilter(n,e.dataType));var r,i,o,a,
// Conversion expression
s,
// Conversion function
l,
// Conversion functions (transitive conversion)
u,c,f=e.dataTypes,d={},p=f.length,
// Current and previous dataTypes
h=f[0];
// For each dataType in the chain
for(r=1;r<p;r++){
// Create converters map
// with lowercased keys
if(1===r)for(i in e.converters)"string"==typeof i&&(d[i.toLowerCase()]=e.converters[i]);
// If current is auto dataType, update it to prev
if(
// Get the dataTypes
a=h,h=f[r],"*"===h)h=a;else if("*"!==a&&a!==h){
// If there is no direct converter, search transitively
if(
// Get the converter
s=a+" "+h,l=d[s]||d["* "+h],!l){c=t;for(u in d)if(o=u.split(" "),(o[0]===a||"*"===o[0])&&(c=d[o[1]+" "+h])){u=d[u],u===!0?l=c:c===!0&&(l=u);break}}
// If we found no converter, dispatch an error
l||c||H.error("No conversion from "+s.replace(" "," to ")),
// If found converter is not an equivalence
l!==!0&&(
// Convert with 1 or 2 converters accordingly
n=l?l(n):c(u(n)))}}return n}
// Functions to create xhrs
function E(){try{return new e.XMLHttpRequest}catch(t){}}function k(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}
// Animations created synchronously will run synchronously
function S(){return setTimeout(A,0),yt=H.now()}function A(){yt=t}
// Generate parameters to create a standard animation
function L(e,t){var n={};return H.each(Tt.concat.apply([],Tt.slice(0,t)),function(){n[this]=e}),n}
// Try to restore the default display value of an element
function D(e){if(!vt[e]){var t=F.body,n=H("<"+e+">").appendTo(t),r=n.css("display");n.remove(),
// If the simple way fails,
// get element's real default display by attaching it to a temp iframe
"none"!==r&&""!==r||(
// No iframe to use yet, so create it
ht||(ht=F.createElement("iframe"),ht.frameBorder=ht.width=ht.height=0),t.appendChild(ht),
// Create a cacheable copy of the iframe document on first call.
// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
// document to it; WebKit & Firefox won't allow reusing the iframe document.
mt&&ht.createElement||(mt=(ht.contentWindow||ht.contentDocument).document,mt.write((H.support.boxModel?"<!doctype html>":"")+"<html><body>"),mt.close()),n=mt.createElement(e),mt.body.appendChild(n),r=H.css(n,"display"),t.removeChild(ht)),
// Store the correct default display
vt[e]=r}return vt[e]}function j(e){return H.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}
// Use the correct document accordingly with window argument (sandbox)
var F=e.document,M=e.navigator,_=e.location,H=function(){
// The DOM ready check for Internet Explorer
function n(){if(!s.isReady){try{
// If IE is used, use the trick by Diego Perini
// http://javascript.nwbox.com/IEContentLoaded/
F.documentElement.doScroll("left")}catch(e){return void setTimeout(n,1)}
// and execute any waiting functions
s.ready()}}
// Define a local copy of jQuery
var
// A central reference to the root jQuery(document)
r,
// For matching the engine and version of the browser
i,
// The deferred used on DOM ready
o,
// The ready event handler
a,s=function(e,t){
// The jQuery object is actually just the init constructor 'enhanced'
return new s.fn.init(e,t,r)},
// Map over jQuery in case of overwrite
l=e.jQuery,
// Map over the $ in case of overwrite
u=e.$,
// A simple way to check for HTML strings or ID strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
c=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
// Check if a string has a non-whitespace character in it
f=/\S/,
// Used for trimming whitespace
d=/^\s+/,p=/\s+$/,
// Match a standalone tag
h=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
// JSON RegExp
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,
// Useragent RegExp
b=/(webkit)[ \/]([\w.]+)/,x=/(opera)(?:.*version)?[ \/]([\w.]+)/,T=/(msie) ([\w.]+)/,w=/(mozilla)(?:.*? rv:([\w.]+))?/,
// Matches dashed string for camelizing
N=/-([a-z]|[0-9])/gi,C=/^-ms-/,
// Used by jQuery.camelCase as callback to replace()
E=function(e,t){return(t+"").toUpperCase()},
// Keep a UserAgent string for use with jQuery.browser
k=M.userAgent,
// Save a reference to some core methods
S=Object.prototype.toString,A=Object.prototype.hasOwnProperty,L=Array.prototype.push,D=Array.prototype.slice,j=String.prototype.trim,_=Array.prototype.indexOf,
// [[Class]] -> type pairs
H={};
// Give the init function the jQuery prototype for later instantiation
// Populate the class2type map
// Deprecated, use jQuery.browser.webkit instead
// IE doesn't match non-breaking spaces with \s
// All jQuery objects should point back to these
// Cleanup functions for the document ready method
return s.fn=s.prototype={constructor:s,init:function(e,n,r){var i,o,a,l;
// Handle $(""), $(null), or $(undefined)
if(!e)return this;
// Handle $(DOMElement)
if(e.nodeType)return this.context=this[0]=e,this.length=1,this;
// The body element only exists once, optimize finding it
if("body"===e&&!n&&F.body)return this.context=F,this[0]=F.body,this.selector=e,this.length=1,this;
// Handle HTML strings
if("string"==typeof e){
// Verify a match, and that no context was specified for #id
if(
// Are we dealing with HTML string or an ID?
// Assume that strings that start and end with <> are HTML and skip the regex check
i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:c.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);
// HANDLE: $(html) -> $(array)
if(i[1])
// If a single string is passed in and it's a single tag
// just do a createElement and skip the rest
return n=n instanceof s?n[0]:n,l=n?n.ownerDocument||n:F,a=h.exec(e),a?s.isPlainObject(n)?(e=[F.createElement(a[1])],s.fn.attr.call(e,n,!0)):e=[l.createElement(a[1])]:(a=s.buildFragment([i[1]],[l]),e=(a.cacheable?s.clone(a.fragment):a.fragment).childNodes),s.merge(this,e);
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
if(o=F.getElementById(i[2]),o&&o.parentNode){
// Handle the case where IE and Opera return items
// by name instead of ID
if(o.id!==i[2])return r.find(e);
// Otherwise, we inject the element directly into the jQuery object
this.length=1,this[0]=o}return this.context=F,this.selector=e,this}return s.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),s.makeArray(e,this))},
// Start with an empty selector
selector:"",
// The current version of jQuery being used
jquery:"1.7.2",
// The default length of a jQuery object is 0
length:0,
// The number of elements contained in the matched element set
size:function(){return this.length},toArray:function(){return D.call(this,0)},
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get:function(e){
// Return a 'clean' array
// Return just the object
return null==e?this.toArray():e<0?this[this.length+e]:this[e]},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
pushStack:function(e,t,n){
// Build a new jQuery matched element set
var r=this.constructor();
// Return the newly-formed element set
// Add the old object onto the stack (as a reference)
return s.isArray(e)?L.apply(r,e):s.merge(r,e),r.prevObject=this,r.context=this.context,"find"===t?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},
// Execute a callback for every element in the matched set.
// (You can seed the arguments with an array of args, but this is
// only used internally.)
each:function(e,t){return s.each(this,e,t)},ready:function(e){
// Attach the listeners
// Add the callback
return s.bindReady(),o.add(e),this},eq:function(e){return e=+e,e===-1?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(D.apply(this,arguments),"slice",D.call(arguments).join(","))},map:function(e){return this.pushStack(s.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},
// For internal use only.
// Behaves like an Array's method, not like a jQuery method.
push:L,sort:[].sort,splice:[].splice},s.fn.init.prototype=s.fn,s.extend=s.fn.extend=function(){var e,n,r,i,o,a,l=arguments[0]||{},u=1,c=arguments.length,f=!1;for(
// Handle a deep copy situation
"boolean"==typeof l&&(f=l,l=arguments[1]||{},
// skip the boolean and the target
u=2),
// Handle case when target is a string or something (possible in deep copy)
"object"==typeof l||s.isFunction(l)||(l={}),
// extend jQuery itself if only one argument is passed
c===u&&(l=this,--u);u<c;u++)
// Only deal with non-null/undefined values
if(null!=(e=arguments[u]))
// Extend the base object
for(n in e)r=l[n],i=e[n],
// Prevent never-ending loop
l!==i&&(
// Recurse if we're merging plain objects or arrays
f&&i&&(s.isPlainObject(i)||(o=s.isArray(i)))?(o?(o=!1,a=r&&s.isArray(r)?r:[]):a=r&&s.isPlainObject(r)?r:{},
// Never move original objects, clone them
l[n]=s.extend(f,a,i)):i!==t&&(l[n]=i));
// Return the modified object
return l},s.extend({noConflict:function(t){return e.$===s&&(e.$=u),t&&e.jQuery===s&&(e.jQuery=l),s},
// Is the DOM ready to be used? Set to true once it occurs.
isReady:!1,
// A counter to track how many items to wait for before
// the ready event fires. See #6781
readyWait:1,
// Hold (or release) the ready event
holdReady:function(e){e?s.readyWait++:s.ready(!0)},
// Handle when the DOM is ready
ready:function(e){
// Either a released hold or an DOMready/load event and not yet ready
if(e===!0&&!--s.readyWait||e!==!0&&!s.isReady){
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
if(!F.body)return setTimeout(s.ready,1);
// If a normal DOM Ready event fired, decrement, and wait if need be
if(
// Remember that the DOM is ready
s.isReady=!0,e!==!0&&--s.readyWait>0)return;
// If there are functions bound, to execute
o.fireWith(F,[s]),
// Trigger any bound ready events
s.fn.trigger&&s(F).trigger("ready").off("ready")}},bindReady:function(){if(!o){
// Catch cases where $(document).ready() is called after the
// browser event has already occurred.
if(o=s.Callbacks("once memory"),"complete"===F.readyState)
// Handle it asynchronously to allow scripts the opportunity to delay ready
return setTimeout(s.ready,1);
// Mozilla, Opera and webkit nightlies currently support this event
if(F.addEventListener)
// Use the handy event callback
F.addEventListener("DOMContentLoaded",a,!1),
// A fallback to window.onload, that will always work
e.addEventListener("load",s.ready,!1);else if(F.attachEvent){
// ensure firing before onload,
// maybe late but safe also for iframes
F.attachEvent("onreadystatechange",a),
// A fallback to window.onload, that will always work
e.attachEvent("onload",s.ready);
// If IE and not a frame
// continually check to see if the document is ready
var t=!1;try{t=null==e.frameElement}catch(r){}F.documentElement.doScroll&&t&&n()}}},
// See test/unit/core.js for details concerning isFunction.
// Since version 1.3, DOM methods and functions like alert
// aren't supported. They return false on IE (#2968).
isFunction:function(e){return"function"===s.type(e)},isArray:Array.isArray||function(e){return"array"===s.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):H[S.call(e)]||"object"},isPlainObject:function(e){
// Must be an Object.
// Because of IE, we also have to check the presence of the constructor property.
// Make sure that DOM nodes and window objects don't pass through, as well
if(!e||"object"!==s.type(e)||e.nodeType||s.isWindow(e))return!1;try{
// Not own constructor property must be Object
if(e.constructor&&!A.call(e,"constructor")&&!A.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){
// IE8,9 Will throw exceptions on certain host objects #9897
return!1}
// Own properties are enumerated firstly, so to speed up,
// if last one is own, then all properties are own.
var r;for(r in e);return r===t||A.call(e,r)},isEmptyObject:function(e){for(var t in e)return!1;return!0},error:function(e){throw new Error(e)},parseJSON:function(t){
// Make sure leading/trailing whitespace is removed (IE can't handle it)
// Attempt to parse using the native JSON parser first
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
return"string"==typeof t&&t?(t=s.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 s.error("Invalid JSON: "+t)):null},
// Cross-browser xml parsing
parseXML:function(n){if("string"!=typeof n||!n)return null;var r,i;try{e.DOMParser?(// Standard
i=new DOMParser,r=i.parseFromString(n,"text/xml")):(// IE
r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||s.error("Invalid XML: "+n),r},noop:function(){},
// Evaluates a script in a global context
// Workarounds based on findings by Jim Driscoll
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
globalEval:function(t){t&&f.test(t)&&
// We use execScript on Internet Explorer
// We use an anonymous function so that context is window
// rather than jQuery in Firefox
(e.execScript||function(t){e.eval.call(e,t)})(t)},
// Convert dashed to camelCase; used by the css and data modules
// Microsoft forgot to hump their vendor prefix (#9572)
camelCase:function(e){return e.replace(C,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},
// args is for internal usage only
each:function(e,n,r){var i,o=0,a=e.length,l=a===t||s.isFunction(e);if(r)if(l){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;o<a&&n.apply(e[o++],r)!==!1;);else if(l){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;o<a&&n.call(e[o],o,e[o++])!==!1;);return e},
// Use native String.trim function wherever possible
trim:j?function(e){return null==e?"":j.call(e)}:
// Otherwise use our own trimming functionality
function(e){return null==e?"":e.toString().replace(d,"").replace(p,"")},
// results is for internal usage only
makeArray:function(e,t){var n=t||[];if(null!=e){
// The window, strings (and functions) also have 'length'
// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
var r=s.type(e);null==e.length||"string"===r||"function"===r||"regexp"===r||s.isWindow(e)?L.call(n,e):s.merge(n,e)}return n},inArray:function(e,t,n){var r;if(t){if(_)return _.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)
// Skip accessing in sparse arrays
if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=e.length,i=0;if("number"==typeof n.length)for(var o=n.length;i<o;i++)e[r++]=n[i];else for(;n[i]!==t;)e[r++]=n[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[];n=!!n;
// Go through the array, only saving the items
// that pass the validator function
for(var o=0,a=e.length;o<a;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},
// arg is for internal usage only
map:function(e,n,r){var i,o,a=[],l=0,u=e.length,
// jquery objects are treated as arrays
c=e instanceof s||u!==t&&"number"==typeof u&&(u>0&&e[0]&&e[u-1]||0===u||s.isArray(e));
// Go through the array, translating each of the items to their
if(c)for(;l<u;l++)i=n(e[l],l,r),null!=i&&(a[a.length]=i);else for(o in e)i=n(e[o],o,r),null!=i&&(a[a.length]=i);
// Flatten any nested arrays
return a.concat.apply([],a)},
// A global GUID counter for objects
guid:1,
// Bind a function to a context, optionally partially applying any
// arguments.
proxy:function(e,n){if("string"==typeof n){var r=e[n];n=e,e=r}
// Quick check to determine if target is callable, in the spec
// this throws a TypeError, but we will just return undefined.
if(!s.isFunction(e))return t;
// Simulated bind
var i=D.call(arguments,2),o=function(){return e.apply(n,i.concat(D.call(arguments)))};
// Set the guid of unique handler to the same of original handler, so it can be removed
return o.guid=e.guid=e.guid||o.guid||s.guid++,o},
// Mutifunctional method to get and set values to a collection
// The value/s can optionally be executed if it's a function
access:function(e,n,r,i,o,a,l){var u,c=null==r,f=0,d=e.length;
// Sets many values
if(r&&"object"==typeof r){for(f in r)s.access(e,n,f,r[f],1,a,i);o=1}else if(i!==t){if(
// Optionally, function values get executed if exec is true
u=l===t&&s.isFunction(i),c&&(
// Bulk operations only iterate when executing function values
u?(u=n,n=function(e,t,n){return u.call(s(e),n)}):(n.call(e,i),n=null)),n)for(;f<d;f++)n(e[f],r,u?i.call(e[f],f,n(e[f],r)):i,l);o=1}
// Gets
return o?e:c?n.call(e):d?n(e[0],r):a},now:function(){return(new Date).getTime()},
// Use of jQuery.browser is frowned upon.
// More details: http://docs.jquery.com/Utilities/jQuery.browser
uaMatch:function(e){e=e.toLowerCase();var t=b.exec(e)||x.exec(e)||T.exec(e)||e.indexOf("compatible")<0&&w.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},sub:function(){function e(t,n){return new e.fn.init(t,n)}s.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,r){return r&&r instanceof s&&!(r instanceof e)&&(r=e(r)),s.fn.init.call(this,n,r,t)},e.fn.init.prototype=e.fn;var t=e(F);return e},browser:{}}),s.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){H["[object "+t+"]"]=t.toLowerCase()}),i=s.uaMatch(k),i.browser&&(s.browser[i.browser]=!0,s.browser.version=i.version),s.browser.webkit&&(s.browser.safari=!0),f.test(" ")&&(d=/^[\s\xA0]+/,p=/[\s\xA0]+$/),r=s(F),F.addEventListener?a=function(){F.removeEventListener("DOMContentLoaded",a,!1),s.ready()}:F.attachEvent&&(a=function(){
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
"complete"===F.readyState&&(F.detachEvent("onreadystatechange",a),s.ready())}),s}(),O={};/*
 * Create a callback list using the following parameters:
 *
 *	flags:	an optional list of space-separated flags that will change how
 *			the callback list behaves
 *
 * By default a callback list will act like an event callback list and can be
 * "fired" multiple times.
 *
 * Possible flags:
 *
 *	once:			will ensure the callback list can only be fired once (like a Deferred)
 *
 *	memory:			will keep track of previous values and will call any callback added
 *					after the list has been fired right away with the latest "memorized"
 *					values (like a Deferred)
 *
 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
 *
 *	stopOnFalse:	interrupt callings when a callback returns false
 *
 */
H.Callbacks=function(e){
// Convert flags from String-formatted to Object-formatted
// (we check in cache first)
e=e?O[e]||n(e):{};var
// Last fire value (for non-forgettable lists)
r,
// Flag to know if list was already fired
i,
// Flag to know if list is currently firing
o,
// First callback to fire (used internally by add and fireWith)
a,
// End of the loop when firing
s,
// Index of currently firing callback (modified by remove if needed)
l,// Actual callback list
u=[],
// Stack of fire calls for repeatable lists
c=[],
// Add one or several callbacks to the list
f=function(t){var n,r,i,o;for(n=0,r=t.length;n<r;n++)i=t[n],o=H.type(i),"array"===o?
// Inspect recursively
f(i):"function"===o&&(
// Add if not in unique mode and callback is not in
e.unique&&p.has(i)||u.push(i))},
// Fire callbacks
d=function(t,n){for(n=n||[],r=!e.memory||[t,n],i=!0,o=!0,l=a||0,a=0,s=u.length;u&&l<s;l++)if(u[l].apply(t,n)===!1&&e.stopOnFalse){r=!0;// Mark as halted
break}o=!1,u&&(e.once?r===!0?p.disable():u=[]:c&&c.length&&(r=c.shift(),p.fireWith(r[0],r[1])))},
// Actual Callbacks object
p={
// Add a callback or a collection of callbacks to the list
add:function(){if(u){var e=u.length;f(arguments),
// Do we need to add the callbacks to the
// current firing batch?
o?s=u.length:r&&r!==!0&&(a=e,d(r[0],r[1]))}return this},
// Remove a callback from the list
remove:function(){if(u)for(var t=arguments,n=0,r=t.length;n<r;n++)for(var i=0;i<u.length&&(t[n]!==u[i]||(
// Handle firingIndex and firingLength
o&&i<=s&&(s--,i<=l&&l--),
// Remove the element
u.splice(i--,1),!e.unique));i++);return this},
// Control if a given callback is in the list
has:function(e){if(u)for(var t=0,n=u.length;t<n;t++)if(e===u[t])return!0;return!1},
// Remove all callbacks from the list
empty:function(){return u=[],this},
// Have the list do nothing anymore
disable:function(){return u=c=r=t,this},
// Is it disabled?
disabled:function(){return!u},
// Lock the list in its current state
lock:function(){return c=t,r&&r!==!0||p.disable(),this},
// Is it locked?
locked:function(){return!c},
// Call all callbacks with the given context and arguments
fireWith:function(t,n){return c&&(o?e.once||c.push([t,n]):e.once&&r||d(t,n)),this},
// Call all the callbacks with the given arguments
fire:function(){return p.fireWith(this,arguments),this},
// To know if the callbacks have already been called at least once
fired:function(){return!!i}};return p};var// Static reference to slice
B=[].slice;H.extend({Deferred:function(e){var t,n=H.Callbacks("once memory"),r=H.Callbacks("once memory"),i=H.Callbacks("memory"),o="pending",a={resolve:n,reject:r,notify:i},s={done:n.add,fail:r.add,progress:i.add,state:function(){return o},
// Deprecated
isResolved:n.fired,isRejected:r.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 H.Deferred(function(r){H.each({done:[e,"resolve"],fail:[t,"reject"],progress:[n,"notify"]},function(e,t){var n,i=t[0],o=t[1];H.isFunction(i)?l[e](function(){n=i.apply(this,arguments),n&&H.isFunction(n.promise)?n.promise().then(r.resolve,r.reject,r.notify):r[o+"With"](this===l?r:this,[n])}):l[e](r[o])})}).promise()},
// Get a promise for this deferred
// If obj is provided, the promise aspect is added to the object
promise:function(e){if(null==e)e=s;else for(var t in s)e[t]=s[t];return e}},l=s.promise({});for(t in a)l[t]=a[t].fire,l[t+"With"]=a[t].fireWith;
// All done!
// Handle state
// Call given func if any
return l.done(function(){o="resolved"},r.disable,i.lock).fail(function(){o="rejected"},n.disable,i.lock),e&&e.call(l,l),l},
// Deferred helper
when:function(e){function t(e){return function(t){r[e]=arguments.length>1?B.call(arguments,0):t,--s||l.resolveWith(l,r)}}function n(e){return function(t){a[e]=arguments.length>1?B.call(arguments,0):t,l.notifyWith(u,a)}}var r=B.call(arguments,0),i=0,o=r.length,a=new Array(o),s=o,l=o<=1&&e&&H.isFunction(e.promise)?e:H.Deferred(),u=l.promise();if(o>1){for(;i<o;i++)r[i]&&r[i].promise&&H.isFunction(r[i].promise)?r[i].promise().then(t(i),l.reject,n(i)):--s;s||l.resolveWith(l,r)}else l!==e&&l.resolveWith(l,o?[e]:[]);return u}}),H.support=function(){var t,n,r,i,o,a,s,l,u,c,f,d=F.createElement("div");F.documentElement;
// Can't get basic test support
if(
// Preliminary tests
d.setAttribute("className","t"),d.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!n.length||!r)return{};
// First batch of supports tests
i=F.createElement("select"),o=i.appendChild(F.createElement("option")),a=d.getElementsByTagName("input")[0],t={
// IE strips leading whitespace when .innerHTML is used
leadingWhitespace:3===d.firstChild.nodeType,
// Make sure that tbody elements aren't automatically inserted
// IE will insert them into empty tables
tbody:!d.getElementsByTagName("tbody").length,
// Make sure that link elements get serialized correctly by innerHTML
// This requires a wrapper element in IE
htmlSerialize:!!d.getElementsByTagName("link").length,
// Get the style information from getAttribute
// (IE uses .cssText instead)
style:/top/.test(r.getAttribute("style")),
// Make sure that URLs aren't manipulated
// (IE normalizes it by default)
hrefNormalized:"/a"===r.getAttribute("href"),
// Make sure that element opacity exists
// (IE uses filter instead)
// Use a regex to work around a WebKit issue. See #5145
opacity:/^0.55/.test(r.style.opacity),
// Verify style float existence
// (IE uses styleFloat instead of cssFloat)
cssFloat:!!r.style.cssFloat,
// Make sure that if no value is specified for a checkbox
// that it defaults to "on".
// (WebKit defaults to "" instead)
checkOn:"on"===a.value,
// Make sure that a selected-by-default option has a working selected property.
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
optSelected:o.selected,
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
getSetAttribute:"t"!==d.className,
// Tests for enctype support on a form(#6743)
enctype:!!F.createElement("form").enctype,
// Makes sure cloning an html5 element does not cause problems
// Where outerHTML is undefined, this still works
html5Clone:"<:nav></:nav>"!==F.createElement("nav").cloneNode(!0).outerHTML,
// Will be defined later
submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},
// jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
H.boxModel=t.boxModel="CSS1Compat"===F.compatMode,
// Make sure checked status is properly cloned
a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,
// Make sure that the options inside disabled selects aren't marked as disabled
// (WebKit marks them as disabled)
i.disabled=!0,t.optDisabled=!o.disabled;
// Test to see if it's possible to delete an expando from an element
// Fails in Internet Explorer
try{delete d.test}catch(p){t.deleteExpando=!1}
// Technique from Juriy Zaytsev
// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
// We only care about the case where non-standard event systems
// are used, namely in IE. Short-circuiting here helps us to
// avoid an eval call (in setAttribute) which can cause CSP
// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
if(!d.addEventListener&&d.attachEvent&&d.fireEvent&&(d.attachEvent("onclick",function(){
// Cloning a node shouldn't copy over any
// bound event handlers (IE does this)
t.noCloneEvent=!1}),d.cloneNode(!0).fireEvent("onclick")),
// Check if a radio maintains its value
// after being appended to the DOM
a=F.createElement("input"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","checked"),
// #11217 - WebKit loses check when the name is after the checked attribute
a.setAttribute("name","t"),d.appendChild(a),s=F.createDocumentFragment(),s.appendChild(d.lastChild),
// WebKit doesn't clone checked state correctly in fragments
t.checkClone=s.cloneNode(!0).cloneNode(!0).lastChild.checked,
// Check if a disconnected checkbox will retain its checked
// value of true after appended to the DOM (IE6/7)
t.appendChecked=a.checked,s.removeChild(a),s.appendChild(d),d.attachEvent)for(c in{submit:1,change:1,focusin:1})u="on"+c,f=u in d,f||(d.setAttribute(u,"return;"),f="function"==typeof d[u]),t[c+"Bubbles"]=f;
// Null elements to avoid leaks in IE
// Run tests that need a body at doc ready
return s.removeChild(d),s=i=o=d=a=null,H(function(){var n,r,i,o,a,s,u,c,p,h,m,g,y=F.getElementsByTagName("body")[0];y&&(u=1,g="padding:0;margin:0;border:",h="position:absolute;top:0;left:0;width:1px;height:1px;",m=g+"0;visibility:hidden;",c="style='"+h+g+"5px solid #000;",p="<div "+c+"display:block;'><div style='"+g+"0;display:block;overflow:hidden;'></div></div><table "+c+"' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>",n=F.createElement("div"),n.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+u+"px",y.insertBefore(n,y.firstChild),
// Construct the test element
d=F.createElement("div"),n.appendChild(d),
// Check if table cells still have offsetWidth/Height when they are set
// to display:none and there are still other visible table cells in a
// table row; if so, offsetWidth/Height are not reliable for use when
// determining if an element has been hidden directly using
// display:none (it is still safe to use offsets if a parent element is
// hidden; don safety goggles and see bug #4512 for more information).
// (only IE 8 fails this test)
d.innerHTML="<table><tr><td style='"+g+"0;display:none'></td><td>t</td></tr></table>",l=d.getElementsByTagName("td"),f=0===l[0].offsetHeight,l[0].style.display="",l[1].style.display="none",
// Check if empty table cells still have offsetWidth/Height
// (IE <= 8 fail this test)
t.reliableHiddenOffsets=f&&0===l[0].offsetHeight,
// Check if div with explicit width and no margin-right incorrectly
// gets computed margin-right based on width of container. For more
// info see bug #3333
// Fails in WebKit before Feb 2011 nightlies
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
e.getComputedStyle&&(d.innerHTML="",s=F.createElement("div"),s.style.width="0",s.style.marginRight="0",d.style.width="2px",d.appendChild(s),t.reliableMarginRight=0===(parseInt((e.getComputedStyle(s,null)||{marginRight:0}).marginRight,10)||0)),"undefined"!=typeof d.style.zoom&&(
// Check if natively block-level elements act like inline-block
// elements when setting their display to 'inline' and giving
// them layout
// (IE < 8 does this)
d.innerHTML="",d.style.width=d.style.padding="1px",d.style.border=0,d.style.overflow="hidden",d.style.display="inline",d.style.zoom=1,t.inlineBlockNeedsLayout=3===d.offsetWidth,
// Check if elements with layout shrink-wrap their children
// (IE 6 does this)
d.style.display="block",d.style.overflow="visible",d.innerHTML="<div style='width:5px;'></div>",t.shrinkWrapBlocks=3!==d.offsetWidth),d.style.cssText=h+m,d.innerHTML=p,r=d.firstChild,i=r.firstChild,o=r.nextSibling.firstChild.firstChild,a={doesNotAddBorder:5!==i.offsetTop,doesAddBorderForTableAndCells:5===o.offsetTop},i.style.position="fixed",i.style.top="20px",
// safari subtracts parent border width here which is 5px
a.fixedPosition=20===i.offsetTop||15===i.offsetTop,i.style.position=i.style.top="",r.style.overflow="hidden",r.style.position="relative",a.subtractsBorderForOverflowNotVisible=i.offsetTop===-5,a.doesNotIncludeMarginInBodyOffset=y.offsetTop!==u,e.getComputedStyle&&(d.style.marginTop="1%",t.pixelMargin="1%"!==(e.getComputedStyle(d,null)||{marginTop:0}).marginTop),"undefined"!=typeof n.style.zoom&&(n.style.zoom=1),y.removeChild(n),s=d=n=null,H.extend(t,a))}),t}();var P=/^(?:\{.*\}|\[.*\])$/,q=/([A-Z])/g;H.extend({cache:{},
// Please use with caution
uuid:0,
// Unique for each copy of jQuery on the page
// Non-digits removed to match rinlinejQuery
expando:"jQuery"+(H.fn.jquery+Math.random()).replace(/\D/g,""),
// The following elements throw uncatchable exceptions if you
// attempt to add expando properties to them.
noData:{embed:!0,
// Ban all objects except for Flash (which handle expandos)
object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?H.cache[e[H.expando]]:e[H.expando],!!e&&!i(e)},data:function(e,n,r,i){if(H.acceptData(e)){var o,a,s,l=H.expando,u="string"==typeof n,
// We have to handle DOM nodes and JS objects differently because IE6-7
// can't GC object references properly across the DOM-JS boundary
c=e.nodeType,
// Only DOM nodes need the global jQuery cache; JS object data is
// attached directly to the object so GC can occur automatically
f=c?H.cache:e,
// Only defining an ID for JS objects if its cache already exists allows
// the code to shortcut on the same path as a DOM node with no cache
d=c?e[l]:e[l]&&l,p="events"===n;
// Avoid doing any more work than we need to when trying to get data on an
// object that has no data at all
if(d&&f[d]&&(p||i||f[d].data)||!u||r!==t)
// Users should not attempt to inspect the internal events object using jQuery.data,
// it is undocumented and subject to change. But does anyone listen? No.
// Only DOM nodes need a new unique ID for each element since their data
// ends up in the global cache
// Avoids exposing jQuery metadata on plain JS objects when the object
// is serialized using JSON.stringify
// An object can be passed to jQuery.data instead of a key/value pair; this gets
// shallow copied over onto the existing cache
// jQuery data() is stored in a separate object inside the object's internal data
// cache in order to avoid key collisions between internal data and user-defined
// data.
// Users should not attempt to inspect the internal events object using jQuery.data,
// it is undocumented and subject to change. But does anyone listen? No.
// Check for both converted-to-camel and non-converted data property names
// If a data property was specified
// First Try to find as-is property data
// Test for null|undefined property data
// Try to find the camelCased property
return d||(c?e[l]=d=++H.uuid:d=l),f[d]||(f[d]={},c||(f[d].toJSON=H.noop)),"object"!=typeof n&&"function"!=typeof n||(i?f[d]=H.extend(f[d],n):f[d].data=H.extend(f[d].data,n)),o=a=f[d],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[H.camelCase(n)]=r),p&&!a[n]?o.events:(u?(s=a[n],null==s&&(s=a[H.camelCase(n)])):s=a,s)}},removeData:function(e,t,n){if(H.acceptData(e)){var r,o,a,
// Reference to internal data cache key
s=H.expando,l=e.nodeType,
// See jQuery.data for more information
u=l?H.cache:e,
// See jQuery.data for more information
c=l?e[s]:s;
// If there is already no cache entry for this object, there is no
// purpose in continuing
if(u[c]){if(t&&(r=n?u[c]:u[c].data)){
// Support array or space separated string names for data keys
H.isArray(t)||(
// try the string as a key before any manipulation
t in r?t=[t]:(
// split the camel cased version by spaces unless a key with the spaces exists
t=H.camelCase(t),t=t in r?[t]:t.split(" ")));for(o=0,a=t.length;o<a;o++)delete r[t[o]];
// If there is no data left in the cache, we want to continue
// and let the cache object itself get destroyed
if(!(n?i:H.isEmptyObject)(r))return}
// See jQuery.data for more information
(n||(delete u[c].data,i(u[c])))&&(
// Browsers that fail expando deletion also refuse to delete expandos on
// the window, but it will allow it on all other JS objects; other browsers
// don't care
// Ensure that `cache` is not a window object #10080
H.support.deleteExpando||!u.setInterval?delete u[c]:u[c]=null,
// We destroyed the cache and need to eliminate the expando on the node to avoid
// false lookups in the cache for entries that no longer exist
l&&(
// IE does not allow us to delete expando properties from nodes,
// nor does it have a removeAttribute function on Document nodes;
// we must handle all of these cases
H.support.deleteExpando?delete e[s]:e.removeAttribute?e.removeAttribute(s):e[s]=null))}}},
// For internal use only.
_data:function(e,t,n){return H.data(e,t,n,!0)},
// A method for determining if a DOM node can handle the data expando
acceptData:function(e){if(e.nodeName){var t=H.noData[e.nodeName.toLowerCase()];if(t)return!(t===!0||e.getAttribute("classid")!==t)}return!0}}),H.fn.extend({data:function(e,n){var i,o,a,s,l,u=this[0],c=0,f=null;
// Gets all values
if(e===t){if(this.length&&(f=H.data(u),1===u.nodeType&&!H._data(u,"parsedAttrs"))){for(a=u.attributes,l=a.length;c<l;c++)s=a[c].name,0===s.indexOf("data-")&&(s=H.camelCase(s.substring(5)),r(u,s,f[s]));H._data(u,"parsedAttrs",!0)}return f}
// Sets multiple values
// Sets multiple values
return"object"==typeof e?this.each(function(){H.data(this,e)}):(i=e.split(".",2),i[1]=i[1]?"."+i[1]:"",o=i[1]+"!",H.access(this,function(n){
// Try to fetch any internally stored data first
return n===t?(f=this.triggerHandler("getData"+o,[i[0]]),f===t&&u&&(f=H.data(u,e),f=r(u,e,f)),f===t&&i[1]?this.data(i[0]):f):(i[1]=n,void this.each(function(){var t=H(this);t.triggerHandler("setData"+o,i),H.data(this,e,n),t.triggerHandler("changeData"+o,i)}))},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){H.removeData(this,e)})}}),H.extend({_mark:function(e,t){e&&(t=(t||"fx")+"mark",H._data(e,t,(H._data(e,t)||0)+1))},_unmark:function(e,t,n){if(e!==!0&&(n=t,t=e,e=!1),t){n=n||"fx";var r=n+"mark",i=e?0:(H._data(t,r)||1)-1;i?H._data(t,r,i):(H.removeData(t,r,!0),o(t,n,"mark"))}},queue:function(e,t,n){var r;if(e)
// Speed up dequeue by getting out quickly if this is just a lookup
return t=(t||"fx")+"queue",r=H._data(e,t),n&&(!r||H.isArray(n)?r=H._data(e,t,H.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=H.queue(e,t),r=n.shift(),i={};
// If the fx queue is dequeued, always remove the progress sentinel
"inprogress"===r&&(r=n.shift()),r&&(
// Add a progress sentinel to prevent the fx queue from being
// automatically dequeued
"fx"===t&&n.unshift("inprogress"),H._data(e,t+".run",i),r.call(e,function(){H.dequeue(e,t)},i)),n.length||(H.removeData(e,t+"queue "+t+".run",!0),o(e,t,"queue"))}}),H.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),arguments.length<r?H.queue(this[0],e):n===t?this:this.each(function(){var t=H.queue(this,e,n);"fx"===e&&"inprogress"!==t[0]&&H.dequeue(this,e)})},dequeue:function(e){return this.each(function(){H.dequeue(this,e)})},
// Based off of the plugin by Clint Helfers, with permission.
// http://blindsignals.com/index.php/2009/07/jquery-delay/
delay:function(e,t){return e=H.fx?H.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},
// Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
promise:function(e,n){function r(){--l||o.resolveWith(a,[a])}"string"!=typeof e&&(n=e,e=t),e=e||"fx";for(var i,o=H.Deferred(),a=this,s=a.length,l=1,u=e+"defer",c=e+"queue",f=e+"mark";s--;)(i=H.data(a[s],u,t,!0)||(H.data(a[s],c,t,!0)||H.data(a[s],f,t,!0))&&H.data(a[s],u,H.Callbacks("once memory"),!0))&&(l++,i.add(r));return r(),o.promise(n)}});var W,I,$,R=/[\n\t\r]/g,X=/\s+/,z=/\r/g,V=/^(?:button|input)$/i,U=/^(?:button|input|object|select|textarea)$/i,G=/^a(?:rea)?$/i,Y=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,J=H.support.getSetAttribute;H.fn.extend({attr:function(e,t){return H.access(this,H.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){H.removeAttr(this,e)})},prop:function(e,t){return H.access(this,H.prop,e,t,arguments.length>1)},removeProp:function(e){return e=H.propFix[e]||e,this.each(function(){
// try/catch handles cases where IE balks (such as removing a property on window)
try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a,s;if(H.isFunction(e))return this.each(function(t){H(this).addClass(e.call(this,t,this.className))});if(e&&"string"==typeof e)for(t=e.split(X),n=0,r=this.length;n<r;n++)if(i=this[n],1===i.nodeType)if(i.className||1!==t.length){for(o=" "+i.className+" ",a=0,s=t.length;a<s;a++)~o.indexOf(" "+t[a]+" ")||(o+=t[a]+" ");i.className=H.trim(o)}else i.className=e;return this},removeClass:function(e){var n,r,i,o,a,s,l;if(H.isFunction(e))return this.each(function(t){H(this).removeClass(e.call(this,t,this.className))});if(e&&"string"==typeof e||e===t)for(n=(e||"").split(X),r=0,i=this.length;r<i;r++)if(o=this[r],1===o.nodeType&&o.className)if(e){for(a=(" "+o.className+" ").replace(R," "),s=0,l=n.length;s<l;s++)a=a.replace(" "+n[s]+" "," ");o.className=H.trim(a)}else o.className="";return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return H.isFunction(e)?this.each(function(n){H(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(
// toggle individual class names
var i,o=0,a=H(this),s=t,l=e.split(X);i=l[o++];)
// check each className given, space seperated list
s=r?s:!a.hasClass(i),a[s?"addClass":"removeClass"](i);else"undefined"!==n&&"boolean"!==n||(this.className&&
// store className if set
H._data(this,"__className__",this.className),
// toggle whole className
this.className=this.className||e===!1?"":H._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;n<r;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(R," ").indexOf(t)>-1)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=H.isFunction(e),this.each(function(r){var o,a=H(this);1===this.nodeType&&(o=i?e.call(this,r,a.val()):e,
// Treat null/undefined as ""; convert numbers to string
null==o?o="":"number"==typeof o?o+="":H.isArray(o)&&(o=H.map(o,function(e){return null==e?"":e+""})),n=H.valHooks[this.type]||H.valHooks[this.nodeName.toLowerCase()],
// If set returns undefined, fall back to normal setting
n&&"set"in n&&n.set(this,o,"value")!==t||(this.value=o))});if(o)
// handle most common string cases
// handle cases where value is null/undef or number
return n=H.valHooks[o.type]||H.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==t?r:(r=o.value,"string"==typeof r?r.replace(z,""):null==r?"":r)}}}),H.extend({valHooks:{option:{get:function(e){
// attributes.value is undefined in Blackberry 4.7 but
// uses .value. See #6932
var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r,i,o=e.selectedIndex,a=[],s=e.options,l="select-one"===e.type;
// Nothing was selected
if(o<0)return null;for(
// Loop through all the selected options
n=l?o:0,r=l?o+1:s.length;n<r;n++)
// Don't return options that are disabled or in a disabled optgroup
if(i=s[n],i.selected&&(H.support.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!H.nodeName(i.parentNode,"optgroup"))){
// We don't need an array for one selects
if(
// Get the specific value for the option
t=H(i).val(),l)return t;
// Multi-Selects return an array
a.push(t)}
// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
return l&&!a.length&&s.length?H(s[o]).val():a},set:function(e,t){var n=H.makeArray(t);return H(e).find("option").each(function(){this.selected=H.inArray(H(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,r,i){var o,a,s,l=e.nodeType;
// don't get/set attributes on text, comment and attribute nodes
if(e&&3!==l&&8!==l&&2!==l)
// Fallback to prop when attributes are not supported
// All attributes are lowercase
// Grab necessary hook if one is defined
return i&&n in H.attrFn?H(e)[n](r):"undefined"==typeof e.getAttribute?H.prop(e,n,r):(s=1!==l||!H.isXMLDoc(e),s&&(n=n.toLowerCase(),a=H.attrHooks[n]||(Y.test(n)?I:W)),r!==t?null===r?void H.removeAttr(e,n):a&&"set"in a&&s&&(o=a.set(e,r,n))!==t?o:(e.setAttribute(n,""+r),r):a&&"get"in a&&s&&null!==(o=a.get(e,n))?o:(o=e.getAttribute(n),null===o?t:o))},removeAttr:function(e,t){var n,r,i,o,a,s=0;if(t&&1===e.nodeType)for(r=t.toLowerCase().split(X),o=r.length;s<o;s++)i=r[s],i&&(n=H.propFix[i]||i,a=Y.test(i),
// See #9699 for explanation of this approach (setting first, then removal)
// Do not do this for boolean attributes (see #10870)
a||H.attr(e,i,""),e.removeAttribute(J?i:n),
// Set corresponding property to false for boolean attributes
a&&n in e&&(e[n]=!1))},attrHooks:{type:{set:function(e,t){
// We can't allow the type property to be changed (since it causes problems in IE)
if(V.test(e.nodeName)&&e.parentNode)H.error("type property can't be changed");else if(!H.support.radioValue&&"radio"===t&&H.nodeName(e,"input")){
// Setting the type on a radio button after the value resets the value in IE6-9
// Reset value to it's default in case type is set after value
// This is for element creation
var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},
// Use the value property for back compat
// Use the nodeHook for button elements in IE6/7 (#1954)
value:{get:function(e,t){return W&&H.nodeName(e,"button")?W.get(e,t):t in e?e.value:null},set:function(e,t,n){
// Does not return so that setAttribute is also used
return W&&H.nodeName(e,"button")?W.set(e,t,n):void(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,r){var i,o,a,s=e.nodeType;
// don't get/set properties on text, comment and attribute nodes
if(e&&3!==s&&8!==s&&2!==s)
// Fix name and attach hooks
return a=1!==s||!H.isXMLDoc(e),a&&(n=H.propFix[n]||n,o=H.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):U.test(e.nodeName)||G.test(e.nodeName)&&e.href?0:t}}}}),
// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
H.attrHooks.tabindex=H.propHooks.tabIndex,
// Hook for boolean attributes
I={get:function(e,n){
// Align boolean attributes with corresponding properties
// Fall back to attribute presence where some booleans are not supported
var r,i=H.prop(e,n);return i===!0||"boolean"!=typeof i&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;
// Remove boolean attributes when set to false
// value is true since we know at this point it's type boolean and not false
// Set boolean attributes to the same name and set the DOM property
// Only set the IDL specifically if it already exists on the element
return t===!1?H.removeAttr(e,n):(r=H.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},
// IE6/7 do not support getting/setting some attributes with get/setAttribute
J||($={name:!0,id:!0,coords:!0},
// Use this for any attribute in IE6/7
// This fixes almost every IE6/7 issue
W=H.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&($[n]?""!==r.nodeValue:r.specified)?r.nodeValue:t},set:function(e,t,n){
// Set the existing or create a new attribute node
var r=e.getAttributeNode(n);return r||(r=F.createAttribute(n),e.setAttributeNode(r)),r.nodeValue=t+""}},
// Apply the nodeHook to tabindex
H.attrHooks.tabindex.set=W.set,
// Set width and height to auto instead of 0 on empty string( Bug #8150 )
// This is for removals
H.each(["width","height"],function(e,t){H.attrHooks[t]=H.extend(H.attrHooks[t],{set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}})}),
// Set contenteditable to false on removals(#10429)
// Setting to empty string throws an error as an invalid value
H.attrHooks.contenteditable={get:W.get,set:function(e,t,n){""===t&&(t="false"),W.set(e,t,n)}}),
// Some attributes require a special call on IE
H.support.hrefNormalized||H.each(["href","src","width","height"],function(e,n){H.attrHooks[n]=H.extend(H.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null===r?t:r}})}),H.support.style||(H.attrHooks.style={get:function(e){
// Return undefined in the case of empty string
// Normalize to lowercase since IE uppercases css property names
return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=""+t}}),
// Safari mis-reports the default selected property of an option
// Accessing the parent's selectedIndex property fixes it
H.support.optSelected||(H.propHooks.selected=H.extend(H.propHooks.selected,{get:function(e){var t=e.parentNode;
// Make sure that it also works with optgroups, see #5701
return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),
// IE6/7 call enctype encoding
H.support.enctype||(H.propFix.enctype="encoding"),
// Radios and checkboxes getter/setter
H.support.checkOn||H.each(["radio","checkbox"],function(){H.valHooks[this]={get:function(e){
// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
return null===e.getAttribute("value")?"on":e.value}}}),H.each(["radio","checkbox"],function(){H.valHooks[this]=H.extend(H.valHooks[this],{set:function(e,t){if(H.isArray(t))return e.checked=H.inArray(H(e).val(),t)>=0}})});var Q=/^(?:textarea|input|select)$/i,K=/^([^\.]*)?(?:\.(.+))?$/,Z=/(?:^|\s)hover(\.\S+)?\b/,ee=/^key/,te=/^(?:mouse|contextmenu)|click/,ne=/^(?:focusinfocus|focusoutblur)$/,re=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,ie=function(e){var t=re.exec(e);
//   0  1    2   3
// [ _, tag, id, class ]
return t&&(t[1]=(t[1]||"").toLowerCase(),t[3]=t[3]&&new RegExp("(?:^|\\s)"+t[3]+"(?:\\s|$)")),t},oe=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))},ae=function(e){return H.event.special.hover?e:e.replace(Z,"mouseenter$1 mouseleave$1")};/*
 * Helper functions for managing events -- not part of the public interface.
 * Props to Dean Edwards' addEvent library for many of the ideas.
 */
H.event={add:function(e,n,r,i,o){var a,s,l,u,c,f,d,p,h,m,g;
// Don't attach events to noData or text/comment nodes (allow plain objects tho)
if(3!==e.nodeType&&8!==e.nodeType&&n&&r&&(a=H._data(e))){for(
// Caller can pass in an object of custom data in lieu of the handler
r.handler&&(h=r,r=h.handler,o=h.selector),
// Make sure that the handler has a unique ID, used to find/remove it later
r.guid||(r.guid=H.guid++),
// Init the element's event structure and main handler, if this is the first
l=a.events,l||(a.events=l={}),s=a.handle,s||(a.handle=s=function(e){
// Discard the second event of a jQuery.event.trigger() and
// when an event is called after a page has unloaded
return"undefined"==typeof H||e&&H.event.triggered===e.type?t:H.event.dispatch.apply(s.elem,arguments)},
// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
s.elem=e),
// Handle multiple events separated by a space
// jQuery(...).bind("mouseover mouseout", fn);
n=H.trim(ae(n)).split(" "),u=0;u<n.length;u++)c=K.exec(n[u])||[],f=c[1],d=(c[2]||"").split(".").sort(),
// If event changes its type, use the special event handlers for the changed type
g=H.event.special[f]||{},
// If selector defined, determine special event api type, otherwise given type
f=(o?g.delegateType:g.bindType)||f,
// Update special based on newly reset type
g=H.event.special[f]||{},
// handleObj is passed to all event handlers
p=H.extend({type:f,origType:c[1],data:i,handler:r,guid:r.guid,selector:o,quick:o&&ie(o),namespace:d.join(".")},h),
// Init the event handler queue if we're the first
m=l[f],m||(m=l[f]=[],m.delegateCount=0,
// Only use addEventListener/attachEvent if the special events handler returns false
g.setup&&g.setup.call(e,i,d,s)!==!1||(
// Bind the global event handler to the element
e.addEventListener?e.addEventListener(f,s,!1):e.attachEvent&&e.attachEvent("on"+f,s))),g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),
// Add to the element's handler list, delegates in front
o?m.splice(m.delegateCount++,0,p):m.push(p),
// Keep track of which events have ever been used, for event optimization
H.event.global[f]=!0;
// Nullify elem to prevent memory leaks in IE
e=null}},global:{},
// Detach an event or set of events from an element
remove:function(e,t,n,r,i){var o,a,s,l,u,c,f,d,p,h,m,g,y=H.hasData(e)&&H._data(e);if(y&&(d=y.events)){for(
// Once for each type.namespace in types; type may be omitted
t=H.trim(ae(t||"")).split(" "),o=0;o<t.length;o++)
// Unbind all events (on this namespace, if provided) for the element
if(a=K.exec(t[o])||[],s=l=a[1],u=a[2],s){
// Remove matching events
for(p=H.event.special[s]||{},s=(r?p.delegateType:p.bindType)||s,m=d[s]||[],c=m.length,u=u?new RegExp("(^|\\.)"+u.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null,f=0;f<m.length;f++)g=m[f],!i&&l!==g.origType||n&&n.guid!==g.guid||u&&!u.test(g.namespace)||r&&r!==g.selector&&("**"!==r||!g.selector)||(m.splice(f--,1),g.selector&&m.delegateCount--,p.remove&&p.remove.call(e,g));
// Remove generic event handler if we removed something and no more handlers exist
// (avoids potential for endless recursion during removal of special event handlers)
0===m.length&&c!==m.length&&(p.teardown&&p.teardown.call(e,u)!==!1||H.removeEvent(e,s,y.handle),delete d[s])}else for(s in d)H.event.remove(e,s+t[o],n,r,!0);
// Remove the expando if it's no longer used
H.isEmptyObject(d)&&(h=y.handle,h&&(h.elem=null),
// removeData also checks for emptiness and clears the expando if empty
// so use it instead of delete
H.removeData(e,["events","handle"],!0))}},
// Events that are safe to short-circuit if no handlers are attached.
// Native DOM events should not be added, they may have inline handlers.
customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,i,o){
// Don't do events on text and comment nodes
if(!i||3!==i.nodeType&&8!==i.nodeType){
// Event object or event type
var a,s,l,u,c,f,d,p,h,m,g=n.type||n,y=[];
// focus/blur morphs to focusin/out; ensure we're not firing them right now
if(!ne.test(g+H.event.triggered)&&(g.indexOf("!")>=0&&(
// Exclusive events trigger only for the exact event (no namespaces)
g=g.slice(0,-1),s=!0),g.indexOf(".")>=0&&(
// Namespaced trigger; create a regexp to match event type in handle()
y=g.split("."),g=y.shift(),y.sort()),i&&!H.event.customEvent[g]||H.event.global[g]))
// Handle a global trigger
if(
// Caller can pass in an Event, Object, or just an event type string
n="object"==typeof n?
// jQuery.Event object
n[H.expando]?n:
// Object literal
new H.Event(g,n):
// Just the event type (string)
new H.Event(g),n.type=g,n.isTrigger=!0,n.exclusive=s,n.namespace=y.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,f=g.indexOf(":")<0?"on"+g:"",i){if(
// Clean up the event in case it is being reused
n.result=t,n.target||(n.target=i),
// Clone any incoming data and prepend the event, creating the handler arg list
r=null!=r?H.makeArray(r):[],r.unshift(n),
// Allow special events to draw outside the lines
d=H.event.special[g]||{},!d.trigger||d.trigger.apply(i,r)!==!1){if(
// Determine event propagation path in advance, per W3C events spec (#9951)
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
h=[[i,d.bindType||g]],!o&&!d.noBubble&&!H.isWindow(i)){for(m=d.delegateType||g,u=ne.test(m+g)?i:i.parentNode,c=null;u;u=u.parentNode)h.push([u,m]),c=u;
// Only add window if we got to document (e.g., not plain obj or detached DOM)
c&&c===i.ownerDocument&&h.push([c.defaultView||c.parentWindow||e,m])}
// Fire handlers on the event path
for(l=0;l<h.length&&!n.isPropagationStopped();l++)u=h[l][0],n.type=h[l][1],p=(H._data(u,"events")||{})[n.type]&&H._data(u,"handle"),p&&p.apply(u,r),
// Note that this is a bare JS function and not a jQuery handler
p=f&&u[f],p&&H.acceptData(u)&&p.apply(u,r)===!1&&n.preventDefault();
// If nobody prevented the default action, do it now
// Call a native DOM method on the target with the same name name as the event.
// Can't use an .isFunction() check here because IE6/7 fails that test.
// Don't do default actions on window, that's where global variables be (#6170)
// IE<9 dies on focus/blur to hidden element (#1486)
// Don't re-trigger an onFOO event when we call its FOO() method
// Prevent re-triggering of the same event, since we already bubbled it above
return n.type=g,o||n.isDefaultPrevented()||d._default&&d._default.apply(i.ownerDocument,r)!==!1||"click"===g&&H.nodeName(i,"a")||!H.acceptData(i)||f&&i[g]&&("focus"!==g&&"blur"!==g||0!==n.target.offsetWidth)&&!H.isWindow(i)&&(c=i[f],c&&(i[f]=null),H.event.triggered=g,i[g](),H.event.triggered=t,c&&(i[f]=c)),n.result}}else{
// TODO: Stop taunting the data cache; remove global events and always attach to document
a=H.cache;for(l in a)a[l].events&&a[l].events[g]&&H.event.trigger(n,r,a[l].handle.elem,!0)}}},dispatch:function(n){
// Make a writable jQuery.Event from the native event object
n=H.event.fix(n||e.event);var r,i,o,a,s,l,u,c,f,d,p=(H._data(this,"events")||{})[n.type]||[],h=p.delegateCount,m=[].slice.call(arguments,0),g=!n.exclusive&&!n.namespace,y=H.event.special[n.type]||{},v=[];
// Call the preDispatch hook for the mapped type, and let it bail if desired
if(
// Use the fix-ed jQuery.Event rather than the (read-only) native event
m[0]=n,n.delegateTarget=this,!y.preDispatch||y.preDispatch.call(this,n)!==!1){
// Determine handlers that should run if there are delegated events
// Avoid non-left-click bubbling in Firefox (#3861)
if(h&&(!n.button||"click"!==n.type))for(
// Pregenerate a single jQuery object for reuse with .is()
a=H(this),a.context=this.ownerDocument||this,o=n.target;o!=this;o=o.parentNode||this)
// Don't process events on disabled elements (#6911, #8165)
if(o.disabled!==!0){for(l={},c=[],a[0]=o,r=0;r<h;r++)f=p[r],d=f.selector,l[d]===t&&(l[d]=f.quick?oe(o,f.quick):a.is(d)),l[d]&&c.push(f);c.length&&v.push({elem:o,matches:c})}
// Run delegates first; they may want to stop propagation beneath us
for(
// Add the remaining (directly-bound) handlers
p.length>h&&v.push({elem:this,matches:p.slice(h)}),r=0;r<v.length&&!n.isPropagationStopped();r++)for(u=v[r],n.currentTarget=u.elem,i=0;i<u.matches.length&&!n.isImmediatePropagationStopped();i++)f=u.matches[i],
// Triggered event must either 1) be non-exclusive and have no namespace, or
// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
(g||!n.namespace&&!f.namespace||n.namespace_re&&n.namespace_re.test(f.namespace))&&(n.data=f.data,n.handleObj=f,s=((H.event.special[f.origType]||{}).handle||f.handler).apply(u.elem,m),s!==t&&(n.result=s,s===!1&&(n.preventDefault(),n.stopPropagation())));
// Call the postDispatch hook for the mapped type
return y.postDispatch&&y.postDispatch.call(this,n),n.result}},
// Includes some event props shared by KeyEvent and MouseEvent
// *** attrChange attrName relatedNode srcElement  are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
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){
// Add which for key events
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 r,i,o,a=n.button,s=n.fromElement;
// Calculate pageX/Y if missing and clientX/Y available
// Add relatedTarget, if necessary
// Add which for click: 1 === left; 2 === middle; 3 === right
// Note: button is not normalized, so don't use it
return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||F,i=r.documentElement,o=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),e.which||a===t||(e.which=1&a?1:2&a?3:4&a?2:0),e}},fix:function(e){if(e[H.expando])return e;
// Create a writable copy of the event object and normalize some properties
var n,r,i=e,o=H.event.fixHooks[e.type]||{},a=o.props?this.props.concat(o.props):this.props;for(e=H.Event(i),n=a.length;n;)r=a[--n],e[r]=i[r];
// Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
// Target should not be a text node (#504, Safari)
// For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
return e.target||(e.target=i.srcElement||F),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey===t&&(e.metaKey=e.ctrlKey),o.filter?o.filter(e,i):e},special:{ready:{
// Make sure the ready event is setup
setup:H.bindReady},load:{
// Prevent triggered image.load events from bubbling to window.load
noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){
// We only want to do this special case on windows
H.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){
// Piggyback on a donor event to simulate a different one.
// Fake originalEvent to avoid donor's stopPropagation, but if the
// simulated event prevents default then we do the same on the donor.
var i=H.extend(new H.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?H.event.trigger(i,null,t):H.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},
// Some plugins are using, but it's undocumented/deprecated and will be removed.
// The 1.7 special event interface should provide all the hooks needed now.
H.event.handle=H.event.dispatch,H.removeEvent=F.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent&&e.detachEvent("on"+t,n)},H.Event=function(e,t){
// Allow instantiation without the 'new' keyword
// Allow instantiation without the 'new' keyword
// Event object
// Events bubbling up the document may have been marked as prevented
// by a handler lower down the tree; reflect the correct value.
// Put explicitly provided properties onto the event object
// Create a timestamp if incoming event doesn't have one
// Mark it as fixed
return this instanceof H.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?s:a):this.type=e,t&&H.extend(this,t),this.timeStamp=e&&e.timeStamp||H.now(),void(this[H.expando]=!0)):new H.Event(e,t)},
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
H.Event.prototype={preventDefault:function(){this.isDefaultPrevented=s;var e=this.originalEvent;e&&(
// if preventDefault exists run it on the original event
e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=s;var e=this.originalEvent;e&&(
// if stopPropagation exists run it on the original event
e.stopPropagation&&e.stopPropagation(),
// otherwise set the cancelBubble property of the original event to true (IE)
e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=s,this.stopPropagation()},isDefaultPrevented:a,isPropagationStopped:a,isImmediatePropagationStopped:a},
// Create mouseenter/leave events using mouseover/out and event-time checks
H.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){H.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;o.selector;
// For mousenter/leave call the handler if related is outside the target.
// NB: No relatedTarget if the mouse left/entered the browser window
return i&&(i===r||H.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),
// IE submit delegation
H.support.submitBubbles||(H.event.special.submit={setup:function(){
// Only need this for delegated form submit events
// Only need this for delegated form submit events
// Lazy-add a submit handler when a descendant form may potentially be submitted
return!H.nodeName(this,"form")&&void H.event.add(this,"click._submit keypress._submit",function(e){
// Node name check avoids a VML-related crash in IE (#9807)
var n=e.target,r=H.nodeName(n,"input")||H.nodeName(n,"button")?n.form:t;r&&!r._submit_attached&&(H.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),r._submit_attached=!0)})},postDispatch:function(e){
// If form was submitted by the user, bubble the event up the tree
e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&H.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){
// Only need this for delegated form submit events
// Only need this for delegated form submit events
// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
return!H.nodeName(this,"form")&&void H.event.remove(this,"._submit")}}),
// IE change delegation and checkbox/radio fix
H.support.changeBubbles||(H.event.special.change={setup:function(){
// IE doesn't fire change on a check/radio until blur; trigger it on click
// after a propertychange. Eat the blur-change in special.change.handle.
// This still fires onchange a second time for check/radio after blur.
// Delegated event; lazy-add a change handler on descendant inputs
return Q.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(H.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),H.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1,H.event.simulate("change",this,e,!0))})),!1):void H.event.add(this,"beforeactivate._change",function(e){var t=e.target;Q.test(t.nodeName)&&!t._change_attached&&(H.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||H.event.simulate("change",this.parentNode,e,!0)}),t._change_attached=!0)})},handle:function(e){var t=e.target;
// Swallow native change events from checkbox/radio, we already triggered them above
if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return H.event.remove(this,"._change"),Q.test(this.nodeName)}}),
// Create "bubbling" focus and blur events
H.support.focusinBubbles||H.each({focus:"focusin",blur:"focusout"},function(e,t){
// Attach a single capturing handler while someone wants focusin/focusout
var n=0,r=function(e){H.event.simulate(t,e.target,H.event.fix(e),!0)};H.event.special[t]={setup:function(){0===n++&&F.addEventListener(e,r,!0)},teardown:function(){0===--n&&F.removeEventListener(e,r,!0)}}}),H.fn.extend({on:function(e,n,r,i,/*INTERNAL*/o){var s,l;
// Types can be a map of types/handlers
if("object"==typeof e){
// ( types-Object, selector, data )
"string"!=typeof n&&(// && selector != null
// ( types-Object, data )
r=r||n,n=t);for(l in e)this.on(l,n,r,e[l],o);return this}if(null==r&&null==i?(
// ( types, fn )
i=n,r=n=t):null==i&&("string"==typeof n?(
// ( types, selector, fn )
i=r,r=t):(
// ( types, data, fn )
i=r,r=n,n=t)),i===!1)i=a;else if(!i)return this;
// Use same guid so caller can remove using origFn
return 1===o&&(s=i,i=function(e){
// Can use an empty set, since event contains the info
return H().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=H.guid++)),this.each(function(){H.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){if(e&&e.preventDefault&&e.handleObj){
// ( event )  dispatched jQuery.Event
var i=e.handleObj;return H(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this}if("object"==typeof e){
// ( types-object [, selector] )
for(var o in e)this.off(o,n,e[o]);return this}
// ( types [, fn] )
return n!==!1&&"function"!=typeof n||(r=n,n=t),r===!1&&(r=a),this.each(function(){H.event.remove(this,e,r,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 H(this.context).on(e,this.selector,t,n),this},die:function(e,t){return H(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){
// ( namespace ) or ( selector, types [, fn] )
return 1==arguments.length?this.off(e,"**"):this.off(t,e,n)},trigger:function(e,t){return this.each(function(){H.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return H.event.trigger(e,t,this[0],!0)},toggle:function(e){
// Save reference to arguments for access in closure
var t=arguments,n=e.guid||H.guid++,r=0,i=function(n){
// Figure out which function to execute
var i=(H._data(this,"lastToggle"+e.guid)||0)%r;
// and execute the function
// Make sure that clicks stop
return H._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};for(
// link all the functions, so any of them can unbind this click handler
i.guid=n;r<t.length;)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),H.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){
// Handle event binding
H.fn[t]=function(e,n){return null==n&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},H.attrFn&&(H.attrFn[t]=!0),ee.test(t)&&(H.event.fixHooks[t]=H.event.keyHooks),te.test(t)&&(H.event.fixHooks[t]=H.event.mouseHooks)}),/*!
 * Sizzle CSS Selector Engine
 *  Copyright 2011, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
function(){function e(e,t,n,r,o,a){for(var s=0,l=r.length;s<l;s++){var u=r[s];if(u){var c=!1;for(u=u[e];u;){if(u[i]===n){c=r[u.sizset];break}if(1!==u.nodeType||a||(u[i]=n,u.sizset=s),u.nodeName.toLowerCase()===t){c=u;break}u=u[e]}r[s]=c}}}function n(e,t,n,r,o,a){for(var s=0,l=r.length;s<l;s++){var u=r[s];if(u){var c=!1;for(u=u[e];u;){if(u[i]===n){c=r[u.sizset];break}if(1===u.nodeType)if(a||(u[i]=n,u.sizset=s),"string"!=typeof t){if(u===t){c=!0;break}}else if(d.filter(t,[u]).length>0){c=u;break}u=u[e]}r[s]=c}}}var r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache"+(Math.random()+"").replace(".",""),o=0,a=Object.prototype.toString,s=!1,l=!0,u=/\\/g,c=/\r\n/g,f=/\W/;
// Here we check if the JavaScript engine is using some sort of
// optimization where it does not always call our comparision
// function. If that is the case, discard the hasDuplicate value.
//   Thus far that includes Google Chrome.
[0,0].sort(function(){return l=!1,0});var d=function(e,t,n,i){n=n||[],t=t||F;var o=t;if(1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return n;var s,l,u,c,f,p,g,y,b=!0,x=d.isXML(t),T=[],N=e;
// Reset the position of the chunker regexp (start from head)
do if(r.exec(""),s=r.exec(N),s&&(N=s[3],T.push(s[1]),s[2])){c=s[3];break}while(s);if(T.length>1&&m.exec(e))if(2===T.length&&h.relative[T[0]])l=w(T[0]+T[1],t,i);else for(l=h.relative[T[0]]?[t]:d(T.shift(),t);T.length;)e=T.shift(),h.relative[e]&&(e+=T.shift()),l=w(e,l,i);else if(
// Take a shortcut and set the context if the root selector is an ID
// (but not if it'll be faster if the inner selector is an ID)
!i&&T.length>1&&9===t.nodeType&&!x&&h.match.ID.test(T[0])&&!h.match.ID.test(T[T.length-1])&&(f=d.find(T.shift(),t,x),t=f.expr?d.filter(f.expr,f.set)[0]:f.set[0]),t)for(f=i?{expr:T.pop(),set:v(i)}:d.find(T.pop(),1!==T.length||"~"!==T[0]&&"+"!==T[0]||!t.parentNode?t:t.parentNode,x),l=f.expr?d.filter(f.expr,f.set):f.set,T.length>0?u=v(l):b=!1;T.length;)p=T.pop(),g=p,h.relative[p]?g=T.pop():p="",null==g&&(g=t),h.relative[p](u,g,x);else u=T=[];if(u||(u=l),u||d.error(p||e),"[object Array]"===a.call(u))if(b)if(t&&1===t.nodeType)for(y=0;null!=u[y];y++)u[y]&&(u[y]===!0||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,o,n,i),d.uniqueSort(n)),n};d.uniqueSort=function(e){if(x&&(s=l,e.sort(x),s))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 r,i,o,a,s,l;if(!e)return[];for(i=0,o=h.order.length;i<o;i++)if(s=h.order[i],(a=h.leftMatch[s].exec(e))&&(l=a[1],a.splice(1,1),"\\"!==l.substr(l.length-1)&&(a[1]=(a[1]||"").replace(u,""),r=h.find[s](a,t,n),null!=r))){e=e.replace(h.match[s],"");break}return r||(r="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName("*"):[]),{set:r,expr:e}},d.filter=function(e,n,r,i){for(var o,a,s,l,u,c,f,p,m,g=e,y=[],v=n,b=n&&n[0]&&d.isXML(n[0]);e&&n.length;){for(s in h.filter)if(null!=(o=h.leftMatch[s].exec(e))&&o[2]){if(c=h.filter[s],f=o[1],a=!1,o.splice(1,1),"\\"===f.substr(f.length-1))continue;if(v===y&&(y=[]),h.preFilter[s])if(o=h.preFilter[s](o,v,r,y,i,b)){if(o===!0)continue}else a=l=!0;if(o)for(p=0;null!=(u=v[p]);p++)u&&(l=c(u,o,p,v),m=i^l,r&&null!=l?m?a=!0:v[p]=!1:m&&(y.push(u),a=!0));if(l!==t){if(r||(v=y),e=e.replace(h.match[s],""),!a)return[];break}}
// Improper expression
if(e===g){if(null!=a)break;d.error(e)}g=e}return v},d.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};/**
 * Utility function for retreiving the text value of an array of DOM nodes
 * @param {Array|Element} elem
 */
var p=d.getText=function(e){var t,n,r=e.nodeType,i="";if(r){if(1===r||9===r||11===r){
// Use textContent || innerText for elements
if("string"==typeof e.textContent)return e.textContent;if("string"==typeof e.innerText)
// Replace IE's carriage returns
return e.innerText.replace(c,"");
// Traverse it's children
for(e=e.firstChild;e;e=e.nextSibling)i+=p(e)}else if(3===r||4===r)return e.nodeValue}else
// If no nodeType, this is expected to be an array
for(t=0;n=e[t];t++)
// Do not traverse comment nodes
8!==n.nodeType&&(i+=p(n));return i},h=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,r=n&&!f.test(t),i=n&&!r;r&&(t=t.toLowerCase());for(var o,a=0,s=e.length;a<s;a++)if(o=e[a]){for(;(o=o.previousSibling)&&1!==o.nodeType;);e[a]=i||o&&o.nodeName.toLowerCase()===t?o||!1:o===t}i&&d.filter(t,e,!0)},">":function(e,t){var n,r="string"==typeof t,i=0,o=e.length;if(r&&!f.test(t)){for(t=t.toLowerCase();i<o;i++)if(n=e[i]){var a=n.parentNode;e[i]=a.nodeName.toLowerCase()===t&&a}}else{for(;i<o;i++)n=e[i],n&&(e[i]=r?n.parentNode:n.parentNode===t);r&&d.filter(t,e,!0)}},"":function(t,r,i){var a,s=o++,l=n;"string"!=typeof r||f.test(r)||(r=r.toLowerCase(),a=r,l=e),l("parentNode",r,s,t,a,i)},"~":function(t,r,i){var a,s=o++,l=n;"string"!=typeof r||f.test(r)||(r=r.toLowerCase(),a=r,l=e),l("previousSibling",r,s,t,a,i)}},find:{ID:function(e,t,n){if("undefined"!=typeof t.getElementById&&!n){var r=t.getElementById(e[1]);
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
return r&&r.parentNode?[r]:[]}},NAME:function(e,t){if("undefined"!=typeof t.getElementsByName){for(var n=[],r=t.getElementsByName(e[1]),i=0,o=r.length;i<o;i++)r[i].getAttribute("name")===e[1]&&n.push(r[i]);return 0===n.length?null:n}},TAG:function(e,t){if("undefined"!=typeof t.getElementsByTagName)return t.getElementsByTagName(e[1])}},preFilter:{CLASS:function(e,t,n,r,i,o){if(e=" "+e[1].replace(u,"")+" ",o)return e;for(var a,s=0;null!=(a=t[s]);s++)a&&(i^(a.className&&(" "+a.className+" ").replace(/[\t\n\r]/g," ").indexOf(e)>=0)?n||r.push(a):n&&(t[s]=!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,"");
// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
var t=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===e[2]&&"2n"||"odd"===e[2]&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);
// calculate the numbers (first)n+(last) including if they are negative
e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}else e[2]&&d.error(e[0]);
// TODO: Move to normal caching system
return e[0]=o++,e},ATTR:function(e,t,n,r,i,o){var a=e[1]=e[1].replace(u,"");
// Handle if an un-quoted value was used
return!o&&h.attrMap[a]&&(e[1]=h.attrMap[a]),e[4]=(e[4]||e[5]||"").replace(u,""),"~="===e[2]&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(e,t,n,i,o){if("not"===e[1]){
// If we're dealing with a complex expression, or a simple one
if(!((r.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var a=d.filter(e[3],t,n,!0^o);return n||i.push.apply(i,a),!1}e[3]=d(e[3],null,null,t)}else if(h.match.POS.test(e[0])||h.match.CHILD.test(e[0]))return!0;return e},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return e.disabled===!1&&"hidden"!==e.type},disabled:function(e){return e.disabled===!0},checked:function(e){return e.checked===!0},selected:function(e){
// Accessing this property makes selected-by-default
// options in Safari work properly
return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},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;
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
// use getAttribute instead to test this case
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,r){return t===r.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,r){var i=t[1],o=h.filters[i];if(o)return o(e,n,t,r);if("contains"===i)return(e.textContent||e.innerText||p([e])||"").indexOf(t[3])>=0;if("not"===i){for(var a=t[3],s=0,l=a.length;s<l;s++)if(a[s]===e)return!1;return!0}d.error(i)},CHILD:function(e,t){var n,r,o,a,s,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;/* falls through */
case"last":for(;c=c.nextSibling;)if(1===c.nodeType)return!1;return!0;case"nth":if(n=t[2],r=t[3],1===n&&0===r)return!0;if(o=t[0],a=e.parentNode,a&&(a[i]!==o||!e.nodeIndex)){for(s=0,c=a.firstChild;c;c=c.nextSibling)1===c.nodeType&&(c.nodeIndex=++s);a[i]=o}return l=e.nodeIndex-r,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],r=d.attr?d.attr(e,n):h.attrHandle[n]?h.attrHandle[n](e):null!=e[n]?e[n]:e.getAttribute(n),i=r+"",o=t[2],a=t[4];return null==r?"!="===o:!o&&d.attr?null!=r:"="===o?i===a:"*="===o?i.indexOf(a)>=0:"~="===o?(" "+i+" ").indexOf(a)>=0:a?"!="===o?i!==a:"^="===o?0===i.indexOf(a):"$="===o?i.substr(i.length-a.length)===a:"|="===o&&(i===a||i.substr(0,a.length+1)===a+"-"):i&&r!==!1},POS:function(e,t,n,r){var i=t[2],o=h.setFilters[i];if(o)return o(e,n,t,r)}}},m=h.match.POS,g=function(e,t){return"\\"+(t-0+1)};for(var y in h.match)h.match[y]=new RegExp(h.match[y].source+/(?![^\[]*\])(?![^\(]*\))/.source),h.leftMatch[y]=new RegExp(/(^(?:.|\r|\n)*?)/.source+h.match[y].source.replace(/\\(\d+)/g,g));
// Expose origPOS
// "global" as in regardless of relation to brackets/parens
h.match.globalPOS=m;var v=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};
// Perform a simple check to determine if the browser is capable of
// converting a NodeList to an array using builtin methods.
// Also verifies that the returned array holds DOM nodes
// (which is not the case in the Blackberry browser)
try{Array.prototype.slice.call(F.documentElement.childNodes,0)[0].nodeType}catch(b){v=function(e,t){var n=0,r=t||[];if("[object Array]"===a.call(e))Array.prototype.push.apply(r,e);else if("number"==typeof e.length)for(var i=e.length;n<i;n++)r.push(e[n]);else for(;e[n];n++)r.push(e[n]);return r}}var x,T;F.documentElement.compareDocumentPosition?x=function(e,t){return e===t?(s=!0,0):e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t)?-1:1:e.compareDocumentPosition?-1:1}:(x=function(e,t){
// The nodes are identical, we can exit early
if(e===t)return s=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],o=[],a=e.parentNode,l=t.parentNode,u=a;
// If the nodes are siblings (or identical) we can do a quick check
if(a===l)return T(e,t);if(!a)return-1;if(!l)return 1;
// Otherwise they're somewhere else in the tree so we need
// to build up a full list of the parentNodes for comparison
for(;u;)i.unshift(u),u=u.parentNode;for(u=l;u;)o.unshift(u),u=u.parentNode;n=i.length,r=o.length;
// Start walking down the tree looking for a discrepancy
for(var c=0;c<n&&c<r;c++)if(i[c]!==o[c])return T(i[c],o[c]);
// We ended someplace up the tree so do a sibling check
return c===n?T(e,o[c],-1):T(i[c],t,1)},T=function(e,t,n){if(e===t)return n;for(var r=e.nextSibling;r;){if(r===t)return-1;r=r.nextSibling}return 1}),
// Check to see if the browser returns elements by name when
// querying by getElementById (and provide a workaround)
function(){
// We're going to inject a fake input element with a specified name
var e=F.createElement("div"),n="script"+(new Date).getTime(),r=F.documentElement;e.innerHTML="<a name='"+n+"'/>",
// Inject it into the root element, check its status, and remove it quickly
r.insertBefore(e,r.firstChild),
// The workaround has to do additional checks after a getElementById
// Which slows things down for other browsers (hence the branching)
F.getElementById(n)&&(h.find.ID=function(e,n,r){if("undefined"!=typeof n.getElementById&&!r){var i=n.getElementById(e[1]);return i?i.id===e[1]||"undefined"!=typeof i.getAttributeNode&&i.getAttributeNode("id").nodeValue===e[1]?[i]:t:[]}},h.filter.ID=function(e,t){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&n&&n.nodeValue===t}),r.removeChild(e),
// release memory in IE
r=e=null}(),function(){
// Check to see if the browser returns only elements
// when doing getElementsByTagName("*")
// Create a fake element
var e=F.createElement("div");e.appendChild(F.createComment("")),
// Make sure no comments are found
e.getElementsByTagName("*").length>0&&(h.find.TAG=function(e,t){var n=t.getElementsByTagName(e[1]);
// Filter out possible comments
if("*"===e[1]){for(var r=[],i=0;n[i];i++)1===n[i].nodeType&&r.push(n[i]);n=r}return n}),
// Check to see if an attribute returns normalized href attributes
e.innerHTML="<a href='#'></a>",e.firstChild&&"undefined"!=typeof e.firstChild.getAttribute&&"#"!==e.firstChild.getAttribute("href")&&(h.attrHandle.href=function(e){return e.getAttribute("href",2)}),
// release memory in IE
e=null}(),F.querySelectorAll&&!function(){var e=d,t=F.createElement("div"),n="__sizzle__";
// Safari can't handle uppercase or unicode characters when
// in quirks mode.
if(t.innerHTML="<p class='TEST'></p>",!t.querySelectorAll||0!==t.querySelectorAll(".TEST").length){d=function(t,r,i,o){
// Only use querySelectorAll on non-XML documents
// (ID selectors don't work in non-HTML documents)
if(r=r||F,!o&&!d.isXML(r)){
// See if we find a selector to speed up
var a=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(a&&(1===r.nodeType||9===r.nodeType)){
// Speed-up: Sizzle("TAG")
if(a[1])return v(r.getElementsByTagName(t),i);if(a[2]&&h.find.CLASS&&r.getElementsByClassName)return v(r.getElementsByClassName(a[2]),i)}if(9===r.nodeType){
// Speed-up: Sizzle("body")
// The body element only exists once, optimize finding it
if("body"===t&&r.body)return v([r.body],i);if(a&&a[3]){var s=r.getElementById(a[3]);
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
if(!s||!s.parentNode)return v([],i);
// Handle the case where IE and Opera return items
// by name instead of ID
if(s.id===a[3])return v([s],i)}try{return v(r.querySelectorAll(t),i)}catch(l){}}else if(1===r.nodeType&&"object"!==r.nodeName.toLowerCase()){var u=r,c=r.getAttribute("id"),f=c||n,p=r.parentNode,m=/^\s*[+~]/.test(t);c?f=f.replace(/'/g,"\\$&"):r.setAttribute("id",f),m&&p&&(r=r.parentNode);try{if(!m||p)return v(r.querySelectorAll("[id='"+f+"'] "+t),i)}catch(g){}finally{c||u.removeAttribute("id")}}}return e(t,r,i,o)};for(var r in e)d[r]=e[r];
// release memory in IE
t=null}}(),function(){var e=F.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){
// Check to see if it's possible to do matchesSelector
// on a disconnected node (IE 9 fails this)
var n=!t.call(F.createElement("div"),"div"),r=!1;try{
// This should fail with an exception
// Gecko does not error, returns false instead
t.call(F.documentElement,"[test!='']:sizzle")}catch(i){r=!0}d.matchesSelector=function(e,i){if(
// Make sure that attribute selectors are quoted
i=i.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!d.isXML(e))try{if(r||!h.match.PSEUDO.test(i)&&!/!=/.test(i)){var o=t.call(e,i);
// IE 9's matchesSelector returns false on disconnected nodes
if(o||!n||
// As well, disconnected nodes are said to be in a document
// fragment in IE 9, so check for that
e.document&&11!==e.document.nodeType)return o}}catch(a){}return d(i,null,null,[e]).length>0}}}(),function(){var e=F.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>",
// Opera can't find a second classname (in 9.6)
// Also, make sure that getElementsByClassName actually exists
e.getElementsByClassName&&0!==e.getElementsByClassName("e").length&&(
// Safari caches class attributes, doesn't catch changes (in 3.2)
e.lastChild.className="e",1!==e.getElementsByClassName("e").length&&(h.order.splice(1,0,"CLASS"),h.find.CLASS=function(e,t,n){if("undefined"!=typeof t.getElementsByClassName&&!n)return t.getElementsByClassName(e[1])},
// release memory in IE
e=null))}(),F.documentElement.contains?d.contains=function(e,t){return e!==t&&(!e.contains||e.contains(t))}:F.documentElement.compareDocumentPosition?d.contains=function(e,t){return!!(16&e.compareDocumentPosition(t))}:d.contains=function(){return!1},d.isXML=function(e){
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
var t=(e?e.ownerDocument||e:0).documentElement;return!!t&&"HTML"!==t.nodeName};var w=function(e,t,n){
// Position selectors must be done after the filter
// And so must :not(positional) so we move all PSEUDOs to the end
for(var r,i=[],o="",a=t.nodeType?[t]:t;r=h.match.PSEUDO.exec(e);)o+=r[0],e=e.replace(h.match.PSEUDO,"");e=h.relative[e]?e+"*":e;for(var s=0,l=a.length;s<l;s++)d(e,a[s],i,n);return d.filter(o,i)};
// EXPOSE
// Override sizzle attribute retrieval
d.attr=H.attr,d.selectors.attrMap={},H.find=d,H.expr=d.selectors,H.expr[":"]=H.expr.filters,H.unique=d.uniqueSort,H.text=d.getText,H.isXMLDoc=d.isXML,H.contains=d.contains}();var se=/Until$/,le=/^(?:parents|prevUntil|prevAll)/,
// Note: This RegExp should be improved, or likely pulled from Sizzle
ue=/,/,ce=/^.[^:#\[\.,]*$/,fe=Array.prototype.slice,de=H.expr.match.globalPOS,
// methods guaranteed to produce a unique set when starting from a unique set
pe={children:!0,contents:!0,next:!0,prev:!0};H.fn.extend({find:function(e){var t,n,r=this;if("string"!=typeof e)return H(e).filter(function(){for(t=0,n=r.length;t<n;t++)if(H.contains(r[t],this))return!0});var i,o,a,s=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++)if(i=s.length,H.find(e,this[t],s),t>0)
// Make sure that the results are unique
for(o=i;o<s.length;o++)for(a=0;a<i;a++)if(s[a]===s[o]){s.splice(o--,1);break}return s},has:function(e){var t=H(e);return this.filter(function(){for(var e=0,n=t.length;e<n;e++)if(H.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){
// If this is a positional selector, check membership in the returned set
// so $("p:first").is("p:last") won't return true for a doc with two "p".
return!!e&&("string"==typeof e?de.test(e)?H(e,this.context).index(this[0])>=0:H.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r,i=[],o=this[0];
// Array (deprecated as of jQuery 1.7)
if(H.isArray(e)){for(var a=1;o&&o.ownerDocument&&o!==t;){for(n=0;n<e.length;n++)H(o).is(e[n])&&i.push({selector:e[n],elem:o,level:a});o=o.parentNode,a++}return i}
// String
var s=de.test(e)||"string"!=typeof e?H(e,t||this.context):0;for(n=0,r=this.length;n<r;n++)for(o=this[n];o;){if(s?s.index(o)>-1:H.find.matchesSelector(o,e)){i.push(o);break}if(o=o.parentNode,!o||!o.ownerDocument||o===t||11===o.nodeType)break}return i=i.length>1?H.unique(i):i,this.pushStack(i,"closest",e)},
// Determine the position of an element within
// the matched set of elements
index:function(e){
// No argument, return index in parent
// No argument, return index in parent
// index in selector
// If it receives a jQuery object, the first element is used
return e?"string"==typeof e?H.inArray(this[0],H(e)):H.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?H(e,t):H.makeArray(e&&e.nodeType?[e]:e),r=H.merge(this.get(),n);return this.pushStack(l(n[0])||l(r[0])?r:H.unique(r))},andSelf:function(){return this.add(this.prevObject)}}),H.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return H.dir(e,"parentNode")},parentsUntil:function(e,t,n){return H.dir(e,"parentNode",n)},next:function(e){return H.nth(e,2,"nextSibling")},prev:function(e){return H.nth(e,2,"previousSibling")},nextAll:function(e){return H.dir(e,"nextSibling")},prevAll:function(e){return H.dir(e,"previousSibling")},nextUntil:function(e,t,n){return H.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return H.dir(e,"previousSibling",n)},siblings:function(e){return H.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return H.sibling(e.firstChild)},contents:function(e){return H.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:H.makeArray(e.childNodes)}},function(e,t){H.fn[e]=function(n,r){var i=H.map(this,t,n);return se.test(e)||(r=n),r&&"string"==typeof r&&(i=H.filter(r,i)),i=this.length>1&&!pe[e]?H.unique(i):i,(this.length>1||ue.test(r))&&le.test(e)&&(i=i.reverse()),this.pushStack(i,e,fe.call(arguments).join(","))}}),H.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?H.find.matchesSelector(t[0],e)?[t[0]]:[]:H.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!H(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},nth:function(e,t,n,r){t=t||1;for(var i=0;e&&(1!==e.nodeType||++i!==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 he="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",me=/ jQuery\d+="(?:\d+|null)"/g,ge=/^\s+/,ye=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ve=/<([\w:]+)/,be=/<tbody/i,xe=/<|&#?\w+;/,Te=/<(?:script|style)/i,we=/<(?:script|object|embed|option|style)/i,Ne=new RegExp("<(?:"+he+")[\\s/>]","i"),
// checked="checked" or checked
Ce=/checked\s*(?:[^=]|=\s*.checked.)/i,Ee=/\/(java|ecma)script/i,ke=/^\s*<!(?:\[CDATA\[|\-\-)/,Se={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,"",""]},Ae=c(F);Se.optgroup=Se.option,Se.tbody=Se.tfoot=Se.colgroup=Se.caption=Se.thead,Se.th=Se.td,
// IE can't serialize <link> and <script> tags normally
H.support.htmlSerialize||(Se._default=[1,"div<div>","</div>"]),H.fn.extend({text:function(e){return H.access(this,function(e){return e===t?H.text(this):this.empty().append((this[0]&&this[0].ownerDocument||F).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(H.isFunction(e))return this.each(function(t){H(this).wrapAll(e.call(this,t))});if(this[0]){
// The elements to wrap the target around
var t=H(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 H.isFunction(e)?this.each(function(t){H(this).wrapInner(e.call(this,t))}):this.each(function(){var t=H(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=H.isFunction(e);return this.each(function(n){H(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){H.nodeName(this,"body")||H(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(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=H.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,H.clean(arguments)),e}},
// keepData is for internal use only--do not document
remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)e&&!H.filter(e,[n]).length||(t||1!==n.nodeType||(H.cleanData(n.getElementsByTagName("*")),H.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)
// Remove any remaining nodes
for(
// Remove element nodes and prevent memory leaks
1===e.nodeType&&H.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 H.clone(this,e,t)})},html:function(e){return H.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(me,""):null;if("string"==typeof e&&!Te.test(e)&&(H.support.leadingWhitespace||!ge.test(e))&&!Se[(ve.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(ye,"<$1></$2>");try{for(;r<i;r++)
// Remove element nodes and prevent memory leaks
n=this[r]||{},1===n.nodeType&&(H.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){
// Make sure that the elements are removed from the DOM before they are inserted
// this can help fix replacing a parent with child elements
return this[0]&&this[0].parentNode?H.isFunction(e)?this.each(function(t){var n=H(this),r=n.html();n.replaceWith(e.call(this,t,r))}):("string"!=typeof e&&(e=H(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;H(this).remove(),t?H(t).before(e):H(n).append(e)})):this.length?this.pushStack(H(H.isFunction(e)?e():e),"replaceWith",e):this},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){var i,o,a,s,l=e[0],u=[];
// We can't cloneNode fragments that contain checked, in WebKit
if(!H.support.checkClone&&3===arguments.length&&"string"==typeof l&&Ce.test(l))return this.each(function(){H(this).domManip(e,n,r,!0)});if(H.isFunction(l))return this.each(function(i){var o=H(this);e[0]=l.call(this,i,n?o.html():t),o.domManip(e,n,r)});if(this[0]){if(s=l&&l.parentNode,
// If we're in a fragment, just use that instead of building a new one
i=H.support.parentNode&&s&&11===s.nodeType&&s.childNodes.length===this.length?{fragment:s}:H.buildFragment(e,this,u),a=i.fragment,o=1===a.childNodes.length?a=a.firstChild:a.firstChild){n=n&&H.nodeName(o,"tr");for(var c=0,d=this.length,p=d-1;c<d;c++)r.call(n?f(this[c],o):this[c],
// Make sure that we do not leak memory by inadvertently discarding
// the original fragment (which might have attached data) instead of
// using it; in addition, use the original fragment object for the last
// item instead of first because it can end up being emptied incorrectly
// in certain situations (Bug #8070).
// Fragments from the fragment cache must always be cloned and never used
// in place.
i.cacheable||d>1&&c<p?H.clone(a,!0,!0):a)}u.length&&H.each(u,function(e,t){t.src?H.ajax({type:"GET",global:!1,url:t.src,async:!1,dataType:"script"}):H.globalEval((t.text||t.textContent||t.innerHTML||"").replace(ke,"/*$0*/")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),H.buildFragment=function(e,t,n){var r,i,o,a,s=e[0];
// nodes may contain either an explicit document object,
// a jQuery collection or context object.
// If nodes[0] contains a valid object to assign to doc
// Ensure that an attr object doesn't incorrectly stand in as a document object
// Chrome and Firefox seem to allow this to occur and will throw exception
// Fixes #8950
// Only cache "small" (1/2 KB) HTML strings that are associated with the main document
// Cloning options loses the selected state, so don't cache them
// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
// Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
return t&&t[0]&&(a=t[0].ownerDocument||t[0]),a.createDocumentFragment||(a=F),!(1===e.length&&"string"==typeof s&&s.length<512&&a===F&&"<"===s.charAt(0))||we.test(s)||!H.support.checkClone&&Ce.test(s)||!H.support.html5Clone&&Ne.test(s)||(i=!0,o=H.fragments[s],o&&1!==o&&(r=o)),r||(r=a.createDocumentFragment(),H.clean(e,a,r,n)),i&&(H.fragments[s]=o?r:1),{fragment:r,cacheable:i}},H.fragments={},H.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){H.fn[e]=function(n){var r=[],i=H(n),o=1===this.length&&this[0].parentNode;if(o&&11===o.nodeType&&1===o.childNodes.length&&1===i.length)return i[t](this[0]),this;for(var a=0,s=i.length;a<s;a++){var l=(a>0?this.clone(!0):this).get();H(i[a])[t](l),r=r.concat(l)}return this.pushStack(r,e,i.selector)}}),H.extend({clone:function(e,t,n){var r,i,o,
// IE<=8 does not properly clone detached, unknown element nodes
a=H.support.html5Clone||H.isXMLDoc(e)||!Ne.test("<"+e.nodeName+">")?e.cloneNode(!0):y(e);if(!(H.support.noCloneEvent&&H.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||H.isXMLDoc(e)))
// Weird iteration because IE will replace the length property
// with an element if you are cloning the body and one of the
// elements on the page has a name or id of "length"
for(
// IE copies events bound via attachEvent when using cloneNode.
// Calling detachEvent on the clone will also remove the events
// from the original. In order to get around this, we use some
// proprietary methods to clear the events. Thanks to MooTools
// guys for this hotness.
p(e,a),
// Using Sizzle here is crazy slow, so we use getElementsByTagName instead
r=h(e),i=h(a),o=0;r[o];++o)
// Ensure that the destination node is not null; Fixes #9587
i[o]&&p(r[o],i[o]);
// Copy the events from the original to the clone
if(t&&(d(e,a),n))for(r=h(e),i=h(a),o=0;r[o];++o)d(r[o],i[o]);
// Return the cloned set
return r=i=null,a},clean:function(e,t,n,r){var i,o,a,s=[];t=t||F,
// !context.createElement fails in IE with an error but returns typeof 'object'
"undefined"==typeof t.createElement&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||F);for(var l,u=0;null!=(l=e[u]);u++)if("number"==typeof l&&(l+=""),l){
// Convert html string into DOM nodes
if("string"==typeof l)if(xe.test(l)){
// Fix "XHTML"-style tags in all browsers
l=l.replace(ye,"<$1></$2>");
// Trim whitespace, otherwise indexOf won't work as expected
var f,d=(ve.exec(l)||["",""])[1].toLowerCase(),p=Se[d]||Se._default,h=p[0],m=t.createElement("div"),y=Ae.childNodes;
// Move to the right depth
for(
// Append wrapper element to unknown element safe doc fragment
t===F?
// Use the fragment we've already created for this document
Ae.appendChild(m):
// Use a fragment created with the owner document
c(t).appendChild(m),
// Go to html and back, then peel off extra wrappers
m.innerHTML=p[1]+l+p[2];h--;)m=m.lastChild;
// Remove IE's autoinserted <tbody> from table fragments
if(!H.support.tbody){
// String was a <table>, *may* have spurious <tbody>
var v=be.test(l),b="table"!==d||v?
// String was a bare <thead> or <tfoot>
"<table>"!==p[1]||v?[]:m.childNodes:m.firstChild&&m.firstChild.childNodes;for(a=b.length-1;a>=0;--a)H.nodeName(b[a],"tbody")&&!b[a].childNodes.length&&b[a].parentNode.removeChild(b[a])}
// IE completely kills leading whitespace when innerHTML is used
!H.support.leadingWhitespace&&ge.test(l)&&m.insertBefore(t.createTextNode(ge.exec(l)[0]),m.firstChild),l=m.childNodes,
// Clear elements from DocumentFragment (safeFragment or otherwise)
// to avoid hoarding elements. Fixes #11356
m&&(m.parentNode.removeChild(m),
// Guard against -1 index exceptions in FF3.6
y.length>0&&(f=y[y.length-1],f&&f.parentNode&&f.parentNode.removeChild(f)))}else l=t.createTextNode(l);
// Resets defaultChecked for any radios and checkboxes
// about to be appended to the DOM in IE 6/7 (#8060)
var x;if(!H.support.appendChecked)if(l[0]&&"number"==typeof(x=l.length))for(a=0;a<x;a++)g(l[a]);else g(l);l.nodeType?s.push(l):s=H.merge(s,l)}if(n)for(i=function(e){return!e.type||Ee.test(e.type)},u=0;s[u];u++)if(o=s[u],r&&H.nodeName(o,"script")&&(!o.type||Ee.test(o.type)))r.push(o.parentNode?o.parentNode.removeChild(o):o);else{if(1===o.nodeType){var T=H.grep(o.getElementsByTagName("script"),i);s.splice.apply(s,[u+1,0].concat(T))}n.appendChild(o)}return s},cleanData:function(e){for(var t,n,r,i=H.cache,o=H.event.special,a=H.support.deleteExpando,s=0;null!=(r=e[s]);s++)if((!r.nodeName||!H.noData[r.nodeName.toLowerCase()])&&(n=r[H.expando])){if(t=i[n],t&&t.events){for(var l in t.events)o[l]?H.event.remove(r,l):H.removeEvent(r,l,t.handle);
// Null the DOM reference to avoid IE6/7/8 leak (#7054)
t.handle&&(t.handle.elem=null)}a?delete r[H.expando]:r.removeAttribute&&r.removeAttribute(H.expando),delete i[n]}}});var Le,De,je,Fe=/alpha\([^)]*\)/i,Me=/opacity=([^)]*)/,
// fixed for IE9, see #8346
_e=/([A-Z]|^ms)/g,He=/^[\-+]?(?:\d*\.)?\d+$/i,Oe=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,Be=/^([\-+])=([\-+.\de]+)/,Pe=/^margin/,qe={position:"absolute",visibility:"hidden",display:"block"},
// order is important!
We=["Top","Right","Bottom","Left"];H.fn.css=function(e,n){return H.access(this,function(e,n,r){return r!==t?H.style(e,n,r):H.css(e,n)},e,n,arguments.length>1)},H.extend({
// Add in style property hooks for overriding the default
// behavior of getting and setting a style property
cssHooks:{opacity:{get:function(e,t){if(t){
// We should always get a number back from opacity
var n=Le(e,"opacity");return""===n?"1":n}return e.style.opacity}}},
// Exclude the following css properties to add px
cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},
// Add in properties whose names you wish to fix before
// setting or getting the value
cssProps:{
// normalize float css property
"float":H.support.cssFloat?"cssFloat":"styleFloat"},
// Get and set the style property on a DOM Node
style:function(e,n,r,i){
// Don't set styles on text and comment nodes
if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){
// Make sure that we're working with the right name
var o,a,s=H.camelCase(n),l=e.style,u=H.cssHooks[s];
// Check if we're setting a value
if(n=H.cssProps[s]||s,r===t)
// If a hook was provided get the non-computed value from there
// If a hook was provided get the non-computed value from there
return u&&"get"in u&&(o=u.get(e,!1,i))!==t?o:l[n];
// Make sure that NaN and null values aren't set. See: #7116
if(a=typeof r,
// convert relative number strings (+= or -=) to relative numbers. #7345
"string"===a&&(o=Be.exec(r))&&(r=+(o[1]+1)*+o[2]+parseFloat(H.css(e,n)),
// Fixes bug #9237
a="number"),!(null==r||"number"===a&&isNaN(r)||(
// If a number was passed in, add 'px' to the (except for certain CSS properties)
"number"!==a||H.cssNumber[s]||(r+="px"),u&&"set"in u&&(r=u.set(e,r))===t)))
// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
// Fixes bug #5509
try{l[n]=r}catch(c){}}},css:function(e,n,r){var i,o;
// If a hook was provided get the computed value from there
// Make sure that we're working with the right name
// cssFloat needs a special treatment
// If a hook was provided get the computed value from there
return n=H.camelCase(n),o=H.cssHooks[n],n=H.cssProps[n]||n,"cssFloat"===n&&(n="float"),o&&"get"in o&&(i=o.get(e,!0,r))!==t?i:Le?Le(e,n):void 0},
// A method for quickly swapping in/out CSS properties to get correct calculations
swap:function(e,t,n){var r,i,o={};
// Remember the old values, and insert the new ones
for(i in t)o[i]=e.style[i],e.style[i]=t[i];r=n.call(e);
// Revert the old values
for(i in t)e.style[i]=o[i];return r}}),
// DEPRECATED in 1.3, Use jQuery.css() instead
H.curCSS=H.css,F.defaultView&&F.defaultView.getComputedStyle&&(De=function(e,t){var n,r,i,o,a=e.style;
// A tribute to the "awesome hack by Dean Edwards"
// WebKit uses "computed value (percentage if specified)" instead of "used value" for margins
// which is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
return t=t.replace(_e,"-$1").toLowerCase(),(r=e.ownerDocument.defaultView)&&(i=r.getComputedStyle(e,null))&&(n=i.getPropertyValue(t),""!==n||H.contains(e.ownerDocument.documentElement,e)||(n=H.style(e,t))),!H.support.pixelMargin&&i&&Pe.test(t)&&Oe.test(n)&&(o=a.width,a.width=n,n=i.width,a.width=o),n}),F.documentElement.currentStyle&&(je=function(e,t){var n,r,i,o=e.currentStyle&&e.currentStyle[t],a=e.style;
// Avoid setting ret to empty string here
// so we don't default to auto
// From the awesome hack by Dean Edwards
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
// If we're not dealing with a regular pixel number
// but a number that has a weird ending, we need to convert it to pixels
// Remember the original values
// Put in the new values to get a computed value out
// Revert the changed values
return null==o&&a&&(i=a[t])&&(o=i),Oe.test(o)&&(n=a.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),a.left="fontSize"===t?"1em":o,o=a.pixelLeft+"px",a.left=n,r&&(e.runtimeStyle.left=r)),""===o?"auto":o}),Le=De||je,H.each(["height","width"],function(e,t){H.cssHooks[t]={get:function(e,n,r){if(n)return 0!==e.offsetWidth?v(e,t,r):H.swap(e,qe,function(){return v(e,t,r)})},set:function(e,t){return He.test(t)?t+"px":t}}}),H.support.opacity||(H.cssHooks.opacity={get:function(e,t){
// IE uses filters for opacity
return Me.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=H.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";
// IE has trouble with opacity if it does not have layout
// Force it by setting the zoom level
n.zoom=1,
// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
t>=1&&""===H.trim(o.replace(Fe,""))&&(
// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
// if "filter:" is present at all, clearType is disabled, we want to avoid this
// style.removeAttribute is IE Only, but so apparently is this code path...
n.removeAttribute("filter"),r&&!r.filter)||(
// otherwise, set new filter values
n.filter=Fe.test(o)?o.replace(Fe,i):o+" "+i)}}),H(function(){
// This hook cannot be added until DOM ready because the support test
// for it is not run until after DOM ready
H.support.reliableMarginRight||(H.cssHooks.marginRight={get:function(e,t){
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
// Work around by temporarily setting element display to inline-block
return H.swap(e,{display:"inline-block"},function(){return t?Le(e,"margin-right"):e.style.marginRight})}})}),H.expr&&H.expr.filters&&(H.expr.filters.hidden=function(e){var t=e.offsetWidth,n=e.offsetHeight;return 0===t&&0===n||!H.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||H.css(e,"display"))},H.expr.filters.visible=function(e){return!H.expr.filters.hidden(e)}),
// These hooks are used by animate to expand properties
H.each({margin:"",padding:"",border:"Width"},function(e,t){H.cssHooks[e+t]={expand:function(n){var r,
// assumes a single number if not a string
i="string"==typeof n?n.split(" "):[n],o={};for(r=0;r<4;r++)o[e+We[r]+t]=i[r]||i[r-2]||i[0];return o}}});var
// Document location
Ie,
// Document location segments
$e,Re=/%20/g,Xe=/\[\]$/,ze=/\r?\n/g,Ve=/#.*$/,Ue=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,// IE leaves an \r character at EOL
Ge=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
// #7653, #8125, #8152: local protocol detection
Ye=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Je=/^(?:GET|HEAD)$/,Qe=/^\/\//,Ke=/\?/,Ze=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,et=/^(?:select|textarea)/i,tt=/\s+/,nt=/([?&])_=[^&]*/,rt=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
// Keep a copy of the old load method
it=H.fn.load,/* Prefilters
	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
	 * 2) These are called:
	 *    - BEFORE asking for a transport
	 *    - AFTER param serialization (s.data is a string if s.processData is true)
	 * 3) key is the dataType
	 * 4) the catchall symbol "*" can be used
	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
	 */
ot={},/* Transports bindings
	 * 1) key is the dataType
	 * 2) the catchall symbol "*" can be used
	 * 3) selection will start with transport dataType and THEN go to "*" if needed
	 */
at={},
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
st=["*/"]+["*"];
// #8138, IE may throw an exception when accessing
// a field from window.location if document.domain has been set
try{Ie=_.href}catch(lt){
// Use the href attribute of an A element
// since IE will modify it given document.location
Ie=F.createElement("a"),Ie.href="",Ie=Ie.href}
// Segment location into parts
$e=rt.exec(Ie.toLowerCase())||[],H.fn.extend({load:function(e,n,r){if("string"!=typeof e&&it)return it.apply(this,arguments);if(!this.length)return this;var i=e.indexOf(" ");if(i>=0){var o=e.slice(i,e.length);e=e.slice(0,i)}
// Default to a GET request
var a="GET";
// If the second parameter was provided
n&&(
// If it's a function
H.isFunction(n)?(
// We assume that it's the callback
r=n,n=t):"object"==typeof n&&(n=H.param(n,H.ajaxSettings.traditional),a="POST"));var s=this;
// Request the remote document
return H.ajax({url:e,type:a,dataType:"html",data:n,
// Complete callback (responseText is used internally)
complete:function(e,t,n){
// Store the response as specified by the jqXHR object
n=e.responseText,
// If successful, inject the HTML into all the matched elements
e.isResolved()&&(
// #4825: Get the actual response in case
// a dataFilter is present in ajaxSettings
e.done(function(e){n=e}),
// See if a selector was specified
s.html(o?
// Create a dummy div to hold the results
H("<div>").append(n.replace(Ze,"")).find(o):
// If not, just inject the full result
n)),r&&s.each(r,[n,t,e])}}),this},serialize:function(){return H.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?H.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||et.test(this.nodeName)||Ge.test(this.type))}).map(function(e,t){var n=H(this).val();return null==n?null:H.isArray(n)?H.map(n,function(e,n){return{name:t.name,value:e.replace(ze,"\r\n")}}):{name:t.name,value:n.replace(ze,"\r\n")}}).get()}}),
// Attach a bunch of functions for handling common AJAX events
H.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){H.fn[t]=function(e){return this.on(t,e)}}),H.each(["get","post"],function(e,n){H[n]=function(e,r,i,o){
// shift arguments if data argument was omitted
return H.isFunction(r)&&(o=o||i,i=r,r=t),H.ajax({type:n,url:e,data:r,success:i,dataType:o})}}),H.extend({getScript:function(e,n){return H.get(e,t,n,"script")},getJSON:function(e,t,n){return H.get(e,t,n,"json")},
// Creates a full fledged settings object into target
// with both ajaxSettings and settings fields.
// If target is omitted, writes into ajaxSettings.
ajaxSetup:function(e,t){
// Building a settings object
// Extending ajaxSettings
return t?T(e,H.ajaxSettings):(t=e,e=H.ajaxSettings),T(e,t),e},ajaxSettings:{url:Ie,isLocal:Ye.test($e[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,/*
		timeout: 0,
		data: null,
		dataType: null,
		username: null,
		password: null,
		cache: null,
		traditional: false,
		headers: {},
		*/
accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":st},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},
// List of data converters
// 1) key format is "source_type destination_type" (a single space in-between)
// 2) the catchall symbol "*" can be used for source_type
converters:{
// Convert anything to text
"* text":e.String,
// Text to html (true = no transformation)
"text html":!0,
// Evaluate text as a json expression
"text json":H.parseJSON,
// Parse text as xml
"text xml":H.parseXML},
// For options that shouldn't be deep extended:
// you can add your own custom options here if
// and when you create one that shouldn't be
// deep extended (see ajaxExtend)
flatOptions:{context:!0,url:!0}},ajaxPrefilter:b(ot),ajaxTransport:b(at),
// Main method
ajax:function(e,n){
// Callback for when everything is done
// It is defined here because jslint complains if it is declared
// at the end of the function (which would be more logical and readable)
function r(e,n,r,a){
// Called once
if(2!==T){
// State is "done" now
T=2,
// Clear timeout if it exists
l&&clearTimeout(l),
// Dereference transport for early garbage collection
// (no matter how long the jqXHR object will be used)
s=t,
// Cache response headers
o=a||"",
// Set readyState
w.readyState=e>0?4:0;var u,f,v,b,x,E=n,k=r?N(d,w,r):t;
// If successful, handle type chaining
if(e>=200&&e<300||304===e)
// If not modified
if(
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
d.ifModified&&((b=w.getResponseHeader("Last-Modified"))&&(H.lastModified[i]=b),(x=w.getResponseHeader("Etag"))&&(H.etag[i]=x)),304===e)E="notmodified",u=!0;else try{f=C(d,k),E="success",u=!0}catch(S){
// We have a parsererror
E="parsererror",v=S}else
// We extract error from statusText
// then normalize statusText and status for non-aborts
v=E,E&&!e||(E="error",e<0&&(e=0));
// Set data for the fake xhr object
w.status=e,w.statusText=""+(n||E),
// Success/Error
u?m.resolveWith(p,[f,E,w]):m.rejectWith(p,[w,E,v]),
// Status-dependent callbacks
w.statusCode(y),y=t,c&&h.trigger("ajax"+(u?"Success":"Error"),[w,d,u?f:v]),
// Complete
g.fireWith(p,[w,E]),c&&(h.trigger("ajaxComplete",[w,d]),
// Handle the global AJAX counter
--H.active||H.event.trigger("ajaxStop"))}}
// If url is an object, simulate pre-1.5 signature
"object"==typeof e&&(n=e,e=t),
// Force options to be an object
n=n||{};var
// ifModified key
i,
// Response headers
o,a,
// transport
s,
// timeout handle
l,
// Cross-domain detection vars
u,
// To know if global events are to be dispatched
c,
// Loop variable
f,// Create the final options object
d=H.ajaxSetup({},n),
// Callbacks context
p=d.context||d,
// Context for global events
// It's the callbackContext if one was provided in the options
// and if it's a DOM node or a jQuery collection
h=p!==d&&(p.nodeType||p instanceof H)?H(p):H.event,
// Deferreds
m=H.Deferred(),g=H.Callbacks("once memory"),
// Status-dependent callbacks
y=d.statusCode||{},
// Headers (they are sent all at once)
v={},b={},
// The jqXHR state
T=0,
// Fake xhr
w={readyState:0,
// Caches the header
setRequestHeader:function(e,t){if(!T){var n=e.toLowerCase();e=b[n]=b[n]||e,v[e]=t}return this},
// Raw string
getAllResponseHeaders:function(){return 2===T?o:null},
// Builds headers hashtable if needed
getResponseHeader:function(e){var n;if(2===T){if(!a)for(a={};n=Ue.exec(o);)a[n[1].toLowerCase()]=n[2];n=a[e.toLowerCase()]}return n===t?null:n},
// Overrides response content-type header
overrideMimeType:function(e){return T||(d.mimeType=e),this},
// Cancel the request
abort:function(e){return e=e||"abort",s&&s.abort(e),r(0,e),this}};
// If request was aborted inside a prefilter, stop there
if(
// Attach deferreds
m.promise(w),w.success=w.done,w.error=w.fail,w.complete=g.add,
// Status-dependent callbacks
w.statusCode=function(e){if(e){var t;if(T<2)for(t in e)y[t]=[y[t],e[t]];else t=e[w.status],w.then(t,t)}return this},
// Remove hash character (#7531: and string promotion)
// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
// We also use the url parameter if available
d.url=((e||d.url)+"").replace(Ve,"").replace(Qe,$e[1]+"//"),
// Extract dataTypes list
d.dataTypes=H.trim(d.dataType||"*").toLowerCase().split(tt),
// Determine if a cross-domain request is in order
null==d.crossDomain&&(u=rt.exec(d.url.toLowerCase()),d.crossDomain=!(!u||u[1]==$e[1]&&u[2]==$e[2]&&(u[3]||("http:"===u[1]?80:443))==($e[3]||("http:"===$e[1]?80:443)))),
// Convert data if not already a string
d.data&&d.processData&&"string"!=typeof d.data&&(d.data=H.param(d.data,d.traditional)),
// Apply prefilters
x(ot,d,n,w),2===T)return!1;
// More options handling for requests with no content
if(
// We can fire global events as of now if asked to
c=d.global,
// Uppercase the type
d.type=d.type.toUpperCase(),
// Determine if request has content
d.hasContent=!Je.test(d.type),
// Watch for a new set of requests
c&&0===H.active++&&H.event.trigger("ajaxStart"),!d.hasContent&&(
// If data is available, append data to url
d.data&&(d.url+=(Ke.test(d.url)?"&":"?")+d.data,
// #9682: remove data so that it's not used in an eventual retry
delete d.data),
// Get ifModifiedKey before adding the anti-cache parameter
i=d.url,d.cache===!1)){var E=H.now(),
// try replacing _= if it is there
k=d.url.replace(nt,"$1_="+E);
// if nothing was replaced, add timestamp to the end
d.url=k+(k===d.url?(Ke.test(d.url)?"&":"?")+"_="+E:"")}
// Set the correct header, if data is being sent
(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",d.contentType),
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
d.ifModified&&(i=i||d.url,H.lastModified[i]&&w.setRequestHeader("If-Modified-Since",H.lastModified[i]),H.etag[i]&&w.setRequestHeader("If-None-Match",H.etag[i])),
// Set the Accepts header for the server, depending on the dataType
w.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+st+"; q=0.01":""):d.accepts["*"]);
// Check for headers option
for(f in d.headers)w.setRequestHeader(f,d.headers[f]);
// Allow custom headers/mimetypes and early abort
if(d.beforeSend&&(d.beforeSend.call(p,w,d)===!1||2===T))
// Abort if not done already
return w.abort(),!1;
// Install callbacks on deferreds
for(f in{success:1,error:1,complete:1})w[f](d[f]);
// If no transport, we auto-abort
if(
// Get transport
s=x(at,d,n,w)){w.readyState=1,
// Send global event
c&&h.trigger("ajaxSend",[w,d]),
// Timeout
d.async&&d.timeout>0&&(l=setTimeout(function(){w.abort("timeout")},d.timeout));try{T=1,s.send(v,r)}catch(S){
// Propagate exception as error if not done
if(!(T<2))throw S;r(-1,S)}}else r(-1,"No Transport");return w},
// Serialize an array of form elements or a set of
// key/values into a query string
param:function(e,n){var r=[],i=function(e,t){
// If value is a function, invoke it and return its value
t=H.isFunction(t)?t():t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};
// If an array was passed in, assume that it is an array of form elements.
if(
// Set traditional to true for jQuery <= 1.3.2 behavior.
n===t&&(n=H.ajaxSettings.traditional),H.isArray(e)||e.jquery&&!H.isPlainObject(e))
// Serialize the form elements
H.each(e,function(){i(this.name,this.value)});else
// If traditional, encode the "old" way (the way 1.3.2 or older
// did it), otherwise encode params recursively.
for(var o in e)w(o,e[o],n,i);
// Return the resulting serialization
return r.join("&").replace(Re,"+")}}),
// This is still on the jQuery object... for now
// Want to move this to jQuery.ajax some day
H.extend({
// Counter for holding the number of active queries
active:0,
// Last-Modified header cache for next request
lastModified:{},etag:{}});var ut=H.now(),ct=/(\=)\?(&|$)|\?\?/i;
// Default jsonp settings
H.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return H.expando+"_"+ut++}}),
// Detect, normalize options and install callbacks for jsonp requests
H.ajaxPrefilter("json jsonp",function(t,n,r){var i="string"==typeof t.data&&/^application\/x\-www\-form\-urlencoded/.test(t.contentType);if("jsonp"===t.dataTypes[0]||t.jsonp!==!1&&(ct.test(t.url)||i&&ct.test(t.data))){var o,a=t.jsonpCallback=H.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s=e[a],l=t.url,u=t.data,c="$1"+a+"$2";
// Delegate to script
// Add callback manually
// Install callback
// Clean-up function
// Use data converter to retrieve json after script execution
// force json dataType
return t.jsonp!==!1&&(l=l.replace(ct,c),t.url===l&&(i&&(u=u.replace(ct,c)),t.data===u&&(l+=(/\?/.test(l)?"&":"?")+t.jsonp+"="+a))),t.url=l,t.data=u,e[a]=function(e){o=[e]},r.always(function(){
// Set callback back to previous value
e[a]=s,
// Call if it was a function and we have a response
o&&H.isFunction(s)&&e[a](o[0])}),t.converters["script json"]=function(){return o||H.error(a+" was not called"),o[0]},t.dataTypes[0]="json","script"}}),
// Install script dataType
H.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return H.globalEval(e),e}}}),
// Handle cache's special case and global
H.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),
// Bind script tag hack transport
H.ajaxTransport("script",function(e){
// This transport only deals with cross domain requests
if(e.crossDomain){var n,r=F.head||F.getElementsByTagName("head")[0]||F.documentElement;return{send:function(i,o){n=F.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,
// Attach handlers for all browsers
n.onload=n.onreadystatechange=function(e,i){(i||!n.readyState||/loaded|complete/.test(n.readyState))&&(
// Handle memory leak in IE
n.onload=n.onreadystatechange=null,
// Remove the script
r&&n.parentNode&&r.removeChild(n),
// Dereference the script
n=t,
// Callback if not abort
i||o(200,"success"))},
// Use insertBefore instead of appendChild  to circumvent an IE6 bug.
// This arises when a base node is used (#2709 and #4378).
r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var ft,// #5280: Internet Explorer will keep connections alive if we don't abort on unload
dt=!!e.ActiveXObject&&function(){
// Abort all pending requests
for(var e in ft)ft[e](0,1)},pt=0;
// Create the request object
// (This is still attached to ajaxSettings for backward compatibility)
H.ajaxSettings.xhr=e.ActiveXObject?/* Microsoft failed to properly
	 * implement the XMLHttpRequest in IE7 (can't request local files),
	 * so we use the ActiveXObject when it is available
	 * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
	 * we need a fallback.
	 */
function(){return!this.isLocal&&E()||k()}:
// For all other browsers, use the standard XMLHttpRequest object
E,
// Determine support properties
function(e){H.extend(H.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(H.ajaxSettings.xhr()),
// Create transport if the browser can provide an xhr
H.support.ajax&&H.ajaxTransport(function(n){
// Cross domain only allowed if supported through XMLHttpRequest
if(!n.crossDomain||H.support.cors){var r;return{send:function(i,o){
// Get a new xhr
var a,s,l=n.xhr();
// Apply custom fields if provided
if(
// Open the socket
// Passing null username, generates a login popup on Opera (#2865)
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(s in n.xhrFields)l[s]=n.xhrFields[s];
// Override mime type if needed
n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),
// X-Requested-With header
// For cross-domain requests, seeing as conditions for a preflight are
// akin to a jigsaw puzzle, we simply never set it to be sure.
// (it can always be set on a per-request basis or even using ajaxSetup)
// For same-domain requests, won't change header if already provided.
n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");
// Need an extra try/catch for cross domain requests in Firefox 3
try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}
// Do send the request
// This may raise an exception which is actually
// handled in jQuery.ajax (so no try/catch here)
l.send(n.hasContent&&n.data||null),
// Listener
r=function(e,i){var s,u,c,f,d;
// Firefox throws exceptions when accessing properties
// of an xhr when a network error occured
// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
try{
// Was never called and is aborted or complete
if(r&&(i||4===l.readyState))
// If it's an abort
if(
// Only called once
r=t,
// Do not keep as active anymore
a&&(l.onreadystatechange=H.noop,dt&&delete ft[a]),i)
// Abort it manually if needed
4!==l.readyState&&l.abort();else{s=l.status,c=l.getAllResponseHeaders(),f={},d=l.responseXML,
// Construct response list
d&&d.documentElement&&(f.xml=d);
// When requesting binary data, IE6-9 will throw an exception
// on any attempt to access responseText (#11426)
try{f.text=l.responseText}catch(e){}
// Firefox throws an exception when accessing
// statusText for faulty cross-domain requests
try{u=l.statusText}catch(p){
// We normalize with Webkit giving an empty statusText
u=""}
// Filter status for non standard behaviors
// If the request is local and we have data: assume a success
// (success with no data won't get notified, that's the best we
// can do given current implementations)
s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(h){i||o(-1,h)}
// Call complete if needed
f&&o(s,u,f,c)},
// if we're in sync mode or it's in cache
// and has been retrieved directly (IE6 & IE7)
// we need to manually fire the callback
n.async&&4!==l.readyState?(a=++pt,dt&&(
// Create the active xhrs callbacks list if needed
// and attach the unload handler
ft||(ft={},H(e).unload(dt)),
// Add to list of active xhrs callbacks
ft[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var ht,mt,gt,yt,vt={},bt=/^(?:toggle|show|hide)$/,xt=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Tt=[
// height animations
["height","marginTop","marginBottom","paddingTop","paddingBottom"],
// width animations
["width","marginLeft","marginRight","paddingLeft","paddingRight"],
// opacity animations
["opacity"]];H.fn.extend({show:function(e,t,n){var r,i;if(e||0===e)return this.animate(L("show",3),e,t,n);for(var o=0,a=this.length;o<a;o++)r=this[o],r.style&&(i=r.style.display,
// Reset the inline display of this element to learn if it is
// being hidden by cascaded rules or not
H._data(r,"olddisplay")||"none"!==i||(i=r.style.display=""),
// Set elements which have been overridden with display: none
// in a stylesheet to whatever the default browser style is
// for such an element
(""===i&&"none"===H.css(r,"display")||!H.contains(r.ownerDocument.documentElement,r))&&H._data(r,"olddisplay",D(r.nodeName)));
// Set the display of most of the elements in a second loop
// to avoid the constant reflow
for(o=0;o<a;o++)r=this[o],r.style&&(i=r.style.display,""!==i&&"none"!==i||(r.style.display=H._data(r,"olddisplay")||""));return this},hide:function(e,t,n){if(e||0===e)return this.animate(L("hide",3),e,t,n);for(var r,i,o=0,a=this.length;o<a;o++)r=this[o],r.style&&(i=H.css(r,"display"),"none"===i||H._data(r,"olddisplay")||H._data(r,"olddisplay",i));
// Set the display of the elements in a second loop
// to avoid the constant reflow
for(o=0;o<a;o++)this[o].style&&(this[o].style.display="none");return this},
// Save the old toggle function
_toggle:H.fn.toggle,toggle:function(e,t,n){var r="boolean"==typeof e;return H.isFunction(e)&&H.isFunction(t)?this._toggle.apply(this,arguments):null==e||r?this.each(function(){var t=r?e:H(this).is(":hidden");H(this)[t?"show":"hide"]()}):this.animate(L("toggle",3),e,t,n),this},fadeTo:function(e,t,n,r){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){function i(){
// XXX 'this' does not always have a nodeName when running the
// test suite
o.queue===!1&&H._mark(this);var t,n,r,i,a,s,l,u,c,f,d,p=H.extend({},o),h=1===this.nodeType,m=h&&H(this).is(":hidden");
// will store per property easing and be used to determine when an animation is complete
p.animatedProperties={};
// first pass over propertys to expand / normalize
for(r in e)if(t=H.camelCase(r),r!==t&&(e[t]=e[r],delete e[r]),(a=H.cssHooks[t])&&"expand"in a){s=a.expand(e[t]),delete e[t];
// not quite $.extend, this wont overwrite keys already present.
// also - reusing 'p' from above because we have the correct "name"
for(r in s)r in e||(e[r]=s[r])}for(t in e){if(n=e[t],
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
H.isArray(n)?(p.animatedProperties[t]=n[1],n=e[t]=n[0]):p.animatedProperties[t]=p.specialEasing&&p.specialEasing[t]||p.easing||"swing","hide"===n&&m||"show"===n&&!m)return p.complete.call(this);!h||"height"!==t&&"width"!==t||(
// Make sure that nothing sneaks out
// Record all 3 overflow attributes because IE does not
// change the overflow attribute when overflowX and
// overflowY are set to the same value
p.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],
// Set display property to inline-block for height/width
// animations on inline elements that are having width/height animated
"inline"===H.css(this,"display")&&"none"===H.css(this,"float")&&(
// inline-level elements accept inline-block;
// block-level elements need to be inline with layout
H.support.inlineBlockNeedsLayout&&"inline"!==D(this.nodeName)?this.style.zoom=1:this.style.display="inline-block"))}null!=p.overflow&&(this.style.overflow="hidden");for(r in e)i=new H.fx(this,p,r),n=e[r],bt.test(n)?(
// Tracks whether to show or hide based on private
// data attached to the element
d=H._data(this,"toggle"+r)||("toggle"===n?m?"show":"hide":0),d?(H._data(this,"toggle"+r,"show"===d?"hide":"show"),i[d]()):i[n]()):(l=xt.exec(n),u=i.cur(),l?(c=parseFloat(l[2]),f=l[3]||(H.cssNumber[r]?"":"px"),
// We need to compute starting value
"px"!==f&&(H.style(this,r,(c||1)+f),u=(c||1)/i.cur()*u,H.style(this,r,u+f)),
// If a +=/-= token was provided, we're doing a relative animation
l[1]&&(c=("-="===l[1]?-1:1)*c+u),i.custom(u,c,f)):i.custom(u,n,""));
// For JS strict compliance
return!0}var o=H.speed(t,n,r);
// Do not change referenced properties as per-property easing will be lost
return H.isEmptyObject(e)?this.each(o.complete,[!1]):(e=H.extend({},e),o.queue===!1?this.each(i):this.queue(o.queue,i))},stop:function(e,n,r){return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){function t(e,t,n){var i=t[n];H.removeData(e,n,!0),i.stop(r)}var n,i=!1,o=H.timers,a=H._data(this);if(
// clear marker counters if we know they won't be
r||H._unmark(!0,this),null==e)for(n in a)a[n]&&a[n].stop&&n.indexOf(".run")===n.length-4&&t(this,a,n);else a[n=e+".run"]&&a[n].stop&&t(this,a,n);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(r?
// force the next step to be the last
o[n](!0):o[n].saveState(),i=!0,o.splice(n,1));
// start the next in the queue if the last step wasn't forced
// timers currently will call their complete callbacks, which will dequeue
// but only if they were gotoEnd
r&&i||H.dequeue(this,e)})}}),
// Generate shortcuts for custom animations
H.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){H.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),H.extend({speed:function(e,t,n){var r=e&&"object"==typeof e?H.extend({},e):{complete:n||!n&&t||H.isFunction(e)&&e,duration:e,easing:n&&t||t&&!H.isFunction(t)&&t};
// normalize opt.queue - true/undefined/null -> "fx"
// Queueing
return r.duration=H.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in H.fx.speeds?H.fx.speeds[r.duration]:H.fx.speeds._default,null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(e){H.isFunction(r.old)&&r.old.call(this),r.queue?H.dequeue(this,r.queue):e!==!1&&H._unmark(this)},r},easing:{linear:function(e){return e},swing:function(e){return-Math.cos(e*Math.PI)/2+.5}},timers:[],fx:function(e,t,n){this.options=t,this.elem=e,this.prop=n,t.orig=t.orig||{}}}),H.fx.prototype={
// Simple function for setting a style value
update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(H.fx.step[this.prop]||H.fx.step._default)(this)},
// Get the current size
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=H.css(this.elem,this.prop);
// Empty strings, null, undefined and "auto" are converted to 0,
// complex values such as "rotate(1rad)" are returned as is,
// simple values such as "10px" are parsed to Float.
return isNaN(e=parseFloat(t))?t&&"auto"!==t?t:0:e},
// Start an animation from one number to another
custom:function(e,n,r){function i(e){return o.step(e)}var o=this,a=H.fx;this.startTime=yt||S(),this.end=n,this.now=this.start=e,this.pos=this.state=0,this.unit=r||this.unit||(H.cssNumber[this.prop]?"":"px"),i.queue=this.options.queue,i.elem=this.elem,i.saveState=function(){H._data(o.elem,"fxshow"+o.prop)===t&&(o.options.hide?H._data(o.elem,"fxshow"+o.prop,o.start):o.options.show&&H._data(o.elem,"fxshow"+o.prop,o.end))},i()&&H.timers.push(i)&&!gt&&(gt=setInterval(a.tick,a.interval))},
// Simple 'show' function
show:function(){var e=H._data(this.elem,"fxshow"+this.prop);
// Remember where we started, so that we can go back to it later
this.options.orig[this.prop]=e||H.style(this.elem,this.prop),this.options.show=!0,
// Begin the animation
// Make sure that we start at a small width/height to avoid any flash of content
e!==t?
// This show is picking up where a previous hide or show left off
this.custom(this.cur(),e):this.custom("width"===this.prop||"height"===this.prop?1:0,this.cur()),
// Start by showing the element
H(this.elem).show()},
// Simple 'hide' function
hide:function(){
// Remember where we started, so that we can go back to it later
this.options.orig[this.prop]=H._data(this.elem,"fxshow"+this.prop)||H.style(this.elem,this.prop),this.options.hide=!0,
// Begin the animation
this.custom(this.cur(),0)},
// Each step of an animation
step:function(e){var t,n,r,i=yt||S(),o=!0,a=this.elem,s=this.options;if(e||i>=s.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),s.animatedProperties[this.prop]=!0;for(t in s.animatedProperties)s.animatedProperties[t]!==!0&&(o=!1);if(o){
// Reset the properties, if the item has been hidden or shown
if(
// Reset the overflow
null==s.overflow||H.support.shrinkWrapBlocks||H.each(["","X","Y"],function(e,t){a.style["overflow"+t]=s.overflow[e]}),
// Hide the element if the "hide" operation was done
s.hide&&H(a).hide(),s.hide||s.show)for(t in s.animatedProperties)H.style(a,t,s.orig[t]),H.removeData(a,"fxshow"+t,!0),
// Toggle data is no longer needed
H.removeData(a,"toggle"+t,!0);
// Execute the complete function
// in the event that the complete function throws an exception
// we must ensure it won't be called twice. #5684
r=s.complete,r&&(s.complete=!1,r.call(a))}return!1}
// classical easing cannot be used with an Infinity duration
// Perform the easing function, defaults to swing
// Perform the next step of the animation
return s.duration==1/0?this.now=i:(n=i-this.startTime,this.state=n/s.duration,this.pos=H.easing[s.animatedProperties[this.prop]](this.state,n,0,1,s.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},H.extend(H.fx,{tick:function(){for(var e,t=H.timers,n=0;n<t.length;n++)e=t[n],
// Checks the timer has not already been removed
e()||t[n]!==e||t.splice(n--,1);t.length||H.fx.stop()},interval:13,stop:function(){clearInterval(gt),gt=null},speeds:{slow:600,fast:200,
// Default speed
_default:400},step:{opacity:function(e){H.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}}}),
// Ensure props that can't be negative don't go there on undershoot easing
H.each(Tt.concat.apply([],Tt),function(e,t){
// exclude marginTop, marginLeft, marginBottom and marginRight from this list
t.indexOf("margin")&&(H.fx.step[t]=function(e){H.style(e.elem,t,Math.max(0,e.now)+e.unit)})}),H.expr&&H.expr.filters&&(H.expr.filters.animated=function(e){return H.grep(H.timers,function(t){return e===t.elem}).length});var wt,Nt=/^t(?:able|d|h)$/i,Ct=/^(?:body|html)$/i;wt="getBoundingClientRect"in F.documentElement?function(e,t,n,r){try{r=e.getBoundingClientRect()}catch(i){}
// Make sure we're not dealing with a disconnected DOM node
if(!r||!H.contains(n,e))return r?{top:r.top,left:r.left}:{top:0,left:0};var o=t.body,a=j(t),s=n.clientTop||o.clientTop||0,l=n.clientLeft||o.clientLeft||0,u=a.pageYOffset||H.support.boxModel&&n.scrollTop||o.scrollTop,c=a.pageXOffset||H.support.boxModel&&n.scrollLeft||o.scrollLeft,f=r.top+u-s,d=r.left+c-l;return{top:f,left:d}}:function(e,t,n){for(var r,i=e.offsetParent,o=e,a=t.body,s=t.defaultView,l=s?s.getComputedStyle(e,null):e.currentStyle,u=e.offsetTop,c=e.offsetLeft;(e=e.parentNode)&&e!==a&&e!==n&&(!H.support.fixedPosition||"fixed"!==l.position);)r=s?s.getComputedStyle(e,null):e.currentStyle,u-=e.scrollTop,c-=e.scrollLeft,e===i&&(u+=e.offsetTop,c+=e.offsetLeft,!H.support.doesNotAddBorder||H.support.doesAddBorderForTableAndCells&&Nt.test(e.nodeName)||(u+=parseFloat(r.borderTopWidth)||0,c+=parseFloat(r.borderLeftWidth)||0),o=i,i=e.offsetParent),H.support.subtractsBorderForOverflowNotVisible&&"visible"!==r.overflow&&(u+=parseFloat(r.borderTopWidth)||0,c+=parseFloat(r.borderLeftWidth)||0),l=r;return"relative"!==l.position&&"static"!==l.position||(u+=a.offsetTop,c+=a.offsetLeft),H.support.fixedPosition&&"fixed"===l.position&&(u+=Math.max(n.scrollTop,a.scrollTop),c+=Math.max(n.scrollLeft,a.scrollLeft)),{top:u,left:c}},H.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){H.offset.setOffset(this,e,t)});var n=this[0],r=n&&n.ownerDocument;return r?n===r.body?H.offset.bodyOffset(n):wt(n,r,r.documentElement):null},H.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return H.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(H.css(e,"marginTop"))||0,n+=parseFloat(H.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=H.css(e,"position");
// set position first, in-case top/left are set even on static elem
"static"===r&&(e.style.position="relative");var i,o,a=H(e),s=a.offset(),l=H.css(e,"top"),u=H.css(e,"left"),c=("absolute"===r||"fixed"===r)&&H.inArray("auto",[l,u])>-1,f={},d={};
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
c?(d=a.position(),i=d.top,o=d.left):(i=parseFloat(l)||0,o=parseFloat(u)||0),H.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):a.css(f)}},H.fn.extend({position:function(){if(!this[0])return null;var e=this[0],
// Get *real* offsetParent
t=this.offsetParent(),
// Get correct offsets
n=this.offset(),r=Ct.test(t[0].nodeName)?{top:0,left:0}:t.offset();
// Subtract the two offsets
// Subtract element margins
// note: when an element has margin: auto the offsetLeft and marginLeft
// are the same in Safari causing offset.left to incorrectly be 0
// Add offsetParent borders
return n.top-=parseFloat(H.css(e,"marginTop"))||0,n.left-=parseFloat(H.css(e,"marginLeft"))||0,r.top+=parseFloat(H.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(H.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||F.body;e&&!Ct.test(e.nodeName)&&"static"===H.css(e,"position");)e=e.offsetParent;return e})}}),
// Create scrollLeft and scrollTop methods
H.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);H.fn[e]=function(i){return H.access(this,function(e,i,o){var a=j(e);return o===t?a?n in a?a[n]:H.support.boxModel&&a.document.documentElement[i]||a.document.body[i]:e[i]:void(a?a.scrollTo(r?H(a).scrollLeft():o,r?o:H(a).scrollTop()):e[i]=o)},e,i,arguments.length,null)}}),
// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
H.each({Height:"height",Width:"width"},function(e,n){var r="client"+e,i="scroll"+e,o="offset"+e;
// innerHeight and innerWidth
H.fn["inner"+e]=function(){var e=this[0];return e?e.style?parseFloat(H.css(e,n,"padding")):this[n]():null},
// outerHeight and outerWidth
H.fn["outer"+e]=function(e){var t=this[0];return t?t.style?parseFloat(H.css(t,n,e?"margin":"border")):this[n]():null},H.fn[n]=function(e){return H.access(this,function(e,n,a){var s,l,u,c;
// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
// Get document width or height
// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
// when a window > document, IE6 reports a offset[Width/Height] > client[Width/Height]
// so we can't use max, as it'll choose the incorrect offset[Width/Height]
// instead we use the correct client[Width/Height]
// support:IE6
// Get width or height on the element
// Set the width or height on the element
return H.isWindow(e)?(s=e.document,l=s.documentElement[r],H.support.boxModel&&l||s.body&&s.body[r]||l):9===e.nodeType?(s=e.documentElement,s[r]>=s[i]?s[r]:Math.max(e.body[i],s[i],e.body[o],s[o])):a===t?(u=H.css(e,n),c=parseFloat(u),H.isNumeric(c)?c:u):void H(e).css(n,a)},n,e,arguments.length,null)}}),
// Expose jQuery to the global object
e.jQuery=e.$=H,
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery
// in a page that all might call define(). The loader will indicate
// they have special allowances for multiple jQuery versions by
// specifying define.amd.jQuery = true. Register as a named module,
// since jQuery can be concatenated with other files that may use define,
// but not use a proper concatenation script that understands anonymous
// AMD modules. A named AMD is safest and most robust way to register.
// Lowercase jquery is used because AMD module names are derived from
// file names, and jQuery is normally delivered in a lowercase file name.
// Do this after creating the global so that if an AMD module wants to call
// noConflict to hide this version of jQuery, it will work.
"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return H})}(window);

/*!
 * jQuery UI @VERSION
 *
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
!function(t,e){
// selectors
function n(e,n){var r=e.nodeName.toLowerCase();if("area"===r){var o,s=e.parentNode,u=s.name;return!(!e.href||!u||"map"!==s.nodeName.toLowerCase())&&(o=t("img[usemap=#"+u+"]")[0],!!o&&i(o))}return(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"==r?e.href||n:n)&&i(e)}function i(e){return!t(e).parents().andSelf().filter(function(){return"hidden"===t.curCSS(this,"visibility")||t.expr.filters.hidden(this)}).length}
// prevent duplicate loading
// this is only a problem because we proxy existing functions
// and we don't want to double proxy them
t.ui=t.ui||{},t.ui.version||(t.extend(t.ui,{version:"@VERSION",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,// COMMAND
COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,// COMMAND_RIGHT
NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),
// plugins
t.fn.extend({propAttr:t.fn.prop||t.fn.attr,_focus:t.fn.focus,focus:function(e,n){return"number"==typeof e?this.each(function(){var i=this;setTimeout(function(){t(i).focus(),n&&n.call(i)},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;return e=t.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.curCSS(this,"position",1))&&/(auto|scroll)/.test(t.curCSS(this,"overflow",1)+t.curCSS(this,"overflow-y",1)+t.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.curCSS(this,"overflow",1)+t.curCSS(this,"overflow-y",1)+t.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(n){if(n!==e)return this.css("zIndex",n);if(this.length)for(var i,r,o=t(this[0]);o.length&&o[0]!==document;){if(
// Ignore z-index if position is set to a value where z-index is ignored by the browser
// This makes behavior of this function consistent across browsers
// WebKit always returns auto if the element is positioned
i=o.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(
// IE returns 0 when zIndex is not specified
// other browsers return a string
// we ignore the case of nested elements with an explicit value of 0
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
r=parseInt(o.css("zIndex"),10),!isNaN(r)&&0!==r))return r;o=o.parent()}return 0},disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.each(["Width","Height"],function(n,i){function r(e,n,i,r){return t.each(o,function(){n-=parseFloat(t.curCSS(e,"padding"+this,!0))||0,i&&(n-=parseFloat(t.curCSS(e,"border"+this+"Width",!0))||0),r&&(n-=parseFloat(t.curCSS(e,"margin"+this,!0))||0)}),n}var o="Width"===i?["Left","Right"]:["Top","Bottom"],s=i.toLowerCase(),u={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(n){return n===e?u["inner"+i].call(this):this.each(function(){t(this).css(s,r(this,n)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?u["outer"+i].call(this,e):this.each(function(){t(this).css(s,r(this,e,!0,n)+"px")})}}),t.extend(t.expr[":"],{data:function(e,n,i){return!!t.data(e,i[3])},focusable:function(e){return n(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var i=t.attr(e,"tabindex"),r=isNaN(i);return(r||i>=0)&&n(e,!r)}}),
// support
t(function(){var e=document.body,n=e.appendChild(n=document.createElement("div"));
// access offsetHeight before setting the style to prevent a layout bug
// in IE 9 which causes the elemnt to continue to take up space even
// after it is removed from the DOM (#8026)
n.offsetHeight,t.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),t.support.minHeight=100===n.offsetHeight,t.support.selectstart="onselectstart"in n,
// set display to none to avoid a layout bug in IE
// http://dev.jquery.com/ticket/4014
e.removeChild(n).style.display="none"}),
// deprecated
t.extend(t.ui,{
// $.ui.plugin is deprecated.  Use the proxy pattern instead.
plugin:{add:function(e,n,i){var r=t.ui[e].prototype;for(var o in i)r.plugins[o]=r.plugins[o]||[],r.plugins[o].push([n,i[o]])},call:function(t,e,n){var i=t.plugins[e];if(i&&t.element[0].parentNode)for(var r=0;r<i.length;r++)t.options[i[r][0]]&&i[r][1].apply(t.element,n)}},
// will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()
contains:function(t,e){return document.compareDocumentPosition?16&t.compareDocumentPosition(e):t!==e&&t.contains(e)},
// only used by resizable
hasScroll:function(e,n){
//If overflow is hidden, the element might have extra content, but the user wants to hide it
if("hidden"===t(e).css("overflow"))return!1;var i=n&&"left"===n?"scrollLeft":"scrollTop",r=!1;
// TODO: determine which cases actually cause this to happen
// if the element doesn't have the scroll set, see if it's possible to
// set the scroll
return e[i]>0||(e[i]=1,r=e[i]>0,e[i]=0,r)},
// these are odd functions, fix the API or move into individual plugins
isOverAxis:function(t,e,n){
//Determines when x coordinate is over "b" element axis
return t>e&&t<e+n},isOver:function(e,n,i,r,o,s){
//Determines when x, y coordinates is over "b" element
return t.ui.isOverAxis(e,i,o)&&t.ui.isOverAxis(n,r,s)}}))}(jQuery);

/*!
 * jQuery UI Widget @VERSION
 *
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
!function(t,e){
// jQuery 1.4+
if(t.cleanData){var i=t.cleanData;t.cleanData=function(e){for(var n,s=0;null!=(n=e[s]);s++)try{t(n).triggerHandler("remove")}catch(a){}i(e)}}else{var n=t.fn.remove;t.fn.remove=function(e,i){return this.each(function(){return i||e&&!t.filter(e,[this]).length||t("*",this).add([this]).each(function(){try{t(this).triggerHandler("remove")}catch(e){}}),n.call(t(this),e,i)})}}t.widget=function(e,i,n){var s,a=e.split(".")[0];e=e.split(".")[1],s=a+"-"+e,n||(n=i,i=t.Widget),
// create selector for plugin
t.expr[":"][s]=function(i){return!!t.data(i,e)},t[a]=t[a]||{},t[a][e]=function(t,e){
// allow instantiation without initializing for simple inheritance
arguments.length&&this._createWidget(t,e)};var r=new i;
// we need to make the options hash a property directly on the new instance
// otherwise we'll modify the options hash on the prototype that we're
// inheriting from
//	$.each( basePrototype, function( key, val ) {
//		if ( $.isPlainObject(val) ) {
//			basePrototype[ key ] = $.extend( {}, val );
//		}
//	});
r.options=t.extend(!0,{},r.options),t[a][e].prototype=t.extend(!0,r,{namespace:a,widgetName:e,widgetEventPrefix:t[a][e].prototype.widgetEventPrefix||e,widgetBaseClass:s},n),t.widget.bridge(e,t[a][e])},t.widget.bridge=function(i,n){t.fn[i]=function(s){var a="string"==typeof s,r=Array.prototype.slice.call(arguments,1),o=this;
// prevent calls to internal methods
// allow multiple hashes to be passed on init
// prevent calls to internal methods
return s=!a&&r.length?t.extend.apply(null,[!0,s].concat(r)):s,a&&"_"===s.charAt(0)?o:(a?this.each(function(){var n=t.data(this,i),a=n&&t.isFunction(n[s])?n[s].apply(n,r):n;
// TODO: add this back in 1.9 and use $.error() (see #5972)
//				if ( !instance ) {
//					throw "cannot call methods on " + name + " prior to initialization; " +
//						"attempted to call method '" + options + "'";
//				}
//				if ( !$.isFunction( instance[options] ) ) {
//					throw "no such method '" + options + "' for " + name + " widget instance";
//				}
//				var methodValue = instance[ options ].apply( instance, args );
if(a!==n&&a!==e)return o=a,!1}):this.each(function(){var e=t.data(this,i);e?e.option(s||{})._init():t.data(this,i,new n(s,this))}),o)}},t.Widget=function(t,e){
// allow instantiation without initializing for simple inheritance
arguments.length&&this._createWidget(t,e)},t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(e,i){
// $.widget.bridge stores the plugin instance, but we do it anyway
// so that it's stored even before the _create function runs
t.data(i,this.widgetName,this),this.element=t(i),this.options=t.extend(!0,{},this.options,this._getCreateOptions(),e);var n=this;this.element.bind("remove."+this.widgetName,function(){n.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return t.metadata&&t.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(i,n){var s=i;if(0===arguments.length)
// don't return a reference to the internal hash
return t.extend({},this.options);if("string"==typeof i){if(n===e)return this.options[i];s={},s[i]=n}return this._setOptions(s),this},_setOptions:function(e){var i=this;return t.each(e,function(t,e){i._setOption(t,e)}),this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&this.widget()[e?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",e),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(e,i,n){var s,a,r=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),
// the original event may come from any element
// so we need to reset the target on the new event
i.target=this.element[0],
// copy original event properties over to the new event
a=i.originalEvent)for(s in a)s in i||(i[s]=a[s]);return this.element.trigger(i,n),!(t.isFunction(r)&&r.call(this.element[0],i,n)===!1||i.isDefaultPrevented())}}}(jQuery);

/*!
 * jQuery UI Mouse @VERSION
 *
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Mouse
 *
 * Depends:
 *	jquery.ui.widget.js
 */
!function(e,t){var s=!1;e(document).mouseup(function(e){s=!1}),e.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(s){if(!0===e.data(s.target,t.widgetName+".preventClickEvent"))return e.removeData(s.target,t.widgetName+".preventClickEvent"),s.stopImmediatePropagation(),!1}),this.started=!1},
// TODO: make sure destroying one instance of mouse doesn't mess with
// other instances of mouse
_mouseDestroy:function(){this.element.unbind("."+this.widgetName),e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){
// don't let more than one widget handle mouseStart
if(!s){
// we may have missed mouseup (out of window)
this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,o=1==t.which,
// event.target.nodeName works around a bug in IE 8 with
// disabled inputs (#7620)
n=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;
// Click event may never have fired (Gecko & Opera)
// these delegates are required to keep context
return!(o&&!n&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),s=!0,!0))}},_mouseMove:function(t){
// IE mouseup check - mouseup happened when mouse was out of window
// IE mouseup check - mouseup happened when mouse was out of window
return!e.browser.msie||document.documentMode>=9||t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target==this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(e){return this.mouseDelayMet},
// These are placeholder methods, to be overriden by extending plugin
_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return!0}})}(jQuery);

/*!
 * jQuery UI Position @VERSION
 *
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Position
 */
!function(t,e){t.ui=t.ui||{};var o=/left|center|right/,i=/top|center|bottom/,n="center",l={},f=t.fn.position,s=t.fn.offset;t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);
// make a copy, we don't want to modify arguments
e=t.extend({},e);var s,r,a,p=t(e.of),h=p[0],c=(e.collision||"flip").split(" "),u=e.offset?e.offset.split(" "):[0,0];
// force left top to allow flipping
// force my and at to have valid horizontal and veritcal positions
// if a value is missing or invalid, it will be converted to center 
// normalize collision option
// normalize offset option
return 9===h.nodeType?(s=p.width(),r=p.height(),a={top:0,left:0}):h.setTimeout?(s=p.width(),r=p.height(),a={top:p.scrollTop(),left:p.scrollLeft()}):h.preventDefault?(e.at="left top",s=r=0,a={top:e.of.pageY,left:e.of.pageX}):(s=p.outerWidth(),r=p.outerHeight(),a=p.offset()),t.each(["my","at"],function(){var t=(e[this]||"").split(" ");1===t.length&&(t=o.test(t[0])?t.concat([n]):i.test(t[0])?[n].concat(t):[n,n]),t[0]=o.test(t[0])?t[0]:n,t[1]=i.test(t[1])?t[1]:n,e[this]=t}),1===c.length&&(c[1]=c[0]),u[0]=parseInt(u[0],10)||0,1===u.length&&(u[1]=u[0]),u[1]=parseInt(u[1],10)||0,"right"===e.at[0]?a.left+=s:e.at[0]===n&&(a.left+=s/2),"bottom"===e.at[1]?a.top+=r:e.at[1]===n&&(a.top+=r/2),a.left+=u[0],a.top+=u[1],this.each(function(){var o,i=t(this),f=i.outerWidth(),p=i.outerHeight(),h=parseInt(t.curCSS(this,"marginLeft",!0))||0,g=parseInt(t.curCSS(this,"marginTop",!0))||0,d=f+h+(parseInt(t.curCSS(this,"marginRight",!0))||0),m=p+g+(parseInt(t.curCSS(this,"marginBottom",!0))||0),y=t.extend({},a);"right"===e.my[0]?y.left-=f:e.my[0]===n&&(y.left-=f/2),"bottom"===e.my[1]?y.top-=p:e.my[1]===n&&(y.top-=p/2),
// prevent fractions if jQuery version doesn't support them (see #5280)
l.fractions||(y.left=Math.round(y.left),y.top=Math.round(y.top)),o={left:y.left-h,top:y.top-g},t.each(["left","top"],function(i,n){t.ui.position[c[i]]&&t.ui.position[c[i]][n](y,{targetWidth:s,targetHeight:r,elemWidth:f,elemHeight:p,collisionPosition:o,collisionWidth:d,collisionHeight:m,offset:u,my:e.my,at:e.at})}),t.fn.bgiframe&&i.bgiframe(),i.offset(t.extend(y,{using:e.using}))})},t.ui.position={fit:{left:function(e,o){var i=t(window),n=o.collisionPosition.left+o.collisionWidth-i.width()-i.scrollLeft();e.left=n>0?e.left-n:Math.max(e.left-o.collisionPosition.left,e.left)},top:function(e,o){var i=t(window),n=o.collisionPosition.top+o.collisionHeight-i.height()-i.scrollTop();e.top=n>0?e.top-n:Math.max(e.top-o.collisionPosition.top,e.top)}},flip:{left:function(e,o){if(o.at[0]!==n){var i=t(window),l=o.collisionPosition.left+o.collisionWidth-i.width()-i.scrollLeft(),f="left"===o.my[0]?-o.elemWidth:"right"===o.my[0]?o.elemWidth:0,s="left"===o.at[0]?o.targetWidth:-o.targetWidth,r=-2*o.offset[0];e.left+=o.collisionPosition.left<0?f+s+r:l>0?f+s+r:0}},top:function(e,o){if(o.at[1]!==n){var i=t(window),l=o.collisionPosition.top+o.collisionHeight-i.height()-i.scrollTop(),f="top"===o.my[1]?-o.elemHeight:"bottom"===o.my[1]?o.elemHeight:0,s="top"===o.at[1]?o.targetHeight:-o.targetHeight,r=-2*o.offset[1];e.top+=o.collisionPosition.top<0?f+s+r:l>0?f+s+r:0}}}},
// offset setter from jQuery 1.4
t.offset.setOffset||(t.offset.setOffset=function(e,o){
// set position first, in-case top/left are set even on static elem
/static/.test(t.curCSS(e,"position"))&&(e.style.position="relative");var i=t(e),n=i.offset(),l=parseInt(t.curCSS(e,"top",!0),10)||0,f=parseInt(t.curCSS(e,"left",!0),10)||0,s={top:o.top-n.top+l,left:o.left-n.left+f};"using"in o?o.using.call(e,s):i.css(s)},t.fn.offset=function(e){var o=this[0];return o&&o.ownerDocument?e?this.each(function(){t.offset.setOffset(this,e)}):s.call(this):null}),
// fraction support test (older versions of jQuery don't support fractions)
function(){var e,o,i,n,f,s=document.getElementsByTagName("body")[0],r=document.createElement("div");
//Create a "fake body" for testing based on method used in jQuery.support
e=document.createElement(s?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},s&&t.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"});for(var a in i)e.style[a]=i[a];e.appendChild(r),o=s||document.documentElement,o.insertBefore(e,o.firstChild),r.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",n=t(r).offset(function(t,e){return e}).offset(),e.innerHTML="",o.removeChild(e),f=n.top+n.left+(s?2e3:0),l.fractions=f>21&&f<22}()}(jQuery);

/*!
 * jQuery UI Draggable @VERSION
 *
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Draggables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
!function(t,e){t.widget("ui.draggable",t.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){"original"!=this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(this.element.data("draggable"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(e){var s=this.options;
// among others, prevent a drag on a resizable-handle
// among others, prevent a drag on a resizable-handle
//Quit if we're not on a valid handle
return!(this.helper||s.disabled||t(e.target).is(".ui-resizable-handle"))&&(this.handle=this._getHandle(e),!!this.handle&&(s.iframeFix&&t(s.iframeFix===!0?"iframe":s.iframeFix).each(function(){t('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0))},_mouseStart:function(e){var s=this.options;
//Trigger event + callbacks
//Create and append the visible helper
//Cache the helper size
//If ddmanager is used for droppables, set the global draggable
/*
		 * - Position generation -
		 * This block generates everything position related - it's the core of draggables.
		 */
//Cache the margins of the original element
//Store the helper's css position
//The element's absolute position on the page minus margins
//Generate the original position
//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
//Set a containment if given in the options
//Trigger event + callbacks
//Recache the helper size
//Prepare the droppable offsets
//Execute the drag once - this causes the helper not to be visible before getting its correct position
//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
return this.helper=this._createHelper(e),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{//Where the click happened, relative to the element
left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),s.containment&&this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.helper.addClass("ui-draggable-dragging"),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,s){
//Call plugins and callbacks and use the resulting position if something is returned
if(
//Compute the helpers position
this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!s){var i=this._uiHash();if(this._trigger("drag",e,i)===!1)return this._mouseUp({}),!1;this.position=i.position}return this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){
//If we are using droppables, inform the manager about the drop
var s=!1;t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),
//if a drop comes from outside (a sortable)
this.dropped&&(s=this.dropped,this.dropped=!1);for(
//if the original element is no longer in the DOM don't bother to continue (see #8269)
var i=this.element[0],o=!1;i&&(i=i.parentNode);)i==document&&(o=!0);if(!o&&"original"===this.options.helper)return!1;if("invalid"==this.options.revert&&!s||"valid"==this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)){var n=this;t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",e)!==!1&&n._clear()})}else this._trigger("stop",e)!==!1&&this._clear();return!1},_mouseUp:function(e){
//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
return this.options.iframeFix===!0&&t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){var s=!this.options.handle||!t(this.options.handle,this.element).length;return t(this.options.handle,this.element).find("*").andSelf().each(function(){this==e.target&&(s=!0)}),s},_createHelper:function(e){var s=this.options,i=t.isFunction(s.helper)?t(s.helper.apply(this.element[0],[e])):"clone"==s.helper?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo("parent"==s.appendTo?this.element[0].parentNode:s.appendTo),i[0]==this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){
//Get the offsetParent and cache its position
this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();
// This is a special case where we need to modify a offset calculated on start, since the following happened:
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
//Ugly IE fix
return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&t.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&t.browser.msie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if("parent"==e.containment&&(e.containment=this.helper[0].parentNode),"document"!=e.containment&&"window"!=e.containment||(this.containment=["document"==e.containment?0:t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"==e.containment?0:t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"==e.containment?0:t(window).scrollLeft())+t("document"==e.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"==e.containment?0:t(window).scrollTop())+(t("document"==e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(e.containment)||e.containment.constructor==Array)e.containment.constructor==Array&&(this.containment=e.containment);else{var s=t(e.containment),i=s[0];if(!i)return;var o=(s.offset(),"hidden"!=t(i).css("overflow"));this.containment=[(parseInt(t(i).css("borderLeftWidth"),10)||0)+(parseInt(t(i).css("paddingLeft"),10)||0),(parseInt(t(i).css("borderTopWidth"),10)||0)+(parseInt(t(i).css("paddingTop"),10)||0),(o?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t(i).css("borderLeftWidth"),10)||0)-(parseInt(t(i).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(o?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t(i).css("borderTopWidth"),10)||0)-(parseInt(t(i).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=s}},_convertPositionTo:function(e,s){s||(s=this.position);var i="absolute"==e?1:-1,o=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),n=/(html|body)/i.test(o[0].tagName);return{top:s.top+this.offset.relative.top*i+this.offset.parent.top*i-(t.browser.safari&&t.browser.version<526&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():n?0:o.scrollTop())*i),left:s.left+this.offset.relative.left*i+this.offset.parent.left*i-(t.browser.safari&&t.browser.version<526&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():n?0:o.scrollLeft())*i)}},_generatePosition:function(e){var s=this.options,i="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&t.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(i[0].tagName),n=e.pageX,r=e.pageY;/*
		 * - Position constraining -
		 * Constrain the position to a mix of grid, containment.
		 */
if(this.originalPosition){//If we are not dragging yet, we won't check for options
var a;if(this.containment){if(this.relative_container){var l=this.relative_container.offset();a=[this.containment[0]+l.left,this.containment[1]+l.top,this.containment[2]+l.left,this.containment[3]+l.top]}else a=this.containment;e.pageX-this.offset.click.left<a[0]&&(n=a[0]+this.offset.click.left),e.pageY-this.offset.click.top<a[1]&&(r=a[1]+this.offset.click.top),e.pageX-this.offset.click.left>a[2]&&(n=a[2]+this.offset.click.left),e.pageY-this.offset.click.top>a[3]&&(r=a[3]+this.offset.click.top)}if(s.grid){
//Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
var h=s.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY;r=a&&(h-this.offset.click.top<a[1]||h-this.offset.click.top>a[3])?h-this.offset.click.top<a[1]?h+s.grid[1]:h-s.grid[1]:h;var c=s.grid[0]?this.originalPageX+Math.round((n-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX;n=a&&(c-this.offset.click.left<a[0]||c-this.offset.click.left>a[2])?c-this.offset.click.left<a[0]?c+s.grid[0]:c-s.grid[0]:c}}return{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(t.browser.safari&&t.browser.version<526&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollTop():o?0:i.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(t.browser.safari&&t.browser.version<526&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollLeft():o?0:i.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]==this.element[0]||this.cancelHelperRemoval||this.helper.remove(),
//if($.ui.ddmanager) $.ui.ddmanager.current = null;
this.helper=null,this.cancelHelperRemoval=!1},
// From now on bulk stuff - mainly helpers
_trigger:function(e,s,i){//The absolute position has to be recalculated after plugins
return i=i||this._uiHash(),t.ui.plugin.call(this,e,[s,i]),"drag"==e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,s,i)},plugins:{},_uiHash:function(t){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.extend(t.ui.draggable,{version:"@VERSION"}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,s){var i=t(this).data("draggable"),o=i.options,n=t.extend({},s,{item:i.element});i.sortables=[],t(o.connectToSortable).each(function(){var s=t.data(this,"sortable");s&&!s.options.disabled&&(i.sortables.push({instance:s,shouldRevert:s.options.revert}),s.refreshPositions(),// Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
s._trigger("activate",e,n))})},stop:function(e,s){
//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
var i=t(this).data("draggable"),o=t.extend({},s,{item:i.element});t.each(i.sortables,function(){this.instance.isOver?(this.instance.isOver=0,i.cancelHelperRemoval=!0,//Don't remove the helper in the draggable instance
this.instance.cancelHelperRemoval=!1,//Remove it in the sortable instance (so sortable plugins like revert still work)
//The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
this.shouldRevert&&(this.instance.options.revert=!0),
//Trigger the stop of the sortable
this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,
//If the helper has been the original item, restore properties in the sortable
"original"==i.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,//Remove the helper in the sortable instance
this.instance._trigger("deactivate",e,o))})},drag:function(e,s){var i=t(this).data("draggable"),o=this;t.each(i.sortables,function(n){
//Copy over some variables to allow calling the sortable's native _intersectsWith
this.instance.positionAbs=i.positionAbs,this.instance.helperProportions=i.helperProportions,this.instance.offset.click=i.offset.click,this.instance._intersectsWith(this.instance.containerCache)?(
//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
this.instance.isOver||(this.instance.isOver=1,
//Now we fake the start of dragging for the sortable instance,
//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
this.instance.currentItem=t(o).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,//Store helper option to later restore it
this.instance.options.helper=function(){return s.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),
//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
this.instance.offset.click.top=i.offset.click.top,this.instance.offset.click.left=i.offset.click.left,this.instance.offset.parent.left-=i.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=i.offset.parent.top-this.instance.offset.parent.top,i._trigger("toSortable",e),i.dropped=this.instance.element,//draggable revert needs that
//hack so receive/update callbacks work (mostly)
i.currentItem=i.element,this.instance.fromOutside=i),
//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
this.instance.currentItem&&this.instance._mouseDrag(e)):
//If it doesn't intersect with the sortable, and it intersected before,
//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,
//Prevent reverting on this forced stop
this.instance.options.revert=!1,
// The out event needs to be triggered independently
this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,
//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),i._trigger("fromSortable",e),i.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,s){var i=t("body"),o=t(this).data("draggable").options;i.css("cursor")&&(o._cursor=i.css("cursor")),i.css("cursor",o.cursor)},stop:function(e,s){var i=t(this).data("draggable").options;i._cursor&&t("body").css("cursor",i._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,s){var i=t(s.helper),o=t(this).data("draggable").options;i.css("opacity")&&(o._opacity=i.css("opacity")),i.css("opacity",o.opacity)},stop:function(e,s){var i=t(this).data("draggable").options;i._opacity&&t(s.helper).css("opacity",i._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(e,s){var i=t(this).data("draggable");i.scrollParent[0]!=document&&"HTML"!=i.scrollParent[0].tagName&&(i.overflowOffset=i.scrollParent.offset())},drag:function(e,s){var i=t(this).data("draggable"),o=i.options,n=!1;i.scrollParent[0]!=document&&"HTML"!=i.scrollParent[0].tagName?(o.axis&&"x"==o.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-i.overflowOffset.top<o.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-o.scrollSpeed)),o.axis&&"y"==o.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-i.overflowOffset.left<o.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-o.scrollSpeed))):(o.axis&&"x"==o.axis||(e.pageY-t(document).scrollTop()<o.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<o.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+o.scrollSpeed))),o.axis&&"y"==o.axis||(e.pageX-t(document).scrollLeft()<o.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<o.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+o.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,s){var i=t(this).data("draggable"),o=i.options;i.snapElements=[],t(o.snap.constructor!=String?o.snap.items||":data(draggable)":o.snap).each(function(){var e=t(this),s=e.offset();this!=i.element[0]&&i.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:s.top,left:s.left})})},drag:function(e,s){for(var i=t(this).data("draggable"),o=i.options,n=o.snapTolerance,r=s.offset.left,a=r+i.helperProportions.width,l=s.offset.top,h=l+i.helperProportions.height,c=i.snapElements.length-1;c>=0;c--){var p=i.snapElements[c].left,f=p+i.snapElements[c].width,d=i.snapElements[c].top,g=d+i.snapElements[c].height;
//Yes, I know, this is insane ;)
if(p-n<r&&r<f+n&&d-n<l&&l<g+n||p-n<r&&r<f+n&&d-n<h&&h<g+n||p-n<a&&a<f+n&&d-n<l&&l<g+n||p-n<a&&a<f+n&&d-n<h&&h<g+n){if("inner"!=o.snapMode){var u=Math.abs(d-h)<=n,m=Math.abs(g-l)<=n,v=Math.abs(p-a)<=n,P=Math.abs(f-r)<=n;u&&(s.position.top=i._convertPositionTo("relative",{top:d-i.helperProportions.height,left:0}).top-i.margins.top),m&&(s.position.top=i._convertPositionTo("relative",{top:g,left:0}).top-i.margins.top),v&&(s.position.left=i._convertPositionTo("relative",{top:0,left:p-i.helperProportions.width}).left-i.margins.left),P&&(s.position.left=i._convertPositionTo("relative",{top:0,left:f}).left-i.margins.left)}var b=u||m||v||P;if("outer"!=o.snapMode){var u=Math.abs(d-l)<=n,m=Math.abs(g-h)<=n,v=Math.abs(p-r)<=n,P=Math.abs(f-a)<=n;u&&(s.position.top=i._convertPositionTo("relative",{top:d,left:0}).top-i.margins.top),m&&(s.position.top=i._convertPositionTo("relative",{top:g-i.helperProportions.height,left:0}).top-i.margins.top),v&&(s.position.left=i._convertPositionTo("relative",{top:0,left:p}).left-i.margins.left),P&&(s.position.left=i._convertPositionTo("relative",{top:0,left:f-i.helperProportions.width}).left-i.margins.left)}!i.snapElements[c].snapping&&(u||m||v||P||b)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[c].item})),i.snapElements[c].snapping=u||m||v||P||b}else i.snapElements[c].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[c].item})),i.snapElements[c].snapping=!1}}}),t.ui.plugin.add("draggable","stack",{start:function(e,s){var i=t(this).data("draggable").options,o=t.makeArray(t(i.stack)).sort(function(e,s){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(s).css("zIndex"),10)||0)});if(o.length){var n=parseInt(o[0].style.zIndex)||0;t(o).each(function(t){this.style.zIndex=n+t}),this[0].style.zIndex=n+o.length}}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,s){var i=t(s.helper),o=t(this).data("draggable").options;i.css("zIndex")&&(o._zIndex=i.css("zIndex")),i.css("zIndex",o.zIndex)},stop:function(e,s){var i=t(this).data("draggable").options;i._zIndex&&t(s.helper).css("zIndex",i._zIndex)}})}(jQuery);

/*!
 * jQuery UI Resizable @VERSION
 *
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Resizables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
!function(t,e){t.widget("ui.resizable",t.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var e=this,i=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),
//Wrap the element if it cannot hold child nodes
this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(
//Create a wrapper element and set the wrapper to the new current internal element
this.element.wrap(t('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),
//Overwrite the original this.element
this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,
//Move margins to the wrapper
this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),
//Prevent Safari textarea resize
this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),
//Push the actual element to our proportionallyResize internal array
this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),
// avoid IE jump (hard set the margin)
this.originalElement.css({margin:this.originalElement.css("margin")}),
// fix handlers offset
this._proportionallyResize()),this.handles=i.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor==String){"all"==this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");var s=this.handles.split(",");this.handles={};for(var h=0;h<s.length;h++){var n=t.trim(s[h]),o="ui-resizable-"+n,a=t('<div class="ui-resizable-handle '+o+'"></div>');
// Apply zIndex to all handles - see #7960
a.css({zIndex:i.zIndex}),
//TODO : What's going on here?
"se"==n&&a.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),
//Insert into internal handles object and append to element
this.handles[n]=".ui-resizable-"+n,this.element.append(a)}}this._renderAxis=function(e){e=e||this.element;for(var i in this.handles){
//Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
if(this.handles[i].constructor==String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var s=t(this.handles[i],this.element),h=0;
//Checking the correct pad and border
h=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth();
//The padding type i have to apply...
var n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");e.css(n,h),this._proportionallyResize()}t(this.handles[i]).length}},
//TODO: make renderAxis a prototype function
this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),
//Matching axis name
this._handles.mouseover(function(){if(!e.resizing){if(this.className)var t=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
//Axis, default = se
e.axis=t&&t[1]?t[1]:"se"}}),
//If we want to auto hide the elements
i.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").hover(function(){i.disabled||(t(this).removeClass("ui-resizable-autohide"),e._handles.show())},function(){i.disabled||e.resizing||(t(this).addClass("ui-resizable-autohide"),e._handles.hide())})),
//Initialize the mouse interaction
this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
//TODO: Unwrap at same DOM position
if(this.elementIsWrapper){e(this.element);var i=this.element;i.after(this.originalElement.css({position:i.css("position"),width:i.outerWidth(),height:i.outerHeight(),top:i.css("top"),left:i.css("left")})).remove()}return this.originalElement.css("resize",this.originalResizeStyle),e(this.originalElement),this},_mouseCapture:function(e){var i=!1;for(var s in this.handles)t(this.handles[s])[0]==e.target&&(i=!0);return!this.options.disabled&&i},_mouseStart:function(e){var s=this.options,h=this.element.position(),n=this.element;this.resizing=!0,this.documentScroll={top:t(document).scrollTop(),left:t(document).scrollLeft()},
// bugfix for http://dev.jquery.com/ticket/1749
(n.is(".ui-draggable")||/absolute/.test(n.css("position")))&&n.css({position:"absolute",top:h.top,left:h.left}),this._renderProxy();var o=i(this.helper.css("left")),a=i(this.helper.css("top"));s.containment&&(o+=t(s.containment).scrollLeft()||0,a+=t(s.containment).scrollTop()||0),
//Store needed variables
this.offset=this.helper.offset(),this.position={left:o,top:a},this.size=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.originalPosition={left:o,top:a},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalMousePosition={left:e.pageX,top:e.pageY},
//Aspect Ratio
this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1;var r=t(".ui-resizable-"+this.axis).css("cursor");return t("body").css("cursor","auto"==r?this.axis+"-resize":r),n.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){
//Increase performance, avoid regex
var i=this.helper,s=(this.options,this.originalMousePosition),h=this.axis,n=e.pageX-s.left||0,o=e.pageY-s.top||0,a=this._change[h];if(!a)return!1;
// Calculate the attrs that will be change
var r=a.apply(this,[e,n,o]);t.browser.msie&&t.browser.version<7,this.sizeDiff;
// Put this in the mouseDrag handler since the user can start pressing shift while resizing
// plugins callbacks need to be called first
// calling the user callback at the end
return this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(r=this._updateRatio(r,e)),r=this._respectSize(r,e),this._propagate("resize",e),i.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(r),this._trigger("resize",e,this.ui()),!1},_mouseStop:function(e){this.resizing=!1;var i=this.options,s=this;if(this._helper){var h=this._proportionallyResizeElements,n=h.length&&/textarea/i.test(h[0].nodeName),o=n&&t.ui.hasScroll(h[0],"left")?0:s.sizeDiff.height,a=n?0:s.sizeDiff.width,r={width:s.helper.width()-a,height:s.helper.height()-o},l=parseInt(s.element.css("left"),10)+(s.position.left-s.originalPosition.left)||null,p=parseInt(s.element.css("top"),10)+(s.position.top-s.originalPosition.top)||null;i.animate||this.element.css(t.extend(r,{top:p,left:l})),s.helper.height(s.size.height),s.helper.width(s.size.width),this._helper&&!i.animate&&this._proportionallyResize()}return t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,i,h,n,o,a=this.options;o={minWidth:s(a.minWidth)?a.minWidth:0,maxWidth:s(a.maxWidth)?a.maxWidth:1/0,minHeight:s(a.minHeight)?a.minHeight:0,maxHeight:s(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(
// We want to create an enclosing box whose aspect ration is the requested one
// First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
e=o.minHeight*this.aspectRatio,h=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),h>o.minHeight&&(o.minHeight=h),i<o.maxWidth&&(o.maxWidth=i),n<o.maxHeight&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.options;this.offset=this.helper.offset(),s(t.left)&&(this.position.left=t.left),s(t.top)&&(this.position.top=t.top),s(t.height)&&(this.size.height=t.height),s(t.width)&&(this.size.width=t.width)},_updateRatio:function(t,e){var i=(this.options,this.position),h=this.size,n=this.axis;return s(t.height)?t.width=t.height*this.aspectRatio:s(t.width)&&(t.height=t.width/this.aspectRatio),"sw"==n&&(t.left=i.left+(h.width-t.width),t.top=null),"nw"==n&&(t.top=i.top+(h.height-t.height),t.left=i.left+(h.width-t.width)),t},_respectSize:function(t,e){var i=(this.helper,this._vBoundaries),h=(this._aspectRatio||e.shiftKey,this.axis),n=s(t.width)&&i.maxWidth&&i.maxWidth<t.width,o=s(t.height)&&i.maxHeight&&i.maxHeight<t.height,a=s(t.width)&&i.minWidth&&i.minWidth>t.width,r=s(t.height)&&i.minHeight&&i.minHeight>t.height;a&&(t.width=i.minWidth),r&&(t.height=i.minHeight),n&&(t.width=i.maxWidth),o&&(t.height=i.maxHeight);var l=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height,d=/sw|nw|w/.test(h),g=/nw|ne|n/.test(h);a&&d&&(t.left=l-i.minWidth),n&&d&&(t.left=l-i.maxWidth),r&&g&&(t.top=p-i.minHeight),o&&g&&(t.top=p-i.maxHeight);
// fixing jump error on top/left - bug #2330
var f=!t.width&&!t.height;return f&&!t.left&&t.top?t.top=null:f&&!t.top&&t.left&&(t.left=null),t},_proportionallyResize:function(){this.options;if(this._proportionallyResizeElements.length)for(var e=this.helper||this.element,i=0;i<this._proportionallyResizeElements.length;i++){var s=this._proportionallyResizeElements[i];if(!this.borderDif){var h=[s.css("borderTopWidth"),s.css("borderRightWidth"),s.css("borderBottomWidth"),s.css("borderLeftWidth")],n=[s.css("paddingTop"),s.css("paddingRight"),s.css("paddingBottom"),s.css("paddingLeft")];this.borderDif=t.map(h,function(t,e){var i=parseInt(t,10)||0,s=parseInt(n[e],10)||0;return i+s})}t.browser.msie&&(t(e).is(":hidden")||t(e).parents(":hidden").length)||s.css({height:e.height()-this.borderDif[0]-this.borderDif[2]||0,width:e.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var e=this.element,i=this.options;if(this.elementOffset=e.offset(),this._helper){this.helper=this.helper||t('<div style="overflow:hidden;"></div>');
// fix ie6 offset TODO: This seems broken
var s=t.browser.msie&&t.browser.version<7,h=s?1:0,n=s?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+n,height:this.element.outerHeight()+n,position:"absolute",left:this.elementOffset.left-h+"px",top:this.elementOffset.top-h+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(t,e,i){return{width:this.originalSize.width+e}},w:function(t,e,i){var s=(this.options,this.originalSize),h=this.originalPosition;return{left:h.left+e,width:s.width-e}},n:function(t,e,i){var s=(this.options,this.originalSize),h=this.originalPosition;return{top:h.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!=e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.extend(t.ui.resizable,{version:"@VERSION"}),/*
 * Resizable Extensions
 */
t.ui.plugin.add("resizable","alsoResize",{start:function(e,i){var s=t(this).data("resizable"),h=s.options,n=function(e){t(e).each(function(){var e=t(this);e.data("resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof h.alsoResize||h.alsoResize.parentNode?n(h.alsoResize):h.alsoResize.length?(h.alsoResize=h.alsoResize[0],n(h.alsoResize)):t.each(h.alsoResize,function(t){n(t)})},resize:function(e,i){var s=t(this).data("resizable"),h=s.options,n=s.originalSize,o=s.originalPosition,a={height:s.size.height-n.height||0,width:s.size.width-n.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},r=function(e,s){t(e).each(function(){var e=t(this),h=t(this).data("resizable-alsoresize"),n={},o=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(h[e]||0)+(a[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})};"object"!=typeof h.alsoResize||h.alsoResize.nodeType?r(h.alsoResize):t.each(h.alsoResize,function(t,e){r(t,e)})},stop:function(e,i){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","animate",{stop:function(e,i){var s=t(this).data("resizable"),h=s.options,n=s._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:s.sizeDiff.height,r=o?0:s.sizeDiff.width,l={width:s.size.width-r,height:s.size.height-a},p=parseInt(s.element.css("left"),10)+(s.position.left-s.originalPosition.left)||null,d=parseInt(s.element.css("top"),10)+(s.position.top-s.originalPosition.top)||null;s.element.animate(t.extend(l,d&&p?{top:d,left:p}:{}),{duration:h.animateDuration,easing:h.animateEasing,step:function(){var i={width:parseInt(s.element.css("width"),10),height:parseInt(s.element.css("height"),10),top:parseInt(s.element.css("top"),10),left:parseInt(s.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:i.width,height:i.height}),
// propagating resize, and updating values for each animation step
s._updateCache(i),s._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(e,s){var h=t(this).data("resizable"),n=h.options,o=h.element,a=n.containment,r=a instanceof t?a.get(0):/parent/.test(a)?o.parent().get(0):a;if(r)if(h.containerElement=t(r),/document/.test(a)||a==document)h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight};else{var l=t(r),p=[];t(["Top","Right","Left","Bottom"]).each(function(t,e){p[t]=i(l.css("padding"+e))}),h.containerOffset=l.offset(),h.containerPosition=l.position(),h.containerSize={height:l.innerHeight()-p[3],width:l.innerWidth()-p[1]};var d=h.containerOffset,g=h.containerSize.height,f=h.containerSize.width,c=t.ui.hasScroll(r,"left")?r.scrollWidth:f,u=t.ui.hasScroll(r)?r.scrollHeight:g;h.parentData={element:r,left:d.left,top:d.top,width:c,height:u}}},resize:function(e,i){var s=t(this).data("resizable"),h=s.options,n=(s.containerSize,s.containerOffset),o=(s.size,s.position),a=s._aspectRatio||e.shiftKey,r={top:0,left:0},l=s.containerElement;l[0]!=document&&/static/.test(l.css("position"))&&(r=n),o.left<(s._helper?n.left:0)&&(s.size.width=s.size.width+(s._helper?s.position.left-n.left:s.position.left-r.left),a&&(s.size.height=s.size.width/s.aspectRatio),s.position.left=h.helper?n.left:0),o.top<(s._helper?n.top:0)&&(s.size.height=s.size.height+(s._helper?s.position.top-n.top:s.position.top),a&&(s.size.width=s.size.height*s.aspectRatio),s.position.top=s._helper?n.top:0),s.offset.left=s.parentData.left+s.position.left,s.offset.top=s.parentData.top+s.position.top;var p=Math.abs((s._helper?s.offset.left-r.left:s.offset.left-r.left)+s.sizeDiff.width),d=Math.abs((s._helper?s.offset.top-r.top:s.offset.top-n.top)+s.sizeDiff.height),g=s.containerElement.get(0)==s.element.parent().get(0),f=/relative|absolute/.test(s.containerElement.css("position"));g&&f&&(p-=s.parentData.left),p+s.size.width>=s.parentData.width&&(s.size.width=s.parentData.width-p,a&&(s.size.height=s.size.width/s.aspectRatio)),d+s.size.height>=s.parentData.height&&(s.size.height=s.parentData.height-d,a&&(s.size.width=s.size.height*s.aspectRatio))},stop:function(e,i){var s=t(this).data("resizable"),h=s.options,n=(s.position,s.containerOffset),o=s.containerPosition,a=s.containerElement,r=t(s.helper),l=r.offset(),p=r.outerWidth()-s.sizeDiff.width,d=r.outerHeight()-s.sizeDiff.height;s._helper&&!h.animate&&/relative/.test(a.css("position"))&&t(this).css({left:l.left-o.left-n.left,width:p,height:d}),s._helper&&!h.animate&&/static/.test(a.css("position"))&&t(this).css({left:l.left-o.left-n.left,width:p,height:d})}}),t.ui.plugin.add("resizable","ghost",{start:function(e,i){var s=t(this).data("resizable"),h=s.options,n=s.size;s.ghost=s.originalElement.clone(),s.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof h.ghost?h.ghost:""),s.ghost.appendTo(s.helper)},resize:function(e,i){var s=t(this).data("resizable");s.options;s.ghost&&s.ghost.css({position:"relative",height:s.size.height,width:s.size.width})},stop:function(e,i){var s=t(this).data("resizable");s.options;s.ghost&&s.helper&&s.helper.get(0).removeChild(s.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(e,i){var s=t(this).data("resizable"),h=s.options,n=s.size,o=s.originalSize,a=s.originalPosition,r=s.axis;h._aspectRatio||e.shiftKey;h.grid="number"==typeof h.grid?[h.grid,h.grid]:h.grid;var l=Math.round((n.width-o.width)/(h.grid[0]||1))*(h.grid[0]||1),p=Math.round((n.height-o.height)/(h.grid[1]||1))*(h.grid[1]||1);/^(se|s|e)$/.test(r)?(s.size.width=o.width+l,s.size.height=o.height+p):/^(ne)$/.test(r)?(s.size.width=o.width+l,s.size.height=o.height+p,s.position.top=a.top-p):/^(sw)$/.test(r)?(s.size.width=o.width+l,s.size.height=o.height+p,s.position.left=a.left-l):(s.size.width=o.width+l,s.size.height=o.height+p,s.position.top=a.top-p,s.position.left=a.left-l)}});var i=function(t){return parseInt(t,10)||0},s=function(t){return!isNaN(parseInt(t,10))}}(jQuery);

/*!
 * jQuery UI Button @VERSION
 *
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Button
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
!function(t,e){var i,n,s,o,u="ui-button ui-widget ui-state-default ui-corner-all",a="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",l=function(){var e=t(this).find(":ui-button");setTimeout(function(){e.button("refresh")},1)},d=function(e){var i=e.name,n=e.form,s=t([]);return i&&(s=n?t(n).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),s};t.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",l),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.propAttr("disabled"):this.element.propAttr("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var e=this,a=this.options,r="checkbox"===this.type||"radio"===this.type,h="ui-state-hover"+(r?"":" ui-state-active"),b="ui-state-focus";null===a.label&&(a.label=this.buttonElement.html()),this.buttonElement.addClass(u).attr("role","button").bind("mouseenter.button",function(){a.disabled||(t(this).addClass("ui-state-hover"),this===i&&t(this).addClass("ui-state-active"))}).bind("mouseleave.button",function(){a.disabled||t(this).removeClass(h)}).bind("click.button",function(t){a.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus.button",function(){
// no need to check disabled, focus won't be triggered anyway
e.buttonElement.addClass(b)}).bind("blur.button",function(){e.buttonElement.removeClass(b)}),r&&(this.element.bind("change.button",function(){o||e.refresh()}),
// if mouse moves between mousedown and mouseup (drag) set clickDragged flag
// prevents issue where button state changes but checkbox/radio checked state
// does not in Firefox (see ticket #6970)
this.buttonElement.bind("mousedown.button",function(t){a.disabled||(o=!1,n=t.pageX,s=t.pageY)}).bind("mouseup.button",function(t){a.disabled||n===t.pageX&&s===t.pageY||(o=!0)})),"checkbox"===this.type?this.buttonElement.bind("click.button",function(){return!a.disabled&&!o&&(t(this).toggleClass("ui-state-active"),void e.buttonElement.attr("aria-pressed",e.element[0].checked))}):"radio"===this.type?this.buttonElement.bind("click.button",function(){if(a.disabled||o)return!1;t(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var i=e.element[0];d(i).not(i).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown.button",function(){return!a.disabled&&(t(this).addClass("ui-state-active"),i=this,void t(document).one("mouseup",function(){i=null}))}).bind("mouseup.button",function(){return!a.disabled&&void t(this).removeClass("ui-state-active")}).bind("keydown.button",function(e){return!a.disabled&&void(e.keyCode!=t.ui.keyCode.SPACE&&e.keyCode!=t.ui.keyCode.ENTER||t(this).addClass("ui-state-active"))}).bind("keyup.button",function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&
// TODO pass through original event correctly (just as 2nd argument doesn't work)
t(this).click()})),
// TODO: pull out $.Widget's handling for the disabled option into
// $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
// be overridden by individual plugins
this._setOption("disabled",a.disabled),this._resetButton()},_determineButtonType:function(){if(this.element.is(":checkbox")?this.type="checkbox":this.element.is(":radio")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type){
// we don't search against the document in case the element
// is disconnected from the DOM
var t=this.element.parents().filter(":last"),e="label[for='"+this.element.attr("id")+"']";this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible");var i=this.element.is(":checked");i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.attr("aria-pressed",i)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(u+" "+a+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title"),t.Widget.prototype.destroy.call(this)},_setOption:function(e,i){return t.Widget.prototype._setOption.apply(this,arguments),"disabled"===e?void(i?this.element.propAttr("disabled",!0):this.element.propAttr("disabled",!1)):void this._resetButton()},refresh:function(){var e=this.element.is(":disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?d(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),n=this.options.icons,s=n.primary&&n.secondary,o=[];n.primary||n.secondary?(this.options.text&&o.push("ui-button-text-icon"+(s?"s":n.primary?"-primary":"-secondary")),n.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(o.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",i))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,i){"disabled"===e&&this.buttons.button("option",e,i),t.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),t.Widget.prototype.destroy.call(this)}})}(jQuery);

/*!
 * jQuery UI Dialog @VERSION
 *
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Dialog
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *  jquery.ui.button.js
 *	jquery.ui.draggable.js
 *	jquery.ui.mouse.js
 *	jquery.ui.position.js
 *	jquery.ui.resizable.js
 */
!function(i,e){var t="ui-dialog ui-widget ui-widget-content ui-corner-all ",o={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},a={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},
// support for jQuery 1.3.2 - handle common attrFn methods for dialog
n=i.attrFn||{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0,click:!0};i.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",
// ensure that the titlebar is never outside the document
using:function(e){var t=i(this).css(e).offset().top;t<0&&i(this).css("top",e.top-t)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),
// #5742 - .attr() might return a DOMElement
"string"!=typeof this.originalTitle&&(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var e=this,o=e.options,a=o.title||"&#160;",n=i.ui.dialog.getTitleId(e.element),s=(e.uiDialog=i("<div></div>")).appendTo(document.body).hide().addClass(t+o.dialogClass).css({zIndex:o.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(t){o.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===i.ui.keyCode.ESCAPE&&(e.close(t),t.preventDefault())}).attr({role:"dialog","aria-labelledby":n}).mousedown(function(i){e.moveToTop(!1,i)}),l=(e.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(s),(e.uiDialogTitlebar=i("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(s)),d=i('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){d.addClass("ui-state-hover")},function(){d.removeClass("ui-state-hover")}).focus(function(){d.addClass("ui-state-focus")}).blur(function(){d.removeClass("ui-state-focus")}).click(function(i){return e.close(i),!1}).appendTo(l);(e.uiDialogTitlebarCloseText=i("<span></span>")).addClass("ui-icon ui-icon-closethick").text(o.closeText).appendTo(d),i("<span></span>").addClass("ui-dialog-title").attr("id",n).html(a).prependTo(l);
//handling of deprecated beforeclose (vs beforeClose) option
//Ticket #4669 http://dev.jqueryui.com/ticket/4669
//TODO: remove in 1.9pre
i.isFunction(o.beforeclose)&&!i.isFunction(o.beforeClose)&&(o.beforeClose=o.beforeclose),l.find("*").add(l).disableSelection(),o.draggable&&i.fn.draggable&&e._makeDraggable(),o.resizable&&i.fn.resizable&&e._makeResizable(),e._createButtons(o.buttons),e._isOpen=!1,i.fn.bgiframe&&s.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var i=this;return i.overlay&&i.overlay.destroy(),i.uiDialog.hide(),i.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),i.uiDialog.remove(),i.originalTitle&&i.element.attr("title",i.originalTitle),i},widget:function(){return this.uiDialog},close:function(e){var t,o,a=this;if(!1!==a._trigger("beforeClose",e))
// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
return a.overlay&&a.overlay.destroy(),a.uiDialog.unbind("keypress.ui-dialog"),a._isOpen=!1,a.options.hide?a.uiDialog.hide(a.options.hide,function(){a._trigger("close",e)}):(a.uiDialog.hide(),a._trigger("close",e)),i.ui.dialog.overlay.resize(),a.options.modal&&(t=0,i(".ui-dialog").each(function(){this!==a.uiDialog[0]&&(o=i(this).css("z-index"),isNaN(o)||(t=Math.max(t,o)))}),i.ui.dialog.maxZ=t),a},isOpen:function(){return this._isOpen},
// the force parameter allows us to move modal dialogs to their correct
// position on open
moveToTop:function(e,t){var o,a=this,n=a.options;
//Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
//  http://ui.jquery.com/bugs/ticket/3193
return n.modal&&!e||!n.stack&&!n.modal?a._trigger("focus",t):(n.zIndex>i.ui.dialog.maxZ&&(i.ui.dialog.maxZ=n.zIndex),a.overlay&&(i.ui.dialog.maxZ+=1,a.overlay.$el.css("z-index",i.ui.dialog.overlay.maxZ=i.ui.dialog.maxZ)),o={scrollTop:a.element.scrollTop(),scrollLeft:a.element.scrollLeft()},i.ui.dialog.maxZ+=1,a.uiDialog.css("z-index",i.ui.dialog.maxZ),a.element.attr(o),a._trigger("focus",t),a)},open:function(){if(!this._isOpen){var e=this,t=e.options,o=e.uiDialog;
// prevent tabbing out of modal dialogs
// set focus to the first tabbable element in the content area or the first button
// if there are no tabbable elements, set focus on the dialog itself
return e.overlay=t.modal?new i.ui.dialog.overlay(e):null,e._size(),e._position(t.position),o.show(t.show),e.moveToTop(!0),t.modal&&o.bind("keydown.ui-dialog",function(e){if(e.keyCode===i.ui.keyCode.TAB){var t=i(":tabbable",this),o=t.filter(":first"),a=t.filter(":last");return e.target!==a[0]||e.shiftKey?e.target===o[0]&&e.shiftKey?(a.focus(1),!1):void 0:(o.focus(1),!1)}}),i(e.element.find(":tabbable").get().concat(o.find(".ui-dialog-buttonpane :tabbable").get().concat(o.get()))).eq(0).focus(),e._isOpen=!0,e._trigger("open"),e}},_createButtons:function(e){var t=this,o=!1,a=i("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),s=i("<div></div>").addClass("ui-dialog-buttonset").appendTo(a);
// if we already have a button pane, remove it
t.uiDialog.find(".ui-dialog-buttonpane").remove(),"object"==typeof e&&null!==e&&i.each(e,function(){return!(o=!0)}),o&&(i.each(e,function(e,o){o=i.isFunction(o)?{click:o,text:e}:o;var a=i('<button type="button"></button>').click(function(){o.click.apply(t.element[0],arguments)}).appendTo(s);
// can't use .attr( props, true ) with jQuery 1.3.2.
i.each(o,function(i,e){"click"!==i&&(i in n?a[i](e):a.attr(i,e))}),i.fn.button&&a.button()}),a.appendTo(t.uiDialog))},_makeDraggable:function(){function e(i){return{position:i.position,offset:i.offset}}var t,o=this,a=o.options,n=i(document);o.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,s){t="auto"===a.height?"auto":i(this).height(),i(this).height(i(this).height()).addClass("ui-dialog-dragging"),o._trigger("dragStart",n,e(s))},drag:function(i,t){o._trigger("drag",i,e(t))},stop:function(s,l){a.position=[l.position.left-n.scrollLeft(),l.position.top-n.scrollTop()],i(this).removeClass("ui-dialog-dragging").height(t),o._trigger("dragStop",s,e(l)),i.ui.dialog.overlay.resize()}})},_makeResizable:function(t){function o(i){return{originalPosition:i.originalPosition,originalSize:i.originalSize,position:i.position,size:i.size}}t=t===e?this.options.resizable:t;var a=this,n=a.options,
// .ui-resizable has position: relative defined in the stylesheet
// but dialogs have to use absolute or fixed positioning
s=a.uiDialog.css("position"),l="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";a.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:a.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:a._minHeight(),handles:l,start:function(e,t){i(this).addClass("ui-dialog-resizing"),a._trigger("resizeStart",e,o(t))},resize:function(i,e){a._trigger("resize",i,o(e))},stop:function(e,t){i(this).removeClass("ui-dialog-resizing"),n.height=i(this).height(),n.width=i(this).width(),a._trigger("resizeStop",e,o(t)),i.ui.dialog.overlay.resize()}}).css("position",s).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var i=this.options;return"auto"===i.height?i.minHeight:Math.min(i.minHeight,i.height)},_position:function(e){var t,o=[],a=[0,0];e?(
// deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
//		if (typeof position == 'string' || $.isArray(position)) {
//			myAt = $.isArray(position) ? position : position.split(' ');
("string"==typeof e||"object"==typeof e&&"0"in e)&&(o=e.split?e.split(" "):[e[0],e[1]],1===o.length&&(o[1]=o[0]),i.each(["left","top"],function(i,e){+o[i]===o[i]&&(a[i]=o[i],o[i]=e)}),e={my:o.join(" "),at:o.join(" "),offset:a.join(" ")}),e=i.extend({},i.ui.dialog.prototype.options.position,e)):e=i.ui.dialog.prototype.options.position,
// need to show the dialog to get the actual offset in the position plugin
t=this.uiDialog.is(":visible"),t||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(i.extend({of:window},e)),t||this.uiDialog.hide()},_setOptions:function(e){var t=this,n={},s=!1;i.each(e,function(i,e){t._setOption(i,e),i in o&&(s=!0),i in a&&(n[i]=e)}),s&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,o){var a=this,n=a.uiDialog;switch(e){
//handling of deprecated beforeclose (vs beforeClose) option
//Ticket #4669 http://dev.jqueryui.com/ticket/4669
//TODO: remove in 1.9pre
case"beforeclose":e="beforeClose";break;case"buttons":a._createButtons(o);break;case"closeText":
// ensure that we always pass a string
a.uiDialogTitlebarCloseText.text(""+o);break;case"dialogClass":n.removeClass(a.options.dialogClass).addClass(t+o);break;case"disabled":o?n.addClass("ui-dialog-disabled"):n.removeClass("ui-dialog-disabled");break;case"draggable":var s=n.is(":data(draggable)");s&&!o&&n.draggable("destroy"),!s&&o&&a._makeDraggable();break;case"position":a._position(o);break;case"resizable":
// currently resizable, becoming non-resizable
var l=n.is(":data(resizable)");l&&!o&&n.resizable("destroy"),
// currently resizable, changing handles
l&&"string"==typeof o&&n.resizable("option","handles",o),
// currently non-resizable, becoming resizable
l||o===!1||a._makeResizable(o);break;case"title":
// convert whatever was passed in o a string, for html() to not throw up
i(".ui-dialog-title",a.uiDialogTitlebar).html(""+(o||"&#160;"))}i.Widget.prototype._setOption.apply(a,arguments)},_size:function(){/* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
		 * divs will both have width and height set, so we need to reset them
		 */
var e,t,o=this.options,a=this.uiDialog.is(":visible");if(
// reset content sizing
this.element.show().css({width:"auto",minHeight:0,height:0}),o.minWidth>o.width&&(o.width=o.minWidth),
// reset wrapper sizing
// determine the height of all the non-content elements
e=this.uiDialog.css({height:"auto",width:o.width}).height(),t=Math.max(0,o.minHeight-e),"auto"===o.height)
// only needed for IE6 support
if(i.support.minHeight)this.element.css({minHeight:t,height:"auto"});else{this.uiDialog.show();var n=this.element.css("height","auto").height();a||this.uiDialog.hide(),this.element.height(Math.max(n,t))}else this.element.height(Math.max(o.height-e,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),i.extend(i.ui.dialog,{version:"@VERSION",uuid:0,maxZ:0,getTitleId:function(i){var e=i.attr("id");return e||(this.uuid+=1,e=this.uuid),"ui-dialog-title-"+e},overlay:function(e){this.$el=i.ui.dialog.overlay.create(e)}}),i.extend(i.ui.dialog.overlay,{instances:[],
// reuse old instances due to IE memory leak with alpha transparency (see #5185)
oldInstances:[],maxZ:0,events:i.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(i){return i+".dialog-overlay"}).join(" "),create:function(e){0===this.instances.length&&(
// prevent use of anchors and inputs
// we use a setTimeout in case the overlay is created from an
// event that we're going to be cancelling (see #2804)
setTimeout(function(){
// handle $(el).dialog().dialog('close') (see #4065)
i.ui.dialog.overlay.instances.length&&i(document).bind(i.ui.dialog.overlay.events,function(e){
// stop events if the z-index of the target is < the z-index of the overlay
// we cannot return true when we don't want to cancel the event (#3523)
if(i(e.target).zIndex()<i.ui.dialog.overlay.maxZ)return!1})},1),
// allow closing by pressing the escape key
i(document).bind("keydown.dialog-overlay",function(t){e.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===i.ui.keyCode.ESCAPE&&(e.close(t),t.preventDefault())}),
// handle window resize
i(window).bind("resize.dialog-overlay",i.ui.dialog.overlay.resize));var t=(this.oldInstances.pop()||i("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return i.fn.bgiframe&&t.bgiframe(),this.instances.push(t),t},destroy:function(e){var t=i.inArray(e,this.instances);t!=-1&&this.oldInstances.push(this.instances.splice(t,1)[0]),0===this.instances.length&&i([document,window]).unbind(".dialog-overlay"),e.remove();
// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
var o=0;i.each(this.instances,function(){o=Math.max(o,this.css("z-index"))}),this.maxZ=o},height:function(){var e,t;
// handle IE 6
// handle IE 6
return i.browser.msie&&i.browser.version<7?(e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),t=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),e<t?i(window).height()+"px":e+"px"):i(document).height()+"px"},width:function(){var e,t;
// handle IE
// handle IE
return i.browser.msie?(e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),t=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),e<t?i(window).width()+"px":e+"px"):i(document).width()+"px"},resize:function(){/* If the dialog is draggable and the user drags it past the
		 * right edge of the window, the document becomes wider so we
		 * need to stretch the overlay. If the user then drags the
		 * dialog back to the left, the document will become narrower,
		 * so we need to shrink the overlay to the appropriate size.
		 * This is handled by shrinking the overlay before setting it
		 * to the full document size.
		 */
var e=i([]);i.each(i.ui.dialog.overlay.instances,function(){e=e.add(this)}),e.css({width:0,height:0}).css({width:i.ui.dialog.overlay.width(),height:i.ui.dialog.overlay.height()})}}),i.extend(i.ui.dialog.overlay.prototype,{destroy:function(){i.ui.dialog.overlay.destroy(this.$el)}})}(jQuery);

/*!
 * jQuery UI Datepicker @VERSION
 *
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Datepicker
 *
 * Depends:
 *	jquery.ui.core.js
 */
!function($,undefined){/* Date picker manager.
   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
   Settings for (groups of) date pickers are maintained in an instance object,
   allowing multiple different settings on the same page. */
function Datepicker(){this.debug=!1,// Change this to true to start debugging
this._curInst=null,// The current instance in use
this._keyEvent=!1,// If the last event was a key event
this._disabledInputs=[],// List of date picker inputs that have been disabled
this._datepickerShowing=!1,// True if the popup picker is showing , false if not
this._inDialog=!1,// True if showing within a "dialog", false if not
this._mainDivId="ui-datepicker-div",// The ID of the main datepicker division
this._inlineClass="ui-datepicker-inline",// The name of the inline marker class
this._appendClass="ui-datepicker-append",// The name of the append marker class
this._triggerClass="ui-datepicker-trigger",// The name of the trigger marker class
this._dialogClass="ui-datepicker-dialog",// The name of the dialog marker class
this._disableClass="ui-datepicker-disabled",// The name of the disabled covering marker class
this._unselectableClass="ui-datepicker-unselectable",// The name of the unselectable cell marker class
this._currentClass="ui-datepicker-current-day",// The name of the current day marker class
this._dayOverClass="ui-datepicker-days-cell-over",// The name of the day hover marker class
this.regional=[],// Available regional settings, indexed by language code
this.regional[""]={// Default regional settings
closeText:"Done",// Display text for close link
prevText:"Prev",// Display text for previous month link
nextText:"Next",// Display text for next month link
currentText:"Today",// Display text for current month link
monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],// Names of months for drop-down and formatting
monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],// For formatting
dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],// For formatting
dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],// For formatting
dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],// Column headings for days starting at Sunday
weekHeader:"Wk",// Column header for week of the year
dateFormat:"mm/dd/yy",// See format options on parseDate
firstDay:0,// The first day of the week, Sun = 0, Mon = 1, ...
isRTL:!1,// True if right-to-left language, false if left-to-right
showMonthAfterYear:!1,// True if the year select precedes month, false for month then year
yearSuffix:""},this._defaults={// Global defaults for all the date picker instances
showOn:"focus",// 'focus' for popup on focus,
// 'button' for trigger button, or 'both' for either
showAnim:"fadeIn",// Name of jQuery animation for popup
showOptions:{},// Options for enhanced animations
defaultDate:null,// Used when field is blank: actual date,
// +/-number for offset from today, null for today
appendText:"",// Display text following the input box, e.g. showing the format
buttonText:"...",// Text for trigger button
buttonImage:"",// URL for trigger button image
buttonImageOnly:!1,// True if the image appears alone, false if it appears on a button
hideIfNoPrevNext:!1,// True to hide next/previous month links
// if not applicable, false to just disable them
navigationAsDateFormat:!1,// True if date formatting applied to prev/today/next links
gotoCurrent:!1,// True if today link goes back to current selection instead
changeMonth:!1,// True if month can be selected directly, false if only prev/next
changeYear:!1,// True if year can be selected directly, false if only prev/next
yearRange:"c-10:c+10",// Range of years to display in drop-down,
// either relative to today's year (-nn:+nn), relative to currently displayed year
// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
showOtherMonths:!1,// True to show dates in other months, false to leave blank
selectOtherMonths:!1,// True to allow selection of dates in other months, false for unselectable
showWeek:!1,// True to show week of the year, false to not show it
calculateWeek:this.iso8601Week,// How to calculate the week of the year,
// takes a Date and returns the number of the week for it
shortYearCutoff:"+10",// Short year values < this are in the current century,
// > this are in the previous century,
// string value starting with '+' for current year + value
minDate:null,// The earliest selectable date, or null for no limit
maxDate:null,// The latest selectable date, or null for no limit
duration:"fast",// Duration of display/closure
beforeShowDay:null,// Function that takes a date and returns an array with
// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
// [2] = cell title (optional), e.g. $.datepicker.noWeekends
beforeShow:null,// Function that takes an input field and
// returns a set of custom settings for the date picker
onSelect:null,// Define a callback function when a date is selected
onChangeMonthYear:null,// Define a callback function when the month or year is changed
onClose:null,// Define a callback function when the datepicker is closed
numberOfMonths:1,// Number of months to show at a time
showCurrentAtPos:0,// The position in multipe months at which to show the current month (starting at 0)
stepMonths:1,// Number of months to step back/forward
stepBigMonths:12,// Number of months to step back/forward for the big links
altField:"",// Selector for an alternate field to store selected dates into
altFormat:"",// The date format to use for the alternate field
constrainInput:!0,// The input is constrained by the current date format
showButtonPanel:!1,// True to show button panel, false to not show it
autoSize:!1,// True to size the input for the date format, false to leave as is
disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}/*
 * Bind hover events for datepicker elements.
 * Done via delegate so the binding only occurs once in the lifetime of the parent div.
 * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
 */
function bindHover(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.bind("mouseout",function(e){var a=$(e.target).closest(t);a.length&&a.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(a){var i=$(a.target).closest(t);!$.datepicker._isDisabledDatepicker(instActive.inline?e.parent()[0]:instActive.input[0])&&i.length&&(i.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),i.addClass("ui-state-hover"),i.hasClass("ui-datepicker-prev")&&i.addClass("ui-datepicker-prev-hover"),i.hasClass("ui-datepicker-next")&&i.addClass("ui-datepicker-next-hover"))})}/* jQuery extend now ignores nulls! */
function extendRemove(e,t){$.extend(e,t);for(var a in t)null!=t[a]&&t[a]!=undefined||(e[a]=t[a]);return e}/* Determine whether an object is an array. */
function isArray(e){return e&&($.browser.safari&&"object"==typeof e&&e.length||e.constructor&&e.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"@VERSION"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{/* Class name added to elements to indicate already configured with a date picker. */
markerClassName:"hasDatepicker",
//Keep track of the maximum number of rows displayed (see #7043)
maxRows:4,/* Debug logging (if enabled). */
log:function(){this.debug&&console.log.apply("",arguments)},
// TODO rename to "widget" when switching to widget factory
_widgetDatepicker:function(){return this.dpDiv},/* Override the default settings for all instances of the date picker.
	   @param  settings  object - the new settings to use as defaults (anonymous object)
	   @return the manager object */
setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},/* Attach the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span
	   @param  settings  object - the new settings to use for this date picker instance (anonymous) */
_attachDatepicker:function(target,settings){
// check for settings on the control itself - in namespace 'date:'
var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline="div"==nodeName||"span"==nodeName;target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),"input"==nodeName?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},/* Create a new instance object. */
_newInst:function(e,t){var a=e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");// escape jQuery meta chars
return{id:a,input:e,// associated target
selectedDay:0,selectedMonth:0,selectedYear:0,// current selection
drawMonth:0,drawYear:0,// month being drawn
inline:t,// is datepicker inline or not
dpDiv:t?// presentation div
bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},/* Attach the date picker to an input field. */
_connectDatepicker:function(e,t){var a=$(e);t.append=$([]),t.trigger=$([]),a.hasClass(this.markerClassName)||(this._attachments(a,t),a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,a,i){t.settings[a]=i}).bind("getData.datepicker",function(e,a){return this._get(t,a)}),this._autoSize(t),$.data(e,PROP_NAME,t),
//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
t.settings.disabled&&this._disableDatepicker(e))},/* Make attachments based on settings. */
_attachments:function(e,t){var a=this._get(t,"appendText"),i=this._get(t,"isRTL");t.append&&t.append.remove(),a&&(t.append=$('<span class="'+this._appendClass+'">'+a+"</span>"),e[i?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove();var r=this._get(t,"showOn");if("focus"!=r&&"both"!=r||// pop-up date picker when in the marked field
e.focus(this._showDatepicker),"button"==r||"both"==r){// pop-up date picker when button clicked
var s=this._get(t,"buttonText"),n=this._get(t,"buttonImage");t.trigger=$(this._get(t,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:n,alt:s,title:s}):$('<button type="button"></button>').addClass(this._triggerClass).html(""==n?s:$("<img/>").attr({src:n,alt:s,title:s}))),e[i?"before":"after"](t.trigger),t.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==e[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=e[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(e[0])):$.datepicker._showDatepicker(e[0]),!1})}},/* Apply the maximum length for the date format. */
_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t=new Date(2009,11,20),a=this._get(e,"dateFormat");if(a.match(/[DM]/)){var i=function(e){for(var t=0,a=0,i=0;i<e.length;i++)e[i].length>t&&(t=e[i].length,a=i);return a};t.setMonth(i(this._get(e,a.match(/MM/)?"monthNames":"monthNamesShort"))),t.setDate(i(this._get(e,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-t.getDay())}e.input.attr("size",this._formatDate(e,t).length)}},/* Attach an inline date picker to a div. */
_inlineDatepicker:function(e,t){var a=$(e);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(t.dpDiv).bind("setData.datepicker",function(e,a,i){t.settings[a]=i}).bind("getData.datepicker",function(e,a){return this._get(t,a)}),$.data(e,PROP_NAME,t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),
//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
t.settings.disabled&&this._disableDatepicker(e),
// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
t.dpDiv.css("display","block"))},/* Pop-up the date picker in a "dialog" box.
	   @param  input     element - ignored
	   @param  date      string or Date - the initial date to display
	   @param  onSelect  function - the function to call when a date is selected
	   @param  settings  object - update the dialog date picker instance's settings (anonymous object)
	   @param  pos       int[2] - coordinates for the dialog's position within the screen or
	                     event - with x/y coordinates or
	                     leave empty for default (screen centre)
	   @return the manager object */
_dialogDatepicker:function(e,t,a,i,r){var s=this._dialogInst;// internal instance
if(!s){this.uuid+=1;var n="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+n+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),s=this._dialogInst=this._newInst(this._dialogInput,!1),s.settings={},$.data(this._dialogInput[0],PROP_NAME,s)}if(extendRemove(s.settings,i||{}),t=t&&t.constructor==Date?this._formatDate(s,t):t,this._dialogInput.val(t),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,!this._pos){var d=document.documentElement.clientWidth,o=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop;this._pos=// should use actual width/height below
[d/2-100+c,o/2-150+l]}
// move input on screen for focus, but hidden behind dialog
return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),s.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,s),this},/* Detach a datepicker from its control.
	   @param  target    element - the target input field or division or span */
_destroyDatepicker:function(e){var t=$(e),a=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var i=e.nodeName.toLowerCase();$.removeData(e,PROP_NAME),"input"==i?(a.append.remove(),a.trigger.remove(),t.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!=i&&"span"!=i||t.removeClass(this.markerClassName).empty()}},/* Enable the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span */
_enableDatepicker:function(e){var t=$(e),a=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var i=e.nodeName.toLowerCase();if("input"==i)e.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"==i||"span"==i){var r=t.children("."+this._inlineClass);r.children().removeClass("ui-state-disabled"),r.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t})}},/* Disable the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span */
_disableDatepicker:function(e){var t=$(e),a=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var i=e.nodeName.toLowerCase();if("input"==i)e.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"==i||"span"==i){var r=t.children("."+this._inlineClass);r.children().addClass("ui-state-disabled"),r.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t}),// delete entry
this._disabledInputs[this._disabledInputs.length]=e}},/* Is the first field in a jQuery collection disabled as a datepicker?
	   @param  target    element - the target input field or division or span
	   @return boolean - true if disabled, false if enabled */
_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]==e)return!0;return!1},/* Retrieve the instance data for the target control.
	   @param  target  element - the target input field or division or span
	   @return  object - the associated instance data
	   @throws  error if a jQuery problem getting data */
_getInst:function(e){try{return $.data(e,PROP_NAME)}catch(t){throw"Missing instance data for this datepicker"}},/* Update or retrieve the settings for a date picker attached to an input field or division.
	   @param  target  element - the target input field or division or span
	   @param  name    object - the new settings to update or
	                   string - the name of the setting to change or retrieve,
	                   when retrieving also 'all' for all instance settings or
	                   'defaults' for all global defaults
	   @param  value   any - the new value for the setting
	                   (omit if above is an object or to retrieve a value) */
_optionDatepicker:function(e,t,a){var i=this._getInst(e);if(2==arguments.length&&"string"==typeof t)return"defaults"==t?$.extend({},$.datepicker._defaults):i?"all"==t?$.extend({},i.settings):this._get(i,t):null;var r=t||{};if("string"==typeof t&&(r={},r[t]=a),i){this._curInst==i&&this._hideDatepicker();var s=this._getDateDatepicker(e,!0),n=this._getMinMaxDate(i,"min"),d=this._getMinMaxDate(i,"max");extendRemove(i.settings,r),
// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
null!==n&&r.dateFormat!==undefined&&r.minDate===undefined&&(i.settings.minDate=this._formatDate(i,n)),null!==d&&r.dateFormat!==undefined&&r.maxDate===undefined&&(i.settings.maxDate=this._formatDate(i,d)),this._attachments($(e),i),this._autoSize(i),this._setDate(i,s),this._updateAlternate(i),this._updateDatepicker(i)}},
// change method deprecated
_changeDatepicker:function(e,t,a){this._optionDatepicker(e,t,a)},/* Redraw the date picker attached to an input field or division.
	   @param  target  element - the target input field or division or span */
_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},/* Set the dates for a jQuery selection.
	   @param  target   element - the target input field or division or span
	   @param  date     Date - the new date */
_setDateDatepicker:function(e,t){var a=this._getInst(e);a&&(this._setDate(a,t),this._updateDatepicker(a),this._updateAlternate(a))},/* Get the date(s) for the first entry in a jQuery selection.
	   @param  target     element - the target input field or division or span
	   @param  noDefault  boolean - true if no default date is to be used
	   @return Date - the current date */
_getDateDatepicker:function(e,t){var a=this._getInst(e);return a&&!a.inline&&this._setDateFromField(a,t),a?this._getDate(a):null},/* Handle keystrokes. */
_doKeyDown:function(e){var t=$.datepicker._getInst(e.target),a=!0,i=t.dpDiv.is(".ui-datepicker-rtl");if(t._keyEvent=!0,$.datepicker._datepickerShowing)switch(e.keyCode){case 9:$.datepicker._hideDatepicker(),a=!1;break;// hide on tab out
case 13:var r=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",t.dpDiv);r[0]&&$.datepicker._selectDay(e.target,t.selectedMonth,t.selectedYear,r[0]);var s=$.datepicker._get(t,"onSelect");if(s){var n=$.datepicker._formatDate(t);
// trigger custom callback
s.apply(t.input?t.input[0]:null,[n,t])}else $.datepicker._hideDatepicker();return!1;// select the value on enter
case 27:$.datepicker._hideDatepicker();break;// hide on escape
case 33:$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;// previous month/year on page up/+ ctrl
case 34:$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;// next month/year on page down/+ ctrl
case 35:(e.ctrlKey||e.metaKey)&&$.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;// clear on ctrl or command +end
case 36:(e.ctrlKey||e.metaKey)&&$.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;// current on ctrl or command +home
case 37:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,i?1:-1,"D"),a=e.ctrlKey||e.metaKey,
// -1 day on ctrl or command +left
e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");
// next month/year on alt +left on Mac
break;case 38:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;// -1 week on ctrl or command +up
case 39:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,i?-1:1,"D"),a=e.ctrlKey||e.metaKey,
// +1 day on ctrl or command +right
e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");
// next month/year on alt +right
break;case 40:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;// +1 week on ctrl or command +down
default:a=!1}else 36==e.keyCode&&e.ctrlKey?// display the date picker on ctrl+home
$.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},/* Filter entered characters - based on date format. */
_doKeyPress:function(e){var t=$.datepicker._getInst(e.target);if($.datepicker._get(t,"constrainInput")){var a=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),i=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||e.metaKey||i<" "||!a||a.indexOf(i)>-1}},/* Synchronise manual entry and field/alternate field. */
_doKeyUp:function(e){var t=$.datepicker._getInst(e.target);if(t.input.val()!=t.lastVal)try{var a=$.datepicker.parseDate($.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,$.datepicker._getFormatConfig(t));a&&(// only if valid
$.datepicker._setDateFromField(t),$.datepicker._updateAlternate(t),$.datepicker._updateDatepicker(t))}catch(i){$.datepicker.log(i)}return!0},/* Pop-up the date picker for a given input field.
       If false returned from beforeShow event handler do not show. 
	   @param  input  element - the input field attached to the date picker or
	                  event - if triggered by focus */
_showDatepicker:function(e){if(e=e.target||e,"input"!=e.nodeName.toLowerCase()&&(// find from button/image trigger
e=$("input",e.parentNode)[0]),!$.datepicker._isDisabledDatepicker(e)&&$.datepicker._lastInput!=e){var t=$.datepicker._getInst(e);$.datepicker._curInst&&$.datepicker._curInst!=t&&($.datepicker._curInst.dpDiv.stop(!0,!0),t&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var a=$.datepicker._get(t,"beforeShow"),i=a?a.apply(e,[e,t]):{};if(i!==!1){extendRemove(t.settings,i),t.lastVal=null,$.datepicker._lastInput=e,$.datepicker._setDateFromField(t),$.datepicker._inDialog&&(// hide cursor
e.value=""),$.datepicker._pos||(// position below input
$.datepicker._pos=$.datepicker._findPos(e),$.datepicker._pos[1]+=e.offsetHeight);var r=!1;$(e).parents().each(function(){return r|="fixed"==$(this).css("position"),!r}),r&&$.browser.opera&&(// correction for Opera when fixed and scrolled
$.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var s={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};if($.datepicker._pos=null,
//to avoid flashes on Firefox
t.dpDiv.empty(),
// determine sizing offscreen
t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(t),
// fix width for dynamic number of date pickers
// and adjust position before showing
s=$.datepicker._checkOffset(t,s,r),t.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":r?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"}),!t.inline){var n=$.datepicker._get(t,"showAnim"),d=$.datepicker._get(t,"duration"),o=function(){var e=t.dpDiv.find("iframe.ui-datepicker-cover");// IE6- only
if(e.length){var a=$.datepicker._getBorders(t.dpDiv);e.css({left:-a[0],top:-a[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()})}};t.dpDiv.zIndex($(e).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[n]?t.dpDiv.show(n,$.datepicker._get(t,"showOptions"),d,o):t.dpDiv[n||"show"](n?d:null,o),n&&d||o(),t.input.is(":visible")&&!t.input.is(":disabled")&&t.input.focus(),$.datepicker._curInst=t}}}},/* Generate the date picker content. */
_updateDatepicker:function(e){var t=this;t.maxRows=4;//Reset the max number of rows being displayed (see #7043)
var a=$.datepicker._getBorders(e.dpDiv);instActive=e,// for delegate hover events
e.dpDiv.empty().append(this._generateHTML(e));var i=e.dpDiv.find("iframe.ui-datepicker-cover");// IE6- only
i.length&&//avoid call to outerXXXX() when not in IE6
i.css({left:-a[0],top:-a[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()}),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var r=this._getNumberOfMonths(e),s=r[1],n=17;
// deffered render of the years select (to avoid flashes on Firefox) 
if(e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&e.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",n*s+"em"),e.dpDiv[(1!=r[0]||1!=r[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e==$.datepicker._curInst&&$.datepicker._datepickerShowing&&e.input&&
// #6694 - don't focus the input if it's already focused
// this breaks the change event in IE
e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!=document.activeElement&&e.input.focus(),e.yearshtml){var d=e.yearshtml;setTimeout(function(){
//assure that inst.yearshtml didn't change.
d===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),d=e.yearshtml=null},0)}},/* Retrieve the size of left and top borders for an element.
	   @param  elem  (jQuery object) the element of interest
	   @return  (number[2]) the left and top borders */
_getBorders:function(e){var t=function(e){return{thin:1,medium:2,thick:3}[e]||e};return[parseFloat(t(e.css("border-left-width"))),parseFloat(t(e.css("border-top-width")))]},/* Check positioning to remain on screen. */
_checkOffset:function(e,t,a){var i=e.dpDiv.outerWidth(),r=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,n=e.input?e.input.outerHeight():0,d=document.documentElement.clientWidth+$(document).scrollLeft(),o=document.documentElement.clientHeight+$(document).scrollTop();
// now check if datepicker is showing outside window viewport - move to a better place if so.
return t.left-=this._get(e,"isRTL")?i-s:0,t.left-=a&&t.left==e.input.offset().left?$(document).scrollLeft():0,t.top-=a&&t.top==e.input.offset().top+n?$(document).scrollTop():0,t.left-=Math.min(t.left,t.left+i>d&&d>i?Math.abs(t.left+i-d):0),t.top-=Math.min(t.top,t.top+r>o&&o>r?Math.abs(r+n):0),t},/* Find an object's position on the screen. */
_findPos:function(e){for(var t=this._getInst(e),a=this._get(t,"isRTL");e&&("hidden"==e.type||1!=e.nodeType||$.expr.filters.hidden(e));)e=e[a?"previousSibling":"nextSibling"];var i=$(e).offset();return[i.left,i.top]},/* Hide the date picker from view.
	   @param  input  element - the input field attached to the date picker */
_hideDatepicker:function(e){var t=this._curInst;if(t&&(!e||t==$.data(e,PROP_NAME))&&this._datepickerShowing){var a=this._get(t,"showAnim"),i=this._get(t,"duration"),r=function(){$.datepicker._tidyDialog(t)};$.effects&&$.effects[a]?t.dpDiv.hide(a,$.datepicker._get(t,"showOptions"),i,r):t.dpDiv["slideDown"==a?"slideUp":"fadeIn"==a?"fadeOut":"hide"](a?i:null,r),a||r(),this._datepickerShowing=!1;var s=this._get(t,"onClose");s&&s.apply(t.input?t.input[0]:null,[t.input?t.input.val():"",t]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},/* Tidy up after a dialog display. */
_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},/* Close date picker if clicked elsewhere. */
_checkExternalClick:function(e){if($.datepicker._curInst){var t=$(e.target),a=$.datepicker._getInst(t[0]);(t[0].id==$.datepicker._mainDivId||0!=t.parents("#"+$.datepicker._mainDivId).length||t.hasClass($.datepicker.markerClassName)||t.closest("."+$.datepicker._triggerClass).length||!$.datepicker._datepickerShowing||$.datepicker._inDialog&&$.blockUI)&&(!t.hasClass($.datepicker.markerClassName)||$.datepicker._curInst==a)||$.datepicker._hideDatepicker()}},/* Adjust one of the date sub-fields. */
_adjustDate:function(e,t,a){var i=$(e),r=this._getInst(i[0]);this._isDisabledDatepicker(i[0])||(this._adjustInstDate(r,t+("M"==a?this._get(r,"showCurrentAtPos"):0),// undo positioning
a),this._updateDatepicker(r))},/* Action for current link. */
_gotoToday:function(e){var t=$(e),a=this._getInst(t[0]);if(this._get(a,"gotoCurrent")&&a.currentDay)a.selectedDay=a.currentDay,a.drawMonth=a.selectedMonth=a.currentMonth,a.drawYear=a.selectedYear=a.currentYear;else{var i=new Date;a.selectedDay=i.getDate(),a.drawMonth=a.selectedMonth=i.getMonth(),a.drawYear=a.selectedYear=i.getFullYear()}this._notifyChange(a),this._adjustDate(t)},/* Action for selecting a new month/year. */
_selectMonthYear:function(e,t,a){var i=$(e),r=this._getInst(i[0]);r["selected"+("M"==a?"Month":"Year")]=r["draw"+("M"==a?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(i)},/* Action for selecting a day. */
_selectDay:function(e,t,a,i){var r=$(e);if(!$(i).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(r[0])){var s=this._getInst(r[0]);s.selectedDay=s.currentDay=$("a",i).html(),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=a,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear))}},/* Erase the input field and hide the date picker. */
_clearDate:function(e){var t=$(e);this._getInst(t[0]);this._selectDate(t,"")},/* Update the input field with the selected date. */
_selectDate:function(e,t){var a=$(e),i=this._getInst(a[0]);t=null!=t?t:this._formatDate(i),i.input&&i.input.val(t),this._updateAlternate(i);var r=this._get(i,"onSelect");r?r.apply(i.input?i.input[0]:null,[t,i]):i.input&&i.input.trigger("change"),// fire the change event
i.inline?this._updateDatepicker(i):(this._hideDatepicker(),this._lastInput=i.input[0],"object"!=typeof i.input[0]&&i.input.focus(),// restore focus
this._lastInput=null)},/* Update any alternate field to synchronise with the main field. */
_updateAlternate:function(e){var t=this._get(e,"altField");if(t){// update alternate field too
var a=this._get(e,"altFormat")||this._get(e,"dateFormat"),i=this._getDate(e),r=this.formatDate(a,i,this._getFormatConfig(e));$(t).each(function(){$(this).val(r)})}},/* Set as beforeShowDay function to prevent selection of weekends.
	   @param  date  Date - the date to customise
	   @return [boolean, string] - is this date selectable?, what is its CSS class? */
noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
	   @param  date  Date - the date to get the week for
	   @return  number - the number of the week within the year that contains this date */
iso8601Week:function(e){var t=new Date(e.getTime());
// Find Thursday of this week starting on Monday
t.setDate(t.getDate()+4-(t.getDay()||7));var a=t.getTime();// Compare with Jan 1
return t.setMonth(0),t.setDate(1),Math.floor(Math.round((a-t)/864e5)/7)+1},/* Parse a string value into a date object.
	   See formatDate below for the possible formats.

	   @param  format    string - the expected format of the date
	   @param  value     string - the date in the above format
	   @param  settings  Object - attributes include:
	                     shortYearCutoff  number - the cutoff year for determining the century (optional)
	                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)
	                     dayNames         string[7] - names of the days from Sunday (optional)
	                     monthNamesShort  string[12] - abbreviated names of the months (optional)
	                     monthNames       string[12] - names of the months (optional)
	   @return  Date - the extracted date value or null if value is blank */
parseDate:function(e,t,a){if(null==e||null==t)throw"Invalid arguments";if(t="object"==typeof t?t.toString():t+"",""==t)return null;var i=(a?a.shortYearCutoff:null)||this._defaults.shortYearCutoff;i="string"!=typeof i?i:(new Date).getFullYear()%100+parseInt(i,10);for(var r=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,s=(a?a.dayNames:null)||this._defaults.dayNames,n=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,d=(a?a.monthNames:null)||this._defaults.monthNames,o=-1,c=-1,l=-1,u=-1,h=!1,p=function(t){var a=m+1<e.length&&e.charAt(m+1)==t;return a&&m++,a},g=function(e){var a=p(e),i="@"==e?14:"!"==e?20:"y"==e&&a?4:"o"==e?3:2,r=new RegExp("^\\d{1,"+i+"}"),s=t.substring(k).match(r);if(!s)throw"Missing number at position "+k;return k+=s[0].length,parseInt(s[0],10)},_=function(e,a,i){var r=$.map(p(e)?i:a,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)}),s=-1;if($.each(r,function(e,a){var i=a[1];if(t.substr(k,i.length).toLowerCase()==i.toLowerCase())return s=a[0],k+=i.length,!1}),s!=-1)return s+1;throw"Unknown name at position "+k},f=function(){if(t.charAt(k)!=e.charAt(m))throw"Unexpected literal at position "+k;k++},k=0,m=0;m<e.length;m++)if(h)"'"!=e.charAt(m)||p("'")?f():h=!1;else switch(e.charAt(m)){case"d":l=g("d");break;case"D":_("D",r,s);break;case"o":u=g("o");break;case"m":c=g("m");break;case"M":c=_("M",n,d);break;case"y":o=g("y");break;case"@":var D=new Date(g("@"));o=D.getFullYear(),c=D.getMonth()+1,l=D.getDate();break;case"!":var D=new Date((g("!")-this._ticksTo1970)/1e4);o=D.getFullYear(),c=D.getMonth()+1,l=D.getDate();break;case"'":p("'")?f():h=!0;break;default:f()}if(k<t.length)throw"Extra/unparsed characters found in date: "+t.substring(k);if(o==-1?o=(new Date).getFullYear():o<100&&(o+=(new Date).getFullYear()-(new Date).getFullYear()%100+(o<=i?0:-100)),u>-1)for(c=1,l=u;;){var v=this._getDaysInMonth(o,c-1);if(l<=v)break;c++,l-=v}var D=this._daylightSavingAdjust(new Date(o,c-1,l));if(D.getFullYear()!=o||D.getMonth()+1!=c||D.getDate()!=l)throw"Invalid date";// E.g. 31/02/00
return D},/* Standard date formats. */
ATOM:"yy-mm-dd",// RFC 3339 (ISO 8601)
COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",// RFC 822
TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",// ISO 8601
_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,/* Format a date object into a string value.
	   The format can be combinations of the following:
	   d  - day of month (no leading zero)
	   dd - day of month (two digit)
	   o  - day of year (no leading zeros)
	   oo - day of year (three digit)
	   D  - day name short
	   DD - day name long
	   m  - month of year (no leading zero)
	   mm - month of year (two digit)
	   M  - month name short
	   MM - month name long
	   y  - year (two digit)
	   yy - year (four digit)
	   @ - Unix timestamp (ms since 01/01/1970)
	   ! - Windows ticks (100ns since 01/01/0001)
	   '...' - literal text
	   '' - single quote

	   @param  format    string - the desired format of the date
	   @param  date      Date - the date value to format
	   @param  settings  Object - attributes include:
	                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)
	                     dayNames         string[7] - names of the days from Sunday (optional)
	                     monthNamesShort  string[12] - abbreviated names of the months (optional)
	                     monthNames       string[12] - names of the months (optional)
	   @return  string - the date in the above format */
formatDate:function(e,t,a){if(!t)return"";var i=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,r=(a?a.dayNames:null)||this._defaults.dayNames,s=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,n=(a?a.monthNames:null)||this._defaults.monthNames,d=function(t){var a=h+1<e.length&&e.charAt(h+1)==t;return a&&h++,a},o=function(e,t,a){var i=""+t;if(d(e))for(;i.length<a;)i="0"+i;return i},c=function(e,t,a,i){return d(e)?i[t]:a[t]},l="",u=!1;if(t)for(var h=0;h<e.length;h++)if(u)"'"!=e.charAt(h)||d("'")?l+=e.charAt(h):u=!1;else switch(e.charAt(h)){case"d":l+=o("d",t.getDate(),2);break;case"D":l+=c("D",t.getDay(),i,r);break;case"o":l+=o("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=o("m",t.getMonth()+1,2);break;case"M":l+=c("M",t.getMonth(),s,n);break;case"y":l+=d("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=1e4*t.getTime()+this._ticksTo1970;break;case"'":d("'")?l+="'":u=!0;break;default:l+=e.charAt(h)}return l},/* Extract all possible characters from the date format. */
_possibleChars:function(e){for(var t="",a=!1,i=function(t){var a=r+1<e.length&&e.charAt(r+1)==t;return a&&r++,a},r=0;r<e.length;r++)if(a)"'"!=e.charAt(r)||i("'")?t+=e.charAt(r):a=!1;else switch(e.charAt(r)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;// Accept anything
case"'":i("'")?t+="'":a=!0;break;default:t+=e.charAt(r)}return t},/* Get a setting value, defaulting if necessary. */
_get:function(e,t){return e.settings[t]!==undefined?e.settings[t]:this._defaults[t]},/* Parse existing date and initialise date picker. */
_setDateFromField:function(e,t){if(e.input.val()!=e.lastVal){var a,i,r=this._get(e,"dateFormat"),s=e.lastVal=e.input?e.input.val():null;a=i=this._getDefaultDate(e);var n=this._getFormatConfig(e);try{a=this.parseDate(r,s,n)||i}catch(d){this.log(d),s=t?"":s}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=s?a.getDate():0,e.currentMonth=s?a.getMonth():0,e.currentYear=s?a.getFullYear():0,this._adjustInstDate(e)}},/* Retrieve the default date shown on opening. */
_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},/* A date may be specified as an exact value or a relative one. */
_determineDate:function(e,t,a){var i=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},r=function(t){try{return $.datepicker.parseDate($.datepicker._get(e,"dateFormat"),t,$.datepicker._getFormatConfig(e))}catch(a){}for(var i=(t.toLowerCase().match(/^c/)?$.datepicker._getDate(e):null)||new Date,r=i.getFullYear(),s=i.getMonth(),n=i.getDate(),d=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,o=d.exec(t);o;){switch(o[2]||"d"){case"d":case"D":n+=parseInt(o[1],10);break;case"w":case"W":n+=7*parseInt(o[1],10);break;case"m":case"M":s+=parseInt(o[1],10),n=Math.min(n,$.datepicker._getDaysInMonth(r,s));break;case"y":case"Y":r+=parseInt(o[1],10),n=Math.min(n,$.datepicker._getDaysInMonth(r,s))}o=d.exec(t)}return new Date(r,s,n)},s=null==t||""===t?a:"string"==typeof t?r(t):"number"==typeof t?isNaN(t)?a:i(t):new Date(t.getTime());return s=s&&"Invalid Date"==s.toString()?a:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},/* Handle switch to/from daylight saving.
	   Hours may be non-zero on daylight saving cut-over:
	   > 12 when midnight changeover, but then cannot generate
	   midnight datetime, so jump to 1AM, otherwise reset.
	   @param  date  (Date) the date to check
	   @return  (Date) the corrected date */
_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},/* Set the date(s) directly. */
_setDate:function(e,t,a){var i=!t,r=e.selectedMonth,s=e.selectedYear,n=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=n.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=n.getMonth(),e.drawYear=e.selectedYear=e.currentYear=n.getFullYear(),r==e.selectedMonth&&s==e.selectedYear||a||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},/* Retrieve the date(s) directly. */
_getDate:function(e){var t=!e.currentYear||e.input&&""==e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},/* Generate the HTML for the current state of the date picker. */
_generateHTML:function(e){var t=new Date;t=this._daylightSavingAdjust(new Date(t.getFullYear(),t.getMonth(),t.getDate()));// clear time
var a=this._get(e,"isRTL"),i=this._get(e,"showButtonPanel"),r=this._get(e,"hideIfNoPrevNext"),s=this._get(e,"navigationAsDateFormat"),n=this._getNumberOfMonths(e),d=this._get(e,"showCurrentAtPos"),o=this._get(e,"stepMonths"),c=1!=n[0]||1!=n[1],l=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),u=this._getMinMaxDate(e,"min"),h=this._getMinMaxDate(e,"max"),p=e.drawMonth-d,g=e.drawYear;if(p<0&&(p+=12,g--),h){var _=this._daylightSavingAdjust(new Date(h.getFullYear(),h.getMonth()-n[0]*n[1]+1,h.getDate()));for(_=u&&_<u?u:_;this._daylightSavingAdjust(new Date(g,p,1))>_;)p--,p<0&&(p=11,g--)}e.drawMonth=p,e.drawYear=g;var f=this._get(e,"prevText");f=s?this.formatDate(f,this._daylightSavingAdjust(new Date(g,p-o,1)),this._getFormatConfig(e)):f;var k=this._canAdjustMonth(e,-1,g,p)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+e.id+"', -"+o+", 'M');\" title=\""+f+'"><span class="ui-icon ui-icon-circle-triangle-'+(a?"e":"w")+'">'+f+"</span></a>":r?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+f+'"><span class="ui-icon ui-icon-circle-triangle-'+(a?"e":"w")+'">'+f+"</span></a>",m=this._get(e,"nextText");m=s?this.formatDate(m,this._daylightSavingAdjust(new Date(g,p+o,1)),this._getFormatConfig(e)):m;var D=this._canAdjustMonth(e,1,g,p)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+e.id+"', +"+o+", 'M');\" title=\""+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(a?"w":"e")+'">'+m+"</span></a>":r?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(a?"w":"e")+'">'+m+"</span></a>",v=this._get(e,"currentText"),y=this._get(e,"gotoCurrent")&&e.currentDay?l:t;v=s?this.formatDate(v,y,this._getFormatConfig(e)):v;var M=e.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(e,"closeText")+"</button>",b=i?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(a?M:"")+(this._isInRange(e,y)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+e.id+"');\">"+v+"</button>":"")+(a?"":M)+"</div>":"",w=parseInt(this._get(e,"firstDay"),10);w=isNaN(w)?0:w;for(var C=this._get(e,"showWeek"),I=this._get(e,"dayNames"),x=(this._get(e,"dayNamesShort"),this._get(e,"dayNamesMin")),N=this._get(e,"monthNames"),S=this._get(e,"monthNamesShort"),Y=this._get(e,"beforeShowDay"),A=this._get(e,"showOtherMonths"),F=this._get(e,"selectOtherMonths"),T=(this._get(e,"calculateWeek")||this.iso8601Week,this._getDefaultDate(e)),j="",O=0;O<n[0];O++){var K="";this.maxRows=4;for(var P=0;P<n[1];P++){var R=this._daylightSavingAdjust(new Date(g,p,e.selectedDay)),E=" ui-corner-all",W="";if(c){if(W+='<div class="ui-datepicker-group',n[1]>1)switch(P){case 0:W+=" ui-datepicker-group-first",E=" ui-corner-"+(a?"right":"left");break;case n[1]-1:W+=" ui-datepicker-group-last",E=" ui-corner-"+(a?"left":"right");break;default:W+=" ui-datepicker-group-middle",E=""}W+='">'}W+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+E+'">'+(/all|left/.test(E)&&0==O?a?D:k:"")+(/all|right/.test(E)&&0==O?a?k:D:"")+this._generateMonthYearHeader(e,p,g,u,h,O>0||P>0,N,S)+// draw month headers
'</div><table class="ui-datepicker-calendar"><thead><tr>';for(var L=C?'<th class="ui-datepicker-week-col">'+this._get(e,"weekHeader")+"</th>":"",H=0;H<7;H++){// days of the week
var z=(H+w)%7;L+="<th"+((H+w+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+I[z]+'">'+x[z]+"</span></th>"}W+=L+"</tr></thead><tbody>";var U=this._getDaysInMonth(g,p);g==e.selectedYear&&p==e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,U));var B=(this._getFirstDayOfMonth(g,p)-w+7)%7,V=Math.ceil((B+U)/7),Q=c&&this.maxRows>V?this.maxRows:V;//If multiple months, use the higher number of rows (see #7043)
this.maxRows=Q;for(var J=this._daylightSavingAdjust(new Date(g,p,1-B)),X=0;X<Q;X++){// create date picker rows
W+="<tr>";for(var Z=C?'<td class="ui-datepicker-week-col">'+this._get(e,"calculateWeek")(J)+"</td>":"",H=0;H<7;H++){// create date picker days
var q=Y?Y.apply(e.input?e.input[0]:null,[J]):[!0,""],G=J.getMonth()!=p,ee=G&&!F||!q[0]||u&&J<u||h&&J>h;Z+='<td class="'+((H+w+6)%7>=5?" ui-datepicker-week-end":"")+(// highlight weekends
G?" ui-datepicker-other-month":"")+(// highlight days from other months
J.getTime()==R.getTime()&&p==e.selectedMonth&&e._keyEvent||// user pressed key
T.getTime()==J.getTime()&&T.getTime()==R.getTime()?
// or defaultDate is current printedDate and defaultDate is selectedDate
" "+this._dayOverClass:"")+(// highlight selected day
ee?" "+this._unselectableClass+" ui-state-disabled":"")+(// highlight unselectable days
G&&!A?"":" "+q[1]+(// highlight custom dates
J.getTime()==l.getTime()?" "+this._currentClass:"")+(// highlight selected day
J.getTime()==t.getTime()?" ui-datepicker-today":""))+'"'+(// highlight today (if different)
G&&!A||!q[2]?"":' title="'+q[2]+'"')+(// cell title
ee?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+e.id+"',"+J.getMonth()+","+J.getFullYear()+', this);return false;"')+">"+(// actions
G&&!A?"&#xa0;":// display for other months
ee?'<span class="ui-state-default">'+J.getDate()+"</span>":'<a class="ui-state-default'+(J.getTime()==t.getTime()?" ui-state-highlight":"")+(J.getTime()==l.getTime()?" ui-state-active":"")+(// highlight selected day
G?" ui-priority-secondary":"")+// distinguish dates from other months
'" href="#">'+J.getDate()+"</a>")+"</td>",// display selectable date
J.setDate(J.getDate()+1),J=this._daylightSavingAdjust(J)}W+=Z+"</tr>"}p++,p>11&&(p=0,g++),W+="</tbody></table>"+(c?"</div>"+(n[0]>0&&P==n[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),K+=W}j+=K}return j+=b+($.browser.msie&&parseInt($.browser.version,10)<7&&!e.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),e._keyEvent=!1,j},/* Generate the month and year header. */
_generateMonthYearHeader:function(e,t,a,i,r,s,n,d){var o=this._get(e,"changeMonth"),c=this._get(e,"changeYear"),l=this._get(e,"showMonthAfterYear"),u='<div class="ui-datepicker-title">',h="";
// month selection
if(s||!o)h+='<span class="ui-datepicker-month">'+n[t]+"</span>";else{var p=i&&i.getFullYear()==a,g=r&&r.getFullYear()==a;h+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+e.id+"', this, 'M');\" >";for(var _=0;_<12;_++)(!p||_>=i.getMonth())&&(!g||_<=r.getMonth())&&(h+='<option value="'+_+'"'+(_==t?' selected="selected"':"")+">"+d[_]+"</option>");h+="</select>"}
// year selection
if(l||(u+=h+(!s&&o&&c?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",s||!c)u+='<span class="ui-datepicker-year">'+a+"</span>";else{
// determine range of years to display
var f=this._get(e,"yearRange").split(":"),k=(new Date).getFullYear(),m=function(e){var t=e.match(/c[+-].*/)?a+parseInt(e.substring(1),10):e.match(/[+-].*/)?k+parseInt(e,10):parseInt(e,10);return isNaN(t)?k:t},D=m(f[0]),v=Math.max(D,m(f[1]||""));for(D=i?Math.max(D,i.getFullYear()):D,v=r?Math.min(v,r.getFullYear()):v,e.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+e.id+"', this, 'Y');\" >";D<=v;D++)e.yearshtml+='<option value="'+D+'"'+(D==a?' selected="selected"':"")+">"+D+"</option>";e.yearshtml+="</select>",u+=e.yearshtml,e.yearshtml=null}// Close datepicker_header
return u+=this._get(e,"yearSuffix"),l&&(u+=(!s&&o&&c?"":"&#xa0;")+h),u+="</div>"},/* Adjust one of the date sub-fields. */
_adjustInstDate:function(e,t,a){var i=e.drawYear+("Y"==a?t:0),r=e.drawMonth+("M"==a?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(i,r))+("D"==a?t:0),n=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,r,s)));e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),"M"!=a&&"Y"!=a||this._notifyChange(e)},/* Ensure a date is within any min/max bounds. */
_restrictMinMax:function(e,t){var a=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max"),r=a&&t<a?a:t;return r=i&&r>i?i:r},/* Notify change of month/year. */
_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},/* Determine the number of months to show. */
_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},/* Determine the current maximum date - ensure no time components are set. */
_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},/* Find the number of days in a given month. */
_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},/* Find the day of the week of the first of a month. */
_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},/* Determines if we should allow a "next/prev" month display change. */
_canAdjustMonth:function(e,t,a,i){var r=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(a,i+(t<0?t:r[0]*r[1]),1));return t<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},/* Is the given date in the accepted range? */
_isInRange:function(e,t){var a=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max");return(!a||t.getTime()>=a.getTime())&&(!i||t.getTime()<=i.getTime())},/* Provide the configuration settings for formatting/parsing. */
_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},/* Format the given date for display. */
_formatDate:function(e,t,a,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var r=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,a,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),r,this._getFormatConfig(e))}}),/* Invoke the datepicker functionality.
   @param  options  string - a command, optionally followed by additional parameters or
                    Object - settings for attaching new datepicker functionality
   @return  jQuery object */
$.fn.datepicker=function(e){/* Verify an empty collection wasn't passed - Fixes #6976 */
if(!this.length)return this;/* Initialise the date picker. */
$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!=e&&"getDate"!=e&&"widget"!=e?"option"==e&&2==arguments.length&&"string"==typeof arguments[1]?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,// singleton instance
$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="@VERSION",
// Workaround for #4055
// Add another global to avoid noConflict issues with inline event handlers
window["DP_jQuery_"+dpuuid]=$}(jQuery);

/*!
// ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.7
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
// Copyright (C) 2007-2010 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ----------------------------------------------------------------------------
*/
!function($){$.fn.markItUp=function(settings,extraSettings){var options,ctrlKey,shiftKey,altKey;
// compute markItUp! path
return ctrlKey=shiftKey=altKey=!1,options={id:"",nameSpace:"",root:"",previewInWindow:"",// 'width=800, height=600, resizable=yes, scrollbars=yes'
previewAutoRefresh:!0,previewPosition:"after",previewTemplatePath:"~/templates/preview.html",previewParserPath:"",previewParserVar:"data",resizeHandle:!0,beforeInsert:"",afterInsert:"",onEnter:{},onShiftEnter:{},onCtrlEnter:{},onTab:{},markupSet:[{}]},$.extend(options,settings,extraSettings),options.root||$("script").each(function(e,t){miuScript=$(t).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/),null!==miuScript&&(options.root=miuScript[1])}),this.each(function(){
// apply the computed path to ~/
function localize(e,t){return t?e.replace(/("|')~\//g,"$1"+options.root):e.replace(/^~\//,options.root)}
// init and build editor
function init(){id="",nameSpace="",options.id?id='id="'+options.id+'"':$$.attr("id")&&(id='id="markItUp'+$$.attr("id").substr(0,1).toUpperCase()+$$.attr("id").substr(1)+'"'),options.nameSpace&&(nameSpace='class="'+options.nameSpace+'"'),$$.wrap("<div "+nameSpace+"></div>"),$$.wrap("<div "+id+' class="markItUp"></div>'),$$.wrap('<div class="markItUpContainer"></div>'),$$.addClass("markItUpEditor"),
// add the header before the textarea
header=$('<div class="markItUpHeader"></div>').insertBefore($$),$(dropMenus(options.markupSet)).appendTo(header),
// add the footer after the textarea
footer=$('<div class="markItUpFooter"></div>').insertAfter($$),
// add the resize handle after textarea
options.resizeHandle===!0&&$.browser.safari!==!0&&(resizeHandle=$('<div class="markItUpResizeHandle"></div>').insertAfter($$).bind("mousedown",function(e){var t,r,i=$$.height(),n=e.clientY;t=function(e){return $$.css("height",Math.max(20,e.clientY+i-n)+"px"),!1},r=function(e){return $("html").unbind("mousemove",t).unbind("mouseup",r),!1},$("html").bind("mousemove",t).bind("mouseup",r)}),footer.append(resizeHandle)),
// listen key events
$$.keydown(keyPressed).keyup(keyPressed),
// bind an event to catch external calls
$$.bind("insertion",function(e,t){t.target!==!1&&get(),textarea===$.markItUp.focused&&markup(t)}),
// remember the last focus
$$.focus(function(){$.markItUp.focused=this})}
// recursively build header with dropMenus from markupset
function dropMenus(markupSet){var ul=$("<ul></ul>"),i=0;return $("li:hover > ul",ul).css("display","block"),$.each(markupSet,function(){var button=this,t="",title,li,j;if(title=button.key?(button.name||"")+" [Ctrl+"+button.key+"]":button.name||"",key=button.key?'accesskey="'+button.key+'"':"",button.separator)li=$('<li class="markItUpSeparator">'+(button.separator||"")+"</li>").appendTo(ul);else{for(i++,j=levels.length-1;j>=0;j--)t+=levels[j]+"-";li=$('<li class="markItUpButton markItUpButton'+t+i+" "+(button.className||"")+'"><a href="" '+key+' title="'+title+'">'+(button.name||"")+"</a></li>").bind("contextmenu",function(){// prevent contextmenu on mac and allow ctrl+click
return!1}).click(function(){return!1}).mousedown(function(){return button.call&&eval(button.call)(),setTimeout(function(){markup(button)},1),!1}).hover(function(){$("> ul",this).show(),$(document).one("click",function(){// close dropmenu if click outside
$("ul ul",header).hide()})},function(){$("> ul",this).hide()}).appendTo(ul),button.dropMenu&&(levels.push(i),$(li).addClass("markItUpDropMenu").append(dropMenus(button.dropMenu)))}}),levels.pop(),ul}
// markItUp! markups
function magicMarkups(e){
// [![prompt]!], [![prompt:!:value]!]
return e?(e=e.toString(),e=e.replace(/\(\!\(([\s\S]*?)\)\!\)/g,function(e,t){var r=t.split("|!|");return altKey===!0?void 0!==r[1]?r[1]:r[0]:void 0===r[1]?"":r[0]}),e=e.replace(/\[\!\[([\s\S]*?)\]\!\]/g,function(e,t){var r=t.split(":!:");return abort!==!0&&(value=prompt(r[0],r[1]?r[1]:""),null===value&&(abort=!0),value)})):""}
// prepare action
function prepare(e){return $.isFunction(e)&&(e=e(hash)),magicMarkups(e)}
// build block to insert
function build(e){return openWith=prepare(clicked.openWith),placeHolder=prepare(clicked.placeHolder),replaceWith=prepare(clicked.replaceWith),closeWith=prepare(clicked.closeWith),""!==replaceWith?block=openWith+replaceWith+closeWith:""===selection&&""!==placeHolder?block=openWith+placeHolder+closeWith:block=openWith+(e||selection)+closeWith,{block:block,openWith:openWith,replaceWith:replaceWith,placeHolder:placeHolder,closeWith:closeWith}}
// define markup to insert
function markup(e){var t,r,i,n;if(hash=clicked=e,get(),$.extend(hash,{line:"",root:options.root,textarea:textarea,selection:selection||"",caretPosition:caretPosition,ctrlKey:ctrlKey,shiftKey:shiftKey,altKey:altKey}),
// callbacks before insertion
prepare(options.beforeInsert),prepare(clicked.beforeInsert),ctrlKey===!0&&shiftKey===!0&&prepare(clicked.beforeMultiInsert),$.extend(hash,{line:1}),ctrlKey===!0&&shiftKey===!0){for(lines=selection.split(/\r?\n/),r=0,i=lines.length,n=0;n<i;n++)""!==$.trim(lines[n])?($.extend(hash,{line:++r,selection:lines[n]}),lines[n]=build(lines[n]).block):lines[n]="";string={block:lines.join("\n")},start=caretPosition,t=string.block.length+($.browser.opera?i:0)}else ctrlKey===!0?(string=build(selection),start=caretPosition+string.openWith.length,t=string.block.length-string.openWith.length-string.closeWith.length,t-=fixIeBug(string.block)):shiftKey===!0?(string=build(selection),start=caretPosition,t=string.block.length,t-=fixIeBug(string.block)):(string=build(selection),start=caretPosition+string.block.length,t=0,start-=fixIeBug(string.block));""===selection&&""===string.replaceWith&&(caretOffset+=fixOperaBug(string.block),start=caretPosition+string.openWith.length,t=string.block.length-string.openWith.length-string.closeWith.length,caretOffset=$$.val().substring(caretPosition,$$.val().length).length,caretOffset-=fixOperaBug($$.val().substring(0,caretPosition))),$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition}),string.block!==selection&&abort===!1?(insert(string.block),set(start,t)):caretOffset=-1,get(),$.extend(hash,{line:"",selection:selection}),
// callbacks after insertion
ctrlKey===!0&&shiftKey===!0&&prepare(clicked.afterMultiInsert),prepare(clicked.afterInsert),prepare(options.afterInsert),
// refresh preview if opened
previewWindow&&options.previewAutoRefresh&&refreshPreview(),
// reinit keyevent
shiftKey=altKey=ctrlKey=abort=!1}
// Substract linefeed in Opera
function fixOperaBug(e){return $.browser.opera?e.length-e.replace(/\n*/g,"").length:0}
// Substract linefeed in IE
function fixIeBug(e){return $.browser.msie?e.length-e.replace(/\r*/g,"").length:0}
// add markup
function insert(e){if(document.selection){var t=document.selection.createRange();t.text=e}else $$.val($$.val().substring(0,caretPosition)+e+$$.val().substring(caretPosition+selection.length,$$.val().length))}
// set a selection
function set(e,t){if(textarea.createTextRange){
// quick fix to make it work on Opera 9.5
if($.browser.opera&&$.browser.version>=9.5&&0==t)return!1;range=textarea.createTextRange(),range.collapse(!0),range.moveStart("character",e),range.moveEnd("character",t),range.select()}else textarea.setSelectionRange&&textarea.setSelectionRange(e,e+t);textarea.scrollTop=scrollPosition,textarea.focus()}
// get the selection
function get(){if(textarea.focus(),scrollPosition=textarea.scrollTop,document.selection)if(selection=document.selection.createRange().text,$.browser.msie){// ie
var e=document.selection.createRange(),t=e.duplicate();for(t.moveToElementText(textarea),caretPosition=-1;t.inRange(e);)// fix most of the ie bugs with linefeeds...
t.moveStart("character"),caretPosition++}else// opera
caretPosition=textarea.selectionStart;else// gecko & webkit
caretPosition=textarea.selectionStart,selection=$$.val().substring(caretPosition,textarea.selectionEnd);return selection}
// open preview window
function preview(){!previewWindow||previewWindow.closed?options.previewInWindow?previewWindow=window.open("","preview",options.previewInWindow):(iFrame=$('<iframe class="markItUpPreviewFrame"></iframe>'),"after"==options.previewPosition?iFrame.insertAfter(footer):iFrame.insertBefore(header),previewWindow=iFrame[iFrame.length-1].contentWindow||frame[iFrame.length-1]):altKey===!0&&(
// Thx Stephen M. Redd for the IE8 fix
iFrame?iFrame.remove():previewWindow.close(),previewWindow=iFrame=!1),options.previewAutoRefresh||refreshPreview()}
// refresh Preview window
function refreshPreview(){renderPreview()}function renderPreview(){return""!==options.previewParserPath?$.ajax({type:"POST",url:options.previewParserPath,data:options.previewParserVar+"="+encodeURIComponent($$.val()),success:function(e){writeInPreview(localize(e,1))}}):template||$.ajax({url:options.previewTemplatePath,success:function(e){writeInPreview(localize(e,1).replace(/<!-- content -->/g,$$.val()))}}),!1}function writeInPreview(e){if(previewWindow.document){try{sp=previewWindow.document.documentElement.scrollTop}catch(t){sp=0}previewWindow.document.open(),previewWindow.document.write(e),previewWindow.document.close(),previewWindow.document.documentElement.scrollTop=sp}options.previewInWindow&&previewWindow.focus()}
// set keys pressed
function keyPressed(e){if(shiftKey=e.shiftKey,altKey=e.altKey,ctrlKey=(!e.altKey||!e.ctrlKey)&&e.ctrlKey,"keydown"===e.type){if(ctrlKey===!0&&(li=$('a[accesskey="'+String.fromCharCode(e.keyCode)+'"]',header).parent("li"),0!==li.length))return ctrlKey=!1,setTimeout(function(){li.triggerHandler("mousedown")},1),!1;if(13===e.keyCode||10===e.keyCode)// Enter key
// Enter key
// Enter + Ctrl
// Enter + Shift
// only Enter
return ctrlKey===!0?(ctrlKey=!1,markup(options.onCtrlEnter),options.onCtrlEnter.keepDefault):shiftKey===!0?(shiftKey=!1,markup(options.onShiftEnter),options.onShiftEnter.keepDefault):(markup(options.onEnter),options.onEnter.keepDefault);if(9===e.keyCode)// Tab key
// Tab key
return 1!=shiftKey&&1!=ctrlKey&&1!=altKey&&(caretOffset!==-1?(get(),caretOffset=$$.val().length-caretOffset,set(caretOffset,0),caretOffset=-1,!1):(markup(options.onTab),options.onTab.keepDefault))}}var $$,textarea,levels,scrollPosition,caretPosition,caretOffset,clicked,hash,header,footer,previewWindow,template,iFrame,abort;$$=$(this),textarea=this,levels=[],abort=!1,scrollPosition=caretPosition=0,caretOffset=-1,options.previewParserPath=localize(options.previewParserPath),options.previewTemplatePath=localize(options.previewTemplatePath),init()})},$.fn.markItUpRemove=function(){return this.each(function(){var e=$(this).unbind().removeClass("markItUpEditor");e.parent("div").parent("div.markItUp").parent("div").replaceWith(e)})},$.markItUp=function(e){var t={target:!1};return $.extend(t,e),t.target?$(t.target).each(function(){$(this).focus(),$(this).trigger("insertion",[t])}):void $("textarea").trigger("insertion",[t])}}(jQuery);

/**
 * @license 
 * jQuery Tools 1.2.1 / Mask - Dim the lights
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/toolbox/mask.html
 *
 * Since: Mar 2010
 * Date:    Tue May 11 09:22:32 2010 +0000 
 */
!function(n){/* one of the greatest headaches in the tool. finally made it */
function o(){
// the horror case
if(n.browser.msie){
// if there are no scrollbars then use window.height
var o=n(document).height(),e=n(window).height();return[window.innerWidth||// ie7+
document.documentElement.clientWidth||// ie6  
document.body.clientWidth,// ie6 quirks mode
o-e<20?e:o]}
// other well behaving browsers
return[n(window).width(),n(document).height()]}function e(o){if(o)return o.call(n.mask)}
// static constructs
n.tools=n.tools||{version:"1.2.1"};var t;t=n.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:!0,closeOnEsc:!0,
// css settings
zIndex:9998,opacity:.8,startOpacity:0,color:"#fff",
// callbacks
onLoad:null,onClose:null}};var i,s,c,d,a;n.mask={load:function(r,u){
// already loaded ?
if(c)return this;
// configuration
"string"==typeof r&&(r={color:r}),
// use latest config
r=r||d,d=r=n.extend(n.extend({},t.conf),r),
// get the mask
i=n("#"+r.maskId),
// or create it
i.length||(i=n("<div/>").attr("id",r.maskId),n("body").append(i));
// set position and dimensions 			
var l=o();i.css({position:"absolute",top:0,left:0,width:l[0],height:l[1],display:"none",opacity:r.startOpacity,zIndex:r.zIndex});
// background color 
var f=i.css("backgroundColor");
// onBeforeLoad
// onBeforeLoad
// esc button
// mask click closes
// resize mask when window is resized
// exposed elements
// make sure element is positioned absolutely or relatively
// make elements sit on top of the mask
// reveal mask
return f&&"transparent"!=f&&"rgba(0, 0, 0, 0)"!=f||i.css("backgroundColor",r.color),e(r.onBeforeLoad)===!1?this:(r.closeOnEsc&&n(document).bind("keydown.mask",function(o){27==o.keyCode&&n.mask.close(o)}),r.closeOnClick&&i.bind("click.mask",function(o){n.mask.close(o)}),n(window).bind("resize.mask",function(){n.mask.fit()}),u&&u.length&&(a=u.eq(0).css("zIndex"),n.each(u,function(){var o=n(this);/relative|absolute|fixed/i.test(o.css("position"))||o.css("position","relative")}),s=u.css({zIndex:Math.max(r.zIndex+1,"auto"==a?0:a)})),i.css({display:"block"}).fadeTo(r.loadSpeed,r.opacity,function(){n.mask.fit(),e(r.onLoad)}),c=!0,this)},close:function(){if(c){
// onBeforeClose
if(e(d.onBeforeClose)===!1)return this;i.fadeOut(d.closeSpeed,function(){e(d.onClose),s&&s.css({zIndex:a})}),
// unbind various event listeners
n(document).unbind("keydown.mask"),i.unbind("click.mask"),n(window).unbind("resize.mask"),c=!1}return this},fit:function(){if(c){var n=o();i.css({width:n[0],height:n[1]})}},getMask:function(){return i},isLoaded:function(){return c},getConf:function(){return d},getExposed:function(){return s}},n.fn.mask=function(o){return n.mask.load(o),this},n.fn.expose=function(o){return n.mask.load(o,this),this}}(jQuery);

/**
 * @license 
 * jQuery Tools 1.2.3 Overlay - Overlay base. Extend it.
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/overlay/
 *
 * Since: March 2008
 * Date:    Mon Jun 7 13:43:53 2010 +0000 
 */
!function(e){function t(t,i){
// private variables
var r,c,l,s=this,a=t.add(s),f=e(window),d=e.tools.expose&&(i.mask||i.expose),u=Math.random().toString().slice(10);
// mask configuration
d&&("string"==typeof d&&(d={color:d}),d.closeOnClick=d.closeOnEsc=!1);
// get overlay and triggerr
var g=i.target||t.attr("rel");
// overlay not found. cannot continue
if(c=g?e(g):t,!c.length)throw"Could not find Overlay: "+g;
// trigger's click event
t&&t.index(c)==-1&&t.click(function(e){return s.load(e),e.preventDefault()}),
// API methods  
e.extend(s,{load:function(t){
// can be opened only once
if(s.isOpened())return s;
// find the effect
var r=o[i.effect];if(!r)throw'Overlay: cannot find effect : "'+i.effect+'"';if(
// close other instances?
i.oneInstance&&e.each(n,function(){this.close(t)}),
// onBeforeLoad
t=t||e.Event(),t.type="onBeforeLoad",a.trigger(t),t.isDefaultPrevented())return s;
// opened
l=!0,
// possible mask effect
d&&e(c).expose(d);
// position & dimensions 
var g=i.top,h=i.left,p=c.outerWidth({margin:!0}),v=c.outerHeight({margin:!0});
// load effect  		 		
// mask.click closes overlay
// when window is clicked outside overlay, we close
// keyboard::escape
// one callback is enough if multiple instances are loaded simultaneously
return"string"==typeof g&&(g="center"==g?Math.max((f.height()-v)/2,0):parseInt(g,10)/100*f.height()),"center"==h&&(h=Math.max((f.width()-p)/2,0)),r[0].call(s,{top:g,left:h},function(){l&&(t.type="onLoad",a.trigger(t))}),d&&i.closeOnClick&&e.mask.getMask().one("click",s.close),i.closeOnClick&&e(document).bind("click."+u,function(t){e(t.target).parents(c).length||s.close(t)}),i.closeOnEsc&&e(document).bind("keydown."+u,function(e){27==e.keyCode&&s.close(e)}),s},close:function(t){
// close effect
// unbind the keyboard / clicking actions
return s.isOpened()?(t=t||e.Event(),t.type="onBeforeClose",a.trigger(t),t.isDefaultPrevented()?void 0:(l=!1,o[i.effect][1].call(s,function(){t.type="onClose",a.trigger(t)}),e(document).unbind("click."+u).unbind("keydown."+u),d&&e.mask.close(),s)):s},getOverlay:function(){return c},getTrigger:function(){return t},getClosers:function(){return r},isOpened:function(){return l},
// manipulate start, finish and speeds
getConf:function(){return i}}),
// callbacks	
e.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(t,n){
// configuration
e.isFunction(i[n])&&e(s).bind(n,i[n]),
// API
s[n]=function(t){return e(s).bind(n,t),s}}),
// close button
r=c.find(i.close||".close"),r.length||i.close||(r=e('<a class="close"></a>'),c.prepend(r)),r.click(function(e){s.close(e)}),
// autoload
i.load&&s.load()}
// static constructs
e.tools=e.tools||{version:"1.2.3"},e.tools.overlay={addEffect:function(e,t,n){o[e]=[t,n]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",
// since 1.2. fixed positioning not supported by IE6
fixed:!e.browser.msie||e.browser.version>6,left:"center",load:!1,// 1.2
mask:null,oneInstance:!0,speed:"normal",target:null,// target element to be overlayed. by default taken from [rel]  
top:"10%"}};var n=[],o={};
// the default effect. nice and easy!
e.tools.overlay.addEffect("default",/* 
			onLoad/onClose functions must be called otherwise none of the 
			user supplied callback methods won't be called
		*/
function(t,n){var o=this.getConf(),i=e(window);o.fixed||(t.top+=i.scrollTop(),t.left+=i.scrollLeft()),t.position=o.fixed?"fixed":"absolute",this.getOverlay().css(t).fadeIn(o.speed,n)},function(e){this.getOverlay().fadeOut(this.getConf().closeSpeed,e)}),
// jQuery plugin initialization
e.fn.overlay=function(o){
// already constructed --> return API
var i=this.data("overlay");return i?i:(e.isFunction(o)&&(o={onBeforeLoad:o}),o=e.extend(!0,{},e.tools.overlay.conf,o),this.each(function(){i=new t(e(this),o),n.push(i),e(this).data("overlay",i)}),o.api?i:this)}}(jQuery);

/*!
 * jQuery Templates Plugin 1.0.0pre
 * http://github.com/jquery/jquery-tmpl
 * Requires jQuery 1.4.2
 *
 * Copyright Software Freedom Conservancy, Inc.
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 */
!function(t,e){function n(e,n,l,a){
// Returns a template item data structure for a new rendered instance of a template (a 'template item').
// The content field is a hierarchical array of strings and nested items (to be
// removed and replaced by nodes field of dom elements, once inserted in DOM).
var r={data:a||0===a||a===!1?a:n?n.data:{},_wrap:n?n._wrap:null,tmpl:null,parent:n||null,nodes:[],calls:c,nest:f,wrap:m,html:s,update:d};
// Build the hierarchical content to be used during insertion into DOM
// Keep track of new template item, until it is stored as jQuery Data on DOM element
return e&&t.extend(r,e,{nodes:[],parent:n}),l&&(r.tmpl=l,r._ctnt=r._ctnt||r.tmpl(t,r),r.key=++k,(j.length?v:g)[k]=r),r}
//========================== Private helper functions, used by code above ==========================
function l(e,n,r){
// Convert hierarchical content into flat string array
// and finally return array of fragments ready for DOM insertion
var p,i=r?t.map(r,function(t){
// Insert template item annotations, to be converted to jQuery.data( "tmplItem" ) when elems are inserted into DOM.
// This is a child template item. Build nested template.
return"string"==typeof t?e.key?t.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+h+'="'+e.key+'" $2'):t:l(t,e,t._ctnt)}):
// If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}.
e;
// top-level template
// Support templates which have initial or final text nodes, or consist only of text
// Also support HTML entities within the HTML markup.
return n?i:(i=i.join(""),i.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(e,n,l,r){p=t(l).get(),u(p),n&&(p=a(n).concat(p)),r&&(p=p.concat(a(r)))}),p?p:a(i))}function a(e){
// Use createElement, since createTextNode will not render HTML entities correctly
var n=document.createElement("div");return n.innerHTML=e,t.makeArray(n.childNodes)}
// Generate a reusable function that will serve to render a template against data
function r(e){
// Use the variable __ to hold a string array while building the compiled template. (See https://github.com/jquery/jquery-tmpl/issues#issue/10).
// Convert the template into pure JavaScript
return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+t.trim(e).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(e,n,l,a,r,p,o){var u,c,f,m=t.tmpl.tag[l];if(!m)throw"Unknown template tag: "+l;
// Support for target being things like a.toLowerCase();
// In that case don't call with template item as 'this' pointer. Just evaluate...
return u=m._default||[],p&&!/\w$/.test(r)&&(r+=p,p=""),r?(r=i(r),o=o?","+i(o)+")":p?")":"",c=p?r.indexOf(".")>-1?r+i(p):"("+r+").call($item"+o:r,f=p?c:"(typeof("+r+")==='function'?("+r+").call($item):("+r+"))"):f=c=u.$1||"null",a=i(a),"');"+m[n?"close":"open"].split("$notnull_1").join(r?"typeof("+r+")!=='undefined' && ("+r+")!=null":"true").split("$1a").join(f).split("$1").join(c).split("$2").join(a||u.$2||"")+"__.push('"})+"');}return __;")}function p(e,n){
// Build the wrapped content.
e._wrap=l(e,!0,
// Suport imperative scenario in which options.wrapped can be set to a selector or an HTML string.
t.isArray(n)?n:[y.test(n)?n:t(n).html()]).join("")}function i(t){return t?t.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function o(t){var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}
// Store template items in jQuery.data(), ensuring a unique tmplItem data data structure for each rendered template instance.
function u(e){function l(e){function l(t){t+=u,p=c[t]=c[t]||n(p,g[p.parent.key+u]||p.parent)}var a,r,p,i,o=e;
// Ensure that each rendered template inserted into the DOM has its own template item,
if(i=e.getAttribute(h)){for(;o.parentNode&&1===(o=o.parentNode).nodeType&&!(a=o.getAttribute(h)););a!==i&&(
// The next ancestor with a _tmplitem expando is on a different key than this one.
// So this is a top-level element within this template item
// Set pntNode to the key of the parentNode, or to 0 if pntNode.parentNode is null, or pntNode is a fragment.
o=o.parentNode?11===o.nodeType?0:o.getAttribute(h)||0:0,(p=g[i])||(
// The item is for wrapped content, and was copied from the temporary parent wrappedItem.
p=v[i],p=n(p,g[o]||v[o]),p.key=++k,g[k]=p),T&&l(i)),e.removeAttribute(h)}else T&&(p=t.data(e,"tmplItem"))&&(
// This was a rendered element, cloned during append or appendTo etc.
// TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem.
l(p.key),g[p.key]=p,o=t.data(e.parentNode,"tmplItem"),o=o?o.key:0);if(p){
// Find the template item of the parent element.
// (Using !=, not !==, since pntItem.key is number, and pntNode may be a string)
for(r=p;r&&r.key!=o;)
// Add this element as a top-level node for this rendered template item, as well as for any
// ancestor items between this item and the item of its parent element
r.nodes.push(e),r=r.parent;
// Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering...
delete p._ctnt,delete p._wrap,
// Store template item as jQuery data on the element
t.data(e,"tmplItem",p)}}var a,r,p,i,o,u="_"+T,c={};for(p=0,i=e.length;p<i;p++)if(1===(a=e[p]).nodeType){for(r=a.getElementsByTagName("*"),o=r.length-1;o>=0;o--)l(r[o]);l(a)}}
//---- Helper functions for template item ----
function c(t,e,n,l){return t?void j.push({_:t,tmpl:e,item:this,data:n,options:l}):j.pop()}function f(e,n,l){
// nested template, using {{tmpl}} tag
return t.tmpl(t.template(e),n,l,this)}function m(e,n){
// nested template, using {{wrap}} tag
var l=e.options||{};
// Apply the template, which may incorporate wrapped content,
return l.wrapped=n,t.tmpl(t.template(e.tmpl),e.data,l,e.item)}function s(e,n){var l=this._wrap;return t.map(t(t.isArray(l)?l.join(""):l).filter(e||"*"),function(t){return n?t.innerText||t.textContent:t.outerHTML||o(t)})}function d(){var e=this.nodes;t.tmpl(null,null,null,this).insertBefore(e[0]),t(e).remove()}var $,_=t.fn.domManip,h="_tmplitem",y=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,g={},v={},w={key:0,data:{}},k=0,T=0,j=[];
// Override appendTo etc., in order to provide support for targeting multiple elements. (This code would disappear if integrated in jquery core).
t.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,n){t.fn[e]=function(l){var a,r,p,i,o=[],u=t(l),c=1===this.length&&this[0].parentNode;if($=g||{},c&&11===c.nodeType&&1===c.childNodes.length&&1===u.length)u[n](this[0]),o=this;else{for(r=0,p=u.length;r<p;r++)T=r,a=(r>0?this.clone(!0):this).get(),t(u[r])[n](a),o=o.concat(a);T=0,o=this.pushStack(o,e,u.selector)}return i=$,$=null,t.tmpl.complete(i),o}}),t.fn.extend({
// Use first wrapped element as template markup.
// Return wrapped set of template items, obtained by rendering template against data.
tmpl:function(e,n,l){return t.tmpl(this[0],e,n,l)},
// Find which rendered template item the first wrapped DOM element belongs to
tmplItem:function(){return t.tmplItem(this[0])},
// Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template.
template:function(e){return t.template(e,this[0])},domManip:function(e,n,l,a){if(e[0]&&t.isArray(e[0])){for(var r,p=t.makeArray(arguments),i=e[0],o=i.length,u=0;u<o&&!(r=t.data(i[u++],"tmplItem")););r&&T&&(p[2]=function(e){
// Handler called by oldManip when rendered template has been inserted into DOM.
t.tmpl.afterManip(this,e,l)}),_.apply(this,p)}else _.apply(this,arguments);return T=0,$||t.tmpl.complete(g),this}}),t.extend({
// Return wrapped set of template items, obtained by rendering template against data.
tmpl:function(e,a,r,i){var o,u=!i;if(u)
// This is a top-level tmpl call (not from a nested template using {{tmpl}})
i=w,e=t.template[e]||t.template(null,e),v={};else if(!e)
// Rebuild, without creating a new template item
// The template item is already associated with DOM - this is a refresh.
// Re-evaluate rendered template for the parentItem
return e=i.tmpl,g[i.key]=i,i.nodes=[],i.wrapped&&p(i,i.wrapped),t(l(i,null,i.tmpl(t,i)));return e?("function"==typeof a&&(a=a.call(i||{})),r&&r.wrapped&&p(r,r.wrapped),o=t.isArray(a)?t.map(a,function(t){return t?n(r,i,e,t):null}):[n(r,i,e,a)],u?t(l(i,null,o)):o):[]},
// Return rendered template item for an element.
tmplItem:function(e){var n;for(e instanceof t&&(e=e[0]);e&&1===e.nodeType&&!(n=t.data(e,"tmplItem"))&&(e=e.parentNode););return n||w},
// Set:
// Use $.template( name, tmpl ) to cache a named template,
// where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc.
// Use $( "selector" ).template( name ) to provide access by name to a script block template declaration.
// Get:
// Use $.template( name ) to access a cached template.
// Also $( selectorToScriptBlock ).template(), or $.template( null, templateString )
// will return the compiled template, without adding a name reference.
// If templateString includes at least one HTML tag, $.template( templateString ) is equivalent
// to $.template( null, templateString )
template:function(e,n){
// Compile template and associate with name
// This is an HTML string being passed directly in.
// If this is a template block, use cached copy, or generate tmpl function and cache.
// If not in map, and not containing at least on HTML tag, treat as a selector.
// (If integrated with core, use quickExpr.exec)
return n?("string"==typeof n?n=r(n):n instanceof t&&(n=n[0]||{}),n.nodeType&&(n=t.data(n,"tmpl")||t.data(n,"tmpl",r(n.innerHTML))),"string"==typeof e?t.template[e]=n:n):e?"string"!=typeof e?t.template(null,e):t.template[e]||t.template(null,y.test(e)?e:t(e)):null},encode:function(t){
// Do HTML encoding replacing < > & and ' and " by corresponding entities.
return(""+t).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}}),t.extend(t.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{
// Unecoded expression evaluation.
open:"if($notnull_1){__.push($1a);}"},"=":{
// Encoded expression evaluation. Abbreviated form is ${}.
_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{
// Comment tag. Skipped by parser
open:""}},
// This stub can be overridden, e.g. in jquery.tmplPlus for providing rendered events
complete:function(t){g={}},
// Call this from code which overrides domManip, or equivalent
// Manage cloning/storing template items etc.
afterManip:function(e,n,l){
// Provides cloned fragment ready for fixup prior to and after insertion into DOM
var a=11===n.nodeType?t.makeArray(n.childNodes):1===n.nodeType?[n]:[];
// Return fragment to original caller (e.g. append) for DOM insertion
l.call(e,n),
// Fragment has been inserted:- Add inserted nodes to tmplItem data structure. Replace inserted element annotations by jQuery.data.
u(a),T++}})}(jQuery);

//     Underscore.js 1.4.4
//     http://underscorejs.org
//     (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
//     Underscore may be freely distributed under the MIT license.
(function(){
// Baseline setup
// --------------
// Establish the root object, `window` in the browser, or `global` on the server.
var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,d=e.filter,y=e.every,g=e.some,m=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,w=i.bind,j=function(n){return n instanceof j?n:this instanceof j?void(this._wrapped=n):new j(n)};
// Export the Underscore object for **Node.js**, with
// backwards-compatibility for the old `require()` API. If we're in
// the browser, add `_` as a global object via a string identifier,
// for Closure Compiler "advanced" mode.
"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,
// Current version.
j.VERSION="1.4.4";
// Collection Functions
// --------------------
// The cornerstone, an `each` implementation, aka `forEach`.
// Handles objects with the built-in `forEach`, arrays, and raw objects.
// Delegates to **ECMAScript 5**'s native `forEach` if available.
var A=j.each=j.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;u<i;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(j.has(n,a)&&t.call(e,n[a],a,n)===r)return};
// Return the results of applying the iterator to each element.
// Delegates to **ECMAScript 5**'s native `map` if available.
j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var E="Reduce of empty array with no initial value";
// **Reduce** builds up a single result from a list of values, aka `inject`,
// or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
j.reduce=j.foldl=j.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(E);return r},
// The right-associative version of reduce, also known as `foldr`.
// Delegates to **ECMAScript 5**'s native `reduceRight` if available.
j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(E);return r},
// Return the first value which passes a truth test. Aliased as `detect`.
j.find=j.detect=function(n,t,r){var e;return O(n,function(n,u,i){if(t.call(r,n,u,i))return e=n,!0}),e},
// Return all the elements that pass a truth test.
// Delegates to **ECMAScript 5**'s native `filter` if available.
// Aliased as `select`.
j.filter=j.select=function(n,t,r){var e=[];return null==n?e:d&&n.filter===d?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&(e[e.length]=n)}),e)},
// Return all the elements for which a truth test fails.
j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},
// Determine whether all of the elements match a truth test.
// Delegates to **ECMAScript 5**'s native `every` if available.
// Aliased as `all`.
j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:y&&n.every===y?n.every(t,e):(A(n,function(n,i,a){if(!(u=u&&t.call(e,n,i,a)))return r}),!!u)};
// Determine if at least one element in the object matches a truth test.
// Delegates to **ECMAScript 5**'s native `some` if available.
// Aliased as `any`.
var O=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:g&&n.some===g?n.some(t,e):(A(n,function(n,i,a){if(u||(u=t.call(e,n,i,a)))return r}),!!u)};
// Determine if the array or object contains a given value (using `===`).
// Aliased as `include`.
j.contains=j.include=function(n,t){return null!=n&&(m&&n.indexOf===m?n.indexOf(t)!=-1:O(n,function(n){return n===t}))},
// Invoke a method (with arguments) on every item in a collection.
j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},
// Convenience version of a common use case of `map`: fetching a property.
j.pluck=function(n,t){return j.map(n,function(n){return n[t]})},
// Convenience version of a common use case of `filter`: selecting only objects
// containing specific `key:value` pairs.
j.where=function(n,t,r){return j.isEmpty(t)?r?void 0:[]:j[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},
// Convenience version of a common use case of `find`: getting the first object
// containing specific `key:value` pairs.
j.findWhere=function(n,t){return j.where(n,t,!0)},
// Return the maximum element or (element-based computation).
// Can't optimize arrays of integers longer than 65,535 elements.
// See: https://bugs.webkit.org/show_bug.cgi?id=80797
j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);if(!t&&j.isEmpty(n))return-(1/0);var e={computed:-(1/0),value:-(1/0)};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},
// Return the minimum element (or element-based computation).
j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);if(!t&&j.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a<e.computed&&(e={value:n,computed:a})}),e.value},
// Shuffle an array.
j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e};
// An internal function to generate lookup iterators.
var k=function(n){return j.isFunction(n)?n:function(t){return t[n]}};
// Sort the object's values by a criterion produced by an iterator.
j.sortBy=function(n,t,r){var e=k(t);return j.pluck(j.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||void 0===r)return 1;if(r<e||void 0===e)return-1}return n.index<t.index?-1:1}),"value")};
// An internal function used for aggregate "group by" operations.
var F=function(n,t,r,e){var u={},i=k(t||j.identity);return A(n,function(t,a){var o=i.call(r,t,a,n);e(u,o,t)}),u};
// Groups the object's values by a criterion. Pass either a string attribute
// to group by, or a function that returns the criterion.
j.groupBy=function(n,t,r){return F(n,t,r,function(n,t,r){(j.has(n,t)?n[t]:n[t]=[]).push(r)})},
// Counts instances of an object that group by a certain criterion. Pass
// either a string attribute to count by, or a function that returns the
// criterion.
j.countBy=function(n,t,r){return F(n,t,r,function(n,t){j.has(n,t)||(n[t]=0),n[t]++})},
// Use a comparator function to figure out the smallest index at which
// an object should be inserted so as to maintain order. Uses binary search.
j.sortedIndex=function(n,t,r,e){r=null==r?j.identity:k(r);for(var u=r.call(e,t),i=0,a=n.length;i<a;){var o=i+a>>>1;r.call(e,n[o])<u?i=o+1:a=o}return i},
// Safely convert anything iterable into a real, live array.
j.toArray=function(n){return n?j.isArray(n)?o.call(n):n.length===+n.length?j.map(n,j.identity):j.values(n):[]},
// Return the number of elements in an object.
j.size=function(n){return null==n?0:n.length===+n.length?n.length:j.keys(n).length},
// Array Functions
// ---------------
// Get the first element of an array. Passing **n** will return the first N
// values in the array. Aliased as `head` and `take`. The **guard** check
// allows it to work with `_.map`.
j.first=j.head=j.take=function(n,t,r){if(null!=n)return null==t||r?n[0]:o.call(n,0,t)},
// Returns everything but the last entry of the array. Especially useful on
// the arguments object. Passing **n** will return all the values in
// the array, excluding the last N. The **guard** check allows it to work with
// `_.map`.
j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},
// Get the last element of an array. Passing **n** will return the last N
// values in the array. The **guard** check allows it to work with `_.map`.
j.last=function(n,t,r){if(null!=n)return null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},
// Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
// Especially useful on the arguments object. Passing an **n** will return
// the rest N values in the array. The **guard**
// check allows it to work with `_.map`.
j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},
// Trim out all falsy values from an array.
j.compact=function(n){return j.filter(n,j.identity)};
// Internal implementation of a recursive `flatten` function.
var R=function(n,t,r){return A(n,function(n){j.isArray(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r};
// Return a completely flattened version of an array.
j.flatten=function(n,t){return R(n,t,[])},
// Return a version of the array that does not contain the specified value(s).
j.without=function(n){return j.difference(n,o.call(arguments,1))},
// Produce a duplicate-free version of the array. If the array has already
// been sorted, you have the option of using a faster algorithm.
// Aliased as `unique`.
j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},
// Produce an array that contains the union: each distinct element from all of
// the passed-in arrays.
j.union=function(){return j.uniq(c.apply(e,arguments))},
// Produce an array that contains every item shared between all the
// passed-in arrays.
j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.indexOf(t,n)>=0})})},
// Take the difference between one array and a number of other arrays.
// Only the elements present in just the first array will remain.
j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},
// Zip together multiple lists into a single array -- elements that share
// an index go together.
j.zip=function(){for(var n=o.call(arguments),t=j.max(j.pluck(n,"length")),r=new Array(t),e=0;e<t;e++)r[e]=j.pluck(n,""+e);return r},
// Converts lists into objects. Pass either a single array of `[key, value]`
// pairs, or two parallel arrays of the same length -- one of keys, and one of
// the corresponding values.
j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;e<u;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},
// If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
// we need this function. Return the position of the first occurrence of an
// item in an array, or -1 if the item is not included in the array.
// Delegates to **ECMAScript 5**'s native `indexOf` if available.
// If the array is large and already in sort order, pass `true`
// for **isSorted** to use binary search.
j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=r<0?Math.max(0,u+r):r}if(m&&n.indexOf===m)return n.indexOf(t,r);for(;e<u;e++)if(n[e]===t)return e;return-1},
// Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},
// Generate an integer Array containing an arithmetic progression. A port of
// the native Python `range()` function. See
// [the Python documentation](http://docs.python.org/library/functions.html#range).
j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);u<e;)i[u++]=n,n+=r;return i},
// Function (ahem) Functions
// ------------------
// Create a function bound to a given object (assigning `this`, and arguments,
// optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
// available.
j.bind=function(n,t){if(n.bind===w&&w)return w.apply(n,o.call(arguments,1));var r=o.call(arguments,2);return function(){return n.apply(t,r.concat(o.call(arguments)))}},
// Partially apply a function by creating a version that has had some of its
// arguments pre-filled, without changing its dynamic `this` context.
j.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},
// Bind all of an object's methods to that object. Useful for ensuring that
// all callbacks defined on an object belong to it.
j.bindAll=function(n){var t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return A(t,function(t){n[t]=j.bind(n[t],n)}),n},
// Memoize an expensive function by storing its results.
j.memoize=function(n,t){var r={};return t||(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},
// Delays a function for the given number of milliseconds, and then calls
// it with the arguments supplied.
j.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},
// Defers a function, scheduling it to run after the current call stack has
// cleared.
j.defer=function(n){return j.delay.apply(j,[n,1].concat(o.call(arguments,1)))},
// Returns a function, that, when invoked, will only be triggered at most once
// during a given window of time.
j.throttle=function(n,t){var r,e,u,i,a=0,o=function(){a=new Date,u=null,i=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,l<=0?(clearTimeout(u),u=null,a=c,i=n.apply(r,e)):u||(u=setTimeout(o,l)),i}},
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
j.debounce=function(n,t,r){var e,u;return function(){var i=this,a=arguments,o=function(){e=null,r||(u=n.apply(i,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(u=n.apply(i,a)),u}},
// Returns a function that will be executed at most one time, no matter how
// often you call it. Useful for lazy initialization.
j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},
// Returns the first function passed as an argument to the second,
// allowing you to adjust arguments, run code before and after, and
// conditionally execute the original function.
j.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},
// Returns a function that is the composition of a list of functions, each
// consuming the return value of the function that follows.
j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},
// Returns a function that will only be executed after being called N times.
j.after=function(n,t){return n<=0?t():function(){if(--n<1)return t.apply(this,arguments)}},
// Object Functions
// ----------------
// Retrieve the names of an object's properties.
// Delegates to **ECMAScript 5**'s native `Object.keys`
j.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)j.has(n,r)&&(t[t.length]=r);return t},
// Retrieve the values of an object's properties.
j.values=function(n){var t=[];for(var r in n)j.has(n,r)&&t.push(n[r]);return t},
// Convert an object into a list of `[key, value]` pairs.
j.pairs=function(n){var t=[];for(var r in n)j.has(n,r)&&t.push([r,n[r]]);return t},
// Invert the keys and values of an object. The values must be serializable.
j.invert=function(n){var t={};for(var r in n)j.has(n,r)&&(t[n[r]]=r);return t},
// Return a sorted list of the function names available on the object.
// Aliased as `methods`
j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},
// Extend a given object with all the properties in passed-in object(s).
j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},
// Return a copy of the object only containing the whitelisted properties.
j.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},
// Return a copy of the object without the blacklisted properties.
j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},
// Fill in a given object with default properties.
j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},
// Create a (shallow-cloned) duplicate of an object.
j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},
// Invokes interceptor with the obj, and then returns obj.
// The primary purpose of this method is to "tap into" a method chain, in
// order to perform operations on intermediate results within the chain.
j.tap=function(n,t){return t(n),n};
// Internal recursive comparison function for `isEqual`.
var S=function(n,t,r,e){
// Identical objects are equal. `0 === -0`, but they aren't identical.
// See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
if(n===t)return 0!==n||1/n==1/t;
// A strict comparison is necessary because `null == undefined`.
if(null==n||null==t)return n===t;
// Unwrap any wrapped objects.
n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);
// Compare `[[Class]]` names.
var u=l.call(n);if(u!=l.call(t))return!1;switch(u){
// Strings, numbers, dates, and booleans are compared by value.
case"[object String]":
// Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
// equivalent to `new String("5")`.
return n==String(t);case"[object Number]":
// `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
// other numeric values.
return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":
// Coerce dates and booleans to numeric primitive values. Dates are compared by their
// millisecond representations. Note that invalid dates with millisecond representations
// of `NaN` are not equivalent.
return+n==+t;
// RegExps are compared by their source patterns and flags.
case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(
// Assume equality for cyclic structures. The algorithm for detecting cyclic
// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
var i=r.length;i--;)
// Linear search. Performance is inversely proportional to the number of
// unique nested structures.
if(r[i]==n)return e[i]==t;
// Add the first object to the stack of traversed objects.
r.push(n),e.push(t);var a=0,o=!0;
// Recursively compare objects and arrays.
if("[object Array]"==u){if(
// Compare array lengths to determine if a deep comparison is necessary.
a=n.length,o=a==t.length)
// Deep compare the contents, ignoring non-numeric properties.
for(;a--&&(o=S(n[a],t[a],r,e)););}else{
// Objects with different constructors are not equivalent, but `Object`s
// from different frames are.
var c=n.constructor,f=t.constructor;if(c!==f&&!(j.isFunction(c)&&c instanceof c&&j.isFunction(f)&&f instanceof f))return!1;
// Deep compare objects.
for(var s in n)if(j.has(n,s)&&(
// Count the expected number of properties.
a++,!(o=j.has(t,s)&&S(n[s],t[s],r,e))))break;
// Ensure that both objects contain the same number of properties.
if(o){for(s in t)if(j.has(t,s)&&!a--)break;o=!a}}
// Remove the first object from the stack of traversed objects.
return r.pop(),e.pop(),o};
// Perform a deep comparison to check if two objects are equal.
j.isEqual=function(n,t){return S(n,t,[],[])},
// Is a given array, string, or object empty?
// An "empty" object has no enumerable own-properties.
j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},
// Is a given value a DOM element?
j.isElement=function(n){return!(!n||1!==n.nodeType)},
// Is a given value an array?
// Delegates to ECMA5's native Array.isArray
j.isArray=x||function(n){return"[object Array]"==l.call(n)},
// Is a given variable an object?
j.isObject=function(n){return n===Object(n)},
// Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),
// Define a fallback version of the method in browsers (ahem, IE), where
// there isn't any inspectable "Arguments" type.
j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),
// Optimize `isFunction` if appropriate.
"function"!=typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),
// Is a given object a finite number?
j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},
// Is the given value `NaN`? (NaN is the only number which does not equal itself).
j.isNaN=function(n){return j.isNumber(n)&&n!=+n},
// Is a given value a boolean?
j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},
// Is a given value equal to null?
j.isNull=function(n){return null===n},
// Is a given variable undefined?
j.isUndefined=function(n){return void 0===n},
// Shortcut function for checking if an object has a given property directly
// on itself (in other words, not on a prototype).
j.has=function(n,t){return f.call(n,t)},
// Utility Functions
// -----------------
// Run Underscore.js in *noConflict* mode, returning the `_` variable to its
// previous owner. Returns a reference to the Underscore object.
j.noConflict=function(){return n._=t,this},
// Keep the identity function around for default iterators.
j.identity=function(n){return n},
// Run a function **n** times.
j.times=function(n,t,r){for(var e=Array(n),u=0;u<n;u++)e[u]=t.call(r,u);return e},
// Return a random integer between min and max (inclusive).
j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};
// List of HTML entities for escaping.
var I={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};I.unescape=j.invert(I.escape);
// Regexes containing the keys and values listed immediately above.
var M={escape:new RegExp("["+j.keys(I.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(I.unescape).join("|")+")","g")};
// Functions for escaping and unescaping strings to/from HTML interpolation.
j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(M[n],function(t){return I[n][t]})}}),
// If the value of the named property is a function then invoke it;
// otherwise, return it.
j.result=function(n,t){if(null!=n){var r=n[t];return j.isFunction(r)?r.call(n):r}},
// Add your own custom functions to the Underscore object.
j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),D.call(this,r.apply(j,n))}})};
// Generate a unique integer id (unique within the entire client session).
// Useful for temporary DOM ids.
var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},
// By default, Underscore uses ERB-style template delimiters, change the
// following template settings to use alternative delimiters.
j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};
// When customizing `templateSettings`, if you don't want to define an
// interpolation, evaluation or escaping regex, we need one that is
// guaranteed not to match.
var T=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\t|\u2028|\u2029/g;
// JavaScript micro-templating, similar to John Resig's implementation.
// Underscore templating handles arbitrary delimiters, preserves whitespace,
// and correctly escapes quotes within interpolated code.
j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);
// Combine delimiters into one regular expression via alternation.
var u=new RegExp([(r.escape||T).source,(r.interpolate||T).source,(r.evaluate||T).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(B,function(n){return"\\"+q[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",
// If a variable is not specified, place data values in local scope.
r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};
// Provide the compiled function source as a convenience for precompilation.
return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},
// Add a "chain" function, which will delegate to the wrapper.
j.chain=function(n){return j(n).chain()};
// OOP
// ---------------
// If Underscore is called as a function, it returns a wrapped object that
// can be used OO-style. This wrapper holds altered versions of all the
// underscore functions. Wrapped objects may be chained.
// Helper function to continue chaining intermediate results.
var D=function(n){return this._chain?j(n).chain():n};
// Add all of the Underscore functions to the wrapper object.
j.mixin(j),
// Add all mutator Array functions to the wrapper.
A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],D.call(this,r)}}),
// Add all accessor Array functions to the wrapper.
A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return D.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{
// Start chaining a wrapped Underscore object.
chain:function(){return this._chain=!0,this},
// Extracts the result from a wrapped and chained object.
value:function(){return this._wrapped}})}).call(this);

!function(t){"use strict";function e(t){return t=t.toString(),t.length<2?"0"+t:t}EE.formatDate=function(n,o){n=n||new Date,o=t.extend({time_format:"12",include_seconds:"n"},o);var u=n.getHours(),r=e(n.getMinutes()),i=e(n.getSeconds()),s=[],a="";return"12"==o.time_format&&(a=u<12?" AM":" PM",u=u%12||12),s.push(u),s.push(r),"y"==o.include_seconds&&s.push(i)," '"+s.join(":")+a+"'"},EE.date_obj_time=EE.formatDate(new Date,EE.date)}(jQuery);

var smiley_map = {};function insert_smiley(smiley, field_id) {var el = document.getElementsByName(field_id)[0], newStart;if ( ! el && smiley_map[field_id]) {el = document.getElementById(smiley_map[field_id]);if ( ! el)return false;}el.focus();smiley = " " + smiley;if ('selectionStart' in el) {newStart = el.selectionStart + smiley.length;el.value = el.value.substr(0, el.selectionStart) +smiley +el.value.substr(el.selectionEnd, el.value.length);el.setSelectionRange(newStart, newStart);}else if (document.selection) {document.selection.createRange().text = smiley;}}

/*!
 * ExpressionEngine - by EllisLab
 *
 * @package		ExpressionEngine
 * @author		EllisLab Dev Team
 * @copyright	Copyright (c) 2003 - 2015, EllisLab, Inc.
 * @license		http://ellislab.com/expressionengine/user-guide/license.html
 * @link		http://ellislab.com
 * @since		Version 2.0
 * @filesource
 */
//Dynamically set the textarea name
function setFieldName(e){e!=selField&&(selField=e,clear_state(),tagarray=new Array,usedarray=new Array,running=0)}
// Insert tag
function taginsert(item,tagOpen,tagClose){
// Determine which tag we are dealing with
var which=eval("item.name");if(!selField)return $.ee_notice(no_cursor),!1;var theSelection=!1,result=!1,theField=document.getElementById("entryform")[selField];
// Is this a Windows user?
// If so, add tags around selection
if("guided"==selMode&&(data=prompt(enter_text,""),null!=data&&""!=data&&(result=tagOpen+data+tagClose)),document.selection)return theSelection=document.selection.createRange().text,theField.focus(),theSelection?document.selection.createRange().text=0==result?tagOpen+theSelection+tagClose:result:document.selection.createRange().text=0==result?tagOpen+tagClose:result,theSelection="",theField.blur(),void theField.focus();if(!isNaN(theField.selectionEnd)){var newStart,scrollPos=theField.scrollTop,selLength=theField.textLength,selStart=theField.selectionStart,selEnd=theField.selectionEnd;selEnd<=2&&"undefined"!=typeof selLength&&(selEnd=selLength);var s1=theField.value.substring(0,selStart),s2=theField.value.substring(selStart,selEnd).s3=theField.value.substring(selEnd,selLength);return 0==result?(newStart=selStart+tagOpen.length+s2.length+tagClose.length,theField.value=0==result?s1+tagOpen+s2+tagClose+s3:result):(newStart=selStart+result.length,theField.value=s1+result+s3),theField.focus(),theField.selectionStart=newStart,theField.selectionEnd=newStart,void(theField.scrollTop=scrollPos)}if("guided"==selMode)return curField=document.submit_post[selfField],curField.value+=result,curField.blur(),void curField.focus();
// Add single open tags
if("other"==item)eval("document.getElementById('entryform')."+selField+".value += tagOpen");else if(0==eval(which)){var result=tagOpen;eval("document.getElementById('entryform')."+selField+".value += result"),eval(which+" = 1"),arraypush(tagarray,tagClose),arraypush(usedarray,which),running++,styleswap(which)}else{for(
// Close tags
n=0,i=0;i<tagarray.length;i++)if(tagarray[i]==tagClose){for(n=i,running--;tagarray[n];)closeTag=arraypop(tagarray),eval("document.getElementById('entryform')."+selField+".value += closeTag");for(;usedarray[n];)clearState=arraypop(usedarray),eval(clearState+" = 0"),document.getElementById(clearState).className="htmlButtonA"}running<=0&&"htmlButtonB"==document.getElementById("close_all").className&&(document.getElementById("close_all").className="htmlButtonA")}curField=eval("document.getElementById('entryform')."+selField),curField.blur(),curField.focus()}var selField=!1,selMode="normal";$(document).ready(function(){$(".js_show").show(),$(".js_hide").hide(),void 0!==EE.publish.markitup&&void 0!==EE.publish.markitup.fields&&$.each(EE.publish.markitup.fields,function(e,t){$("#"+e).markItUp(mySettings)}),EE.publish.smileys===!0&&($("a.glossary_link").click(function(){return $(this).parent().siblings(".glossary_content").slideToggle("fast"),$(this).parent().siblings(".smileyContent .spellcheck_content").hide(),!1}),$("a.smiley_link").toggle(function(){which=$(this).attr("id").substr(12),$("#smiley_table_"+which).slideDown("fast",function(){$(this).css("display","")})},function(){$("#smiley_table_"+which).slideUp("fast")}),$(this).parent().siblings(".glossary_content, .spellcheck_content").hide(),$(".glossary_content a").click(function(){return $.markItUp({replaceWith:$(this).attr("title")}),!1})),$(".btn_plus a").click(function(){return confirm(EE.lang.confirm_exit,"")}),
// inject the collapse button into the formatting buttons list
$(".markItUpHeader ul").prepend('<li class="close_formatting_buttons"><a href="#"><img width="10" height="10" src="'+EE.THEME_URL+'images/publish_minus.gif" alt="Close Formatting Buttons"/></a></li>'),$(".close_formatting_buttons a").toggle(function(){$(this).parent().parent().children(":not(.close_formatting_buttons)").hide(),$(this).parent().parent().css("height","13px"),$(this).children("img").attr("src",EE.THEME_URL+"images/publish_plus.png")},function(){$(this).parent().parent().children().show(),$(this).parent().parent().css("height","auto"),$(this).children("img").attr("src",EE.THEME_URL+"images/publish_minus.gif")});var e="";EE.publish.show_write_mode===!0&&$("#write_mode_textarea").markItUp(myWritemodeSettings),$(".write_mode_trigger").click(function(){
// put contents from other page into here
return e=$(this).attr("id").match(/^id_\d+$/)?"field_"+$(this).attr("id"):$(this).attr("id").replace(/id_/,""),$("#write_mode_textarea").val($("#"+e).val()),$("#write_mode_textarea").focus(),!1})});