diff --git a/assets/js/javascript.js b/assets/js/javascript.js index ca6a891..1c5fe99 100755 --- a/assets/js/javascript.js +++ b/assets/js/javascript.js @@ -2510,6 +2510,456 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a. }; }(jQuery, window, window.document)); +;(function ($, window, document, undefined) { + 'use strict'; + + Foundation.libs.reveal = { + name : 'reveal', + + version : '5.5.0', + + locked : false, + + settings : { + animation: 'fadeAndPop', + animation_speed: 250, + close_on_background_click: true, + close_on_esc: true, + dismiss_modal_class: 'close-reveal-modal', + bg_class: 'reveal-modal-bg', + bg_root_element: 'body', + root_element: 'body', + open: function(){}, + opened: function(){}, + close: function(){}, + closed: function(){}, + bg : $('.reveal-modal-bg'), + css : { + open : { + 'opacity': 0, + 'visibility': 'visible', + 'display' : 'block' + }, + close : { + 'opacity': 1, + 'visibility': 'hidden', + 'display': 'none' + } + } + }, + + init : function (scope, method, options) { + $.extend(true, this.settings, method, options); + this.bindings(method, options); + }, + + events : function (scope) { + var self = this, + S = self.S; + + S(this.scope) + .off('.reveal') + .on('click.fndtn.reveal', '[' + this.add_namespace('data-reveal-id') + ']:not([disabled])', function (e) { + e.preventDefault(); + + if (!self.locked) { + var element = S(this), + ajax = element.data(self.data_attr('reveal-ajax')); + + self.locked = true; + + if (typeof ajax === 'undefined') { + self.open.call(self, element); + } else { + var url = ajax === true ? element.attr('href') : ajax; + + self.open.call(self, element, {url: url}); + } + } + }); + + S(document) + .on('click.fndtn.reveal', this.close_targets(), function (e) { + + e.preventDefault(); + + if (!self.locked) { + var settings = S('[' + self.attr_name() + '].open').data(self.attr_name(true) + '-init') || self.settings, + bg_clicked = S(e.target)[0] === S('.' + settings.bg_class)[0]; + + if (bg_clicked) { + if (settings.close_on_background_click) { + e.stopPropagation(); + } else { + return; + } + } + + self.locked = true; + self.close.call(self, bg_clicked ? S('[' + self.attr_name() + '].open') : S(this).closest('[' + self.attr_name() + ']')); + } + }); + + if(S('[' + self.attr_name() + ']', this.scope).length > 0) { + S(this.scope) + // .off('.reveal') + .on('open.fndtn.reveal', this.settings.open) + .on('opened.fndtn.reveal', this.settings.opened) + .on('opened.fndtn.reveal', this.open_video) + .on('close.fndtn.reveal', this.settings.close) + .on('closed.fndtn.reveal', this.settings.closed) + .on('closed.fndtn.reveal', this.close_video); + } else { + S(this.scope) + // .off('.reveal') + .on('open.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.open) + .on('opened.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.opened) + .on('opened.fndtn.reveal', '[' + self.attr_name() + ']', this.open_video) + .on('close.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.close) + .on('closed.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.closed) + .on('closed.fndtn.reveal', '[' + self.attr_name() + ']', this.close_video); + } + + return true; + }, + + // PATCH #3: turning on key up capture only when a reveal window is open + key_up_on : function (scope) { + var self = this; + + // PATCH #1: fixing multiple keyup event trigger from single key press + self.S('body').off('keyup.fndtn.reveal').on('keyup.fndtn.reveal', function ( event ) { + var open_modal = self.S('[' + self.attr_name() + '].open'), + settings = open_modal.data(self.attr_name(true) + '-init') || self.settings ; + // PATCH #2: making sure that the close event can be called only while unlocked, + // so that multiple keyup.fndtn.reveal events don't prevent clean closing of the reveal window. + if ( settings && event.which === 27 && settings.close_on_esc && !self.locked) { // 27 is the keycode for the Escape key + self.close.call(self, open_modal); + } + }); + + return true; + }, + + // PATCH #3: turning on key up capture only when a reveal window is open + key_up_off : function (scope) { + this.S('body').off('keyup.fndtn.reveal'); + return true; + }, + + + open : function (target, ajax_settings) { + var self = this, + modal; + + if (target) { + if (typeof target.selector !== 'undefined') { + // Find the named node; only use the first one found, since the rest of the code assumes there's only one node + modal = self.S('#' + target.data(self.data_attr('reveal-id'))).first(); + } else { + modal = self.S(this.scope); + + ajax_settings = target; + } + } else { + modal = self.S(this.scope); + } + + var settings = modal.data(self.attr_name(true) + '-init'); + settings = settings || this.settings; + + + if (modal.hasClass('open') && target.attr('data-reveal-id') == modal.attr('id')) { + return self.close(modal); + } + + if (!modal.hasClass('open')) { + var open_modal = self.S('[' + self.attr_name() + '].open'); + + if (typeof modal.data('css-top') === 'undefined') { + modal.data('css-top', parseInt(modal.css('top'), 10)) + .data('offset', this.cache_offset(modal)); + } + + this.key_up_on(modal); // PATCH #3: turning on key up capture only when a reveal window is open + modal.trigger('open').trigger('open.fndtn.reveal'); + + if (open_modal.length < 1) { + this.toggle_bg(modal, true); + } + + if (typeof ajax_settings === 'string') { + ajax_settings = { + url: ajax_settings + }; + } + + if (typeof ajax_settings === 'undefined' || !ajax_settings.url) { + if (open_modal.length > 0) { + this.hide(open_modal, settings.css.close); + } + + this.show(modal, settings.css.open); + } else { + var old_success = typeof ajax_settings.success !== 'undefined' ? ajax_settings.success : null; + + $.extend(ajax_settings, { + success: function (data, textStatus, jqXHR) { + if ( $.isFunction(old_success) ) { + var result = old_success(data, textStatus, jqXHR); + if (typeof result == 'string') data = result; + } + + modal.html(data); + self.S(modal).foundation('section', 'reflow'); + self.S(modal).children().foundation(); + + if (open_modal.length > 0) { + self.hide(open_modal, settings.css.close); + } + self.show(modal, settings.css.open); + } + }); + + $.ajax(ajax_settings); + } + } + self.S(window).trigger('resize'); + }, + + close : function (modal) { + var modal = modal && modal.length ? modal : this.S(this.scope), + open_modals = this.S('[' + this.attr_name() + '].open'), + settings = modal.data(this.attr_name(true) + '-init') || this.settings; + + if (open_modals.length > 0) { + this.locked = true; + this.key_up_off(modal); // PATCH #3: turning on key up capture only when a reveal window is open + modal.trigger('close').trigger('close.fndtn.reveal'); + this.toggle_bg(modal, false); + this.hide(open_modals, settings.css.close, settings); + } + }, + + close_targets : function () { + var base = '.' + this.settings.dismiss_modal_class; + + if (this.settings.close_on_background_click) { + return base + ', .' + this.settings.bg_class; + } + + return base; + }, + + toggle_bg : function (el, modal, state) { + var settings = el.data(this.attr_name(true) + '-init') || this.settings, + bg_root_element = settings.bg_root_element; // Adding option to specify the background root element fixes scrolling issue + + if (this.S('.' + this.settings.bg_class).length === 0) { + this.settings.bg = $('
', {'class': this.settings.bg_class}) + .appendTo(bg_root_element).hide(); + } + + var visible = this.settings.bg.filter(':visible').length > 0; + if ( state != visible ) { + if ( state == undefined ? visible : !state ) { + this.hide(this.settings.bg); + } else { + this.show(this.settings.bg); + } + } + }, + + show : function (el, css) { + // is modal + if (css) { + var settings = el.data(this.attr_name(true) + '-init') || this.settings, + root_element = settings.root_element; + + if (el.parent(root_element).length === 0) { + var placeholder = el.wrap('').parent(); + + el.on('closed.fndtn.reveal.wrapped', function() { + el.detach().appendTo(placeholder); + el.unwrap().unbind('closed.fndtn.reveal.wrapped'); + }); + + el.detach().appendTo(root_element); + } + + var animData = getAnimationData(settings.animation); + if (!animData.animate) { + this.locked = false; + } + if (animData.pop) { + css.top = $(root_element).scrollTop() - el.data('offset') + 'px'; //adding root_element instead of window for scrolling offset if modal trigger is below the fold + var end_css = { + top: $(root_element).scrollTop() + el.data('css-top') + 'px', //adding root_element instead of window for scrolling offset if modal trigger is below the fold + opacity: 1 + }; + + return setTimeout(function () { + return el + .css(css) + .animate(end_css, settings.animation_speed, 'linear', function () { + this.locked = false; + el.trigger('opened').trigger('opened.fndtn.reveal'); + }.bind(this)) + .addClass('open'); + }.bind(this), settings.animation_speed / 2); + } + + if (animData.fade) { + css.top = $(root_element).scrollTop() + el.data('css-top') + 'px'; //adding root_element instead of window for scrolling offset if modal trigger is below the fold + var end_css = {opacity: 1}; + + return setTimeout(function () { + return el + .css(css) + .animate(end_css, settings.animation_speed, 'linear', function () { + this.locked = false; + el.trigger('opened').trigger('opened.fndtn.reveal'); + }.bind(this)) + .addClass('open'); + }.bind(this), settings.animation_speed / 2); + } + + return el.css(css).show().css({opacity: 1}).addClass('open').trigger('opened').trigger('opened.fndtn.reveal'); + } + + var settings = this.settings; + + // should we animate the background? + if (getAnimationData(settings.animation).fade) { + return el.fadeIn(settings.animation_speed / 2); + } + + this.locked = false; + + return el.show(); + }, + + hide : function (el, css) { + // is modal + if (css) { + var settings = el.data(this.attr_name(true) + '-init') || this.settings, + root_element = settings.root_element; + + var animData = getAnimationData(settings.animation); + if (!animData.animate) { + this.locked = false; + } + if (animData.pop) { + var end_css = { + top: - $(root_element).scrollTop() - el.data('offset') + 'px', //adding root_element instead of window for scrolling offset if modal trigger is below the fold + opacity: 0 + }; + + return setTimeout(function () { + return el + .animate(end_css, settings.animation_speed, 'linear', function () { + this.locked = false; + el.css(css).trigger('closed').trigger('closed.fndtn.reveal'); + }.bind(this)) + .removeClass('open'); + }.bind(this), settings.animation_speed / 2); + } + + if (animData.fade) { + var end_css = {opacity: 0}; + + return setTimeout(function () { + return el + .animate(end_css, settings.animation_speed, 'linear', function () { + this.locked = false; + el.css(css).trigger('closed').trigger('closed.fndtn.reveal'); + }.bind(this)) + .removeClass('open'); + }.bind(this), settings.animation_speed / 2); + } + + return el.hide().css(css).removeClass('open').trigger('closed').trigger('closed.fndtn.reveal'); + } + + var settings = this.settings; + + // should we animate the background? + if (getAnimationData(settings.animation).fade) { + return el.fadeOut(settings.animation_speed / 2); + } + + return el.hide(); + }, + + close_video : function (e) { + var video = $('.flex-video', e.target), + iframe = $('iframe', video); + + if (iframe.length > 0) { + iframe.attr('data-src', iframe[0].src); + iframe.attr('src', iframe.attr('src')); + video.hide(); + } + }, + + open_video : function (e) { + var video = $('.flex-video', e.target), + iframe = video.find('iframe'); + + if (iframe.length > 0) { + var data_src = iframe.attr('data-src'); + if (typeof data_src === 'string') { + iframe[0].src = iframe.attr('data-src'); + } else { + var src = iframe[0].src; + iframe[0].src = undefined; + iframe[0].src = src; + } + video.show(); + } + }, + + data_attr: function (str) { + if (this.namespace.length > 0) { + return this.namespace + '-' + str; + } + + return str; + }, + + cache_offset : function (modal) { + var offset = modal.show().height() + parseInt(modal.css('top'), 10); + + modal.hide(); + + return offset; + }, + + off : function () { + $(this.scope).off('.fndtn.reveal'); + }, + + reflow : function () {} + }; + + /* + * getAnimationData('popAndFade') // {animate: true, pop: true, fade: true} + * getAnimationData('fade') // {animate: true, pop: false, fade: true} + * getAnimationData('pop') // {animate: true, pop: true, fade: false} + * getAnimationData('foo') // {animate: false, pop: false, fade: false} + * getAnimationData(null) // {animate: false, pop: false, fade: false} + */ + function getAnimationData(str) { + var fade = /fade/i.test(str); + var pop = /pop/i.test(str); + return { + animate: fade || pop, + pop: pop, + fade: fade + }; + } +}(jQuery, window, window.document)); + /*! Backstretch - v2.0.4 - 2013-06-19 * http://srobbin.com/jquery-plugins/backstretch/ * Copyright (c) 2013 Scott Robbin; Licensed MIT */ @@ -2889,4 +3339,11 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a. }(jQuery, window)); // Foundation JavaScript // Documentation can be found at: http://foundation.zurb.com/docs -$(document).foundation(); \ No newline at end of file + + +$(document).foundation({ + reveal : { + animation: 'fade', + animation_speed: 250 + } +}); \ No newline at end of file diff --git a/assets/js/javascript.min.js b/assets/js/javascript.min.js index a493bd7..e2de34f 100755 --- a/assets/js/javascript.min.js +++ b/assets/js/javascript.min.js @@ -1,5 +1,5 @@ -function FastClick(t,e){"use strict";function n(t,e){return function(){return t.apply(e,arguments)}}var i;if(e=e||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=e.touchBoundary||10,this.layer=t,this.tapDelay=e.tapDelay||200,!FastClick.notNeeded(t)){for(var r=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],o=this,s=0,a=r.length;a>s;s++)o[r[s]]=n(o[r[s]],o);deviceIsAndroid&&(t.addEventListener("mouseover",this.onMouse,!0),t.addEventListener("mousedown",this.onMouse,!0),t.addEventListener("mouseup",this.onMouse,!0)),t.addEventListener("click",this.onClick,!0),t.addEventListener("touchstart",this.onTouchStart,!1),t.addEventListener("touchmove",this.onTouchMove,!1),t.addEventListener("touchend",this.onTouchEnd,!1),t.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(t.removeEventListener=function(e,n,i){var r=Node.prototype.removeEventListener;"click"===e?r.call(t,e,n.hijacked||n,i):r.call(t,e,n,i)},t.addEventListener=function(e,n,i){var r=Node.prototype.addEventListener;"click"===e?r.call(t,e,n.hijacked||(n.hijacked=function(t){t.propagationStopped||n(t)}),i):r.call(t,e,n,i)}),"function"==typeof t.onclick&&(i=t.onclick,t.addEventListener("click",function(t){i(t)},!1),t.onclick=null)}}!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=t.length,n=Z.type(t);return"function"===n||Z.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function i(t,e,n){if(Z.isFunction(e))return Z.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return Z.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(ae.test(e))return Z.filter(e,t,n);e=Z.filter(e,t)}return Z.grep(t,function(t){return Y.call(e,t)>=0!==n})}function r(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function o(t){var e=pe[t]={};return Z.each(t.match(he)||[],function(t,n){e[n]=!0}),e}function s(){J.removeEventListener("DOMContentLoaded",s,!1),t.removeEventListener("load",s,!1),Z.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Z.expando+Math.random()}function l(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(be,"-$1").toLowerCase(),n=t.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:xe.test(n)?Z.parseJSON(n):n}catch(r){}ye.set(t,e,n)}else n=void 0;return n}function c(){return!0}function u(){return!1}function d(){try{return J.activeElement}catch(t){}}function f(t,e){return Z.nodeName(t,"table")&&Z.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function h(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function p(t){var e=Me.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function g(t,e){for(var n=0,i=t.length;i>n;n++)ve.set(t[n],"globalEval",!e||ve.get(e[n],"globalEval"))}function m(t,e){var n,i,r,o,s,a,l,c;if(1===e.nodeType){if(ve.hasData(t)&&(o=ve.access(t),s=ve.set(e,o),c=o.events)){delete s.handle,s.events={};for(r in c)for(n=0,i=c[r].length;i>n;n++)Z.event.add(e,r,c[r][n])}ye.hasData(t)&&(a=ye.access(t),l=Z.extend({},a),ye.set(e,l))}}function v(t,e){var n=t.getElementsByTagName?t.getElementsByTagName(e||"*"):t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&Z.nodeName(t,e)?Z.merge([t],n):n}function y(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Ce.test(t.type)?e.checked=t.checked:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}function x(e,n){var i,r=Z(n.createElement(e)).appendTo(n.body),o=t.getDefaultComputedStyle&&(i=t.getDefaultComputedStyle(r[0]))?i.display:Z.css(r[0],"display");return r.detach(),o}function b(t){var e=J,n=Pe[t];return n||(n=x(t,e),"none"!==n&&n||(We=(We||Z("")).appendTo(e.documentElement),e=We[0].contentDocument,e.write(),e.close(),n=x(t,e),We.detach()),Pe[t]=n),n}function w(t,e,n){var i,r,o,s,a=t.style;return n=n||ze(t),n&&(s=n.getPropertyValue(e)||n[e]),n&&(""!==s||Z.contains(t.ownerDocument,t)||(s=Z.style(t,e)),$e.test(s)&&Re.test(e)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function _(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function k(t,e){if(e in t)return e;for(var n=e[0].toUpperCase()+e.slice(1),i=e,r=Ve.length;r--;)if(e=Ve[r]+n,e in t)return e;return i}function C(t,e,n){var i=Xe.exec(e);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):e}function T(t,e,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===e?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=Z.css(t,n+_e[o],!0,r)),i?("content"===n&&(s-=Z.css(t,"padding"+_e[o],!0,r)),"margin"!==n&&(s-=Z.css(t,"border"+_e[o]+"Width",!0,r))):(s+=Z.css(t,"padding"+_e[o],!0,r),"padding"!==n&&(s+=Z.css(t,"border"+_e[o]+"Width",!0,r)));return s}function S(t,e,n){var i=!0,r="width"===e?t.offsetWidth:t.offsetHeight,o=ze(t),s="border-box"===Z.css(t,"boxSizing",!1,o);if(0>=r||null==r){if(r=w(t,e,o),(0>r||null==r)&&(r=t.style[e]),$e.test(r))return r;i=s&&(G.boxSizingReliable()||r===t.style[e]),r=parseFloat(r)||0}return r+T(t,e,n||(s?"border":"content"),i,o)+"px"}function E(t,e){for(var n,i,r,o=[],s=0,a=t.length;a>s;s++)i=t[s],i.style&&(o[s]=ve.get(i,"olddisplay"),n=i.style.display,e?(o[s]||"none"!==n||(i.style.display=""),""===i.style.display&&ke(i)&&(o[s]=ve.access(i,"olddisplay",b(i.nodeName)))):(r=ke(i),"none"===n&&r||ve.set(i,"olddisplay",r?n:Z.css(i,"display"))));for(s=0;a>s;s++)i=t[s],i.style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?o[s]||"":"none"));return t}function N(t,e,n,i,r){return new N.prototype.init(t,e,n,i,r)}function F(){return setTimeout(function(){Ge=void 0}),Ge=Z.now()}function j(t,e){var n,i=0,r={height:t};for(e=e?1:0;4>i;i+=2-e)n=_e[i],r["margin"+n]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function A(t,e,n){for(var i,r=(nn[e]||[]).concat(nn["*"]),o=0,s=r.length;s>o;o++)if(i=r[o].call(n,e,t))return i}function q(t,e,n){var i,r,o,s,a,l,c,u,d=this,f={},h=t.style,p=t.nodeType&&ke(t),g=ve.get(t,"fxshow");n.queue||(a=Z._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,Z.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],c=Z.css(t,"display"),u="none"===c?ve.get(t,"olddisplay")||b(t.nodeName):c,"inline"===u&&"none"===Z.css(t,"float")&&(h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(i in e)if(r=e[i],Ke.exec(r)){if(delete e[i],o=o||"toggle"===r,r===(p?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;p=!0}f[i]=g&&g[i]||Z.style(t,i)}else c=void 0;if(Z.isEmptyObject(f))"inline"===("none"===c?b(t.nodeName):c)&&(h.display=c);else{g?"hidden"in g&&(p=g.hidden):g=ve.access(t,"fxshow",{}),o&&(g.hidden=!p),p?Z(t).show():d.done(function(){Z(t).hide()}),d.done(function(){var e;ve.remove(t,"fxshow");for(e in f)Z.style(t,e,f[e])});for(i in f)s=A(p?g[i]:0,i,d),i in g||(g[i]=s.start,p&&(s.end=s.start,s.start="width"===i||"height"===i?1:0))}}function D(t,e){var n,i,r,o,s;for(n in t)if(i=Z.camelCase(n),r=e[i],o=t[n],Z.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),s=Z.cssHooks[i],s&&"expand"in s){o=s.expand(o),delete t[i];for(n in o)n in t||(t[n]=o[n],e[n]=r)}else e[i]=r}function L(t,e,n){var i,r,o=0,s=en.length,a=Z.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=Ge||F(),n=Math.max(0,c.startTime+c.duration-e),i=n/c.duration||0,o=1-i,s=0,l=c.tweens.length;l>s;s++)c.tweens[s].run(o);return a.notifyWith(t,[c,o,n]),1>o&&l?n:(a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:Z.extend({},e),opts:Z.extend(!0,{specialEasing:{}},n),originalProperties:e,originalOptions:n,startTime:Ge||F(),duration:n.duration,tweens:[],createTween:function(e,n){var i=Z.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(i),i},stop:function(e){var n=0,i=e?c.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)c.tweens[n].run(1);return e?a.resolveWith(t,[c,e]):a.rejectWith(t,[c,e]),this}}),u=c.props;for(D(u,c.opts.specialEasing);s>o;o++)if(i=en[o].call(c,t,u,c.opts))return i;return Z.map(u,A,c),Z.isFunction(c.opts.start)&&c.opts.start.call(t,c),Z.fx.timer(Z.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function H(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(he)||[];if(Z.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function M(t,e,n,i){function r(a){var l;return o[a]=!0,Z.each(t[a]||[],function(t,a){var c=a(e,n,i);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(e.dataTypes.unshift(c),r(c),!1)}),l}var o={},s=t===_n;return r(e.dataTypes[0])||!o["*"]&&r("*")}function O(t,e){var n,i,r=Z.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&Z.extend(!0,t,i),t}function I(t,e,n){for(var i,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function W(t,e,n,i){var r,o,s,a,l,c={},u=t.dataTypes.slice();if(u[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(o=u.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=c[l+" "+o]||c["* "+o],!s)for(r in c)if(a=r.split(" "),a[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){s===!0?s=c[r]:c[r]!==!0&&(o=a[0],u.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(d){return{state:"parsererror",error:s?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function P(t,e,n,i){var r;if(Z.isArray(e))Z.each(e,function(e,r){n||Sn.test(t)?i(t,r):P(t+"["+("object"==typeof r?e:"")+"]",r,n,i)});else if(n||"object"!==Z.type(e))i(t,e);else for(r in e)P(t+"["+r+"]",e[r],n,i)}function R(t){return Z.isWindow(t)?t:9===t.nodeType&&t.defaultView}var $=[],z=$.slice,B=$.concat,X=$.push,Y=$.indexOf,Q={},U=Q.toString,V=Q.hasOwnProperty,G={},J=t.document,K="2.1.1",Z=function(t,e){return new Z.fn.init(t,e)},te=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ee=/^-ms-/,ne=/-([\da-z])/gi,ie=function(t,e){return e.toUpperCase()};Z.fn=Z.prototype={jquery:K,constructor:Z,selector:"",length:0,toArray:function(){return z.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:z.call(this)},pushStack:function(t){var e=Z.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return Z.each(this,t,e)},map:function(t){return this.pushStack(Z.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(z.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:X,sort:$.sort,splice:$.splice},Z.extend=Z.fn.extend=function(){var t,e,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||Z.isFunction(s)||(s={}),a===l&&(s=this,a--);l>a;a++)if(null!=(t=arguments[a]))for(e in t)n=s[e],i=t[e],s!==i&&(c&&i&&(Z.isPlainObject(i)||(r=Z.isArray(i)))?(r?(r=!1,o=n&&Z.isArray(n)?n:[]):o=n&&Z.isPlainObject(n)?n:{},s[e]=Z.extend(c,o,i)):void 0!==i&&(s[e]=i));return s},Z.extend({expando:"jQuery"+(K+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===Z.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){return!Z.isArray(t)&&t-parseFloat(t)>=0},isPlainObject:function(t){return"object"!==Z.type(t)||t.nodeType||Z.isWindow(t)?!1:t.constructor&&!V.call(t.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?Q[U.call(t)]||"object":typeof t},globalEval:function(t){var e,n=eval;t=Z.trim(t),t&&(1===t.indexOf("use strict")?(e=J.createElement("script"),e.text=t,J.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(ee,"ms-").replace(ne,ie)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,i){var r,o=0,s=t.length,a=n(t);if(i){if(a)for(;s>o&&(r=e.apply(t[o],i),r!==!1);o++);else for(o in t)if(r=e.apply(t[o],i),r===!1)break}else if(a)for(;s>o&&(r=e.call(t[o],o,t[o]),r!==!1);o++);else for(o in t)if(r=e.call(t[o],o,t[o]),r===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(te,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(n(Object(t))?Z.merge(i,"string"==typeof t?[t]:t):X.call(i,t)),i},inArray:function(t,e,n){return null==e?-1:Y.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;n>i;i++)t[r++]=e[i];return t.length=r,t},grep:function(t,e,n){for(var i,r=[],o=0,s=t.length,a=!n;s>o;o++)i=!e(t[o],o),i!==a&&r.push(t[o]);return r},map:function(t,e,i){var r,o=0,s=t.length,a=n(t),l=[];if(a)for(;s>o;o++)r=e(t[o],o,i),null!=r&&l.push(r);else for(o in t)r=e(t[o],o,i),null!=r&&l.push(r);return B.apply([],l)},guid:1,proxy:function(t,e){var n,i,r;return"string"==typeof e&&(n=t[e],e=t,t=n),Z.isFunction(t)?(i=z.call(arguments,2),r=function(){return t.apply(e||this,i.concat(z.call(arguments)))},r.guid=t.guid=t.guid||Z.guid++,r):void 0},now:Date.now,support:G}),Z.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){Q["[object "+e+"]"]=e.toLowerCase()});var re=function(t){function e(t,e,n,i){var r,o,s,a,l,c,d,h,p,g;if((e?e.ownerDocument||e:P)!==q&&A(e),e=e||q,n=n||[],!t||"string"!=typeof t)return n;if(1!==(a=e.nodeType)&&9!==a)return[];if(L&&!i){if(r=ye.exec(t))if(s=r[1]){if(9===a){if(o=e.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(s))&&I(e,o)&&o.id===s)return n.push(o),n}else{if(r[2])return Z.apply(n,e.getElementsByTagName(t)),n;if((s=r[3])&&w.getElementsByClassName&&e.getElementsByClassName)return Z.apply(n,e.getElementsByClassName(s)),n}if(w.qsa&&(!H||!H.test(t))){if(h=d=W,p=e,g=9===a&&t,1===a&&"object"!==e.nodeName.toLowerCase()){for(c=T(t),(d=e.getAttribute("id"))?h=d.replace(be,"\\$&"):e.setAttribute("id",h),h="[id='"+h+"'] ",l=c.length;l--;)c[l]=h+f(c[l]);p=xe.test(t)&&u(e.parentNode)||e,g=c.join(",")}if(g)try{return Z.apply(n,p.querySelectorAll(g)),n}catch(m){}finally{d||e.removeAttribute("id")}}}return E(t.replace(le,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>_.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[W]=!0,t}function r(t){var e=q.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),i=t.length;i--;)_.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||U)-(~t.sourceIndex||U);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function l(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function c(t){return i(function(e){return e=+e,i(function(n,i){for(var r,o=t([],n.length,e),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function u(t){return t&&typeof t.getElementsByTagName!==Q&&t}function d(){}function f(t){for(var e=0,n=t.length,i="";n>e;e++)i+=t[e].value;return i}function h(t,e,n){var i=e.dir,r=n&&"parentNode"===i,o=$++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||r)return t(e,n,o)}:function(e,n,s){var a,l,c=[R,o];if(s){for(;e=e[i];)if((1===e.nodeType||r)&&t(e,n,s))return!0}else for(;e=e[i];)if(1===e.nodeType||r){if(l=e[W]||(e[W]={}),(a=l[i])&&a[0]===R&&a[1]===o)return c[2]=a[2];if(l[i]=c,c[2]=t(e,n,s))return!0}}}function p(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function g(t,n,i){for(var r=0,o=n.length;o>r;r++)e(t,n[r],i);return i}function m(t,e,n,i,r){for(var o,s=[],a=0,l=t.length,c=null!=e;l>a;a++)(o=t[a])&&(!n||n(o,i,r))&&(s.push(o),c&&e.push(a));return s}function v(t,e,n,r,o,s){return r&&!r[W]&&(r=v(r)),o&&!o[W]&&(o=v(o,s)),i(function(i,s,a,l){var c,u,d,f=[],h=[],p=s.length,v=i||g(e||"*",a.nodeType?[a]:a,[]),y=!t||!i&&e?v:m(v,f,t,a,l),x=n?o||(i?t:p||r)?[]:s:y;if(n&&n(y,x,a,l),r)for(c=m(x,h),r(c,[],a,l),u=c.length;u--;)(d=c[u])&&(x[h[u]]=!(y[h[u]]=d));if(i){if(o||t){if(o){for(c=[],u=x.length;u--;)(d=x[u])&&c.push(y[u]=d);o(null,x=[],c,l)}for(u=x.length;u--;)(d=x[u])&&(c=o?ee.call(i,d):f[u])>-1&&(i[c]=!(s[c]=d))}}else x=m(x===s?x.splice(p,x.length):x),o?o(null,s,x,l):Z.apply(s,x)})}function y(t){for(var e,n,i,r=t.length,o=_.relative[t[0].type],s=o||_.relative[" "],a=o?1:0,l=h(function(t){return t===e},s,!0),c=h(function(t){return ee.call(e,t)>-1},s,!0),u=[function(t,n,i){return!o&&(i||n!==N)||((e=n).nodeType?l(t,n,i):c(t,n,i))}];r>a;a++)if(n=_.relative[t[a].type])u=[h(p(u),n)];else{if(n=_.filter[t[a].type].apply(null,t[a].matches),n[W]){for(i=++a;r>i&&!_.relative[t[i].type];i++);return v(a>1&&p(u),a>1&&f(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(le,"$1"),n,i>a&&y(t.slice(a,i)),r>i&&y(t=t.slice(i)),r>i&&f(t))}u.push(n)}return p(u)}function x(t,n){var r=n.length>0,o=t.length>0,s=function(i,s,a,l,c){var u,d,f,h=0,p="0",g=i&&[],v=[],y=N,x=i||o&&_.find.TAG("*",c),b=R+=null==y?1:Math.random()||.1,w=x.length;for(c&&(N=s!==q&&s);p!==w&&null!=(u=x[p]);p++){if(o&&u){for(d=0;f=t[d++];)if(f(u,s,a)){l.push(u);break}c&&(R=b)}r&&((u=!f&&u)&&h--,i&&g.push(u))}if(h+=p,r&&p!==h){for(d=0;f=n[d++];)f(g,v,s,a);if(i){if(h>0)for(;p--;)g[p]||v[p]||(v[p]=J.call(l));v=m(v)}Z.apply(l,v),c&&!i&&v.length>0&&h+n.length>1&&e.uniqueSort(l)}return c&&(R=b,N=y),g};return r?i(s):s}var b,w,_,k,C,T,S,E,N,F,j,A,q,D,L,H,M,O,I,W="sizzle"+-new Date,P=t.document,R=0,$=0,z=n(),B=n(),X=n(),Y=function(t,e){return t===e&&(j=!0),0},Q="undefined",U=1<<31,V={}.hasOwnProperty,G=[],J=G.pop,K=G.push,Z=G.push,te=G.slice,ee=G.indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(this[e]===t)return e;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ie="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe=re.replace("w","w#"),se="\\["+ie+"*("+re+")(?:"+ie+"*([*^$|!~]?=)"+ie+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+oe+"))|)"+ie+"*\\]",ae=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+se+")*)|.*)\\)|)",le=new RegExp("^"+ie+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ie+"+$","g"),ce=new RegExp("^"+ie+"*,"+ie+"*"),ue=new RegExp("^"+ie+"*([>+~]|"+ie+")"+ie+"*"),de=new RegExp("="+ie+"*([^\\]'\"]*?)"+ie+"*\\]","g"),fe=new RegExp(ae),he=new RegExp("^"+oe+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re.replace("w","w*")+")"),ATTR:new RegExp("^"+se),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ie+"*(even|odd|(([+-]|)(\\d*)n|)"+ie+"*(?:([+-]|)"+ie+"*(\\d+)|))"+ie+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+ie+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ie+"*((?:-\\d)?\\d*)"+ie+"*\\)|)(?=[^-]|$)","i")},ge=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xe=/[+~]/,be=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+ie+"?|("+ie+")|.)","ig"),_e=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{Z.apply(G=te.call(P.childNodes),P.childNodes),G[P.childNodes.length].nodeType}catch(ke){Z={apply:G.length?function(t,e){K.apply(t,te.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}w=e.support={},C=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},A=e.setDocument=function(t){var e,n=t?t.ownerDocument||t:P,i=n.defaultView;return n!==q&&9===n.nodeType&&n.documentElement?(q=n,D=n.documentElement,L=!C(n),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){A()},!1):i.attachEvent&&i.attachEvent("onunload",function(){A()})),w.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=r(function(t){return t.appendChild(n.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=ve.test(n.getElementsByClassName)&&r(function(t){return t.innerHTML="",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),w.getById=r(function(t){return D.appendChild(t).id=W,!n.getElementsByName||!n.getElementsByName(W).length}),w.getById?(_.find.ID=function(t,e){if(typeof e.getElementById!==Q&&L){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},_.filter.ID=function(t){var e=t.replace(we,_e);return function(t){return t.getAttribute("id")===e}}):(delete _.find.ID,_.filter.ID=function(t){var e=t.replace(we,_e);return function(t){var n=typeof t.getAttributeNode!==Q&&t.getAttributeNode("id");return n&&n.value===e}}),_.find.TAG=w.getElementsByTagName?function(t,e){return typeof e.getElementsByTagName!==Q?e.getElementsByTagName(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},_.find.CLASS=w.getElementsByClassName&&function(t,e){return typeof e.getElementsByClassName!==Q&&L?e.getElementsByClassName(t):void 0},M=[],H=[],(w.qsa=ve.test(n.querySelectorAll))&&(r(function(t){t.innerHTML="",t.querySelectorAll("[msallowclip^='']").length&&H.push("[*^$]="+ie+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||H.push("\\["+ie+"*(?:value|"+ne+")"),t.querySelectorAll(":checked").length||H.push(":checked")}),r(function(t){var e=n.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&H.push("name"+ie+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||H.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),H.push(",.*:")})),(w.matchesSelector=ve.test(O=D.matches||D.webkitMatchesSelector||D.mozMatchesSelector||D.oMatchesSelector||D.msMatchesSelector))&&r(function(t){w.disconnectedMatch=O.call(t,"div"),O.call(t,"[s!='']:x"),M.push("!=",ae)}),H=H.length&&new RegExp(H.join("|")),M=M.length&&new RegExp(M.join("|")),e=ve.test(D.compareDocumentPosition),I=e||ve.test(D.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},Y=e?function(t,e){if(t===e)return j=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i?i:(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!w.sortDetached&&e.compareDocumentPosition(t)===i?t===n||t.ownerDocument===P&&I(P,t)?-1:e===n||e.ownerDocument===P&&I(P,e)?1:F?ee.call(F,t)-ee.call(F,e):0:4&i?-1:1)}:function(t,e){if(t===e)return j=!0,0;var i,r=0,o=t.parentNode,a=e.parentNode,l=[t],c=[e];if(!o||!a)return t===n?-1:e===n?1:o?-1:a?1:F?ee.call(F,t)-ee.call(F,e):0;if(o===a)return s(t,e);for(i=t;i=i.parentNode;)l.unshift(i);for(i=e;i=i.parentNode;)c.unshift(i);for(;l[r]===c[r];)r++;return r?s(l[r],c[r]):l[r]===P?-1:c[r]===P?1:0},n):q},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==q&&A(t),n=n.replace(de,"='$1']"),!(!w.matchesSelector||!L||M&&M.test(n)||H&&H.test(n)))try{var i=O.call(t,n);if(i||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(r){}return e(n,q,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==q&&A(t),I(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==q&&A(t);var n=_.attrHandle[e.toLowerCase()],i=n&&V.call(_.attrHandle,e.toLowerCase())?n(t,e,!L):void 0;return void 0!==i?i:w.attributes||!L?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,r=0;if(j=!w.detectDuplicates,F=!w.sortStable&&t.slice(0),t.sort(Y),j){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return F=null,t},k=e.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=k(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=k(e);return n},_=e.selectors={cacheLength:50,createPseudo:i,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(we,_e),t[3]=(t[3]||t[4]||t[5]||"").replace(we,_e),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return pe.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&fe.test(n)&&(e=T(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(we,_e).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=z[t+" "];return e||(e=new RegExp("(^|"+ie+")"+t+"("+ie+"|$)"))&&z(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==Q&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var c,u,d,f,h,p,g=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a;if(m){if(o){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&y){for(u=m[W]||(m[W]={}),c=u[t]||[],h=c[0]===R&&c[1],f=c[0]===R&&c[2],d=h&&m.childNodes[h];d=++h&&d&&d[g]||(f=h=0)||p.pop();)if(1===d.nodeType&&++f&&d===e){u[t]=[R,h,f];break}}else if(y&&(c=(e[W]||(e[W]={}))[t])&&c[0]===R)f=c[1];else for(;(d=++h&&d&&d[g]||(f=h=0)||p.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[W]||(d[W]={}))[t]=[R,f]),d!==e)););return f-=r,f===i||f%i===0&&f/i>=0}}},PSEUDO:function(t,n){var r,o=_.pseudos[t]||_.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[W]?o(n):o.length>1?(r=[t,t,"",n],_.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,r=o(t,n),s=r.length;s--;)i=ee.call(t,r[s]),t[i]=!(e[i]=r[s])}):function(t){return o(t,0,r)}):o}},pseudos:{not:i(function(t){var e=[],n=[],r=S(t.replace(le,"$1"));return r[W]?i(function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return function(e){return(e.textContent||e.innerText||k(e)).indexOf(t)>-1}}),lang:i(function(t){return he.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(we,_e).toLowerCase(),function(e){var n;do if(n=L?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===D},focus:function(t){return t===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!_.pseudos.empty(t)},header:function(t){return me.test(t.nodeName)},input:function(t){return ge.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:c(function(){return[0]}),last:c(function(t,e){return[e-1]}),eq:c(function(t,e,n){return[0>n?n+e:n]}),even:c(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:c(function(t,e){for(var n=1;e>n;n+=2)t.push(n);return t}),lt:c(function(t,e,n){for(var i=0>n?n+e:n;--i>=0;)t.push(i);return t}),gt:c(function(t,e,n){for(var i=0>n?n+e:n;++i