
/*! jQuery v2.2.4 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c;
}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=N.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function W(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&T.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var X=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,Z=/^$|\/(?:java|ecma)script/i,$={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||d,e=c.documentElement,f=c.body,a.pageX=b.clientX+(e&&e.scrollLeft||f&&f.scrollLeft||0)-(e&&e.clientLeft||f&&f.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||f&&f.scrollTop||0)-(e&&e.clientTop||f&&f.clientTop||0)),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ea.test(f)?this.mouseHooks:da.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=d),3===a.target.nodeType&&(a.target=a.target.parentNode),h.filter?h.filter(a,g):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==ia()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===ia()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ga:ha):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:ha,isPropagationStopped:ha,isImmediatePropagationStopped:ha,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ga,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ga,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ga,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),n.fn.extend({on:function(a,b,c,d){return ja(this,a,b,c,d)},one:function(a,b,c,d){return ja(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ha),this.each(function(){n.event.remove(this,a,c,b)})}});var ka=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,la=/<script|<style|<link/i,ma=/checked\s*(?:[^=]|=\s*.checked.)/i,na=/^true\/(.*)/,oa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=wa[0].contentDocument,b.write(),b.close(),c=ya(a,b),wa.detach()),xa[a]=c),c}var Aa=/^margin/,Ba=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ca=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Ea=d.documentElement;!function(){var b,c,e,f,g=d.createElement("div"),h=d.createElement("div");if(h.style){h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,g.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",g.appendChild(h);function i(){h.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",h.innerHTML="",Ea.appendChild(g);var d=a.getComputedStyle(h);b="1%"!==d.top,f="2px"===d.marginLeft,c="4px"===d.width,h.style.marginRight="50%",e="4px"===d.marginRight,Ea.removeChild(g)}n.extend(l,{pixelPosition:function(){return i(),b},boxSizingReliable:function(){return null==c&&i(),c},pixelMarginRight:function(){return null==c&&i(),e},reliableMarginLeft:function(){return null==c&&i(),f},reliableMarginRight:function(){var b,c=h.appendChild(d.createElement("div"));return c.style.cssText=h.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",h.style.width="1px",Ea.appendChild(g),b=!parseFloat(a.getComputedStyle(c).marginRight),Ea.removeChild(g),h.removeChild(c),b}})}}();function Fa(a,b,c){var d,e,f,g,h=a.style;return c=c||Ca(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Ba.test(g)&&Aa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0!==g?g+"":g}function Ga(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Ha=/^(none|table(?!-c[ea]).+)/,Ia={position:"absolute",visibility:"hidden",display:"block"},Ja={letterSpacing:"0",fontWeight:"400"},Ka=["Webkit","O","Moz","ms"],La=d.createElement("div").style;function Ma(a){if(a in La)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ka.length;while(c--)if(a=Ka[c]+b,a in La)return a}function Na(a,b,c){var d=T.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Oa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Pa(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ca(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Fa(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ba.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Oa(a,b,c||(g?"border":"content"),d,f)+"px"}function Qa(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=N.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=N.access(d,"olddisplay",za(d.nodeName)))):(e=V(d),"none"===c&&e||N.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Fa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=T.exec(c))&&e[1]&&(c=W(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Fa(a,b,d)),"normal"===e&&b in Ja&&(e=Ja[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Ha.test(n.css(a,"display"))&&0===a.offsetWidth?Da(a,Ia,function(){return Pa(a,b,d)}):Pa(a,b,d):void 0},set:function(a,c,d){var e,f=d&&Ca(a),g=d&&Oa(a,b,d,"border-box"===n.css(a,"boxSizing",!1,f),f);return g&&(e=T.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=n.css(a,b)),Na(a,c,g)}}}),n.cssHooks.marginLeft=Ga(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Fa(a,"marginLeft"))||a.getBoundingClientRect().left-Da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px":void 0}),n.cssHooks.marginRight=Ga(l.reliableMarginRight,function(a,b){return b?Da(a,{display:"inline-block"},Fa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Aa.test(a)||(n.cssHooks[a+b].set=Na)}),n.fn.extend({css:function(a,b){return K(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ca(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Qa(this,!0)},hide:function(){return Qa(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function Ra(a,b,c,d,e){return new Ra.prototype.init(a,b,c,d,e)}n.Tween=Ra,Ra.prototype={constructor:Ra,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ra.propHooks[this.prop];return a&&a.get?a.get(this):Ra.propHooks._default.get(this)},run:function(a){var b,c=Ra.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ra.propHooks._default.set(this),this}},Ra.prototype.init.prototype=Ra.prototype,Ra.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},Ra.propHooks.scrollTop=Ra.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=Ra.prototype.init,n.fx.step={};var Sa,Ta,Ua=/^(?:toggle|show|hide)$/,Va=/queueHooks$/;function Wa(){return a.setTimeout(function(){Sa=void 0}),Sa=n.now()}function Xa(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=U[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ya(a,b,c){for(var d,e=(_a.tweeners[b]||[]).concat(_a.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Za(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&V(a),q=N.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?N.get(a,"olddisplay")||za(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Ua.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?za(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=N.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;N.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ya(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function $a(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function _a(a,b,c){var d,e,f=0,g=_a.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Sa||Wa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:Sa||Wa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for($a(k,j.opts.specialEasing);g>f;f++)if(d=_a.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,Ya,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(_a,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return W(c.elem,a,T.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],_a.tweeners[c]=_a.tweeners[c]||[],_a.tweeners[c].unshift(b)},prefilters:[Za],prefilter:function(a,b){b?_a.prefilters.unshift(a):_a.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=_a(this,n.extend({},a),f);(e||N.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=N.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Va.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=N.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Xa(b,!0),a,d,e)}}),n.each({slideDown:Xa("show"),slideUp:Xa("hide"),slideToggle:Xa("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Sa=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Sa=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ta||(Ta=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(Ta),Ta=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=d.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var ab,bb=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return K(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ab:void 0)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)}}),ab={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=bb[b]||n.find.attr;bb[b]=function(a,b,d){var e,f;return d||(f=bb[b],bb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,bb[b]=f),e}});var cb=/^(?:input|select|textarea|button)$/i,db=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return K(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),
void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var eb=/[\t\r\n\f]/g;function fb(a){return a.getAttribute&&a.getAttribute("class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,fb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,fb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,fb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=fb(this),b&&N.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":N.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+fb(c)+" ").replace(eb," ").indexOf(b)>-1)return!0;return!1}});var gb=/\r/g,hb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(gb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(hb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(n.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var ib=/^(?:focusinfocus|focusoutblur)$/;n.extend(n.event,{trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!ib.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),l=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},f||!o.trigger||o.trigger.apply(e,c)!==!1)){if(!f&&!o.noBubble&&!n.isWindow(e)){for(j=o.delegateType||q,ib.test(j+q)||(h=h.parentNode);h;h=h.parentNode)p.push(h),i=h;i===(e.ownerDocument||d)&&p.push(i.defaultView||i.parentWindow||a)}g=0;while((h=p[g++])&&!b.isPropagationStopped())b.type=g>1?j:o.bindType||q,m=(N.get(h,"events")||{})[b.type]&&N.get(h,"handle"),m&&m.apply(h,c),m=l&&h[l],m&&m.apply&&L(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=q,f||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!L(e)||l&&n.isFunction(e[q])&&!n.isWindow(e)&&(i=e[l],i&&(e[l]=null),n.event.triggered=q,e[q](),n.event.triggered=void 0,i&&(e[l]=i)),b.result}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b)}}),n.fn.extend({trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),l.focusin="onfocusin"in a,l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=N.access(d,b);e||d.addEventListener(a,c,!0),N.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=N.access(d,b)-1;e?N.access(d,b,e):(d.removeEventListener(a,c,!0),N.remove(d,b))}}});var jb=a.location,kb=n.now(),lb=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var mb=/#.*$/,nb=/([?&])_=[^&]*/,ob=/^(.*?):[ \t]*([^\r\n]*)$/gm,pb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qb=/^(?:GET|HEAD)$/,rb=/^\/\//,sb={},tb={},ub="*/".concat("*"),vb=d.createElement("a");vb.href=jb.href;function wb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function xb(a,b,c,d){var e={},f=a===tb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function yb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function zb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Ab(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:jb.href,type:"GET",isLocal:pb.test(jb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ub,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?yb(yb(a,n.ajaxSettings),b):yb(n.ajaxSettings,a)},ajaxPrefilter:wb(sb),ajaxTransport:wb(tb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m=n.ajaxSetup({},c),o=m.context||m,p=m.context&&(o.nodeType||o.jquery)?n(o):n.event,q=n.Deferred(),r=n.Callbacks("once memory"),s=m.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,getResponseHeader:function(a){var b;if(2===v){if(!h){h={};while(b=ob.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===v?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return v||(a=u[c]=u[c]||a,t[a]=b),this},overrideMimeType:function(a){return v||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>v)for(b in a)s[b]=[s[b],a[b]];else x.always(a[x.status]);return this},abort:function(a){var b=a||w;return e&&e.abort(b),z(0,b),this}};if(q.promise(x).complete=r.add,x.success=x.done,x.error=x.fail,m.url=((b||m.url||jb.href)+"").replace(mb,"").replace(rb,jb.protocol+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=n.trim(m.dataType||"*").toLowerCase().match(G)||[""],null==m.crossDomain){j=d.createElement("a");try{j.href=m.url,j.href=j.href,m.crossDomain=vb.protocol+"//"+vb.host!=j.protocol+"//"+j.host}catch(y){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=n.param(m.data,m.traditional)),xb(sb,m,c,x),2===v)return x;k=n.event&&m.global,k&&0===n.active++&&n.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!qb.test(m.type),f=m.url,m.hasContent||(m.data&&(f=m.url+=(lb.test(f)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=nb.test(f)?f.replace(nb,"$1_="+kb++):f+(lb.test(f)?"&":"?")+"_="+kb++)),m.ifModified&&(n.lastModified[f]&&x.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&x.setRequestHeader("If-None-Match",n.etag[f])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",m.contentType),x.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+ub+"; q=0.01":""):m.accepts["*"]);for(l in m.headers)x.setRequestHeader(l,m.headers[l]);if(m.beforeSend&&(m.beforeSend.call(o,x,m)===!1||2===v))return x.abort();w="abort";for(l in{success:1,error:1,complete:1})x[l](m[l]);if(e=xb(tb,m,c,x)){if(x.readyState=1,k&&p.trigger("ajaxSend",[x,m]),2===v)return x;m.async&&m.timeout>0&&(i=a.setTimeout(function(){x.abort("timeout")},m.timeout));try{v=1,e.send(t,z)}catch(y){if(!(2>v))throw y;z(-1,y)}}else z(-1,"No Transport");function z(b,c,d,h){var j,l,t,u,w,y=c;2!==v&&(v=2,i&&a.clearTimeout(i),e=void 0,g=h||"",x.readyState=b>0?4:0,j=b>=200&&300>b||304===b,d&&(u=zb(m,x,d)),u=Ab(m,u,x,j),j?(m.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(n.lastModified[f]=w),w=x.getResponseHeader("etag"),w&&(n.etag[f]=w)),204===b||"HEAD"===m.type?y="nocontent":304===b?y="notmodified":(y=u.state,l=u.data,t=u.error,j=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),x.status=b,x.statusText=(c||y)+"",j?q.resolveWith(o,[l,y,x]):q.rejectWith(o,[x,y,t]),x.statusCode(s),s=void 0,k&&p.trigger(j?"ajaxSuccess":"ajaxError",[x,m,j?l:t]),r.fireWith(o,[x,y]),k&&(p.trigger("ajaxComplete",[x,m]),--n.active||n.event.trigger("ajaxStop")))}return x},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return!n.expr.filters.visible(a)},n.expr.filters.visible=function(a){return a.offsetWidth>0||a.offsetHeight>0||a.getClientRects().length>0};var Bb=/%20/g,Cb=/\[\]$/,Db=/\r?\n/g,Eb=/^(?:submit|button|image|reset|file)$/i,Fb=/^(?:input|select|textarea|keygen)/i;function Gb(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Cb.test(a)?d(a,e):Gb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Gb(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Gb(c,a[c],b,e);return d.join("&").replace(Bb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Fb.test(this.nodeName)&&!Eb.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Db,"\r\n")}}):{name:b.name,value:c.replace(Db,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Hb={0:200,1223:204},Ib=n.ajaxSettings.xhr();l.cors=!!Ib&&"withCredentials"in Ib,l.ajax=Ib=!!Ib,n.ajaxTransport(function(b){var c,d;return l.cors||Ib&&!b.crossDomain?{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Hb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=n("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Jb=[],Kb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Jb.pop()||n.expando+"_"+kb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Kb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Kb,"$1"+e):b.jsonp!==!1&&(b.url+=(lb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Jb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ca([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var Lb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Lb)return Lb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function Mb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(e=d.getBoundingClientRect(),c=Mb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ea})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;n.fn[a]=function(d){return K(this,function(a,d,e){var f=Mb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ga(l.pixelPosition,function(a,c){return c?(c=Fa(a,b),Ba.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return K(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)},size:function(){return this.length}}),n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Nb=a.jQuery,Ob=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Ob),b&&a.jQuery===n&&(a.jQuery=Nb),n},b||(a.jQuery=a.$=n),n});

(function(a, b) {
	function G(a) {
		var b = F[a] = {};
		return p.each(a.split(s), function(a, c) {
			b[c] = !0
		}), b
	}

	function J(a, c, d) {
		if (d === b && a.nodeType === 1) {
			var e = "data-" + c.replace(I, "-$1").toLowerCase();
			d = a.getAttribute(e);
			if (typeof d == "string") {
				try {
					d = d === "true" ? !0 : d === "false" ? !1 : d === "null" ? null : +d + "" === d ? +d : H.test(d) ? p.parseJSON(d) : d
				} catch (f) {}
				p.data(a, c, d)
			} else d = b
		}
		return d
	}

	function K(a) {
		var b;
		for (b in a) {
			if (b === "data" && p.isEmptyObject(a[b])) continue;
			if (b !== "toJSON") return !1
		}
		return !0
	}

	function ba() {
		return !1
	}

	function bb() {
		return !0
	}

	function bh(a) {
		return !a || !a.parentNode || a.parentNode.nodeType === 11
	}

	function bi(a, b) {
		do a = a[b]; while (a && a.nodeType !== 1);
		return a
	}

	function bj(a, b, c) {
		b = b || 0;
		if (p.isFunction(b)) return p.grep(a, function(a, d) {
			var e = !!b.call(a, d, a);
			return e === c
		});
		if (b.nodeType) return p.grep(a, function(a, d) {
			return a === b === c
		});
		if (typeof b == "string") {
			var d = p.grep(a, function(a) {
				return a.nodeType === 1
			});
			if (be.test(b)) return p.filter(b, d, !c);
			b = p.filter(b, d)
		}
		return p.grep(a, function(a, d) {
			return p.inArray(a, b) >= 0 === c
		})
	}

	function bk(a) {
		var b = bl.split("|"),
			c = a.createDocumentFragment();
		if (c.createElement)
			while (b.length) c.createElement(b.pop());
		return c
	}

	function bC(a, b) {
		return a.getElementsByTagName(b)[0] || a.appendChild(a.ownerDocument.createElement(b))
	}

	function bD(a, b) {
		if (b.nodeType !== 1 || !p.hasData(a)) return;
		var c, d, e, f = p._data(a),
			g = p._data(b, f),
			h = f.events;
		if (h) {
			delete g.handle, g.events = {};
			for (c in h)
				for (d = 0, e = h[c].length; d < e; d++) p.event.add(b, c, h[c][d])
		}
		g.data && (g.data = p.extend({}, g.data))
	}

	function bE(a, b) {
		var c;
		if (b.nodeType !== 1) return;
		b.clearAttributes && b.clearAttributes(), b.mergeAttributes && b.mergeAttributes(a), c = b.nodeName.toLowerCase(), c === "object" ? (b.parentNode && (b.outerHTML = a.outerHTML), p.support.html5Clone && a.innerHTML && !p.trim(b.innerHTML) && (b.innerHTML = a.innerHTML)) : c === "input" && bv.test(a.type) ? (b.defaultChecked = b.checked = a.checked, b.value !== a.value && (b.value = a.value)) : c === "option" ? b.selected = a.defaultSelected : c === "input" || c === "textarea" ? b.defaultValue = a.defaultValue : c === "script" && b.text !== a.text && (b.text = a.text), b.removeAttribute(p.expando)
	}

	function bF(a) {
		return typeof a.getElementsByTagName != "undefined" ? a.getElementsByTagName("*") : typeof a.querySelectorAll != "undefined" ? a.querySelectorAll("*") : []
	}

	function bG(a) {
		bv.test(a.type) && (a.defaultChecked = a.checked)
	}

	function bX(a, b) {
		if (b in a) return b;
		var c = b.charAt(0).toUpperCase() + b.slice(1),
			d = b,
			e = bV.length;
		while (e--) {
			b = bV[e] + c;
			if (b in a) return b
		}
		return d
	}

	function bY(a, b) {
		return a = b || a, p.css(a, "display") === "none" || !p.contains(a.ownerDocument, a)
	}

	function bZ(a, b) {
		var c, d, e = [],
			f = 0,
			g = a.length;
		for (; f < g; f++) {
			c = a[f];
			if (!c.style) continue;
			e[f] = p._data(c, "olddisplay"), b ? (!e[f] && c.style.display === "none" && (c.style.display = ""), c.style.display === "" && bY(c) && (e[f] = p._data(c, "olddisplay", cb(c.nodeName)))) : (d = bH(c, "display"), !e[f] && d !== "none" && p._data(c, "olddisplay", d))
		}
		for (f = 0; f < g; f++) {
			c = a[f];
			if (!c.style) continue;
			if (!b || c.style.display === "none" || c.style.display === "") c.style.display = b ? e[f] || "" : "none"
		}
		return a
	}

	function b$(a, b, c) {
		var d = bO.exec(b);
		return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || "px") : b
	}

	function b_(a, b, c, d) {
		var e = c === (d ? "border" : "content") ? 4 : b === "width" ? 1 : 0,
			f = 0;
		for (; e < 4; e += 2) c === "margin" && (f += p.css(a, c + bU[e], !0)), d ? (c === "content" && (f -= parseFloat(bH(a, "padding" + bU[e])) || 0), c !== "margin" && (f -= parseFloat(bH(a, "border" + bU[e] + "Width")) || 0)) : (f += parseFloat(bH(a, "padding" + bU[e])) || 0, c !== "padding" && (f += parseFloat(bH(a, "border" + bU[e] + "Width")) || 0));
		return f
	}

	function ca(a, b, c) {
		var d = b === "width" ? a.offsetWidth : a.offsetHeight,
			e = !0,
			f = p.support.boxSizing && p.css(a, "boxSizing") === "border-box";
		if (d <= 0) {
			d = bH(a, b);
			if (d < 0 || d == null) d = a.style[b];
			if (bP.test(d)) return d;
			e = f && (p.support.boxSizingReliable || d === a.style[b]), d = parseFloat(d) || 0
		}
		return d + b_(a, b, c || (f ? "border" : "content"), e) + "px"
	}

	function cb(a) {
		if (bR[a]) return bR[a];
		var b = p("<" + a + ">").appendTo(e.body),
			c = b.css("display");
		b.remove();
		if (c === "none" || c === "") {
			bI = e.body.appendChild(bI || p.extend(e.createElement("iframe"), {
				frameBorder: 0,
				width: 0,
				height: 0
			}));
			if (!bJ || !bI.createElement) bJ = (bI.contentWindow || bI.contentDocument).document, bJ.write("<!doctype html><html><body>"), bJ.close();
			b = bJ.body.appendChild(bJ.createElement(a)), c = bH(b, "display"), e.body.removeChild(bI)
		}
		return bR[a] = c, c
	}

	function ch(a, b, c, d) {
		var e;
		if (p.isArray(b)) p.each(b, function(b, e) {
			c || cd.test(a) ? d(a, e) : ch(a + "[" + (typeof e == "object" ? b : "") + "]", e, c, d)
		});
		else if (!c && p.type(b) === "object")
			for (e in b) ch(a + "[" + e + "]", b[e], c, d);
		else d(a, b)
	}

	function cy(a) {
		return function(b, c) {
			typeof b != "string" && (c = b, b = "*");
			var d, e, f, g = b.toLowerCase().split(s),
				h = 0,
				i = g.length;
			if (p.isFunction(c))
				for (; h < i; h++) d = g[h], f = /^\+/.test(d), f && (d = d.substr(1) || "*"), e = a[d] = a[d] || [], e[f ? "unshift" : "push"](c)
		}
	}

	function cz(a, c, d, e, f, g) {
		f = f || c.dataTypes[0], g = g || {}, g[f] = !0;
		var h, i = a[f],
			j = 0,
			k = i ? i.length : 0,
			l = a === cu;
		for (; j < k && (l || !h); j++) h = i[j](c, d, e), typeof h == "string" && (!l || g[h] ? h = b : (c.dataTypes.unshift(h), h = cz(a, c, d, e, h, g)));
		return (l || !h) && !g["*"] && (h = cz(a, c, d, e, "*", g)), h
	}

	function cA(a, c) {
		var d, e, f = p.ajaxSettings.flatOptions || {};
		for (d in c) c[d] !== b && ((f[d] ? a : e || (e = {}))[d] = c[d]);
		e && p.extend(!0, a, e)
	}

	function cB(a, c, d) {
		var e, f, g, h, i = a.contents,
			j = a.dataTypes,
			k = a.responseFields;
		for (f in k) f in d && (c[k[f]] = d[f]);
		while (j[0] === "*") j.shift(), e === b && (e = a.mimeType || c.getResponseHeader("content-type"));
		if (e)
			for (f in i)
				if (i[f] && i[f].test(e)) {
					j.unshift(f);
					break
				}
		if (j[0] in d) g = j[0];
		else {
			for (f in d) {
				if (!j[0] || a.converters[f + " " + j[0]]) {
					g = f;
					break
				}
				h || (h = f)
			}
			g = g || h
		}
		if (g) return g !== j[0] && j.unshift(g), d[g]
	}

	function cC(a, b) {
		var c, d, e, f, g = a.dataTypes.slice(),
			h = g[0],
			i = {},
			j = 0;
		a.dataFilter && (b = a.dataFilter(b, a.dataType));
		if (g[1])
			for (c in a.converters) i[c.toLowerCase()] = a.converters[c];
		for (; e = g[++j];)
			if (e !== "*") {
				if (h !== "*" && h !== e) {
					c = i[h + " " + e] || i["* " + e];
					if (!c)
						for (d in i) {
							f = d.split(" ");
							if (f[1] === e) {
								c = i[h + " " + f[0]] || i["* " + f[0]];
								if (c) {
									c === !0 ? c = i[d] : i[d] !== !0 && (e = f[0], g.splice(j--, 0, e));
									break
								}
							}
						}
					if (c !== !0)
						if (c && a["throws"]) b = c(b);
						else try {
							b = c(b)
						} catch (k) {
							return {
								state: "parsererror",
								error: c ? k : "No conversion from " + h + " to " + e
							}
						}
				}
				h = e
			}
		return {
			state: "success",
			data: b
		}
	}

	function cK() {
		try {
			return new a.XMLHttpRequest
		} catch (b) {}
	}

	function cL() {
		try {
			return new a.ActiveXObject("Microsoft.XMLHTTP")
		} catch (b) {}
	}

	function cT() {
		return setTimeout(function() {
			cM = b
		}, 0), cM = p.now()
	}

	function cU(a, b) {
		p.each(b, function(b, c) {
			var d = (cS[b] || []).concat(cS["*"]),
				e = 0,
				f = d.length;
			for (; e < f; e++)
				if (d[e].call(a, b, c)) return
		})
	}

	function cV(a, b, c) {
		var d, e = 0,
			f = 0,
			g = cR.length,
			h = p.Deferred().always(function() {
				delete i.elem
			}),
			i = function() {
				var b = cM || cT(),
					c = Math.max(0, j.startTime + j.duration - b),
					d = 1 - (c / j.duration || 0),
					e = 0,
					f = j.tweens.length;
				for (; e < f; e++) j.tweens[e].run(d);
				return h.notifyWith(a, [j, d, c]), d < 1 && f ? c : (h.resolveWith(a, [j]), !1)
			},
			j = h.promise({
				elem: a,
				props: p.extend({}, b),
				opts: p.extend(!0, {
					specialEasing: {}
				}, c),
				originalProperties: b,
				originalOptions: c,
				startTime: cM || cT(),
				duration: c.duration,
				tweens: [],
				createTween: function(b, c, d) {
					var e = p.Tween(a, j.opts, b, c, j.opts.specialEasing[b] || j.opts.easing);
					return j.tweens.push(e), e
				},
				stop: function(b) {
					var c = 0,
						d = b ? j.tweens.length : 0;
					for (; c < d; c++) j.tweens[c].run(1);
					return b ? h.resolveWith(a, [j, b]) : h.rejectWith(a, [j, b]), this
				}
			}),
			k = j.props;
		cW(k, j.opts.specialEasing);
		for (; e < g; e++) {
			d = cR[e].call(j, a, k, j.opts);
			if (d) return d
		}
		return cU(j, k), p.isFunction(j.opts.start) && j.opts.start.call(a, j), p.fx.timer(p.extend(i, {
			anim: j,
			queue: j.opts.queue,
			elem: a
		})), j.progress(j.opts.progress).done(j.opts.done, j.opts.complete).fail(j.opts.fail).always(j.opts.always)
	}

	function cW(a, b) {
		var c, d, e, f, g;
		for (c in a) {
			d = p.camelCase(c), e = b[d], f = a[c], p.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = p.cssHooks[d];
			if (g && "expand" in g) {
				f = g.expand(f), delete a[d];
				for (c in f) c in a || (a[c] = f[c], b[c] = e)
			} else b[d] = e
		}
	}

	function cX(a, b, c) {
		var d, e, f, g, h, i, j, k, l = this,
			m = a.style,
			n = {},
			o = [],
			q = a.nodeType && bY(a);
		c.queue || (j = p._queueHooks(a, "fx"), j.unqueued == null && (j.unqueued = 0, k = j.empty.fire, j.empty.fire = function() {
			j.unqueued || k()
		}), j.unqueued++, l.always(function() {
			l.always(function() {
				j.unqueued--, p.queue(a, "fx").length || j.empty.fire()
			})
		})), a.nodeType === 1 && ("height" in b || "width" in b) && (c.overflow = [m.overflow, m.overflowX, m.overflowY], p.css(a, "display") === "inline" && p.css(a, "float") === "none" && (!p.support.inlineBlockNeedsLayout || cb(a.nodeName) === "inline" ? m.display = "inline-block" : m.zoom = 1)), c.overflow && (m.overflow = "hidden", p.support.shrinkWrapBlocks || l.done(function() {
			m.overflow = c.overflow[0], m.overflowX = c.overflow[1], m.overflowY = c.overflow[2]
		}));
		for (d in b) {
			f = b[d];
			if (cO.exec(f)) {
				delete b[d];
				if (f === (q ? "hide" : "show")) continue;
				o.push(d)
			}
		}
		g = o.length;
		if (g) {
			h = p._data(a, "fxshow") || p._data(a, "fxshow", {}), q ? p(a).show() : l.done(function() {
				p(a).hide()
			}), l.done(function() {
				var b;
				p.removeData(a, "fxshow", !0);
				for (b in n) p.style(a, b, n[b])
			});
			for (d = 0; d < g; d++) e = o[d], i = l.createTween(e, q ? h[e] : 0), n[e] = h[e] || p.style(a, e), e in h || (h[e] = i.start, q && (i.end = i.start, i.start = e === "width" || e === "height" ? 1 : 0))
		}
	}

	function cY(a, b, c, d, e) {
		return new cY.prototype.init(a, b, c, d, e)
	}

	function cZ(a, b) {
		var c, d = {
				height: a
			},
			e = 0;
		for (; e < 4; e += 2 - b) c = bU[e], d["margin" + c] = d["padding" + c] = a;
		return b && (d.opacity = d.width = a), d
	}

	function c_(a) {
		return p.isWindow(a) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : !1
	}
	var c, d, e = a.document,
		f = a.location,
		g = a.navigator,
		h = a.jQuery,
		i = a.$,
		j = Array.prototype.push,
		k = Array.prototype.slice,
		l = Array.prototype.indexOf,
		m = Object.prototype.toString,
		n = Object.prototype.hasOwnProperty,
		o = String.prototype.trim,
		p = function(a, b) {
			return new p.fn.init(a, b, c)
		},
		q = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
		r = /\S/,
		s = /\s+/,
		t = r.test(" ") ? /^[\s\xA0]+|[\s\xA0]+$/g : /^\s+|\s+$/g,
		u = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
		v = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
		w = /^[\],:{}\s]*$/,
		x = /(?:^|:|,)(?:\s*\[)+/g,
		y = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
		z = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
		A = /^-ms-/,
		B = /-([\da-z])/gi,
		C = function(a, b) {
			return (b + "").toUpperCase()
		},
		D = function() {
			e.addEventListener ? (e.removeEventListener("DOMContentLoaded", D, !1), p.ready()) : e.readyState === "complete" && (e.detachEvent("onreadystatechange", D), p.ready())
		},
		E = {};
	p.fn = p.prototype = {
		constructor: p,
		init: function(a, c, d) {
			var f, g, h, i;
			if (!a) return this;
			if (a.nodeType) return this.context = this[0] = a, this.length = 1, this;
			if (typeof a == "string") {
				a.charAt(0) === "<" && a.charAt(a.length - 1) === ">" && a.length >= 3 ? f = [null, a, null] : f = u.exec(a);
				if (f && (f[1] || !c)) {
					if (f[1]) return c = c instanceof p ? c[0] : c, i = c && c.nodeType ? c.ownerDocument || c : e, a = p.parseHTML(f[1], i, !0), v.test(f[1]) && p.isPlainObject(c) && this.attr.call(a, c, !0), p.merge(this, a);
					g = e.getElementById(f[2]);
					if (g && g.parentNode) {
						if (g.id !== f[2]) return d.find(a);
						this.length = 1, this[0] = g
					}
					return this.context = e, this.selector = a, this
				}
				return !c || c.jquery ? (c || d).find(a) : this.constructor(c).find(a)
			}
			return p.isFunction(a) ? d.ready(a) : (a.selector !== b && (this.selector = a.selector, this.context = a.context), p.makeArray(a, this))
		},
		selector: "",
		jquery: "1.8.0",
		length: 0,
		size: function() {
			return this.length
		},
		toArray: function() {
			return k.call(this)
		},
		get: function(a) {
			return a == null ? this.toArray() : a < 0 ? this[this.length + a] : this[a]
		},
		pushStack: function(a, b, c) {
			var d = p.merge(this.constructor(), a);
			return d.prevObject = this, d.context = this.context, b === "find" ? d.selector = this.selector + (this.selector ? " " : "") + c : b && (d.selector = this.selector + "." + b + "(" + c + ")"), d
		},
		each: function(a, b) {
			return p.each(this, a, b)
		},
		ready: function(a) {
			return p.ready.promise().done(a), this
		},
		eq: function(a) {
			return a = +a, a === -1 ? this.slice(a) : this.slice(a, a + 1)
		},
		first: function() {
			return this.eq(0)
		},
		last: function() {
			return this.eq(-1)
		},
		slice: function() {
			return this.pushStack(k.apply(this, arguments), "slice", k.call(arguments).join(","))
		},
		map: function(a) {
			return this.pushStack(p.map(this, function(b, c) {
				return a.call(b, c, b)
			}))
		},
		end: function() {
			return this.prevObject || this.constructor(null)
		},
		push: j,
		sort: [].sort,
		splice: [].splice
	}, p.fn.init.prototype = p.fn, p.extend = p.fn.extend = function() {
		var a, c, d, e, f, g, h = arguments[0] || {},
			i = 1,
			j = arguments.length,
			k = !1;
		typeof h == "boolean" && (k = h, h = arguments[1] || {}, i = 2), typeof h != "object" && !p.isFunction(h) && (h = {}), j === i && (h = this, --i);
		for (; i < j; i++)
			if ((a = arguments[i]) != null)
				for (c in a) {
					d = h[c], e = a[c];
					if (h === e) continue;
					k && e && (p.isPlainObject(e) || (f = p.isArray(e))) ? (f ? (f = !1, g = d && p.isArray(d) ? d : []) : g = d && p.isPlainObject(d) ? d : {}, h[c] = p.extend(k, g, e)) : e !== b && (h[c] = e)
				}
			return h
	}, p.extend({
		noConflict: function(b) {
			return a.$ === p && (a.$ = i), b && a.jQuery === p && (a.jQuery = h), p
		},
		isReady: !1,
		readyWait: 1,
		holdReady: function(a) {
			a ? p.readyWait++ : p.ready(!0)
		},
		ready: function(a) {
			if (a === !0 ? --p.readyWait : p.isReady) return;
			if (!e.body) return setTimeout(p.ready, 1);
			p.isReady = !0;
			if (a !== !0 && --p.readyWait > 0) return;
			d.resolveWith(e, [p]), p.fn.trigger && p(e).trigger("ready").off("ready")
		},
		isFunction: function(a) {
			return p.type(a) === "function"
		},
		isArray: Array.isArray || function(a) {
			return p.type(a) === "array"
		},
		isWindow: function(a) {
			return a != null && a == a.window
		},
		isNumeric: function(a) {
			return !isNaN(parseFloat(a)) && isFinite(a)
		},
		type: function(a) {
			return a == null ? String(a) : E[m.call(a)] || "object"
		},
		isPlainObject: function(a) {
			if (!a || p.type(a) !== "object" || a.nodeType || p.isWindow(a)) return !1;
			try {
				if (a.constructor && !n.call(a, "constructor") && !n.call(a.constructor.prototype, "isPrototypeOf")) return !1
			} catch (c) {
				return !1
			}
			var d;
			for (d in a);
			return d === b || n.call(a, d)
		},
		isEmptyObject: function(a) {
			var b;
			for (b in a) return !1;
			return !0
		},
		error: function(a) {
			throw new Error(a)
		},
		parseHTML: function(a, b, c) {
			var d;
			return !a || typeof a != "string" ? null : (typeof b == "boolean" && (c = b, b = 0), b = b || e, (d = v.exec(a)) ? [b.createElement(d[1])] : (d = p.buildFragment([a], b, c ? null : []), p.merge([], (d.cacheable ? p.clone(d.fragment) : d.fragment).childNodes)))
		},
		parseJSON: function(b) {
			if (!b || typeof b != "string") return null;
			b = p.trim(b);
			if (a.JSON && a.JSON.parse) return a.JSON.parse(b);
			if (w.test(b.replace(y, "@").replace(z, "]").replace(x, ""))) return (new Function("return " + b))();
			p.error("Invalid JSON: " + b)
		},
		parseXML: function(c) {
			var d, e;
			if (!c || typeof c != "string") return null;
			try {
				a.DOMParser ? (e = new DOMParser, d = e.parseFromString(c, "text/xml")) : (d = new ActiveXObject("Microsoft.XMLDOM"), d.async = "false", d.loadXML(c))
			} catch (f) {
				d = b
			}
			return (!d || !d.documentElement || d.getElementsByTagName("parsererror").length) && p.error("Invalid XML: " + c), d
		},
		noop: function() {},
		globalEval: function(b) {
			b && r.test(b) && (a.execScript || function(b) {
				a.eval.call(a, b)
			})(b)
		},
		camelCase: function(a) {
			return a.replace(A, "ms-").replace(B, C)
		},
		nodeName: function(a, b) {
			return a.nodeName && a.nodeName.toUpperCase() === b.toUpperCase()
		},
		each: function(a, c, d) {
			var e, f = 0,
				g = a.length,
				h = g === b || p.isFunction(a);
			if (d) {
				if (h) {
					for (e in a)
						if (c.apply(a[e], d) === !1) break
				} else
					for (; f < g;)
						if (c.apply(a[f++], d) === !1) break
			} else if (h) {
				for (e in a)
					if (c.call(a[e], e, a[e]) === !1) break
			} else
				for (; f < g;)
					if (c.call(a[f], f, a[f++]) === !1) break; return a
		},
		trim: o ? function(a) {
			return a == null ? "" : o.call(a)
		} : function(a) {
			return a == null ? "" : a.toString().replace(t, "")
		},
		makeArray: function(a, b) {
			var c, d = b || [];
			return a != null && (c = p.type(a), a.length == null || c === "string" || c === "function" || c === "regexp" || p.isWindow(a) ? j.call(d, a) : p.merge(d, a)), d
		},
		inArray: function(a, b, c) {
			var d;
			if (b) {
				if (l) return l.call(b, a, c);
				d = b.length, c = c ? c < 0 ? Math.max(0, d + c) : c : 0;
				for (; c < d; c++)
					if (c in b && b[c] === a) return c
			}
			return -1
		},
		merge: function(a, c) {
			var d = c.length,
				e = a.length,
				f = 0;
			if (typeof d == "number")
				for (; f < d; f++) a[e++] = c[f];
			else
				while (c[f] !== b) a[e++] = c[f++];
			return a.length = e, a
		},
		grep: function(a, b, c) {
			var d, e = [],
				f = 0,
				g = a.length;
			c = !!c;
			for (; f < g; f++) d = !!b(a[f], f), c !== d && e.push(a[f]);
			return e
		},
		map: function(a, c, d) {
			var e, f, g = [],
				h = 0,
				i = a.length,
				j = a instanceof p || i !== b && typeof i == "number" && (i > 0 && a[0] && a[i - 1] || i === 0 || p.isArray(a));
			if (j)
				for (; h < i; h++) e = c(a[h], h, d), e != null && (g[g.length] = e);
			else
				for (f in a) e = c(a[f], f, d), e != null && (g[g.length] = e);
			return g.concat.apply([], g)
		},
		guid: 1,
		proxy: function(a, c) {
			var d, e, f;
			return typeof c == "string" && (d = a[c], c = a, a = d), p.isFunction(a) ? (e = k.call(arguments, 2), f = function() {
				return a.apply(c, e.concat(k.call(arguments)))
			}, f.guid = a.guid = a.guid || f.guid || p.guid++, f) : b
		},
		access: function(a, c, d, e, f, g, h) {
			var i, j = d == null,
				k = 0,
				l = a.length;
			if (d && typeof d == "object") {
				for (k in d) p.access(a, c, k, d[k], 1, g, e);
				f = 1
			} else if (e !== b) {
				i = h === b && p.isFunction(e), j && (i ? (i = c, c = function(a, b, c) {
					return i.call(p(a), c)
				}) : (c.call(a, e), c = null));
				if (c)
					for (; k < l; k++) c(a[k], d, i ? e.call(a[k], k, c(a[k], d)) : e, h);
				f = 1
			}
			return f ? a : j ? c.call(a) : l ? c(a[0], d) : g
		},
		now: function() {
			return (new Date).getTime()
		}
	}), p.ready.promise = function(b) {
		if (!d) {
			d = p.Deferred();
			if (e.readyState === "complete" || e.readyState !== "loading" && e.addEventListener) setTimeout(p.ready, 1);
			else if (e.addEventListener) e.addEventListener("DOMContentLoaded", D, !1), a.addEventListener("load", p.ready, !1);
			else {
				e.attachEvent("onreadystatechange", D), a.attachEvent("onload", p.ready);
				var c = !1;
				try {
					c = a.frameElement == null && e.documentElement
				} catch (f) {}
				c && c.doScroll && function g() {
					if (!p.isReady) {
						try {
							c.doScroll("left")
						} catch (a) {
							return setTimeout(g, 50)
						}
						p.ready()
					}
				}()
			}
		}
		return d.promise(b)
	}, p.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(a, b) {
		E["[object " + b + "]"] = b.toLowerCase()
	}), c = p(e);
	var F = {};
	p.Callbacks = function(a) {
		a = typeof a == "string" ? F[a] || G(a) : p.extend({}, a);
		var c, d, e, f, g, h, i = [],
			j = !a.once && [],
			k = function(b) {
				c = a.memory && b, d = !0, h = f || 0, f = 0, g = i.length, e = !0;
				for (; i && h < g; h++)
					if (i[h].apply(b[0], b[1]) === !1 && a.stopOnFalse) {
						c = !1;
						break
					}
				e = !1, i && (j ? j.length && k(j.shift()) : c ? i = [] : l.disable())
			},
			l = {
				add: function() {
					if (i) {
						var b = i.length;
						(function d(b) {
							p.each(b, function(b, c) {
								p.isFunction(c) && (!a.unique || !l.has(c)) ? i.push(c) : c && c.length && d(c)
							})
						})(arguments), e ? g = i.length : c && (f = b, k(c))
					}
					return this
				},
				remove: function() {
					return i && p.each(arguments, function(a, b) {
						var c;
						while ((c = p.inArray(b, i, c)) > -1) i.splice(c, 1), e && (c <= g && g--, c <= h && h--)
					}), this
				},
				has: function(a) {
					return p.inArray(a, i) > -1
				},
				empty: function() {
					return i = [], this
				},
				disable: function() {
					return i = j = c = b, this
				},
				disabled: function() {
					return !i
				},
				lock: function() {
					return j = b, c || l.disable(), this
				},
				locked: function() {
					return !j
				},
				fireWith: function(a, b) {
					return b = b || [], b = [a, b.slice ? b.slice() : b], i && (!d || j) && (e ? j.push(b) : k(b)), this
				},
				fire: function() {
					return l.fireWith(this, arguments), this
				},
				fired: function() {
					return !!d
				}
			};
		return l
	}, p.extend({
		Deferred: function(a) {
			var b = [
					["resolve", "done", p.Callbacks("once memory"), "resolved"],
					["reject", "fail", p.Callbacks("once memory"), "rejected"],
					["notify", "progress", p.Callbacks("memory")]
				],
				c = "pending",
				d = {
					state: function() {
						return c
					},
					always: function() {
						return e.done(arguments).fail(arguments), this
					},
					then: function() {
						var a = arguments;
						return p.Deferred(function(c) {
							p.each(b, function(b, d) {
								var f = d[0],
									g = a[b];
								e[d[1]](p.isFunction(g) ? function() {
									var a = g.apply(this, arguments);
									a && p.isFunction(a.promise) ? a.promise().done(c.resolve).fail(c.reject).progress(c.notify) : c[f + "With"](this === e ? c : this, [a])
								} : c[f])
							}), a = null
						}).promise()
					},
					promise: function(a) {
						return typeof a == "object" ? p.extend(a, d) : d
					}
				},
				e = {};
			return d.pipe = d.then, p.each(b, function(a, f) {
				var g = f[2],
					h = f[3];
				d[f[1]] = g.add, h && g.add(function() {
					c = h
				}, b[a ^ 1][2].disable, b[2][2].lock), e[f[0]] = g.fire, e[f[0] + "With"] = g.fireWith
			}), d.promise(e), a && a.call(e, e), e
		},
		when: function(a) {
			var b = 0,
				c = k.call(arguments),
				d = c.length,
				e = d !== 1 || a && p.isFunction(a.promise) ? d : 0,
				f = e === 1 ? a : p.Deferred(),
				g = function(a, b, c) {
					return function(d) {
						b[a] = this, c[a] = arguments.length > 1 ? k.call(arguments) : d, c === h ? f.notifyWith(b, c) : --e || f.resolveWith(b, c)
					}
				},
				h, i, j;
			if (d > 1) {
				h = new Array(d), i = new Array(d), j = new Array(d);
				for (; b < d; b++) c[b] && p.isFunction(c[b].promise) ? c[b].promise().done(g(b, j, c)).fail(f.reject).progress(g(b, i, h)) : --e
			}
			return e || f.resolveWith(j, c), f.promise()
		}
	}), p.support = function() {
		var b, c, d, f, g, h, i, j, k, l, m, n = e.createElement("div");
		n.setAttribute("className", "t"), n.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", c = n.getElementsByTagName("*"), d = n.getElementsByTagName("a")[0], d.style.cssText = "top:1px;float:left;opacity:.5";
		if (!c || !c.length || !d) return {};
		f = e.createElement("select"), g = f.appendChild(e.createElement("option")), h = n.getElementsByTagName("input")[0], b = {
			leadingWhitespace: n.firstChild.nodeType === 3,
			tbody: !n.getElementsByTagName("tbody").length,
			htmlSerialize: !!n.getElementsByTagName("link").length,
			style: /top/.test(d.getAttribute("style")),
			hrefNormalized: d.getAttribute("href") === "/a",
			opacity: /^0.5/.test(d.style.opacity),
			cssFloat: !!d.style.cssFloat,
			checkOn: h.value === "on",
			optSelected: g.selected,
			getSetAttribute: n.className !== "t",
			enctype: !!e.createElement("form").enctype,
			html5Clone: e.createElement("nav").cloneNode(!0).outerHTML !== "<:nav></:nav>",
			boxModel: e.compatMode === "CSS1Compat",
			submitBubbles: !0,
			changeBubbles: !0,
			focusinBubbles: !1,
			deleteExpando: !0,
			noCloneEvent: !0,
			inlineBlockNeedsLayout: !1,
			shrinkWrapBlocks: !1,
			reliableMarginRight: !0,
			boxSizingReliable: !0,
			pixelPosition: !1
		}, h.checked = !0, b.noCloneChecked = h.cloneNode(!0).checked, f.disabled = !0, b.optDisabled = !g.disabled;
		try {
			delete n.test
		} catch (o) {
			b.deleteExpando = !1
		}!n.addEventListener && n.attachEvent && n.fireEvent && (n.attachEvent("onclick", m = function() {
			b.noCloneEvent = !1
		}), n.cloneNode(!0).fireEvent("onclick"), n.detachEvent("onclick", m)), h = e.createElement("input"), h.value = "t", h.setAttribute("type", "radio"), b.radioValue = h.value === "t", h.setAttribute("checked", "checked"), h.setAttribute("name", "t"), n.appendChild(h), i = e.createDocumentFragment(), i.appendChild(n.lastChild), b.checkClone = i.cloneNode(!0).cloneNode(!0).lastChild.checked, b.appendChecked = h.checked, i.removeChild(h), i.appendChild(n);
		if (n.attachEvent)
			for (k in {
					submit: !0,
					change: !0,
					focusin: !0
				}) j = "on" + k, l = j in n, l || (n.setAttribute(j, "return;"), l = typeof n[j] == "function"), b[k + "Bubbles"] = l;
		return p(function() {
			var c, d, f, g, h = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
				i = e.getElementsByTagName("body")[0];
			if (!i) return;
			c = e.createElement("div"), c.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px", i.insertBefore(c, i.firstChild), d = e.createElement("div"), c.appendChild(d), d.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", f = d.getElementsByTagName("td"), f[0].style.cssText = "padding:0;margin:0;border:0;display:none", l = f[0].offsetHeight === 0, f[0].style.display = "", f[1].style.display = "none", b.reliableHiddenOffsets = l && f[0].offsetHeight === 0, d.innerHTML = "", d.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;", b.boxSizing = d.offsetWidth === 4, b.doesNotIncludeMarginInBodyOffset = i.offsetTop !== 1, a.getComputedStyle && (b.pixelPosition = (a.getComputedStyle(d, null) || {}).top !== "1%", b.boxSizingReliable = (a.getComputedStyle(d, null) || {
				width: "4px"
			}).width === "4px", g = e.createElement("div"), g.style.cssText = d.style.cssText = h, g.style.marginRight = g.style.width = "0", d.style.width = "1px", d.appendChild(g), b.reliableMarginRight = !parseFloat((a.getComputedStyle(g, null) || {}).marginRight)), typeof d.style.zoom != "undefined" && (d.innerHTML = "", d.style.cssText = h + "width:1px;padding:1px;display:inline;zoom:1", b.inlineBlockNeedsLayout = d.offsetWidth === 3, d.style.display = "block", d.style.overflow = "visible", d.innerHTML = "<div></div>", d.firstChild.style.width = "5px", b.shrinkWrapBlocks = d.offsetWidth !== 3, c.style.zoom = 1), i.removeChild(c), c = d = f = g = null
		}), i.removeChild(n), c = d = f = g = h = i = n = null, b
	}();
	var H = /^(?:\{.*\}|\[.*\])$/,
		I = /([A-Z])/g;
	p.extend({
		cache: {},
		deletedIds: [],
		uuid: 0,
		expando: "jQuery" + (p.fn.jquery + Math.random()).replace(/\D/g, ""),
		noData: {
			embed: !0,
			object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
			applet: !0
		},
		hasData: function(a) {
			return a = a.nodeType ? p.cache[a[p.expando]] : a[p.expando], !!a && !K(a)
		},
		data: function(a, c, d, e) {
			if (!p.acceptData(a)) return;
			var f, g, h = p.expando,
				i = typeof c == "string",
				j = a.nodeType,
				k = j ? p.cache : a,
				l = j ? a[h] : a[h] && h;
			if ((!l || !k[l] || !e && !k[l].data) && i && d === b) return;
			l || (j ? a[h] = l = p.deletedIds.pop() || ++p.uuid : l = h), k[l] || (k[l] = {}, j || (k[l].toJSON = p.noop));
			if (typeof c == "object" || typeof c == "function") e ? k[l] = p.extend(k[l], c) : k[l].data = p.extend(k[l].data, c);
			return f = k[l], e || (f.data || (f.data = {}), f = f.data), d !== b && (f[p.camelCase(c)] = d), i ? (g = f[c], g == null && (g = f[p.camelCase(c)])) : g = f, g
		},
		removeData: function(a, b, c) {
			if (!p.acceptData(a)) return;
			var d, e, f, g = a.nodeType,
				h = g ? p.cache : a,
				i = g ? a[p.expando] : p.expando;
			if (!h[i]) return;
			if (b) {
				d = c ? h[i] : h[i].data;
				if (d) {
					p.isArray(b) || (b in d ? b = [b] : (b = p.camelCase(b), b in d ? b = [b] : b = b.split(" ")));
					for (e = 0, f = b.length; e < f; e++) delete d[b[e]];
					if (!(c ? K : p.isEmptyObject)(d)) return
				}
			}
			if (!c) {
				delete h[i].data;
				if (!K(h[i])) return
			}
			g ? p.cleanData([a], !0) : p.support.deleteExpando || h != h.window ? delete h[i] : h[i] = null
		},
		_data: function(a, b, c) {
			return p.data(a, b, c, !0)
		},
		acceptData: function(a) {
			var b = a.nodeName && p.noData[a.nodeName.toLowerCase()];
			return !b || b !== !0 && a.getAttribute("classid") === b
		}
	}), p.fn.extend({
		data: function(a, c) {
			var d, e, f, g, h, i = this[0],
				j = 0,
				k = null;
			if (a === b) {
				if (this.length) {
					k = p.data(i);
					if (i.nodeType === 1 && !p._data(i, "parsedAttrs")) {
						f = i.attributes;
						for (h = f.length; j < h; j++) g = f[j].name, g.indexOf("data-") === 0 && (g = p.camelCase(g.substring(5)), J(i, g, k[g]));
						p._data(i, "parsedAttrs", !0)
					}
				}
				return k
			}
			return typeof a == "object" ? this.each(function() {
				p.data(this, a)
			}) : (d = a.split(".", 2), d[1] = d[1] ? "." + d[1] : "", e = d[1] + "!", p.access(this, function(c) {
				if (c === b) return k = this.triggerHandler("getData" + e, [d[0]]), k === b && i && (k = p.data(i, a), k = J(i, a, k)), k === b && d[1] ? this.data(d[0]) : k;
				d[1] = c, this.each(function() {
					var b = p(this);
					b.triggerHandler("setData" + e, d), p.data(this, a, c), b.triggerHandler("changeData" + e, d)
				})
			}, null, c, arguments.length > 1, null, !1))
		},
		removeData: function(a) {
			return this.each(function() {
				p.removeData(this, a)
			})
		}
	}), p.extend({
		queue: function(a, b, c) {
			var d;
			if (a) return b = (b || "fx") + "queue", d = p._data(a, b), c && (!d || p.isArray(c) ? d = p._data(a, b, p.makeArray(c)) : d.push(c)), d || []
		},
		dequeue: function(a, b) {
			b = b || "fx";
			var c = p.queue(a, b),
				d = c.shift(),
				e = p._queueHooks(a, b),
				f = function() {
					p.dequeue(a, b)
				};
			d === "inprogress" && (d = c.shift()), d && (b === "fx" && c.unshift("inprogress"), delete e.stop, d.call(a, f, e)), !c.length && e && e.empty.fire()
		},
		_queueHooks: function(a, b) {
			var c = b + "queueHooks";
			return p._data(a, c) || p._data(a, c, {
				empty: p.Callbacks("once memory").add(function() {
					p.removeData(a, b + "queue", !0), p.removeData(a, c, !0)
				})
			})
		}
	}), p.fn.extend({
		queue: function(a, c) {
			var d = 2;
			return typeof a != "string" && (c = a, a = "fx", d--), arguments.length < d ? p.queue(this[0], a) : c === b ? this : this.each(function() {
				var b = p.queue(this, a, c);
				p._queueHooks(this, a), a === "fx" && b[0] !== "inprogress" && p.dequeue(this, a)
			})
		},
		dequeue: function(a) {
			return this.each(function() {
				p.dequeue(this, a)
			})
		},
		delay: function(a, b) {
			return a = p.fx ? p.fx.speeds[a] || a : a, b = b || "fx", this.queue(b, function(b, c) {
				var d = setTimeout(b, a);
				c.stop = function() {
					clearTimeout(d)
				}
			})
		},
		clearQueue: function(a) {
			return this.queue(a || "fx", [])
		},
		promise: function(a, c) {
			var d, e = 1,
				f = p.Deferred(),
				g = this,
				h = this.length,
				i = function() {
					--e || f.resolveWith(g, [g])
				};
			typeof a != "string" && (c = a, a = b), a = a || "fx";
			while (h--)(d = p._data(g[h], a + "queueHooks")) && d.empty && (e++, d.empty.add(i));
			return i(), f.promise(c)
		}
	});
	var L, M, N, O = /[\t\r\n]/g,
		P = /\r/g,
		Q = /^(?:button|input)$/i,
		R = /^(?:button|input|object|select|textarea)$/i,
		S = /^a(?:rea|)$/i,
		T = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
		U = p.support.getSetAttribute;
	p.fn.extend({
		attr: function(a, b) {
			return p.access(this, p.attr, a, b, arguments.length > 1)
		},
		removeAttr: function(a) {
			return this.each(function() {
				p.removeAttr(this, a)
			})
		},
		prop: function(a, b) {
			return p.access(this, p.prop, a, b, arguments.length > 1)
		},
		removeProp: function(a) {
			return a = p.propFix[a] || a, this.each(function() {
				try {
					this[a] = b, delete this[a]
				} catch (c) {}
			})
		},
		addClass: function(a) {
			var b, c, d, e, f, g, h;
			if (p.isFunction(a)) return this.each(function(b) {
				p(this).addClass(a.call(this, b, this.className))
			});
			if (a && typeof a == "string") {
				b = a.split(s);
				for (c = 0, d = this.length; c < d; c++) {
					e = this[c];
					if (e.nodeType === 1)
						if (!e.className && b.length === 1) e.className = a;
						else {
							f = " " + e.className + " ";
							for (g = 0, h = b.length; g < h; g++) ~f.indexOf(" " + b[g] + " ") || (f += b[g] + " ");
							e.className = p.trim(f)
						}
				}
			}
			return this
		},
		removeClass: function(a) {
			var c, d, e, f, g, h, i;
			if (p.isFunction(a)) return this.each(function(b) {
				p(this).removeClass(a.call(this, b, this.className))
			});
			if (a && typeof a == "string" || a === b) {
				c = (a || "").split(s);
				for (h = 0, i = this.length; h < i; h++) {
					e = this[h];
					if (e.nodeType === 1 && e.className) {
						d = (" " + e.className + " ").replace(O, " ");
						for (f = 0, g = c.length; f < g; f++)
							while (d.indexOf(" " + c[f] + " ") > -1) d = d.replace(" " + c[f] + " ", " ");
						e.className = a ? p.trim(d) : ""
					}
				}
			}
			return this
		},
		toggleClass: function(a, b) {
			var c = typeof a,
				d = typeof b == "boolean";
			return p.isFunction(a) ? this.each(function(c) {
				p(this).toggleClass(a.call(this, c, this.className, b), b)
			}) : this.each(function() {
				if (c === "string") {
					var e, f = 0,
						g = p(this),
						h = b,
						i = a.split(s);
					while (e = i[f++]) h = d ? h : !g.hasClass(e), g[h ? "addClass" : "removeClass"](e)
				} else if (c === "undefined" || c === "boolean") this.className && p._data(this, "__className__", this.className), this.className = this.className || a === !1 ? "" : p._data(this, "__className__") || ""
			})
		},
		hasClass: function(a) {
			var b = " " + a + " ",
				c = 0,
				d = this.length;
			for (; c < d; c++)
				if (this[c].nodeType === 1 && (" " + this[c].className + " ").replace(O, " ").indexOf(b) > -1) return !0;
			return !1
		},
		val: function(a) {
			var c, d, e, f = this[0];
			if (!arguments.length) {
				if (f) return c = p.valHooks[f.type] || p.valHooks[f.nodeName.toLowerCase()], c && "get" in c && (d = c.get(f, "value")) !== b ? d : (d = f.value, typeof d == "string" ? d.replace(P, "") : d == null ? "" : d);
				return
			}
			return e = p.isFunction(a), this.each(function(d) {
				var f, g = p(this);
				if (this.nodeType !== 1) return;
				e ? f = a.call(this, d, g.val()) : f = a, f == null ? f = "" : typeof f == "number" ? f += "" : p.isArray(f) && (f = p.map(f, function(a) {
					return a == null ? "" : a + ""
				})), c = p.valHooks[this.type] || p.valHooks[this.nodeName.toLowerCase()];
				if (!c || !("set" in c) || c.set(this, f, "value") === b) this.value = f
			})
		}
	}), p.extend({
		valHooks: {
			option: {
				get: function(a) {
					var b = a.attributes.value;
					return !b || b.specified ? a.value : a.text
				}
			},
			select: {
				get: function(a) {
					var b, c, d, e, f = a.selectedIndex,
						g = [],
						h = a.options,
						i = a.type === "select-one";
					if (f < 0) return null;
					c = i ? f : 0, d = i ? f + 1 : h.length;
					for (; c < d; c++) {
						e = h[c];
						if (e.selected && (p.support.optDisabled ? !e.disabled : e.getAttribute("disabled") === null) && (!e.parentNode.disabled || !p.nodeName(e.parentNode, "optgroup"))) {
							b = p(e).val();
							if (i) return b;
							g.push(b)
						}
					}
					return i && !g.length && h.length ? p(h[f]).val() : g
				},
				set: function(a, b) {
					var c = p.makeArray(b);
					return p(a).find("option").each(function() {
						this.selected = p.inArray(p(this).val(), c) >= 0
					}), c.length || (a.selectedIndex = -1), c
				}
			}
		},
		attrFn: {},
		attr: function(a, c, d, e) {
			var f, g, h, i = a.nodeType;
			if (!a || i === 3 || i === 8 || i === 2) return;
			if (e && p.isFunction(p.fn[c])) return p(a)[c](d);
			if (typeof a.getAttribute == "undefined") return p.prop(a, c, d);
			h = i !== 1 || !p.isXMLDoc(a), h && (c = c.toLowerCase(), g = p.attrHooks[c] || (T.test(c) ? M : L));
			if (d !== b) {
				if (d === null) {
					p.removeAttr(a, c);
					return
				}
				return g && "set" in g && h && (f = g.set(a, d, c)) !== b ? f : (a.setAttribute(c, "" + d), d)
			}
			return g && "get" in g && h && (f = g.get(a, c)) !== null ? f : (f = a.getAttribute(c), f === null ? b : f)
		},
		removeAttr: function(a, b) {
			var c, d, e, f, g = 0;
			if (b && a.nodeType === 1) {
				d = b.split(s);
				for (; g < d.length; g++) e = d[g], e && (c = p.propFix[e] || e, f = T.test(e), f || p.attr(a, e, ""), a.removeAttribute(U ? e : c), f && c in a && (a[c] = !1))
			}
		},
		attrHooks: {
			type: {
				set: function(a, b) {
					if (Q.test(a.nodeName) && a.parentNode) p.error("type property can't be changed");
					else if (!p.support.radioValue && b === "radio" && p.nodeName(a, "input")) {
						var c = a.value;
						return a.setAttribute("type", b), c && (a.value = c), b
					}
				}
			},
			value: {
				get: function(a, b) {
					return L && p.nodeName(a, "button") ? L.get(a, b) : b in a ? a.value : null
				},
				set: function(a, b, c) {
					if (L && p.nodeName(a, "button")) return L.set(a, b, c);
					a.value = b
				}
			}
		},
		propFix: {
			tabindex: "tabIndex",
			readonly: "readOnly",
			"for": "htmlFor",
			"class": "className",
			maxlength: "maxLength",
			cellspacing: "cellSpacing",
			cellpadding: "cellPadding",
			rowspan: "rowSpan",
			colspan: "colSpan",
			usemap: "useMap",
			frameborder: "frameBorder",
			contenteditable: "contentEditable"
		},
		prop: function(a, c, d) {
			var e, f, g, h = a.nodeType;
			if (!a || h === 3 || h === 8 || h === 2) return;
			return g = h !== 1 || !p.isXMLDoc(a), g && (c = p.propFix[c] || c, f = p.propHooks[c]), d !== b ? f && "set" in f && (e = f.set(a, d, c)) !== b ? e : a[c] = d : f && "get" in f && (e = f.get(a, c)) !== null ? e : a[c]
		},
		propHooks: {
			tabIndex: {
				get: function(a) {
					var c = a.getAttributeNode("tabindex");
					return c && c.specified ? parseInt(c.value, 10) : R.test(a.nodeName) || S.test(a.nodeName) && a.href ? 0 : b
				}
			}
		}
	}), M = {
		get: function(a, c) {
			var d, e = p.prop(a, c);
			return e === !0 || typeof e != "boolean" && (d = a.getAttributeNode(c)) && d.nodeValue !== !1 ? c.toLowerCase() : b
		},
		set: function(a, b, c) {
			var d;
			return b === !1 ? p.removeAttr(a, c) : (d = p.propFix[c] || c, d in a && (a[d] = !0), a.setAttribute(c, c.toLowerCase())), c
		}
	}, U || (N = {
		name: !0,
		id: !0,
		coords: !0
	}, L = p.valHooks.button = {
		get: function(a, c) {
			var d;
			return d = a.getAttributeNode(c), d && (N[c] ? d.value !== "" : d.specified) ? d.value : b
		},
		set: function(a, b, c) {
			var d = a.getAttributeNode(c);
			return d || (d = e.createAttribute(c), a.setAttributeNode(d)), d.value = b + ""
		}
	}, p.each(["width", "height"], function(a, b) {
		p.attrHooks[b] = p.extend(p.attrHooks[b], {
			set: function(a, c) {
				if (c === "") return a.setAttribute(b, "auto"), c
			}
		})
	}), p.attrHooks.contenteditable = {
		get: L.get,
		set: function(a, b, c) {
			b === "" && (b = "false"), L.set(a, b, c)
		}
	}), p.support.hrefNormalized || p.each(["href", "src", "width", "height"], function(a, c) {
		p.attrHooks[c] = p.extend(p.attrHooks[c], {
			get: function(a) {
				var d = a.getAttribute(c, 2);
				return d === null ? b : d
			}
		})
	}), p.support.style || (p.attrHooks.style = {
		get: function(a) {
			return a.style.cssText.toLowerCase() || b
		},
		set: function(a, b) {
			return a.style.cssText = "" + b
		}
	}), p.support.optSelected || (p.propHooks.selected = p.extend(p.propHooks.selected, {
		get: function(a) {
			var b = a.parentNode;
			return b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex), null
		}
	})), p.support.enctype || (p.propFix.enctype = "encoding"), p.support.checkOn || p.each(["radio", "checkbox"], function() {
		p.valHooks[this] = {
			get: function(a) {
				return a.getAttribute("value") === null ? "on" : a.value
			}
		}
	}), p.each(["radio", "checkbox"], function() {
		p.valHooks[this] = p.extend(p.valHooks[this], {
			set: function(a, b) {
				if (p.isArray(b)) return a.checked = p.inArray(p(a).val(), b) >= 0
			}
		})
	});
	var V = /^(?:textarea|input|select)$/i,
		W = /^([^\.]*|)(?:\.(.+)|)$/,
		X = /(?:^|\s)hover(\.\S+|)\b/,
		Y = /^key/,
		Z = /^(?:mouse|contextmenu)|click/,
		$ = /^(?:focusinfocus|focusoutblur)$/,
		_ = function(a) {
			return p.event.special.hover ? a : a.replace(X, "mouseenter$1 mouseleave$1")
		};
	p.event = {
			add: function(a, c, d, e, f) {
				var g, h, i, j, k, l, m, n, o, q, r;
				if (a.nodeType === 3 || a.nodeType === 8 || !c || !d || !(g = p._data(a))) return;
				d.handler && (o = d, d = o.handler, f = o.selector), d.guid || (d.guid = p.guid++), i = g.events, i || (g.events = i = {}), h = g.handle, h || (g.handle = h = function(a) {
					return typeof p != "undefined" && (!a || p.event.triggered !== a.type) ? p.event.dispatch.apply(h.elem, arguments) : b
				}, h.elem = a), c = p.trim(_(c)).split(" ");
				for (j = 0; j < c.length; j++) {
					k = W.exec(c[j]) || [], l = k[1], m = (k[2] || "").split(".").sort(), r = p.event.special[l] || {}, l = (f ? r.delegateType : r.bindType) || l, r = p.event.special[l] || {}, n = p.extend({
						type: l,
						origType: k[1],
						data: e,
						handler: d,
						guid: d.guid,
						selector: f,
						namespace: m.join(".")
					}, o), q = i[l];
					if (!q) {
						q = i[l] = [], q.delegateCount = 0;
						if (!r.setup || r.setup.call(a, e, m, h) === !1) a.addEventListener ? a.addEventListener(l, h, !1) : a.attachEvent && a.attachEvent("on" + l, h)
					}
					r.add && (r.add.call(a, n), n.handler.guid || (n.handler.guid = d.guid)), f ? q.splice(q.delegateCount++, 0, n) : q.push(n), p.event.global[l] = !0
				}
				a = null
			},
			global: {},
			remove: function(a, b, c, d, e) {
				var f, g, h, i, j, k, l, m, n, o, q, r = p.hasData(a) && p._data(a);
				if (!r || !(m = r.events)) return;
				b = p.trim(_(b || "")).split(" ");
				for (f = 0; f < b.length; f++) {
					g = W.exec(b[f]) || [], h = i = g[1], j = g[2];
					if (!h) {
						for (h in m) p.event.remove(a, h + b[f], c, d, !0);
						continue
					}
					n = p.event.special[h] || {}, h = (d ? n.delegateType : n.bindType) || h, o = m[h] || [], k = o.length, j = j ? new RegExp("(^|\\.)" + j.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
					for (l = 0; l < o.length; l++) q = o[l], (e || i === q.origType) && (!c || c.guid === q.guid) && (!j || j.test(q.namespace)) && (!d || d === q.selector || d === "**" && q.selector) && (o.splice(l--, 1), q.selector && o.delegateCount--, n.remove && n.remove.call(a, q));
					o.length === 0 && k !== o.length && ((!n.teardown || n.teardown.call(a, j, r.handle) === !1) && p.removeEvent(a, h, r.handle), delete m[h])
				}
				p.isEmptyObject(m) && (delete r.handle, p.removeData(a, "events", !0))
			},
			customEvent: {
				getData: !0,
				setData: !0,
				changeData: !0
			},
			trigger: function(c, d, f, g) {
				if (!f || f.nodeType !== 3 && f.nodeType !== 8) {
					var h, i, j, k, l, m, n, o, q, r, s = c.type || c,
						t = [];
					if ($.test(s + p.event.triggered)) return;
					s.indexOf("!") >= 0 && (s = s.slice(0, -1), i = !0), s.indexOf(".") >= 0 && (t = s.split("."), s = t.shift(), t.sort());
					if ((!f || p.event.customEvent[s]) && !p.event.global[s]) return;
					c = typeof c == "object" ? c[p.expando] ? c : new p.Event(s, c) : new p.Event(s), c.type = s, c.isTrigger = !0, c.exclusive = i, c.namespace = t.join("."), c.namespace_re = c.namespace ? new RegExp("(^|\\.)" + t.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, m = s.indexOf(":") < 0 ? "on" + s : "";
					if (!f) {
						h = p.cache;
						for (j in h) h[j].events && h[j].events[s] && p.event.trigger(c, d, h[j].handle.elem, !0);
						return
					}
					c.result = b, c.target || (c.target = f), d = d != null ? p.makeArray(d) : [], d.unshift(c), n = p.event.special[s] || {};
					if (n.trigger && n.trigger.apply(f, d) === !1) return;
					q = [
						[f, n.bindType || s]
					];
					if (!g && !n.noBubble && !p.isWindow(f)) {
						r = n.delegateType || s, k = $.test(r + s) ? f : f.parentNode;
						for (l = f; k; k = k.parentNode) q.push([k, r]), l = k;
						l === (f.ownerDocument || e) && q.push([l.defaultView || l.parentWindow || a, r])
					}
					for (j = 0; j < q.length && !c.isPropagationStopped(); j++) k = q[j][0], c.type = q[j][1], o = (p._data(k, "events") || {})[c.type] && p._data(k, "handle"), o && o.apply(k, d), o = m && k[m], o && p.acceptData(k) && o.apply(k, d) === !1 && c.preventDefault();
					return c.type = s, !g && !c.isDefaultPrevented() && (!n._default || n._default.apply(f.ownerDocument, d) === !1) && (s !== "click" || !p.nodeName(f, "a")) && p.acceptData(f) && m && f[s] && (s !== "focus" && s !== "blur" || c.target.offsetWidth !== 0) && !p.isWindow(f) && (l = f[m], l && (f[m] = null), p.event.triggered = s, f[s](), p.event.triggered = b, l && (f[m] = l)), c.result
				}
				return
			},
			dispatch: function(c) {
				c = p.event.fix(c || a.event);
				var d, e, f, g, h, i, j, k, l, m, n, o = (p._data(this, "events") || {})[c.type] || [],
					q = o.delegateCount,
					r = [].slice.call(arguments),
					s = !c.exclusive && !c.namespace,
					t = p.event.special[c.type] || {},
					u = [];
				r[0] = c, c.delegateTarget = this;
				if (t.preDispatch && t.preDispatch.call(this, c) === !1) return;
				if (q && (!c.button || c.type !== "click")) {
					g = p(this), g.context = this;
					for (f = c.target; f != this; f = f.parentNode || this)
						if (f.disabled !== !0 || c.type !== "click") {
							i = {}, k = [], g[0] = f;
							for (d = 0; d < q; d++) l = o[d], m = l.selector, i[m] === b && (i[m] = g.is(m)), i[m] && k.push(l);
							k.length && u.push({
								elem: f,
								matches: k
							})
						}
				}
				o.length > q && u.push({
					elem: this,
					matches: o.slice(q)
				});
				for (d = 0; d < u.length && !c.isPropagationStopped(); d++) {
					j = u[d], c.currentTarget = j.elem;
					for (e = 0; e < j.matches.length && !c.isImmediatePropagationStopped(); e++) {
						l = j.matches[e];
						if (s || !c.namespace && !l.namespace || c.namespace_re && c.namespace_re.test(l.namespace)) c.data = l.data, c.handleObj = l, h = ((p.event.special[l.origType] || {}).handle || l.handler).apply(j.elem, r), h !== b && (c.result = h, h === !1 && (c.preventDefault(), c.stopPropagation()))
					}
				}
				return t.postDispatch && t.postDispatch.call(this, c), c.result
			},
			props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
			fixHooks: {},
			keyHooks: {
				props: "char charCode key keyCode".split(" "),
				filter: function(a, b) {
					return a.which == null && (a.which = b.charCode != null ? b.charCode : b.keyCode), a
				}
			},
			mouseHooks: {
				props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
				filter: function(a, c) {
					var d, f, g, h = c.button,
						i = c.fromElement;
					return a.pageX == null && c.clientX != null && (d = a.target.ownerDocument || e, f = d.documentElement, g = d.body, a.pageX = c.clientX + (f && f.scrollLeft || g && g.scrollLeft || 0) - (f && f.clientLeft || g && g.clientLeft || 0), a.pageY = c.clientY + (f && f.scrollTop || g && g.scrollTop || 0) - (f && f.clientTop || g && g.clientTop || 0)), !a.relatedTarget && i && (a.relatedTarget = i === a.target ? c.toElement : i), !a.which && h !== b && (a.which = h & 1 ? 1 : h & 2 ? 3 : h & 4 ? 2 : 0), a
				}
			},
			fix: function(a) {
				if (a[p.expando]) return a;
				var b, c, d = a,
					f = p.event.fixHooks[a.type] || {},
					g = f.props ? this.props.concat(f.props) : this.props;
				a = p.Event(d);
				for (b = g.length; b;) c = g[--b], a[c] = d[c];
				return a.target || (a.target = d.srcElement || e), a.target.nodeType === 3 && (a.target = a.target.parentNode), a.metaKey = !!a.metaKey, f.filter ? f.filter(a, d) : a
			},
			special: {
				ready: {
					setup: p.bindReady
				},
				load: {
					noBubble: !0
				},
				focus: {
					delegateType: "focusin"
				},
				blur: {
					delegateType: "focusout"
				},
				beforeunload: {
					setup: function(a, b, c) {
						p.isWindow(this) && (this.onbeforeunload = c)
					},
					teardown: function(a, b) {
						this.onbeforeunload === b && (this.onbeforeunload = null)
					}
				}
			},
			simulate: function(a, b, c, d) {
				var e = p.extend(new p.Event, c, {
					type: a,
					isSimulated: !0,
					originalEvent: {}
				});
				d ? p.event.trigger(e, null, b) : p.event.dispatch.call(b, e), e.isDefaultPrevented() && c.preventDefault()
			}
		}, p.event.handle = p.event.dispatch, p.removeEvent = e.removeEventListener ? function(a, b, c) {
			a.removeEventListener && a.removeEventListener(b, c, !1)
		} : function(a, b, c) {
			var d = "on" + b;
			a.detachEvent && (typeof a[d] == "undefined" && (a[d] = null), a.detachEvent(d, c))
		}, p.Event = function(a, b) {
			if (this instanceof p.Event) a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || a.returnValue === !1 || a.getPreventDefault && a.getPreventDefault() ? bb : ba) : this.type = a, b && p.extend(this, b), this.timeStamp = a && a.timeStamp || p.now(), this[p.expando] = !0;
			else return new p.Event(a, b)
		}, p.Event.prototype = {
			preventDefault: function() {
				this.isDefaultPrevented = bb;
				var a = this.originalEvent;
				if (!a) return;
				a.preventDefault ? a.preventDefault() : a.returnValue = !1
			},
			stopPropagation: function() {
				this.isPropagationStopped = bb;
				var a = this.originalEvent;
				if (!a) return;
				a.stopPropagation && a.stopPropagation(), a.cancelBubble = !0
			},
			stopImmediatePropagation: function() {
				this.isImmediatePropagationStopped = bb, this.stopPropagation()
			},
			isDefaultPrevented: ba,
			isPropagationStopped: ba,
			isImmediatePropagationStopped: ba
		}, p.each({
			mouseenter: "mouseover",
			mouseleave: "mouseout"
		}, function(a, b) {
			p.event.special[a] = {
				delegateType: b,
				bindType: b,
				handle: function(a) {
					var c, d = this,
						e = a.relatedTarget,
						f = a.handleObj,
						g = f.selector;
					if (!e || e !== d && !p.contains(d, e)) a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b;
					return c
				}
			}
		}), p.support.submitBubbles || (p.event.special.submit = {
			setup: function() {
				if (p.nodeName(this, "form")) return !1;
				p.event.add(this, "click._submit keypress._submit", function(a) {
					var c = a.target,
						d = p.nodeName(c, "input") || p.nodeName(c, "button") ? c.form : b;
					d && !p._data(d, "_submit_attached") && (p.event.add(d, "submit._submit", function(a) {
						a._submit_bubble = !0
					}), p._data(d, "_submit_attached", !0))
				})
			},
			postDispatch: function(a) {
				a._submit_bubble && (delete a._submit_bubble, this.parentNode && !a.isTrigger && p.event.simulate("submit", this.parentNode, a, !0))
			},
			teardown: function() {
				if (p.nodeName(this, "form")) return !1;
				p.event.remove(this, "._submit")
			}
		}), p.support.changeBubbles || (p.event.special.change = {
			setup: function() {
				if (V.test(this.nodeName)) {
					if (this.type === "checkbox" || this.type === "radio") p.event.add(this, "propertychange._change", function(a) {
						a.originalEvent.propertyName === "checked" && (this._just_changed = !0)
					}), p.event.add(this, "click._change", function(a) {
						this._just_changed && !a.isTrigger && (this._just_changed = !1), p.event.simulate("change", this, a, !0)
					});
					return !1
				}
				p.event.add(this, "beforeactivate._change", function(a) {
					var b = a.target;
					V.test(b.nodeName) && !p._data(b, "_change_attached") && (p.event.add(b, "change._change", function(a) {
						this.parentNode && !a.isSimulated && !a.isTrigger && p.event.simulate("change", this.parentNode, a, !0)
					}), p._data(b, "_change_attached", !0))
				})
			},
			handle: function(a) {
				var b = a.target;
				if (this !== b || a.isSimulated || a.isTrigger || b.type !== "radio" && b.type !== "checkbox") return a.handleObj.handler.apply(this, arguments)
			},
			teardown: function() {
				return p.event.remove(this, "._change"), V.test(this.nodeName)
			}
		}), p.support.focusinBubbles || p.each({
			focus: "focusin",
			blur: "focusout"
		}, function(a, b) {
			var c = 0,
				d = function(a) {
					p.event.simulate(b, a.target, p.event.fix(a), !0)
				};
			p.event.special[b] = {
				setup: function() {
					c++ === 0 && e.addEventListener(a, d, !0)
				},
				teardown: function() {
					--c === 0 && e.removeEventListener(a, d, !0)
				}
			}
		}), p.fn.extend({
			on: function(a, c, d, e, f) {
				var g, h;
				if (typeof a == "object") {
					typeof c != "string" && (d = d || c, c = b);
					for (h in a) this.on(h, c, d, a[h], f);
					return this
				}
				d == null && e == null ? (e = c, d = c = b) : e == null && (typeof c == "string" ? (e = d, d = b) : (e = d, d = c, c = b));
				if (e === !1) e = ba;
				else if (!e) return this;
				return f === 1 && (g = e, e = function(a) {
					return p().off(a), g.apply(this, arguments)
				}, e.guid = g.guid || (g.guid = p.guid++)), this.each(function() {
					p.event.add(this, a, e, d, c)
				})
			},
			one: function(a, b, c, d) {
				return this.on(a, b, c, d, 1)
			},
			off: function(a, c, d) {
				var e, f;
				if (a && a.preventDefault && a.handleObj) return e = a.handleObj, p(a.delegateTarget).off(e.namespace ? e.origType + "." + e.namespace : e.origType, e.selector, e.handler), this;
				if (typeof a == "object") {
					for (f in a) this.off(f, c, a[f]);
					return this
				}
				if (c === !1 || typeof c == "function") d = c, c = b;
				return d === !1 && (d = ba), this.each(function() {
					p.event.remove(this, a, d, c)
				})
			},
			bind: function(a, b, c) {
				return this.on(a, null, b, c)
			},
			unbind: function(a, b) {
				return this.off(a, null, b)
			},
			live: function(a, b, c) {
				return p(this.context).on(a, this.selector, b, c), this
			},
			die: function(a, b) {
				return p(this.context).off(a, this.selector || "**", b), this
			},
			delegate: function(a, b, c, d) {
				return this.on(b, a, c, d)
			},
			undelegate: function(a, b, c) {
				return arguments.length == 1 ? this.off(a, "**") : this.off(b, a || "**", c)
			},
			trigger: function(a, b) {
				return this.each(function() {
					p.event.trigger(a, b, this)
				})
			},
			triggerHandler: function(a, b) {
				if (this[0]) return p.event.trigger(a, b, this[0], !0)
			},
			toggle: function(a) {
				var b = arguments,
					c = a.guid || p.guid++,
					d = 0,
					e = function(c) {
						var e = (p._data(this, "lastToggle" + a.guid) || 0) % d;
						return p._data(this, "lastToggle" + a.guid, e + 1), c.preventDefault(), b[e].apply(this, arguments) || !1
					};
				e.guid = c;
				while (d < b.length) b[d++].guid = c;
				return this.click(e)
			},
			hover: function(a, b) {
				return this.mouseenter(a).mouseleave(b || a)
			}
		}), p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(a, b) {
			p.fn[b] = function(a, c) {
				return c == null && (c = a, a = null), arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b)
			}, Y.test(b) && (p.event.fixHooks[b] = p.event.keyHooks), Z.test(b) && (p.event.fixHooks[b] = p.event.mouseHooks)
		}),
		function(a, b) {
			function bd(a, b, c, d) {
				var e = 0,
					f = b.length;
				for (; e < f; e++) Z(a, b[e], c, d)
			}

			function be(a, b, c, d, e, f) {
				var g, h = $.setFilters[b.toLowerCase()];
				return h || Z.error(b), (a || !(g = e)) && bd(a || "*", d, g = [], e), g.length > 0 ? h(g, c, f) : []
			}

			function bf(a, c, d, e, f) {
				var g, h, i, j, k, l, m, n, p = 0,
					q = f.length,
					s = L.POS,
					t = new RegExp("^" + s.source + "(?!" + r + ")", "i"),
					u = function() {
						var a = 1,
							c = arguments.length - 2;
						for (; a < c; a++) arguments[a] === b && (g[a] = b)
					};
				for (; p < q; p++) {
					s.exec(""), a = f[p], j = [], i = 0, k = e;
					while (g = s.exec(a)) {
						n = s.lastIndex = g.index + g[0].length;
						if (n > i) {
							m = a.slice(i, g.index), i = n, l = [c], B.test(m) && (k && (l = k), k = e);
							if (h = H.test(m)) m = m.slice(0, -5).replace(B, "$&*");
							g.length > 1 && g[0].replace(t, u), k = be(m, g[1], g[2], l, k, h)
						}
					}
					k ? (j = j.concat(k), (m = a.slice(i)) && m !== ")" ? B.test(m) ? bd(m, j, d, e) : Z(m, c, d, e ? e.concat(k) : k) : o.apply(d, j)) : Z(a, c, d, e)
				}
				return q === 1 ? d : Z.uniqueSort(d)
			}

			function bg(a, b, c) {
				var d, e, f, g = [],
					i = 0,
					j = D.exec(a),
					k = !j.pop() && !j.pop(),
					l = k && a.match(C) || [""],
					m = $.preFilter,
					n = $.filter,
					o = !c && b !== h;
				for (;
					(e = l[i]) != null && k; i++) {
					g.push(d = []), o && (e = " " + e);
					while (e) {
						k = !1;
						if (j = B.exec(e)) e = e.slice(j[0].length), k = d.push({
							part: j.pop().replace(A, " "),
							captures: j
						});
						for (f in n)(j = L[f].exec(e)) && (!m[f] || (j = m[f](j, b, c))) && (e = e.slice(j.shift().length), k = d.push({
							part: f,
							captures: j
						}));
						if (!k) break
					}
				}
				return k || Z.error(a), g
			}

			function bh(a, b, e) {
				var f = b.dir,
					g = m++;
				return a || (a = function(a) {
					return a === e
				}), b.first ? function(b, c) {
					while (b = b[f])
						if (b.nodeType === 1) return a(b, c) && b
				} : function(b, e) {
					var h, i = g + "." + d,
						j = i + "." + c;
					while (b = b[f])
						if (b.nodeType === 1) {
							if ((h = b[q]) === j) return b.sizset;
							if (typeof h == "string" && h.indexOf(i) === 0) {
								if (b.sizset) return b
							} else {
								b[q] = j;
								if (a(b, e)) return b.sizset = !0, b;
								b.sizset = !1
							}
						}
				}
			}

			function bi(a, b) {
				return a ? function(c, d) {
					var e = b(c, d);
					return e && a(e === !0 ? c : e, d)
				} : b
			}

			function bj(a, b, c) {
				var d, e, f = 0;
				for (; d = a[f]; f++) $.relative[d.part] ? e = bh(e, $.relative[d.part], b) : (d.captures.push(b, c), e = bi(e, $.filter[d.part].apply(null, d.captures)));
				return e
			}

			function bk(a) {
				return function(b, c) {
					var d, e = 0;
					for (; d = a[e]; e++)
						if (d(b, c)) return !0;
					return !1
				}
			}
			var c, d, e, f, g, h = a.document,
				i = h.documentElement,
				j = "undefined",
				k = !1,
				l = !0,
				m = 0,
				n = [].slice,
				o = [].push,
				q = ("sizcache" + Math.random()).replace(".", ""),
				r = "[\\x20\\t\\r\\n\\f]",
				s = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",
				t = s.replace("w", "w#"),
				u = "([*^$|!~]?=)",
				v = "\\[" + r + "*(" + s + ")" + r + "*(?:" + u + r + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + t + ")|)|)" + r + "*\\]",
				w = ":(" + s + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",
				x = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",
				y = r + "*([\\x20\\t\\r\\n\\f>+~])" + r + "*",
				z = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + v + "|" + w.replace(2, 7) + "|[^\\\\(),])+",
				A = new RegExp("^" + r + "+|((?:^|[^\\\\])(?:\\\\.)*)" + r + "+$", "g"),
				B = new RegExp("^" + y),
				C = new RegExp(z + "?(?=" + r + "*,|$)", "g"),
				D = new RegExp("^(?:(?!,)(?:(?:^|,)" + r + "*" + z + ")*?|" + r + "*(.*?))(\\)|$)"),
				E = new RegExp(z.slice(19, -6) + "\\x20\\t\\r\\n\\f>+~])+|" + y, "g"),
				F = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,
				G = /[\x20\t\r\n\f]*[+~]/,
				H = /:not\($/,
				I = /h\d/i,
				J = /input|select|textarea|button/i,
				K = /\\(?!\\)/g,
				L = {
					ID: new RegExp("^#(" + s + ")"),
					CLASS: new RegExp("^\\.(" + s + ")"),
					NAME: new RegExp("^\\[name=['\"]?(" + s + ")['\"]?\\]"),
					TAG: new RegExp("^(" + s.replace("[-", "[-\\*") + ")"),
					ATTR: new RegExp("^" + v),
					PSEUDO: new RegExp("^" + w),
					CHILD: new RegExp("^:(only|nth|last|first)-child(?:\\(" + r + "*(even|odd|(([+-]|)(\\d*)n|)" + r + "*(?:([+-]|)" + r + "*(\\d+)|))" + r + "*\\)|)", "i"),
					POS: new RegExp(x, "ig"),
					needsContext: new RegExp("^" + r + "*[>+~]|" + x, "i")
				},
				M = {},
				N = [],
				O = {},
				P = [],
				Q = function(a) {
					return a.sizzleFilter = !0, a
				},
				R = function(a) {
					return function(b) {
						return b.nodeName.toLowerCase() === "input" && b.type === a
					}
				},
				S = function(a) {
					return function(b) {
						var c = b.nodeName.toLowerCase();
						return (c === "input" || c === "button") && b.type === a
					}
				},
				T = function(a) {
					var b = !1,
						c = h.createElement("div");
					try {
						b = a(c)
					} catch (d) {}
					return c = null, b
				},
				U = T(function(a) {
					a.innerHTML = "<select></select>";
					var b = typeof a.lastChild.getAttribute("multiple");
					return b !== "boolean" && b !== "string"
				}),
				V = T(function(a) {
					a.id = q + 0, a.innerHTML = "<a name='" + q + "'></a><div name='" + q + "'></div>", i.insertBefore(a, i.firstChild);
					var b = h.getElementsByName && h.getElementsByName(q).length === 2 + h.getElementsByName(q + 0).length;
					return g = !h.getElementById(q), i.removeChild(a), b
				}),
				W = T(function(a) {
					return a.appendChild(h.createComment("")), a.getElementsByTagName("*").length === 0
				}),
				X = T(function(a) {
					return a.innerHTML = "<a href='#'></a>", a.firstChild && typeof a.firstChild.getAttribute !== j && a.firstChild.getAttribute("href") === "#"
				}),
				Y = T(function(a) {
					return a.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>", !a.getElementsByClassName || a.getElementsByClassName("e").length === 0 ? !1 : (a.lastChild.className = "e", a.getElementsByClassName("e").length !== 1)
				}),
				Z = function(a, b, c, d) {
					c = c || [], b = b || h;
					var e, f, g, i, j = b.nodeType;
					if (j !== 1 && j !== 9) return [];
					if (!a || typeof a != "string") return c;
					g = ba(b);
					if (!g && !d)
						if (e = F.exec(a))
							if (i = e[1]) {
								if (j === 9) {
									f = b.getElementById(i);
									if (!f || !f.parentNode) return c;
									if (f.id === i) return c.push(f), c
								} else if (b.ownerDocument && (f = b.ownerDocument.getElementById(i)) && bb(b, f) && f.id === i) return c.push(f), c
							} else {
								if (e[2]) return o.apply(c, n.call(b.getElementsByTagName(a), 0)), c;
								if ((i = e[3]) && Y && b.getElementsByClassName) return o.apply(c, n.call(b.getElementsByClassName(i), 0)), c
							}
					return bm(a, b, c, d, g)
				},
				$ = Z.selectors = {
					cacheLength: 50,
					match: L,
					order: ["ID", "TAG"],
					attrHandle: {},
					createPseudo: Q,
					find: {
						ID: g ? function(a, b, c) {
							if (typeof b.getElementById !== j && !c) {
								var d = b.getElementById(a);
								return d && d.parentNode ? [d] : []
							}
						} : function(a, c, d) {
							if (typeof c.getElementById !== j && !d) {
								var e = c.getElementById(a);
								return e ? e.id === a || typeof e.getAttributeNode !== j && e.getAttributeNode("id").value === a ? [e] : b : []
							}
						},
						TAG: W ? function(a, b) {
							if (typeof b.getElementsByTagName !== j) return b.getElementsByTagName(a)
						} : function(a, b) {
							var c = b.getElementsByTagName(a);
							if (a === "*") {
								var d, e = [],
									f = 0;
								for (; d = c[f]; f++) d.nodeType === 1 && e.push(d);
								return e
							}
							return c
						}
					},
					relative: {
						">": {
							dir: "parentNode",
							first: !0
						},
						" ": {
							dir: "parentNode"
						},
						"+": {
							dir: "previousSibling",
							first: !0
						},
						"~": {
							dir: "previousSibling"
						}
					},
					preFilter: {
						ATTR: function(a) {
							return a[1] = a[1].replace(K, ""), a[3] = (a[4] || a[5] || "").replace(K, ""), a[2] === "~=" && (a[3] = " " + a[3] + " "), a.slice(0, 4)
						},
						CHILD: function(a) {
							return a[1] = a[1].toLowerCase(), a[1] === "nth" ? (a[2] || Z.error(a[0]), a[3] = +(a[3] ? a[4] + (a[5] || 1) : 2 * (a[2] === "even" || a[2] === "odd")), a[4] = +(a[6] + a[7] || a[2] === "odd")) : a[2] && Z.error(a[0]), a
						},
						PSEUDO: function(a) {
							var b, c = a[4];
							return L.CHILD.test(a[0]) ? null : (c && (b = D.exec(c)) && b.pop() && (a[0] = a[0].slice(0, b[0].length - c.length - 1), c = b[0].slice(0, -1)), a.splice(2, 3, c || a[3]), a)
						}
					},
					filter: {
						ID: g ? function(a) {
							return a = a.replace(K, ""),
								function(b) {
									return b.getAttribute("id") === a
								}
						} : function(a) {
							return a = a.replace(K, ""),
								function(b) {
									var c = typeof b.getAttributeNode !== j && b.getAttributeNode("id");
									return c && c.value === a
								}
						},
						TAG: function(a) {
							return a === "*" ? function() {
								return !0
							} : (a = a.replace(K, "").toLowerCase(), function(b) {
								return b.nodeName && b.nodeName.toLowerCase() === a
							})
						},
						CLASS: function(a) {
							var b = M[a];
							return b || (b = M[a] = new RegExp("(^|" + r + ")" + a + "(" + r + "|$)"), N.push(a), N.length > $.cacheLength && delete M[N.shift()]),
								function(a) {
									return b.test(a.className || typeof a.getAttribute !== j && a.getAttribute("class") || "")
								}
						},
						ATTR: function(a, b, c) {
							return b ? function(d) {
								var e = Z.attr(d, a),
									f = e + "";
								if (e == null) return b === "!=";
								switch (b) {
									case "=":
										return f === c;
									case "!=":
										return f !== c;
									case "^=":
										return c && f.indexOf(c) === 0;
									case "*=":
										return c && f.indexOf(c) > -1;
									case "$=":
										return c && f.substr(f.length - c.length) === c;
									case "~=":
										return (" " + f + " ").indexOf(c) > -1;
									case "|=":
										return f === c || f.substr(0, c.length + 1) === c + "-"
								}
							} : function(b) {
								return Z.attr(b, a) != null
							}
						},
						CHILD: function(a, b, c, d) {
							if (a === "nth") {
								var e = m++;
								return function(a) {
									var b, f, g = 0,
										h = a;
									if (c === 1 && d === 0) return !0;
									b = a.parentNode;
									if (b && (b[q] !== e || !a.sizset)) {
										for (h = b.firstChild; h; h = h.nextSibling)
											if (h.nodeType === 1) {
												h.sizset = ++g;
												if (h === a) break
											}
										b[q] = e
									}
									return f = a.sizset - d, c === 0 ? f === 0 : f % c === 0 && f / c >= 0
								}
							}
							return function(b) {
								var c = b;
								switch (a) {
									case "only":
									case "first":
										while (c = c.previousSibling)
											if (c.nodeType === 1) return !1;
										if (a === "first") return !0;
										c = b;
									case "last":
										while (c = c.nextSibling)
											if (c.nodeType === 1) return !1;
										return !0
								}
							}
						},
						PSEUDO: function(a, b, c, d) {
							var e = $.pseudos[a] || $.pseudos[a.toLowerCase()];
							return e || Z.error("unsupported pseudo: " + a), e.sizzleFilter ? e(b, c, d) : e
						}
					},
					pseudos: {
						not: Q(function(a, b, c) {
							var d = bl(a.replace(A, "$1"), b, c);
							return function(a) {
								return !d(a)
							}
						}),
						enabled: function(a) {
							return a.disabled === !1
						},
						disabled: function(a) {
							return a.disabled === !0
						},
						checked: function(a) {
							var b = a.nodeName.toLowerCase();
							return b === "input" && !!a.checked || b === "option" && !!a.selected
						},
						selected: function(a) {
							return a.parentNode && a.parentNode.selectedIndex, a.selected === !0
						},
						parent: function(a) {
							return !$.pseudos.empty(a)
						},
						empty: function(a) {
							var b;
							a = a.firstChild;
							while (a) {
								if (a.nodeName > "@" || (b = a.nodeType) === 3 || b === 4) return !1;
								a = a.nextSibling
							}
							return !0
						},
						contains: Q(function(a) {
							return function(b) {
								return (b.textContent || b.innerText || bc(b)).indexOf(a) > -1
							}
						}),
						has: Q(function(a) {
							return function(b) {
								return Z(a, b).length > 0
							}
						}),
						header: function(a) {
							return I.test(a.nodeName)
						},
						text: function(a) {
							var b, c;
							return a.nodeName.toLowerCase() === "input" && (b = a.type) === "text" && ((c = a.getAttribute("type")) == null || c.toLowerCase() === b)
						},
						radio: R("radio"),
						checkbox: R("checkbox"),
						file: R("file"),
						password: R("password"),
						image: R("image"),
						submit: S("submit"),
						reset: S("reset"),
						button: function(a) {
							var b = a.nodeName.toLowerCase();
							return b === "input" && a.type === "button" || b === "button"
						},
						input: function(a) {
							return J.test(a.nodeName)
						},
						focus: function(a) {
							var b = a.ownerDocument;
							return a === b.activeElement && (!b.hasFocus || b.hasFocus()) && (!!a.type || !!a.href)
						},
						active: function(a) {
							return a === a.ownerDocument.activeElement
						}
					},
					setFilters: {
						first: function(a, b, c) {
							return c ? a.slice(1) : [a[0]]
						},
						last: function(a, b, c) {
							var d = a.pop();
							return c ? a : [d]
						},
						even: function(a, b, c) {
							var d = [],
								e = c ? 1 : 0,
								f = a.length;
							for (; e < f; e = e + 2) d.push(a[e]);
							return d
						},
						odd: function(a, b, c) {
							var d = [],
								e = c ? 0 : 1,
								f = a.length;
							for (; e < f; e = e + 2) d.push(a[e]);
							return d
						},
						lt: function(a, b, c) {
							return c ? a.slice(+b) : a.slice(0, +b)
						},
						gt: function(a, b, c) {
							return c ? a.slice(0, +b + 1) : a.slice(+b + 1)
						},
						eq: function(a, b, c) {
							var d = a.splice(+b, 1);
							return c ? a : d
						}
					}
				};
			$.setFilters.nth = $.setFilters.eq, $.filters = $.pseudos, X || ($.attrHandle = {
				href: function(a) {
					return a.getAttribute("href", 2)
				},
				type: function(a) {
					return a.getAttribute("type")
				}
			}), V && ($.order.push("NAME"), $.find.NAME = function(a, b) {
				if (typeof b.getElementsByName !== j) return b.getElementsByName(a)
			}), Y && ($.order.splice(1, 0, "CLASS"), $.find.CLASS = function(a, b, c) {
				if (typeof b.getElementsByClassName !== j && !c) return b.getElementsByClassName(a)
			});
			try {
				n.call(i.childNodes, 0)[0].nodeType
			} catch (_) {
				n = function(a) {
					var b, c = [];
					for (; b = this[a]; a++) c.push(b);
					return c
				}
			}
			var ba = Z.isXML = function(a) {
					var b = a && (a.ownerDocument || a).documentElement;
					return b ? b.nodeName !== "HTML" : !1
				},
				bb = Z.contains = i.compareDocumentPosition ? function(a, b) {
					return !!(a.compareDocumentPosition(b) & 16)
				} : i.contains ? function(a, b) {
					var c = a.nodeType === 9 ? a.documentElement : a,
						d = b.parentNode;
					return a === d || !!(d && d.nodeType === 1 && c.contains && c.contains(d))
				} : function(a, b) {
					while (b = b.parentNode)
						if (b === a) return !0;
					return !1
				},
				bc = Z.getText = function(a) {
					var b, c = "",
						d = 0,
						e = a.nodeType;
					if (e) {
						if (e === 1 || e === 9 || e === 11) {
							if (typeof a.textContent == "string") return a.textContent;
							for (a = a.firstChild; a; a = a.nextSibling) c += bc(a)
						} else if (e === 3 || e === 4) return a.nodeValue
					} else
						for (; b = a[d]; d++) c += bc(b);
					return c
				};
			Z.attr = function(a, b) {
				var c, d = ba(a);
				return d || (b = b.toLowerCase()), $.attrHandle[b] ? $.attrHandle[b](a) : U || d ? a.getAttribute(b) : (c = a.getAttributeNode(b), c ? typeof a[b] == "boolean" ? a[b] ? b : null : c.specified ? c.value : null : null)
			}, Z.error = function(a) {
				throw new Error("Syntax error, unrecognized expression: " + a)
			}, [0, 0].sort(function() {
				return l = 0
			}), i.compareDocumentPosition ? e = function(a, b) {
				return a === b ? (k = !0, 0) : (!a.compareDocumentPosition || !b.compareDocumentPosition ? a.compareDocumentPosition : a.compareDocumentPosition(b) & 4) ? -1 : 1
			} : (e = function(a, b) {
				if (a === b) return k = !0, 0;
				if (a.sourceIndex && b.sourceIndex) return a.sourceIndex - b.sourceIndex;
				var c, d, e = [],
					g = [],
					h = a.parentNode,
					i = b.parentNode,
					j = h;
				if (h === i) return f(a, b);
				if (!h) return -1;
				if (!i) return 1;
				while (j) e.unshift(j), j = j.parentNode;
				j = i;
				while (j) g.unshift(j), j = j.parentNode;
				c = e.length, d = g.length;
				for (var l = 0; l < c && l < d; l++)
					if (e[l] !== g[l]) return f(e[l], g[l]);
				return l === c ? f(a, g[l], -1) : f(e[l], b, 1)
			}, f = function(a, b, c) {
				if (a === b) return c;
				var d = a.nextSibling;
				while (d) {
					if (d === b) return -1;
					d = d.nextSibling
				}
				return 1
			}), Z.uniqueSort = function(a) {
				var b, c = 1;
				if (e) {
					k = l, a.sort(e);
					if (k)
						for (; b = a[c]; c++) b === a[c - 1] && a.splice(c--, 1)
				}
				return a
			};
			var bl = Z.compile = function(a, b, c) {
				var d, e, f, g = O[a];
				if (g && g.context === b) return g;
				e = bg(a, b, c);
				for (f = 0; d = e[f]; f++) e[f] = bj(d, b, c);
				return g = O[a] = bk(e), g.context = b, g.runs = g.dirruns = 0, P.push(a), P.length > $.cacheLength && delete O[P.shift()], g
			};
			Z.matches = function(a, b) {
				return Z(a, null, null, b)
			}, Z.matchesSelector = function(a, b) {
				return Z(b, null, null, [a]).length > 0
			};
			var bm = function(a, b, e, f, g) {
				a = a.replace(A, "$1");
				var h, i, j, k, l, m, p, q, r, s = a.match(C),
					t = a.match(E),
					u = b.nodeType;
				if (L.POS.test(a)) return bf(a, b, e, f, s);
				if (f) h = n.call(f, 0);
				else if (s && s.length === 1) {
					if (t.length > 1 && u === 9 && !g && (s = L.ID.exec(t[0]))) {
						b = $.find.ID(s[1], b, g)[0];
						if (!b) return e;
						a = a.slice(t.shift().length)
					}
					q = (s = G.exec(t[0])) && !s.index && b.parentNode || b, r = t.pop(), m = r.split(":not")[0];
					for (j = 0, k = $.order.length; j < k; j++) {
						p = $.order[j];
						if (s = L[p].exec(m)) {
							h = $.find[p]((s[1] || "").replace(K, ""), q, g);
							if (h == null) continue;
							m === r && (a = a.slice(0, a.length - r.length) + m.replace(L[p], ""), a || o.apply(e, n.call(h, 0)));
							break
						}
					}
				}
				if (a) {
					i = bl(a, b, g), d = i.dirruns++, h == null && (h = $.find.TAG("*", G.test(a) && b.parentNode || b));
					for (j = 0; l = h[j]; j++) c = i.runs++, i(l, b) && e.push(l)
				}
				return e
			};
			h.querySelectorAll && function() {
				var a, b = bm,
					c = /'|\\/g,
					d = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
					e = [],
					f = [":active"],
					g = i.matchesSelector || i.mozMatchesSelector || i.webkitMatchesSelector || i.oMatchesSelector || i.msMatchesSelector;
				T(function(a) {
					a.innerHTML = "<select><option selected></option></select>", a.querySelectorAll("[selected]").length || e.push("\\[" + r + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)"), a.querySelectorAll(":checked").length || e.push(":checked")
				}), T(function(a) {
					a.innerHTML = "<p test=''></p>", a.querySelectorAll("[test^='']").length && e.push("[*^$]=" + r + "*(?:\"\"|'')"), a.innerHTML = "<input type='hidden'>", a.querySelectorAll(":enabled").length || e.push(":enabled", ":disabled")
				}), e = e.length && new RegExp(e.join("|")), bm = function(a, d, f, g, h) {
					if (!g && !h && (!e || !e.test(a)))
						if (d.nodeType === 9) try {
							return o.apply(f, n.call(d.querySelectorAll(a), 0)), f
						} catch (i) {} else if (d.nodeType === 1 && d.nodeName.toLowerCase() !== "object") {
							var j = d.getAttribute("id"),
								k = j || q,
								l = G.test(a) && d.parentNode || d;
							j ? k = k.replace(c, "\\$&") : d.setAttribute("id", k);
							try {
								return o.apply(f, n.call(l.querySelectorAll(a.replace(C, "[id='" + k + "'] $&")), 0)), f
							} catch (i) {} finally {
								j || d.removeAttribute("id")
							}
						}
					return b(a, d, f, g, h)
				}, g && (T(function(b) {
					a = g.call(b, "div");
					try {
						g.call(b, "[test!='']:sizzle"), f.push($.match.PSEUDO)
					} catch (c) {}
				}), f = new RegExp(f.join("|")), Z.matchesSelector = function(b, c) {
					c = c.replace(d, "='$1']");
					if (!ba(b) && !f.test(c) && (!e || !e.test(c))) try {
						var h = g.call(b, c);
						if (h || a || b.document && b.document.nodeType !== 11) return h
					} catch (i) {}
					return Z(c, null, null, [b]).length > 0
				})
			}(), Z.attr = p.attr, p.find = Z, p.expr = Z.selectors, p.expr[":"] = p.expr.pseudos, p.unique = Z.uniqueSort, p.text = Z.getText, p.isXMLDoc = Z.isXML, p.contains = Z.contains
		}(a);
	var bc = /Until$/,
		bd = /^(?:parents|prev(?:Until|All))/,
		be = /^.[^:#\[\.,]*$/,
		bf = p.expr.match.needsContext,
		bg = {
			children: !0,
			contents: !0,
			next: !0,
			prev: !0
		};
	p.fn.extend({
		find: function(a) {
			var b, c, d, e, f, g, h = this;
			if (typeof a != "string") return p(a).filter(function() {
				for (b = 0, c = h.length; b < c; b++)
					if (p.contains(h[b], this)) return !0
			});
			g = this.pushStack("", "find", a);
			for (b = 0, c = this.length; b < c; b++) {
				d = g.length, p.find(a, this[b], g);
				if (b > 0)
					for (e = d; e < g.length; e++)
						for (f = 0; f < d; f++)
							if (g[f] === g[e]) {
								g.splice(e--, 1);
								break
							}
			}
			return g
		},
		has: function(a) {
			var b, c = p(a, this),
				d = c.length;
			return this.filter(function() {
				for (b = 0; b < d; b++)
					if (p.contains(this, c[b])) return !0
			})
		},
		not: function(a) {
			return this.pushStack(bj(this, a, !1), "not", a)
		},
		filter: function(a) {
			return this.pushStack(bj(this, a, !0), "filter", a)
		},
		is: function(a) {
			return !!a && (typeof a == "string" ? bf.test(a) ? p(a, this.context).index(this[0]) >= 0 : p.filter(a, this).length > 0 : this.filter(a).length > 0)
		},
		closest: function(a, b) {
			var c, d = 0,
				e = this.length,
				f = [],
				g = bf.test(a) || typeof a != "string" ? p(a, b || this.context) : 0;
			for (; d < e; d++) {
				c = this[d];
				while (c && c.ownerDocument && c !== b && c.nodeType !== 11) {
					if (g ? g.index(c) > -1 : p.find.matchesSelector(c, a)) {
						f.push(c);
						break
					}
					c = c.parentNode
				}
			}
			return f = f.length > 1 ? p.unique(f) : f, this.pushStack(f, "closest", a)
		},
		index: function(a) {
			return a ? typeof a == "string" ? p.inArray(this[0], p(a)) : p.inArray(a.jquery ? a[0] : a, this) : this[0] && this[0].parentNode ? this.prevAll().length : -1
		},
		add: function(a, b) {
			var c = typeof a == "string" ? p(a, b) : p.makeArray(a && a.nodeType ? [a] : a),
				d = p.merge(this.get(), c);
			return this.pushStack(bh(c[0]) || bh(d[0]) ? d : p.unique(d))
		},
		addBack: function(a) {
			return this.add(a == null ? this.prevObject : this.prevObject.filter(a))
		}
	}), p.fn.andSelf = p.fn.addBack, p.each({
		parent: function(a) {
			var b = a.parentNode;
			return b && b.nodeType !== 11 ? b : null
		},
		parents: function(a) {
			return p.dir(a, "parentNode")
		},
		parentsUntil: function(a, b, c) {
			return p.dir(a, "parentNode", c)
		},
		next: function(a) {
			return bi(a, "nextSibling")
		},
		prev: function(a) {
			return bi(a, "previousSibling")
		},
		nextAll: function(a) {
			return p.dir(a, "nextSibling")
		},
		prevAll: function(a) {
			return p.dir(a, "previousSibling")
		},
		nextUntil: function(a, b, c) {
			return p.dir(a, "nextSibling", c)
		},
		prevUntil: function(a, b, c) {
			return p.dir(a, "previousSibling", c)
		},
		siblings: function(a) {
			return p.sibling((a.parentNode || {}).firstChild, a)
		},
		children: function(a) {
			return p.sibling(a.firstChild)
		},
		contents: function(a) {
			return p.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : p.merge([], a.childNodes)
		}
	}, function(a, b) {
		p.fn[a] = function(c, d) {
			var e = p.map(this, b, c);
			return bc.test(a) || (d = c), d && typeof d == "string" && (e = p.filter(d, e)), e = this.length > 1 && !bg[a] ? p.unique(e) : e, this.length > 1 && bd.test(a) && (e = e.reverse()), this.pushStack(e, a, k.call(arguments).join(","))
		}
	}), p.extend({
		filter: function(a, b, c) {
			return c && (a = ":not(" + a + ")"), b.length === 1 ? p.find.matchesSelector(b[0], a) ? [b[0]] : [] : p.find.matches(a, b)
		},
		dir: function(a, c, d) {
			var e = [],
				f = a[c];
			while (f && f.nodeType !== 9 && (d === b || f.nodeType !== 1 || !p(f).is(d))) f.nodeType === 1 && e.push(f), f = f[c];
			return e
		},
		sibling: function(a, b) {
			var c = [];
			for (; a; a = a.nextSibling) a.nodeType === 1 && a !== b && c.push(a);
			return c
		}
	});
	var bl = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
		bm = / jQuery\d+="(?:null|\d+)"/g,
		bn = /^\s+/,
		bo = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
		bp = /<([\w:]+)/,
		bq = /<tbody/i,
		br = /<|&#?\w+;/,
		bs = /<(?:script|style|link)/i,
		bt = /<(?:script|object|embed|option|style)/i,
		bu = new RegExp("<(?:" + bl + ")[\\s/>]", "i"),
		bv = /^(?:checkbox|radio)$/,
		bw = /checked\s*(?:[^=]|=\s*.checked.)/i,
		bx = /\/(java|ecma)script/i,
		by = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,
		bz = {
			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, "", ""]
		},
		bA = bk(e),
		bB = bA.appendChild(e.createElement("div"));
	bz.optgroup = bz.option, bz.tbody = bz.tfoot = bz.colgroup = bz.caption = bz.thead, bz.th = bz.td, p.support.htmlSerialize || (bz._default = [1, "X<div>", "</div>"]), p.fn.extend({
			text: function(a) {
				return p.access(this, function(a) {
					return a === b ? p.text(this) : this.empty().append((this[0] && this[0].ownerDocument || e).createTextNode(a))
				}, null, a, arguments.length)
			},
			wrapAll: function(a) {
				if (p.isFunction(a)) return this.each(function(b) {
					p(this).wrapAll(a.call(this, b))
				});
				if (this[0]) {
					var b = p(a, this[0].ownerDocument).eq(0).clone(!0);
					this[0].parentNode && b.insertBefore(this[0]), b.map(function() {
						var a = this;
						while (a.firstChild && a.firstChild.nodeType === 1) a = a.firstChild;
						return a
					}).append(this)
				}
				return this
			},
			wrapInner: function(a) {
				return p.isFunction(a) ? this.each(function(b) {
					p(this).wrapInner(a.call(this, b))
				}) : this.each(function() {
					var b = p(this),
						c = b.contents();
					c.length ? c.wrapAll(a) : b.append(a)
				})
			},
			wrap: function(a) {
				var b = p.isFunction(a);
				return this.each(function(c) {
					p(this).wrapAll(b ? a.call(this, c) : a)
				})
			},
			unwrap: function() {
				return this.parent().each(function() {
					p.nodeName(this, "body") || p(this).replaceWith(this.childNodes)
				}).end()
			},
			append: function() {
				return this.domManip(arguments, !0, function(a) {
					(this.nodeType === 1 || this.nodeType === 11) && this.appendChild(a)
				})
			},
			prepend: function() {
				return this.domManip(arguments, !0, function(a) {
					(this.nodeType === 1 || this.nodeType === 11) && this.insertBefore(a, this.firstChild)
				})
			},
			before: function() {
				if (!bh(this[0])) return this.domManip(arguments, !1, function(a) {
					this.parentNode.insertBefore(a, this)
				});
				if (arguments.length) {
					var a = p.clean(arguments);
					return this.pushStack(p.merge(a, this), "before", this.selector)
				}
			},
			after: function() {
				if (!bh(this[0])) return this.domManip(arguments, !1, function(a) {
					this.parentNode.insertBefore(a, this.nextSibling)
				});
				if (arguments.length) {
					var a = p.clean(arguments);
					return this.pushStack(p.merge(this, a), "after", this.selector)
				}
			},
			remove: function(a, b) {
				var c, d = 0;
				for (;
					(c = this[d]) != null; d++)
					if (!a || p.filter(a, [c]).length) !b && c.nodeType === 1 && (p.cleanData(c.getElementsByTagName("*")), p.cleanData([c])), c.parentNode && c.parentNode.removeChild(c);
				return this
			},
			empty: function() {
				var a, b = 0;
				for (;
					(a = this[b]) != null; b++) {
					a.nodeType === 1 && p.cleanData(a.getElementsByTagName("*"));
					while (a.firstChild) a.removeChild(a.firstChild)
				}
				return this
			},
			clone: function(a, b) {
				return a = a == null ? !1 : a, b = b == null ? a : b, this.map(function() {
					return p.clone(this, a, b)
				})
			},
			html: function(a) {
				return p.access(this, function(a) {
					var c = this[0] || {},
						d = 0,
						e = this.length;
					if (a === b) return c.nodeType === 1 ? c.innerHTML.replace(bm, "") : b;
					if (typeof a == "string" && !bs.test(a) && (p.support.htmlSerialize || !bu.test(a)) && (p.support.leadingWhitespace || !bn.test(a)) && !bz[(bp.exec(a) || ["", ""])[1].toLowerCase()]) {
						a = a.replace(bo, "<$1></$2>");
						try {
							for (; d < e; d++) c = this[d] || {}, c.nodeType === 1 && (p.cleanData(c.getElementsByTagName("*")), c.innerHTML = a);
							c = 0
						} catch (f) {}
					}
					c && this.empty().append(a)
				}, null, a, arguments.length)
			},
			replaceWith: function(a) {
				return bh(this[0]) ? this.length ? this.pushStack(p(p.isFunction(a) ? a() : a), "replaceWith", a) : this : p.isFunction(a) ? this.each(function(b) {
					var c = p(this),
						d = c.html();
					c.replaceWith(a.call(this, b, d))
				}) : (typeof a != "string" && (a = p(a).detach()), this.each(function() {
					var b = this.nextSibling,
						c = this.parentNode;
					p(this).remove(), b ? p(b).before(a) : p(c).append(a)
				}))
			},
			detach: function(a) {
				return this.remove(a, !0)
			},
			domManip: function(a, c, d) {
				a = [].concat.apply([], a);
				var e, f, g, h, i = 0,
					j = a[0],
					k = [],
					l = this.length;
				if (!p.support.checkClone && l > 1 && typeof j == "string" && bw.test(j)) return this.each(function() {
					p(this).domManip(a, c, d)
				});
				if (p.isFunction(j)) return this.each(function(e) {
					var f = p(this);
					a[0] = j.call(this, e, c ? f.html() : b), f.domManip(a, c, d)
				});
				if (this[0]) {
					e = p.buildFragment(a, this, k), g = e.fragment, f = g.firstChild, g.childNodes.length === 1 && (g = f);
					if (f) {
						c = c && p.nodeName(f, "tr");
						for (h = e.cacheable || l - 1; i < l; i++) d.call(c && p.nodeName(this[i], "table") ? bC(this[i], "tbody") : this[i], i === h ? g : p.clone(g, !0, !0))
					}
					g = f = null, k.length && p.each(k, function(a, b) {
						b.src ? p.ajax ? p.ajax({
							url: b.src,
							type: "GET",
							dataType: "script",
							async: !1,
							global: !1,
							"throws": !0
						}) : p.error("no ajax") : p.globalEval((b.text || b.textContent || b.innerHTML || "").replace(by, "")), b.parentNode && b.parentNode.removeChild(b)
					})
				}
				return this
			}
		}), p.buildFragment = function(a, c, d) {
			var f, g, h, i = a[0];
			return c = c || e, c = (c[0] || c).ownerDocument || c[0] || c, typeof c.createDocumentFragment == "undefined" && (c = e), a.length === 1 && typeof i == "string" && i.length < 512 && c === e && i.charAt(0) === "<" && !bt.test(i) && (p.support.checkClone || !bw.test(i)) && (p.support.html5Clone || !bu.test(i)) && (g = !0, f = p.fragments[i], h = f !== b), f || (f = c.createDocumentFragment(), p.clean(a, c, f, d), g && (p.fragments[i] = h && f)), {
				fragment: f,
				cacheable: g
			}
		}, p.fragments = {}, p.each({
			appendTo: "append",
			prependTo: "prepend",
			insertBefore: "before",
			insertAfter: "after",
			replaceAll: "replaceWith"
		}, function(a, b) {
			p.fn[a] = function(c) {
				var d, e = 0,
					f = [],
					g = p(c),
					h = g.length,
					i = this.length === 1 && this[0].parentNode;
				if ((i == null || i && i.nodeType === 11 && i.childNodes.length === 1) && h === 1) return g[b](this[0]), this;
				for (; e < h; e++) d = (e > 0 ? this.clone(!0) : this).get(), p(g[e])[b](d), f = f.concat(d);
				return this.pushStack(f, a, g.selector)
			}
		}), p.extend({
			clone: function(a, b, c) {
				var d, e, f, g;
				p.support.html5Clone || p.isXMLDoc(a) || !bu.test("<" + a.nodeName + ">") ? g = a.cloneNode(!0) : (bB.innerHTML = a.outerHTML, bB.removeChild(g = bB.firstChild));
				if ((!p.support.noCloneEvent || !p.support.noCloneChecked) && (a.nodeType === 1 || a.nodeType === 11) && !p.isXMLDoc(a)) {
					bE(a, g), d = bF(a), e = bF(g);
					for (f = 0; d[f]; ++f) e[f] && bE(d[f], e[f])
				}
				if (b) {
					bD(a, g);
					if (c) {
						d = bF(a), e = bF(g);
						for (f = 0; d[f]; ++f) bD(d[f], e[f])
					}
				}
				return d = e = null, g
			},
			clean: function(a, b, c, d) {
				var f, g, h, i, j, k, l, m, n, o, q, r, s = 0,
					t = [];
				if (!b || typeof b.createDocumentFragment == "undefined") b = e;
				for (g = b === e && bA;
					(h = a[s]) != null; s++) {
					typeof h == "number" && (h += "");
					if (!h) continue;
					if (typeof h == "string")
						if (!br.test(h)) h = b.createTextNode(h);
						else {
							g = g || bk(b), l = l || g.appendChild(b.createElement("div")), h = h.replace(bo, "<$1></$2>"), i = (bp.exec(h) || ["", ""])[1].toLowerCase(), j = bz[i] || bz._default, k = j[0], l.innerHTML = j[1] + h + j[2];
							while (k--) l = l.lastChild;
							if (!p.support.tbody) {
								m = bq.test(h), n = i === "table" && !m ? l.firstChild && l.firstChild.childNodes : j[1] === "<table>" && !m ? l.childNodes : [];
								for (f = n.length - 1; f >= 0; --f) p.nodeName(n[f], "tbody") && !n[f].childNodes.length && n[f].parentNode.removeChild(n[f])
							}!p.support.leadingWhitespace && bn.test(h) && l.insertBefore(b.createTextNode(bn.exec(h)[0]), l.firstChild), h = l.childNodes, l = g.lastChild
						}
					h.nodeType ? t.push(h) : t = p.merge(t, h)
				}
				l && (g.removeChild(l), h = l = g = null);
				if (!p.support.appendChecked)
					for (s = 0;
						(h = t[s]) != null; s++) p.nodeName(h, "input") ? bG(h) : typeof h.getElementsByTagName != "undefined" && p.grep(h.getElementsByTagName("input"), bG);
				if (c) {
					q = function(a) {
						if (!a.type || bx.test(a.type)) return d ? d.push(a.parentNode ? a.parentNode.removeChild(a) : a) : c.appendChild(a)
					};
					for (s = 0;
						(h = t[s]) != null; s++)
						if (!p.nodeName(h, "script") || !q(h)) c.appendChild(h), typeof h.getElementsByTagName != "undefined" && (r = p.grep(p.merge([], h.getElementsByTagName("script")), q), t.splice.apply(t, [s + 1, 0].concat(r)), s += r.length)
				}
				return t
			},
			cleanData: function(a, b) {
				var c, d, e, f, g = 0,
					h = p.expando,
					i = p.cache,
					j = p.support.deleteExpando,
					k = p.event.special;
				for (;
					(e = a[g]) != null; g++)
					if (b || p.acceptData(e)) {
						d = e[h], c = d && i[d];
						if (c) {
							if (c.events)
								for (f in c.events) k[f] ? p.event.remove(e, f) : p.removeEvent(e, f, c.handle);
							i[d] && (delete i[d], j ? delete e[h] : e.removeAttribute ? e.removeAttribute(h) : e[h] = null, p.deletedIds.push(d))
						}
					}
			}
		}),
		function() {
			var a, b;
			p.uaMatch = function(a) {
				a = a.toLowerCase();
				var b = /(chrome)[ \/]([\w.]+)/.exec(a) || /(webkit)[ \/]([\w.]+)/.exec(a) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a) || /(msie) ([\w.]+)/.exec(a) || a.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a) || [];
				return {
					browser: b[1] || "",
					version: b[2] || "0"
				}
			}, a = p.uaMatch(g.userAgent), b = {}, a.browser && (b[a.browser] = !0, b.version = a.version), b.webkit && (b.safari = !0), p.browser = b, p.sub = function() {
				function a(b, c) {
					return new a.fn.init(b, c)
				}
				p.extend(!0, a, this), a.superclass = this, a.fn = a.prototype = this(), a.fn.constructor = a, a.sub = this.sub, a.fn.init = function c(c, d) {
					return d && d instanceof p && !(d instanceof a) && (d = a(d)), p.fn.init.call(this, c, d, b)
				}, a.fn.init.prototype = a.fn;
				var b = a(e);
				return a
			}
		}();
	var bH, bI, bJ, bK = /alpha\([^)]*\)/i,
		bL = /opacity=([^)]*)/,
		bM = /^(top|right|bottom|left)$/,
		bN = /^margin/,
		bO = new RegExp("^(" + q + ")(.*)$", "i"),
		bP = new RegExp("^(" + q + ")(?!px)[a-z%]+$", "i"),
		bQ = new RegExp("^([-+])=(" + q + ")", "i"),
		bR = {},
		bS = {
			position: "absolute",
			visibility: "hidden",
			display: "block"
		},
		bT = {
			letterSpacing: 0,
			fontWeight: 400,
			lineHeight: 1
		},
		bU = ["Top", "Right", "Bottom", "Left"],
		bV = ["Webkit", "O", "Moz", "ms"],
		bW = p.fn.toggle;
	p.fn.extend({
		css: function(a, c) {
			return p.access(this, function(a, c, d) {
				return d !== b ? p.style(a, c, d) : p.css(a, c)
			}, a, c, arguments.length > 1)
		},
		show: function() {
			return bZ(this, !0)
		},
		hide: function() {
			return bZ(this)
		},
		toggle: function(a, b) {
			var c = typeof a == "boolean";
			return p.isFunction(a) && p.isFunction(b) ? bW.apply(this, arguments) : this.each(function() {
				(c ? a : bY(this)) ? p(this).show(): p(this).hide()
			})
		}
	}), p.extend({
		cssHooks: {
			opacity: {
				get: function(a, b) {
					if (b) {
						var c = bH(a, "opacity");
						return c === "" ? "1" : c
					}
				}
			}
		},
		cssNumber: {
			fillOpacity: !0,
			fontWeight: !0,
			lineHeight: !0,
			opacity: !0,
			orphans: !0,
			widows: !0,
			zIndex: !0,
			zoom: !0
		},
		cssProps: {
			"float": p.support.cssFloat ? "cssFloat" : "styleFloat"
		},
		style: function(a, c, d, e) {
			if (!a || a.nodeType === 3 || a.nodeType === 8 || !a.style) return;
			var f, g, h, i = p.camelCase(c),
				j = a.style;
			c = p.cssProps[i] || (p.cssProps[i] = bX(j, i)), h = p.cssHooks[c] || p.cssHooks[i];
			if (d === b) return h && "get" in h && (f = h.get(a, !1, e)) !== b ? f : j[c];
			g = typeof d, g === "string" && (f = bQ.exec(d)) && (d = (f[1] + 1) * f[2] + parseFloat(p.css(a, c)), g = "number");
			if (d == null || g === "number" && isNaN(d)) return;
			g === "number" && !p.cssNumber[i] && (d += "px");
			if (!h || !("set" in h) || (d = h.set(a, d, e)) !== b) try {
				j[c] = d
			} catch (k) {}
		},
		css: function(a, c, d, e) {
			var f, g, h, i = p.camelCase(c);
			return c = p.cssProps[i] || (p.cssProps[i] = bX(a.style, i)), h = p.cssHooks[c] || p.cssHooks[i], h && "get" in h && (f = h.get(a, !0, e)), f === b && (f = bH(a, c)), f === "normal" && c in bT && (f = bT[c]), d || e !== b ? (g = parseFloat(f), d || p.isNumeric(g) ? g || 0 : f) : f
		},
		swap: function(a, b, c) {
			var d, e, f = {};
			for (e in b) f[e] = a.style[e], a.style[e] = b[e];
			d = c.call(a);
			for (e in b) a.style[e] = f[e];
			return d
		}
	}), a.getComputedStyle ? bH = function(a, b) {
		var c, d, e, f, g = getComputedStyle(a, null),
			h = a.style;
		return g && (c = g[b], c === "" && !p.contains(a.ownerDocument.documentElement, a) && (c = p.style(a, b)), bP.test(c) && bN.test(b) && (d = h.width, e = h.minWidth, f = h.maxWidth, h.minWidth = h.maxWidth = h.width = c, c = g.width, h.width = d, h.minWidth = e, h.maxWidth = f)), c
	} : e.documentElement.currentStyle && (bH = function(a, b) {
		var c, d, e = a.currentStyle && a.currentStyle[b],
			f = a.style;
		return e == null && f && f[b] && (e = f[b]), bP.test(e) && !bM.test(b) && (c = f.left, d = a.runtimeStyle && a.runtimeStyle.left, d && (a.runtimeStyle.left = a.currentStyle.left), f.left = b === "fontSize" ? "1em" : e, e = f.pixelLeft + "px", f.left = c, d && (a.runtimeStyle.left = d)), e === "" ? "auto" : e
	}), p.each(["height", "width"], function(a, b) {
		p.cssHooks[b] = {
			get: function(a, c, d) {
				if (c) return a.offsetWidth !== 0 || bH(a, "display") !== "none" ? ca(a, b, d) : p.swap(a, bS, function() {
					return ca(a, b, d)
				})
			},
			set: function(a, c, d) {
				return b$(a, c, d ? b_(a, b, d, p.support.boxSizing && p.css(a, "boxSizing") === "border-box") : 0)
			}
		}
	}), p.support.opacity || (p.cssHooks.opacity = {
		get: function(a, b) {
			return bL.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : b ? "1" : ""
		},
		set: function(a, b) {
			var c = a.style,
				d = a.currentStyle,
				e = p.isNumeric(b) ? "alpha(opacity=" + b * 100 + ")" : "",
				f = d && d.filter || c.filter || "";
			c.zoom = 1;
			if (b >= 1 && p.trim(f.replace(bK, "")) === "" && c.removeAttribute) {
				c.removeAttribute("filter");
				if (d && !d.filter) return
			}
			c.filter = bK.test(f) ? f.replace(bK, e) : f + " " + e
		}
	}), p(function() {
		p.support.reliableMarginRight || (p.cssHooks.marginRight = {
			get: function(a, b) {
				return p.swap(a, {
					display: "inline-block"
				}, function() {
					if (b) return bH(a, "marginRight")
				})
			}
		}), !p.support.pixelPosition && p.fn.position && p.each(["top", "left"], function(a, b) {
			p.cssHooks[b] = {
				get: function(a, c) {
					if (c) {
						var d = bH(a, b);
						return bP.test(d) ? p(a).position()[b] + "px" : d
					}
				}
			}
		})
	}), p.expr && p.expr.filters && (p.expr.filters.hidden = function(a) {
		return a.offsetWidth === 0 && a.offsetHeight === 0 || !p.support.reliableHiddenOffsets && (a.style && a.style.display || bH(a, "display")) === "none"
	}, p.expr.filters.visible = function(a) {
		return !p.expr.filters.hidden(a)
	}), p.each({
		margin: "",
		padding: "",
		border: "Width"
	}, function(a, b) {
		p.cssHooks[a + b] = {
			expand: function(c) {
				var d, e = typeof c == "string" ? c.split(" ") : [c],
					f = {};
				for (d = 0; d < 4; d++) f[a + bU[d] + b] = e[d] || e[d - 2] || e[0];
				return f
			}
		}, bN.test(a) || (p.cssHooks[a + b].set = b$)
	});
	var cc = /%20/g,
		cd = /\[\]$/,
		ce = /\r?\n/g,
		cf = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
		cg = /^(?:select|textarea)/i;
	p.fn.extend({
		serialize: function() {
			return p.param(this.serializeArray())
		},
		serializeArray: function() {
			return this.map(function() {
				return this.elements ? p.makeArray(this.elements) : this
			}).filter(function() {
				return this.name && !this.disabled && (this.checked || cg.test(this.nodeName) || cf.test(this.type))
			}).map(function(a, b) {
				var c = p(this).val();
				return c == null ? null : p.isArray(c) ? p.map(c, function(a, c) {
					return {
						name: b.name,
						value: a.replace(ce, "\r\n")
					}
				}) : {
					name: b.name,
					value: c.replace(ce, "\r\n")
				}
			}).get()
		}
	}), p.param = function(a, c) {
		var d, e = [],
			f = function(a, b) {
				b = p.isFunction(b) ? b() : b == null ? "" : b, e[e.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
			};
		c === b && (c = p.ajaxSettings && p.ajaxSettings.traditional);
		if (p.isArray(a) || a.jquery && !p.isPlainObject(a)) p.each(a, function() {
			f(this.name, this.value)
		});
		else
			for (d in a) ch(d, a[d], c, f);
		return e.join("&").replace(cc, "+")
	};
	var ci, cj, ck = /#.*$/,
		cl = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
		cm = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
		cn = /^(?:GET|HEAD)$/,
		co = /^\/\//,
		cp = /\?/,
		cq = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
		cr = /([?&])_=[^&]*/,
		cs = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
		ct = p.fn.load,
		cu = {},
		cv = {},
		cw = ["*/"] + ["*"];
	try {
		ci = f.href
	} catch (cx) {
		ci = e.createElement("a"), ci.href = "", ci = ci.href
	}
	cj = cs.exec(ci.toLowerCase()) || [], p.fn.load = function(a, c, d) {
		if (typeof a != "string" && ct) return ct.apply(this, arguments);
		if (!this.length) return this;
		var e, f, g, h = this,
			i = a.indexOf(" ");
		return i >= 0 && (e = a.slice(i, a.length), a = a.slice(0, i)), p.isFunction(c) ? (d = c, c = b) : typeof c == "object" && (f = "POST"), p.ajax({
			url: a,
			type: f,
			dataType: "html",
			data: c,
			complete: function(a, b) {
				d && h.each(d, g || [a.responseText, b, a])
			}
		}).done(function(a) {
			g = arguments, h.html(e ? p("<div>").append(a.replace(cq, "")).find(e) : a)
		}), this
	}, p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(a, b) {
		p.fn[b] = function(a) {
			return this.on(b, a)
		}
	}), p.each(["get", "post"], function(a, c) {
		p[c] = function(a, d, e, f) {
			return p.isFunction(d) && (f = f || e, e = d, d = b), p.ajax({
				type: c,
				url: a,
				data: d,
				success: e,
				dataType: f
			})
		}
	}), p.extend({
		getScript: function(a, c) {
			return p.get(a, b, c, "script")
		},
		getJSON: function(a, b, c) {
			return p.get(a, b, c, "json")
		},
		ajaxSetup: function(a, b) {
			return b ? cA(a, p.ajaxSettings) : (b = a, a = p.ajaxSettings), cA(a, b), a
		},
		ajaxSettings: {
			url: ci,
			isLocal: cm.test(cj[1]),
			global: !0,
			type: "GET",
			contentType: "application/x-www-form-urlencoded; charset=UTF-8",
			processData: !0,
			async: !0,
			accepts: {
				xml: "application/xml, text/xml",
				html: "text/html",
				text: "text/plain",
				json: "application/json, text/javascript",
				"*": cw
			},
			contents: {
				xml: /xml/,
				html: /html/,
				json: /json/
			},
			responseFields: {
				xml: "responseXML",
				text: "responseText"
			},
			converters: {
				"* text": a.String,
				"text html": !0,
				"text json": p.parseJSON,
				"text xml": p.parseXML
			},
			flatOptions: {
				context: !0,
				url: !0
			}
		},
		ajaxPrefilter: cy(cu),
		ajaxTransport: cy(cv),
		ajax: function(a, c) {
			function y(a, c, f, i) {
				var k, s, t, u, w, y = c;
				if (v === 2) return;
				v = 2, h && clearTimeout(h), g = b, e = i || "", x.readyState = a > 0 ? 4 : 0, f && (u = cB(l, x, f));
				if (a >= 200 && a < 300 || a === 304) l.ifModified && (w = x.getResponseHeader("Last-Modified"), w && (p.lastModified[d] = w), w = x.getResponseHeader("Etag"), w && (p.etag[d] = w)), a === 304 ? (y = "notmodified", k = !0) : (k = cC(l, u), y = k.state, s = k.data, t = k.error, k = !t);
				else {
					t = y;
					if (!y || a) y = "error", a < 0 && (a = 0)
				}
				x.status = a, x.statusText = "" + (c || y), k ? o.resolveWith(m, [s, y, x]) : o.rejectWith(m, [x, y, t]), x.statusCode(r), r = b, j && n.trigger("ajax" + (k ? "Success" : "Error"), [x, l, k ? s : t]), q.fireWith(m, [x, y]), j && (n.trigger("ajaxComplete", [x, l]), --p.active || p.event.trigger("ajaxStop"))
			}
			typeof a == "object" && (c = a, a = b), c = c || {};
			var d, e, f, g, h, i, j, k, l = p.ajaxSetup({}, c),
				m = l.context || l,
				n = m !== l && (m.nodeType || m instanceof p) ? p(m) : p.event,
				o = p.Deferred(),
				q = p.Callbacks("once memory"),
				r = l.statusCode || {},
				t = {},
				u = {},
				v = 0,
				w = "canceled",
				x = {
					readyState: 0,
					setRequestHeader: function(a, b) {
						if (!v) {
							var c = a.toLowerCase();
							a = u[c] = u[c] || a, t[a] = b
						}
						return this
					},
					getAllResponseHeaders: function() {
						return v === 2 ? e : null
					},
					getResponseHeader: function(a) {
						var c;
						if (v === 2) {
							if (!f) {
								f = {};
								while (c = cl.exec(e)) f[c[1].toLowerCase()] = c[2]
							}
							c = f[a.toLowerCase()]
						}
						return c === b ? null : c
					},
					overrideMimeType: function(a) {
						return v || (l.mimeType = a), this
					},
					abort: function(a) {
						return a = a || w, g && g.abort(a), y(0, a), this
					}
				};
			o.promise(x), x.success = x.done, x.error = x.fail, x.complete = q.add, x.statusCode = function(a) {
				if (a) {
					var b;
					if (v < 2)
						for (b in a) r[b] = [r[b], a[b]];
					else b = a[x.status], x.always(b)
				}
				return this
			}, l.url = ((a || l.url) + "").replace(ck, "").replace(co, cj[1] + "//"), l.dataTypes = p.trim(l.dataType || "*").toLowerCase().split(s), l.crossDomain == null && (i = cs.exec(l.url.toLowerCase()), l.crossDomain = !(!i || i[1] == cj[1] && i[2] == cj[2] && (i[3] || (i[1] === "http:" ? 80 : 443)) == (cj[3] || (cj[1] === "http:" ? 80 : 443)))), l.data && l.processData && typeof l.data != "string" && (l.data = p.param(l.data, l.traditional)), cz(cu, l, c, x);
			if (v === 2) return x;
			j = l.global, l.type = l.type.toUpperCase(), l.hasContent = !cn.test(l.type), j && p.active++ === 0 && p.event.trigger("ajaxStart");
			if (!l.hasContent) {
				l.data && (l.url += (cp.test(l.url) ? "&" : "?") + l.data, delete l.data), d = l.url;
				if (l.cache === !1) {
					var z = p.now(),
						A = l.url.replace(cr, "$1_=" + z);
					l.url = A + (A === l.url ? (cp.test(l.url) ? "&" : "?") + "_=" + z : "")
				}
			}(l.data && l.hasContent && l.contentType !== !1 || c.contentType) && x.setRequestHeader("Content-Type", l.contentType), l.ifModified && (d = d || l.url, p.lastModified[d] && x.setRequestHeader("If-Modified-Since", p.lastModified[d]), p.etag[d] && x.setRequestHeader("If-None-Match", p.etag[d])), x.setRequestHeader("Accept", l.dataTypes[0] && l.accepts[l.dataTypes[0]] ? l.accepts[l.dataTypes[0]] + (l.dataTypes[0] !== "*" ? ", " + cw + "; q=0.01" : "") : l.accepts["*"]);
			for (k in l.headers) x.setRequestHeader(k, l.headers[k]);
			if (!l.beforeSend || l.beforeSend.call(m, x, l) !== !1 && v !== 2) {
				w = "abort";
				for (k in {
						success: 1,
						error: 1,
						complete: 1
					}) x[k](l[k]);
				g = cz(cv, l, c, x);
				if (!g) y(-1, "No Transport");
				else {
					x.readyState = 1, j && n.trigger("ajaxSend", [x, l]), l.async && l.timeout > 0 && (h = setTimeout(function() {
						x.abort("timeout")
					}, l.timeout));
					try {
						v = 1, g.send(t, y)
					} catch (B) {
						if (v < 2) y(-1, B);
						else throw B
					}
				}
				return x
			}
			return x.abort()
		},
		active: 0,
		lastModified: {},
		etag: {}
	});
	var cD = [],
		cE = /\?/,
		cF = /(=)\?(?=&|$)|\?\?/,
		cG = p.now();
	p.ajaxSetup({
		jsonp: "callback",
		jsonpCallback: function() {
			var a = cD.pop() || p.expando + "_" + cG++;
			return this[a] = !0, a
		}
	}), p.ajaxPrefilter("json jsonp", function(c, d, e) {
		var f, g, h, i = c.data,
			j = c.url,
			k = c.jsonp !== !1,
			l = k && cF.test(j),
			m = k && !l && typeof i == "string" && !(c.contentType || "").indexOf("application/x-www-form-urlencoded") && cF.test(i);
		if (c.dataTypes[0] === "jsonp" || l || m) return f = c.jsonpCallback = p.isFunction(c.jsonpCallback) ? c.jsonpCallback() : c.jsonpCallback, g = a[f], l ? c.url = j.replace(cF, "$1" + f) : m ? c.data = i.replace(cF, "$1" + f) : k && (c.url += (cE.test(j) ? "&" : "?") + c.jsonp + "=" + f), c.converters["script json"] = function() {
			return h || p.error(f + " was not called"), h[0]
		}, c.dataTypes[0] = "json", a[f] = function() {
			h = arguments
		}, e.always(function() {
			a[f] = g, c[f] && (c.jsonpCallback = d.jsonpCallback, cD.push(f)), h && p.isFunction(g) && g(h[0]), h = g = b
		}), "script"
	}), p.ajaxSetup({
		accepts: {
			script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
		},
		contents: {
			script: /javascript|ecmascript/
		},
		converters: {
			"text script": function(a) {
				return p.globalEval(a), a
			}
		}
	}), p.ajaxPrefilter("script", function(a) {
		a.cache === b && (a.cache = !1), a.crossDomain && (a.type = "GET", a.global = !1)
	}), p.ajaxTransport("script", function(a) {
		if (a.crossDomain) {
			var c, d = e.head || e.getElementsByTagName("head")[0] || e.documentElement;
			return {
				send: function(f, g) {
					c = e.createElement("script"), c.async = "async", a.scriptCharset && (c.charset = a.scriptCharset), c.src = a.url, c.onload = c.onreadystatechange = function(a, e) {
						if (e || !c.readyState || /loaded|complete/.test(c.readyState)) c.onload = c.onreadystatechange = null, d && c.parentNode && d.removeChild(c), c = b, e || g(200, "success")
					}, d.insertBefore(c, d.firstChild)
				},
				abort: function() {
					c && c.onload(0, 1)
				}
			}
		}
	});
	var cH, cI = a.ActiveXObject ? function() {
			for (var a in cH) cH[a](0, 1)
		} : !1,
		cJ = 0;
	p.ajaxSettings.xhr = a.ActiveXObject ? function() {
			return !this.isLocal && cK() || cL()
		} : cK,
		function(a) {
			p.extend(p.support, {
				ajax: !!a,
				cors: !!a && "withCredentials" in a
			})
		}(p.ajaxSettings.xhr()), p.support.ajax && p.ajaxTransport(function(c) {
			if (!c.crossDomain || p.support.cors) {
				var d;
				return {
					send: function(e, f) {
						var g, h, i = c.xhr();
						c.username ? i.open(c.type, c.url, c.async, c.username, c.password) : i.open(c.type, c.url, c.async);
						if (c.xhrFields)
							for (h in c.xhrFields) i[h] = c.xhrFields[h];
						c.mimeType && i.overrideMimeType && i.overrideMimeType(c.mimeType), !c.crossDomain && !e["X-Requested-With"] && (e["X-Requested-With"] = "XMLHttpRequest");
						try {
							for (h in e) i.setRequestHeader(h, e[h])
						} catch (j) {}
						i.send(c.hasContent && c.data || null), d = function(a, e) {
							var h, j, k, l, m;
							try {
								if (d && (e || i.readyState === 4)) {
									d = b, g && (i.onreadystatechange = p.noop, cI && delete cH[g]);
									if (e) i.readyState !== 4 && i.abort();
									else {
										h = i.status, k = i.getAllResponseHeaders(), l = {}, m = i.responseXML, m && m.documentElement && (l.xml = m);
										try {
											l.text = i.responseText
										} catch (a) {}
										try {
											j = i.statusText
										} catch (n) {
											j = ""
										}!h && c.isLocal && !c.crossDomain ? h = l.text ? 200 : 404 : h === 1223 && (h = 204)
									}
								}
							} catch (o) {
								e || f(-1, o)
							}
							l && f(h, j, l, k)
						}, c.async ? i.readyState === 4 ? setTimeout(d, 0) : (g = ++cJ, cI && (cH || (cH = {}, p(a).unload(cI)), cH[g] = d), i.onreadystatechange = d) : d()
					},
					abort: function() {
						d && d(0, 1)
					}
				}
			}
		});
	var cM, cN, cO = /^(?:toggle|show|hide)$/,
		cP = new RegExp("^(?:([-+])=|)(" + q + ")([a-z%]*)$", "i"),
		cQ = /queueHooks$/,
		cR = [cX],
		cS = {
			"*": [function(a, b) {
				var c, d, e, f = this.createTween(a, b),
					g = cP.exec(b),
					h = f.cur(),
					i = +h || 0,
					j = 1;
				if (g) {
					c = +g[2], d = g[3] || (p.cssNumber[a] ? "" : "px");
					if (d !== "px" && i) {
						i = p.css(f.elem, a, !0) || c || 1;
						do e = j = j || ".5", i = i / j, p.style(f.elem, a, i + d), j = f.cur() / h; while (j !== 1 && j !== e)
					}
					f.unit = d, f.start = i, f.end = g[1] ? i + (g[1] + 1) * c : c
				}
				return f
			}]
		};
	p.Animation = p.extend(cV, {
		tweener: function(a, b) {
			p.isFunction(a) ? (b = a, a = ["*"]) : a = a.split(" ");
			var c, d = 0,
				e = a.length;
			for (; d < e; d++) c = a[d], cS[c] = cS[c] || [], cS[c].unshift(b)
		},
		prefilter: function(a, b) {
			b ? cR.unshift(a) : cR.push(a)
		}
	}), p.Tween = cY, cY.prototype = {
		constructor: cY,
		init: function(a, b, c, d, e, f) {
			this.elem = a, this.prop = c, this.easing = e || "swing", this.options = b, this.start = this.now = this.cur(), this.end = d, this.unit = f || (p.cssNumber[c] ? "" : "px")
		},
		cur: function() {
			var a = cY.propHooks[this.prop];
			return a && a.get ? a.get(this) : cY.propHooks._default.get(this)
		},
		run: function(a) {
			var b, c = cY.propHooks[this.prop];
			return this.pos = b = p.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration), this.now = (this.end - this.start) * b + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), c && c.set ? c.set(this) : cY.propHooks._default.set(this), this
		}
	}, cY.prototype.init.prototype = cY.prototype, cY.propHooks = {
		_default: {
			get: function(a) {
				var b;
				return a.elem[a.prop] == null || !!a.elem.style && a.elem.style[a.prop] != null ? (b = p.css(a.elem, a.prop, !1, ""), !b || b === "auto" ? 0 : b) : a.elem[a.prop]
			},
			set: function(a) {
				p.fx.step[a.prop] ? p.fx.step[a.prop](a) : a.elem.style && (a.elem.style[p.cssProps[a.prop]] != null || p.cssHooks[a.prop]) ? p.style(a.elem, a.prop, a.now + a.unit) : a.elem[a.prop] = a.now
			}
		}
	}, cY.propHooks.scrollTop = cY.propHooks.scrollLeft = {
		set: function(a) {
			a.elem.nodeType && a.elem.parentNode && (a.elem[a.prop] = a.now)
		}
	}, p.each(["toggle", "show", "hide"], function(a, b) {
		var c = p.fn[b];
		p.fn[b] = function(d, e, f) {
			return d == null || typeof d == "boolean" || !a && p.isFunction(d) && p.isFunction(e) ? c.apply(this, arguments) : this.animate(cZ(b, !0), d, e, f)
		}
	}), p.fn.extend({
		fadeTo: function(a, b, c, d) {
			return this.filter(bY).css("opacity", 0).show().end().animate({
				opacity: b
			}, a, c, d)
		},
		animate: function(a, b, c, d) {
			var e = p.isEmptyObject(a),
				f = p.speed(b, c, d),
				g = function() {
					var b = cV(this, p.extend({}, a), f);
					e && b.stop(!0)
				};
			return e || f.queue === !1 ? this.each(g) : this.queue(f.queue, g)
		},
		stop: function(a, c, d) {
			var e = function(a) {
				var b = a.stop;
				delete a.stop, b(d)
			};
			return typeof a != "string" && (d = c, c = a, a = b), c && a !== !1 && this.queue(a || "fx", []), this.each(function() {
				var b = !0,
					c = a != null && a + "queueHooks",
					f = p.timers,
					g = p._data(this);
				if (c) g[c] && g[c].stop && e(g[c]);
				else
					for (c in g) g[c] && g[c].stop && cQ.test(c) && e(g[c]);
				for (c = f.length; c--;) f[c].elem === this && (a == null || f[c].queue === a) && (f[c].anim.stop(d), b = !1, f.splice(c, 1));
				(b || !d) && p.dequeue(this, a)
			})
		}
	}), p.each({
		slideDown: cZ("show"),
		slideUp: cZ("hide"),
		slideToggle: cZ("toggle"),
		fadeIn: {
			opacity: "show"
		},
		fadeOut: {
			opacity: "hide"
		},
		fadeToggle: {
			opacity: "toggle"
		}
	}, function(a, b) {
		p.fn[a] = function(a, c, d) {
			return this.animate(b, a, c, d)
		}
	}), p.speed = function(a, b, c) {
		var d = a && typeof a == "object" ? p.extend({}, a) : {
			complete: c || !c && b || p.isFunction(a) && a,
			duration: a,
			easing: c && b || b && !p.isFunction(b) && b
		};
		d.duration = p.fx.off ? 0 : typeof d.duration == "number" ? d.duration : d.duration in p.fx.speeds ? p.fx.speeds[d.duration] : p.fx.speeds._default;
		if (d.queue == null || d.queue === !0) d.queue = "fx";
		return d.old = d.complete, d.complete = function() {
			p.isFunction(d.old) && d.old.call(this), d.queue && p.dequeue(this, d.queue)
		}, d
	}, p.easing = {
		linear: function(a) {
			return a
		},
		swing: function(a) {
			return .5 - Math.cos(a * Math.PI) / 2
		}
	}, p.timers = [], p.fx = cY.prototype.init, p.fx.tick = function() {
		var a, b = p.timers,
			c = 0;
		for (; c < b.length; c++) a = b[c], !a() && b[c] === a && b.splice(c--, 1);
		b.length || p.fx.stop()
	}, p.fx.timer = function(a) {
		a() && p.timers.push(a) && !cN && (cN = setInterval(p.fx.tick, p.fx.interval))
	}, p.fx.interval = 13, p.fx.stop = function() {
		clearInterval(cN), cN = null
	}, p.fx.speeds = {
		slow: 600,
		fast: 200,
		_default: 400
	}, p.fx.step = {}, p.expr && p.expr.filters && (p.expr.filters.animated = function(a) {
		return p.grep(p.timers, function(b) {
			return a === b.elem
		}).length
	});
	var c$ = /^(?:body|html)$/i;
	p.fn.offset = function(a) {
		if (arguments.length) return a === b ? this : this.each(function(b) {
			p.offset.setOffset(this, a, b)
		});
		var c, d, e, f, g, h, i, j, k, l, m = this[0],
			n = m && m.ownerDocument;
		if (!n) return;
		return (e = n.body) === m ? p.offset.bodyOffset(m) : (d = n.documentElement, p.contains(d, m) ? (c = m.getBoundingClientRect(), f = c_(n), g = d.clientTop || e.clientTop || 0, h = d.clientLeft || e.clientLeft || 0, i = f.pageYOffset || d.scrollTop, j = f.pageXOffset || d.scrollLeft, k = c.top + i - g, l = c.left + j - h, {
			top: k,
			left: l
		}) : {
			top: 0,
			left: 0
		})
	}, p.offset = {
		bodyOffset: function(a) {
			var b = a.offsetTop,
				c = a.offsetLeft;
			return p.support.doesNotIncludeMarginInBodyOffset && (b += parseFloat(p.css(a, "marginTop")) || 0, c += parseFloat(p.css(a, "marginLeft")) || 0), {
				top: b,
				left: c
			}
		},
		setOffset: function(a, b, c) {
			var d = p.css(a, "position");
			d === "static" && (a.style.position = "relative");
			var e = p(a),
				f = e.offset(),
				g = p.css(a, "top"),
				h = p.css(a, "left"),
				i = (d === "absolute" || d === "fixed") && p.inArray("auto", [g, h]) > -1,
				j = {},
				k = {},
				l, m;
			i ? (k = e.position(), l = k.top, m = k.left) : (l = parseFloat(g) || 0, m = parseFloat(h) || 0), p.isFunction(b) && (b = b.call(a, c, f)), b.top != null && (j.top = b.top - f.top + l), b.left != null && (j.left = b.left - f.left + m), "using" in b ? b.using.call(a, j) : e.css(j)
		}
	}, p.fn.extend({
		position: function() {
			if (!this[0]) return;
			var a = this[0],
				b = this.offsetParent(),
				c = this.offset(),
				d = c$.test(b[0].nodeName) ? {
					top: 0,
					left: 0
				} : b.offset();
			return c.top -= parseFloat(p.css(a, "marginTop")) || 0, c.left -= parseFloat(p.css(a, "marginLeft")) || 0, d.top += parseFloat(p.css(b[0], "borderTopWidth")) || 0, d.left += parseFloat(p.css(b[0], "borderLeftWidth")) || 0, {
				top: c.top - d.top,
				left: c.left - d.left
			}
		},
		offsetParent: function() {
			return this.map(function() {
				var a = this.offsetParent || e.body;
				while (a && !c$.test(a.nodeName) && p.css(a, "position") === "static") a = a.offsetParent;
				return a || e.body
			})
		}
	}), p.each({
		scrollLeft: "pageXOffset",
		scrollTop: "pageYOffset"
	}, function(a, c) {
		var d = /Y/.test(c);
		p.fn[a] = function(e) {
			return p.access(this, function(a, e, f) {
				var g = c_(a);
				if (f === b) return g ? c in g ? g[c] : g.document.documentElement[e] : a[e];
				g ? g.scrollTo(d ? p(g).scrollLeft() : f, d ? f : p(g).scrollTop()) : a[e] = f
			}, a, e, arguments.length, null)
		}
	}), p.each({
		Height: "height",
		Width: "width"
	}, function(a, c) {
		p.each({
			padding: "inner" + a,
			content: c,
			"": "outer" + a
		}, function(d, e) {
			p.fn[e] = function(e, f) {
				var g = arguments.length && (d || typeof e != "boolean"),
					h = d || (e === !0 || f === !0 ? "margin" : "border");
				return p.access(this, function(c, d, e) {
					var f;
					return p.isWindow(c) ? c.document.documentElement["client" + a] : c.nodeType === 9 ? (f = c.documentElement, Math.max(c.body["scroll" + a], f["scroll" + a], c.body["offset" + a], f["offset" + a], f["client" + a])) : e === b ? p.css(c, d, e, h) : p.style(c, d, e, h)
				}, c, g ? e : b, g)
			}
		})
	}), a.jQuery = a.$ = p, typeof define == "function" && define.amd && define.amd.jQuery && define("jquery", [], function() {
		return p
	})
})(window);
(function(a, b) {
	function c(b, c) {
		var e = b.nodeName.toLowerCase();
		if ("area" === e) {
			var f = b.parentNode,
				g = f.name,
				h;
			return !b.href || !g || f.nodeName.toLowerCase() !== "map" ? !1 : (h = a("img[usemap=#" + g + "]")[0], !!h && d(h))
		}
		return (/input|select|textarea|button|object/.test(e) ? !b.disabled : "a" == e ? b.href || c : c) && d(b)
	}

	function d(b) {
		return !a(b).parents().andSelf().filter(function() {
			return a.curCSS(this, "visibility") === "hidden" || a.expr.filters.hidden(this)
		}).length
	}
	a.ui = a.ui || {};
	if (a.ui.version) return;
	a.extend(a.ui, {
		version: "1.8.23",
		keyCode: {
			ALT: 18,
			BACKSPACE: 8,
			CAPS_LOCK: 20,
			COMMA: 188,
			COMMAND: 91,
			COMMAND_LEFT: 91,
			COMMAND_RIGHT: 93,
			CONTROL: 17,
			DELETE: 46,
			DOWN: 40,
			END: 35,
			ENTER: 13,
			ESCAPE: 27,
			HOME: 36,
			INSERT: 45,
			LEFT: 37,
			MENU: 93,
			NUMPAD_ADD: 107,
			NUMPAD_DECIMAL: 110,
			NUMPAD_DIVIDE: 111,
			NUMPAD_ENTER: 108,
			NUMPAD_MULTIPLY: 106,
			NUMPAD_SUBTRACT: 109,
			PAGE_DOWN: 34,
			PAGE_UP: 33,
			PERIOD: 190,
			RIGHT: 39,
			SHIFT: 16,
			SPACE: 32,
			TAB: 9,
			UP: 38,
			WINDOWS: 91
		}
	}), a.fn.extend({
		propAttr: a.fn.prop || a.fn.attr,
		_focus: a.fn.focus,
		focus: function(b, c) {
			return typeof b == "number" ? this.each(function() {
				var d = this;
				setTimeout(function() {
					a(d).focus(), c && c.call(d)
				}, b)
			}) : this._focus.apply(this, arguments)
		},
		scrollParent: function() {
			var b;
			return a.browser.msie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? b = this.parents().filter(function() {
				return /(relative|absolute|fixed)/.test(a.curCSS(this, "position", 1)) && /(auto|scroll)/.test(a.curCSS(this, "overflow", 1) + a.curCSS(this, "overflow-y", 1) + a.curCSS(this, "overflow-x", 1))
			}).eq(0) : b = this.parents().filter(function() {
				return /(auto|scroll)/.test(a.curCSS(this, "overflow", 1) + a.curCSS(this, "overflow-y", 1) + a.curCSS(this, "overflow-x", 1))
			}).eq(0), /fixed/.test(this.css("position")) || !b.length ? a(document) : b
		},
		zIndex: function(c) {
			if (c !== b) return this.css("zIndex", c);
			if (this.length) {
				var d = a(this[0]),
					e, f;
				while (d.length && d[0] !== document) {
					e = d.css("position");
					if (e === "absolute" || e === "relative" || e === "fixed") {
						f = parseInt(d.css("zIndex"), 10);
						if (!isNaN(f) && f !== 0) return f
					}
					d = d.parent()
				}
			}
			return 0
		},
		disableSelection: function() {
			return this.bind((a.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function(a) {
				a.preventDefault()
			})
		},
		enableSelection: function() {
			return this.unbind(".ui-disableSelection")
		}
	}), a("<a>").outerWidth(1).jquery || a.each(["Width", "Height"], function(c, d) {
		function h(b, c, d, f) {
			return a.each(e, function() {
				c -= parseFloat(a.curCSS(b, "padding" + this, !0)) || 0, d && (c -= parseFloat(a.curCSS(b, "border" + this + "Width", !0)) || 0), f && (c -= parseFloat(a.curCSS(b, "margin" + this, !0)) || 0)
			}), c
		}
		var e = d === "Width" ? ["Left", "Right"] : ["Top", "Bottom"],
			f = d.toLowerCase(),
			g = {
				innerWidth: a.fn.innerWidth,
				innerHeight: a.fn.innerHeight,
				outerWidth: a.fn.outerWidth,
				outerHeight: a.fn.outerHeight
			};
		a.fn["inner" + d] = function(c) {
			return c === b ? g["inner" + d].call(this) : this.each(function() {
				a(this).css(f, h(this, c) + "px")
			})
		}, a.fn["outer" + d] = function(b, c) {
			return typeof b != "number" ? g["outer" + d].call(this, b) : this.each(function() {
				a(this).css(f, h(this, b, !0, c) + "px")
			})
		}
	}), a.extend(a.expr[":"], {
		data: a.expr.createPseudo ? a.expr.createPseudo(function(b) {
			return function(c) {
				return !!a.data(c, b)
			}
		}) : function(b, c, d) {
			return !!a.data(b, d[3])
		},
		focusable: function(b) {
			return c(b, !isNaN(a.attr(b, "tabindex")))
		},
		tabbable: function(b) {
			var d = a.attr(b, "tabindex"),
				e = isNaN(d);
			return (e || d >= 0) && c(b, !e)
		}
	}), a(function() {
		var b = document.body,
			c = b.appendChild(c = document.createElement("div"));
		c.offsetHeight, a.extend(c.style, {
			minHeight: "100px",
			height: "auto",
			padding: 0,
			borderWidth: 0
		}), a.support.minHeight = c.offsetHeight === 100, a.support.selectstart = "onselectstart" in c, b.removeChild(c).style.display = "none"
	}), a.curCSS || (a.curCSS = a.css), a.extend(a.ui, {
		plugin: {
			add: function(b, c, d) {
				var e = a.ui[b].prototype;
				for (var f in d) e.plugins[f] = e.plugins[f] || [], e.plugins[f].push([c, d[f]])
			},
			call: function(a, b, c) {
				var d = a.plugins[b];
				if (!d || !a.element[0].parentNode) return;
				for (var e = 0; e < d.length; e++) a.options[d[e][0]] && d[e][1].apply(a.element, c)
			}
		},
		contains: function(a, b) {
			return document.compareDocumentPosition ? a.compareDocumentPosition(b) & 16 : a !== b && a.contains(b)
		},
		hasScroll: function(b, c) {
			if (a(b).css("overflow") === "hidden") return !1;
			var d = c && c === "left" ? "scrollLeft" : "scrollTop",
				e = !1;
			return b[d] > 0 ? !0 : (b[d] = 1, e = b[d] > 0, b[d] = 0, e)
		},
		isOverAxis: function(a, b, c) {
			return a > b && a < b + c
		},
		isOver: function(b, c, d, e, f, g) {
			return a.ui.isOverAxis(b, d, f) && a.ui.isOverAxis(c, e, g)
		}
	})
})(jQuery);;
(function(a, b) {
	if (a.cleanData) {
		var c = a.cleanData;
		a.cleanData = function(b) {
			for (var d = 0, e;
				(e = b[d]) != null; d++) try {
				a(e).triggerHandler("remove")
			} catch (f) {}
			c(b)
		}
	} else {
		var d = a.fn.remove;
		a.fn.remove = function(b, c) {
			return this.each(function() {
				return c || (!b || a.filter(b, [this]).length) && a("*", this).add([this]).each(function() {
					try {
						a(this).triggerHandler("remove")
					} catch (b) {}
				}), d.call(a(this), b, c)
			})
		}
	}
	a.widget = function(b, c, d) {
		var e = b.split(".")[0],
			f;
		b = b.split(".")[1], f = e + "-" + b, d || (d = c, c = a.Widget), a.expr[":"][f] = function(c) {
			return !!a.data(c, b)
		}, a[e] = a[e] || {}, a[e][b] = function(a, b) {
			arguments.length && this._createWidget(a, b)
		};
		var g = new c;
		g.options = a.extend(!0, {}, g.options), a[e][b].prototype = a.extend(!0, g, {
			namespace: e,
			widgetName: b,
			widgetEventPrefix: a[e][b].prototype.widgetEventPrefix || b,
			widgetBaseClass: f
		}, d), a.widget.bridge(b, a[e][b])
	}, a.widget.bridge = function(c, d) {
		a.fn[c] = function(e) {
			var f = typeof e == "string",
				g = Array.prototype.slice.call(arguments, 1),
				h = this;
			return e = !f && g.length ? a.extend.apply(null, [!0, e].concat(g)) : e, f && e.charAt(0) === "_" ? h : (f ? this.each(function() {
				var d = a.data(this, c),
					f = d && a.isFunction(d[e]) ? d[e].apply(d, g) : d;
				if (f !== d && f !== b) return h = f, !1
			}) : this.each(function() {
				var b = a.data(this, c);
				b ? b.option(e || {})._init() : a.data(this, c, new d(e, this))
			}), h)
		}
	}, a.Widget = function(a, b) {
		arguments.length && this._createWidget(a, b)
	}, a.Widget.prototype = {
		widgetName: "widget",
		widgetEventPrefix: "",
		options: {
			disabled: !1
		},
		_createWidget: function(b, c) {
			a.data(c, this.widgetName, this), this.element = a(c), this.options = a.extend(!0, {}, this.options, this._getCreateOptions(), b);
			var d = this;
			this.element.bind("remove." + this.widgetName, function() {
				d.destroy()
			}), this._create(), this._trigger("create"), this._init()
		},
		_getCreateOptions: function() {
			return a.metadata && a.metadata.get(this.element[0])[this.widgetName]
		},
		_create: function() {},
		_init: function() {},
		destroy: function() {
			this.element.unbind("." + this.widgetName).removeData(this.widgetName), this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + "-disabled " + "ui-state-disabled")
		},
		widget: function() {
			return this.element
		},
		option: function(c, d) {
			var e = c;
			if (arguments.length === 0) return a.extend({}, this.options);
			if (typeof c == "string") {
				if (d === b) return this.options[c];
				e = {}, e[c] = d
			}
			return this._setOptions(e), this
		},
		_setOptions: function(b) {
			var c = this;
			return a.each(b, function(a, b) {
				c._setOption(a, b)
			}), this
		},
		_setOption: function(a, b) {
			return this.options[a] = b, a === "disabled" && this.widget()[b ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled" + " " + "ui-state-disabled").attr("aria-disabled", b), this
		},
		enable: function() {
			return this._setOption("disabled", !1)
		},
		disable: function() {
			return this._setOption("disabled", !0)
		},
		_trigger: function(b, c, d) {
			var e, f, g = this.options[b];
			d = d || {}, c = a.Event(c), c.type = (b === this.widgetEventPrefix ? b : this.widgetEventPrefix + b).toLowerCase(), c.target = this.element[0], f = c.originalEvent;
			if (f)
				for (e in f) e in c || (c[e] = f[e]);
			return this.element.trigger(c, d), !(a.isFunction(g) && g.call(this.element[0], c, d) === !1 || c.isDefaultPrevented())
		}
	}
})(jQuery);;
(function(a, b) {
	a.ui = a.ui || {};
	var c = /left|center|right/,
		d = /top|center|bottom/,
		e = "center",
		f = {},
		g = a.fn.position,
		h = a.fn.offset;
	a.fn.position = function(b) {
			if (!b || !b.of) return g.apply(this, arguments);
			b = a.extend({}, b);
			var h = a(b.of),
				i = h[0],
				j = (b.collision || "flip").split(" "),
				k = b.offset ? b.offset.split(" ") : [0, 0],
				l, m, n;
			return i.nodeType === 9 ? (l = h.width(), m = h.height(), n = {
				top: 0,
				left: 0
			}) : i.setTimeout ? (l = h.width(), m = h.height(), n = {
				top: h.scrollTop(),
				left: h.scrollLeft()
			}) : i.preventDefault ? (b.at = "left top", l = m = 0, n = {
				top: b.of.pageY,
				left: b.of.pageX
			}) : (l = h.outerWidth(), m = h.outerHeight(), n = h.offset()), a.each(["my", "at"], function() {
				var a = (b[this] || "").split(" ");
				a.length === 1 && (a = c.test(a[0]) ? a.concat([e]) : d.test(a[0]) ? [e].concat(a) : [e, e]), a[0] = c.test(a[0]) ? a[0] : e, a[1] = d.test(a[1]) ? a[1] : e, b[this] = a
			}), j.length === 1 && (j[1] = j[0]), k[0] = parseInt(k[0], 10) || 0, k.length === 1 && (k[1] = k[0]), k[1] = parseInt(k[1], 10) || 0, b.at[0] === "right" ? n.left += l : b.at[0] === e && (n.left += l / 2), b.at[1] === "bottom" ? n.top += m : b.at[1] === e && (n.top += m / 2), n.left += k[0], n.top += k[1], this.each(function() {
				var c = a(this),
					d = c.outerWidth(),
					g = c.outerHeight(),
					h = parseInt(a.curCSS(this, "marginLeft", !0)) || 0,
					i = parseInt(a.curCSS(this, "marginTop", !0)) || 0,
					o = d + h + (parseInt(a.curCSS(this, "marginRight", !0)) || 0),
					p = g + i + (parseInt(a.curCSS(this, "marginBottom", !0)) || 0),
					q = a.extend({}, n),
					r;
				b.my[0] === "right" ? q.left -= d : b.my[0] === e && (q.left -= d / 2), b.my[1] === "bottom" ? q.top -= g : b.my[1] === e && (q.top -= g / 2), f.fractions || (q.left = Math.round(q.left), q.top = Math.round(q.top)), r = {
					left: q.left - h,
					top: q.top - i
				}, a.each(["left", "top"], function(c, e) {
					a.ui.position[j[c]] && a.ui.position[j[c]][e](q, {
						targetWidth: l,
						targetHeight: m,
						elemWidth: d,
						elemHeight: g,
						collisionPosition: r,
						collisionWidth: o,
						collisionHeight: p,
						offset: k,
						my: b.my,
						at: b.at
					})
				}), a.fn.bgiframe && c.bgiframe(), c.offset(a.extend(q, {
					using: b.using
				}))
			})
		}, a.ui.position = {
			fit: {
				left: function(b, c) {
					var d = a(window),
						e = c.collisionPosition.left + c.collisionWidth - d.width() - d.scrollLeft();
					b.left = e > 0 ? b.left - e : Math.max(b.left - c.collisionPosition.left, b.left)
				},
				top: function(b, c) {
					var d = a(window),
						e = c.collisionPosition.top + c.collisionHeight - d.height() - d.scrollTop();
					b.top = e > 0 ? b.top - e : Math.max(b.top - c.collisionPosition.top, b.top)
				}
			},
			flip: {
				left: function(b, c) {
					if (c.at[0] === e) return;
					var d = a(window),
						f = c.collisionPosition.left + c.collisionWidth - d.width() - d.scrollLeft(),
						g = c.my[0] === "left" ? -c.elemWidth : c.my[0] === "right" ? c.elemWidth : 0,
						h = c.at[0] === "left" ? c.targetWidth : -c.targetWidth,
						i = -2 * c.offset[0];
					b.left += c.collisionPosition.left < 0 ? g + h + i : f > 0 ? g + h + i : 0
				},
				top: function(b, c) {
					if (c.at[1] === e) return;
					var d = a(window),
						f = c.collisionPosition.top + c.collisionHeight - d.height() - d.scrollTop(),
						g = c.my[1] === "top" ? -c.elemHeight : c.my[1] === "bottom" ? c.elemHeight : 0,
						h = c.at[1] === "top" ? c.targetHeight : -c.targetHeight,
						i = -2 * c.offset[1];
					b.top += c.collisionPosition.top < 0 ? g + h + i : f > 0 ? g + h + i : 0
				}
			}
		}, a.offset.setOffset || (a.offset.setOffset = function(b, c) {
			/static/.test(a.curCSS(b, "position")) && (b.style.position = "relative");
			var d = a(b),
				e = d.offset(),
				f = parseInt(a.curCSS(b, "top", !0), 10) || 0,
				g = parseInt(a.curCSS(b, "left", !0), 10) || 0,
				h = {
					top: c.top - e.top + f,
					left: c.left - e.left + g
				};
			"using" in c ? c.using.call(b, h) : d.css(h)
		}, a.fn.offset = function(b) {
			var c = this[0];
			return !c || !c.ownerDocument ? null : b ? a.isFunction(b) ? this.each(function(c) {
				a(this).offset(b.call(this, c, a(this).offset()))
			}) : this.each(function() {
				a.offset.setOffset(this, b)
			}) : h.call(this)
		}), a.curCSS || (a.curCSS = a.css),
		function() {
			var b = document.getElementsByTagName("body")[0],
				c = document.createElement("div"),
				d, e, g, h, i;
			d = document.createElement(b ? "div" : "body"), g = {
				visibility: "hidden",
				width: 0,
				height: 0,
				border: 0,
				margin: 0,
				background: "none"
			}, b && a.extend(g, {
				position: "absolute",
				left: "-1000px",
				top: "-1000px"
			});
			for (var j in g) d.style[j] = g[j];
			d.appendChild(c), e = b || document.documentElement, e.insertBefore(d, e.firstChild), c.style.cssText = "position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;", h = a(c).offset(function(a, b) {
				return b
			}).offset(), d.innerHTML = "", e.removeChild(d), i = h.top + h.left + (b ? 2e3 : 0), f.fractions = i > 21 && i < 22
		}()
})(jQuery);;
(function(a, b) {
	var c = "ui-dialog ui-widget ui-widget-content ui-corner-all ",
		d = {
			buttons: !0,
			height: !0,
			maxHeight: !0,
			maxWidth: !0,
			minHeight: !0,
			minWidth: !0,
			width: !0
		},
		e = {
			maxHeight: !0,
			maxWidth: !0,
			minHeight: !0,
			minWidth: !0
		};
	a.widget("ui.dialog", {
		options: {
			autoOpen: !0,
			buttons: {},
			closeOnEscape: !0,
			closeText: "close",
			dialogClass: "",
			draggable: !0,
			hide: null,
			height: "auto",
			maxHeight: !1,
			maxWidth: !1,
			minHeight: 150,
			minWidth: 150,
			modal: !1,
			position: {
				my: "center",
				at: "center",
				collision: "fit",
				using: function(b) {
					var c = a(this).css(b).offset().top;
					c < 0 && a(this).css("top", b.top - c)
				}
			},
			resizable: !0,
			show: null,
			stack: !0,
			title: "",
			width: 300,
			zIndex: 1e3
		},
		_create: function() {
			this.originalTitle = this.element.attr("title"), typeof this.originalTitle != "string" && (this.originalTitle = ""), this.options.title = this.options.title || this.originalTitle;
			var b = this,
				d = b.options,
				e = d.title || "&#160;",
				f = a.ui.dialog.getTitleId(b.element),
				g = (b.uiDialog = a("<div></div>")).appendTo(document.body).hide().addClass(c + d.dialogClass).css({
					zIndex: d.zIndex
				}).attr("tabIndex", -1).css("outline", 0).keydown(function(c) {
					d.closeOnEscape && !c.isDefaultPrevented() && c.keyCode && c.keyCode === a.ui.keyCode.ESCAPE && (b.close(c), c.preventDefault())
				}).attr({
					role: "dialog",
					"aria-labelledby": f
				}).mousedown(function(a) {
					b.moveToTop(!1, a)
				}),
				h = b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g),
				i = (b.uiDialogTitlebar = a("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),
				j = a('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", "button").hover(function() {
					j.addClass("ui-state-hover")
				}, function() {
					j.removeClass("ui-state-hover")
				}).focus(function() {
					j.addClass("ui-state-focus")
				}).blur(function() {
					j.removeClass("ui-state-focus")
				}).click(function(a) {
					return b.close(a), !1
				}).appendTo(i),
				k = (b.uiDialogTitlebarCloseText = a("<span></span>")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(j),
				l = a("<span></span>").addClass("ui-dialog-title").attr("id", f).html(e).prependTo(i);
			a.isFunction(d.beforeclose) && !a.isFunction(d.beforeClose) && (d.beforeClose = d.beforeclose), i.find("*").add(i).disableSelection(), d.draggable && a.fn.draggable && b._makeDraggable(), d.resizable && a.fn.resizable && b._makeResizable(), b._createButtons(d.buttons), b._isOpen = !1, a.fn.bgiframe && g.bgiframe()
		},
		_init: function() {
			this.options.autoOpen && this.open()
		},
		destroy: function() {
			var a = this;
			return a.overlay && a.overlay.destroy(), a.uiDialog.hide(), a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"), a.uiDialog.remove(), a.originalTitle && a.element.attr("title", a.originalTitle), a
		},
		widget: function() {
			return this.uiDialog
		},
		close: function(b) {
			var c = this,
				d, e;
			if (!1 === c._trigger("beforeClose", b)) return;
			return c.overlay && c.overlay.destroy(), c.uiDialog.unbind("keypress.ui-dialog"), c._isOpen = !1, c.options.hide ? c.uiDialog.hide(c.options.hide, function() {
				c._trigger("close", b)
			}) : (c.uiDialog.hide(), c._trigger("close", b)), a.ui.dialog.overlay.resize(), c.options.modal && (d = 0, a(".ui-dialog").each(function() {
				this !== c.uiDialog[0] && (e = a(this).css("z-index"), isNaN(e) || (d = Math.max(d, e)))
			}), a.ui.dialog.maxZ = d), c
		},
		isOpen: function() {
			return this._isOpen
		},
		moveToTop: function(b, c) {
			var d = this,
				e = d.options,
				f;
			return e.modal && !b || !e.stack && !e.modal ? d._trigger("focus", c) : (e.zIndex > a.ui.dialog.maxZ && (a.ui.dialog.maxZ = e.zIndex), d.overlay && (a.ui.dialog.maxZ += 1, d.overlay.$el.css("z-index", a.ui.dialog.overlay.maxZ = a.ui.dialog.maxZ)), f = {
				scrollTop: d.element.scrollTop(),
				scrollLeft: d.element.scrollLeft()
			}, a.ui.dialog.maxZ += 1, d.uiDialog.css("z-index", a.ui.dialog.maxZ), d.element.attr(f), d._trigger("focus", c), d)
		},
		open: function() {
			if (this._isOpen) return;
			var b = this,
				c = b.options,
				d = b.uiDialog;
			return b.overlay = c.modal ? new a.ui.dialog.overlay(b) : null, b._size(), b._position(c.position), d.show(c.show), b.moveToTop(!0), c.modal && d.bind("keydown.ui-dialog", function(b) {
				if (b.keyCode !== a.ui.keyCode.TAB) return;
				var c = a(":tabbable", this),
					d = c.filter(":first"),
					e = c.filter(":last");
				if (b.target === e[0] && !b.shiftKey) return d.focus(1), !1;
				if (b.target === d[0] && b.shiftKey) return e.focus(1), !1
			}), a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(), b._isOpen = !0, b._trigger("open"), b
		},
		_createButtons: function(b) {
			var c = this,
				d = !1,
				e = a("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),
				f = a("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);
			c.uiDialog.find(".ui-dialog-buttonpane").remove(), typeof b == "object" && b !== null && a.each(b, function() {
				return !(d = !0)
			}), d && (a.each(b, function(b, d) {
				d = a.isFunction(d) ? {
					click: d,
					text: b
				} : d;
				var e = a('<button type="button"></button>').click(function() {
					d.click.apply(c.element[0], arguments)
				}).appendTo(f);
				a.each(d, function(a, b) {
					if (a === "click") return;
					a in e ? e[a](b) : e.attr(a, b)
				}), a.fn.button && e.button()
			}), e.appendTo(c.uiDialog))
		},
		_makeDraggable: function() {
			function f(a) {
				return {
					position: a.position,
					offset: a.offset
				}
			}
			var b = this,
				c = b.options,
				d = a(document),
				e;
			b.uiDialog.draggable({
				cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
				handle: ".ui-dialog-titlebar",
				containment: "document",
				start: function(d, g) {
					e = c.height === "auto" ? "auto" : a(this).height(), a(this).height(a(this).height()).addClass("ui-dialog-dragging"), b._trigger("dragStart", d, f(g))
				},
				drag: function(a, c) {
					b._trigger("drag", a, f(c))
				},
				stop: function(g, h) {
					c.position = [h.position.left - d.scrollLeft(), h.position.top - d.scrollTop()], a(this).removeClass("ui-dialog-dragging").height(e), b._trigger("dragStop", g, f(h)), a.ui.dialog.overlay.resize()
				}
			})
		},
		_makeResizable: function(c) {
			function h(a) {
				return {
					originalPosition: a.originalPosition,
					originalSize: a.originalSize,
					position: a.position,
					size: a.size
				}
			}
			c = c === b ? this.options.resizable : c;
			var d = this,
				e = d.options,
				f = d.uiDialog.css("position"),
				g = typeof c == "string" ? c : "n,e,s,w,se,sw,ne,nw";
			d.uiDialog.resizable({
				cancel: ".ui-dialog-content",
				containment: "document",
				alsoResize: d.element,
				maxWidth: e.maxWidth,
				maxHeight: e.maxHeight,
				minWidth: e.minWidth,
				minHeight: d._minHeight(),
				handles: g,
				start: function(b, c) {
					a(this).addClass("ui-dialog-resizing"), d._trigger("resizeStart", b, h(c))
				},
				resize: function(a, b) {
					d._trigger("resize", a, h(b))
				},
				stop: function(b, c) {
					a(this).removeClass("ui-dialog-resizing"), e.height = a(this).height(), e.width = a(this).width(), d._trigger("resizeStop", b, h(c)), a.ui.dialog.overlay.resize()
				}
			}).css("position", f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")
		},
		_minHeight: function() {
			var a = this.options;
			return a.height === "auto" ? a.minHeight : Math.min(a.minHeight, a.height)
		},
		_position: function(b) {
			var c = [],
				d = [0, 0],
				e;
			if (b) {
				if (typeof b == "string" || typeof b == "object" && "0" in b) c = b.split ? b.split(" ") : [b[0], b[1]], c.length === 1 && (c[1] = c[0]), a.each(["left", "top"], function(a, b) {
					+c[a] === c[a] && (d[a] = c[a], c[a] = b)
				}), b = {
					my: c.join(" "),
					at: c.join(" "),
					offset: d.join(" ")
				};
				b = a.extend({}, a.ui.dialog.prototype.options.position, b)
			} else b = a.ui.dialog.prototype.options.position;
			e = this.uiDialog.is(":visible"), e || this.uiDialog.show(), this.uiDialog.css({
				top: 0,
				left: 0
			}).position(a.extend({
				of: window
			}, b)), e || this.uiDialog.hide()
		},
		_setOptions: function(b) {
			var c = this,
				f = {},
				g = !1;
			a.each(b, function(a, b) {
				c._setOption(a, b), a in d && (g = !0), a in e && (f[a] = b)
			}), g && this._size(), this.uiDialog.is(":data(resizable)") && this.uiDialog.resizable("option", f)
		},
		_setOption: function(b, d) {
			var e = this,
				f = e.uiDialog;
			switch (b) {
				case "beforeclose":
					b = "beforeClose";
					break;
				case "buttons":
					e._createButtons(d);
					break;
				case "closeText":
					e.uiDialogTitlebarCloseText.text("" + d);
					break;
				case "dialogClass":
					f.removeClass(e.options.dialogClass).addClass(c + d);
					break;
				case "disabled":
					d ? f.addClass("ui-dialog-disabled") : f.removeClass("ui-dialog-disabled");
					break;
				case "draggable":
					var g = f.is(":data(draggable)");
					g && !d && f.draggable("destroy"), !g && d && e._makeDraggable();
					break;
				case "position":
					e._position(d);
					break;
				case "resizable":
					var h = f.is(":data(resizable)");
					h && !d && f.resizable("destroy"), h && typeof d == "string" && f.resizable("option", "handles", d), !h && d !== !1 && e._makeResizable(d);
					break;
				case "title":
					a(".ui-dialog-title", e.uiDialogTitlebar).html("" + (d || "&#160;"))
			}
			a.Widget.prototype._setOption.apply(e, arguments)
		},
		_size: function() {
			var b = this.options,
				c, d, e = this.uiDialog.is(":visible");
			this.element.show().css({
				width: "auto",
				minHeight: 0,
				height: 0
			}), b.minWidth > b.width && (b.width = b.minWidth), c = this.uiDialog.css({
				height: "auto",
				width: b.width
			}).height(), d = Math.max(0, b.minHeight - c);
			if (b.height === "auto")
				if (a.support.minHeight) this.element.css({
					minHeight: d,
					height: "auto"
				});
				else {
					this.uiDialog.show();
					var f = this.element.css("height", "auto").height();
					e || this.uiDialog.hide(), this.element.height(Math.max(f, d))
				}
			else this.element.height(Math.max(b.height - c, 0));
			this.uiDialog.is(":data(resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight())
		}
	}), a.extend(a.ui.dialog, {
		version: "1.8.23",
		uuid: 0,
		maxZ: 0,
		getTitleId: function(a) {
			var b = a.attr("id");
			return b || (this.uuid += 1, b = this.uuid), "ui-dialog-title-" + b
		},
		overlay: function(b) {
			this.$el = a.ui.dialog.overlay.create(b)
		}
	}), a.extend(a.ui.dialog.overlay, {
		instances: [],
		oldInstances: [],
		maxZ: 0,
		events: a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","), function(a) {
			return a + ".dialog-overlay"
		}).join(" "),
		create: function(b) {
			this.instances.length === 0 && (setTimeout(function() {
				a.ui.dialog.overlay.instances.length && a(document).bind(a.ui.dialog.overlay.events, function(b) {
					if (a(b.target).zIndex() < a.ui.dialog.overlay.maxZ) return !1
				})
			}, 1), a(document).bind("keydown.dialog-overlay", function(c) {
				b.options.closeOnEscape && !c.isDefaultPrevented() && c.keyCode && c.keyCode === a.ui.keyCode.ESCAPE && (b.close(c), c.preventDefault())
			}), a(window).bind("resize.dialog-overlay", a.ui.dialog.overlay.resize));
			var c = (this.oldInstances.pop() || a("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({
				width: this.width(),
				height: this.height()
			});
			return a.fn.bgiframe && c.bgiframe(), this.instances.push(c), c
		},
		destroy: function(b) {
			var c = a.inArray(b, this.instances);
			c != -1 && this.oldInstances.push(this.instances.splice(c, 1)[0]), this.instances.length === 0 && a([document, window]).unbind(".dialog-overlay"), b.remove();
			var d = 0;
			a.each(this.instances, function() {
				d = Math.max(d, this.css("z-index"))
			}), this.maxZ = d
		},
		height: function() {
			var b, c;
			return a.browser.msie && a.browser.version < 7 ? (b = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight), c = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight), b < c ? a(window).height() + "px" : b + "px") : a(document).height() + "px"
		},
		width: function() {
			var b, c;
			return a.browser.msie ? (b = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth), c = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth), b < c ? a(window).width() + "px" : b + "px") : a(document).width() + "px"
		},
		resize: function() {
			var b = a([]);
			a.each(a.ui.dialog.overlay.instances, function() {
				b = b.add(this)
			}), b.css({
				width: 0,
				height: 0
			}).css({
				width: a.ui.dialog.overlay.width(),
				height: a.ui.dialog.overlay.height()
			})
		}
	}), a.extend(a.ui.dialog.overlay.prototype, {
		destroy: function() {
			a.ui.dialog.overlay.destroy(this.$el)
		}
	})
})(jQuery);;
(function($, undefined) {
	function Datepicker() {
		this.debug = !1, this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !1, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass = "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass = "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass = "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass = "ui-datepicker-days-cell-over", this.regional = [], this.regional[""] = {
			closeText: "Done",
			prevText: "Prev",
			nextText: "Next",
			currentText: "Today",
			monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
			monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
			dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
			dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
			dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
			weekHeader: "Wk",
			dateFormat: "mm/dd/yy",
			firstDay: 0,
			isRTL: !1,
			showMonthAfterYear: !1,
			yearSuffix: ""
		}, this._defaults = {
			showOn: "focus",
			showAnim: "fadeIn",
			showOptions: {},
			defaultDate: null,
			appendText: "",
			buttonText: "...",
			buttonImage: "",
			buttonImageOnly: !1,
			hideIfNoPrevNext: !1,
			navigationAsDateFormat: !1,
			gotoCurrent: !1,
			changeMonth: !1,
			changeYear: !1,
			yearRange: "c-10:c+10",
			showOtherMonths: !1,
			selectOtherMonths: !1,
			showWeek: !1,
			calculateWeek: this.iso8601Week,
			shortYearCutoff: "+10",
			minDate: null,
			maxDate: null,
			duration: "fast",
			beforeShowDay: null,
			beforeShow: null,
			onSelect: null,
			onChangeMonthYear: null,
			onClose: null,
			numberOfMonths: 1,
			showCurrentAtPos: 0,
			stepMonths: 1,
			stepBigMonths: 12,
			altField: "",
			altFormat: "",
			constrainInput: !0,
			showButtonPanel: !1,
			autoSize: !1,
			disabled: !1
		}, $.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>'))
	}

	function bindHover(a) {
		var b = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
		return a.bind("mouseout", function(a) {
			var c = $(a.target).closest(b);
			if (!c.length) return;
			c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")
		}).bind("mouseover", function(c) {
			var d = $(c.target).closest(b);
			if ($.datepicker._isDisabledDatepicker(instActive.inline ? a.parent()[0] : instActive.input[0]) || !d.length) return;
			d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), d.addClass("ui-state-hover"), d.hasClass("ui-datepicker-prev") && d.addClass("ui-datepicker-prev-hover"), d.hasClass("ui-datepicker-next") && d.addClass("ui-datepicker-next-hover")
		})
	}

	function extendRemove(a, b) {
		$.extend(a, b);
		for (var c in b)
			if (b[c] == null || b[c] == undefined) a[c] = b[c];
		return a
	}

	function isArray(a) {
		return a && ($.browser.safari && typeof a == "object" && a.length || a.constructor && a.constructor.toString().match(/\Array\(\)/))
	}
	$.extend($.ui, {
		datepicker: {
			version: "1.8.23"
		}
	});
	var PROP_NAME = "datepicker",
		dpuuid = (new Date).getTime(),
		instActive;
	$.extend(Datepicker.prototype, {
		markerClassName: "hasDatepicker",
		maxRows: 4,
		log: function() {
			this.debug && console.log.apply("", arguments)
		},
		_widgetDatepicker: function() {
			return this.dpDiv
		},
		setDefaults: function(a) {
			return extendRemove(this._defaults, a || {}), this
		},
		_attachDatepicker: function(target, settings) {
			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 = nodeName == "div" || nodeName == "span";
			target.id || (this.uuid += 1, target.id = "dp" + this.uuid);
			var inst = this._newInst($(target), inline);
			inst.settings = $.extend({}, settings || {}, inlineSettings || {}), nodeName == "input" ? this._connectDatepicker(target, inst) : inline && this._inlineDatepicker(target, inst)
		},
		_newInst: function(a, b) {
			var c = a[0].id.replace(/([^A-Za-z0-9_-])/g, "\\\\$1");
			return {
				id: c,
				input: a,
				selectedDay: 0,
				selectedMonth: 0,
				selectedYear: 0,
				drawMonth: 0,
				drawYear: 0,
				inline: b,
				dpDiv: b ? bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')) : this.dpDiv
			}
		},
		_connectDatepicker: function(a, b) {
			var c = $(a);
			b.append = $([]), b.trigger = $([]);
			if (c.hasClass(this.markerClassName)) return;
			this._attachments(c, b), c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", function(a, c, d) {
				b.settings[c] = d
			}).bind("getData.datepicker", function(a, c) {
				return this._get(b, c)
			}), this._autoSize(b), $.data(a, PROP_NAME, b), b.settings.disabled && this._disableDatepicker(a)
		},
		_attachments: function(a, b) {
			var c = this._get(b, "appendText"),
				d = this._get(b, "isRTL");
			b.append && b.append.remove(), c && (b.append = $('<span class="' + this._appendClass + '">' + c + "</span>"), a[d ? "before" : "after"](b.append)), a.unbind("focus", this._showDatepicker), b.trigger && b.trigger.remove();
			var e = this._get(b, "showOn");
			(e == "focus" || e == "both") && a.focus(this._showDatepicker);
			if (e == "button" || e == "both") {
				var f = this._get(b, "buttonText"),
					g = this._get(b, "buttonImage");
				b.trigger = $(this._get(b, "buttonImageOnly") ? $("<img/>").addClass(this._triggerClass).attr({
					src: g,
					alt: f,
					title: f
				}) : $('<button type="button"></button>').addClass(this._triggerClass).html(g == "" ? f : $("<img/>").attr({
					src: g,
					alt: f,
					title: f
				}))), a[d ? "before" : "after"](b.trigger), b.trigger.click(function() {
					return $.datepicker._datepickerShowing && $.datepicker._lastInput == a[0] ? $.datepicker._hideDatepicker() : $.datepicker._datepickerShowing && $.datepicker._lastInput != a[0] ? ($.datepicker._hideDatepicker(), $.datepicker._showDatepicker(a[0])) : $.datepicker._showDatepicker(a[0]), !1
				})
			}
		},
		_autoSize: function(a) {
			if (this._get(a, "autoSize") && !a.inline) {
				var b = new Date(2009, 11, 20),
					c = this._get(a, "dateFormat");
				if (c.match(/[DM]/)) {
					var d = function(a) {
						var b = 0,
							c = 0;
						for (var d = 0; d < a.length; d++) a[d].length > b && (b = a[d].length, c = d);
						return c
					};
					b.setMonth(d(this._get(a, c.match(/MM/) ? "monthNames" : "monthNamesShort"))), b.setDate(d(this._get(a, c.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - b.getDay())
				}
				a.input.attr("size", this._formatDate(a, b).length)
			}
		},
		_inlineDatepicker: function(a, b) {
			var c = $(a);
			if (c.hasClass(this.markerClassName)) return;
			c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker", function(a, c, d) {
				b.settings[c] = d
			}).bind("getData.datepicker", function(a, c) {
				return this._get(b, c)
			}), $.data(a, PROP_NAME, b), this._setDate(b, this._getDefaultDate(b), !0), this._updateDatepicker(b), this._updateAlternate(b), b.settings.disabled && this._disableDatepicker(a), b.dpDiv.css("display", "block")
		},
		_dialogDatepicker: function(a, b, c, d, e) {
			var f = this._dialogInst;
			if (!f) {
				this.uuid += 1;
				var g = "dp" + this.uuid;
				this._dialogInput = $('<input type="text" id="' + g + '" style="position: absolute; top: -100px; width: 0px;"/>'), this._dialogInput.keydown(this._doKeyDown), $("body").append(this._dialogInput), f = this._dialogInst = this._newInst(this._dialogInput, !1), f.settings = {}, $.data(this._dialogInput[0], PROP_NAME, f)
			}
			extendRemove(f.settings, d || {}), b = b && b.constructor == Date ? this._formatDate(f, b) : b, this._dialogInput.val(b), this._pos = e ? e.length ? e : [e.pageX, e.pageY] : null;
			if (!this._pos) {
				var h = document.documentElement.clientWidth,
					i = document.documentElement.clientHeight,
					j = document.documentElement.scrollLeft || document.body.scrollLeft,
					k = document.documentElement.scrollTop || document.body.scrollTop;
				this._pos = [h / 2 - 100 + j, i / 2 - 150 + k]
			}
			return this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), f.settings.onSelect = c, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), $.blockUI && $.blockUI(this.dpDiv), $.data(this._dialogInput[0], PROP_NAME, f), this
		},
		_destroyDatepicker: function(a) {
			var b = $(a),
				c = $.data(a, PROP_NAME);
			if (!b.hasClass(this.markerClassName)) return;
			var d = a.nodeName.toLowerCase();
			$.removeData(a, PROP_NAME), d == "input" ? (c.append.remove(), c.trigger.remove(), b.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)) : (d == "div" || d == "span") && b.removeClass(this.markerClassName).empty()
		},
		_enableDatepicker: function(a) {
			var b = $(a),
				c = $.data(a, PROP_NAME);
			if (!b.hasClass(this.markerClassName)) return;
			var d = a.nodeName.toLowerCase();
			if (d == "input") a.disabled = !1, c.trigger.filter("button").each(function() {
				this.disabled = !1
			}).end().filter("img").css({
				opacity: "1.0",
				cursor: ""
			});
			else if (d == "div" || d == "span") {
				var e = b.children("." + this._inlineClass);
				e.children().removeClass("ui-state-disabled"), e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")
			}
			this._disabledInputs = $.map(this._disabledInputs, function(b) {
				return b == a ? null : b
			})
		},
		_disableDatepicker: function(a) {
			var b = $(a),
				c = $.data(a, PROP_NAME);
			if (!b.hasClass(this.markerClassName)) return;
			var d = a.nodeName.toLowerCase();
			if (d == "input") a.disabled = !0, c.trigger.filter("button").each(function() {
				this.disabled = !0
			}).end().filter("img").css({
				opacity: "0.5",
				cursor: "default"
			});
			else if (d == "div" || d == "span") {
				var e = b.children("." + this._inlineClass);
				e.children().addClass("ui-state-disabled"), e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled", "disabled")
			}
			this._disabledInputs = $.map(this._disabledInputs, function(b) {
				return b == a ? null : b
			}), this._disabledInputs[this._disabledInputs.length] = a
		},
		_isDisabledDatepicker: function(a) {
			if (!a) return !1;
			for (var b = 0; b < this._disabledInputs.length; b++)
				if (this._disabledInputs[b] == a) return !0;
			return !1
		},
		_getInst: function(a) {
			try {
				return $.data(a, PROP_NAME)
			} catch (b) {
				throw "Missing instance data for this datepicker"
			}
		},
		_optionDatepicker: function(a, b, c) {
			var d = this._getInst(a);
			if (arguments.length == 2 && typeof b == "string") return b == "defaults" ? $.extend({}, $.datepicker._defaults) : d ? b == "all" ? $.extend({}, d.settings) : this._get(d, b) : null;
			var e = b || {};
			typeof b == "string" && (e = {}, e[b] = c);
			if (d) {
				this._curInst == d && this._hideDatepicker();
				var f = this._getDateDatepicker(a, !0),
					g = this._getMinMaxDate(d, "min"),
					h = this._getMinMaxDate(d, "max");
				extendRemove(d.settings, e), g !== null && e.dateFormat !== undefined && e.minDate === undefined && (d.settings.minDate = this._formatDate(d, g)), h !== null && e.dateFormat !== undefined && e.maxDate === undefined && (d.settings.maxDate = this._formatDate(d, h)), this._attachments($(a), d), this._autoSize(d), this._setDate(d, f), this._updateAlternate(d), this._updateDatepicker(d)
			}
		},
		_changeDatepicker: function(a, b, c) {
			this._optionDatepicker(a, b, c)
		},
		_refreshDatepicker: function(a) {
			var b = this._getInst(a);
			b && this._updateDatepicker(b)
		},
		_setDateDatepicker: function(a, b) {
			var c = this._getInst(a);
			c && (this._setDate(c, b), this._updateDatepicker(c), this._updateAlternate(c))
		},
		_getDateDatepicker: function(a, b) {
			var c = this._getInst(a);
			return c && !c.inline && this._setDateFromField(c, b), c ? this._getDate(c) : null
		},
		_doKeyDown: function(a) {
			var b = $.datepicker._getInst(a.target),
				c = !0,
				d = b.dpDiv.is(".ui-datepicker-rtl");
			b._keyEvent = !0;
			if ($.datepicker._datepickerShowing) switch (a.keyCode) {
				case 9:
					$.datepicker._hideDatepicker(), c = !1;
					break;
				case 13:
					var e = $("td." + $.datepicker._dayOverClass + ":not(." + $.datepicker._currentClass + ")", b.dpDiv);
					e[0] && $.datepicker._selectDay(a.target, b.selectedMonth, b.selectedYear, e[0]);
					var f = $.datepicker._get(b, "onSelect");
					if (f) {
						var g = $.datepicker._formatDate(b);
						f.apply(b.input ? b.input[0] : null, [g, b])
					} else $.datepicker._hideDatepicker();
					return !1;
				case 27:
					$.datepicker._hideDatepicker();
					break;
				case 33:
					$.datepicker._adjustDate(a.target, a.ctrlKey ? -$.datepicker._get(b, "stepBigMonths") : -$.datepicker._get(b, "stepMonths"), "M");
					break;
				case 34:
					$.datepicker._adjustDate(a.target, a.ctrlKey ? +$.datepicker._get(b, "stepBigMonths") : +$.datepicker._get(b, "stepMonths"), "M");
					break;
				case 35:
					(a.ctrlKey || a.metaKey) && $.datepicker._clearDate(a.target), c = a.ctrlKey || a.metaKey;
					break;
				case 36:
					(a.ctrlKey || a.metaKey) && $.datepicker._gotoToday(a.target), c = a.ctrlKey || a.metaKey;
					break;
				case 37:
					(a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, d ? 1 : -1, "D"), c = a.ctrlKey || a.metaKey, a.originalEvent.altKey && $.datepicker._adjustDate(a.target, a.ctrlKey ? -$.datepicker._get(b, "stepBigMonths") : -$.datepicker._get(b, "stepMonths"), "M");
					break;
				case 38:
					(a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, -7, "D"), c = a.ctrlKey || a.metaKey;
					break;
				case 39:
					(a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, d ? -1 : 1, "D"), c = a.ctrlKey || a.metaKey, a.originalEvent.altKey && $.datepicker._adjustDate(a.target, a.ctrlKey ? +$.datepicker._get(b, "stepBigMonths") : +$.datepicker._get(b, "stepMonths"), "M");
					break;
				case 40:
					(a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, 7, "D"), c = a.ctrlKey || a.metaKey;
					break;
				default:
					c = !1
			} else a.keyCode == 36 && a.ctrlKey ? $.datepicker._showDatepicker(this) : c = !1;
			c && (a.preventDefault(), a.stopPropagation())
		},
		_doKeyPress: function(a) {
			var b = $.datepicker._getInst(a.target);
			if ($.datepicker._get(b, "constrainInput")) {
				var c = $.datepicker._possibleChars($.datepicker._get(b, "dateFormat")),
					d = String.fromCharCode(a.charCode == undefined ? a.keyCode : a.charCode);
				return a.ctrlKey || a.metaKey || d < " " || !c || c.indexOf(d) > -1
			}
		},
		_doKeyUp: function(a) {
			var b = $.datepicker._getInst(a.target);
			if (b.input.val() != b.lastVal) try {
				var c = $.datepicker.parseDate($.datepicker._get(b, "dateFormat"), b.input ? b.input.val() : null, $.datepicker._getFormatConfig(b));
				c && ($.datepicker._setDateFromField(b), $.datepicker._updateAlternate(b), $.datepicker._updateDatepicker(b))
			} catch (d) {
				$.datepicker.log(d)
			}
			return !0
		},
		_showDatepicker: function(a) {
			a = a.target || a, a.nodeName.toLowerCase() != "input" && (a = $("input", a.parentNode)[0]);
			if ($.datepicker._isDisabledDatepicker(a) || $.datepicker._lastInput == a) return;
			var b = $.datepicker._getInst(a);
			$.datepicker._curInst && $.datepicker._curInst != b && ($.datepicker._curInst.dpDiv.stop(!0, !0), b && $.datepicker._datepickerShowing && $.datepicker._hideDatepicker($.datepicker._curInst.input[0]));
			var c = $.datepicker._get(b, "beforeShow"),
				d = c ? c.apply(a, [a, b]) : {};
			if (d === !1) return;
			extendRemove(b.settings, d), b.lastVal = null, $.datepicker._lastInput = a, $.datepicker._setDateFromField(b), $.datepicker._inDialog && (a.value = ""), $.datepicker._pos || ($.datepicker._pos = $.datepicker._findPos(a), $.datepicker._pos[1] += a.offsetHeight);
			var e = !1;
			$(a).parents().each(function() {
				return e |= $(this).css("position") == "fixed", !e
			}), e && $.browser.opera && ($.datepicker._pos[0] -= document.documentElement.scrollLeft, $.datepicker._pos[1] -= document.documentElement.scrollTop);
			var f = {
				left: $.datepicker._pos[0],
				top: $.datepicker._pos[1]
			};
			$.datepicker._pos = null, b.dpDiv.empty(), b.dpDiv.css({
				position: "absolute",
				display: "block",
				top: "-1000px"
			}), $.datepicker._updateDatepicker(b), f = $.datepicker._checkOffset(b, f, e), b.dpDiv.css({
				position: $.datepicker._inDialog && $.blockUI ? "static" : e ? "fixed" : "absolute",
				display: "none",
				left: f.left + "px",
				top: f.top + "px"
			});
			if (!b.inline) {
				var g = $.datepicker._get(b, "showAnim"),
					h = $.datepicker._get(b, "duration"),
					i = function() {
						var a = b.dpDiv.find("iframe.ui-datepicker-cover");
						if (!!a.length) {
							var c = $.datepicker._getBorders(b.dpDiv);
							a.css({
								left: -c[0],
								top: -c[1],
								width: b.dpDiv.outerWidth(),
								height: b.dpDiv.outerHeight()
							})
						}
					};
				b.dpDiv.zIndex($(a).zIndex() + 1), $.datepicker._datepickerShowing = !0, $.effects && $.effects[g] ? b.dpDiv.show(g, $.datepicker._get(b, "showOptions"), h, i) : b.dpDiv[g || "show"](g ? h : null, i), (!g || !h) && i(), b.input.is(":visible") && !b.input.is(":disabled") && b.input.focus(), $.datepicker._curInst = b
			}
		},
		_updateDatepicker: function(a) {
			var b = this;
			b.maxRows = 4;
			var c = $.datepicker._getBorders(a.dpDiv);
			instActive = a, a.dpDiv.empty().append(this._generateHTML(a)), this._attachHandlers(a);
			var d = a.dpDiv.find("iframe.ui-datepicker-cover");
			!d.length || d.css({
				left: -c[0],
				top: -c[1],
				width: a.dpDiv.outerWidth(),
				height: a.dpDiv.outerHeight()
			}), a.dpDiv.find("." + this._dayOverClass + " a").mouseover();
			var e = this._getNumberOfMonths(a),
				f = e[1],
				g = 17;
			a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), f > 1 && a.dpDiv.addClass("ui-datepicker-multi-" + f).css("width", g * f + "em"), a.dpDiv[(e[0] != 1 || e[1] != 1 ? "add" : "remove") + "Class"]("ui-datepicker-multi"), a.dpDiv[(this._get(a, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), a == $.datepicker._curInst && $.datepicker._datepickerShowing && a.input && a.input.is(":visible") && !a.input.is(":disabled") && a.input[0] != document.activeElement && a.input.focus();
			if (a.yearshtml) {
				var h = a.yearshtml;
				setTimeout(function() {
					h === a.yearshtml && a.yearshtml && a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml), h = a.yearshtml = null
				}, 0)
			}
		},
		_getBorders: function(a) {
			var b = function(a) {
				return {
					thin: 1,
					medium: 2,
					thick: 3
				}[a] || a
			};
			return [parseFloat(b(a.css("border-left-width"))), parseFloat(b(a.css("border-top-width")))]
		},
		_checkOffset: function(a, b, c) {
			var d = a.dpDiv.outerWidth(),
				e = a.dpDiv.outerHeight(),
				f = a.input ? a.input.outerWidth() : 0,
				g = a.input ? a.input.outerHeight() : 0,
				h = document.documentElement.clientWidth + (c ? 0 : $(document).scrollLeft()),
				i = document.documentElement.clientHeight + (c ? 0 : $(document).scrollTop());
			return b.left -= this._get(a, "isRTL") ? d - f : 0, b.left -= c && b.left == a.input.offset().left ? $(document).scrollLeft() : 0, b.top -= c && b.top == a.input.offset().top + g ? $(document).scrollTop() : 0, b.left -= Math.min(b.left, b.left + d > h && h > d ? Math.abs(b.left + d - h) : 0), b.top -= Math.min(b.top, b.top + e > i && i > e ? Math.abs(e + g) : 0), b
		},
		_findPos: function(a) {
			var b = this._getInst(a),
				c = this._get(b, "isRTL");
			while (a && (a.type == "hidden" || a.nodeType != 1 || $.expr.filters.hidden(a))) a = a[c ? "previousSibling" : "nextSibling"];
			var d = $(a).offset();
			return [d.left, d.top]
		},
		_hideDatepicker: function(a) {
			var b = this._curInst;
			if (!b || a && b != $.data(a, PROP_NAME)) return;
			if (this._datepickerShowing) {
				var c = this._get(b, "showAnim"),
					d = this._get(b, "duration"),
					e = function() {
						$.datepicker._tidyDialog(b)
					};
				$.effects && $.effects[c] ? b.dpDiv.hide(c, $.datepicker._get(b, "showOptions"), d, e) : b.dpDiv[c == "slideDown" ? "slideUp" : c == "fadeIn" ? "fadeOut" : "hide"](c ? d : null, e), c || e(), this._datepickerShowing = !1;
				var f = this._get(b, "onClose");
				f && f.apply(b.input ? b.input[0] : null, [b.input ? b.input.val() : "", b]), this._lastInput = null, this._inDialog && (this._dialogInput.css({
					position: "absolute",
					left: "0",
					top: "-100px"
				}), $.blockUI && ($.unblockUI(), $("body").append(this.dpDiv))), this._inDialog = !1
			}
		},
		_tidyDialog: function(a) {
			a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
		},
		_checkExternalClick: function(a) {
			if (!$.datepicker._curInst) return;
			var b = $(a.target),
				c = $.datepicker._getInst(b[0]);
			(b[0].id != $.datepicker._mainDivId && b.parents("#" + $.datepicker._mainDivId).length == 0 && !b.hasClass($.datepicker.markerClassName) && !b.closest("." + $.datepicker._triggerClass).length && $.datepicker._datepickerShowing && (!$.datepicker._inDialog || !$.blockUI) || b.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != c) && $.datepicker._hideDatepicker()
		},
		_adjustDate: function(a, b, c) {
			var d = $(a),
				e = this._getInst(d[0]);
			if (this._isDisabledDatepicker(d[0])) return;
			this._adjustInstDate(e, b + (c == "M" ? this._get(e, "showCurrentAtPos") : 0), c), this._updateDatepicker(e)
		},
		_gotoToday: function(a) {
			var b = $(a),
				c = this._getInst(b[0]);
			if (this._get(c, "gotoCurrent") && c.currentDay) c.selectedDay = c.currentDay, c.drawMonth = c.selectedMonth = c.currentMonth, c.drawYear = c.selectedYear = c.currentYear;
			else {
				var d = new Date;
				c.selectedDay = d.getDate(), c.drawMonth = c.selectedMonth = d.getMonth(), c.drawYear = c.selectedYear = d.getFullYear()
			}
			this._notifyChange(c), this._adjustDate(b)
		},
		_selectMonthYear: function(a, b, c) {
			var d = $(a),
				e = this._getInst(d[0]);
			e["selected" + (c == "M" ? "Month" : "Year")] = e["draw" + (c == "M" ? "Month" : "Year")] = parseInt(b.options[b.selectedIndex].value, 10), this._notifyChange(e), this._adjustDate(d)
		},
		_selectDay: function(a, b, c, d) {
			var e = $(a);
			if ($(d).hasClass(this._unselectableClass) || this._isDisabledDatepicker(e[0])) return;
			var f = this._getInst(e[0]);
			f.selectedDay = f.currentDay = $("a", d).html(), f.selectedMonth = f.currentMonth = b, f.selectedYear = f.currentYear = c, this._selectDate(a, this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear))
		},
		_clearDate: function(a) {
			var b = $(a),
				c = this._getInst(b[0]);
			this._selectDate(b, "")
		},
		_selectDate: function(a, b) {
			var c = $(a),
				d = this._getInst(c[0]);
			b = b != null ? b : this._formatDate(d), d.input && d.input.val(b), this._updateAlternate(d);
			var e = this._get(d, "onSelect");
			e ? e.apply(d.input ? d.input[0] : null, [b, d]) : d.input && d.input.trigger("change"), d.inline ? this._updateDatepicker(d) : (this._hideDatepicker(), this._lastInput = d.input[0], typeof d.input[0] != "object" && d.input.focus(), this._lastInput = null)
		},
		_updateAlternate: function(a) {
			var b = this._get(a, "altField");
			if (b) {
				var c = this._get(a, "altFormat") || this._get(a, "dateFormat"),
					d = this._getDate(a),
					e = this.formatDate(c, d, this._getFormatConfig(a));
				$(b).each(function() {
					$(this).val(e)
				})
			}
		},
		noWeekends: function(a) {
			var b = a.getDay();
			return [b > 0 && b < 6, ""]
		},
		iso8601Week: function(a) {
			var b = new Date(a.getTime());
			b.setDate(b.getDate() + 4 - (b.getDay() || 7));
			var c = b.getTime();
			return b.setMonth(0), b.setDate(1), Math.floor(Math.round((c - b) / 864e5) / 7) + 1
		},
		parseDate: function(a, b, c) {
			if (a == null || b == null) throw "Invalid arguments";
			b = typeof b == "object" ? b.toString() : b + "";
			if (b == "") return null;
			var d = (c ? c.shortYearCutoff : null) || this._defaults.shortYearCutoff;
			d = typeof d != "string" ? d : (new Date).getFullYear() % 100 + parseInt(d, 10);
			var e = (c ? c.dayNamesShort : null) || this._defaults.dayNamesShort,
				f = (c ? c.dayNames : null) || this._defaults.dayNames,
				g = (c ? c.monthNamesShort : null) || this._defaults.monthNamesShort,
				h = (c ? c.monthNames : null) || this._defaults.monthNames,
				i = -1,
				j = -1,
				k = -1,
				l = -1,
				m = !1,
				n = function(b) {
					var c = s + 1 < a.length && a.charAt(s + 1) == b;
					return c && s++, c
				},
				o = function(a) {
					var c = n(a),
						d = a == "@" ? 14 : a == "!" ? 20 : a == "y" && c ? 4 : a == "o" ? 3 : 2,
						e = new RegExp("^\\d{1," + d + "}"),
						f = b.substring(r).match(e);
					if (!f) throw "Missing number at position " + r;
					return r += f[0].length, parseInt(f[0], 10)
				},
				p = function(a, c, d) {
					var e = $.map(n(a) ? d : c, function(a, b) {
							return [
								[b, a]
							]
						}).sort(function(a, b) {
							return -(a[1].length - b[1].length)
						}),
						f = -1;
					$.each(e, function(a, c) {
						var d = c[1];
						if (b.substr(r, d.length).toLowerCase() == d.toLowerCase()) return f = c[0], r += d.length, !1
					});
					if (f != -1) return f + 1;
					throw "Unknown name at position " + r
				},
				q = function() {
					if (b.charAt(r) != a.charAt(s)) throw "Unexpected literal at position " + r;
					r++
				},
				r = 0;
			for (var s = 0; s < a.length; s++)
				if (m) a.charAt(s) == "'" && !n("'") ? m = !1 : q();
				else switch (a.charAt(s)) {
					case "d":
						k = o("d");
						break;
					case "D":
						p("D", e, f);
						break;
					case "o":
						l = o("o");
						break;
					case "m":
						j = o("m");
						break;
					case "M":
						j = p("M", g, h);
						break;
					case "y":
						i = o("y");
						break;
					case "@":
						var t = new Date(o("@"));
						i = t.getFullYear(), j = t.getMonth() + 1, k = t.getDate();
						break;
					case "!":
						var t = new Date((o("!") - this._ticksTo1970) / 1e4);
						i = t.getFullYear(), j = t.getMonth() + 1, k = t.getDate();
						break;
					case "'":
						n("'") ? q() : m = !0;
						break;
					default:
						q()
				}
				if (r < b.length) throw "Extra/unparsed characters found in date: " + b.substring(r);
			i == -1 ? i = (new Date).getFullYear() : i < 100 && (i += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (i <= d ? 0 : -100));
			if (l > -1) {
				j = 1, k = l;
				do {
					var u = this._getDaysInMonth(i, j - 1);
					if (k <= u) break;
					j++, k -= u
				} while (!0)
			}
			var t = this._daylightSavingAdjust(new Date(i, j - 1, k));
			if (t.getFullYear() != i || t.getMonth() + 1 != j || t.getDate() != k) throw "Invalid date";
			return t
		},
		ATOM: "yy-mm-dd",
		COOKIE: "D, dd M yy",
		ISO_8601: "yy-mm-dd",
		RFC_822: "D, d M y",
		RFC_850: "DD, dd-M-y",
		RFC_1036: "D, d M y",
		RFC_1123: "D, d M yy",
		RFC_2822: "D, d M yy",
		RSS: "D, d M y",
		TICKS: "!",
		TIMESTAMP: "@",
		W3C: "yy-mm-dd",
		_ticksTo1970: (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 24 * 60 * 60 * 1e7,
		formatDate: function(a, b, c) {
			if (!b) return "";
			var d = (c ? c.dayNamesShort : null) || this._defaults.dayNamesShort,
				e = (c ? c.dayNames : null) || this._defaults.dayNames,
				f = (c ? c.monthNamesShort : null) || this._defaults.monthNamesShort,
				g = (c ? c.monthNames : null) || this._defaults.monthNames,
				h = function(b) {
					var c = m + 1 < a.length && a.charAt(m + 1) == b;
					return c && m++, c
				},
				i = function(a, b, c) {
					var d = "" + b;
					if (h(a))
						while (d.length < c) d = "0" + d;
					return d
				},
				j = function(a, b, c, d) {
					return h(a) ? d[b] : c[b]
				},
				k = "",
				l = !1;
			if (b)
				for (var m = 0; m < a.length; m++)
					if (l) a.charAt(m) == "'" && !h("'") ? l = !1 : k += a.charAt(m);
					else switch (a.charAt(m)) {
						case "d":
							k += i("d", b.getDate(), 2);
							break;
						case "D":
							k += j("D", b.getDay(), d, e);
							break;
						case "o":
							k += i("o", Math.round(((new Date(b.getFullYear(), b.getMonth(), b.getDate())).getTime() - (new Date(b.getFullYear(), 0, 0)).getTime()) / 864e5), 3);
							break;
						case "m":
							k += i("m", b.getMonth() + 1, 2);
							break;
						case "M":
							k += j("M", b.getMonth(), f, g);
							break;
						case "y":
							k += h("y") ? b.getFullYear() : (b.getYear() % 100 < 10 ? "0" : "") + b.getYear() % 100;
							break;
						case "@":
							k += b.getTime();
							break;
						case "!":
							k += b.getTime() * 1e4 + this._ticksTo1970;
							break;
						case "'":
							h("'") ? k += "'" : l = !0;
							break;
						default:
							k += a.charAt(m)
					}
					return k
		},
		_possibleChars: function(a) {
			var b = "",
				c = !1,
				d = function(b) {
					var c = e + 1 < a.length && a.charAt(e + 1) == b;
					return c && e++, c
				};
			for (var e = 0; e < a.length; e++)
				if (c) a.charAt(e) == "'" && !d("'") ? c = !1 : b += a.charAt(e);
				else switch (a.charAt(e)) {
					case "d":
					case "m":
					case "y":
					case "@":
						b += "0123456789";
						break;
					case "D":
					case "M":
						return null;
					case "'":
						d("'") ? b += "'" : c = !0;
						break;
					default:
						b += a.charAt(e)
				}
				return b
		},
		_get: function(a, b) {
			return a.settings[b] !== undefined ? a.settings[b] : this._defaults[b]
		},
		_setDateFromField: function(a, b) {
			if (a.input.val() == a.lastVal) return;
			var c = this._get(a, "dateFormat"),
				d = a.lastVal = a.input ? a.input.val() : null,
				e, f;
			e = f = this._getDefaultDate(a);
			var g = this._getFormatConfig(a);
			try {
				e = this.parseDate(c, d, g) || f
			} catch (h) {
				this.log(h), d = b ? "" : d
			}
			a.selectedDay = e.getDate(), a.drawMonth = a.selectedMonth = e.getMonth(), a.drawYear = a.selectedYear = e.getFullYear(), a.currentDay = d ? e.getDate() : 0, a.currentMonth = d ? e.getMonth() : 0, a.currentYear = d ? e.getFullYear() : 0, this._adjustInstDate(a)
		},
		_getDefaultDate: function(a) {
			return this._restrictMinMax(a, this._determineDate(a, this._get(a, "defaultDate"), new Date))
		},
		_determineDate: function(a, b, c) {
			var d = function(a) {
					var b = new Date;
					return b.setDate(b.getDate() + a), b
				},
				e = function(b) {
					try {
						return $.datepicker.parseDate($.datepicker._get(a, "dateFormat"), b, $.datepicker._getFormatConfig(a))
					} catch (c) {}
					var d = (b.toLowerCase().match(/^c/) ? $.datepicker._getDate(a) : null) || new Date,
						e = d.getFullYear(),
						f = d.getMonth(),
						g = d.getDate(),
						h = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
						i = h.exec(b);
					while (i) {
						switch (i[2] || "d") {
							case "d":
							case "D":
								g += parseInt(i[1], 10);
								break;
							case "w":
							case "W":
								g += parseInt(i[1], 10) * 7;
								break;
							case "m":
							case "M":
								f += parseInt(i[1], 10), g = Math.min(g, $.datepicker._getDaysInMonth(e, f));
								break;
							case "y":
							case "Y":
								e += parseInt(i[1], 10), g = Math.min(g, $.datepicker._getDaysInMonth(e, f))
						}
						i = h.exec(b)
					}
					return new Date(e, f, g)
				},
				f = b == null || b === "" ? c : typeof b == "string" ? e(b) : typeof b == "number" ? isNaN(b) ? c : d(b) : new Date(b.getTime());
			return f = f && f.toString() == "Invalid Date" ? c : f, f && (f.setHours(0), f.setMinutes(0), f.setSeconds(0), f.setMilliseconds(0)), this._daylightSavingAdjust(f)
		},
		_daylightSavingAdjust: function(a) {
			return a ? (a.setHours(a.getHours() > 12 ? a.getHours() + 2 : 0), a) : null
		},
		_setDate: function(a, b, c) {
			var d = !b,
				e = a.selectedMonth,
				f = a.selectedYear,
				g = this._restrictMinMax(a, this._determineDate(a, b, new Date));
			a.selectedDay = a.currentDay = g.getDate(), a.drawMonth = a.selectedMonth = a.currentMonth = g.getMonth(), a.drawYear = a.selectedYear = a.currentYear = g.getFullYear(), (e != a.selectedMonth || f != a.selectedYear) && !c && this._notifyChange(a), this._adjustInstDate(a), a.input && a.input.val(d ? "" : this._formatDate(a))
		},
		_getDate: function(a) {
			var b = !a.currentYear || a.input && a.input.val() == "" ? null : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay));
			return b
		},
		_attachHandlers: function(a) {
			var b = this._get(a, "stepMonths"),
				c = "#" + a.id.replace(/\\\\/g, "\\");
			a.dpDiv.find("[data-handler]").map(function() {
				var a = {
					prev: function() {
						window["DP_jQuery_" + dpuuid].datepicker._adjustDate(c, -b, "M")
					},
					next: function() {
						window["DP_jQuery_" + dpuuid].datepicker._adjustDate(c, +b, "M")
					},
					hide: function() {
						window["DP_jQuery_" + dpuuid].datepicker._hideDatepicker()
					},
					today: function() {
						window["DP_jQuery_" + dpuuid].datepicker._gotoToday(c)
					},
					selectDay: function() {
						return window["DP_jQuery_" + dpuuid].datepicker._selectDay(c, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), !1
					},
					selectMonth: function() {
						return window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(c, this, "M"), !1
					},
					selectYear: function() {
						return window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(c, this, "Y"), !1
					}
				};
				$(this).bind(this.getAttribute("data-event"), a[this.getAttribute("data-handler")])
			})
		},
		_generateHTML: function(a) {
			var b = new Date;
			b = this._daylightSavingAdjust(new Date(b.getFullYear(), b.getMonth(), b.getDate()));
			var c = this._get(a, "isRTL"),
				d = this._get(a, "showButtonPanel"),
				e = this._get(a, "hideIfNoPrevNext"),
				f = this._get(a, "navigationAsDateFormat"),
				g = this._getNumberOfMonths(a),
				h = this._get(a, "showCurrentAtPos"),
				i = this._get(a, "stepMonths"),
				j = g[0] != 1 || g[1] != 1,
				k = this._daylightSavingAdjust(a.currentDay ? new Date(a.currentYear, a.currentMonth, a.currentDay) : new Date(9999, 9, 9)),
				l = this._getMinMaxDate(a, "min"),
				m = this._getMinMaxDate(a, "max"),
				n = a.drawMonth - h,
				o = a.drawYear;
			n < 0 && (n += 12, o--);
			if (m) {
				var p = this._daylightSavingAdjust(new Date(m.getFullYear(), m.getMonth() - g[0] * g[1] + 1, m.getDate()));
				p = l && p < l ? l : p;
				while (this._daylightSavingAdjust(new Date(o, n, 1)) > p) n--, n < 0 && (n = 11, o--)
			}
			a.drawMonth = n, a.drawYear = o;
			var q = this._get(a, "prevText");
			q = f ? this.formatDate(q, this._daylightSavingAdjust(new Date(o, n - i, 1)), this._getFormatConfig(a)) : q;
			var r = this._canAdjustMonth(a, -1, o, n) ? '<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="' + q + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "e" : "w") + '">' + q + "</span></a>" : e ? "" : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + q + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "e" : "w") + '">' + q + "</span></a>",
				s = this._get(a, "nextText");
			s = f ? this.formatDate(s, this._daylightSavingAdjust(new Date(o, n + i, 1)), this._getFormatConfig(a)) : s;
			var t = this._canAdjustMonth(a, 1, o, n) ? '<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="' + s + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "w" : "e") + '">' + s + "</span></a>" : e ? "" : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + s + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "w" : "e") + '">' + s + "</span></a>",
				u = this._get(a, "currentText"),
				v = this._get(a, "gotoCurrent") && a.currentDay ? k : b;
			u = f ? this.formatDate(u, v, this._getFormatConfig(a)) : u;
			var w = a.inline ? "" : '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">' + this._get(a, "closeText") + "</button>",
				x = d ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (c ? w : "") + (this._isInRange(a, v) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">' + u + "</button>" : "") + (c ? "" : w) + "</div>" : "",
				y = parseInt(this._get(a, "firstDay"), 10);
			y = isNaN(y) ? 0 : y;
			var z = this._get(a, "showWeek"),
				A = this._get(a, "dayNames"),
				B = this._get(a, "dayNamesShort"),
				C = this._get(a, "dayNamesMin"),
				D = this._get(a, "monthNames"),
				E = this._get(a, "monthNamesShort"),
				F = this._get(a, "beforeShowDay"),
				G = this._get(a, "showOtherMonths"),
				H = this._get(a, "selectOtherMonths"),
				I = this._get(a, "calculateWeek") || this.iso8601Week,
				J = this._getDefaultDate(a),
				K = "";
			for (var L = 0; L < g[0]; L++) {
				var M = "";
				this.maxRows = 4;
				for (var N = 0; N < g[1]; N++) {
					var O = this._daylightSavingAdjust(new Date(o, n, a.selectedDay)),
						P = " ui-corner-all",
						Q = "";
					if (j) {
						Q += '<div class="ui-datepicker-group';
						if (g[1] > 1) switch (N) {
							case 0:
								Q += " ui-datepicker-group-first", P = " ui-corner-" + (c ? "right" : "left");
								break;
							case g[1] - 1:
								Q += " ui-datepicker-group-last", P = " ui-corner-" + (c ? "left" : "right");
								break;
							default:
								Q += " ui-datepicker-group-middle", P = ""
						}
						Q += '">'
					}
					Q += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + P + '">' + (/all|left/.test(P) && L == 0 ? c ? t : r : "") + (/all|right/.test(P) && L == 0 ? c ? r : t : "") + this._generateMonthYearHeader(a, n, o, l, m, L > 0 || N > 0, D, E) + '</div><table class="ui-datepicker-calendar"><thead>' + "<tr>";
					var R = z ? '<th class="ui-datepicker-week-col">' + this._get(a, "weekHeader") + "</th>" : "";
					for (var S = 0; S < 7; S++) {
						var T = (S + y) % 7;
						R += "<th" + ((S + y + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : "") + ">" + '<span title="' + A[T] + '">' + C[T] + "</span></th>"
					}
					Q += R + "</tr></thead><tbody>";
					var U = this._getDaysInMonth(o, n);
					o == a.selectedYear && n == a.selectedMonth && (a.selectedDay = Math.min(a.selectedDay, U));
					var V = (this._getFirstDayOfMonth(o, n) - y + 7) % 7,
						W = Math.ceil((V + U) / 7),
						X = j ? this.maxRows > W ? this.maxRows : W : W;
					this.maxRows = X;
					var Y = this._daylightSavingAdjust(new Date(o, n, 1 - V));
					for (var Z = 0; Z < X; Z++) {
						Q += "<tr>";
						var _ = z ? '<td class="ui-datepicker-week-col">' + this._get(a, "calculateWeek")(Y) + "</td>" : "";
						for (var S = 0; S < 7; S++) {
							var ba = F ? F.apply(a.input ? a.input[0] : null, [Y]) : [!0, ""],
								bb = Y.getMonth() != n,
								bc = bb && !H || !ba[0] || l && Y < l || m && Y > m;
							_ += '<td class="' + ((S + y + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (bb ? " ui-datepicker-other-month" : "") + (Y.getTime() == O.getTime() && n == a.selectedMonth && a._keyEvent || J.getTime() == Y.getTime() && J.getTime() == O.getTime() ? " " + this._dayOverClass : "") + (bc ? " " + this._unselectableClass + " ui-state-disabled" : "") + (bb && !G ? "" : " " + ba[1] + (Y.getTime() == k.getTime() ? " " + this._currentClass : "") + (Y.getTime() == b.getTime() ? " ui-datepicker-today" : "")) + '"' + ((!bb || G) && ba[2] ? ' title="' + ba[2] + '"' : "") + (bc ? "" : ' data-handler="selectDay" data-event="click" data-month="' + Y.getMonth() + '" data-year="' + Y.getFullYear() + '"') + ">" + (bb && !G ? "&#xa0;" : bc ? '<span class="ui-state-default">' + Y.getDate() + "</span>" : '<a class="ui-state-default' + (Y.getTime() == b.getTime() ? " ui-state-highlight" : "") + (Y.getTime() == k.getTime() ? " ui-state-active" : "") + (bb ? " ui-priority-secondary" : "") + '" href="#">' + Y.getDate() + "</a>") + "</td>", Y.setDate(Y.getDate() + 1), Y = this._daylightSavingAdjust(Y)
						}
						Q += _ + "</tr>"
					}
					n++, n > 11 && (n = 0, o++), Q += "</tbody></table>" + (j ? "</div>" + (g[0] > 0 && N == g[1] - 1 ? '<div class="ui-datepicker-row-break"></div>' : "") : ""), M += Q
				}
				K += M
			}
			return K += x + ($.browser.msie && parseInt($.browser.version, 10) < 7 && !a.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : ""), a._keyEvent = !1, K
		},
		_generateMonthYearHeader: function(a, b, c, d, e, f, g, h) {
			var i = this._get(a, "changeMonth"),
				j = this._get(a, "changeYear"),
				k = this._get(a, "showMonthAfterYear"),
				l = '<div class="ui-datepicker-title">',
				m = "";
			if (f || !i) m += '<span class="ui-datepicker-month">' + g[b] + "</span>";
			else {
				var n = d && d.getFullYear() == c,
					o = e && e.getFullYear() == c;
				m += '<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';
				for (var p = 0; p < 12; p++)(!n || p >= d.getMonth()) && (!o || p <= e.getMonth()) && (m += '<option value="' + p + '"' + (p == b ? ' selected="selected"' : "") + ">" + h[p] + "</option>");
				m += "</select>"
			}
			k || (l += m + (f || !i || !j ? "&#xa0;" : ""));
			if (!a.yearshtml) {
				a.yearshtml = "";
				if (f || !j) l += '<span class="ui-datepicker-year">' + c + "</span>";
				else {
					var q = this._get(a, "yearRange").split(":"),
						r = (new Date).getFullYear(),
						s = function(a) {
							var b = a.match(/c[+-].*/) ? c + parseInt(a.substring(1), 10) : a.match(/[+-].*/) ? r + parseInt(a, 10) : parseInt(a, 10);
							return isNaN(b) ? r : b
						},
						t = s(q[0]),
						u = Math.max(t, s(q[1] || ""));
					t = d ? Math.max(t, d.getFullYear()) : t, u = e ? Math.min(u, e.getFullYear()) : u, a.yearshtml += '<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';
					for (; t <= u; t++) a.yearshtml += '<option value="' + t + '"' + (t == c ? ' selected="selected"' : "") + ">" + t + "</option>";
					a.yearshtml += "</select>", l += a.yearshtml, a.yearshtml = null
				}
			}
			return l += this._get(a, "yearSuffix"), k && (l += (f || !i || !j ? "&#xa0;" : "") + m), l += "</div>", l
		},
		_adjustInstDate: function(a, b, c) {
			var d = a.drawYear + (c == "Y" ? b : 0),
				e = a.drawMonth + (c == "M" ? b : 0),
				f = Math.min(a.selectedDay, this._getDaysInMonth(d, e)) + (c == "D" ? b : 0),
				g = this._restrictMinMax(a, this._daylightSavingAdjust(new Date(d, e, f)));
			a.selectedDay = g.getDate(), a.drawMonth = a.selectedMonth = g.getMonth(), a.drawYear = a.selectedYear = g.getFullYear(), (c == "M" || c == "Y") && this._notifyChange(a)
		},
		_restrictMinMax: function(a, b) {
			var c = this._getMinMaxDate(a, "min"),
				d = this._getMinMaxDate(a, "max"),
				e = c && b < c ? c : b;
			return e = d && e > d ? d : e, e
		},
		_notifyChange: function(a) {
			var b = this._get(a, "onChangeMonthYear");
			b && b.apply(a.input ? a.input[0] : null, [a.selectedYear, a.selectedMonth + 1, a])
		},
		_getNumberOfMonths: function(a) {
			var b = this._get(a, "numberOfMonths");
			return b == null ? [1, 1] : typeof b == "number" ? [1, b] : b
		},
		_getMinMaxDate: function(a, b) {
			return this._determineDate(a, this._get(a, b + "Date"), null)
		},
		_getDaysInMonth: function(a, b) {
			return 32 - this._daylightSavingAdjust(new Date(a, b, 32)).getDate()
		},
		_getFirstDayOfMonth: function(a, b) {
			return (new Date(a, b, 1)).getDay()
		},
		_canAdjustMonth: function(a, b, c, d) {
			var e = this._getNumberOfMonths(a),
				f = this._daylightSavingAdjust(new Date(c, d + (b < 0 ? b : e[0] * e[1]), 1));
			return b < 0 && f.setDate(this._getDaysInMonth(f.getFullYear(), f.getMonth())), this._isInRange(a, f)
		},
		_isInRange: function(a, b) {
			var c = this._getMinMaxDate(a, "min"),
				d = this._getMinMaxDate(a, "max");
			return (!c || b.getTime() >= c.getTime()) && (!d || b.getTime() <= d.getTime())
		},
		_getFormatConfig: function(a) {
			var b = this._get(a, "shortYearCutoff");
			return b = typeof b != "string" ? b : (new Date).getFullYear() % 100 + parseInt(b, 10), {
				shortYearCutoff: b,
				dayNamesShort: this._get(a, "dayNamesShort"),
				dayNames: this._get(a, "dayNames"),
				monthNamesShort: this._get(a, "monthNamesShort"),
				monthNames: this._get(a, "monthNames")
			}
		},
		_formatDate: function(a, b, c, d) {
			b || (a.currentDay = a.selectedDay, a.currentMonth = a.selectedMonth, a.currentYear = a.selectedYear);
			var e = b ? typeof b == "object" ? b : this._daylightSavingAdjust(new Date(d, c, b)) : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay));
			return this.formatDate(this._get(a, "dateFormat"), e, this._getFormatConfig(a))
		}
	}), $.fn.datepicker = function(a) {
		if (!this.length) return this;
		$.datepicker.initialized || ($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv), $.datepicker.initialized = !0);
		var b = Array.prototype.slice.call(arguments, 1);
		return typeof a != "string" || a != "isDisabled" && a != "getDate" && a != "widget" ? a == "option" && arguments.length == 2 && typeof arguments[1] == "string" ? $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this[0]].concat(b)) : this.each(function() {
			typeof a == "string" ? $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this].concat(b)) : $.datepicker._attachDatepicker(this, a)
		}) : $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this[0]].concat(b))
	}, $.datepicker = new Datepicker, $.datepicker.initialized = !1, $.datepicker.uuid = (new Date).getTime(), $.datepicker.version = "1.8.23", window["DP_jQuery_" + dpuuid] = $
})(jQuery);;
jQuery(function($) {
	$.datepicker.regional['pl'] = {
		closeText: 'Zamknij',
		prevText: '&#x3c;Poprzedni',
		nextText: 'Następny&#x3e;',
		currentText: 'Dziś',
		monthNames: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'],
		monthNamesShort: ['Sty', 'Lu', 'Mar', 'Kw', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Pa', 'Lis', 'Gru'],
		dayNames: ['Niedziela', 'Poniedzialek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'],
		dayNamesShort: ['Nie', 'Pn', 'Wt', 'Śr', 'Czw', 'Pt', 'So'],
		dayNamesMin: ['N', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'],
		weekHeader: 'Tydz',
		dateFormat: 'yy-mm-dd',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''
	};
	$.datepicker.setDefaults($.datepicker.regional['pl']);
});
var EditoStart = new Object();
EditoStart.functions = new Array();
EditoStart.Add = function(fnc) {
	EditoStart.functions[EditoStart.functions.length] = fnc;
}
EditoStart.init = function() {
	for (var i = 0; i < EditoStart.functions.length; i++) {
		EditoStart.functions[i]();
	}
}
$(document).ready(function() {
	EditoStart.init();
});
$(document).ready(function() {
	$('a[class~="js-lightbox"]').fancybox({
		'overlayColor': '#000',
		'titlePosition': 'over'
	});
	var videoWidth = 800;
	var videoHeight = 600;
	if (window.innerWidth < 900) {
		videoWidth = Math.floor(window.innerWidth * 0.8);
		videoHeight = Math.floor(videoWidth * 0.75);
	}
	$(".video a.iframe").fancybox({
		'hideOnContentClick': false,
		'onComplete': setFrameSize
	});
	$('form:not(.jquery_form)').bind('submit', function() {
		$('input[type=submit]', this).attr('disabled', 'disabled');
	})
	$(".js-datepicker").datepicker($.datepicker.regional['pl']);
});

function insertActiveX(html) {
	document.write(html);
}

function findObj(obj) {
	return document.getElementById(obj);
}

function preloadimages(images) {
	if (!images) {
		var images = new Array();
	}
	var img = new Array();
	for (i = 0; i < images.length; i++) {
		img[i] = new Image();
		img[i].src = images[i];
	}
}

function swapImage(id, img) {
	o = findObj(id);
	if (o)
		o.src = img;
}

function SendTo(before, after, user, host, label) {
	label = label.replace(' // ', '@');
	document.write('<a' + before + 'href="mailto:' + user + '@' + host + '"' + after + '>' + label + '</a>');
	console.log("/" + before + "/" + after + "/" + user + " /" + host + "/" + label);
}

function popUpWindow(src, w, h) {
	noweOkienko = null;
	if (window.screen) {
		aw = screen.availWidth;
		ah = screen.availHeight;
	} else {
		aw = 640;
		ah = 450;
	}
	if (noweOkienko == null || noweOkienko.closed) {
		ustawienia = "left=" + (aw - w) / 2 + "," + "top=" + (ah - h) / 2 + "," + "screenX=" + (aw - w) / 2 + "," + "screenY=" + (ah - h) / 2 + "," + "width=" + w + "," + "height=" + h + "," + "innerWidth=" + w + "," + "innerHeight=" + h + "," + "toolbar=no," + "location=no," + "directories=no," + "status=yes," + "menubar=no," + "scrollbars=yes," + "resizable=no"
		var url = '/' + src;
		noweOkienko = window.open(url, 'plik', ustawienia);
	}
	try {
		noweOkienko.focus();
	} catch (e) {}
}

function showResult(id, elem) {
	o = document.getElementById(id);
	if (o.style.display == '' || o.style.display == 'none') {
		o.style.display = 'block';
		$(elem).addClass('active');
	} else {
		o.style.display = 'none';
		$(elem).removeClass('active');
	}
}

function limiter(obj, limit) {
	if (obj.value.length > limit) {
		obj.value = obj.value.substring(0, limit);
	}
}

function limit(obj, limit, msg) {
	if (obj.value.length > limit) {
		obj.value = obj.value.substring(0, limit);
		alert(msg);
	}
}

function getCookie(name) {
	var dc = document.cookie;
	var cname = name + "=";
	var clen = dc.length;
	var cbegin = 0;
	while (cbegin < clen) {
		var vbegin = cbegin + cname.length;
		if (dc.substring(cbegin, vbegin) == cname) {
			var vend = dc.indexOf(";", vbegin);
			if (vend == -1) vend = clen;
			return unescape(dc.substring(vbegin, vend));
		}
		cbegin = dc.indexOf(" ", cbegin) + 1;
		if (cbegin == 0) break;
	}
	return null;
}

function setCookie(name, value, days, path, domain, secure) {
	var expires = null;
	if (days) {
		expires = new Date();
		var theDay = expires.getDate();
		theDay = theDay + days;
		expires.setDate(theDay);
	}
	var ciacho = name + "=" + escape(value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
	document.cookie = ciacho;
}

function TabStrip(id, tabsCount) {
	this.selected = id;
	this.tabsCount = tabsCount;
	this.renderTabs(this.selected);
}
TabStrip.prototype.renderTabs = function(selected) {
	for (var i = 0; i < this.tabsCount; i++) {
		if (i == selected)
			this.setActive(i);
		else
			this.setInactive(i);
	}
}
TabStrip.prototype.setActive = function(id) {
	findObj('TabStrip_' + id).style.display = '';
	findObj('TabStripHeader_' + id).className = 'TabStripActive';
	setCookie('TabStrip_activeTab', id);
}
TabStrip.prototype.setInactive = function(id) {
	findObj('TabStrip_' + id).style.display = 'none';
	findObj('TabStripHeader_' + id).className = 'TabStripInactive';
}
TabStrip.prototype.showTab = function(id) {
	this.renderTabs(id);
}

function showWin(src, w, h, title) {
	$('#PopupDiv').css("height", document.body.clientHeight + "px");
	$('#PopupDiv #PopupContent').css("width", w);
	$('#PopupDiv #PopupContent').css("height", h);
	if ($('#PopupDiv #PopupContent').find('#start').length == 0) {
		var content = '<table id="PopUp" class="PopUp" cellspacing="0" cellpadding="0">' + '     <tr>' + '      <td colspan="3" class="TitleBar">' + '       <table width="100%" cellspacing="0" cellpadding="0">' + '        <tr>' + '         <td class="btl">&nbsp;</td>' + '         <td class="bt"><span class="Title"></span></td>' + '         <td class="btc"><a href="javascript: void(hideWin());"><img src="/admin/Data/Images/popup/BtnClose.gif" width="16" height="16" class="Close" /></a></td>' + '         <td class="btr">&nbsp;</td>' + '        </tr>' + '       </table>' + '      </td>' + '     </tr>' + '     <tr>' + '      <td class="b bl">&nbsp;</td>' + '      <td class="bg"><div style="width: 100%; height:' + h + 'px; position: relative;">' + '       <div id="PopupLoading" style="width: 100%; height: 100%; background-color: #ffffff; position: absolute; border: 1px solid #888888;">' + '        <table style="width: 100%; height: 100%;">' + '         <tr>' + '          <td align="center" valign="middle">' + '           <img src="/admin/Data/Images/bigrotation.gif">' + '          </td>' + '         </tr>' + '        </table>' + '       </div>' + '       <iframe src="/szablony/blank.html" name="start" id="start" width="100%" height="100%" style="border: 1px solid #888888; background-color: #ffffff;" marginheight="0" marginwidth="0" scrolling="auto"></iframe></div>' + '      </td>' + '      <td class="b br">&nbsp;</td>' + '     </tr>' + '     <tr>' + '      <td class="b bbl">&nbsp;</td>' + '      <td class="b bb">&nbsp;</td>' + '      <td class="b bbr">&nbsp;</td>' + '     </tr>' + '    </table>';
		$('#PopupDiv #PopupContent').append(content);
	}
	if (title != undefined) $('.PopUp .Title').html(title);
	$('#PopupLoading').show();
	$('#PopupDiv').show();
	window.frames['start'].location.href = src + '&ispopup=1';
	return window.frames['start'];
}

function hideWin() {
	$('.PopUp .Title').html('');
	$('#PopupDiv').hide();
	window.frames['start'].location.href = '/szablony/blank.html';
}
jQuery.fn.extend({
	showAjaxIndicator: function() {
		var div = $('<div class="js-loader"></div>');
		this.before(div);
		div.css('width', this.get(0).offsetWidth + 'px');
		div.css('height', this.get(0).offsetHeight + 'px');
		div.css('top', this.get(0).offsetTop + 'px');
		div.css('left', this.get(0).offsetLeft + 'px');
	}
});
jQuery.fn.extend({
	hideAjaxIndicator: function() {
		$(this).prev('div.js-loader').remove();
	}
});

function addBookmarkForBrowser(msg) {
	if (window.sidebar) {
		window.sidebar.addPanel(document.title, document.location.href, "");
	} else if (window.external) {
		window.external.AddFavorite(document.location.href, document.title);
	} else if (window.opera && window.print) {
		alert(msg);
	}
	return false;
}
var swfobject = function() {
	var D = "undefined",
		r = "object",
		S = "Shockwave Flash",
		W = "ShockwaveFlash.ShockwaveFlash",
		q = "application/x-shockwave-flash",
		R = "SWFObjectExprInst",
		x = "onreadystatechange",
		O = window,
		j = document,
		t = navigator,
		T = false,
		U = [h],
		o = [],
		N = [],
		I = [],
		l, Q, E, B, J = false,
		a = false,
		n, G, m = true,
		M = function() {
			var aa = typeof j.getElementById != D && typeof j.getElementsByTagName != D && typeof j.createElement != D,
				ah = t.userAgent.toLowerCase(),
				Y = t.platform.toLowerCase(),
				ae = Y ? /win/.test(Y) : /win/.test(ah),
				ac = Y ? /mac/.test(Y) : /mac/.test(ah),
				af = /webkit/.test(ah) ? parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,
				X = !+"\v1",
				ag = [0, 0, 0],
				ab = null;
			if (typeof t.plugins != D && typeof t.plugins[S] == r) {
				ab = t.plugins[S].description;
				if (ab && !(typeof t.mimeTypes != D && t.mimeTypes[q] && !t.mimeTypes[q].enabledPlugin)) {
					T = true;
					X = false;
					ab = ab.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
					ag[0] = parseInt(ab.replace(/^(.*)\..*$/, "$1"), 10);
					ag[1] = parseInt(ab.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
					ag[2] = /[a-zA-Z]/.test(ab) ? parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0
				}
			} else {
				if (typeof O.ActiveXObject != D) {
					try {
						var ad = new ActiveXObject(W);
						if (ad) {
							ab = ad.GetVariable("$version");
							if (ab) {
								X = true;
								ab = ab.split(" ")[1].split(",");
								ag = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)]
							}
						}
					} catch (Z) {}
				}
			}
			return {
				w3: aa,
				pv: ag,
				wk: af,
				ie: X,
				win: ae,
				mac: ac
			}
		}(),
		k = function() {
			if (!M.w3) {
				return
			}
			if ((typeof j.readyState != D && j.readyState == "complete") || (typeof j.readyState == D && (j.getElementsByTagName("body")[0] || j.body))) {
				f()
			}
			if (!J) {
				if (typeof j.addEventListener != D) {
					j.addEventListener("DOMContentLoaded", f, false)
				}
				if (M.ie && M.win) {
					j.attachEvent(x, function() {
						if (j.readyState == "complete") {
							j.detachEvent(x, arguments.callee);
							f()
						}
					});
					if (O == top) {
						(function() {
							if (J) {
								return
							}
							try {
								j.documentElement.doScroll("left")
							} catch (X) {
								setTimeout(arguments.callee, 0);
								return
							}
							f()
						})()
					}
				}
				if (M.wk) {
					(function() {
						if (J) {
							return
						}
						if (!/loaded|complete/.test(j.readyState)) {
							setTimeout(arguments.callee, 0);
							return
						}
						f()
					})()
				}
				s(f)
			}
		}();

	function f() {
		if (J) {
			return
		}
		try {
			var Z = j.getElementsByTagName("body")[0].appendChild(C("span"));
			Z.parentNode.removeChild(Z)
		} catch (aa) {
			return
		}
		J = true;
		var X = U.length;
		for (var Y = 0; Y < X; Y++) {
			U[Y]()
		}
	}

	function K(X) {
		if (J) {
			X()
		} else {
			U[U.length] = X
		}
	}

	function s(Y) {
		if (typeof O.addEventListener != D) {
			O.addEventListener("load", Y, false)
		} else {
			if (typeof j.addEventListener != D) {
				j.addEventListener("load", Y, false)
			} else {
				if (typeof O.attachEvent != D) {
					i(O, "onload", Y)
				} else {
					if (typeof O.onload == "function") {
						var X = O.onload;
						O.onload = function() {
							X();
							Y()
						}
					} else {
						O.onload = Y
					}
				}
			}
		}
	}

	function h() {
		if (T) {
			V()
		} else {
			H()
		}
	}

	function V() {
		var X = j.getElementsByTagName("body")[0];
		var aa = C(r);
		aa.setAttribute("type", q);
		var Z = X.appendChild(aa);
		if (Z) {
			var Y = 0;
			(function() {
				if (typeof Z.GetVariable != D) {
					var ab = Z.GetVariable("$version");
					if (ab) {
						ab = ab.split(" ")[1].split(",");
						M.pv = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)]
					}
				} else {
					if (Y < 10) {
						Y++;
						setTimeout(arguments.callee, 10);
						return
					}
				}
				X.removeChild(aa);
				Z = null;
				H()
			})()
		} else {
			H()
		}
	}

	function H() {
		var ag = o.length;
		if (ag > 0) {
			for (var af = 0; af < ag; af++) {
				var Y = o[af].id;
				var ab = o[af].callbackFn;
				var aa = {
					success: false,
					id: Y
				};
				if (M.pv[0] > 0) {
					var ae = c(Y);
					if (ae) {
						if (F(o[af].swfVersion) && !(M.wk && M.wk < 312)) {
							w(Y, true);
							if (ab) {
								aa.success = true;
								aa.ref = z(Y);
								ab(aa)
							}
						} else {
							if (o[af].expressInstall && A()) {
								var ai = {};
								ai.data = o[af].expressInstall;
								ai.width = ae.getAttribute("width") || "0";
								ai.height = ae.getAttribute("height") || "0";
								if (ae.getAttribute("class")) {
									ai.styleclass = ae.getAttribute("class")
								}
								if (ae.getAttribute("align")) {
									ai.align = ae.getAttribute("align")
								}
								var ah = {};
								var X = ae.getElementsByTagName("param");
								var ac = X.length;
								for (var ad = 0; ad < ac; ad++) {
									if (X[ad].getAttribute("name").toLowerCase() != "movie") {
										ah[X[ad].getAttribute("name")] = X[ad].getAttribute("value")
									}
								}
								P(ai, ah, Y, ab)
							} else {
								p(ae);
								if (ab) {
									ab(aa)
								}
							}
						}
					}
				} else {
					w(Y, true);
					if (ab) {
						var Z = z(Y);
						if (Z && typeof Z.SetVariable != D) {
							aa.success = true;
							aa.ref = Z
						}
						ab(aa)
					}
				}
			}
		}
	}

	function z(aa) {
		var X = null;
		var Y = c(aa);
		if (Y && Y.nodeName == "OBJECT") {
			if (typeof Y.SetVariable != D) {
				X = Y
			} else {
				var Z = Y.getElementsByTagName(r)[0];
				if (Z) {
					X = Z
				}
			}
		}
		return X
	}

	function A() {
		return !a && F("6.0.65") && (M.win || M.mac) && !(M.wk && M.wk < 312)
	}

	function P(aa, ab, X, Z) {
		a = true;
		E = Z || null;
		B = {
			success: false,
			id: X
		};
		var ae = c(X);
		if (ae) {
			if (ae.nodeName == "OBJECT") {
				l = g(ae);
				Q = null
			} else {
				l = ae;
				Q = X
			}
			aa.id = R;
			if (typeof aa.width == D || (!/%$/.test(aa.width) && parseInt(aa.width, 10) < 310)) {
				aa.width = "310"
			}
			if (typeof aa.height == D || (!/%$/.test(aa.height) && parseInt(aa.height, 10) < 137)) {
				aa.height = "137"
			}
			j.title = j.title.slice(0, 47) + " - Flash Player Installation";
			var ad = M.ie && M.win ? "ActiveX" : "PlugIn",
				ac = "MMredirectURL=" + O.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + ad + "&MMdoctitle=" + j.title;
			if (typeof ab.flashvars != D) {
				ab.flashvars += "&" + ac
			} else {
				ab.flashvars = ac
			}
			if (M.ie && M.win && ae.readyState != 4) {
				var Y = C("div");
				X += "SWFObjectNew";
				Y.setAttribute("id", X);
				ae.parentNode.insertBefore(Y, ae);
				ae.style.display = "none";
				(function() {
					if (ae.readyState == 4) {
						ae.parentNode.removeChild(ae)
					} else {
						setTimeout(arguments.callee, 10)
					}
				})()
			}
			u(aa, ab, X)
		}
	}

	function p(Y) {
		if (M.ie && M.win && Y.readyState != 4) {
			var X = C("div");
			Y.parentNode.insertBefore(X, Y);
			X.parentNode.replaceChild(g(Y), X);
			Y.style.display = "none";
			(function() {
				if (Y.readyState == 4) {
					Y.parentNode.removeChild(Y)
				} else {
					setTimeout(arguments.callee, 10)
				}
			})()
		} else {
			Y.parentNode.replaceChild(g(Y), Y)
		}
	}

	function g(ab) {
		var aa = C("div");
		if (M.win && M.ie) {
			aa.innerHTML = ab.innerHTML
		} else {
			var Y = ab.getElementsByTagName(r)[0];
			if (Y) {
				var ad = Y.childNodes;
				if (ad) {
					var X = ad.length;
					for (var Z = 0; Z < X; Z++) {
						if (!(ad[Z].nodeType == 1 && ad[Z].nodeName == "PARAM") && !(ad[Z].nodeType == 8)) {
							aa.appendChild(ad[Z].cloneNode(true))
						}
					}
				}
			}
		}
		return aa
	}

	function u(ai, ag, Y) {
		var X, aa = c(Y);
		if (M.wk && M.wk < 312) {
			return X
		}
		if (aa) {
			if (typeof ai.id == D) {
				ai.id = Y
			}
			if (M.ie && M.win) {
				var ah = "";
				for (var ae in ai) {
					if (ai[ae] != Object.prototype[ae]) {
						if (ae.toLowerCase() == "data") {
							ag.movie = ai[ae]
						} else {
							if (ae.toLowerCase() == "styleclass") {
								ah += ' class="' + ai[ae] + '"'
							} else {
								if (ae.toLowerCase() != "classid") {
									ah += " " + ae + '="' + ai[ae] + '"'
								}
							}
						}
					}
				}
				var af = "";
				for (var ad in ag) {
					if (ag[ad] != Object.prototype[ad]) {
						af += '<param name="' + ad + '" value="' + ag[ad] + '" />'
					}
				}
				aa.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ah + ">" + af + "</object>";
				N[N.length] = ai.id;
				X = c(ai.id)
			} else {
				var Z = C(r);
				Z.setAttribute("type", q);
				for (var ac in ai) {
					if (ai[ac] != Object.prototype[ac]) {
						if (ac.toLowerCase() == "styleclass") {
							Z.setAttribute("class", ai[ac])
						} else {
							if (ac.toLowerCase() != "classid") {
								Z.setAttribute(ac, ai[ac])
							}
						}
					}
				}
				for (var ab in ag) {
					if (ag[ab] != Object.prototype[ab] && ab.toLowerCase() != "movie") {
						e(Z, ab, ag[ab])
					}
				}
				aa.parentNode.replaceChild(Z, aa);
				X = Z
			}
		}
		return X
	}

	function e(Z, X, Y) {
		var aa = C("param");
		aa.setAttribute("name", X);
		aa.setAttribute("value", Y);
		Z.appendChild(aa)
	}

	function y(Y) {
		var X = c(Y);
		if (X && X.nodeName == "OBJECT") {
			if (M.ie && M.win) {
				X.style.display = "none";
				(function() {
					if (X.readyState == 4) {
						b(Y)
					} else {
						setTimeout(arguments.callee, 10)
					}
				})()
			} else {
				X.parentNode.removeChild(X)
			}
		}
	}

	function b(Z) {
		var Y = c(Z);
		if (Y) {
			for (var X in Y) {
				if (typeof Y[X] == "function") {
					Y[X] = null
				}
			}
			Y.parentNode.removeChild(Y)
		}
	}

	function c(Z) {
		var X = null;
		try {
			X = j.getElementById(Z)
		} catch (Y) {}
		return X
	}

	function C(X) {
		return j.createElement(X)
	}

	function i(Z, X, Y) {
		Z.attachEvent(X, Y);
		I[I.length] = [Z, X, Y]
	}

	function F(Z) {
		var Y = M.pv,
			X = Z.split(".");
		X[0] = parseInt(X[0], 10);
		X[1] = parseInt(X[1], 10) || 0;
		X[2] = parseInt(X[2], 10) || 0;
		return (Y[0] > X[0] || (Y[0] == X[0] && Y[1] > X[1]) || (Y[0] == X[0] && Y[1] == X[1] && Y[2] >= X[2])) ? true : false
	}

	function v(ac, Y, ad, ab) {
		if (M.ie && M.mac) {
			return
		}
		var aa = j.getElementsByTagName("head")[0];
		if (!aa) {
			return
		}
		var X = (ad && typeof ad == "string") ? ad : "screen";
		if (ab) {
			n = null;
			G = null
		}
		if (!n || G != X) {
			var Z = C("style");
			Z.setAttribute("type", "text/css");
			Z.setAttribute("media", X);
			n = aa.appendChild(Z);
			if (M.ie && M.win && typeof j.styleSheets != D && j.styleSheets.length > 0) {
				n = j.styleSheets[j.styleSheets.length - 1]
			}
			G = X
		}
		if (M.ie && M.win) {
			if (n && typeof n.addRule == r) {
				n.addRule(ac, Y)
			}
		} else {
			if (n && typeof j.createTextNode != D) {
				n.appendChild(j.createTextNode(ac + " {" + Y + "}"))
			}
		}
	}

	function w(Z, X) {
		if (!m) {
			return
		}
		var Y = X ? "visible" : "hidden";
		if (J && c(Z)) {
			c(Z).style.visibility = Y
		} else {
			v("#" + Z, "visibility:" + Y)
		}
	}

	function L(Y) {
		var Z = /[\\\"<>\.;]/;
		var X = Z.exec(Y) != null;
		return X && typeof encodeURIComponent != D ? encodeURIComponent(Y) : Y
	}
	var d = function() {
		if (M.ie && M.win) {
			window.attachEvent("onunload", function() {
				var ac = I.length;
				for (var ab = 0; ab < ac; ab++) {
					I[ab][0].detachEvent(I[ab][1], I[ab][2])
				}
				var Z = N.length;
				for (var aa = 0; aa < Z; aa++) {
					y(N[aa])
				}
				for (var Y in M) {
					M[Y] = null
				}
				M = null;
				for (var X in swfobject) {
					swfobject[X] = null
				}
				swfobject = null
			})
		}
	}();
	return {
		registerObject: function(ab, X, aa, Z) {
			if (M.w3 && ab && X) {
				var Y = {};
				Y.id = ab;
				Y.swfVersion = X;
				Y.expressInstall = aa;
				Y.callbackFn = Z;
				o[o.length] = Y;
				w(ab, false)
			} else {
				if (Z) {
					Z({
						success: false,
						id: ab
					})
				}
			}
		},
		getObjectById: function(X) {
			if (M.w3) {
				return z(X)
			}
		},
		embedSWF: function(ab, ah, ae, ag, Y, aa, Z, ad, af, ac) {
			var X = {
				success: false,
				id: ah
			};
			if (M.w3 && !(M.wk && M.wk < 312) && ab && ah && ae && ag && Y) {
				w(ah, false);
				K(function() {
					ae += "";
					ag += "";
					var aj = {};
					if (af && typeof af === r) {
						for (var al in af) {
							aj[al] = af[al]
						}
					}
					aj.data = ab;
					aj.width = ae;
					aj.height = ag;
					var am = {};
					if (ad && typeof ad === r) {
						for (var ak in ad) {
							am[ak] = ad[ak]
						}
					}
					if (Z && typeof Z === r) {
						for (var ai in Z) {
							if (typeof am.flashvars != D) {
								am.flashvars += "&" + ai + "=" + Z[ai]
							} else {
								am.flashvars = ai + "=" + Z[ai]
							}
						}
					}
					if (F(Y)) {
						var an = u(aj, am, ah);
						if (aj.id == ah) {
							w(ah, true)
						}
						X.success = true;
						X.ref = an
					} else {
						if (aa && A()) {
							aj.data = aa;
							P(aj, am, ah, ac);
							return
						} else {
							w(ah, true)
						}
					}
					if (ac) {
						ac(X)
					}
				})
			} else {
				if (ac) {
					ac(X)
				}
			}
		},
		switchOffAutoHideShow: function() {
			m = false
		},
		ua: M,
		getFlashPlayerVersion: function() {
			return {
				major: M.pv[0],
				minor: M.pv[1],
				release: M.pv[2]
			}
		},
		hasFlashPlayerVersion: F,
		createSWF: function(Z, Y, X) {
			if (M.w3) {
				return u(Z, Y, X)
			} else {
				return undefined
			}
		},
		showExpressInstall: function(Z, aa, X, Y) {
			if (M.w3 && A()) {
				P(Z, aa, X, Y)
			}
		},
		removeSWF: function(X) {
			if (M.w3) {
				y(X)
			}
		},
		createCSS: function(aa, Z, Y, X) {
			if (M.w3) {
				v(aa, Z, Y, X)
			}
		},
		addDomLoadEvent: K,
		addLoadEvent: s,
		getQueryParamValue: function(aa) {
			var Z = j.location.search || j.location.hash;
			if (Z) {
				if (/\?/.test(Z)) {
					Z = Z.split("?")[1]
				}
				if (aa == null) {
					return L(Z)
				}
				var Y = Z.split("&");
				for (var X = 0; X < Y.length; X++) {
					if (Y[X].substring(0, Y[X].indexOf("=")) == aa) {
						return L(Y[X].substring((Y[X].indexOf("=") + 1)))
					}
				}
			}
			return ""
		},
		expressInstallCallback: function() {
			if (a) {
				var X = c(R);
				if (X && l) {
					X.parentNode.replaceChild(l, X);
					if (Q) {
						w(Q, true);
						if (M.ie && M.win) {
							l.style.display = "block"
						}
					}
					if (E) {
						E(B)
					}
				}
				a = false
			}
		}
	}
}();
$(document).ready(function() {
	var panels = $('.df-main');
	panels.hide().eq(0).show();
	if (panels.find('.df-button-next'))
		panels.find('.df-button-prev:last').show();
	panels.eq(0).find('.df-button-prev').hide();
	panels.find('.df-button-prev').click(function() {
		panels.filter(':visible').hide().prev().show();
	});
	panels.find('.df-button-next').click(function() {
		panels.filter(':visible').hide().next().show();
	});
});

function popup() {
	var html = '\'';
	html += '<div id="popup-box">';
	html += '<div class="overlay" style="filter: alpha(opacity=80);"></div>';
	html += '<div class="popup-content">';
	html += '<div class="box1">';
	html += '<div class="box1-top"><div></div></div>';
	html += '<div class="box1-middle" id="popup-content">';
	html += '<a id="btnClose"><img src="/szablony/default/images/lightbox/lightbox-btn-close.gif"></a>';
	html += '</div>';
	html += '<div class="box1-bottom"><div></div></div>';
	html += '</div>';
	html += '</div>';
	html += '</div>\'';
	$("body").append(html);
	$("#popup-box .overlay").fadeIn(300, function() {});
	$("#popup-box .overlay").click(function() {
		hidePopup();
	});
	$("#popup-box .overlay").click(function() {
		hidePopup();
	});
	$("#popup-box #btnClose").click(function() {
		hidePopup();
	});
}

function addPopupContent(data) {
	$("#popup-content").append(data);
}

function showPopup() {
	$(".popup-content").fadeIn(300, function() {});
}

function hidePopup(time) {
	if (time) {
		setTimeout(function() {
			$("#popup-box").remove();
		}, 1500);
	} else {
		$("#popup-box").remove();
	}
}

function showInfo(info) {
	$(".suggestion-block #js-info").show();
	$(".suggestion-block #js-info").html(info);
}
$(document).ready(function() {
	$(function() {
		$("#js-suggestion-button").click(function() {
			var url = this.href;
			var dialog = $('<div style="display:none" class="js-loader"></div>').appendTo('body');
			dialog.dialog({
				title: $("#js-suggestion-button").text(),
				width: "auto",
				close: function(event, ui) {
					dialog.remove();
				},
				modal: true
			});
			dialog.load(url, {}, function(responseText, textStatus, XMLHttpRequest) {
				dialog.removeClass('js-loader');
				$(".ui-dialog-content").dialog("option", "position", "center");
			});
			return false;
		});
	});
	$("form[name=suggestion_form]").live("submit", function() {
		link = $('form[name=suggestion_form]').attr('action');
		var email = $('form[name=suggestion_form] input[name=email]').val();
		var subject = $('form[name=suggestion_form] input[name=temat]').val();
		var text = $('form[name=suggestion_form] textarea[name=tresc]').val();
		$.ajax({
			url: link,
			type: "POST",
			dataType: "json",
			data: "email=" + email + "&subject=" + subject + "&text=" + text,
			success: function(data) {
				$('form[name=suggestion_form] *').removeClass('invalid');
				if (!data['error']) {
					$(".ui-dialog-titlebar-close").click();
				} else {
					showInfo(data['info']);
					$.each(data['error'], function(key, value) {
						selectField(value);
					});
				}
			}
		});
		return false;
	});
	$(window).resize(function() {
		$(".ui-dialog-content").dialog("option", "position", "center");
	});
	$("#mobile-version").click(function(event) {
		event.preventDefault();
		state = $(this).attr('href');
		state = state.replace("/?mobile-version=", "");
		setCookie('mobileVersion', state, 30);
		location.reload();
	});
	$("#cookie-info .js-close").on('click', function(event) {
		$("#cookie-info").remove();
		setCookie('politykaCiastek', 1, 100, '/');
	});
});

function selectField(name) {
	$('form[name=suggestion_form] [name=' + name + ']').parent('.row').addClass('invalid');
}

function showMenuRwd() {
	// $('html').addClass('unscrollable');
	$('body').addClass('unscrollable');
	closeMenuSubLevels();
	$('#zone-header ul.menu').addClass('active');
	$('a#menu-rwd').addClass('active');
}

function hideMenuRwd() {
	// $('html').removeClass('unscrollable');
	$('#zone-header ul.menu').removeClass('active');
	$('a#menu-rwd').removeClass('active');
	closeMenuSubLevels();
}

function showMenuTop(id) {
	var elements = $('#zone-header ul.menu > li');
	if (window.innerWidth > 1000) {
		if ($(elements[id]).hasClass('active')) {
			$(elements[id]).removeClass('active');
			$('div.poziom2', elements[id]).slideUp();
		} else {
			hideActiveMenu();
			hideFooter();
			$(elements[id]).addClass('active');
			$('div.poziom2', elements[id]).slideDown();
		}
	} else {
		if ($('div.poziom2', elements[id]).hasClass('active')) {
			closeMenuSubLevels();
		} else {
			showMenuSecondLevel(id);
		}
	}
}

function hideActiveMenu() {
	/*$('#zone-header ul.menu > li.active div.poziom2').slideUp();
	$('#zone-header ul.menu > li.active').removeClass('active');*/
}

function showMenuSecondLevel(id) {
	var elementy = $('#zone-header ul.menu > li');
	$(elementy).hide();
	$('#menu-spacer').hide();
	$('#kariera-link').hide();
	$(elementy[id]).show();
	$('div.poziom2', elementy[id]).addClass('active');
	$('div.poziom2', elementy[id]).removeAttr('style');
	$(elementy[id]).addClass('menu-back');
}

function showMenuThirdLevel(element) {
	if (window.innerWidth < 1000) {
		if ($(element).parent().hasClass('active')) {
			$('ul.poziom3', $(element).parent()).removeAttr('style');
			$('#zone-header div.poziom2 > .column > ul > li').removeAttr('style');
			$('#zone-header ul.menu > li > a').removeAttr('style');
			$(element).parent().removeClass('active');
		} else {
			$('#zone-header ul.menu > li > a').hide();
			$('#zone-header div.poziom2 > .column > ul > li').hide();
			$(element).parent().show();
			$(element).parent().addClass('active');
			$('ul.poziom3', $(element).parent()).show();
		}
	}
}

function closeMenuSubLevels() {
	$('#zone-header ul.menu > li').removeClass('menu-back').removeAttr('style');
	$('#zone-header ul.menu > li div.poziom2').removeClass('active').removeAttr('style');
	$('#zone-header ul.poziom3').removeAttr('style');
	$('#zone-header div.poziom2 > .column > ul > li').removeAttr('style');
	$('#zone-header ul.menu > li > a').removeAttr('style');
	$('#zone-header div.poziom2 li').removeClass('active');
}

function clickOutMenu() {
	$('#menu-rwd').click(function(e) {
		if ($('#zone-header ul.menu').hasClass('active')) {
			if (window.innerWidth <= 1000) {
				hideMenuRwd();
			} else {
				hideActiveMenu();
			}
		} else {
			if (window.innerWidth <= 1000) {
				hideSearchBox();
				showMenuRwd();
			}
		}
		e.stopPropagation();
	});
	$('#zone-header ul.menu').click(function(e) {
		e.stopPropagation();
	})
	$(document).click(function() {
		if (window.innerWidth <= 1000) {
			hideMenuRwd();
		} else {
			hideActiveMenu();
		}
	});
}

function showSearchBox() {
	$('#zone-header-right').addClass('show-rwd');
}

function hideSearchBox() {
	$('#zone-header-right').removeClass('show-rwd');
}

function clickOutSearchBox() {
	$('#search-rwd').click(function(e) {
		if ($('#zone-header-right').hasClass('show-rwd')) {
			hideSearchBox();
		} else {
			hideMenuRwd();
			showSearchBox();
		}
		e.stopPropagation();
	});
	$('#zone-header-right').click(function(e) {
		e.stopPropagation();
	})
	$(document).click(function() {
		hideSearchBox();
	});
}

function showFooter() {
	$('#footer-page').addClass('active');
}

function hideFooter() {
	$('#footer-page').removeClass('active');
}

function clickOutFooter() {
	$("#footer-page a.show").click(function(e) {
		if (!$('#footer-page').hasClass('active')) {
			hideActiveMenu();
			showFooter();
			e.stopPropagation();
		} else {
			hideFooter();
			e.stopPropagation();
		}
	});
	$("#footer-page").click(function(e) {
		e.stopPropagation();
	});
	$(document).click(function() {
		hideFooter();
	});
}
var hideTimeout = 4000;
var footerTimeout = null;
var menuTopTimeout = null;
var searchBoxTimeout = null;

function hideOnTimeout() {
	$('#footer-page').mouseleave(function() {
		if (window.innerWidth > 1000) {
			if ($('#footer-page').hasClass('active')) {
				clearTimeout(footerTimeout);
				footerTimeout = setTimeout(hideFooter, hideTimeout);
			}
		}
	});
	$('#footer-page').mouseenter(function() {
		if (window.innerWidth > 1000) {
			clearTimeout(footerTimeout);
		}
	});
	$('#zone-header ul.menu').mouseleave(function() {
		clearTimeout(menuTopTimeout);
		if (window.innerWidth <= 1000) {
			menuTopTimeout = setTimeout(hideMenuRwd, hideTimeout);
		} else {
			menuTopTimeout = setTimeout(hideActiveMenu, hideTimeout);
		}
	});
	$('#zone-header ul.menu').mouseenter(function() {
		clearTimeout(menuTopTimeout);
	});
	$('#zone-header-right').mouseleave(function() {
		if (window.innerWidth <= 1000) {
			if ($('#zone-header-right').hasClass('show-rwd')) {
				clearTimeout(searchBoxTimeout);
				searchBoxTimeout = setTimeout(hideSearchBox, hideTimeout);
			}
		}
	});
	$('#zone-header-right').mouseenter(function() {
		if (window.innerWidth <= 1000) {
			clearTimeout(searchBoxTimeout);
		}
	});
}

function calcContentHeight(element, min) {
	var attr = 'height';
	if (min === true) {
		attr = 'min-' + attr;
	}
	if (window.innerWidth > 1000) {
		$(element).css(attr, window.innerHeight - 80 - 8 + 'px');
	} else {
		$(element).removeAttr('style');
	}
}

function calcRightZoneHeight() {
	var rightZone = $('#right-zone');
	if (rightZone.length > 0) {
		if (window.innerWidth > 1000) {
			$(rightZone).css('height', window.innerHeight - 85 + 'px');
		}
	}
}

function resizePhotosRwd(element) {
	if (window.innerWidth > 300 && window.innerWidth <= 1000) {
		$(element).css('height', window.innerWidth + 'px');
	} else {
		$(element).removeAttr('style');
	}
	if (window.innerWidth <= 300) {
		$(element).css('height', '300px');
	}
}

function calcDescHeight() {
	if (window.innerWidth < 510) {
		setTimeout(function() {
			console.log('delay');
			var height = 0;
			$('.news-block .description').removeAttr('style');
			$('.news-block .description').each(function(index, value) {
				if ($(value).innerHeight() > height)
					height = $(value).innerHeight();
			});
			$('.news-block .description').css('height', height + 'px');
			$('.owl-theme .owl-controls').css('bottom', height + 10 + 'px');
		}, 300);
	} else {
		$('.news-block .description').removeAttr('style');
		$('.owl-theme .owl-controls').removeAttr('style');
	}
}

function collapseText(date) {
	var paragraphs = $('#left-zone .paragraph');
	if (paragraphs.length == 1) {
		var text = $('.text-block');
		var height = 0;
		var fullHeight = 0;
		$('#left-zone .paragraph .text-block > *').each(function(index, value) {
			if ($(value).css('display') !== 'none') {
				fullHeight += $(value).innerHeight();
				fullHeight += parseInt($(value).css('margin-bottom'));
				fullHeight += parseInt($(value).css('margin-top'));
			}
		});
		$('#left-zone .paragraph .text-block > table').each(function(index, value) {
			if ($('caption', value).length > 0) {
				fullHeight += $('caption', value).innerHeight();
			}
		});
		var maxHeight = window.innerHeight - 88 - parseFloat($('#left-zone').css('padding-top')) - parseFloat($('h2.header-block').innerHeight()) - parseFloat($('h2.header-block').css('margin-bottom'));
		if ($('div.date').length > 0) {
			maxHeight -= parseFloat($('div.date').innerHeight());
		}
		if ($('.desc-module h3.title').length > 0) {
			maxHeight -= parseFloat($('.desc-module h3.title').innerHeight());
			maxHeight -= parseFloat($('.desc-module h3.title').css('margin-bottom'));
		}
		if ($('.bottom-fotos').length != 0 || $('.video').length != 0 || $('.files').length != 0) {
			maxHeight -= 150;
		}
		maxHeight -= 70;
		if (window.innerHeight < 350) {
			maxHeight += 300;
		}
		if (maxHeight < fullHeight - 25) {
			$('#left-zone .paragraph a.read-more').addClass('active');
			$('#left-zone .paragraph a.read-more').html('więcej');
			$('#left-zone .paragraph a.read-more').attr('title', 'więcej');
			$('.text-block .bottom-box').show();
			$('#left-zone .paragraph .text-block').css('height', maxHeight);
			$('#left-zone .paragraph .text-block').addClass('collapsed');
		} else {
			$('#left-zone .paragraph .text-block').css('height', fullHeight);
			$('#left-zone .paragraph .text-block').removeClass('collapsed');
			$('#left-zone .paragraph a.read-more').removeClass('active');
			$('.text-block .bottom-box').removeAttr('style');
		}
	}
}

function expandText() {
	var fullHeight = 0;
	$('#left-zone .paragraph .text-block > *').each(function(index, value) {
		fullHeight += $(value).innerHeight();
		fullHeight += parseInt($(value).css('margin-bottom'));
		fullHeight += parseInt($(value).css('margin-top'));
	});
	$('#left-zone .paragraph .text-block > table').each(function(index, value) {
		if ($('caption', value).length > 0) {
			fullHeight += $('caption', value).innerHeight();
		}
	});
	$('#left-zone .paragraph .text-block').css('height', fullHeight);
	$('#left-zone .paragraph .text-block').removeClass('collapsed');
	$('#left-zone .paragraph a.read-more').html('zwiń');
	$('#left-zone .paragraph a.read-more').attr('title', 'zwiń');
}

function readMore() {
	if ($('#left-zone .paragraph .text-block').hasClass('collapsed')) {
		expandText();
	} else {
		collapseText();
	}
}

function moduleShowImage(id) {
	var images = $('#right-zone img.foto');
	var desc = $('#right-zone .desc');
	var imageId = 'jq-foto-' + id;
	var descId = 'jq-desc-' + id;
	$.each(images, function(index, value) {
		if ($(value).attr('id') != imageId) {
			$(value).fadeTo(1000, 0);
		} else {
			$(value).fadeTo(1000, 1);
		}
	});
	$.each(desc, function(index, value) {
		if ($(value).attr('id') != descId) {
			$(value).fadeTo(1000, 0);
		} else {
			$(value).fadeTo(1000, 1);
		}
	});
}

function calcPagerHeight() {
	var news = $('.news-module.news-list .news');
	if (window.innerWidth < 1000) {
		var height = $(news[0]).innerHeight();
		$('.news-module.news-list .pager').css('height', height + 'px');
	} else {
		$('.news-module.news-list .pager').removeAttr('style');
	}
}

function calcVideoPagerHeight() {
	var news = $('.video-module.video-list .video');
	if (window.innerWidth < 1000) {
		var height = $(news[0]).innerHeight();
		$('.video-module.video-list .pager').css('height', height + 'px');
	} else {
		$('.video-module.video-list .pager').removeAttr('style');
	}
}

function showSubmenu(block, id) {
	var elements = $('#block-' + block + ' .text > ul > li');
	if (window.innerWidth > 510) {
		if (!$('#jq-offer-link-' + id).hasClass('active')) {
			allowOfferChangeBackground = false;
			$('.menu-block .photo img').each(function() {
				if ($(this).attr('id') !== undefined && $(this).attr('id') != 'jq-offer-image-' + id) {
					$(this).delay(150).fadeTo(500, 0);
				}
			});
			$('.menu-block .photo img#jq-offer-image-' + id).fadeTo(500, 1);
			$.each(elements, function(index, value) {
				$(value).removeClass('active');
			});
			$('#jq-offer-link-' + id).addClass('active');
		} else {
			allowOfferChangeBackground = true;
			$('.menu-block .photo img').each(function() {
				if ($(this).attr('id') !== undefined && $(this).attr('id') != 'jq-offer-image-' + id) {
					$(this).fadeTo(500, 0);
				}
			});
			$.each(elements, function(index, value) {
				$(value).removeClass('active');
			});
		}
	} else {
		var element = $('#block-' + block + ' .text > ul > li#jq-offer-link-' + id);
		if ($(element).hasClass('active')) {
			$(elements).removeClass('active');
		} else {
			$(elements).removeClass('active');
			$(element).addClass('active');
		}
	}
}

function showNews(id) {
	var images = $('.news-list .photos img');
	var desc = $('.news-list .descriptions .description');
	var pager = $('.news-list .pager a');
	$('.news-list .descriptions .description').hide();
	$('.news-list .descriptions .description#jq-news-desc-' + id).fadeIn(1000);
	$('.news-list .pager a').removeClass('active');
	$('.news-list .pager a#jq-news-pager-' + id).addClass('active');
	$.each(images, function(index, value) {
		if ($(value).attr('id') != 'jq-news-image-' + id) {
			$(value).fadeTo(1000, 0);
			$(value).css('position', 'absolute');
		} else {
			$(value).fadeTo(1000, 1);
		}
	});
}

function showOfferSublist(id, zone) {
	if (zone === 'left') {
		var elements = $('#offer-left-zone ul.poziom2 > li');
	} else if (zone === 'right') {
		var elements = $('#offer-right-zone ul.poziom2 > li');
	}
	if (!$('#jq-offer-link-' + id).hasClass('active')) {
		if (zone === 'left')
			allowOfferChangeBackgroundLeft = false;
		else if (zone === 'right')
			allowOfferChangeBackgroundRight = false;
		$.each(elements, function(index, value) {
			if (id != $(value).attr('id').split('-')[3]) {
				$(value).hide('3000');
			}
		});
		$('#jq-offer-link-' + id + ' ul.poziom3').show('3000');
		$('#jq-offer-link-' + id).addClass('active');
	} else {
		if (zone === 'left')
			allowOfferChangeBackgroundLeft = true;
		else if (zone === 'right')
			allowOfferChangeBackgroundRight = true;
		$('#jq-offer-link-' + id).removeClass('active');
		$('#jq-offer-link-' + id + ' ul.poziom3').hide('3000');
		$.each(elements, function(index, value) {
			$(value).show('3000');
		});
	}
}

function hideOfferSublist(zone) {
	var activeId = $('#offer-' + zone + '-zone ul.poziom2 li.active').attr('id');
	if (activeId != undefined) {
		activeId = activeId.split('-')[3];
		showOfferSublist(activeId, zone);
	}
	$('.offer-module #offer-' + zone + '-zone img[id^=jq-offer-image]').each(function() {
		$(this).fadeTo(500, 0);
	});
}

function calcOfferZonesHeight() {
	var zoneLeft = $('#offer-left-zone').innerHeight();
	var zoneRight = $('#offer-right-zone').innerHeight();
	if (window.innerWidth > 1000) {
		if (zoneLeft > zoneRight) {
			$('#page-content').css('height', zoneLeft);
		} else {
			$('#page-content').css('height', zoneRight);
		}
		$('#offer-left-zone').css('height', '100%');
		$('#offer-right-zone').css('height', '100%');
	} else {
		$('#page-content').css('height', 'auto');
		var zones = ['left', 'right'];
		for (var i = 0; i < zones.length; i++) {
			var elements = $('#offer-' + zones[i] + '-zone ul.poziom2 > li');
			var max = 0;
			$.each(elements, function(index, value) {
				var subElements = $('ul.poziom3 li', value);
				if (subElements.length > max) {
					max = subElements.length;
				}
			});
			if (max < elements.length) {
				max = elements.length;
			} else {
				max += 1;
			}
			var height = $('#offer-' + zones[i] + '-zone ul .title').innerHeight() + max * $('#offer-' + zones[i] + '-zone ul.poziom2 li').innerHeight() + parseInt($('#offer-' + zones[i] + '-zone').css('padding-top')) * 2;
			$('#offer-' + zones[i] + '-zone').css('height', height + 'px');
		}
	}
}

function showContact(element, id) {
	$('div.contact').hide();
	$('#jq-contact-' + id).show();
	$('ul.types li a').removeClass('active');
	if (document.querySelector('ul.types li a') === element) {
		$('ul.regions > li:nth-of-type(1) > a').addClass('active');
	} else {
		if (!$(element).hasClass('active')) {
			var wojewodztwa = $(element).attr('data-wojewodztwa');
			if (wojewodztwa !== undefined) {
				var ids = wojewodztwa.split('#');
				$('.mapa_wojewodztw img').each(function(index, value) {
					var image = $(value).attr('src');
					image = image.replace('wojewodztwa/aktywne', 'wojewodztwa');
					$(value).attr('src', image);
				});
				for (var i = 0; i < ids.length; i++) {
					var image = $('.mapa_wojewodztw #jq-woj-' + ids[i]).attr('src');
					image = image.replace('wojewodztwa', 'wojewodztwa/aktywne');
					$('.mapa_wojewodztw #jq-woj-' + ids[i]).show();
					$('.mapa_wojewodztw #jq-woj-' + ids[i]).attr('src', image);
				}
			}
		}
		$(element).addClass('active');
	}
	var lat = $('#jq-contact-' + id).attr('data-map-lat');
	var lng = $('#jq-contact-' + id).attr('data-map-lng');
	var zoom = parseInt($('#jq-contact-' + id).attr('data-map-zoom'));
	GoogleMap.setMapPosition(lat, lng, zoom);
}

function showMap() {
	$('.contact-module #map-canvas').show();
	GoogleMap.initialize();
	GoogleMap.setMapPosition(GoogleMap.lat, GoogleMap.lng, GoogleMap.zoom);
	$('.contact-module div.contact .pokaz-mape').hide();
}

function showVideo(film_id) {
	var html = '';
	html += '<div id="OverlayPopupFilm" class="PopupOverlay" style="display:block; position: absolute; z-index: 90; left: 0px; top: 0px; height: 100%;"></div>';
	html += '<div id="contentPopup" style="display: block; background: #ffffff; width:800px; height: 625px; position: absolute; z-index: 100; left: 0px; top: 0px; bottom: 0px; right: 0px; margin: auto;">';
	html += ' <div class="IcoClose" onclick="hide_popup()"></div>';
	html += ' <iframe id="vimeo-player1" src="https://player.vimeo.com/video/' + film_id + '?api=1&player_id=vimeo-player1&autoplay=1" webkitallowfullscreen mozallowfullscreen allowfullscreen>';
	html += '</iframe>';
	html += '</div>';
	$('#contentPopup').remove();
	$('#OverlayPopupFilm').remove();
	var body = document.getElementsByTagName("body")[0];
	var span = document.createElement("span");
	span.innerHTML = html;
	body.appendChild(span);
	setFrameSize();
	var iframe = $('#vimeo-player1')[0];
	var player = $f(iframe);
	player.addEvent("ready", function() {
		player.addEvent('finish', function() {
			hide_popup();
		});
	});
}

function hide_popup() {
	$('#contentPopup').hide();
	$('#OverlayPopupFilm').hide();
	$('#contentPopup').remove();
	$('#OverlayPopupFilm').remove();
	window.location.hash = '';
}

function setFrameSize() {
	var width = 800;
	var height = 600;
	if (window.innerWidth < 900) {
		width = window.innerWidth * 0.8;
		height = width * 0.75;
	}
	if (window.innerHeight < window.innerWidth && window.innerHeight < 768) {
		height = window.innerHeight * 0.8;
		width = window.innerHeight * 1.1;
	}
	$('#contentPopup').css('width', width + 'px');
	$('#contentPopup').css('height', height + 25 + 'px');
	$('#vimeo-player1').css('width', width + 'px');
	$('#vimeo-player1').css('height', height + 'px');
	$(window).scrollTop($('html, body').offset().top - ($(window).height() - $('html, body').outerHeight(true)) / 2);
}

function resizeContactsBlock() {
	if (previousWidth > window.innerWidth && previousWidth > 1000 && window.innerWidth <= 1000) {
		$('#zone-footer div.column').removeAttr('style');
	}
	previousWidth = window.innerWidth;
	if (window.innerWidth > 1000) {
		var width = 0;
		$('div.contacts .column').each(function(index, value) {
			if ($(value).attr('class') === 'column' && $(value).css('display') !== 'none') {
				width += $(value).innerWidth();
			}
		});
		if (width > window.innerWidth) {
			$('#zone-footer div.contacts').css('padding-right', '150px');
			$('#zone-footer .more').show();
		} else {
			$('#zone-footer div.contacts').css('padding-right', '0');
			$('#zone-footer .more').hide();
		}
		$('#localization li:nth-of-type(1)').show();
		$('#localization li:nth-of-type(2)').show();
		$('#zone-footer .localization-title').hide();
		$('#zone-footer .regions-list').removeAttr('style');
	} else {
		$('#zone-footer div.contacts').css('padding-right', '0');
		$('#zone-footer .more').hide();
	}
}

function geolocalization() {
	if (navigator.geolocation) {
		navigator.geolocation.getCurrentPosition(showPosition);
	}
}

function showPosition(position) {
	var regions = $('#zone-footer .column .region');
	var closestRegion = null;
	var distance = 999999999;
	for (var i = 0; i < regions.length; i++) {
		var dist = mapDistance(position.coords.longitude, position.coords.latitude, $(regions[i]).attr('data-lng'), $(regions[i]).attr('data-lat'));
		if (dist < distance) {
			distance = dist;
			closestRegion = regions[i];
		}
	}
	if (closestRegion !== null) {
		$('#localization li:nth-of-type(1)').hide();
		$('#localization li:nth-of-type(2)').show();
		$(closestRegion).parent().show();
		$('#zone-footer .localization-title').show();
	}
}

function mapDistance(lon1, lat1, lon2, lat2) {
	var R = 6371;
	var dLat = (lat2 - lat1) * Math.PI / 180;
	var dLon = (lon2 - lon1) * Math.PI / 180;
	var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
		Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2);
	var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
	var d = R * c;
	return d;
}

function showRegionsList() {
	var list = $('#zone-footer .regions-list');
	if ($(list).css('display') === 'block') {
		closeRegionsList();
	} else {
		$('#zone-footer .regions-list').slideDown();
	}
}

function closeRegionsList() {
	$('#zone-footer .regions-list').slideUp();
}

function showContactInBlock(id) {
	var contacts = $('#zone-footer .contacts .column');
	$(contacts).removeAttr('style');
	$('#zone-footer .contacts .column#jq-region-' + id).show();
	$('#zone-footer .regions-list').slideUp();
}

function checkAllowCall(e) {
	if (window.innerWidth > 1000) {
		e.preventDefault();
	}
}

function resizeImages() {
	var width = $('#right-zone').innerWidth();
	var height = $(window).innerHeight() - 88;
	if (height < width) {
		var diff = width - height;
		var elements = document.querySelectorAll('.desc-module #right-zone img');
		for (var i = 0; i < elements.length; i++) {
			elements[i].style.maxHeight = height + diff + 'px';
		}
	} else {
		$('.desc-module #right-zone img').removeAttr('style');
	}
}

function resizeNewsImages() {
	var width = $('.news-block').innerWidth();
	var height = $(window).innerHeight() - 88;
	if (height < width) {
		var diff = width - height;
		var elements = document.querySelectorAll('.news-block img');
		for (var i = 0; i < elements.length; i++) {
			elements[i].style.maxHeight = height + diff + 'px';
		}
	} else {
		$('.news-block img').removeAttr('style');
	}
}
var EditoBannery = new Object();
EditoBannery.show = function(bannerList, kontener, mode, idBloku) {
	if (mode == 'all') {
		for (bannerIndex in bannerList) {
			cBanner = bannerList[bannerIndex];
			EditoBannery.showElement(kontener, cBanner);
		}
	} else if (mode == 'single_view_popup' && getCookie('kontener' + idBloku) == 1) {
		return;
	} else if (bannerList.length > 0) {
		var randomIndex = Math.floor(Math.random() * bannerList.length);
		cBanner = bannerList[randomIndex];
		if (mode == 'single_view_popup')
			setCookie('kontener' + idBloku, 1);
		EditoBannery.showElement(kontener, cBanner);
	}
}
EditoBannery.showElement = function(kontener, cBanner) {
	var swfParams = {
		menu: "false",
		quality: "high",
		wmode: "transparent"
	};
	switch (cBanner.params.type) {
		case 'flash':
			var box = Math.floor(Math.random() * 1000);
			$("#" + kontener).append('<div class="media"><div id="' + kontener + box + '"></div></div>');
			swfobject.embedSWF(cBanner.file, kontener + box, cBanner.width, cBanner.height, "9.0.124", base_href + "flash/expressinstall.swf", {}, swfParams);
			break;
		case 'flash_link':
			box = Math.floor(Math.random() * 1000);
			$("#" + kontener).append('<div class="media"><div style="position: relative; width: ' + cBanner.width + 'px; height: ' + cBanner.height + 'px; text-align: left; margin: 0 auto;"><a href="' + cBanner.params.link + '" onclick="javascript: $.post(\'' + cBanner.params.onclick + '\',{},function(data){});" target="' + cBanner.params.target + '" class="mediaMaska" style="height: ' + cBanner.height + 'px;"></a><div id="' + kontener + box + '"></div></div></div>');
			var flashvars = {
				alink1: cBanner.params.link,
				atar1: cBanner.params.target
			};
			swfobject.embedSWF(cBanner.file + "?alink1=" + cBanner.params.link + "&amp;atar1=" + cBanner.params.target, kontener + box, cBanner.width, cBanner.height, "9.0.124", base_href + "flash/expressinstall.swf", flashvars, swfParams);
			break;
		case 'obrazek':
			$("#" + kontener).append('<div class="media"><img src="' + cBanner.file + '" width="' + cBanner.width + '" height="' + cBanner.height + '" alt="' + cBanner.alt + '" /></div>');
			break;
		case 'obrazek_link':
			$("#" + kontener).append('<div class="media"><a onclick="javascript: $.post(\'' + cBanner.params.onclick + '\',{},function(data){});" href="' + cBanner.params.link + '" target="' + cBanner.params.target + '" rel="nofollow"><img src="' + cBanner.file + '" width="' + cBanner.width + '" height="' + cBanner.height + '" alt="' + cBanner.alt + '" /></a></div>');
			break;
		case 'obrazek_popup':
			name = 'media-popup-' + cBanner.params.popup_id;
			html = '<a href="' + cBanner.file + '" class="display-none ' + name + '"></a>';
			$(window).load(function() {
				$("#" + kontener).append(html);
				$("#" + kontener).parent(".js-media").removeClass();
				$("." + name + "").fancybox({
					'overlayColor': '#000',
					'titlePosition': 'over'
				});
				$('.media-popup-' + cBanner.params.popup_id).trigger('click');
			});
			break;
		case 'obrazek_link_popup':
			name = 'media-popup-' + cBanner.params.popup_id;
			html = '<a href="' + cBanner.file + '" class="display-none ' + name + '"></a>';
			$(window).load(function() {
				$("#" + kontener).append(html);
				$("#" + kontener).parent(".js-media").removeClass();
				$("." + name + "").fancybox({
					'overlayColor': '#000',
					'titlePosition': 'over',
					'link': cBanner.params.link,
					'target': cBanner.params.target
				});
				$('.media-popup-' + cBanner.params.popup_id).trigger('click');
			});
			break;
		case 'flash_popup':
			box = Math.floor(Math.random() * 1000);
			$("#" + kontener).append('<div id="' + kontener + box + '"></div>');
			$("#" + kontener).parent(".js-media").removeClass();
			swfobject.embedSWF(cBanner.file, kontener + box, cBanner.width, cBanner.height, "9.0.124", base_href + "flash/expressinstall.swf", {}, swfParams);
			$(document).ready(function() {
				$("#" + kontener).dialog({
					modal: true,
					width: parseInt(cBanner.width) + 25,
					height: parseInt(cBanner.height) + 45
				});
			});
			break;
		case 'flash_link_popup':
			box = Math.floor(Math.random() * 1000);
			$("#" + kontener).append('<div class="media"><div style="position: relative; width: ' + cBanner.width + 'px; height: ' + cBanner.height + 'px; text-align: left; margin: 0 auto;"><a href="' + cBanner.params.link + '" onclick="javascript: $.post(\'' + cBanner.params.onclick + '\',{},function(data){});" target="' + cBanner.params.target + '" class="media-maska" style="height: ' + cBanner.height + 'px;"></a><div id="' + kontener + box + '"></div></div></div>');
			flashvars = {
				alink1: cBanner.params.link,
				atar1: cBanner.params.target
			};
			swfobject.embedSWF(cBanner.file + "?alink1=" + cBanner.params.link + "&amp;atar1=" + cBanner.params.target, kontener + box, cBanner.width, cBanner.height, "9.0.124", base_href + "flash/expressinstall.swf", flashvars, swfParams);
			$(document).ready(function() {
				$("#" + kontener).dialog({
					modal: true,
					width: "auto"
				});
			});
			break;
		case 'script':
			$("#" + kontener).append('<div class="media">' + cBanner.script + '</div>');
			break;
		case 'script_popup':
			$("#" + kontener).append(cBanner.script);
			$("#" + kontener).parent(".js-media").removeClass();
			$(document).ready(function() {
				$("#" + kontener).dialog({
					modal: true,
					width: "auto"
				});
			});
			break;
	}
}
Zakladki = new Object()
Zakladki.tytul_tag = 'h2';
Zakladki.menu_kontener = '<div class="tabs"></div>';
Zakladki.menu_kontener_element = '<div class="element">{TUTAJ_TYTUL}</div>';
Zakladki.bloczki_kontener = '<div class="tab"></div>';
Zakladki.bloczek_tabbable_class = 'js-tab';
Zakladki.bloczek_tytul_tag = 'h2';
Zakladki.pierwszy_przycisk_ma_class = true;
Zakladki.ostani_przycisk_ma_class = true;
Zakladki.przyciski_maja_class_hover = true;
Zakladki.agreguj = function(blokID, iloscBloczkow, pokaz_tytul, zaznacz_losowy) {
	var BloczekTabow = $('#' + blokID);
	if (BloczekTabow.size() == 0) return;
	if (pokaz_tytul != 1) $(this.tytul_tag, BloczekTabow).remove();
	if (iloscBloczkow > 0) {
		var bloczkiDoAgregacji = BloczekTabow.nextAll(':lt(' + iloscBloczkow + ')');
		var TabyMenuKontener = $(Zakladki.menu_kontener).appendTo(BloczekTabow);
		while (TabyMenuKontener.get(0).firstChild)
			TabyMenuKontener = $(TabyMenuKontener.get(0).firstChild);
		var TabyKontener = $(Zakladki.bloczki_kontener).appendTo(BloczekTabow);
		i = 0;
		bloczkiDoAgregacji.each(function() {
			if (i >= iloscBloczkow) return false;
			if ($(this).hasClass(Zakladki.bloczek_tabbable_class) == false || $(this).hasClass('js-tabs')) {
				return false;
			}
			var id_bloczka = $(this).attr('id');
			var tytulBloczka = $(this).find(Zakladki.bloczek_tytul_tag + ':first');
			var przycisk = $(Zakladki.menu_kontener_element.replace('{TUTAJ_TYTUL}', tytulBloczka.text()));
			TabyMenuKontener.append(przycisk);
			przycisk.attr('rel', id_bloczka);
			przycisk.bind('click', {
				bloczek_id: id_bloczka,
				rodzic_id: blokID
			}, Zakladki.pokazZakladke);
			if (Zakladki.przyciski_maja_class_hover) {
				przycisk.mouseover(function() {
					$(this).addClass('hover')
				}).mouseout(function() {
					$(this).removeClass('hover')
				});
			}
			tytulBloczka.remove();
			TabyKontener.append($(this));
			$(this).hide();
			i++;
		});
		var wszystkiePrzyciski = $('[rel^=block-]', TabyMenuKontener);
		if (Zakladki.ostani_przycisk_ma_class) wszystkiePrzyciski.eq(wszystkiePrzyciski.length - 1).addClass('isLast');
		if (Zakladki.pierwszy_przycisk_ma_class) wszystkiePrzyciski.eq(0).addClass('isFirst');
		if (zaznacz_losowy == 1) {
			var randomnumber = Math.floor(Math.random() * wszystkiePrzyciski.length)
			wszystkiePrzyciski.eq(randomnumber).click();
		} else {
			wszystkiePrzyciski.eq(0).click();
		}
	}
};
Zakladki.pokazZakladke = function(eventObj) {
	var bloczekTabow = $(eventObj.target).parents('#' + eventObj.data.rodzic_id);
	var nacisnietyPrzycisk = $('[rel=' + eventObj.data.bloczek_id + ']', bloczekTabow);
	if (nacisnietyPrzycisk.hasClass('isActive')) return false;
	nacisnietyPrzycisk.siblings().removeClass('isActive isActiveAndFirst isActiveAndLast');
	nacisnietyPrzycisk.addClass('isActive');
	nacisnietyPrzycisk.filter('.isFirst').addClass('isActiveAndFirst');
	nacisnietyPrzycisk.filter('.isLast').addClass('isActiveAndLast');
	var bloczekDoPokazania = $('#' + eventObj.data.bloczek_id, bloczekTabow);
	bloczekDoPokazania.siblings('[id^=block-]').hide();
	bloczekDoPokazania.show();
}
Comments = {
	commentsUrl: null,
	oldPage: null,
	init: function() {
		var form = $("#js-form").attr('id');
		if (typeof(form) != 'undefined') {
			$("#js-comment").bind('click', Comments.toggleForm);
			$("#js-form form #js-send").bind('click', Comments.addComment);
			Comments.commentsUrl = $("#js-form form").attr('action');
			Comments.commentsReloadUrl = commentsReloadUrl;
			Comments.commentsModerationUrl = commentsModerationUrl;
			Comments.commentsFormUrl = commentsFormUrl + '&ch=' + Math.floor(Math.random() * 1000);
			Comments.profileForm();
			var initPage = Comments.oldPage = document.location.href.split("#")[1];
			if (initPage != undefined) {
				initPage = parseInt(initPage.split("cm-page")[1]);
				if (!isNaN(initPage))
					Comments.reload(initPage);
			}
			setInterval("Comments.checkPage()", 500);
		}
	},
	toggleForm: function() {
		$("#js-form").toggle();
	},
	addComment: function() {
		if (Comments.commentsUrl == undefined || Comments.commentsUrl == '') {
			alert('brak adresu commentsUrl dla komentarzy');
			return false;
		}
		var nick = $("#nick").val();
		var tresc = $("#tresc").val();
		var root = $("#root").val();
		var captcha = $("#captcha").val();
		var cache = $("#cache").val();
		var modul = $("#modul").val();
		$("body").showAjaxIndicator();
		$.post(Comments.commentsUrl, {
			nick: nick,
			tresc: tresc,
			captcha: captcha,
			root: root,
			cache: cache,
			modul: modul
		}, function(data) {
			if ($("error", data).text() == "0") {
				Comments.showMsg($("msg", data).text());
				Comments.clearForm();
				Comments.reload(1);
				$("#js-form").hide();
			} else {
				Comments.showMsg($("msg", data).text(), $("error", data).text());
			}
			$("body").hideAjaxIndicator();
			$("#js-form form #js-send").attr('disabled', false);
			Comments.clearCapcha();
		});
		return false;
	},
	clearForm: function() {
		$("#js-form form textarea").val('');
	},
	clearCapcha: function() {
		$("#captcha").attr('value', "");
		if (window.frames['captcha_iframe'] != undefined) window.frames['captcha_iframe'].location.reload();
	},
	showMsg: function(msg, style) {
		$('#js-msg').html(msg);
		$('#js-msg').show();
		setTimeout(function() {
			$('#js-msg').fadeOut('slow');
		}, 3000);
	},
	reload: function(page) {
		if (Comments.commentsReloadUrl == undefined) return;
		$("body").showAjaxIndicator();
		var pageParam = "";
		if (page != undefined)
			page = parseInt(page);
		$.post(Comments.commentsReloadUrl, {
			page: page
		}, function(data) {
			$("#comments").html($("nodes", data).text());
			$("#js-count").html($("count", data).text());
			$("body").hideAjaxIndicator();
			Comments.oldPage = page;
			document.location.href = document.location.href.split("#")[0] + '#cm-page' + page;
		});
	},
	checkPage: function() {
		var currentPage = document.location.href.split("#")[1];
		if (currentPage == undefined && Comments.oldPage != null)
			currentPage = 'cm-page1';
		if (currentPage != undefined) {
			currentPage = parseInt(currentPage.split("cm-page")[1]);
			if (!isNaN(currentPage) && currentPage != Comments.oldPage) {
				Comments.oldPage = currentPage;
				Comments.reload(currentPage);
			}
		}
	},
	requestModeration: function(commentId) {
		$("body").showAjaxIndicator();
		$.post(Comments.commentsModerationUrl, {
			commentId: commentId
		}, function(data) {
			if ($("error", data).text() == "0")
				Comments.showMsg($("msg", data).text());
			else
				Comments.showMsg($("msg", data).text(), $("error", data).text());
			$("body").hideAjaxIndicator();
		});
	},
	profileForm: function() {
		$.get(Comments.commentsFormUrl, function(data) {
			if ($("error", data).text() == "0") {
				if ($("user", data).text() != '') {
					$("#js-nolog").after('<input type="hidden" name="nick" id="nick" value="' + $("user", data).text() + '" />');
					$('#js-nolog').remove();
				}
			}
		});
	}
}
$(document).ready(function() {
	Comments.init();
});
if (!Koszyk) var Koszyk = new Object();
var koszyk_akcja_przelicz = 'przelicz-koszyk';
var Koszyk = {
	Timer: null,
	Link: null,
	Init: function() {
		if (typeof(ajaxLinks) != 'undefined') {
			$("#jq_koszyk_kontener").load(ajaxLinks.reload_koszyk_blok + "&r=" + Math.random());
			$('a[rel^="dodajDoKoszyka"]').bind('click', Koszyk.DodajProdukt);
			$('select[name="sposob_platnosci"]').bind('change', Koszyk.SposobyTransportu);
			$('select[name="sposob_transportu"]').live('change', Koszyk.PrzeliczSume);
			$('input#wyczyscKoszyk').bind('click', Koszyk.Wyczysc);
			$('[rel*="usunProdukt"]').bind('click', Koszyk.UsunProduktCheck);
			$('select[name*="ilosc"]').bind('change', Koszyk.PrzeliczKoszykCheck);
			$('input#przelicz').bind('click', Koszyk.PrzeliczKoszykCheck);
			$('a[rel^="krok"]').bind('click', Koszyk.SprawdzKrok);
			$('.js-show-products').live('click', function() {
				$('.js-products-list').slideToggle('slow');
			});
		}
	},
	DodajProdukt: function() {
		var buttons = {};
		dane = $(this).attr('rel').split(",");
		if (typeof(ajaxLinks) != "undefined" && typeof(ajaxLinks.dodaj_produkt_link_blok) != "undefined" && dane[2] != 'null' && dane[2] != undefined) {
			$('body').showAjaxIndicator();
			var ilosc = $('.produkt-ilosc select option:selected').val();
			ilosc = parseInt(ilosc);
			if (isNaN(ilosc) || ilosc < 1)
				ilosc = 1;
			$.ajax({
				type: 'POST',
				url: ajaxLinks.dodaj_produkt_link_blok,
				data: {
					id_produktu: dane[1],
					wariant: dane[2],
					ilosc: ilosc
				},
				dataType: 'json',
				cache: false,
				success: function(response) {
					$('#jq_koszyk_kontener').html(response.html);
					buttons[response.button2] = function() {
						$(this).dialog('destroy');
						location.href = response.button2_link;
					};
					buttons[response.button] = function() {
						$(this).dialog('destroy');
					};
					$('#DodajProduktInfo').html(response.komunikat);
					$('#DodajProduktInfo').dialog({
						title: response.komunikat,
						width: 450,
						modal: true,
						buttons: buttons
					});
					$('body').hideAjaxIndicator();
				},
				error: function(request, status, error) {
					if (request.status == 501) {
						alert(request.responseText);
					}
				}
			});
		} else {
			alert('error: link lub wariant');
		}
		return false;
	},
	UsunProduktCheck: function() {
		Koszyk.Link = $(this).attr('rel');
		clearTimeout(Koszyk.Timer);
		Koszyk.Timer = setTimeout("Koszyk.UsunProdukt();", 200);
	},
	UsunProdukt: function() {
		if (typeof(ajaxLinks) != "undefined" && typeof(ajaxLinks.usun_produkt_link) != "undefined") {
			$('body').showAjaxIndicator();
			var dane = Koszyk.Link.split(",");
			var id = parseInt(dane[1]);
			if (id > 0) {
				var cartRow = $(this).parent().parent('tr');
				$.ajax({
					type: 'POST',
					url: ajaxLinks.usun_produkt_link,
					data: {
						id_produktu: id,
						wariant: dane[2]
					},
					dataType: 'json',
					success: function(response) {
						document.location.href = document.location.href;
					},
					error: function(request, status, error) {
						if (request.status == 501) {
							alert(request.responseText);
						}
					}
				});
			}
		} else {
			alert('brak linku ajaxLinks.usun_produkt_link');
		}
		return false;
	},
	PrzeliczKoszyk: function() {
		var url = $(this).attr('rel');
		if (url == '' || url == undefined)
			url = koszyk_akcja_przelicz;
		$('#jq_dane_do_faktury input[name="akcja"]').val('');
		$('#zamowienie').attr('action', url + '.html');
		$('#zamowienie').submit();
		return false;
	},
	PrzeliczKoszykCounter: function() {
		$('body').showAjaxIndicator();
		Koszyk.PrzeliczKoszykCheck;
		clearTimeout(Koszyk.Timer);
		Koszyk.Timer = setTimeout("Koszyk.PrzeliczKoszyk();", 100);
	},
	PrzeliczKoszykCheck: function() {
		setTimeout(function() {
			var zero = false;
			$('select[name*=ilosc]').each(function() {
				var val = $(this).val();
				if (!val.match(/^\d+$/)) {
					val = 1;
					$(this).val(val);
				}
				if (val == 0) {
					$('#UsunPytanie').dialog({
						width: 450,
						modal: true,
						buttons: {
							"NIE": function() {
								$(this).dialog("close");
							},
							"TAK": function() {
								$(this).dialog("close");
								Koszyk.PrzeliczKoszykCounter();
							}
						}
					});
					zero = true;
				}
			});
			if (!zero) Koszyk.PrzeliczKoszykCounter();
		}, 100);
	},
	Wyczysc: function() {
		if (typeof(ajaxLinks) != "undefined" && typeof(ajaxLinks.wyczysc_koszyk_link) != "undefined") {
			$('body').showAjaxIndicator();
			$.ajax({
				type: 'POST',
				url: ajaxLinks.wyczysc_koszyk_link,
				success: function(response) {
					document.location.href = document.location.href;
				},
				error: function(request, status, error) {
					if (request.status == 501) {
						alert(request.responseText);
					}
				}
			});
		} else {
			alert('brak linku ajaxLinks.wyczysc_koszyk_link');
		}
	},
	SposobyTransportu: function() {
		if (typeof(ajaxLinks) != "undefined" && typeof(ajaxLinks.sposoby_transportu_link) != "undefined") {
			$('body').showAjaxIndicator();
			var sposob_platnosci = $('select[name=sposob_platnosci] :selected').val();
			$.ajax({
				type: 'POST',
				url: ajaxLinks.sposoby_transportu_link,
				data: {
					sposob_platnosci: sposob_platnosci
				},
				success: function(response) {
					$('#jq_sposob_transportu').empty().append(response);
					$('body').hideAjaxIndicator();
				},
				error: function(request, status, error) {
					if (request.status == 501) {
						alert(request.responseText);
					}
				}
			});
		} else {
			alert('brak linku ajaxLinks.sposoby_transportu_link');
		}
	},
	PrzeliczSume: function() {
		if (typeof(ajaxLinks) != "undefined" && typeof(ajaxLinks.suma_zamowienia_link) != "undefined") {
			$('body').showAjaxIndicator();
			var sposob_transportu = $('select[name=sposob_transportu] :selected').val();
			$.ajax({
				type: 'POST',
				url: ajaxLinks.suma_zamowienia_link,
				data: {
					sposob_transportu: sposob_transportu
				},
				dataType: 'json',
				success: function(response) {
					Koszyk.RenderResponse(response);
					$('body').hideAjaxIndicator();
				},
				error: function(request, status, error) {
					if (request.status == 501) {
						alert(request.responseText);
					}
				}
			});
		} else {
			alert('brak linku ajaxLinks.suma_zamowienia_link');
		}
	},
	RenderResponse: function(suma) {
		var suma_zamowienia = suma.suma_zamowienia;
		var koszt_transportu = suma.koszt_transportu;
		$('#suma_zamowienia').empty().append(suma_zamowienia.brutto);
		$('#koszt_transportu').empty().append(koszt_transportu.brutto);
	},
	ShowMsg: function(jQ_ident, msg, classtype) {
		var msgBox = $('div#' + jQ_ident);
		var msg = $('<div>' + msg + '</div>').addClass(classtype).appendTo(msgBox);
		setTimeout(function() {
			msg.fadeOut('slow', function() {
				$(this).remove();
			});
		}, 4000);
	},
	Faktura: function() {
		$('#jq_dane_do_faktury #js-facture').toggle();
	},
	WczytajDaneAdresowe: function(input) {
		if (typeof(ajaxLinks) != "undefined" && typeof(ajaxLinks.wczytaj_dane_adresowe) != "undefined") {
			$('body').showAjaxIndicator();
			$.ajax({
				type: 'POST',
				url: ajaxLinks.wczytaj_dane_adresowe,
				data: {
					id: $(input).val()
				},
				dataType: 'json',
				success: function(response) {
					var form = $('#jq_dane_adresowe');
					$('#imie', form).val(response.imie);
					$('#nazwisko', form).val(response.nazwisko);
					$('#firma', form).val(response.firma);
					$('#ulica', form).val(response.ulica);
					$('#nr_domu', form).val(response.nr_domu);
					$('#nr_mieszkania', form).val(response.nr_mieszkania);
					$('#miejscowosc', form).val(response.miejscowosc);
					$('#kod_pocztowy', form).val(response.kod_pocztowy);
					$('#telefon', form).val(response.telefon);
					$('#nip', form).val(response.nip);
					$('body').hideAjaxIndicator();
				},
				error: function(request, status, error) {
					if (request.status == 501) {
						alert(request.responseText);
					}
				}
			});
		} else {
			alert('brak linku ajaxLinks.suma_zamowienia_link');
		}
	},
	PrzepiszDaneDoFaktury: function() {
		var form = $('#jq_dane_adresowe');
		var faktura = $('#jq_dane_do_faktury');
		$('#imie_faktura', faktura).val($('#imie', form).val());
		$('#nazwisko_faktura', faktura).val($('#nazwisko', form).val());
		$('#firma_faktura', faktura).val($('#firma', form).val());
		$('#ulica_faktura', faktura).val($('#ulica', form).val());
		$('#nr_domu_faktura', faktura).val($('#nr_domu', form).val());
		$('#nr_mieszkania_faktura', faktura).val($('#nr_mieszkania', form).val());
		$('#miejscowosc_faktura', faktura).val($('#miejscowosc', form).val());
		$('#kod_pocztowy_faktura', faktura).val($('#kod_pocztowy', form).val());
		$('#telefon_faktura', faktura).val($('#telefon', form).val());
		$('#nip_faktura', faktura).val($('#nip', form).val());
	},
	SprawdzKrok: function() {
		var data = $(this).attr('rel').split(",");
		var redirectLink = $(this).attr('href');
		$('body').showAjaxIndicator();
		var postData = Koszyk.PrzygotujDaneAdresowe();
		postData['krok'] = data[1];
		$.ajax({
			type: 'POST',
			url: ajaxLinks.sprawdz_krok,
			data: postData,
			dataType: 'json',
			success: function(response) {
				$('#zamowienie input').removeClass('errorClass');
				$('#zamowienie select').removeClass('errorClass');
				$('body').hideAjaxIndicator();
				if (response.isError) {
					if (response.fields != null && response.fields.length > 0) {
						for (i = 0; i < response.fields.length; i++) {
							$('#' + response.fields[i]).addClass('errorClass');
						}
					}
					Koszyk.ShowMessage(response);
				} else {
					location.href = redirectLink;
				}
			},
			error: function(request, status, error) {
				if (request.status == 501) {
					alert(request.responseText);
				}
			}
		});
		return false;
	},
	PrzygotujDaneAdresowe: function() {
		var data = new Object();
		$('#jq_dane_adresowe input').each(function() {
			if ($(this).attr('type') == 'checkbox' && !$(this).is(':checked')) return;
			var name = $(this).attr("name");
			var value = $(this).val();
			data[name] = value;
		});
		$('#jq_dane_do_faktury input').each(function() {
			if ($(this).attr('type') == 'checkbox' && !$(this).is(':checked')) return;
			var name = $(this).attr("name");
			var value = $(this).val();
			data[name] = value;
		});
		data['dodatkowe_uwagi'] = $('#dodatkowe_uwagi').val();
		return data;
	},
	ShowMessage: function(response) {
		$("#StoreCartMsg").html(response.msg);
		if (Koszyk.myDialog == null) {
			Koszyk.myDialog = $("#StoreCartMsg").dialog({
				width: 450,
				modal: true,
				buttons: {
					"OK": function() {
						$(this).dialog("close");
					}
				}
			});
		} else {
			Koszyk.myDialog.dialog('open');
		}
	}
};
$(document).ready(function() {
	Koszyk.Init();
});
var Wariant = {
	IloscOpcji: null,
	lblWybierz: null,
	Init: function(ilosc, wybierz, dodaj) {
		Wariant.IloscOpcji = ilosc;
		Wariant.lblWybierz = wybierz;
		Wariant.lblDodaj = dodaj;
		wybrany = new Array();
		$('.js-opcja div.js-normal').live('click', Wariant.Wybierz);
		$('.js-opcja div.hidden').live('click', Wariant.Reset);
		$('a[rel^="dodajDoKoszyka"]').unbind('click').addClass('hidden').html(Wariant.lblWybierz);
	},
	Wybierz: function() {
		var war = $(this).attr('id');
		war = war.split('-');
		$(this).parent().find('div.active').each(function() {
			$(this).removeClass('active').addClass('normal');
			var poprz = $(this).attr('id');
			poprz = poprz.split('-');
			Wariant.Usun(poprz[1]);
		});
		wybrany.push(war[1]);
		$(this).removeClass('normal');
		$(this).addClass('active');
		if (wybrany.length > 0) {
			var grupa = $(this).parent();
			$('.js-opcja').not(grupa).each(function() {
				$('.js-normal', this).not('.active').addClass('hidden').removeClass('normal');
				var active = $('div.active', this).attr('id');
				if (active != undefined) {
					active = active.split('-');
					active = active[1];
					var wybranyTmp = [];
					$(wybrany).each(function() {
						wybranyId = parseInt(this, 10);
						if (wybranyId !== active) {
							wybranyTmp.push(wybranyId);
						}
					});
					$('.js-variant').each(function() {
						var war_tmp = ';' + $(this).val() + ';';
						$(wybranyTmp).each(function() {
							war_tmp = war_tmp.replace(';' + this + ';', ';');
						});
						war_tmp = war_tmp.substring(1, war_tmp.length - 1);
						war_tmp = war_tmp.split(';');
						if (war_tmp.length > 0 && (war_tmp.length == (Wariant.IloscOpcji - wybranyTmp.length))) {
							for (i = 0; i < war_tmp.length; i++) {
								if (war_tmp[i] > 0)
									$('.js-opcja div[id="wa-' + war_tmp[i] + '"]').removeClass('hidden').addClass('normal');
							}
						}
					});
				}
				$('.js-variant').each(function() {
					var war_tmp = ';' + $(this).val() + ';';
					$(wybrany).each(function() {
						war_tmp = war_tmp.replace(';' + this + ';', ';');
					});
					war_tmp = war_tmp.substring(1, war_tmp.length - 1);
					war_tmp = war_tmp.split(';');
					if (war_tmp.length > 0 && (war_tmp.length == (Wariant.IloscOpcji - wybrany.length))) {
						for (i = 0; i < war_tmp.length; i++) {
							if (war_tmp[i] > 0)
								$('.js-opcja div[id="wa-' + war_tmp[i] + '"]').removeClass('hidden').addClass('normal');
						}
					}
				});
			});
			Wariant.SetParams($('#def_wariant').val());
			$('a[rel^="dodajDoKoszyka"]').unbind('click').addClass('hidden').html(Wariant.lblWybierz);
			if (Wariant.IloscOpcji == wybrany.length) {
				wybrany = wybrany.sort(Wariant.SortNumber);
				Wariant.SetParams($('.js-variant[value="' + wybrany.join(';') + '"]').attr('name'));
				$('a[rel^="dodajDoKoszyka"]').bind('click', Koszyk.DodajProdukt).removeClass('hidden').html(Wariant.lblDodaj);
			}
		}
	},
	Usun: function(warosc) {
		wybrany = ';' + wybrany.join(';') + ';';
		wybrany = wybrany.replace(';' + warosc + ';', ';');
		wybrany = wybrany.substring(1, wybrany.length - 1);
		if (wybrany == ';')
			wybrany = [];
		else
			wybrany = wybrany.split(';');
	},
	Reset: function() {
		wybrany = [];
		$('.js-opcja div').addClass('normal').removeClass('active').removeClass('hidden');
		$(this).click();
	},
	SortNumber: function(a, b) {
		return a - b;
	},
	SetParams: function(params) {
		if (params != undefined) {
			params = params.split('|');
			if (params[1] != '')
				$('.js-kod').html(params[1]);
			$('.js-cena').html(params[2]);
			if (params[4] != '')
				$('.js-dostepnosc').html(params[4]);
			if (params[5] != '')
				$('.js-czas').html(params[5]);
			var idDodania = $('a[rel^="dodajDoKoszyka"]').attr('rel');
			idDodania = idDodania.split(',');
			if (params[6] != undefined)
				idDodania[2] = parseInt(params[6])
			else
				idDodania[2] = 'null';
			$('a[rel^="dodajDoKoszyka"]').attr('rel', idDodania.join(','));
		}
	}
};

function delCompare(komunikat) {
	if ($('input[name^="produkty"]:checked').length > 0) {
		$('input[name="usun"]').val('1');
		$('form[name="porownaj"]').submit();
	} else {
		alert(komunikat);
	}
}
if (!Porownanie) var Porownanie = new Object();
var Porownanie = {
	Init: function() {
		$('a[rel^="dodajPorownanie"]').bind('click', Porownanie.DodajProdukt);
	},
	DodajProdukt: function() {
		var buttons = {};
		dane = $(this).attr('rel').split(",");
		if (typeof(ajaxLinks) != "undefined" && typeof(ajaxLinks.porownaj_link) != "undefined") {
			$('body').showAjaxIndicator();
			$.ajax({
				type: 'POST',
				url: ajaxLinks.porownaj_link,
				data: {
					id_produktu: dane[1]
				},
				dataType: 'json',
				success: function(response) {
					buttons[response.button2] = function() {
						$(this).dialog('destroy');
						$('#DodajProduktInfo form').submit();
					};
					buttons[response.button] = function() {
						$(this).dialog('destroy');
					};
					$('#DodajProduktInfo').html(response.html);
					$('#DodajProduktInfo').dialog({
						title: response.komunikat,
						width: 550,
						modal: true,
						buttons: buttons
					});
					$('body').hideAjaxIndicator();
				},
				error: function(request, status, error) {
					if (request.status == 501) {
						alert(request.responseText);
					}
				}
			});
		} else {
			alert('error: link lub wariant');
		}
		return false;
	}
};
$(document).ready(function() {
	Porownanie.Init();
});
$(document).ready(function() {
	if (typeof(ajaxLinks) != "undefined") {
		if (typeof(ajaxLinks.dodaj_ogladany) != "undefined") {
			$.ajax({
				url: ajaxLinks.dodaj_ogladany
			});
		} else if (typeof(ajaxLinks.dodaj_ogladany_blok) != "undefined") {
			$.ajax({
				url: ajaxLinks.dodaj_ogladany_blok
			});
		}
		if (typeof(ajaxLinks.reload_ogladane_blok) != "undefined") {
			$("#js-ogladane").load(ajaxLinks.reload_ogladane_blok + "&r=" + Math.random());
		}
	}
});

function dig(blok) {
	var que = [];
	var queFilter = '';
	url = location.href.split('?');
	if (url[1] != undefined) {
		exp = new RegExp("s=(.*?)(&|$)");
		m = url[1].match(exp);
		if (m != null && m[1] != null)
			que.push('s=' + m[1]);
		exp = new RegExp("v=(.*?)(&|$)");
		m = url[1].match(exp);
		if (m != null && m[1] != null)
			que.push('v=' + m[1]);
	}
	var cod = $('#sklepform' + blok + ' input[name=cod]').val();
	var cdo = $('#sklepform' + blok + ' input[name=cdo]').val();
	if (!cod)
		cod = '';
	if (!cdo)
		cdo = '';
	if (cod != '' || cdo != '')
		que.push('c=' + cod.replace(',', '.') + ',' + cdo.replace(',', '.'));
	var values = [];
	var statusy = $('#sklepform' + blok + ' input[name^=st_]:checked');
	if (statusy.length > 0) {
		statusy.each(function() {
			values.push(this.value);
		});
		que.push('t=' + values.join(','));
	}
	if (que.length >= 1) {
		que.sort();
		queFilter = '?' + que.join('&');
	}
	var opcje = $('#sklepform' + blok + ' input[name^=opcje_]:checked');
	if (opcje.length > 0) {
		opcje.each(function() {
			values.push(this.value);
		});
	}
	if (values.length > 0) {
		values.sort();
		queFilter = values.join(',') + ',filtry.html' + queFilter;
	}
	var query = $('#sklepform' + blok + ' input[name=sciezka_katalog]').val();
	if (queFilter != '')
		query = query + queFilter;
	location.href = query;
}

function sort(s, p) {
	if (s != '') s = p + '=' + s;
	link = location.href;
	url = link.split('?');
	if (url[1] != undefined) {
		exp = new RegExp(p + "=(.*?)(&|$)");
		m = url[1].match(exp);
		var que = [];
		if (m != null && m[1] != null) {
			url[1] = url[1].replace(exp, s + '&');
			var tmp = url[1].split('&');
			for (i = 0; i < tmp.length; i++) {
				if (tmp[i] != '')
					que.push(tmp[i]);
			}
		} else {
			if (s != '') {
				que = url[1].split('&');
				que.push(s);
			}
		}
		que.sort();
		url[1] = que.join('&');
		if (url[1] != '')
			location.href = url[0] + '?' + url[1];
		else
			location.href = url[0];
	} else {
		if (s != '')
			location.href = url[0] + '?' + s;
	}
}

function szukajenter(e, id_bloku) {
	if (e.keyCode == 13)
		dig(id_bloku);
}
var DH = 0;
var an = 0;
var al = 0;
var ai = 0;
if (document.getElementById) {
	ai = 1;
	DH = 1;
} else {
	if (document.all) {
		al = 1;
		DH = 1;
	} else {
		browserVersion = parseInt(navigator.appVersion);
		if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {
			an = 1;
			DH = 1;
		}
	}
}

function fd(oi, wS) {
	if (ai) return wS ? document.getElementById(oi).style : document.getElementById(oi);
	if (al) return wS ? document.all[oi].style : document.all[oi];
	if (an) return document.layers[oi];
}

function pw() {
	return window.innerWidth != null ? window.innerWidth : document.body.clientWidth != null ? document.body.clientWidth : null;
}

function mouseX(evt) {
	if (evt.pageX) return evt.pageX;
	else if (evt.clientX) return evt.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
	else return null;
}

function mouseY(evt) {
	if (evt.pageY) return evt.pageY;
	else if (evt.clientY) return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
	else return null;
}

function popUp(evt, oi) {
	if (DH) {
		var wp = pw();
		ds = fd(oi, 1);
		dm = fd(oi, 0);
		st = ds.visibility;
		if (dm.offsetWidth) ew = dm.offsetWidth;
		else if (dm.clip.width) ew = dm.clip.width;
		if (st == "visible" || st == "show") {
			ds.visibility = "hidden";
		} else {
			tv = mouseY(evt) + 20;
			lv = mouseX(evt) - (ew / 4);
			if (lv < 2) lv = 2;
			else if (lv + ew > wp) lv -= ew / 2;
			if (!an) {
				lv += 'px';
				tv += 'px';
			}
			ds.left = lv;
			ds.top = tv;
			ds.visibility = "visible";
		}
	}
}
eval(function(p, a, c, k, e, r) {
	e = function(c) {
		return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
	};
	if (!''.replace(/^/, String)) {
		while (c--) r[e(c)] = k[c] || e(c);
		k = [function(e) {
			return r[e]
		}];
		e = function() {
			return '\\w+'
		};
		c = 1
	};
	while (c--)
		if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
	return p
}('(9($){$.1v.C=9(o){z 4.1b(9(){3p r(4,o)})};8 q={Z:F,25:1,21:1,u:7,1c:3,15:7,1K:\'2X\',2c:\'2Q\',1q:0,B:7,1j:7,1G:7,2F:7,2B:7,2z:7,2x:7,2v:7,2s:7,2p:7,1S:\'<P></P>\',1Q:\'<P></P>\',2m:\'2l\',2k:\'2l\',1O:7,1L:7};$.C=9(e,o){4.5=$.16({},q,o||{});4.Q=F;4.D=7;4.H=7;4.t=7;4.U=7;4.R=7;4.N=!4.5.Z?\'1H\':\'26\';4.E=!4.5.Z?\'24\':\'23\';8 a=\'\',1e=e.K.1e(\' \');1r(8 i=0;i<1e.I;i++){6(1e[i].2y(\'C-2w\')!=-1){$(e).1E(1e[i]);8 a=1e[i];1p}}6(e.2t==\'3o\'||e.2t==\'3n\'){4.t=$(e);4.D=4.t.19();6(4.D.1o(\'C-H\')){6(!4.D.19().1o(\'C-D\'))4.D=4.D.B(\'<P></P>\');4.D=4.D.19()}10 6(!4.D.1o(\'C-D\'))4.D=4.t.B(\'<P></P>\').19()}10{4.D=$(e);4.t=$(e).3h(\'>2o,>2n,P>2o,P>2n\')}6(a!=\'\'&&4.D.19()[0].K.2y(\'C-2w\')==-1)4.D.B(\'<P 3g=" \'+a+\'"></P>\');4.H=4.t.19();6(!4.H.I||!4.H.1o(\'C-H\'))4.H=4.t.B(\'<P></P>\').19();4.R=$(\'.C-11\',4.D);6(4.R.u()==0&&4.5.1Q!=7)4.R=4.H.1z(4.5.1Q).11();4.R.V(4.K(\'C-11\'));4.U=$(\'.C-17\',4.D);6(4.U.u()==0&&4.5.1S!=7)4.U=4.H.1z(4.5.1S).11();4.U.V(4.K(\'C-17\'));4.H.V(4.K(\'C-H\'));4.t.V(4.K(\'C-t\'));4.D.V(4.K(\'C-D\'));8 b=4.5.15!=7?1k.1P(4.1m()/4.5.15):7;8 c=4.t.32(\'1F\');8 d=4;6(c.u()>0){8 f=0,i=4.5.21;c.1b(9(){d.1I(4,i++);f+=d.S(4,b)});4.t.y(4.N,f+\'T\');6(!o||o.u===J)4.5.u=c.u()}4.D.y(\'1y\',\'1A\');4.U.y(\'1y\',\'1A\');4.R.y(\'1y\',\'1A\');4.2G=9(){d.17()};4.2b=9(){d.11()};4.1U=9(){d.2q()};6(4.5.1j!=7)4.5.1j(4,\'2a\');6($.2A.28){4.1f(F,F);$(27).1u(\'2I\',9(){d.1t()})}10 4.1t()};8 r=$.C;r.1v=r.2H={C:\'0.2.3\'};r.1v.16=r.16=$.16;r.1v.16({1t:9(){4.A=7;4.G=7;4.X=7;4.13=7;4.14=F;4.1d=7;4.O=7;4.W=F;6(4.Q)z;4.t.y(4.E,4.1s(4.5.21)+\'T\');8 p=4.1s(4.5.25);4.X=4.13=7;4.1i(p,F);$(27).22(\'2E\',4.1U).1u(\'2E\',4.1U)},2D:9(){4.t.2C();4.t.y(4.E,\'3u\');4.t.y(4.N,\'3t\');6(4.5.1j!=7)4.5.1j(4,\'2D\');4.1t()},2q:9(){6(4.O!=7&&4.W)4.t.y(4.E,r.M(4.t.y(4.E))+4.O);4.O=7;4.W=F;6(4.5.1G!=7)4.5.1G(4);6(4.5.15!=7){8 a=4;8 b=1k.1P(4.1m()/4.5.15),N=0,E=0;$(\'1F\',4.t).1b(9(i){N+=a.S(4,b);6(i+1<a.A)E=N});4.t.y(4.N,N+\'T\');4.t.y(4.E,-E+\'T\')}4.1c(4.A,F)},3s:9(){4.Q=1h;4.1f()},3r:9(){4.Q=F;4.1f()},u:9(s){6(s!=J){4.5.u=s;6(!4.Q)4.1f()}z 4.5.u},3q:9(i,a){6(a==J||!a)a=i;6(4.5.u!==7&&a>4.5.u)a=4.5.u;1r(8 j=i;j<=a;j++){8 e=4.L(j);6(!e.I||e.1o(\'C-1a-1D\'))z F}z 1h},L:9(i){z $(\'.C-1a-\'+i,4.t)},2u:9(i,s){8 e=4.L(i),20=0,2u=0;6(e.I==0){8 c,e=4.1B(i),j=r.M(i);1n(c=4.L(--j)){6(j<=0||c.I){j<=0?4.t.2r(e):c.1X(e);1p}}}10 20=4.S(e);e.1E(4.K(\'C-1a-1D\'));1R s==\'3l\'?e.3k(s):e.2C().3j(s);8 a=4.5.15!=7?1k.1P(4.1m()/4.5.15):7;8 b=4.S(e,a)-20;6(i>0&&i<4.A)4.t.y(4.E,r.M(4.t.y(4.E))-b+\'T\');4.t.y(4.N,r.M(4.t.y(4.N))+b+\'T\');z e},1V:9(i){8 e=4.L(i);6(!e.I||(i>=4.A&&i<=4.G))z;8 d=4.S(e);6(i<4.A)4.t.y(4.E,r.M(4.t.y(4.E))+d+\'T\');e.1V();4.t.y(4.N,r.M(4.t.y(4.N))-d+\'T\')},17:9(){4.1C();6(4.O!=7&&!4.W)4.1T(F);10 4.1c(((4.5.B==\'1Z\'||4.5.B==\'G\')&&4.5.u!=7&&4.G==4.5.u)?1:4.A+4.5.1c)},11:9(){4.1C();6(4.O!=7&&4.W)4.1T(1h);10 4.1c(((4.5.B==\'1Z\'||4.5.B==\'A\')&&4.5.u!=7&&4.A==1)?4.5.u:4.A-4.5.1c)},1T:9(b){6(4.Q||4.14||!4.O)z;8 a=r.M(4.t.y(4.E));!b?a-=4.O:a+=4.O;4.W=!b;4.X=4.A;4.13=4.G;4.1i(a)},1c:9(i,a){6(4.Q||4.14)z;4.1i(4.1s(i),a)},1s:9(i){6(4.Q||4.14)z;6(4.5.B!=\'18\')i=i<1?1:(4.5.u&&i>4.5.u?4.5.u:i);8 a=4.A>i;8 b=r.M(4.t.y(4.E));8 f=4.5.B!=\'18\'&&4.A<=1?1:4.A;8 c=a?4.L(f):4.L(4.G);8 j=a?f:f-1;8 e=7,l=0,p=F,d=0;1n(a?--j>=i:++j<i){e=4.L(j);p=!e.I;6(e.I==0){e=4.1B(j).V(4.K(\'C-1a-1D\'));c[a?\'1z\':\'1X\'](e)}c=e;d=4.S(e);6(p)l+=d;6(4.A!=7&&(4.5.B==\'18\'||(j>=1&&(4.5.u==7||j<=4.5.u))))b=a?b+d:b-d}8 g=4.1m();8 h=[];8 k=0,j=i,v=0;8 c=4.L(i-1);1n(++k){e=4.L(j);p=!e.I;6(e.I==0){e=4.1B(j).V(4.K(\'C-1a-1D\'));c.I==0?4.t.2r(e):c[a?\'1z\':\'1X\'](e)}c=e;8 d=4.S(e);6(d==0){3f(\'3e: 3d 1H/26 3c 1r 3b. 3a 39 38 37 36 35. 34...\');z 0}6(4.5.B!=\'18\'&&4.5.u!==7&&j>4.5.u)h.33(e);10 6(p)l+=d;v+=d;6(v>=g)1p;j++}1r(8 x=0;x<h.I;x++)h[x].1V();6(l>0){4.t.y(4.N,4.S(4.t)+l+\'T\');6(a){b-=l;4.t.y(4.E,r.M(4.t.y(4.E))-l+\'T\')}}8 n=i+k-1;6(4.5.B!=\'18\'&&4.5.u&&n>4.5.u)n=4.5.u;6(j>n){k=0,j=n,v=0;1n(++k){8 e=4.L(j--);6(!e.I)1p;v+=4.S(e);6(v>=g)1p}}8 o=n-k+1;6(4.5.B!=\'18\'&&o<1)o=1;6(4.W&&a){b+=4.O;4.W=F}4.O=7;6(4.5.B!=\'18\'&&n==4.5.u&&(n-k+1)>=1){8 m=r.Y(4.L(n),!4.5.Z?\'1l\':\'1N\');6((v-m)>g)4.O=v-g-m}1n(i-->o)b+=4.S(4.L(i));4.X=4.A;4.13=4.G;4.A=o;4.G=n;z b},1i:9(p,a){6(4.Q||4.14)z;4.14=1h;8 b=4;8 c=9(){b.14=F;6(p==0)b.t.y(b.E,0);6(b.5.B==\'1Z\'||b.5.B==\'G\'||b.5.u==7||b.G<b.5.u)b.2j();b.1f();b.1M(\'2i\')};4.1M(\'31\');6(!4.5.1K||a==F){4.t.y(4.E,p+\'T\');c()}10{8 o=!4.5.Z?{\'24\':p}:{\'23\':p};4.t.1i(o,4.5.1K,4.5.2c,c)}},2j:9(s){6(s!=J)4.5.1q=s;6(4.5.1q==0)z 4.1C();6(4.1d!=7)z;8 a=4;4.1d=30(9(){a.17()},4.5.1q*2Z)},1C:9(){6(4.1d==7)z;2Y(4.1d);4.1d=7},1f:9(n,p){6(n==J||n==7){8 n=!4.Q&&4.5.u!==0&&((4.5.B&&4.5.B!=\'A\')||4.5.u==7||4.G<4.5.u);6(!4.Q&&(!4.5.B||4.5.B==\'A\')&&4.5.u!=7&&4.G>=4.5.u)n=4.O!=7&&!4.W}6(p==J||p==7){8 p=!4.Q&&4.5.u!==0&&((4.5.B&&4.5.B!=\'G\')||4.A>1);6(!4.Q&&(!4.5.B||4.5.B==\'G\')&&4.5.u!=7&&4.A==1)p=4.O!=7&&4.W}8 a=4;4.U[n?\'1u\':\'22\'](4.5.2m,4.2G)[n?\'1E\':\'V\'](4.K(\'C-17-1w\')).1J(\'1w\',n?F:1h);4.R[p?\'1u\':\'22\'](4.5.2k,4.2b)[p?\'1E\':\'V\'](4.K(\'C-11-1w\')).1J(\'1w\',p?F:1h);6(4.U.I>0&&(4.U[0].1g==J||4.U[0].1g!=n)&&4.5.1O!=7){4.U.1b(9(){a.5.1O(a,4,n)});4.U[0].1g=n}6(4.R.I>0&&(4.R[0].1g==J||4.R[0].1g!=p)&&4.5.1L!=7){4.R.1b(9(){a.5.1L(a,4,p)});4.R[0].1g=p}},1M:9(a){8 b=4.X==7?\'2a\':(4.X<4.A?\'17\':\'11\');4.12(\'2F\',a,b);6(4.X!==4.A){4.12(\'2B\',a,b,4.A);4.12(\'2z\',a,b,4.X)}6(4.13!==4.G){4.12(\'2x\',a,b,4.G);4.12(\'2v\',a,b,4.13)}4.12(\'2s\',a,b,4.A,4.G,4.X,4.13);4.12(\'2p\',a,b,4.X,4.13,4.A,4.G)},12:9(a,b,c,d,e,f,g){6(4.5[a]==J||(1R 4.5[a]!=\'2h\'&&b!=\'2i\'))z;8 h=1R 4.5[a]==\'2h\'?4.5[a][b]:4.5[a];6(!$.2W(h))z;8 j=4;6(d===J)h(j,c,b);10 6(e===J)4.L(d).1b(9(){h(j,4,d,c,b)});10{1r(8 i=d;i<=e;i++)6(i!==7&&!(i>=f&&i<=g))4.L(i).1b(9(){h(j,4,i,c,b)})}},1B:9(i){z 4.1I(\'<1F></1F>\',i)},1I:9(e,i){8 a=$(e).V(4.K(\'C-1a\')).V(4.K(\'C-1a-\'+i));a.1J(\'2V\',i);z a},K:9(c){z c+\' \'+c+(!4.5.Z?\'-2U\':\'-Z\')},S:9(e,d){8 a=e.2g!=J?e[0]:e;8 b=!4.5.Z?a.1x+r.Y(a,\'2f\')+r.Y(a,\'1l\'):a.2e+r.Y(a,\'2d\')+r.Y(a,\'1N\');6(d==J||b==d)z b;8 w=!4.5.Z?d-r.Y(a,\'2f\')-r.Y(a,\'1l\'):d-r.Y(a,\'2d\')-r.Y(a,\'1N\');$(a).y(4.N,w+\'T\');z 4.S(a)},1m:9(){z!4.5.Z?4.H[0].1x-r.M(4.H.y(\'2T\'))-r.M(4.H.y(\'2S\')):4.H[0].2e-r.M(4.H.y(\'2R\'))-r.M(4.H.y(\'3i\'))},2P:9(i,s){6(s==J)s=4.5.u;z 1k.2O((((i-1)/s)-1k.2N((i-1)/s))*s)+1}});r.16({3m:9(d){z $.16(q,d||{})},Y:9(e,p){6(!e)z 0;8 a=e.2g!=J?e[0]:e;6(p==\'1l\'&&$.2A.28){8 b={\'1y\':\'1A\',\'2M\':\'2L\',\'1H\':\'1q\'},1Y,1W;$.29(a,b,9(){1Y=a.1x});b[\'1l\']=0;$.29(a,b,9(){1W=a.1x});z 1W-1Y}z r.M($.y(a,p))},M:9(v){v=2K(v);z 2J(v)?0:v}})})(3v);', 62, 218, '||||this|options|if|null|var|function||||||||||||||||||||list|size||||css|return|first|wrap|jcarousel|container|lt|false|last|clip|length|undefined|className|get|intval|wh|tail|div|locked|buttonPrev|dimension|px|buttonNext|addClass|inTail|prevFirst|margin|vertical|else|prev|callback|prevLast|animating|visible|extend|next|circular|parent|item|each|scroll|timer|split|buttons|jcarouselstate|true|animate|initCallback|Math|marginRight|clipping|while|hasClass|break|auto|for|pos|setup|bind|fn|disabled|offsetWidth|display|before|block|create|stopAuto|placeholder|removeClass|li|reloadCallback|width|format|attr|animation|buttonPrevCallback|notify|marginBottom|buttonNextCallback|ceil|buttonPrevHTML|typeof|buttonNextHTML|scrollTail|funcResize|remove|oWidth2|after|oWidth|both|old|offset|unbind|top|left|start|height|window|safari|swap|init|funcPrev|easing|marginTop|offsetHeight|marginLeft|jquery|object|onAfterAnimation|startAuto|buttonPrevEvent|click|buttonNextEvent|ol|ul|itemVisibleOutCallback|reload|prepend|itemVisibleInCallback|nodeName|add|itemLastOutCallback|skin|itemLastInCallback|indexOf|itemFirstOutCallback|browser|itemFirstInCallback|empty|reset|resize|itemLoadCallback|funcNext|prototype|load|isNaN|parseInt|none|float|floor|round|index|swing|borderTopWidth|borderRightWidth|borderLeftWidth|horizontal|jcarouselindex|isFunction|normal|clearTimeout|1000|setTimeout|onBeforeAnimation|children|push|Aborting|loop|infinite|an|cause|will|This|items|set|No|jCarousel|alert|class|find|borderBottomWidth|append|html|string|defaults|OL|UL|new|has|unlock|lock|10px|0px|jQuery'.split('|'), 0, {}))

function mycarousel_itemLoadCallback(carousel, state) {
	if (carousel.has(carousel.first, carousel.last)) {
		return;
	}
	jQuery.get(ajaxLinks.gallery_carousel, {
		first: carousel.first,
		last: carousel.last
	}, function(xml) {
		mycarousel_itemAddCallback(carousel, carousel.first, carousel.last, xml);
	}, 'xml');
};

function mycarousel_itemAddCallback(carousel, first, last, xml) {
	carousel.size(parseInt(jQuery('total', xml).text()));
	jQuery('foto', xml).each(function(i) {
		carousel.add(first + i, mycarousel_getItemHTML(jQuery(this).text(), jQuery(this).attr('rel'), jQuery('image_width', xml).text(), jQuery('image_height', xml).text(), jQuery(this).attr('class')));
	});
};

function mycarousel_getItemHTML(url, link, w, h, cls) {
	var active = '';
	if (cls == 'active')
		active = ' class="active"';
	return '<div style="width: ' + w + 'px; height: ' + h + 'px;"' + active + '><a href="' + link + '"><img src="' + url + '" alt="Foto" width="' + w + '" height="' + h + '" /></a></div>';
};

function MarkerClusterer(map, opt_markers, url, opt_opts) {
	var clusters_ = [];
	var map_ = map;
	var maxZoom_ = 13;
	var me_ = this;
	var gridSize_ = 35;
	var sizes = [53, 56, 66, 66, 66];
	var styles_ = [];
	var leftMarkers_ = [];
	var mcfn_ = null;
	var i = 0;
	for (i = 1; i <= 5; ++i) {
		styles_.push({
			'url': "" + url + "m" + i + ".png",
			'height': sizes[i - 1],
			'width': sizes[i - 1]
		});
	}
	if (typeof opt_opts === "object" && opt_opts !== null) {
		if (typeof opt_opts.gridSize === "number" && opt_opts.gridSize > 0) {
			gridSize_ = opt_opts.gridSize;
		}
		if (typeof opt_opts.maxZoom === "number") {
			maxZoom_ = opt_opts.maxZoom;
		}
		if (typeof opt_opts.styles === "object" && opt_opts.styles !== null && opt_opts.styles.length !== 0) {
			styles_ = opt_opts.styles;
		}
	}

	function addLeftMarkers_() {
		if (leftMarkers_.length === 0) {
			return;
		}
		var leftMarkers = [];
		for (i = 0; i < leftMarkers_.length; ++i) {
			me_.addMarker(leftMarkers_[i], true, null, null, true);
		}
		leftMarkers_ = leftMarkers;
	}
	this.getStyles_ = function() {
		return styles_;
	};
	this.clearMarkers = function() {
		for (var i = 0; i < clusters_.length; ++i) {
			if (typeof clusters_[i] !== "undefined" && clusters_[i] !== null) {
				clusters_[i].clearMarkers();
			}
		}
		clusters_ = [];
		leftMarkers_ = [];
		GEvent.removeListener(mcfn_);
	};

	function isMarkerInViewport_(marker) {
		return map_.getBounds().containsLatLng(marker.getLatLng());
	}

	function reAddMarkers_(markers) {
		var len = markers.length;
		var clusters = [];
		for (var i = len - 1; i >= 0; --i) {
			me_.addMarker(markers[i].marker, true, markers[i].isAdded, clusters, true);
		}
		addLeftMarkers_();
	}
	this.addMarker = function(marker, opt_isNodraw, opt_isAdded, opt_clusters, opt_isNoCheck) {
		if (opt_isNoCheck !== true) {
			if (!isMarkerInViewport_(marker)) {
				leftMarkers_.push(marker);
				return;
			}
		}
		var isAdded = opt_isAdded;
		var clusters = opt_clusters;
		var pos = map_.fromLatLngToDivPixel(marker.getLatLng());
		if (typeof isAdded !== "boolean") {
			isAdded = false;
		}
		if (typeof clusters !== "object" || clusters === null) {
			clusters = clusters_;
		}
		var length = clusters.length;
		var cluster = null;
		for (var i = length - 1; i >= 0; i--) {
			cluster = clusters[i];
			var center = cluster.getCenter();
			if (center === null) {
				continue;
			}
			center = map_.fromLatLngToDivPixel(center);
			if (pos.x >= center.x - gridSize_ && pos.x <= center.x + gridSize_ && pos.y >= center.y - gridSize_ && pos.y <= center.y + gridSize_) {
				cluster.addMarker({
					'isAdded': isAdded,
					'marker': marker
				});
				if (!opt_isNodraw) {
					cluster.redraw_();
				}
				return;
			}
		}
		cluster = new Cluster(this, map);
		cluster.addMarker({
			'isAdded': isAdded,
			'marker': marker
		});
		if (!opt_isNodraw) {
			cluster.redraw_();
		}
		clusters.push(cluster);
		if (clusters !== clusters_) {
			clusters_.push(cluster);
		}
	};
	this.removeMarker = function(marker) {
		for (var i = 0; i < clusters_.length; ++i) {
			if (clusters_[i].remove(marker)) {
				clusters_[i].redraw_();
				return;
			}
		}
	};
	this.redraw_ = function() {
		var clusters = this.getClustersInViewport_();
		for (var i = 0; i < clusters.length; ++i) {
			clusters[i].redraw_(true);
		}
	};
	this.getClustersInViewport_ = function() {
		var clusters = [];
		var curBounds = map_.getBounds();
		for (var i = 0; i < clusters_.length; i++) {
			if (clusters_[i].isInBounds(curBounds)) {
				clusters.push(clusters_[i]);
			}
		}
		return clusters;
	};
	this.getMaxZoom_ = function() {
		return maxZoom_;
	};
	this.getMap_ = function() {
		return map_;
	};
	this.getGridSize_ = function() {
		return gridSize_;
	};
	this.getTotalMarkers = function() {
		var result = 0;
		for (var i = 0; i < clusters_.length; ++i) {
			result += clusters_[i].getTotalMarkers();
		}
		return result;
	};
	this.getTotalClusters = function() {
		return clusters_.length;
	};
	this.resetViewport = function() {
		var clusters = this.getClustersInViewport_();
		var tmpMarkers = [];
		var removed = 0;
		for (var i = 0; i < clusters.length; ++i) {
			var cluster = clusters[i];
			var oldZoom = cluster.getCurrentZoom();
			if (oldZoom === null) {
				continue;
			}
			var curZoom = map_.getZoom();
			if (curZoom !== oldZoom) {
				var mks = cluster.getMarkers();
				for (var j = 0; j < mks.length; ++j) {
					var newMarker = {
						'isAdded': false,
						'marker': mks[j].marker
					};
					tmpMarkers.push(newMarker);
				}
				cluster.clearMarkers();
				removed++;
				for (j = 0; j < clusters_.length; ++j) {
					if (cluster === clusters_[j]) {
						clusters_.splice(j, 1);
					}
				}
			}
		}
		reAddMarkers_(tmpMarkers);
		this.redraw_();
	};
	this.addMarkers = function(markers) {
		for (var i = 0; i < markers.length; ++i) {
			this.addMarker(markers[i], true);
		}
		this.redraw_();
	};
	if (typeof opt_markers === "object" && opt_markers !== null) {
		this.addMarkers(opt_markers);
	}
	mcfn_ = GEvent.addListener(map_, "moveend", function() {
		me_.resetViewport();
	});
}

function Cluster(markerClusterer) {
	var center_ = null;
	var markers_ = [];
	var markerClusterer_ = markerClusterer;
	var map_ = markerClusterer.getMap_();
	var clusterMarker_ = null;
	var zoom_ = map_.getZoom();
	this.getMarkers = function() {
		return markers_;
	};
	this.isInBounds = function(bounds) {
		if (center_ === null) {
			return false;
		}
		if (!bounds) {
			bounds = map_.getBounds();
		}
		var sw = map_.fromLatLngToDivPixel(bounds.getSouthWest());
		var ne = map_.fromLatLngToDivPixel(bounds.getNorthEast());
		var centerxy = map_.fromLatLngToDivPixel(center_);
		var inViewport = true;
		var gridSize = markerClusterer.getGridSize_();
		if (zoom_ !== map_.getZoom()) {
			var dl = map_.getZoom() - zoom_;
			gridSize = Math.pow(2, dl) * gridSize;
		}
		if (ne.x !== sw.x && (centerxy.x + gridSize < sw.x || centerxy.x - gridSize > ne.x)) {
			inViewport = false;
		}
		if (inViewport && (centerxy.y + gridSize < ne.y || centerxy.y - gridSize > sw.y)) {
			inViewport = false;
		}
		return inViewport;
	};
	this.getCenter = function() {
		return center_;
	};
	this.addMarker = function(marker) {
		if (center_ === null) {
			center_ = marker.marker.getLatLng();
		}
		markers_.push(marker);
	};
	this.removeMarker = function(marker) {
		for (var i = 0; i < markers_.length; ++i) {
			if (marker === markers_[i].marker) {
				if (markers_[i].isAdded) {
					map_.removeOverlay(markers_[i].marker);
				}
				markers_.splice(i, 1);
				return true;
			}
		}
		return false;
	};
	this.getCurrentZoom = function() {
		return zoom_;
	};
	this.redraw_ = function(isForce) {
		if (!isForce && !this.isInBounds()) {
			return;
		}
		zoom_ = map_.getZoom();
		var i = 0;
		var mz = markerClusterer.getMaxZoom_();
		if (mz === null) {
			mz = map_.getCurrentMapType().getMaximumResolution();
		}
		if (zoom_ >= mz || this.getTotalMarkers() === 1) {
			for (i = 0; i < markers_.length; ++i) {
				if (markers_[i].isAdded) {
					if (markers_[i].marker.isHidden()) {
						markers_[i].marker.show();
					}
				} else {
					map_.addOverlay(markers_[i].marker);
					markers_[i].isAdded = true;
				}
			}
			if (clusterMarker_ !== null) {
				clusterMarker_.hide();
			}
		} else {
			for (i = 0; i < markers_.length; ++i) {
				if (markers_[i].isAdded && (!markers_[i].marker.isHidden())) {
					markers_[i].marker.hide();
				}
			}
			if (clusterMarker_ === null) {
				clusterMarker_ = new ClusterMarker_(center_, this.getTotalMarkers(), markerClusterer_.getStyles_(), markerClusterer_.getGridSize_());
				map_.addOverlay(clusterMarker_);
			} else {
				if (clusterMarker_.isHidden()) {
					clusterMarker_.show();
				}
				clusterMarker_.redraw(true);
			}
		}
	};
	this.clearMarkers = function() {
		if (clusterMarker_ !== null) {
			map_.removeOverlay(clusterMarker_);
		}
		for (var i = 0; i < markers_.length; ++i) {
			if (markers_[i].isAdded) {
				map_.removeOverlay(markers_[i].marker);
			}
		}
		markers_ = [];
	};
	this.getTotalMarkers = function() {
		return markers_.length;
	};
}

function ClusterMarker_(latlng, count, styles, padding) {
	var index = 0;
	var dv = count;
	while (dv !== 0) {
		dv = parseInt(dv / 10, 10);
		index++;
	}
	if (styles.length < index) {
		index = styles.length;
	}
	this.url_ = styles[index - 1].url;
	this.height_ = styles[index - 1].height;
	this.width_ = styles[index - 1].width;
	this.textColor_ = styles[index - 1].opt_textColor;
	this.anchor_ = styles[index - 1].opt_anchor;
	this.latlng_ = latlng;
	this.index_ = index;
	this.styles_ = styles;
	this.text_ = count;
	this.padding_ = padding;
}
ClusterMarker_.prototype.initialize = function(map) {
	this.map_ = map;
	var div = document.createElement("div");
	var latlng = this.latlng_;
	var pos = map.fromLatLngToDivPixel(latlng);
	pos.x -= parseInt(this.width_ / 2, 10);
	pos.y -= parseInt(this.height_ / 2, 10);
	var mstyle = "";
	if (document.all) {
		mstyle = 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="' + this.url_ + '");';
	} else {
		mstyle = "background:url(" + this.url_ + ");";
	}
	if (typeof this.anchor_ === "object") {
		if (typeof this.anchor_[0] === "number" && this.anchor_[0] > 0 && this.anchor_[0] < this.height_) {
			mstyle += 'height:' + (this.height_ - this.anchor_[0]) + 'px;padding-top:' + this.anchor_[0] + 'px;';
		} else {
			mstyle += 'height:' + this.height_ + 'px;line-height:' + this.height_ + 'px;';
		}
		if (typeof this.anchor_[1] === "number" && this.anchor_[1] > 0 && this.anchor_[1] < this.width_) {
			mstyle += 'width:' + (this.width_ - this.anchor_[1]) + 'px;padding-left:' + this.anchor_[1] + 'px;';
		} else {
			mstyle += 'width:' + this.width_ + 'px;text-align:center;';
		}
	} else {
		mstyle += 'height:' + this.height_ + 'px;line-height:' + this.height_ + 'px;';
		mstyle += 'width:' + this.width_ + 'px;text-align:center;';
	}
	var txtColor = this.textColor_ ? this.textColor_ : 'black';
	div.style.cssText = mstyle + 'cursor:pointer;top:' + pos.y + "px;left:" +
		pos.x + "px;color:" + txtColor + ";position:absolute;font-size:11px;" + 'font-family:Arial,sans-serif;font-weight:bold';
	div.innerHTML = this.text_;
	map.getPane(G_MAP_MAP_PANE).appendChild(div);
	var padding = this.padding_;
	GEvent.addDomListener(div, "click", function() {
		var pos = map.fromLatLngToDivPixel(latlng);
		var sw = new GPoint(pos.x - padding, pos.y + padding);
		sw = map.fromDivPixelToLatLng(sw);
		var ne = new GPoint(pos.x + padding, pos.y - padding);
		ne = map.fromDivPixelToLatLng(ne);
		var zoom = map.getBoundsZoomLevel(new GLatLngBounds(sw, ne), map.getSize());
		map.setCenter(latlng, zoom);
	});
	this.div_ = div;
};
ClusterMarker_.prototype.remove = function() {
	this.div_.parentNode.removeChild(this.div_);
};
ClusterMarker_.prototype.copy = function() {
	return new ClusterMarker_(this.latlng_, this.index_, this.text_, this.styles_, this.padding_);
};
ClusterMarker_.prototype.redraw = function(force) {
	if (!force) {
		return;
	}
	var pos = this.map_.fromLatLngToDivPixel(this.latlng_);
	pos.x -= parseInt(this.width_ / 2, 10);
	pos.y -= parseInt(this.height_ / 2, 10);
	this.div_.style.top = pos.y + "px";
	this.div_.style.left = pos.x + "px";
};
ClusterMarker_.prototype.hide = function() {
	this.div_.style.display = "none";
};
ClusterMarker_.prototype.show = function() {
	this.div_.style.display = "";
};
ClusterMarker_.prototype.isHidden = function() {
	return this.div_.style.display === "none";
};;
(function(b) {
	var m, t, u, f, D, j, E, n, z, A, q = 0,
		e = {},
		o = [],
		p = 0,
		d = {},
		l = [],
		G = null,
		v = new Image,
		J = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,
		W = /[^\.]\.(swf)\s*$/i,
		K, L = 1,
		y = 0,
		s = "",
		r, i, h = false,
		B = b.extend(b("<div/>")[0], {
			prop: 0
		}),
		M = b.browser.msie && b.browser.version < 7 && !window.XMLHttpRequest,
		N = function() {
			t.hide();
			v.onerror = v.onload = null;
			G && G.abort();
			m.empty()
		},
		O = function() {
			if (false === e.onError(o, q, e)) {
				t.hide();
				h = false
			} else {
				e.titleShow = false;
				e.width = "auto";
				e.height = "auto";
				m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
				F()
			}
		},
		I = function() {
			var a = o[q],
				c, g, k, C, P, w;
			N();
			e = b.extend({}, b.fn.fancybox.defaults, typeof b(a).data("fancybox") == "undefined" ? e : b(a).data("fancybox"));
			w = e.onStart(o, q, e);
			if (w === false) h = false;
			else {
				if (typeof w == "object") e = b.extend(e, w);
				k = e.title || (a.nodeName ? b(a).attr("title") : a.title) || "";
				if (a.nodeName && !e.orig) e.orig = b(a).children("img:first").length ? b(a).children("img:first") : b(a);
				if (k === "" && e.orig && e.titleFromAlt) k = e.orig.attr("alt");
				c = e.href || (a.nodeName ? b(a).attr("href") : a.href) || null;
				if (/^(?:javascript)/i.test(c) || c == "#") c = null;
				if (e.type) {
					g = e.type;
					if (!c) c = e.content
				} else if (e.content) g = "html";
				else if (c) g = c.match(J) ? "image" : c.match(W) ? "swf" : b(a).hasClass("iframe") ? "iframe" : c.indexOf("#") === 0 ? "inline" : "ajax";
				if (g) {
					if (g == "inline") {
						a = c.substr(c.indexOf("#"));
						g = b(a).length > 0 ? "inline" : "ajax"
					}
					e.type = g;
					e.href = c;
					e.title = k;
					if (e.autoDimensions)
						if (e.type == "html" || e.type == "inline" || e.type == "ajax") {
							e.width = "auto";
							e.height = "auto"
						} else e.autoDimensions = false;
					if (e.modal) {
						e.overlayShow = true;
						e.hideOnOverlayClick = false;
						e.hideOnContentClick = false;
						e.enableEscapeButton = false;
						e.showCloseButton = false
					}
					e.padding = parseInt(e.padding, 10);
					e.margin = parseInt(e.margin, 10);
					m.css("padding", e.padding + e.margin);
					b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change", function() {
						b(this).replaceWith(j.children())
					});
					switch (g) {
						case "html":
							m.html(e.content);
							F();
							break;
						case "inline":
							if (b(a).parent().is("#fancybox-content") === true) {
								h = false;
								break
							}
							b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup", function() {
								b(this).replaceWith(j.children())
							}).bind("fancybox-cancel", function() {
								b(this).replaceWith(m.children())
							});
							b(a).appendTo(m);
							F();
							break;
						case "image":
							h = false;
							b.fancybox.showActivity();
							v = new Image;
							v.onerror = function() {
								O()
							};
							v.onload = function() {
								h = true;
								v.onerror = v.onload = null;
								e.width = v.width;
								e.height = v.height;
								if (e.link) {
									l = $("<a />").attr({
										'href': e.link,
										'target': e.target
									}).appendTo(m);
									b("<img />").attr({
										id: "fancybox-img",
										src: v.src,
										alt: e.title
									}).appendTo(l)
								} else {
									b("<img />").attr({
										id: "fancybox-img",
										src: v.src,
										alt: e.title
									}).appendTo(m)
								};
								Q()
							};
							v.src = c;
							break;
						case "swf":
							e.scrolling = "no";
							C = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + e.width + '" height="' + e.height + '"><param name="movie" value="' + c + '"></param>';
							P = "";
							b.each(e.swf, function(x, H) {
								C += '<param name="' + x + '" value="' + H + '"></param>';
								P += " " + x + '="' + H + '"'
							});
							C += '<embed src="' + c + '" type="application/x-shockwave-flash" width="' + e.width + '" height="' + e.height + '"' + P + "></embed></object>";
							m.html(C);
							F();
							break;
						case "ajax":
							h = false;
							b.fancybox.showActivity();
							e.ajax.win = e.ajax.success;
							G = b.ajax(b.extend({}, e.ajax, {
								url: c,
								data: e.ajax.data || {},
								error: function(x) {
									x.status > 0 && O()
								},
								success: function(x, H, R) {
									if ((typeof R == "object" ? R : G).status == 200) {
										if (typeof e.ajax.win == "function") {
											w = e.ajax.win(c, x, H, R);
											if (w === false) {
												t.hide();
												return
											} else if (typeof w == "string" || typeof w == "object") x = w
										}
										m.html(x);
										F()
									}
								}
							}));
							break;
						case "iframe":
							Q()
					}
				} else O()
			}
		},
		F = function() {
			var a = e.width,
				c = e.height;
			a = a.toString().indexOf("%") > -1 ? parseInt((b(window).width() - e.margin * 2) * parseFloat(a) / 100, 10) + "px" : a == "auto" ? "auto" : a + "px";
			c = c.toString().indexOf("%") > -1 ? parseInt((b(window).height() - e.margin * 2) * parseFloat(c) / 100, 10) + "px" : c == "auto" ? "auto" : c + "px";
			m.wrapInner('<div style="width:' + a + ";height:" + c + ";overflow: " + (e.scrolling == "auto" ? "auto" : e.scrolling == "yes" ? "scroll" : "hidden") + ';position:relative;"></div>');
			e.width = m.width();
			e.height = m.height();
			Q()
		},
		Q = function() {
			var a, c;
			t.hide();
			if (f.is(":visible") && false === d.onCleanup(l, p, d)) {
				b.event.trigger("fancybox-cancel");
				h = false
			} else {
				h = true;
				b(j.add(u)).unbind();
				b(window).unbind("resize.fb scroll.fb");
				b(document).unbind("keydown.fb");
				f.is(":visible") && d.titlePosition !== "outside" && f.css("height", f.height());
				l = o;
				p = q;
				d = e;
				if (d.overlayShow) {
					u.css({
						"background-color": d.overlayColor,
						opacity: d.overlayOpacity,
						cursor: d.hideOnOverlayClick ? "pointer" : "auto",
						height: b(document).height()
					});
					if (!u.is(":visible")) {
						M && b("select:not(#fancybox-tmp select)").filter(function() {
							return this.style.visibility !== "hidden"
						}).css({
							visibility: "hidden"
						}).one("fancybox-cleanup", function() {
							this.style.visibility = "inherit"
						});
						u.show()
					}
				} else u.hide();
				i = X();
				s = d.title || "";
				y = 0;
				n.empty().removeAttr("style").removeClass();
				if (d.titleShow !== false) {
					if (b.isFunction(d.titleFormat)) a = d.titleFormat(s, l, p, d);
					else a = s && s.length ? d.titlePosition == "float" ? '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + s + '</td><td id="fancybox-title-float-right"></td></tr></table>' : '<div id="fancybox-title-' + d.titlePosition + '">' + s + "</div>" : false;
					s = a;
					if (!(!s || s === "")) {
						n.addClass("fancybox-title-" + d.titlePosition).html(s).appendTo("body").show();
						switch (d.titlePosition) {
							case "inside":
								n.css({
									width: i.width - d.padding * 2,
									marginLeft: d.padding,
									marginRight: d.padding
								});
								y = n.outerHeight(true);
								n.appendTo(D);
								i.height += y;
								break;
							case "over":
								n.css({
									marginLeft: d.padding,
									width: i.width - d.padding * 2,
									bottom: d.padding
								}).appendTo(D);
								break;
							case "float":
								n.css("left", parseInt((n.width() - i.width - 40) / 2, 10) * -1).appendTo(f);
								break;
							default:
								n.css({
									width: i.width - d.padding * 2,
									paddingLeft: d.padding,
									paddingRight: d.padding
								}).appendTo(f)
						}
					}
				}
				n.hide();
				if (f.is(":visible")) {
					b(E.add(z).add(A)).hide();
					a = f.position();
					r = {
						top: a.top,
						left: a.left,
						width: f.width(),
						height: f.height()
					};
					c = r.width == i.width && r.height == i.height;
					j.fadeTo(d.changeFade, 0.3, function() {
						var g = function() {
							j.html(m.contents()).fadeTo(d.changeFade, 1, S)
						};
						b.event.trigger("fancybox-change");
						j.empty().removeAttr("filter").css({
							"border-width": d.padding,
							width: i.width - d.padding * 2,
							height: e.autoDimensions ? "auto" : i.height - y - d.padding * 2
						});
						if (c) g();
						else {
							B.prop = 0;
							b(B).animate({
								prop: 1
							}, {
								duration: d.changeSpeed,
								easing: d.easingChange,
								step: T,
								complete: g
							})
						}
					})
				} else {
					f.removeAttr("style");
					j.css("border-width", d.padding);
					if (d.transitionIn == "elastic") {
						r = V();
						j.html(m.contents());
						f.show();
						if (d.opacity) i.opacity = 0;
						B.prop = 0;
						b(B).animate({
							prop: 1
						}, {
							duration: d.speedIn,
							easing: d.easingIn,
							step: T,
							complete: S
						})
					} else {
						d.titlePosition == "inside" && y > 0 && n.show();
						j.css({
							width: i.width - d.padding * 2,
							height: e.autoDimensions ? "auto" : i.height - y - d.padding * 2
						}).html(m.contents());
						f.css(i).fadeIn(d.transitionIn == "none" ? 0 : d.speedIn, S)
					}
				}
			}
		},
		Y = function() {
			if (d.enableEscapeButton || d.enableKeyboardNav) b(document).bind("keydown.fb", function(a) {
				if (a.keyCode == 27 && d.enableEscapeButton) {
					a.preventDefault();
					b.fancybox.close()
				} else if ((a.keyCode == 37 || a.keyCode == 39) && d.enableKeyboardNav && a.target.tagName !== "INPUT" && a.target.tagName !== "TEXTAREA" && a.target.tagName !== "SELECT") {
					a.preventDefault();
					b.fancybox[a.keyCode == 37 ? "prev" : "next"]()
				}
			});
			if (d.showNavArrows) {
				if (d.cyclic && l.length > 1 || p !== 0) z.show();
				if (d.cyclic && l.length > 1 || p != l.length - 1) A.show()
			} else {
				z.hide();
				A.hide()
			}
		},
		S = function() {
			if (!b.support.opacity) {
				j.get(0).style.removeAttribute("filter");
				f.get(0).style.removeAttribute("filter")
			}
			e.autoDimensions && j.css("height", "auto");
			f.css("height", "auto");
			s && s.length && n.show();
			d.showCloseButton && E.show();
			Y();
			d.hideOnContentClick && j.bind("click", b.fancybox.close);
			d.hideOnOverlayClick && u.bind("click", b.fancybox.close);
			b(window).bind("resize.fb", b.fancybox.resize);
			d.centerOnScroll && b(window).bind("scroll.fb", b.fancybox.center);
			if (d.type == "iframe") b('<iframe id="fancybox-frame" name="fancybox-frame' + (new Date).getTime() + '" frameborder="0" hspace="0" ' + (b.browser.msie ? 'allowtransparency="true""' : "") + ' scrolling="' + e.scrolling + '" src="' + d.href + '"></iframe>').appendTo(j);
			f.show();
			h = false;
			b.fancybox.center();
			d.onComplete(l, p, d);
			var a, c;
			if (l.length - 1 > p) {
				a = l[p + 1].href;
				if (typeof a !== "undefined" && a.match(J)) {
					c = new Image;
					c.src = a
				}
			}
			if (p > 0) {
				a = l[p - 1].href;
				if (typeof a !== "undefined" && a.match(J)) {
					c = new Image;
					c.src = a
				}
			}
		},
		T = function(a) {
			var c = {
				width: parseInt(r.width + (i.width - r.width) * a, 10),
				height: parseInt(r.height + (i.height - r.height) * a, 10),
				top: parseInt(r.top + (i.top - r.top) * a, 10),
				left: parseInt(r.left + (i.left - r.left) * a, 10)
			};
			if (typeof i.opacity !== "undefined") c.opacity = a < 0.5 ? 0.5 : a;
			f.css(c);
			j.css({
				width: c.width - d.padding * 2,
				height: c.height - y * a - d.padding * 2
			})
		},
		U = function() {
			return [b(window).width() - d.margin * 2, b(window).height() - d.margin * 2, b(document).scrollLeft() + d.margin, b(document).scrollTop() + d.margin]
		},
		X = function() {
			var a = U(),
				c = {},
				g = d.autoScale,
				k = d.padding * 2;
			c.width = d.width.toString().indexOf("%") > -1 ? parseInt(a[0] * parseFloat(d.width) / 100, 10) : d.width + k;
			c.height = d.height.toString().indexOf("%") > -1 ? parseInt(a[1] * parseFloat(d.height) / 100, 10) : d.height + k;
			if (g && (c.width > a[0] || c.height > a[1]))
				if (e.type == "image" || e.type == "swf") {
					g = d.width / d.height;
					if (c.width > a[0]) {
						c.width = a[0];
						c.height = parseInt((c.width - k) / g + k, 10)
					}
					if (c.height > a[1]) {
						c.height = a[1];
						c.width = parseInt((c.height - k) * g + k, 10)
					}
				} else {
					c.width = Math.min(c.width, a[0]);
					c.height = Math.min(c.height, a[1])
				}
			c.top = parseInt(Math.max(a[3] - 20, a[3] + (a[1] - c.height - 40) * 0.5), 10);
			c.left = parseInt(Math.max(a[2] - 20, a[2] + (a[0] - c.width - 40) * 0.5), 10);
			return c
		},
		V = function() {
			var a = e.orig ? b(e.orig) : false,
				c = {};
			if (a && a.length) {
				c = a.offset();
				c.top += parseInt(a.css("paddingTop"), 10) || 0;
				c.left += parseInt(a.css("paddingLeft"), 10) || 0;
				c.top += parseInt(a.css("border-top-width"), 10) || 0;
				c.left += parseInt(a.css("border-left-width"), 10) || 0;
				c.width = a.width();
				c.height = a.height();
				c = {
					width: c.width + d.padding * 2,
					height: c.height + d.padding * 2,
					top: c.top - d.padding - 20,
					left: c.left - d.padding - 20
				}
			} else {
				a = U();
				c = {
					width: d.padding * 2,
					height: d.padding * 2,
					top: parseInt(a[3] + a[1] * 0.5, 10),
					left: parseInt(a[2] + a[0] * 0.5, 10)
				}
			}
			return c
		},
		Z = function() {
			if (t.is(":visible")) {
				b("div", t).css("top", L * -40 + "px");
				L = (L + 1) % 12
			} else clearInterval(K)
		};
	b.fn.fancybox = function(a) {
		if (!b(this).length) return this;
		b(this).data("fancybox", b.extend({}, a, b.metadata ? b(this).metadata() : {})).unbind("click.fb").bind("click.fb", function(c) {
			c.preventDefault();
			if (!h) {
				h = true;
				b(this).blur();
				o = [];
				q = 0;
				c = b(this).attr("data-group") || "";
				if (!c || c == "" || c === "nofollow") o.push(this);
				else {
					o = b("a[data-group=" + c + "], area[data-group=" + c + "]");
					q = o.index(this)
				}
				I()
			}
		});
		return this
	};
	b.fancybox = function(a, c) {
		var g;
		if (!h) {
			h = true;
			g = typeof c !== "undefined" ? c : {};
			o = [];
			q = parseInt(g.index, 10) || 0;
			if (b.isArray(a)) {
				for (var k = 0, C = a.length; k < C; k++)
					if (typeof a[k] == "object") b(a[k]).data("fancybox", b.extend({}, g, a[k]));
					else a[k] = b({}).data("fancybox", b.extend({
						content: a[k]
					}, g));
				o = jQuery.merge(o, a)
			} else {
				if (typeof a == "object") b(a).data("fancybox", b.extend({}, g, a));
				else a = b({}).data("fancybox", b.extend({
					content: a
				}, g));
				o.push(a)
			}
			if (q > o.length || q < 0) q = 0;
			I()
		}
	};
	b.fancybox.showActivity = function() {
		clearInterval(K);
		t.show();
		K = setInterval(Z, 66)
	};
	b.fancybox.hideActivity = function() {
		t.hide()
	};
	b.fancybox.next = function() {
		return b.fancybox.pos(p +
			1)
	};
	b.fancybox.prev = function() {
		return b.fancybox.pos(p - 1)
	};
	b.fancybox.pos = function(a) {
		if (!h) {
			a = parseInt(a);
			o = l;
			if (a > -1 && a < l.length) {
				q = a;
				I()
			} else if (d.cyclic && l.length > 1) {
				q = a >= l.length ? 0 : l.length - 1;
				I()
			}
		}
	};
	b.fancybox.cancel = function() {
		if (!h) {
			h = true;
			b.event.trigger("fancybox-cancel");
			N();
			e.onCancel(o, q, e);
			h = false
		}
	};
	b.fancybox.close = function() {
		function a() {
			u.fadeOut("fast");
			n.empty().hide();
			f.hide();
			b.event.trigger("fancybox-cleanup");
			j.empty();
			d.onClosed(l, p, d);
			l = e = [];
			p = q = 0;
			d = e = {};
			h = false
		}
		if (!(h || f.is(":hidden"))) {
			h = true;
			if (d && false === d.onCleanup(l, p, d)) h = false;
			else {
				N();
				b(E.add(z).add(A)).hide();
				b(j.add(u)).unbind();
				b(window).unbind("resize.fb scroll.fb");
				b(document).unbind("keydown.fb");
				j.find("iframe").attr("src", M && /^https/i.test(window.location.href || "") ? "javascript:void(false)" : "about:blank");
				d.titlePosition !== "inside" && n.empty();
				f.stop();
				if (d.transitionOut == "elastic") {
					r = V();
					var c = f.position();
					i = {
						top: c.top,
						left: c.left,
						width: f.width(),
						height: f.height()
					};
					if (d.opacity) i.opacity = 1;
					n.empty().hide();
					B.prop = 1;
					b(B).animate({
						prop: 0
					}, {
						duration: d.speedOut,
						easing: d.easingOut,
						step: T,
						complete: a
					})
				} else f.fadeOut(d.transitionOut == "none" ? 0 : d.speedOut, a)
			}
		}
	};
	b.fancybox.resize = function() {
		u.is(":visible") && u.css("height", b(document).height());
		b.fancybox.center(true)
	};
	b.fancybox.center = function(a) {
		var c, g;
		if (!h) {
			g = a === true ? 1 : 0;
			c = U();
			!g && (f.width() > c[0] || f.height() > c[1]) || f.stop().animate({
				top: parseInt(Math.max(c[3] - 20, c[3] + (c[1] - j.height() - 40) * 0.5 - d.padding)),
				left: parseInt(Math.max(c[2] - 20, c[2] + (c[0] - j.width() - 40) * 0.5 -
					d.padding))
			}, typeof a == "number" ? a : 200)
		}
	};
	b.fancybox.init = function() {
		if (!b("#fancybox-wrap").length) {
			b("body").append(m = b('<div id="fancybox-tmp"></div>'), t = b('<div id="fancybox-loading"><div></div></div>'), u = b('<div id="fancybox-overlay"></div>'), f = b('<div id="fancybox-wrap"></div>'));
			D = b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f);
			D.append(j = b('<div id="fancybox-content"></div>'), E = b('<a id="fancybox-close"></a>'), n = b('<div id="fancybox-title"></div>'), z = b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'), A = b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));
			E.click(b.fancybox.close);
			t.click(b.fancybox.cancel);
			z.click(function(a) {
				a.preventDefault();
				b.fancybox.prev()
			});
			A.click(function(a) {
				a.preventDefault();
				b.fancybox.next()
			});
			b.fn.mousewheel && f.bind("mousewheel.fb", function(a, c) {
				if (h) a.preventDefault();
				else if (b(a.target).get(0).clientHeight == 0 || b(a.target).get(0).scrollHeight === b(a.target).get(0).clientHeight) {
					a.preventDefault();
					b.fancybox[c > 0 ? "prev" : "next"]()
				}
			});
			b.support.opacity || f.addClass("fancybox-ie");
			if (M) {
				t.addClass("fancybox-ie6");
				f.addClass("fancybox-ie6");
				b('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || "") ? "javascript:void(false)" : "about:blank") + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)
			}
		}
	};
	b.fn.fancybox.defaults = {
		padding: 10,
		margin: 40,
		opacity: false,
		modal: false,
		cyclic: false,
		scrolling: "auto",
		width: 560,
		height: 340,
		autoScale: true,
		autoDimensions: true,
		centerOnScroll: false,
		ajax: {},
		swf: {
			wmode: "transparent"
		},
		hideOnOverlayClick: true,
		hideOnContentClick: false,
		overlayShow: true,
		overlayOpacity: 0.7,
		overlayColor: "#777",
		titleShow: true,
		titlePosition: "float",
		titleFormat: null,
		titleFromAlt: false,
		transitionIn: "fade",
		transitionOut: "fade",
		speedIn: 300,
		speedOut: 300,
		changeSpeed: 300,
		changeFade: "fast",
		easingIn: "swing",
		easingOut: "swing",
		showCloseButton: true,
		showNavArrows: true,
		enableEscapeButton: true,
		enableKeyboardNav: true,
		onStart: function() {},
		onCancel: function() {},
		onComplete: function() {},
		onCleanup: function() {},
		onClosed: function() {},
		onError: function() {}
	};
	b(document).ready(function() {
		b.fancybox.init()
	})

})(jQuery);
var Froogaloop = function() {
	function e(a) {
		return new e.fn.init(a)
	}

	function g(a, c, b) {
		if (!b.contentWindow.postMessage) return !1;
		a = JSON.stringify({
			method: a,
			value: c
		});
		b.contentWindow.postMessage(a, h)
	}

	function l(a) {
		var c, b;
		try {
			c = JSON.parse(a.data), b = c.event || c.method
		} catch (e) {}
		"ready" != b || k || (k = !0);
		if (!/^https?:\/\/player.vimeo.com/.test(a.origin)) return !1;
		"*" === h && (h = a.origin);
		a = c.value;
		var m = c.data,
			f = "" === f ? null : c.player_id;
		c = f ? d[f][b] : d[b];
		b = [];
		if (!c) return !1;
		void 0 !== a && b.push(a);
		m && b.push(m);
		f && b.push(f);
		return 0 < b.length ? c.apply(null, b) : c.call()
	}

	function n(a, c, b) {
		b ? (d[b] || (d[b] = {}), d[b][a] = c) : d[a] = c
	}
	var d = {},
		k = !1,
		h = "*";
	e.fn = e.prototype = {
		element: null,
		init: function(a) {
			"string" === typeof a && (a = document.getElementById(a));
			this.element = a;
			return this
		},
		api: function(a, c) {
			if (!this.element || !a) return !1;
			var b = this.element,
				d = "" !== b.id ? b.id : null,
				e = c && c.constructor && c.call && c.apply ? null : c,
				f = c && c.constructor && c.call && c.apply ? c : null;
			f && n(a, f, d);
			g(a, e, b);
			return this
		},
		addEvent: function(a, c) {
			if (!this.element) return !1;
			var b = this.element,
				d = "" !== b.id ? b.id : null;
			n(a, c, d);
			"ready" != a ? g("addEventListener", a, b) : "ready" == a && k && c.call(null, d);
			return this
		},
		removeEvent: function(a) {
			if (!this.element) return !1;
			var c = this.element,
				b = "" !== c.id ? c.id : null;
			a: {
				if (b && d[b]) {
					if (!d[b][a]) {
						b = !1;
						break a
					}
					d[b][a] = null
				} else {
					if (!d[a]) {
						b = !1;
						break a
					}
					d[a] = null
				}
				b = !0
			}
			"ready" != a && b && g("removeEventListener", a, c)
		}
	};
	e.fn.init.prototype = e.fn;
	window.addEventListener ? window.addEventListener("message", l, !1) : window.attachEvent("onmessage", l);
	return window.Froogaloop = window.$f = e
}();

var gmapswidget = {
	 defaultZoom: 13,

	 loadGMaps: function(apiKey) {
			 if ($("div.gmap").length > 0) {
					 $.getScript("https://maps.google.com/maps/api/js?key=" + apiKey + "&sensor=true&callback=gmapswidget._showGMaps", function(data, textStatus, jqxhr) {
							 // loaded
					 });
			 }
	 },

	 _showGMaps: function() {
			 function initMap(x, y, i, z) {
					 var map, style = [];
					 var center = new google.maps.LatLng(x, y);
					 var settings = {
							 mapTypeId: google.maps.MapTypeId.ROADMAP,
							 zoom: z,
							 center: center,
							 styles: style,
							 scrollwheel: false
					 };

					 map = new google.maps.Map(document.getElementsByClassName('gmap')[i], settings);

					 function attachSecretMessage(marker, message) {
							 var infowindow = new google.maps.InfoWindow({
									 content: message
							 });
							 google.maps.event.addListener(marker, 'click', function() {
									 infowindow.open(map, marker);
							 });
					 }

					 $("div.gmarker[data-gmap-gmarker-id='" + i + "']").each(function(j, el) {
							 var xP = $(el).data("gmarker-coords").split(",")[0];
							 var yP = $(el).data("gmarker-coords").split(",")[1];

							 var marker = new google.maps.Marker({
									 position: new google.maps.LatLng(xP, yP),
									 title: $(el).data("gmarker-title"),
									 animation: google.maps.Animation.DROP,
									 map: map,
							 });

							 marker.setTitle(marker.title.toString());
							 attachSecretMessage(marker, $(el).html());

							 //Bei Marker Click wird zentriert, Andreas
							 google.maps.event.addListener(marker,'click',function() {
									 var center = map.getCenter();
									 map.setCenter(marker.getPosition());
							 });
					 });

					 google.maps.event.addDomListener(window, "resize", function() {
							 var center = map.getCenter();
							 google.maps.event.trigger(map, "resize");
							 map.setCenter(center);
					 });


			 }

			 function touchToEnable(element) {
					 element.append("<div class='tapToEnable'></div>");

					 $("div.tapToEnable").click(function() {
							 $(this).toggleClass("open");
					 });
			 }

			 $("div.gmap").each(function(i, el) {
					 $(el).find("> div.gmarker").attr("data-gmap-gmarker-id", i);
					 $(el).after($(this).find("> div.gmarker").hide());

					 var x = $(el).data("gmap-coords").split(",")[0];
					 var y = $(el).data("gmap-coords").split(",")[1];

					 zoomstufe = parseInt($(el).data("gmap-coords").split(",")[2]) || gmapswidget.defaultZoom;

					 if (zoomstufe < 1) {
							 zoomstufe = gmapswidget.defaultZoom;
					 }

					 initMap(x, y, i, zoomstufe);

					 touchToEnable($(el));
			 });
	 }
};



$(function() {
	function calcHeightGmap() {
		// $(".gmap").height($(".left-zone").outerHeight());
	};

	$(".gmaps").each(function(i, el) {
		calcHeightGmap();
		$(".gmap").attr("data-gmap-coords", $(".gmaps").first().attr("data-gmaps-coords") + ",6").append("<div class='gmarker' data-gmarker-coords='" + $(el).attr("data-gmaps-coords") + "' data-gmarker-title='" + $(el).find("span.region").text() + "'><strong>" + $(el).find("span.region").text() + "</strong> <br>" + $(el).find("span.street").text() + "<br>" + $(el).find("span.city").text()  + "<br>" + $(el).find("span.locationtel").text() + "<br>" + $(el).find("span.locationfax").text() + "<br>" + $(el).find("span.locationemail").text() + "</div>");
	});

	$(window).resize(function() {
		calcHeightGmap();
	});

    // https://console.developers.google.com/
    var apiKey = "AIzaSyA2oowv3UN-qzMwmlv9-GbM02J_35pDeP4";
    gmapswidget.loadGMaps(apiKey);

	$('#menu-rwd').click(function(){
		if ($(this).hasClass('active')){
			$('#zone-header ul.menu').addClass('menu__open');
		} else {
			$('#zone-header ul.menu').removeClass('menu__open');
		}
	});

	if($('#right-zone div').hasClass('gmap')){
			$('#right-zone').addClass('right-zone-gmap')
	}

	var navTimer;
	$('#zone-header ul.menu > li.hasChild').each(function(i, el){
		var $navMenu = $(this).parent('ul.menu');
		function closeAllNav(){
			$navMenu.find('li.show-subnav').removeClass('show-subnav');
			$navMenu.find('i.fa').removeClass('fa-chevron-up').addClass('fa-chevron-down');
		}
		$(el).prepend('<i class="fa fa-chevron-down" aria-hidden="true"></i>');

		$(el).find('> i.fa').on('click', function(){
			//if($('#menu-rwd').is(':visible')){
				clearTimeout(navTimer);
				if($(this).closest('li.show-subnav').length){
					closeAllNav();
				} else { // close other, open self
					closeAllNav();
					$(this).closest('li').addClass('show-subnav');
					$(this).removeClass('fa-chevron-down').addClass('fa-chevron-up');
				}
			//}
		});
		$navMenu.on('mouseleave', function(){
			//if(! $('#menu-rwd').is(':visible')){
				navTimer = setTimeout(function(){ closeAllNav(); },3000);
			//}
		});
		$(el).find('> a').on('click', function(){
			//if($('#menu-rwd').is(':visible')){
				$(this).prev('i.fa').click();
				return false;
			//}
		});
	});

	$(".jobslist .description").hide();
	$(".jobslist .title").css({"cursor": "pointer"}).click(function() {
		$(this).closest(".job").toggleClass("active").find(".description").slideToggle();
	});
	$(".jobslist .title").append("<div class='arrow'></div>");

	$(".accordionlist .description").hide();
	$(".accordionlist .title").css({"cursor": "pointer"}).click(function() {
		$(this).closest(".accordion").toggleClass("active").find(".description").slideToggle();
	});
	$(".accordionlist .title").append("<div class='arrow'></div>");
});

/*
 *  jQuery OwlCarousel v1.3.3
 *
 *  Copyright (c) 2013 Bartosz Wojciechowski
 *  http://www.owlgraphic.com/owlcarousel/
 *
 *  Licensed under MIT
 *
 */

/*JS Lint helpers: */
/*global dragMove: false, dragEnd: false, $, jQuery, alert, window, document */
/*jslint nomen: true, continue:true */

if (typeof Object.create !== "function") {
    Object.create = function (obj) {
        function F() {}
        F.prototype = obj;
        return new F();
    };
}
(function ($, window, document) {

    var Carousel = {
        init : function (options, el) {
            var base = this;

            base.$elem = $(el);
            base.options = $.extend({}, $.fn.owlCarousel.options, base.$elem.data(), options);

            base.userOptions = options;
            base.loadContent();
        },

        loadContent : function () {
            var base = this, url;

            function getData(data) {
                var i, content = "";
                if (typeof base.options.jsonSuccess === "function") {
                    base.options.jsonSuccess.apply(this, [data]);
                } else {
                    for (i in data.owl) {
                        if (data.owl.hasOwnProperty(i)) {
                            content += data.owl[i].item;
                        }
                    }
                    base.$elem.html(content);
                }
                base.logIn();
            }

            if (typeof base.options.beforeInit === "function") {
                base.options.beforeInit.apply(this, [base.$elem]);
            }

            if (typeof base.options.jsonPath === "string") {
                url = base.options.jsonPath;
                $.getJSON(url, getData);
            } else {
                base.logIn();
            }
        },

        logIn : function () {
            var base = this;

            base.$elem.data("owl-originalStyles", base.$elem.attr("style"));
            base.$elem.data("owl-originalClasses", base.$elem.attr("class"));

            base.$elem.css({opacity: 0});
            base.orignalItems = base.options.items;
            base.checkBrowser();
            base.wrapperWidth = 0;
            base.checkVisible = null;
            base.setVars();
        },

        setVars : function () {
            var base = this;
            if (base.$elem.children().length === 0) {return false; }
            base.baseClass();
            base.eventTypes();
            base.$userItems = base.$elem.children();
            base.itemsAmount = base.$userItems.length;
            base.wrapItems();
            base.$owlItems = base.$elem.find(".owl-item");
            base.$owlWrapper = base.$elem.find(".owl-wrapper");
            base.playDirection = "next";
            base.prevItem = 0;
            base.prevArr = [0];
            base.currentItem = 0;
            base.customEvents();
            base.onStartup();
        },

        onStartup : function () {
            var base = this;
            base.updateItems();
            base.calculateAll();
            base.buildControls();
            base.updateControls();
            base.response();
            base.moveEvents();
            base.stopOnHover();
            base.owlStatus();

            if (base.options.transitionStyle !== false) {
                base.transitionTypes(base.options.transitionStyle);
            }
            if (base.options.autoPlay === true) {
                base.options.autoPlay = 5000;
            }
            base.play();

            base.$elem.find(".owl-wrapper").css("display", "block");

            if (!base.$elem.is(":visible")) {
                base.watchVisibility();
            } else {
                base.$elem.css("opacity", 1);
            }
            base.onstartup = false;
            base.eachMoveUpdate();
            if (typeof base.options.afterInit === "function") {
                base.options.afterInit.apply(this, [base.$elem]);
            }
        },

        eachMoveUpdate : function () {
            var base = this;

            if (base.options.lazyLoad === true) {
                base.lazyLoad();
            }
            if (base.options.autoHeight === true) {
                base.autoHeight();
            }
            base.onVisibleItems();

            if (typeof base.options.afterAction === "function") {
                base.options.afterAction.apply(this, [base.$elem]);
            }
        },

        updateVars : function () {
            var base = this;
            if (typeof base.options.beforeUpdate === "function") {
                base.options.beforeUpdate.apply(this, [base.$elem]);
            }
            base.watchVisibility();
            base.updateItems();
            base.calculateAll();
            base.updatePosition();
            base.updateControls();
            base.eachMoveUpdate();
            if (typeof base.options.afterUpdate === "function") {
                base.options.afterUpdate.apply(this, [base.$elem]);
            }
        },

        reload : function () {
            var base = this;
            window.setTimeout(function () {
                base.updateVars();
            }, 0);
        },

        watchVisibility : function () {
            var base = this;

            if (base.$elem.is(":visible") === false) {
                base.$elem.css({opacity: 0});
                window.clearInterval(base.autoPlayInterval);
                window.clearInterval(base.checkVisible);
            } else {
                return false;
            }
            base.checkVisible = window.setInterval(function () {
                if (base.$elem.is(":visible")) {
                    base.reload();
                    base.$elem.animate({opacity: 1}, 200);
                    window.clearInterval(base.checkVisible);
                }
            }, 500);
        },

        wrapItems : function () {
            var base = this;
            base.$userItems.wrapAll("<div class=\"owl-wrapper\">").wrap("<div class=\"owl-item\"></div>");
            base.$elem.find(".owl-wrapper").wrap("<div class=\"owl-wrapper-outer\">");
            base.wrapperOuter = base.$elem.find(".owl-wrapper-outer");
            base.$elem.css("display", "block");
        },

        baseClass : function () {
            var base = this,
                hasBaseClass = base.$elem.hasClass(base.options.baseClass),
                hasThemeClass = base.$elem.hasClass(base.options.theme);

            if (!hasBaseClass) {
                base.$elem.addClass(base.options.baseClass);
            }

            if (!hasThemeClass) {
                base.$elem.addClass(base.options.theme);
            }
        },

        updateItems : function () {
            var base = this, width, i;

            if (base.options.responsive === false) {
                return false;
            }
            if (base.options.singleItem === true) {
                base.options.items = base.orignalItems = 1;
                base.options.itemsCustom = false;
                base.options.itemsDesktop = false;
                base.options.itemsDesktopSmall = false;
                base.options.itemsTablet = false;
                base.options.itemsTabletSmall = false;
                base.options.itemsMobile = false;
                return false;
            }

            width = $(base.options.responsiveBaseWidth).width();

            if (width > (base.options.itemsDesktop[0] || base.orignalItems)) {
                base.options.items = base.orignalItems;
            }
            if (base.options.itemsCustom !== false) {
                //Reorder array by screen size
                base.options.itemsCustom.sort(function (a, b) {return a[0] - b[0]; });

                for (i = 0; i < base.options.itemsCustom.length; i += 1) {
                    if (base.options.itemsCustom[i][0] <= width) {
                        base.options.items = base.options.itemsCustom[i][1];
                    }
                }

            } else {

                if (width <= base.options.itemsDesktop[0] && base.options.itemsDesktop !== false) {
                    base.options.items = base.options.itemsDesktop[1];
                }

                if (width <= base.options.itemsDesktopSmall[0] && base.options.itemsDesktopSmall !== false) {
                    base.options.items = base.options.itemsDesktopSmall[1];
                }

                if (width <= base.options.itemsTablet[0] && base.options.itemsTablet !== false) {
                    base.options.items = base.options.itemsTablet[1];
                }

                if (width <= base.options.itemsTabletSmall[0] && base.options.itemsTabletSmall !== false) {
                    base.options.items = base.options.itemsTabletSmall[1];
                }

                if (width <= base.options.itemsMobile[0] && base.options.itemsMobile !== false) {
                    base.options.items = base.options.itemsMobile[1];
                }
            }

            //if number of items is less than declared
            if (base.options.items > base.itemsAmount && base.options.itemsScaleUp === true) {
                base.options.items = base.itemsAmount;
            }
        },

        response : function () {
            var base = this,
                smallDelay,
                lastWindowWidth;

            if (base.options.responsive !== true) {
                return false;
            }
            lastWindowWidth = $(window).width();

            base.resizer = function () {
                if ($(window).width() !== lastWindowWidth) {
                    if (base.options.autoPlay !== false) {
                        window.clearInterval(base.autoPlayInterval);
                    }
                    window.clearTimeout(smallDelay);
                    smallDelay = window.setTimeout(function () {
                        lastWindowWidth = $(window).width();
                        base.updateVars();
                    }, base.options.responsiveRefreshRate);
                }
            };
            $(window).resize(base.resizer);
        },

        updatePosition : function () {
            var base = this;
            base.jumpTo(base.currentItem);
            if (base.options.autoPlay !== false) {
                base.checkAp();
            }
        },

        appendItemsSizes : function () {
            var base = this,
                roundPages = 0,
                lastItem = base.itemsAmount - base.options.items;

            base.$owlItems.each(function (index) {
                var $this = $(this);
                $this
                    .css({"width": base.itemWidth})
                    .data("owl-item", Number(index));

                if (index % base.options.items === 0 || index === lastItem) {
                    if (!(index > lastItem)) {
                        roundPages += 1;
                    }
                }
                $this.data("owl-roundPages", roundPages);
            });
        },

        appendWrapperSizes : function () {
            var base = this,
                width = base.$owlItems.length * base.itemWidth;

            base.$owlWrapper.css({
                "width": width * 2,
                "left": 0
            });
            base.appendItemsSizes();
        },

        calculateAll : function () {
            var base = this;
            base.calculateWidth();
            base.appendWrapperSizes();
            base.loops();
            base.max();
        },

        calculateWidth : function () {
            var base = this;
            base.itemWidth = Math.round(base.$elem.width() / base.options.items);
        },

        max : function () {
            var base = this,
                maximum = ((base.itemsAmount * base.itemWidth) - base.options.items * base.itemWidth) * -1;
            if (base.options.items > base.itemsAmount) {
                base.maximumItem = 0;
                maximum = 0;
                base.maximumPixels = 0;
            } else {
                base.maximumItem = base.itemsAmount - base.options.items;
                base.maximumPixels = maximum;
            }
            return maximum;
        },

        min : function () {
            return 0;
        },

        loops : function () {
            var base = this,
                prev = 0,
                elWidth = 0,
                i,
                item,
                roundPageNum;

            base.positionsInArray = [0];
            base.pagesInArray = [];

            for (i = 0; i < base.itemsAmount; i += 1) {
                elWidth += base.itemWidth;
                base.positionsInArray.push(-elWidth);

                if (base.options.scrollPerPage === true) {
                    item = $(base.$owlItems[i]);
                    roundPageNum = item.data("owl-roundPages");
                    if (roundPageNum !== prev) {
                        base.pagesInArray[prev] = base.positionsInArray[i];
                        prev = roundPageNum;
                    }
                }
            }
        },

        buildControls : function () {
            var base = this;
            if (base.options.navigation === true || base.options.pagination === true) {
                base.owlControls = $("<div class=\"owl-controls\"/>").toggleClass("clickable", !base.browser.isTouch).appendTo(base.$elem);
            }
            if (base.options.pagination === true) {
                base.buildPagination();
            }
            if (base.options.navigation === true) {
                base.buildButtons();
            }
        },

        buildButtons : function () {
            var base = this,
                buttonsWrapper = $("<div class=\"owl-buttons\"/>");
            base.owlControls.append(buttonsWrapper);

            base.buttonPrev = $("<div/>", {
                "class" : "owl-prev",
                "html" : base.options.navigationText[0] || ""
            });

            base.buttonNext = $("<div/>", {
                "class" : "owl-next",
                "html" : base.options.navigationText[1] || ""
            });

            buttonsWrapper
                .append(base.buttonPrev)
                .append(base.buttonNext);

            buttonsWrapper.on("touchstart.owlControls mousedown.owlControls", "div[class^=\"owl\"]", function (event) {
                event.preventDefault();
            });

            buttonsWrapper.on("touchend.owlControls mouseup.owlControls", "div[class^=\"owl\"]", function (event) {
                event.preventDefault();
                if ($(this).hasClass("owl-next")) {
                    base.next();
                } else {
                    base.prev();
                }
            });
        },

        buildPagination : function () {
            var base = this;

            base.paginationWrapper = $("<div class=\"owl-pagination\"/>");
            base.owlControls.append(base.paginationWrapper);

            base.paginationWrapper.on("touchend.owlControls mouseup.owlControls", ".owl-page", function (event) {
                event.preventDefault();
                if (Number($(this).data("owl-page")) !== base.currentItem) {
                    base.goTo(Number($(this).data("owl-page")), true);
                }
            });
        },

        updatePagination : function () {
            var base = this,
                counter,
                lastPage,
                lastItem,
                i,
                paginationButton,
                paginationButtonInner;

            if (base.options.pagination === false) {
                return false;
            }

            base.paginationWrapper.html("");

            counter = 0;
            lastPage = base.itemsAmount - base.itemsAmount % base.options.items;

            for (i = 0; i < base.itemsAmount; i += 1) {
                if (i % base.options.items === 0) {
                    counter += 1;
                    if (lastPage === i) {
                        lastItem = base.itemsAmount - base.options.items;
                    }
                    paginationButton = $("<div/>", {
                        "class" : "owl-page"
                    });
                    paginationButtonInner = $("<span></span>", {
                        "text": base.options.paginationNumbers === true ? counter : "",
                        "class": base.options.paginationNumbers === true ? "owl-numbers" : ""
                    });
                    paginationButton.append(paginationButtonInner);

                    paginationButton.data("owl-page", lastPage === i ? lastItem : i);
                    paginationButton.data("owl-roundPages", counter);

                    base.paginationWrapper.append(paginationButton);
                }
            }
            base.checkPagination();
        },
        checkPagination : function () {
            var base = this;
            if (base.options.pagination === false) {
                return false;
            }
            base.paginationWrapper.find(".owl-page").each(function () {
                if ($(this).data("owl-roundPages") === $(base.$owlItems[base.currentItem]).data("owl-roundPages")) {
                    base.paginationWrapper
                        .find(".owl-page")
                        .removeClass("active");
                    $(this).addClass("active");
                }
            });
        },

        checkNavigation : function () {
            var base = this;

            if (base.options.navigation === false) {
                return false;
            }
            if (base.options.rewindNav === false) {
                if (base.currentItem === 0 && base.maximumItem === 0) {
                    base.buttonPrev.addClass("disabled");
                    base.buttonNext.addClass("disabled");
                } else if (base.currentItem === 0 && base.maximumItem !== 0) {
                    base.buttonPrev.addClass("disabled");
                    base.buttonNext.removeClass("disabled");
                } else if (base.currentItem === base.maximumItem) {
                    base.buttonPrev.removeClass("disabled");
                    base.buttonNext.addClass("disabled");
                } else if (base.currentItem !== 0 && base.currentItem !== base.maximumItem) {
                    base.buttonPrev.removeClass("disabled");
                    base.buttonNext.removeClass("disabled");
                }
            }
        },

        updateControls : function () {
            var base = this;
            base.updatePagination();
            base.checkNavigation();
            if (base.owlControls) {
                if (base.options.items >= base.itemsAmount) {
                    base.owlControls.hide();
                } else {
                    base.owlControls.show();
                }
            }
        },

        destroyControls : function () {
            var base = this;
            if (base.owlControls) {
                base.owlControls.remove();
            }
        },

        next : function (speed) {
            var base = this;

            if (base.isTransition) {
                return false;
            }

            base.currentItem += base.options.scrollPerPage === true ? base.options.items : 1;
            if (base.currentItem > base.maximumItem + (base.options.scrollPerPage === true ? (base.options.items - 1) : 0)) {
                if (base.options.rewindNav === true) {
                    base.currentItem = 0;
                    speed = "rewind";
                } else {
                    base.currentItem = base.maximumItem;
                    return false;
                }
            }
            base.goTo(base.currentItem, speed);
        },

        prev : function (speed) {
            var base = this;

            if (base.isTransition) {
                return false;
            }

            if (base.options.scrollPerPage === true && base.currentItem > 0 && base.currentItem < base.options.items) {
                base.currentItem = 0;
            } else {
                base.currentItem -= base.options.scrollPerPage === true ? base.options.items : 1;
            }
            if (base.currentItem < 0) {
                if (base.options.rewindNav === true) {
                    base.currentItem = base.maximumItem;
                    speed = "rewind";
                } else {
                    base.currentItem = 0;
                    return false;
                }
            }
            base.goTo(base.currentItem, speed);
        },

        goTo : function (position, speed, drag) {
            var base = this,
                goToPixel;

            if (base.isTransition) {
                return false;
            }
            if (typeof base.options.beforeMove === "function") {
                base.options.beforeMove.apply(this, [base.$elem]);
            }
            if (position >= base.maximumItem) {
                position = base.maximumItem;
            } else if (position <= 0) {
                position = 0;
            }

            base.currentItem = base.owl.currentItem = position;
            if (base.options.transitionStyle !== false && drag !== "drag" && base.options.items === 1 && base.browser.support3d === true) {
                base.swapSpeed(0);
                if (base.browser.support3d === true) {
                    base.transition3d(base.positionsInArray[position]);
                } else {
                    base.css2slide(base.positionsInArray[position], 1);
                }
                base.afterGo();
                base.singleItemTransition();
                return false;
            }
            goToPixel = base.positionsInArray[position];

            if (base.browser.support3d === true) {
                base.isCss3Finish = false;

                if (speed === true) {
                    base.swapSpeed("paginationSpeed");
                    window.setTimeout(function () {
                        base.isCss3Finish = true;
                    }, base.options.paginationSpeed);

                } else if (speed === "rewind") {
                    base.swapSpeed(base.options.rewindSpeed);
                    window.setTimeout(function () {
                        base.isCss3Finish = true;
                    }, base.options.rewindSpeed);

                } else {
                    base.swapSpeed("slideSpeed");
                    window.setTimeout(function () {
                        base.isCss3Finish = true;
                    }, base.options.slideSpeed);
                }
                base.transition3d(goToPixel);
            } else {
                if (speed === true) {
                    base.css2slide(goToPixel, base.options.paginationSpeed);
                } else if (speed === "rewind") {
                    base.css2slide(goToPixel, base.options.rewindSpeed);
                } else {
                    base.css2slide(goToPixel, base.options.slideSpeed);
                }
            }
            base.afterGo();
        },

        jumpTo : function (position) {
            var base = this;
            if (typeof base.options.beforeMove === "function") {
                base.options.beforeMove.apply(this, [base.$elem]);
            }
            if (position >= base.maximumItem || position === -1) {
                position = base.maximumItem;
            } else if (position <= 0) {
                position = 0;
            }
            base.swapSpeed(0);
            if (base.browser.support3d === true) {
                base.transition3d(base.positionsInArray[position]);
            } else {
                base.css2slide(base.positionsInArray[position], 1);
            }
            base.currentItem = base.owl.currentItem = position;
            base.afterGo();
        },

        afterGo : function () {
            var base = this;

            base.prevArr.push(base.currentItem);
            base.prevItem = base.owl.prevItem = base.prevArr[base.prevArr.length - 2];
            base.prevArr.shift(0);

            if (base.prevItem !== base.currentItem) {
                base.checkPagination();
                base.checkNavigation();
                base.eachMoveUpdate();

                if (base.options.autoPlay !== false) {
                    base.checkAp();
                }
            }
            if (typeof base.options.afterMove === "function" && base.prevItem !== base.currentItem) {
                base.options.afterMove.apply(this, [base.$elem]);
            }
        },

        stop : function () {
            var base = this;
            base.apStatus = "stop";
            window.clearInterval(base.autoPlayInterval);
        },

        checkAp : function () {
            var base = this;
            if (base.apStatus !== "stop") {
                base.play();
            }
        },

        play : function () {
            var base = this;
            base.apStatus = "play";
            if (base.options.autoPlay === false) {
                return false;
            }
            window.clearInterval(base.autoPlayInterval);
            base.autoPlayInterval = window.setInterval(function () {
                base.next(true);
            }, base.options.autoPlay);
        },

        swapSpeed : function (action) {
            var base = this;
            if (action === "slideSpeed") {
                base.$owlWrapper.css(base.addCssSpeed(base.options.slideSpeed));
            } else if (action === "paginationSpeed") {
                base.$owlWrapper.css(base.addCssSpeed(base.options.paginationSpeed));
            } else if (typeof action !== "string") {
                base.$owlWrapper.css(base.addCssSpeed(action));
            }
        },

        addCssSpeed : function (speed) {
            return {
                "-webkit-transition": "all " + speed + "ms ease",
                "-moz-transition": "all " + speed + "ms ease",
                "-o-transition": "all " + speed + "ms ease",
                "transition": "all " + speed + "ms ease"
            };
        },

        removeTransition : function () {
            return {
                "-webkit-transition": "",
                "-moz-transition": "",
                "-o-transition": "",
                "transition": ""
            };
        },

        doTranslate : function (pixels) {
            return {
                "-webkit-transform": "translate3d(" + pixels + "px, 0px, 0px)",
                "-moz-transform": "translate3d(" + pixels + "px, 0px, 0px)",
                "-o-transform": "translate3d(" + pixels + "px, 0px, 0px)",
                "-ms-transform": "translate3d(" + pixels + "px, 0px, 0px)",
                "transform": "translate3d(" + pixels + "px, 0px,0px)"
            };
        },

        transition3d : function (value) {
            var base = this;
            base.$owlWrapper.css(base.doTranslate(value));
        },

        css2move : function (value) {
            var base = this;
            base.$owlWrapper.css({"left" : value});
        },

        css2slide : function (value, speed) {
            var base = this;

            base.isCssFinish = false;
            base.$owlWrapper.stop(true, true).animate({
                "left" : value
            }, {
                duration : speed || base.options.slideSpeed,
                complete : function () {
                    base.isCssFinish = true;
                }
            });
        },

        checkBrowser : function () {
            var base = this,
                translate3D = "translate3d(0px, 0px, 0px)",
                tempElem = document.createElement("div"),
                regex,
                asSupport,
                support3d,
                isTouch;

            tempElem.style.cssText = "  -moz-transform:" + translate3D +
                                  "; -ms-transform:"     + translate3D +
                                  "; -o-transform:"      + translate3D +
                                  "; -webkit-transform:" + translate3D +
                                  "; transform:"         + translate3D;
            regex = /translate3d\(0px, 0px, 0px\)/g;
            asSupport = tempElem.style.cssText.match(regex);
            support3d = (asSupport !== null && asSupport.length === 1);

            isTouch = "ontouchstart" in window || window.navigator.msMaxTouchPoints;

            base.browser = {
                "support3d" : support3d,
                "isTouch" : isTouch
            };
        },

        moveEvents : function () {
            var base = this;
            if (base.options.mouseDrag !== false || base.options.touchDrag !== false) {
                base.gestures();
                base.disabledEvents();
            }
        },

        eventTypes : function () {
            var base = this,
                types = ["s", "e", "x"];

            base.ev_types = {};

            if (base.options.mouseDrag === true && base.options.touchDrag === true) {
                types = [
                    "touchstart.owl mousedown.owl",
                    "touchmove.owl mousemove.owl",
                    "touchend.owl touchcancel.owl mouseup.owl"
                ];
            } else if (base.options.mouseDrag === false && base.options.touchDrag === true) {
                types = [
                    "touchstart.owl",
                    "touchmove.owl",
                    "touchend.owl touchcancel.owl"
                ];
            } else if (base.options.mouseDrag === true && base.options.touchDrag === false) {
                types = [
                    "mousedown.owl",
                    "mousemove.owl",
                    "mouseup.owl"
                ];
            }

            base.ev_types.start = types[0];
            base.ev_types.move = types[1];
            base.ev_types.end = types[2];
        },

        disabledEvents :  function () {
            var base = this;
            base.$elem.on("dragstart.owl", function (event) { event.preventDefault(); });
            base.$elem.on("mousedown.disableTextSelect", function (e) {
                return $(e.target).is('input, textarea, select, option');
            });
        },

        gestures : function () {
            /*jslint unparam: true*/
            var base = this,
                locals = {
                    offsetX : 0,
                    offsetY : 0,
                    baseElWidth : 0,
                    relativePos : 0,
                    position: null,
                    minSwipe : null,
                    maxSwipe: null,
                    sliding : null,
                    dargging: null,
                    targetElement : null
                };

            base.isCssFinish = true;

            function getTouches(event) {
                if (event.touches !== undefined) {
                    return {
                        x : event.touches[0].pageX,
                        y : event.touches[0].pageY
                    };
                }

                if (event.touches === undefined) {
                    if (event.pageX !== undefined) {
                        return {
                            x : event.pageX,
                            y : event.pageY
                        };
                    }
                    if (event.pageX === undefined) {
                        return {
                            x : event.clientX,
                            y : event.clientY
                        };
                    }
                }
            }

            function swapEvents(type) {
                if (type === "on") {
                    $(document).on(base.ev_types.move, dragMove);
                    $(document).on(base.ev_types.end, dragEnd);
                } else if (type === "off") {
                    $(document).off(base.ev_types.move);
                    $(document).off(base.ev_types.end);
                }
            }

            function dragStart(event) {
                var ev = event.originalEvent || event || window.event,
                    position;

                if (ev.which === 3) {
                    return false;
                }
                if (base.itemsAmount <= base.options.items) {
                    return;
                }
                if (base.isCssFinish === false && !base.options.dragBeforeAnimFinish) {
                    return false;
                }
                if (base.isCss3Finish === false && !base.options.dragBeforeAnimFinish) {
                    return false;
                }

                if (base.options.autoPlay !== false) {
                    window.clearInterval(base.autoPlayInterval);
                }

                if (base.browser.isTouch !== true && !base.$owlWrapper.hasClass("grabbing")) {
                    base.$owlWrapper.addClass("grabbing");
                }

                base.newPosX = 0;
                base.newRelativeX = 0;

                $(this).css(base.removeTransition());

                position = $(this).position();
                locals.relativePos = position.left;

                locals.offsetX = getTouches(ev).x - position.left;
                locals.offsetY = getTouches(ev).y - position.top;

                swapEvents("on");

                locals.sliding = false;
                locals.targetElement = ev.target || ev.srcElement;
            }

            function dragMove(event) {
                var ev = event.originalEvent || event || window.event,
                    minSwipe,
                    maxSwipe;

                base.newPosX = getTouches(ev).x - locals.offsetX;
                base.newPosY = getTouches(ev).y - locals.offsetY;
                base.newRelativeX = base.newPosX - locals.relativePos;

                if (typeof base.options.startDragging === "function" && locals.dragging !== true && base.newRelativeX !== 0) {
                    locals.dragging = true;
                    base.options.startDragging.apply(base, [base.$elem]);
                }

                if ((base.newRelativeX > 8 || base.newRelativeX < -8) && (base.browser.isTouch === true)) {
                    if (ev.preventDefault !== undefined) {
                        ev.preventDefault();
                    } else {
                        ev.returnValue = false;
                    }
                    locals.sliding = true;
                }

                if ((base.newPosY > 10 || base.newPosY < -10) && locals.sliding === false) {
                    $(document).off("touchmove.owl");
                }

                minSwipe = function () {
                    return base.newRelativeX / 5;
                };

                maxSwipe = function () {
                    return base.maximumPixels + base.newRelativeX / 5;
                };

                base.newPosX = Math.max(Math.min(base.newPosX, minSwipe()), maxSwipe());
                if (base.browser.support3d === true) {
                    base.transition3d(base.newPosX);
                } else {
                    base.css2move(base.newPosX);
                }
            }

            function dragEnd(event) {
                var ev = event.originalEvent || event || window.event,
                    newPosition,
                    handlers,
                    owlStopEvent;

                ev.target = ev.target || ev.srcElement;

                locals.dragging = false;

                if (base.browser.isTouch !== true) {
                    base.$owlWrapper.removeClass("grabbing");
                }

                if (base.newRelativeX < 0) {
                    base.dragDirection = base.owl.dragDirection = "left";
                } else {
                    base.dragDirection = base.owl.dragDirection = "right";
                }

                if (base.newRelativeX !== 0) {
                    newPosition = base.getNewPosition();
                    base.goTo(newPosition, false, "drag");
                    if (locals.targetElement === ev.target && base.browser.isTouch !== true) {
                        $(ev.target).on("click.disable", function (ev) {
                            ev.stopImmediatePropagation();
                            ev.stopPropagation();
                            ev.preventDefault();
                            $(ev.target).off("click.disable");
                        });
                        handlers = $._data(ev.target, "events").click;
                        owlStopEvent = handlers.pop();
                        handlers.splice(0, 0, owlStopEvent);
                    }
                }
                swapEvents("off");
            }
            base.$elem.on(base.ev_types.start, ".owl-wrapper", dragStart);
        },

        getNewPosition : function () {
            var base = this,
                newPosition = base.closestItem();

            if (newPosition > base.maximumItem) {
                base.currentItem = base.maximumItem;
                newPosition  = base.maximumItem;
            } else if (base.newPosX >= 0) {
                newPosition = 0;
                base.currentItem = 0;
            }
            return newPosition;
        },
        closestItem : function () {
            var base = this,
                array = base.options.scrollPerPage === true ? base.pagesInArray : base.positionsInArray,
                goal = base.newPosX,
                closest = null;

            $.each(array, function (i, v) {
                if (goal - (base.itemWidth / 20) > array[i + 1] && goal - (base.itemWidth / 20) < v && base.moveDirection() === "left") {
                    closest = v;
                    if (base.options.scrollPerPage === true) {
                        base.currentItem = $.inArray(closest, base.positionsInArray);
                    } else {
                        base.currentItem = i;
                    }
                } else if (goal + (base.itemWidth / 20) < v && goal + (base.itemWidth / 20) > (array[i + 1] || array[i] - base.itemWidth) && base.moveDirection() === "right") {
                    if (base.options.scrollPerPage === true) {
                        closest = array[i + 1] || array[array.length - 1];
                        base.currentItem = $.inArray(closest, base.positionsInArray);
                    } else {
                        closest = array[i + 1];
                        base.currentItem = i + 1;
                    }
                }
            });
            return base.currentItem;
        },

        moveDirection : function () {
            var base = this,
                direction;
            if (base.newRelativeX < 0) {
                direction = "right";
                base.playDirection = "next";
            } else {
                direction = "left";
                base.playDirection = "prev";
            }
            return direction;
        },

        customEvents : function () {
            /*jslint unparam: true*/
            var base = this;
            base.$elem.on("owl.next", function () {
                base.next();
            });
            base.$elem.on("owl.prev", function () {
                base.prev();
            });
            base.$elem.on("owl.play", function (event, speed) {
                base.options.autoPlay = speed;
                base.play();
                base.hoverStatus = "play";
            });
            base.$elem.on("owl.stop", function () {
                base.stop();
                base.hoverStatus = "stop";
            });
            base.$elem.on("owl.goTo", function (event, item) {
                base.goTo(item);
            });
            base.$elem.on("owl.jumpTo", function (event, item) {
                base.jumpTo(item);
            });
        },

        stopOnHover : function () {
            var base = this;
            if (base.options.stopOnHover === true && base.browser.isTouch !== true && base.options.autoPlay !== false) {
                base.$elem.on("mouseover", function () {
                    base.stop();
                });
                base.$elem.on("mouseout", function () {
                    if (base.hoverStatus !== "stop") {
                        base.play();
                    }
                });
            }
        },

        lazyLoad : function () {
            var base = this,
                i,
                $item,
                itemNumber,
                $lazyImg,
                follow;

            if (base.options.lazyLoad === false) {
                return false;
            }
            for (i = 0; i < base.itemsAmount; i += 1) {
                $item = $(base.$owlItems[i]);

                if ($item.data("owl-loaded") === "loaded") {
                    continue;
                }

                itemNumber = $item.data("owl-item");
                $lazyImg = $item.find(".lazyOwl");

                if (typeof $lazyImg.data("src") !== "string") {
                    $item.data("owl-loaded", "loaded");
                    continue;
                }
                if ($item.data("owl-loaded") === undefined) {
                    $lazyImg.hide();
                    $item.addClass("loading").data("owl-loaded", "checked");
                }
                if (base.options.lazyFollow === true) {
                    follow = itemNumber >= base.currentItem;
                } else {
                    follow = true;
                }
                if (follow && itemNumber < base.currentItem + base.options.items && $lazyImg.length) {
                    base.lazyPreload($item, $lazyImg);
                }
            }
        },

        lazyPreload : function ($item, $lazyImg) {
            var base = this,
                iterations = 0,
                isBackgroundImg;

            if ($lazyImg.prop("tagName") === "DIV") {
                $lazyImg.css("background-image", "url(" + $lazyImg.data("src") + ")");
                isBackgroundImg = true;
            } else {
                $lazyImg[0].src = $lazyImg.data("src");
            }

            function showImage() {
                $item.data("owl-loaded", "loaded").removeClass("loading");
                $lazyImg.removeAttr("data-src");
                if (base.options.lazyEffect === "fade") {
                    $lazyImg.fadeIn(400);
                } else {
                    $lazyImg.show();
                }
                if (typeof base.options.afterLazyLoad === "function") {
                    base.options.afterLazyLoad.apply(this, [base.$elem]);
                }
            }

            function checkLazyImage() {
                iterations += 1;
                if (base.completeImg($lazyImg.get(0)) || isBackgroundImg === true) {
                    showImage();
                } else if (iterations <= 100) {//if image loads in less than 10 seconds 
                    window.setTimeout(checkLazyImage, 100);
                } else {
                    showImage();
                }
            }

            checkLazyImage();
        },

        autoHeight : function () {
            var base = this,
                $currentimg = $(base.$owlItems[base.currentItem]).find("img"),
                iterations;

            function addHeight() {
                var $currentItem = $(base.$owlItems[base.currentItem]).height();
                base.wrapperOuter.css("height", $currentItem + "px");
                if (!base.wrapperOuter.hasClass("autoHeight")) {
                    window.setTimeout(function () {
                        base.wrapperOuter.addClass("autoHeight");
                    }, 0);
                }
            }

            function checkImage() {
                iterations += 1;
                if (base.completeImg($currentimg.get(0))) {
                    addHeight();
                } else if (iterations <= 100) { //if image loads in less than 10 seconds 
                    window.setTimeout(checkImage, 100);
                } else {
                    base.wrapperOuter.css("height", ""); //Else remove height attribute
                }
            }

            if ($currentimg.get(0) !== undefined) {
                iterations = 0;
                checkImage();
            } else {
                addHeight();
            }
        },

        completeImg : function (img) {
            var naturalWidthType;

            if (!img.complete) {
                return false;
            }
            naturalWidthType = typeof img.naturalWidth;
            if (naturalWidthType !== "undefined" && img.naturalWidth === 0) {
                return false;
            }
            return true;
        },

        onVisibleItems : function () {
            var base = this,
                i;

            if (base.options.addClassActive === true) {
                base.$owlItems.removeClass("active");
            }
            base.visibleItems = [];
            for (i = base.currentItem; i < base.currentItem + base.options.items; i += 1) {
                base.visibleItems.push(i);

                if (base.options.addClassActive === true) {
                    $(base.$owlItems[i]).addClass("active");
                }
            }
            base.owl.visibleItems = base.visibleItems;
        },

        transitionTypes : function (className) {
            var base = this;
            //Currently available: "fade", "backSlide", "goDown", "fadeUp"
            base.outClass = "owl-" + className + "-out";
            base.inClass = "owl-" + className + "-in";
        },

        singleItemTransition : function () {
            var base = this,
                outClass = base.outClass,
                inClass = base.inClass,
                $currentItem = base.$owlItems.eq(base.currentItem),
                $prevItem = base.$owlItems.eq(base.prevItem),
                prevPos = Math.abs(base.positionsInArray[base.currentItem]) + base.positionsInArray[base.prevItem],
                origin = Math.abs(base.positionsInArray[base.currentItem]) + base.itemWidth / 2,
                animEnd = 'webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend';

            base.isTransition = true;

            base.$owlWrapper
                .addClass('owl-origin')
                .css({
                    "-webkit-transform-origin" : origin + "px",
                    "-moz-perspective-origin" : origin + "px",
                    "perspective-origin" : origin + "px"
                });
            function transStyles(prevPos) {
                return {
                    "position" : "relative",
                    "left" : prevPos + "px"
                };
            }

            $prevItem
                .css(transStyles(prevPos, 10))
                .addClass(outClass)
                .on(animEnd, function () {
                    base.endPrev = true;
                    $prevItem.off(animEnd);
                    base.clearTransStyle($prevItem, outClass);
                });

            $currentItem
                .addClass(inClass)
                .on(animEnd, function () {
                    base.endCurrent = true;
                    $currentItem.off(animEnd);
                    base.clearTransStyle($currentItem, inClass);
                });
        },

        clearTransStyle : function (item, classToRemove) {
            var base = this;
            item.css({
                "position" : "",
                "left" : ""
            }).removeClass(classToRemove);

            if (base.endPrev && base.endCurrent) {
                base.$owlWrapper.removeClass('owl-origin');
                base.endPrev = false;
                base.endCurrent = false;
                base.isTransition = false;
            }
        },

        owlStatus : function () {
            var base = this;
            base.owl = {
                "userOptions"   : base.userOptions,
                "baseElement"   : base.$elem,
                "userItems"     : base.$userItems,
                "owlItems"      : base.$owlItems,
                "currentItem"   : base.currentItem,
                "prevItem"      : base.prevItem,
                "visibleItems"  : base.visibleItems,
                "isTouch"       : base.browser.isTouch,
                "browser"       : base.browser,
                "dragDirection" : base.dragDirection
            };
        },

        clearEvents : function () {
            var base = this;
            base.$elem.off(".owl owl mousedown.disableTextSelect");
            $(document).off(".owl owl");
            $(window).off("resize", base.resizer);
        },

        unWrap : function () {
            var base = this;
            if (base.$elem.children().length !== 0) {
                base.$owlWrapper.unwrap();
                base.$userItems.unwrap().unwrap();
                if (base.owlControls) {
                    base.owlControls.remove();
                }
            }
            base.clearEvents();
            base.$elem
                .attr("style", base.$elem.data("owl-originalStyles") || "")
                .attr("class", base.$elem.data("owl-originalClasses"));
        },

        destroy : function () {
            var base = this;
            base.stop();
            window.clearInterval(base.checkVisible);
            base.unWrap();
            base.$elem.removeData();
        },

        reinit : function (newOptions) {
            var base = this,
                options = $.extend({}, base.userOptions, newOptions);
            base.unWrap();
            base.init(options, base.$elem);
        },

        addItem : function (htmlString, targetPosition) {
            var base = this,
                position;

            if (!htmlString) {return false; }

            if (base.$elem.children().length === 0) {
                base.$elem.append(htmlString);
                base.setVars();
                return false;
            }
            base.unWrap();
            if (targetPosition === undefined || targetPosition === -1) {
                position = -1;
            } else {
                position = targetPosition;
            }
            if (position >= base.$userItems.length || position === -1) {
                base.$userItems.eq(-1).after(htmlString);
            } else {
                base.$userItems.eq(position).before(htmlString);
            }

            base.setVars();
        },

        removeItem : function (targetPosition) {
            var base = this,
                position;

            if (base.$elem.children().length === 0) {
                return false;
            }
            if (targetPosition === undefined || targetPosition === -1) {
                position = -1;
            } else {
                position = targetPosition;
            }

            base.unWrap();
            base.$userItems.eq(position).remove();
            base.setVars();
        }

    };

    $.fn.owlCarousel = function (options) {
        return this.each(function () {
            if ($(this).data("owl-init") === true) {
                return false;
            }
            $(this).data("owl-init", true);
            var carousel = Object.create(Carousel);
            carousel.init(options, this);
            $.data(this, "owlCarousel", carousel);
        });
    };

    $.fn.owlCarousel.options = {

        items : 5,
        itemsCustom : false,
        itemsDesktop : [1199, 4],
        itemsDesktopSmall : [979, 3],
        itemsTablet : [768, 2],
        itemsTabletSmall : false,
        itemsMobile : [479, 1],
        singleItem : false,
        itemsScaleUp : false,

        slideSpeed : 200,
        paginationSpeed : 800,
        rewindSpeed : 1000,

        autoPlay : false,
        stopOnHover : false,

        navigation : false,
        navigationText : ["prev", "next"],
        rewindNav : true,
        scrollPerPage : false,

        pagination : true,
        paginationNumbers : false,

        responsive : true,
        responsiveRefreshRate : 200,
        responsiveBaseWidth : window,

        baseClass : "owl-carousel",
        theme : "owl-theme",

        lazyLoad : false,
        lazyFollow : true,
        lazyEffect : "fade",

        autoHeight : false,

        jsonPath : false,
        jsonSuccess : false,

        dragBeforeAnimFinish : true,
        mouseDrag : true,
        touchDrag : true,

        addClassActive : false,
        transitionStyle : false,

        beforeUpdate : false,
        afterUpdate : false,
        beforeInit : false,
        afterInit : false,
        beforeMove : false,
        afterMove : false,
        afterAction : false,
        startDragging : false,
        afterLazyLoad: false
    };
}(jQuery, window, document));
var aarsleff = {
	init: function() {
		/*new CookieConsent();*/
	}
};

$(function() {
	aarsleff.init();
});


jQuery(document).ready(function(){

	/* animate header images background position on scroll (parallax) */
	function animateHeadPos(elem){
		$(window).on('scroll', function(){
			if( $(window).scrollTop() >= (elem.height() /5 *3) ){ // if 'scroll to top' is more than 'element height' => no scroll
				elem.addClass('fixed');
			} else {
				elem.css({'top': ($(window).scrollTop() /5) +'px'});
				elem.removeClass('fixed');
			}
		});
	}
	if($('#content-header .imageslider').length){ animateHeadPos($('#content-header .imageslider .image')); }


	if($('#welcome-content .LinkList').length){
		$('#welcome-content .LinkList a').each(function(){
			$(this).click(function(){
				ga('send', 'event', 'LinkList', $(this).attr('title'), 'Quelle: '+ location.hostname +' Ziel: '+ $(this).attr('href') );
			});
		});
	}

	if($('#welcome-content .owl-item').length){
		$('#welcome-content .owl-item a').each(function(){
			$(this).click(function(){
				ga('send', 'event', 'News-Block', $(this).attr('title'), 'Quelle: '+ location.hostname +' Ziel: '+ $(this).attr('href') );
			});
		});
	}

	/* scroll functions */
	if($('#right-zone .rotator-aktualnosci').length){
		var $scroll_item = $('#right-zone');
		var $element_footer = $('#mainFooter');
		//console.log('position footer: '+ offset_top_footer);
		function check_footer_position() {
			var $windowPos = $(window).scrollTop() + $(window).height(),
				offset_top_footer = $element_footer.offset().top;
			//console.log('window position: '+ $windowPos);
			//console.log('item position: '+ $scroll_item.offset().top);
			// check to see if this container is within viewport
			if( offset_top_footer <= $windowPos ){
				$element_footer.addClass('in-view');
				$scroll_item.css({'margin-top': '-'+($windowPos - offset_top_footer) +'px'});
			} else {
				$element_footer.removeClass('in-view');
				$scroll_item.css({'margin-top': ''});
			}
		}
		$(window).on('scroll resize', function(){
			if(!$('#menu-rwd').is(':visible')){ check_footer_position(); }
		});
		$(window).trigger('scroll');
	}


});
/* eof */

/*
 * jQuery FlexSlider v2.6.4
 * Copyright 2012 WooThemes
 * Contributing Author: Tyler Smith
 */!function($){var e=!0;$.flexslider=function(t,a){var n=$(t);n.vars=$.extend({},$.flexslider.defaults,a);var i=n.vars.namespace,r=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,s=("ontouchstart"in window||r||window.DocumentTouch&&document instanceof DocumentTouch)&&n.vars.touch,o="click touchend MSPointerUp keyup",l="",c,d="vertical"===n.vars.direction,u=n.vars.reverse,v=n.vars.itemWidth>0,p="fade"===n.vars.animation,m=""!==n.vars.asNavFor,f={};$.data(t,"flexslider",n),f={init:function(){n.animating=!1,n.currentSlide=parseInt(n.vars.startAt?n.vars.startAt:0,10),isNaN(n.currentSlide)&&(n.currentSlide=0),n.animatingTo=n.currentSlide,n.atEnd=0===n.currentSlide||n.currentSlide===n.last,n.containerSelector=n.vars.selector.substr(0,n.vars.selector.search(" ")),n.slides=$(n.vars.selector,n),n.container=$(n.containerSelector,n),n.count=n.slides.length,n.syncExists=$(n.vars.sync).length>0,"slide"===n.vars.animation&&(n.vars.animation="swing"),n.prop=d?"top":"marginLeft",n.args={},n.manualPause=!1,n.stopped=!1,n.started=!1,n.startTimeout=null,n.transitions=!n.vars.video&&!p&&n.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var a in t)if(void 0!==e.style[t[a]])return n.pfx=t[a].replace("Perspective","").toLowerCase(),n.prop="-"+n.pfx+"-transform",!0;return!1}(),n.ensureAnimationEnd="",""!==n.vars.controlsContainer&&(n.controlsContainer=$(n.vars.controlsContainer).length>0&&$(n.vars.controlsContainer)),""!==n.vars.manualControls&&(n.manualControls=$(n.vars.manualControls).length>0&&$(n.vars.manualControls)),""!==n.vars.customDirectionNav&&(n.customDirectionNav=2===$(n.vars.customDirectionNav).length&&$(n.vars.customDirectionNav)),n.vars.randomize&&(n.slides.sort(function(){return Math.round(Math.random())-.5}),n.container.empty().append(n.slides)),n.doMath(),n.setup("init"),n.vars.controlNav&&f.controlNav.setup(),n.vars.directionNav&&f.directionNav.setup(),n.vars.keyboard&&(1===$(n.containerSelector).length||n.vars.multipleKeyboard)&&$(document).bind("keyup",function(e){var t=e.keyCode;if(!n.animating&&(39===t||37===t)){var a=39===t?n.getTarget("next"):37===t&&n.getTarget("prev");n.flexAnimate(a,n.vars.pauseOnAction)}}),n.vars.mousewheel&&n.bind("mousewheel",function(e,t,a,i){e.preventDefault();var r=t<0?n.getTarget("next"):n.getTarget("prev");n.flexAnimate(r,n.vars.pauseOnAction)}),n.vars.pausePlay&&f.pausePlay.setup(),n.vars.slideshow&&n.vars.pauseInvisible&&f.pauseInvisible.init(),n.vars.slideshow&&(n.vars.pauseOnHover&&n.hover(function(){n.manualPlay||n.manualPause||n.pause()},function(){n.manualPause||n.manualPlay||n.stopped||n.play()}),n.vars.pauseInvisible&&f.pauseInvisible.isHidden()||(n.vars.initDelay>0?n.startTimeout=setTimeout(n.play,n.vars.initDelay):n.play())),m&&f.asNav.setup(),s&&n.vars.touch&&f.touch(),(!p||p&&n.vars.smoothHeight)&&$(window).bind("resize orientationchange focus",f.resize()),n.find("img").attr("draggable","false"),setTimeout(function(){n.vars.start(n)},200)},asNav:{setup:function(){n.asNav=!0,n.animatingTo=Math.floor(n.currentSlide/n.move),n.currentItem=n.currentSlide,n.slides.removeClass(i+"active-slide").eq(n.currentItem).addClass(i+"active-slide"),r?(t._slider=n,n.slides.each(function(){var e=this;e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=$(this),a=t.index();$(n.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(n.direction=n.currentItem<a?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction,!1,!0,!0))})})):n.slides.on(o,function(e){e.preventDefault();var t=$(this),a=t.index();t.offset().left-$(n).scrollLeft()<=0&&t.hasClass(i+"active-slide")?n.flexAnimate(n.getTarget("prev"),!0):$(n.vars.asNavFor).data("flexslider").animating||t.hasClass(i+"active-slide")||(n.direction=n.currentItem<a?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){n.manualControls?f.controlNav.setupManual():f.controlNav.setupPaging()},setupPaging:function(){var e="thumbnails"===n.vars.controlNav?"control-thumbs":"control-paging",t=1,a,r;if(n.controlNavScaffold=$('<ol class="'+i+"control-nav "+i+e+'"></ol>'),n.pagingCount>1)for(var s=0;s<n.pagingCount;s++){r=n.slides.eq(s),void 0===r.attr("data-thumb-alt")&&r.attr("data-thumb-alt","");var c=""!==r.attr("data-thumb-alt")?c=' alt="'+r.attr("data-thumb-alt")+'"':"";if(a="thumbnails"===n.vars.controlNav?'<img src="'+r.attr("data-thumb")+'"'+c+"/>":'<a href="#">'+t+"</a>","thumbnails"===n.vars.controlNav&&!0===n.vars.thumbCaptions){var d=r.attr("data-thumbcaption");""!==d&&void 0!==d&&(a+='<span class="'+i+'caption">'+d+"</span>")}n.controlNavScaffold.append("<li>"+a+"</li>"),t++}n.controlsContainer?$(n.controlsContainer).append(n.controlNavScaffold):n.append(n.controlNavScaffold),f.controlNav.set(),f.controlNav.active(),n.controlNavScaffold.delegate("a, img",o,function(e){if(e.preventDefault(),""===l||l===e.type){var t=$(this),a=n.controlNav.index(t);t.hasClass(i+"active")||(n.direction=a>n.currentSlide?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction))}""===l&&(l=e.type),f.setToClearWatchedEvent()})},setupManual:function(){n.controlNav=n.manualControls,f.controlNav.active(),n.controlNav.bind(o,function(e){if(e.preventDefault(),""===l||l===e.type){var t=$(this),a=n.controlNav.index(t);t.hasClass(i+"active")||(a>n.currentSlide?n.direction="next":n.direction="prev",n.flexAnimate(a,n.vars.pauseOnAction))}""===l&&(l=e.type),f.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===n.vars.controlNav?"img":"a";n.controlNav=$("."+i+"control-nav li "+e,n.controlsContainer?n.controlsContainer:n)},active:function(){n.controlNav.removeClass(i+"active").eq(n.animatingTo).addClass(i+"active")},update:function(e,t){n.pagingCount>1&&"add"===e?n.controlNavScaffold.append($('<li><a href="#">'+n.count+"</a></li>")):1===n.pagingCount?n.controlNavScaffold.find("li").remove():n.controlNav.eq(t).closest("li").remove(),f.controlNav.set(),n.pagingCount>1&&n.pagingCount!==n.controlNav.length?n.update(t,e):f.controlNav.active()}},directionNav:{setup:function(){var e=$('<ul class="'+i+'direction-nav"><li class="'+i+'nav-prev"><a class="'+i+'prev" href="#">'+n.vars.prevText+'</a></li><li class="'+i+'nav-next"><a class="'+i+'next" href="#">'+n.vars.nextText+"</a></li></ul>");n.customDirectionNav?n.directionNav=n.customDirectionNav:n.controlsContainer?($(n.controlsContainer).append(e),n.directionNav=$("."+i+"direction-nav li a",n.controlsContainer)):(n.append(e),n.directionNav=$("."+i+"direction-nav li a",n)),f.directionNav.update(),n.directionNav.bind(o,function(e){e.preventDefault();var t;""!==l&&l!==e.type||(t=$(this).hasClass(i+"next")?n.getTarget("next"):n.getTarget("prev"),n.flexAnimate(t,n.vars.pauseOnAction)),""===l&&(l=e.type),f.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";1===n.pagingCount?n.directionNav.addClass(e).attr("tabindex","-1"):n.vars.animationLoop?n.directionNav.removeClass(e).removeAttr("tabindex"):0===n.animatingTo?n.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):n.animatingTo===n.last?n.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):n.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=$('<div class="'+i+'pauseplay"><a href="#"></a></div>');n.controlsContainer?(n.controlsContainer.append(e),n.pausePlay=$("."+i+"pauseplay a",n.controlsContainer)):(n.append(e),n.pausePlay=$("."+i+"pauseplay a",n)),f.pausePlay.update(n.vars.slideshow?i+"pause":i+"play"),n.pausePlay.bind(o,function(e){e.preventDefault(),""!==l&&l!==e.type||($(this).hasClass(i+"pause")?(n.manualPause=!0,n.manualPlay=!1,n.pause()):(n.manualPause=!1,n.manualPlay=!0,n.play())),""===l&&(l=e.type),f.setToClearWatchedEvent()})},update:function(e){"play"===e?n.pausePlay.removeClass(i+"pause").addClass(i+"play").html(n.vars.playText):n.pausePlay.removeClass(i+"play").addClass(i+"pause").html(n.vars.pauseText)}},touch:function(){function e(e){e.stopPropagation(),n.animating?e.preventDefault():(n.pause(),t._gesture.addPointer(e.pointerId),T=0,c=d?n.h:n.w,f=Number(new Date),l=v&&u&&n.animatingTo===n.last?0:v&&u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:v&&n.currentSlide===n.last?n.limit:v?(n.itemW+n.vars.itemMargin)*n.move*n.currentSlide:u?(n.last-n.currentSlide+n.cloneOffset)*c:(n.currentSlide+n.cloneOffset)*c)}function a(e){e.stopPropagation();var a=e.target._slider;if(a){var n=-e.translationX,i=-e.translationY;if(T+=d?i:n,m=T,y=d?Math.abs(T)<Math.abs(-n):Math.abs(T)<Math.abs(-i),e.detail===e.MSGESTURE_FLAG_INERTIA)return void setImmediate(function(){t._gesture.stop()});(!y||Number(new Date)-f>500)&&(e.preventDefault(),!p&&a.transitions&&(a.vars.animationLoop||(m=T/(0===a.currentSlide&&T<0||a.currentSlide===a.last&&T>0?Math.abs(T)/c+2:1)),a.setProps(l+m,"setTouch")))}}function i(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!y&&null!==m){var a=u?-m:m,n=a>0?t.getTarget("next"):t.getTarget("prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?t.flexAnimate(n,t.vars.pauseOnAction):p||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}s=null,o=null,m=null,l=null,T=0}}var s,o,l,c,m,f,g,h,S,y=!1,x=0,b=0,T=0;r?(t.style.msTouchAction="none",t._gesture=new MSGesture,t._gesture.target=t,t.addEventListener("MSPointerDown",e,!1),t._slider=n,t.addEventListener("MSGestureChange",a,!1),t.addEventListener("MSGestureEnd",i,!1)):(g=function(e){n.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(n.pause(),c=d?n.h:n.w,f=Number(new Date),x=e.touches[0].pageX,b=e.touches[0].pageY,l=v&&u&&n.animatingTo===n.last?0:v&&u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:v&&n.currentSlide===n.last?n.limit:v?(n.itemW+n.vars.itemMargin)*n.move*n.currentSlide:u?(n.last-n.currentSlide+n.cloneOffset)*c:(n.currentSlide+n.cloneOffset)*c,s=d?b:x,o=d?x:b,t.addEventListener("touchmove",h,!1),t.addEventListener("touchend",S,!1))},h=function(e){x=e.touches[0].pageX,b=e.touches[0].pageY,m=d?s-b:s-x,y=d?Math.abs(m)<Math.abs(x-o):Math.abs(m)<Math.abs(b-o);var t=500;(!y||Number(new Date)-f>500)&&(e.preventDefault(),!p&&n.transitions&&(n.vars.animationLoop||(m/=0===n.currentSlide&&m<0||n.currentSlide===n.last&&m>0?Math.abs(m)/c+2:1),n.setProps(l+m,"setTouch")))},S=function(e){if(t.removeEventListener("touchmove",h,!1),n.animatingTo===n.currentSlide&&!y&&null!==m){var a=u?-m:m,i=a>0?n.getTarget("next"):n.getTarget("prev");n.canAdvance(i)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?n.flexAnimate(i,n.vars.pauseOnAction):p||n.flexAnimate(n.currentSlide,n.vars.pauseOnAction,!0)}t.removeEventListener("touchend",S,!1),s=null,o=null,m=null,l=null},t.addEventListener("touchstart",g,!1))},resize:function(){!n.animating&&n.is(":visible")&&(v||n.doMath(),p?f.smoothHeight():v?(n.slides.width(n.computedW),n.update(n.pagingCount),n.setProps()):d?(n.viewport.height(n.h),n.setProps(n.h,"setTotal")):(n.vars.smoothHeight&&f.smoothHeight(),n.newSlides.width(n.computedW),n.setProps(n.computedW,"setTotal")))},smoothHeight:function(e){if(!d||p){var t=p?n:n.viewport;e?t.animate({height:n.slides.eq(n.animatingTo).innerHeight()},e):t.innerHeight(n.slides.eq(n.animatingTo).innerHeight())}},sync:function(e){var t=$(n.vars.sync).data("flexslider"),a=n.animatingTo;switch(e){case"animate":t.flexAnimate(a,n.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause();break}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=$(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=f.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){f.pauseInvisible.isHidden()?n.startTimeout?clearTimeout(n.startTimeout):n.pause():n.started?n.play():n.vars.initDelay>0?setTimeout(n.play,n.vars.initDelay):n.play()})}},isHidden:function(){var e=f.pauseInvisible.getHiddenProp();return!!e&&document[e]},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}},setToClearWatchedEvent:function(){clearTimeout(c),c=setTimeout(function(){l=""},3e3)}},n.flexAnimate=function(e,t,a,r,o){if(n.vars.animationLoop||e===n.currentSlide||(n.direction=e>n.currentSlide?"next":"prev"),m&&1===n.pagingCount&&(n.direction=n.currentItem<e?"next":"prev"),!n.animating&&(n.canAdvance(e,o)||a)&&n.is(":visible")){if(m&&r){var l=$(n.vars.asNavFor).data("flexslider");if(n.atEnd=0===e||e===n.count-1,l.flexAnimate(e,!0,!1,!0,o),n.direction=n.currentItem<e?"next":"prev",l.direction=n.direction,Math.ceil((e+1)/n.visible)-1===n.currentSlide||0===e)return n.currentItem=e,n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),!1;n.currentItem=e,n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),e=Math.floor(e/n.visible)}if(n.animating=!0,n.animatingTo=e,t&&n.pause(),n.vars.before(n),n.syncExists&&!o&&f.sync("animate"),n.vars.controlNav&&f.controlNav.active(),v||n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),n.atEnd=0===e||e===n.last,n.vars.directionNav&&f.directionNav.update(),e===n.last&&(n.vars.end(n),n.vars.animationLoop||n.pause()),p)s?(n.slides.eq(n.currentSlide).css({opacity:0,zIndex:1}),n.slides.eq(e).css({opacity:1,zIndex:2}),n.wrapup(c)):(n.slides.eq(n.currentSlide).css({zIndex:1}).animate({opacity:0},n.vars.animationSpeed,n.vars.easing),n.slides.eq(e).css({zIndex:2}).animate({opacity:1},n.vars.animationSpeed,n.vars.easing,n.wrapup));else{var c=d?n.slides.filter(":first").height():n.computedW,g,h,S;v?(g=n.vars.itemMargin,S=(n.itemW+g)*n.move*n.animatingTo,h=S>n.limit&&1!==n.visible?n.limit:S):h=0===n.currentSlide&&e===n.count-1&&n.vars.animationLoop&&"next"!==n.direction?u?(n.count+n.cloneOffset)*c:0:n.currentSlide===n.last&&0===e&&n.vars.animationLoop&&"prev"!==n.direction?u?0:(n.count+1)*c:u?(n.count-1-e+n.cloneOffset)*c:(e+n.cloneOffset)*c,n.setProps(h,"",n.vars.animationSpeed),n.transitions?(n.vars.animationLoop&&n.atEnd||(n.animating=!1,n.currentSlide=n.animatingTo),n.container.unbind("webkitTransitionEnd transitionend"),n.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(n.ensureAnimationEnd),n.wrapup(c)}),clearTimeout(n.ensureAnimationEnd),n.ensureAnimationEnd=setTimeout(function(){n.wrapup(c)},n.vars.animationSpeed+100)):n.container.animate(n.args,n.vars.animationSpeed,n.vars.easing,function(){n.wrapup(c)})}n.vars.smoothHeight&&f.smoothHeight(n.vars.animationSpeed)}},n.wrapup=function(e){p||v||(0===n.currentSlide&&n.animatingTo===n.last&&n.vars.animationLoop?n.setProps(e,"jumpEnd"):n.currentSlide===n.last&&0===n.animatingTo&&n.vars.animationLoop&&n.setProps(e,"jumpStart")),n.animating=!1,n.currentSlide=n.animatingTo,n.vars.after(n)},n.animateSlides=function(){!n.animating&&e&&n.flexAnimate(n.getTarget("next"))},n.pause=function(){clearInterval(n.animatedSlides),n.animatedSlides=null,n.playing=!1,n.vars.pausePlay&&f.pausePlay.update("play"),n.syncExists&&f.sync("pause")},n.play=function(){n.playing&&clearInterval(n.animatedSlides),n.animatedSlides=n.animatedSlides||setInterval(n.animateSlides,n.vars.slideshowSpeed),n.started=n.playing=!0,n.vars.pausePlay&&f.pausePlay.update("pause"),n.syncExists&&f.sync("play")},n.stop=function(){n.pause(),n.stopped=!0},n.canAdvance=function(e,t){var a=m?n.pagingCount-1:n.last;return!!t||(!(!m||n.currentItem!==n.count-1||0!==e||"prev"!==n.direction)||(!m||0!==n.currentItem||e!==n.pagingCount-1||"next"===n.direction)&&(!(e===n.currentSlide&&!m)&&(!!n.vars.animationLoop||(!n.atEnd||0!==n.currentSlide||e!==a||"next"===n.direction)&&(!n.atEnd||n.currentSlide!==a||0!==e||"next"!==n.direction))))},n.getTarget=function(e){return n.direction=e,"next"===e?n.currentSlide===n.last?0:n.currentSlide+1:0===n.currentSlide?n.last:n.currentSlide-1},n.setProps=function(e,t,a){var i=function(){var a=e||(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo;return-1*function(){if(v)return"setTouch"===t?e:u&&n.animatingTo===n.last?0:u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:n.animatingTo===n.last?n.limit:a;switch(t){case"setTotal":return u?(n.count-1-n.currentSlide+n.cloneOffset)*e:(n.currentSlide+n.cloneOffset)*e;case"setTouch":return e;case"jumpEnd":return u?e:n.count*e;case"jumpStart":return u?n.count*e:e;default:return e}}()+"px"}();n.transitions&&(i=d?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)",a=void 0!==a?a/1e3+"s":"0s",n.container.css("-"+n.pfx+"-transition-duration",a),n.container.css("transition-duration",a)),n.args[n.prop]=i,(n.transitions||void 0===a)&&n.container.css(n.args),n.container.css("transform",i)},n.setup=function(e){if(p)n.slides.css({width:"100%",float:"left",marginRight:"-100%",position:"relative"}),"init"===e&&(s?n.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+n.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(n.currentSlide).css({opacity:1,zIndex:2}):0==n.vars.fadeFirstSlide?n.slides.css({opacity:0,display:"block",zIndex:1}).eq(n.currentSlide).css({zIndex:2}).css({opacity:1}):n.slides.css({opacity:0,display:"block",zIndex:1}).eq(n.currentSlide).css({zIndex:2}).animate({opacity:1},n.vars.animationSpeed,n.vars.easing)),n.vars.smoothHeight&&f.smoothHeight();else{var t,a;"init"===e&&(n.viewport=$('<div class="'+i+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(n).append(n.container),n.cloneCount=0,n.cloneOffset=0,u&&(a=$.makeArray(n.slides).reverse(),n.slides=$(a),n.container.empty().append(n.slides))),n.vars.animationLoop&&!v&&(n.cloneCount=2,n.cloneOffset=1,"init"!==e&&n.container.find(".clone").remove(),n.container.append(f.uniqueID(n.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(f.uniqueID(n.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),n.newSlides=$(n.vars.selector,n),t=u?n.count-1-n.currentSlide+n.cloneOffset:n.currentSlide+n.cloneOffset,d&&!v?(n.container.height(200*(n.count+n.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){n.newSlides.css({display:"block"}),n.doMath(),n.viewport.height(n.h),n.setProps(t*n.h,"init")},"init"===e?100:0)):(n.container.width(200*(n.count+n.cloneCount)+"%"),n.setProps(t*n.computedW,"init"),setTimeout(function(){n.doMath(),n.newSlides.css({width:n.computedW,marginRight:n.computedM,float:"left",display:"block"}),n.vars.smoothHeight&&f.smoothHeight()},"init"===e?100:0))}v||n.slides.removeClass(i+"active-slide").eq(n.currentSlide).addClass(i+"active-slide"),n.vars.init(n)},n.doMath=function(){var e=n.slides.first(),t=n.vars.itemMargin,a=n.vars.minItems,i=n.vars.maxItems;n.w=void 0===n.viewport?n.width():n.viewport.width(),n.h=e.height(),n.boxPadding=e.outerWidth()-e.width(),v?(n.itemT=n.vars.itemWidth+t,n.itemM=t,n.minW=a?a*n.itemT:n.w,n.maxW=i?i*n.itemT-t:n.w,n.itemW=n.minW>n.w?(n.w-t*(a-1))/a:n.maxW<n.w?(n.w-t*(i-1))/i:n.vars.itemWidth>n.w?n.w:n.vars.itemWidth,n.visible=Math.floor(n.w/n.itemW),n.move=n.vars.move>0&&n.vars.move<n.visible?n.vars.move:n.visible,n.pagingCount=Math.ceil((n.count-n.visible)/n.move+1),n.last=n.pagingCount-1,n.limit=1===n.pagingCount?0:n.vars.itemWidth>n.w?n.itemW*(n.count-1)+t*(n.count-1):(n.itemW+t)*n.count-n.w-t):(n.itemW=n.w,n.itemM=t,n.pagingCount=n.count,n.last=n.count-1),n.computedW=n.itemW-n.boxPadding,n.computedM=n.itemM},n.update=function(e,t){n.doMath(),v||(e<n.currentSlide?n.currentSlide+=1:e<=n.currentSlide&&0!==e&&(n.currentSlide-=1),n.animatingTo=n.currentSlide),n.vars.controlNav&&!n.manualControls&&("add"===t&&!v||n.pagingCount>n.controlNav.length?f.controlNav.update("add"):("remove"===t&&!v||n.pagingCount<n.controlNav.length)&&(v&&n.currentSlide>n.last&&(n.currentSlide-=1,n.animatingTo-=1),f.controlNav.update("remove",n.last))),n.vars.directionNav&&f.directionNav.update()},n.addSlide=function(e,t){var a=$(e);n.count+=1,n.last=n.count-1,d&&u?void 0!==t?n.slides.eq(n.count-t).after(a):n.container.prepend(a):void 0!==t?n.slides.eq(t).before(a):n.container.append(a),n.update(t,"add"),n.slides=$(n.vars.selector+":not(.clone)",n),n.setup(),n.vars.added(n)},n.removeSlide=function(e){var t=isNaN(e)?n.slides.index($(e)):e;n.count-=1,n.last=n.count-1,isNaN(e)?$(e,n.slides).remove():d&&u?n.slides.eq(n.last).remove():n.slides.eq(e).remove(),n.doMath(),n.update(t,"remove"),n.slides=$(n.vars.selector+":not(.clone)",n),n.setup(),n.vars.removed(n)},f.init()},$(window).blur(function(t){e=!1}).focus(function(t){e=!0}),$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},$.fn.flexslider=function(e){if(void 0===e&&(e={}),"object"==typeof e)return this.each(function(){var t=$(this),a=e.selector?e.selector:".slides > li",n=t.find(a);1===n.length&&!1===e.allowOneSlide||0===n.length?(n.fadeIn(400),e.start&&e.start(t)):void 0===t.data("flexslider")&&new $.flexslider(this,e)});var t=$(this).data("flexslider");switch(e){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof e&&t.flexAnimate(e,!0)}}}(jQuery);
/*
 * jQuery FlexSlider v2.6.4
 * Copyright 2012 WooThemes
 * Contributing Author: Tyler Smith
 */
;
(function ($) {

  var focused = true;

  //FlexSlider: Object Instance
  $.flexslider = function(el, options) {
    var slider = $(el);

    // making variables public
    slider.vars = $.extend({}, $.flexslider.defaults, options);

    var namespace = slider.vars.namespace,
        msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
        touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
        // deprecating this idea, as devices are being released with both of these events
        eventType = "click touchend MSPointerUp keyup",
        watchedEvent = "",
        watchedEventClearTimer,
        vertical = slider.vars.direction === "vertical",
        reverse = slider.vars.reverse,
        carousel = (slider.vars.itemWidth > 0),
        fade = slider.vars.animation === "fade",
        asNav = slider.vars.asNavFor !== "",
        methods = {};

    // Store a reference to the slider object
    $.data(el, "flexslider", slider);

    // Private slider methods
    methods = {
      init: function() {
        slider.animating = false;
        // Get current slide and make sure it is a number
        slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 );
        if ( isNaN( slider.currentSlide ) ) { slider.currentSlide = 0; }
        slider.animatingTo = slider.currentSlide;
        slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
        slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' '));
        slider.slides = $(slider.vars.selector, slider);
        slider.container = $(slider.containerSelector, slider);
        slider.count = slider.slides.length;
        // SYNC:
        slider.syncExists = $(slider.vars.sync).length > 0;
        // SLIDE:
        if (slider.vars.animation === "slide") { slider.vars.animation = "swing"; }
        slider.prop = (vertical) ? "top" : "marginLeft";
        slider.args = {};
        // SLIDESHOW:
        slider.manualPause = false;
        slider.stopped = false;
        //PAUSE WHEN INVISIBLE
        slider.started = false;
        slider.startTimeout = null;
        // TOUCH/USECSS:
        slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() {
          var obj = document.createElement('div'),
              props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
          for (var i in props) {
            if ( obj.style[ props[i] ] !== undefined ) {
              slider.pfx = props[i].replace('Perspective','').toLowerCase();
              slider.prop = "-" + slider.pfx + "-transform";
              return true;
            }
          }
          return false;
        }());
        slider.ensureAnimationEnd = '';
        // CONTROLSCONTAINER:
        if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer);
        // MANUAL:
        if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls);

        // CUSTOM DIRECTION NAV:
        if (slider.vars.customDirectionNav !== "") slider.customDirectionNav = $(slider.vars.customDirectionNav).length === 2 && $(slider.vars.customDirectionNav);

        // RANDOMIZE:
        if (slider.vars.randomize) {
          slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
          slider.container.empty().append(slider.slides);
        }

        slider.doMath();

        // INIT
        slider.setup("init");

        // CONTROLNAV:
        if (slider.vars.controlNav) { methods.controlNav.setup(); }

        // DIRECTIONNAV:
        if (slider.vars.directionNav) { methods.directionNav.setup(); }

        // KEYBOARD:
        if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) {
          $(document).bind('keyup', function(event) {
            var keycode = event.keyCode;
            if (!slider.animating && (keycode === 39 || keycode === 37)) {
              var target = (keycode === 39) ? slider.getTarget('next') :
                           (keycode === 37) ? slider.getTarget('prev') : false;
              slider.flexAnimate(target, slider.vars.pauseOnAction);
            }
          });
        }
        // MOUSEWHEEL:
        if (slider.vars.mousewheel) {
          slider.bind('mousewheel', function(event, delta, deltaX, deltaY) {
            event.preventDefault();
            var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
            slider.flexAnimate(target, slider.vars.pauseOnAction);
          });
        }

        // PAUSEPLAY
        if (slider.vars.pausePlay) { methods.pausePlay.setup(); }

        //PAUSE WHEN INVISIBLE
        if (slider.vars.slideshow && slider.vars.pauseInvisible) { methods.pauseInvisible.init(); }

        // SLIDSESHOW
        if (slider.vars.slideshow) {
          if (slider.vars.pauseOnHover) {
            slider.hover(function() {
              if (!slider.manualPlay && !slider.manualPause) { slider.pause(); }
            }, function() {
              if (!slider.manualPause && !slider.manualPlay && !slider.stopped) { slider.play(); }
            });
          }
          // initialize animation
          //If we're visible, or we don't use PageVisibility API
          if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) {
            (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play();
          }
        }

        // ASNAV:
        if (asNav) { methods.asNav.setup(); }

        // TOUCH
        if (touch && slider.vars.touch) { methods.touch(); }

        // FADE&&SMOOTHHEIGHT || SLIDE:
        if (!fade || (fade && slider.vars.smoothHeight)) { $(window).bind("resize orientationchange focus", methods.resize()); }

        slider.find("img").attr("draggable", "false");

        // API: start() Callback
        setTimeout(function(){
          slider.vars.start(slider);
        }, 200);
      },
      asNav: {
        setup: function() {
          slider.asNav = true;
          slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
          slider.currentItem = slider.currentSlide;
          slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
          if(!msGesture){
              slider.slides.on(eventType, function(e){
                e.preventDefault();
                var $slide = $(this),
                    target = $slide.index();
                var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container
                if( posFromLeft <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) {
                  slider.flexAnimate(slider.getTarget("prev"), true);
                } else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) {
                  slider.direction = (slider.currentItem < target) ? "next" : "prev";
                  slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
                }
              });
          }else{
              el._slider = slider;
              slider.slides.each(function (){
                  var that = this;
                  that._gesture = new MSGesture();
                  that._gesture.target = that;
                  that.addEventListener("MSPointerDown", function (e){
                      e.preventDefault();
                      if(e.currentTarget._gesture) {
                        e.currentTarget._gesture.addPointer(e.pointerId);
                      }
                  }, false);
                  that.addEventListener("MSGestureTap", function (e){
                      e.preventDefault();
                      var $slide = $(this),
                          target = $slide.index();
                      if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) {
                          slider.direction = (slider.currentItem < target) ? "next" : "prev";
                          slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
                      }
                  });
              });
          }
        }
      },
      controlNav: {
        setup: function() {
          if (!slider.manualControls) {
            methods.controlNav.setupPaging();
          } else { // MANUALCONTROLS:
            methods.controlNav.setupManual();
          }
        },
        setupPaging: function() {
          var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
              j = 1,
              item,
              slide;

          slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');

          if (slider.pagingCount > 1) {
            for (var i = 0; i < slider.pagingCount; i++) {
              slide = slider.slides.eq(i);
              if ( undefined === slide.attr( 'data-thumb-alt' ) ) { slide.attr( 'data-thumb-alt', '' ); }
              var altText = ( '' !== slide.attr( 'data-thumb-alt' ) ) ? altText = ' alt="' + slide.attr( 'data-thumb-alt' ) + '"' : '';
              item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"' + altText + '/>' : '<a href="#">' + j + '</a>';
              if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
                var captn = slide.attr( 'data-thumbcaption' );
                if ( '' !== captn && undefined !== captn ) { item += '<span class="' + namespace + 'caption">' + captn + '</span>'; }
              }
              slider.controlNavScaffold.append('<li>' + item + '</li>');
              j++;
            }
          }

          // CONTROLSCONTAINER:
          (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
          methods.controlNav.set();

          methods.controlNav.active();

          slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
            event.preventDefault();

            if (watchedEvent === "" || watchedEvent === event.type) {
              var $this = $(this),
                  target = slider.controlNav.index($this);

              if (!$this.hasClass(namespace + 'active')) {
                slider.direction = (target > slider.currentSlide) ? "next" : "prev";
                slider.flexAnimate(target, slider.vars.pauseOnAction);
              }
            }

            // setup flags to prevent event duplication
            if (watchedEvent === "") {
              watchedEvent = event.type;
            }
            methods.setToClearWatchedEvent();

          });
        },
        setupManual: function() {
          slider.controlNav = slider.manualControls;
          methods.controlNav.active();

          slider.controlNav.bind(eventType, function(event) {
            event.preventDefault();

            if (watchedEvent === "" || watchedEvent === event.type) {
              var $this = $(this),
                  target = slider.controlNav.index($this);

              if (!$this.hasClass(namespace + 'active')) {
                (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
                slider.flexAnimate(target, slider.vars.pauseOnAction);
              }
            }

            // setup flags to prevent event duplication
            if (watchedEvent === "") {
              watchedEvent = event.type;
            }
            methods.setToClearWatchedEvent();
          });
        },
        set: function() {
          var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a';
          slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
        },
        active: function() {
          slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
        },
        update: function(action, pos) {
          if (slider.pagingCount > 1 && action === "add") {
            slider.controlNavScaffold.append($('<li><a href="#">' + slider.count + '</a></li>'));
          } else if (slider.pagingCount === 1) {
            slider.controlNavScaffold.find('li').remove();
          } else {
            slider.controlNav.eq(pos).closest('li').remove();
          }
          methods.controlNav.set();
          (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
        }
      },
      directionNav: {
        setup: function() {
          var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li class="' + namespace + 'nav-prev"><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li class="' + namespace + 'nav-next"><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>');

          // CUSTOM DIRECTION NAV:
          if (slider.customDirectionNav) {
            slider.directionNav = slider.customDirectionNav;
          // CONTROLSCONTAINER:
          } else if (slider.controlsContainer) {
            $(slider.controlsContainer).append(directionNavScaffold);
            slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
          } else {
            slider.append(directionNavScaffold);
            slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
          }

          methods.directionNav.update();

          slider.directionNav.bind(eventType, function(event) {
            event.preventDefault();
            var target;

            if (watchedEvent === "" || watchedEvent === event.type) {
              target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
              slider.flexAnimate(target, slider.vars.pauseOnAction);
            }

            // setup flags to prevent event duplication
            if (watchedEvent === "") {
              watchedEvent = event.type;
            }
            methods.setToClearWatchedEvent();
          });
        },
        update: function() {
          var disabledClass = namespace + 'disabled';
          if (slider.pagingCount === 1) {
            slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
          } else if (!slider.vars.animationLoop) {
            if (slider.animatingTo === 0) {
              slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
            } else if (slider.animatingTo === slider.last) {
              slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
            } else {
              slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
            }
          } else {
            slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
          }
        }
      },
      pausePlay: {
        setup: function() {
          var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a href="#"></a></div>');

          // CONTROLSCONTAINER:
          if (slider.controlsContainer) {
            slider.controlsContainer.append(pausePlayScaffold);
            slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
          } else {
            slider.append(pausePlayScaffold);
            slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
          }

          methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play');

          slider.pausePlay.bind(eventType, function(event) {
            event.preventDefault();

            if (watchedEvent === "" || watchedEvent === event.type) {
              if ($(this).hasClass(namespace + 'pause')) {
                slider.manualPause = true;
                slider.manualPlay = false;
                slider.pause();
              } else {
                slider.manualPause = false;
                slider.manualPlay = true;
                slider.play();
              }
            }

            // setup flags to prevent event duplication
            if (watchedEvent === "") {
              watchedEvent = event.type;
            }
            methods.setToClearWatchedEvent();
          });
        },
        update: function(state) {
          (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText);
        }
      },
      touch: function() {
        var startX,
          startY,
          offset,
          cwidth,
          dx,
          startT,
          onTouchStart,
          onTouchMove,
          onTouchEnd,
          scrolling = false,
          localX = 0,
          localY = 0,
          accDx = 0;

        if(!msGesture){
            onTouchStart = function(e) {
              if (slider.animating) {
                e.preventDefault();
              } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
                slider.pause();
                // CAROUSEL:
                cwidth = (vertical) ? slider.h : slider. w;
                startT = Number(new Date());
                // CAROUSEL:

                // Local vars for X and Y points.
                localX = e.touches[0].pageX;
                localY = e.touches[0].pageY;

                offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
                         (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
                         (carousel && slider.currentSlide === slider.last) ? slider.limit :
                         (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
                         (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
                startX = (vertical) ? localY : localX;
                startY = (vertical) ? localX : localY;

                el.addEventListener('touchmove', onTouchMove, false);
                el.addEventListener('touchend', onTouchEnd, false);
              }
            };

            onTouchMove = function(e) {
              // Local vars for X and Y points.

              localX = e.touches[0].pageX;
              localY = e.touches[0].pageY;

              dx = (vertical) ? startX - localY : startX - localX;
              scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY));

              var fxms = 500;

              if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
                e.preventDefault();
                if (!fade && slider.transitions) {
                  if (!slider.vars.animationLoop) {
                    dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
                  }
                  slider.setProps(offset + dx, "setTouch");
                }
              }
            };

            onTouchEnd = function(e) {
              // finish the touch by undoing the touch session
              el.removeEventListener('touchmove', onTouchMove, false);

              if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
                var updateDx = (reverse) ? -dx : dx,
                    target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');

                if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
                  slider.flexAnimate(target, slider.vars.pauseOnAction);
                } else {
                  if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
                }
              }
              el.removeEventListener('touchend', onTouchEnd, false);

              startX = null;
              startY = null;
              dx = null;
              offset = null;
            };

            el.addEventListener('touchstart', onTouchStart, false);
        }else{
            el.style.msTouchAction = "none";
            el._gesture = new MSGesture();
            el._gesture.target = el;
            el.addEventListener("MSPointerDown", onMSPointerDown, false);
            el._slider = slider;
            el.addEventListener("MSGestureChange", onMSGestureChange, false);
            el.addEventListener("MSGestureEnd", onMSGestureEnd, false);

            function onMSPointerDown(e){
                e.stopPropagation();
                if (slider.animating) {
                    e.preventDefault();
                }else{
                    slider.pause();
                    el._gesture.addPointer(e.pointerId);
                    accDx = 0;
                    cwidth = (vertical) ? slider.h : slider. w;
                    startT = Number(new Date());
                    // CAROUSEL:

                    offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
                        (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
                            (carousel && slider.currentSlide === slider.last) ? slider.limit :
                                (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
                                    (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
                }
            }

            function onMSGestureChange(e) {
                e.stopPropagation();
                var slider = e.target._slider;
                if(!slider){
                    return;
                }
                var transX = -e.translationX,
                    transY = -e.translationY;

                //Accumulate translations.
                accDx = accDx + ((vertical) ? transY : transX);
                dx = accDx;
                scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY));

                if(e.detail === e.MSGESTURE_FLAG_INERTIA){
                    setImmediate(function (){
                        el._gesture.stop();
                    });

                    return;
                }

                if (!scrolling || Number(new Date()) - startT > 500) {
                    e.preventDefault();
                    if (!fade && slider.transitions) {
                        if (!slider.vars.animationLoop) {
                            dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1);
                        }
                        slider.setProps(offset + dx, "setTouch");
                    }
                }
            }

            function onMSGestureEnd(e) {
                e.stopPropagation();
                var slider = e.target._slider;
                if(!slider){
                    return;
                }
                if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
                    var updateDx = (reverse) ? -dx : dx,
                        target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');

                    if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
                        slider.flexAnimate(target, slider.vars.pauseOnAction);
                    } else {
                        if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
                    }
                }

                startX = null;
                startY = null;
                dx = null;
                offset = null;
                accDx = 0;
            }
        }
      },
      resize: function() {
        if (!slider.animating && slider.is(':visible')) {
          if (!carousel) { slider.doMath(); }

          if (fade) {
            // SMOOTH HEIGHT:
            methods.smoothHeight();
          } else if (carousel) { //CAROUSEL:
            slider.slides.width(slider.computedW);
            slider.update(slider.pagingCount);
            slider.setProps();
          }
          else if (vertical) { //VERTICAL:
            slider.viewport.height(slider.h);
            slider.setProps(slider.h, "setTotal");
          } else {
            // SMOOTH HEIGHT:
            if (slider.vars.smoothHeight) { methods.smoothHeight(); }
            slider.newSlides.width(slider.computedW);
            slider.setProps(slider.computedW, "setTotal");
          }
        }
      },
      smoothHeight: function(dur) {
        if (!vertical || fade) {
          var $obj = (fade) ? slider : slider.viewport;
          (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).innerHeight()}, dur) : $obj.innerHeight(slider.slides.eq(slider.animatingTo).innerHeight());
        }
      },
      sync: function(action) {
        var $obj = $(slider.vars.sync).data("flexslider"),
            target = slider.animatingTo;

        switch (action) {
          case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break;
          case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
          case "pause": $obj.pause(); break;
        }
      },
      uniqueID: function($clone) {
        // Append _clone to current level and children elements with id attributes
        $clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() {
          var $this = $(this);
          $this.attr( 'id', $this.attr( 'id' ) + '_clone' );
        });
        return $clone;
      },
      pauseInvisible: {
        visProp: null,
        init: function() {
          var visProp = methods.pauseInvisible.getHiddenProp();
          if (visProp) {
            var evtname = visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
            document.addEventListener(evtname, function() {
              if (methods.pauseInvisible.isHidden()) {
                if(slider.startTimeout) {
                  clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
                } else {
                  slider.pause(); //Or just pause
                }
              }
              else {
                if(slider.started) {
                  slider.play(); //Initiated before, just play
                } else {
                  if (slider.vars.initDelay > 0) {
                    setTimeout(slider.play, slider.vars.initDelay);
                  } else {
                    slider.play(); //Didn't init before: simply init or wait for it
                  }
                }
              }
            });
          }
        },
        isHidden: function() {
          var prop = methods.pauseInvisible.getHiddenProp();
          if (!prop) {
            return false;
          }
          return document[prop];
        },
        getHiddenProp: function() {
          var prefixes = ['webkit','moz','ms','o'];
          // if 'hidden' is natively supported just return it
          if ('hidden' in document) {
            return 'hidden';
          }
          // otherwise loop over all the known prefixes until we find one
          for ( var i = 0; i < prefixes.length; i++ ) {
              if ((prefixes[i] + 'Hidden') in document) {
                return prefixes[i] + 'Hidden';
              }
          }
          // otherwise it's not supported
          return null;
        }
      },
      setToClearWatchedEvent: function() {
        clearTimeout(watchedEventClearTimer);
        watchedEventClearTimer = setTimeout(function() {
          watchedEvent = "";
        }, 3000);
      }
    };

    // public methods
    slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
      if (!slider.vars.animationLoop && target !== slider.currentSlide) {
        slider.direction = (target > slider.currentSlide) ? "next" : "prev";
      }

      if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";

      if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
        if (asNav && withSync) {
          var master = $(slider.vars.asNavFor).data('flexslider');
          slider.atEnd = target === 0 || target === slider.count - 1;
          master.flexAnimate(target, true, false, true, fromNav);
          slider.direction = (slider.currentItem < target) ? "next" : "prev";
          master.direction = slider.direction;

          if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
            slider.currentItem = target;
            slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
            target = Math.floor(target/slider.visible);
          } else {
            slider.currentItem = target;
            slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
            return false;
          }
        }

        slider.animating = true;
        slider.animatingTo = target;

        // SLIDESHOW:
        if (pause) { slider.pause(); }

        // API: before() animation Callback
        slider.vars.before(slider);

        // SYNC:
        if (slider.syncExists && !fromNav) { methods.sync("animate"); }

        // CONTROLNAV
        if (slider.vars.controlNav) { methods.controlNav.active(); }

        // !CAROUSEL:
        // CANDIDATE: slide active class (for add/remove slide)
        if (!carousel) { slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); }

        // INFINITE LOOP:
        // CANDIDATE: atEnd
        slider.atEnd = target === 0 || target === slider.last;

        // DIRECTIONNAV:
        if (slider.vars.directionNav) { methods.directionNav.update(); }

        if (target === slider.last) {
          // API: end() of cycle Callback
          slider.vars.end(slider);
          // SLIDESHOW && !INFINITE LOOP:
          if (!slider.vars.animationLoop) { slider.pause(); }
        }

        // SLIDE:
        if (!fade) {
          var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
              margin, slideString, calcNext;

          // INFINITE LOOP / REVERSE:
          if (carousel) {
            margin = slider.vars.itemMargin;
            calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
            slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
          } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") {
            slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
          } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") {
            slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
          } else {
            slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
          }
          slider.setProps(slideString, "", slider.vars.animationSpeed);
          if (slider.transitions) {
            if (!slider.vars.animationLoop || !slider.atEnd) {
              slider.animating = false;
              slider.currentSlide = slider.animatingTo;
            }

            // Unbind previous transitionEnd events and re-bind new transitionEnd event
            slider.container.unbind("webkitTransitionEnd transitionend");
            slider.container.bind("webkitTransitionEnd transitionend", function() {
              clearTimeout(slider.ensureAnimationEnd);
              slider.wrapup(dimension);
            });

            // Insurance for the ever-so-fickle transitionEnd event
            clearTimeout(slider.ensureAnimationEnd);
            slider.ensureAnimationEnd = setTimeout(function() {
              slider.wrapup(dimension);
            }, slider.vars.animationSpeed + 100);

          } else {
            slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){
              slider.wrapup(dimension);
            });
          }
        } else { // FADE:
          if (!touch) {
            slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing);
            slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
          } else {
            slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
            slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
            slider.wrapup(dimension);
          }
        }
        // SMOOTH HEIGHT:
        if (slider.vars.smoothHeight) { methods.smoothHeight(slider.vars.animationSpeed); }
      }
    };
    slider.wrapup = function(dimension) {
      // SLIDE:
      if (!fade && !carousel) {
        if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) {
          slider.setProps(dimension, "jumpEnd");
        } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) {
          slider.setProps(dimension, "jumpStart");
        }
      }
      slider.animating = false;
      slider.currentSlide = slider.animatingTo;
      // API: after() animation Callback
      slider.vars.after(slider);
    };

    // SLIDESHOW:
    slider.animateSlides = function() {
      if (!slider.animating && focused ) { slider.flexAnimate(slider.getTarget("next")); }
    };
    // SLIDESHOW:
    slider.pause = function() {
      clearInterval(slider.animatedSlides);
      slider.animatedSlides = null;
      slider.playing = false;
      // PAUSEPLAY:
      if (slider.vars.pausePlay) { methods.pausePlay.update("play"); }
      // SYNC:
      if (slider.syncExists) { methods.sync("pause"); }
    };
    // SLIDESHOW:
    slider.play = function() {
      if (slider.playing) { clearInterval(slider.animatedSlides); }
      slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
      slider.started = slider.playing = true;
      // PAUSEPLAY:
      if (slider.vars.pausePlay) { methods.pausePlay.update("pause"); }
      // SYNC:
      if (slider.syncExists) { methods.sync("play"); }
    };
    // STOP:
    slider.stop = function () {
      slider.pause();
      slider.stopped = true;
    };
    slider.canAdvance = function(target, fromNav) {
      // ASNAV:
      var last = (asNav) ? slider.pagingCount - 1 : slider.last;
      return (fromNav) ? true :
             (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
             (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
             (target === slider.currentSlide && !asNav) ? false :
             (slider.vars.animationLoop) ? true :
             (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
             (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
             true;
    };
    slider.getTarget = function(dir) {
      slider.direction = dir;
      if (dir === "next") {
        return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
      } else {
        return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
      }
    };

    // SLIDE:
    slider.setProps = function(pos, special, dur) {
      var target = (function() {
        var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
            posCalc = (function() {
              if (carousel) {
                return (special === "setTouch") ? pos :
                       (reverse && slider.animatingTo === slider.last) ? 0 :
                       (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
                       (slider.animatingTo === slider.last) ? slider.limit : posCheck;
              } else {
                switch (special) {
                  case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
                  case "setTouch": return (reverse) ? pos : pos;
                  case "jumpEnd": return (reverse) ? pos : slider.count * pos;
                  case "jumpStart": return (reverse) ? slider.count * pos : pos;
                  default: return pos;
                }
              }
            }());

            return (posCalc * -1) + "px";
          }());

      if (slider.transitions) {
        target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
        dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
        slider.container.css("-" + slider.pfx + "-transition-duration", dur);
         slider.container.css("transition-duration", dur);
      }

      slider.args[slider.prop] = target;
      if (slider.transitions || dur === undefined) { slider.container.css(slider.args); }

      slider.container.css('transform',target);
    };

    slider.setup = function(type) {
      // SLIDE:
      if (!fade) {
        var sliderOffset, arr;

        if (type === "init") {
          slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
          // INFINITE LOOP:
          slider.cloneCount = 0;
          slider.cloneOffset = 0;
          // REVERSE:
          if (reverse) {
            arr = $.makeArray(slider.slides).reverse();
            slider.slides = $(arr);
            slider.container.empty().append(slider.slides);
          }
        }
        // INFINITE LOOP && !CAROUSEL:
        if (slider.vars.animationLoop && !carousel) {
          slider.cloneCount = 2;
          slider.cloneOffset = 1;
          // clear out old clones
          if (type !== "init") { slider.container.find('.clone').remove(); }
          slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
                          .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
        }
        slider.newSlides = $(slider.vars.selector, slider);

        sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
        // VERTICAL:
        if (vertical && !carousel) {
          slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
          setTimeout(function(){
            slider.newSlides.css({"display": "block"});
            slider.doMath();
            slider.viewport.height(slider.h);
            slider.setProps(sliderOffset * slider.h, "init");
          }, (type === "init") ? 100 : 0);
        } else {
          slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
          slider.setProps(sliderOffset * slider.computedW, "init");
          setTimeout(function(){
            slider.doMath();
            slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "left", "display": "block"});
            // SMOOTH HEIGHT:
            if (slider.vars.smoothHeight) { methods.smoothHeight(); }
          }, (type === "init") ? 100 : 0);
        }
      } else { // FADE:
        slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"});
        if (type === "init") {
          if (!touch) {
            //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
            if (slider.vars.fadeFirstSlide == false) {
              slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1});
            } else {
              slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
            }
          } else {
            slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
          }
        }
        // SMOOTH HEIGHT:
        if (slider.vars.smoothHeight) { methods.smoothHeight(); }
      }
      // !CAROUSEL:
      // CANDIDATE: active slide
      if (!carousel) { slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); }

      //FlexSlider: init() Callback
      slider.vars.init(slider);
    };

    slider.doMath = function() {
      var slide = slider.slides.first(),
          slideMargin = slider.vars.itemMargin,
          minItems = slider.vars.minItems,
          maxItems = slider.vars.maxItems;

      slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width();
      slider.h = slide.height();
      slider.boxPadding = slide.outerWidth() - slide.width();

      // CAROUSEL:
      if (carousel) {
        slider.itemT = slider.vars.itemWidth + slideMargin;
        slider.itemM = slideMargin;
        slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
        slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w;
        slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems :
                       (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems :
                       (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth;

        slider.visible = Math.floor(slider.w/(slider.itemW));
        slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible;
        slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
        slider.last =  slider.pagingCount - 1;
        slider.limit = (slider.pagingCount === 1) ? 0 :
                       (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
      } else {
        slider.itemW = slider.w;
        slider.itemM = slideMargin;
        slider.pagingCount = slider.count;
        slider.last = slider.count - 1;
      }
      slider.computedW = slider.itemW - slider.boxPadding;
      slider.computedM = slider.itemM;
    };

    slider.update = function(pos, action) {
      slider.doMath();

      // update currentSlide and slider.animatingTo if necessary
      if (!carousel) {
        if (pos < slider.currentSlide) {
          slider.currentSlide += 1;
        } else if (pos <= slider.currentSlide && pos !== 0) {
          slider.currentSlide -= 1;
        }
        slider.animatingTo = slider.currentSlide;
      }

      // update controlNav
      if (slider.vars.controlNav && !slider.manualControls) {
        if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
          methods.controlNav.update("add");
        } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
          if (carousel && slider.currentSlide > slider.last) {
            slider.currentSlide -= 1;
            slider.animatingTo -= 1;
          }
          methods.controlNav.update("remove", slider.last);
        }
      }
      // update directionNav
      if (slider.vars.directionNav) { methods.directionNav.update(); }

    };

    slider.addSlide = function(obj, pos) {
      var $obj = $(obj);

      slider.count += 1;
      slider.last = slider.count - 1;

      // append new slide
      if (vertical && reverse) {
        (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
      } else {
        (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
      }

      // update currentSlide, animatingTo, controlNav, and directionNav
      slider.update(pos, "add");

      // update slider.slides
      slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
      // re-setup the slider to accomdate new slide
      slider.setup();

      //FlexSlider: added() Callback
      slider.vars.added(slider);
    };
    slider.removeSlide = function(obj) {
      var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;

      // update count
      slider.count -= 1;
      slider.last = slider.count - 1;

      // remove slide
      if (isNaN(obj)) {
        $(obj, slider.slides).remove();
      } else {
        (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
      }

      // update currentSlide, animatingTo, controlNav, and directionNav
      slider.doMath();
      slider.update(pos, "remove");

      // update slider.slides
      slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
      // re-setup the slider to accomdate new slide
      slider.setup();

      // FlexSlider: removed() Callback
      slider.vars.removed(slider);
    };

    //FlexSlider: Initialize
    methods.init();
  };

  // Ensure the slider isn't focussed if the window loses focus.
  $( window ).blur( function ( e ) {
    focused = false;
  }).focus( function ( e ) {
    focused = true;
  });

  //FlexSlider: Default Settings
  $.flexslider.defaults = {
    namespace: "flex-",             //{NEW} String: Prefix string attached to the class of every element generated by the plugin
    selector: ".slides > li",       //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
    animation: "fade",              //String: Select your animation type, "fade" or "slide"
    easing: "swing",                //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
    direction: "horizontal",        //String: Select the sliding direction, "horizontal" or "vertical"
    reverse: false,                 //{NEW} Boolean: Reverse the animation direction
    animationLoop: true,            //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
    smoothHeight: false,            //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
    startAt: 0,                     //Integer: The slide that the slider should start on. Array notation (0 = first slide)
    slideshow: true,                //Boolean: Animate slider automatically
    slideshowSpeed: 7000,           //Integer: Set the speed of the slideshow cycling, in milliseconds
    animationSpeed: 600,            //Integer: Set the speed of animations, in milliseconds
    initDelay: 0,                   //{NEW} Integer: Set an initialization delay, in milliseconds
    randomize: false,               //Boolean: Randomize slide order
    fadeFirstSlide: true,           //Boolean: Fade in the first slide when animation type is "fade"
    thumbCaptions: false,           //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.

    // Usability features
    pauseOnAction: true,            //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
    pauseOnHover: false,            //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
    pauseInvisible: true,   		//{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage.
    useCSS: true,                   //{NEW} Boolean: Slider will use CSS3 transitions if available
    touch: true,                    //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
    video: false,                   //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches

    // Primary Controls
    controlNav: true,               //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage
    directionNav: true,             //Boolean: Create navigation for previous/next navigation? (true/false)
    prevText: "Previous",           //String: Set the text for the "previous" directionNav item
    nextText: "Next",               //String: Set the text for the "next" directionNav item

    // Secondary Navigation
    keyboard: true,                 //Boolean: Allow slider navigating via keyboard left/right keys
    multipleKeyboard: false,        //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
    mousewheel: false,              //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
    pausePlay: false,               //Boolean: Create pause/play dynamic element
    pauseText: "Pause",             //String: Set the text for the "pause" pausePlay item
    playText: "Play",               //String: Set the text for the "play" pausePlay item

    // Special properties
    controlsContainer: "",          //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found.
    manualControls: "",             //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
    customDirectionNav: "",         //{NEW} jQuery Object/Selector: Custom prev / next button. Must be two jQuery elements. In order to make the events work they have to have the classes "prev" and "next" (plus namespace)
    sync: "",                       //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
    asNavFor: "",                   //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider

    // Carousel Options
    itemWidth: 0,                   //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
    itemMargin: 0,                  //{NEW} Integer: Margin between carousel items.
    minItems: 1,                    //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
    maxItems: 0,                    //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
    move: 0,                        //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
    allowOneSlide: true,           //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide

    // Callback API
    start: function(){},            //Callback: function(slider) - Fires when the slider loads the first slide
    before: function(){},           //Callback: function(slider) - Fires asynchronously with each slider animation
    after: function(){},            //Callback: function(slider) - Fires after each slider animation completes
    end: function(){},              //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
    added: function(){},            //{NEW} Callback: function(slider) - Fires after a slide is added
    removed: function(){},           //{NEW} Callback: function(slider) - Fires after a slide is removed
    init: function() {}             //{NEW} Callback: function(slider) - Fires after the slider is initially setup
  };

  //FlexSlider: Plugin Function
  $.fn.flexslider = function(options) {
    if (options === undefined) { options = {}; }

    if (typeof options === "object") {
      return this.each(function() {
        var $this = $(this),
            selector = (options.selector) ? options.selector : ".slides > li",
            $slides = $this.find(selector);

      if ( ( $slides.length === 1 && options.allowOneSlide === false ) || $slides.length === 0 ) {
          $slides.fadeIn(400);
          if (options.start) { options.start($this); }
        } else if ($this.data('flexslider') === undefined) {
          new $.flexslider(this, options);
        }
      });
    } else {
      // Helper strings to quickly perform functions on the slider
      var $slider = $(this).data('flexslider');
      switch (options) {
        case "play": $slider.play(); break;
        case "pause": $slider.pause(); break;
        case "stop": $slider.stop(); break;
        case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
        case "prev":
        case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
        default: if (typeof options === "number") { $slider.flexAnimate(options, true); }
      }
    }
  };
})(jQuery);

$(window).load(function() {
  $('#carousel').flexslider({
    animation: "slide",
    controlNav: false,
    animationLoop: false,
    slideshow: false,
    itemWidth: 200,
    itemMargin: 0,
    asNavFor: '#slider'
  });
 
  $('#slider').flexslider({
    animation: "slide",
    controlNav: false,
    navText: "",
    animationLoop: false,
    slideshow: false,
    sync: "#carousel"
  });
});
jQuery(function() {
    if (jQuery("map[name='image-map']").length > 0) {
        var overlayImages = {
            "Germany" : "/fileadmin/media/karte/Karte-DE-active.png",
            "United Kingdom" : "/fileadmin/media/karte/Karte-GB-active.png",
            "Sweden" : "/fileadmin/media/karte/Karte-S-active.png",
            "Poland" : "/fileadmin/media/karte/Karte-PL-active.png",
            "Denmark" : "/fileadmin/media/karte/Karte-DK-active.png"
        };

        var originalImage = jQuery("map[name='image-map']").prev().attr("src");
        jQuery("map[name='image-map']").prev().attr("data-original-image", originalImage);
        jQuery("map[name='image-map']").closest(".textwidget").css("background-image", "url('" + originalImage + "')");
        jQuery("map[name='image-map']").find("area").each(function(i, el) {
            jQuery(el).on("mouseenter", function() {
                jQuery("map[name='image-map']").prev().attr("src", overlayImages[jQuery(el).attr("class")]);
            }).on("mouseleave", function() {
                jQuery("map[name='image-map']").prev().attr("src", originalImage);
            });
        });
    }

    $("a.Germany").click(function(){
      if(!$('a.Germany + .content-block').hasClass("active") ) {
        $('a.Germany + .content-block').addClass("active");
        $('a.Germany').addClass("active");
        $('a.United.Kingdom + .content-block').removeClass("active");
        $('a.United.Kingdom').removeClass("active");
        $('a.Sweden + .content-block').removeClass("active");
        $('a.Sweden').removeClass("active");
        $('a.Poland + .content-block').removeClass("active");
        $('a.Poland').removeClass("active");
        $('a.Denmark + .content-block').removeClass("active");
        $('a.Denmark').removeClass("active");
        $('a.Czech.Republic + .content-block').removeClass("active");
        $('a.Czech.Republic').removeClass("active");
      }
      else {
        $('a.Germany + .content-block').removeClass("active");
        $('a.Germany').removeClass("active");
      }
    });
    $("a.United.Kingdom").click(function(){
      if(!$('a.United.Kingdom + .content-block').hasClass("active") ) {
        $('a.United.Kingdom + .content-block').addClass("active");
        $('a.United.Kingdom').addClass("active");
        $('a.Germany + .content-block').removeClass("active");
        $('a.Germany').removeClass("active");
        $('a.Sweden + .content-block').removeClass("active");
        $('a.Sweden').removeClass("active");
        $('a.Poland + .content-block').removeClass("active");
        $('a.Poland').removeClass("active");
        $('a.Denmark + .content-block').removeClass("active");
        $('a.Denmark').removeClass("active");
        $('a.Czech.Republic + .content-block').removeClass("active");
        $('a.Czech.Republic').removeClass("active");
      }
      else {
        $('a.United.Kingdom + .content-block').removeClass("active");
        $('a.United.Kingdom').removeClass("active");
      }
    });
    $("a.Sweden").click(function(){
      if(!$('a.Sweden + .content-block').hasClass("active") ) {
        $('a.Sweden + .content-block').addClass("active");
        $('a.Sweden').addClass("active");
        $('a.United.Kingdom + .content-block').removeClass("active");
        $('a.United.Kingdom').removeClass("active");
        $('a.Germany + .content-block').removeClass("active");
        $('a.Germany').removeClass("active");
        $('a.Poland + .content-block').removeClass("active");
        $('a.Poland').removeClass("active");
        $('a.Denmark + .content-block').removeClass("active");
        $('a.Denmark').removeClass("active");
        $('a.Czech.Republic + .content-block').removeClass("active");
        $('a.Czech.Republic').removeClass("active");
      }
      else {
        $('a.Sweden + .content-block').removeClass("active");
        $('a.Sweden').removeClass("active");
      }
    });
    $("a.Poland").click(function(){
      if(!$('a.Poland + .content-block').hasClass("active") ) {
        $('a.Poland + .content-block').addClass("active");
        $('a.Poland').addClass("active");
        $('a.United.Kingdom + .content-block').removeClass("active");
        $('a.United.Kingdom').removeClass("active");
        $('a.Germany + .content-block').removeClass("active");
        $('a.Germany').removeClass("active");
        $('a.Sweden + .content-block').removeClass("active");
        $('a.Sweden').removeClass("active");
        $('a.Denmark + .content-block').removeClass("active");
        $('a.Denmark').removeClass("active");
        $('a.Czech.Republic + .content-block').removeClass("active");
        $('a.Czech.Republic').removeClass("active");
      }
      else {
        $('a.Poland + .content-block').removeClass("active");
        $('a.Poland').removeClass("active");
      }
    });
    $("a.Denmark").click(function(){
      if(!$('a.Denmark + .content-block').hasClass("active") ) {
        $('a.Denmark + .content-block').addClass("active");
        $('a.Denmark').addClass("active");
        $('a.United.Kingdom + .content-block').removeClass("active");
        $('a.United.Kingdom').removeClass("active");
        $('a.Sweden + .content-block').removeClass("active");
        $('a.Sweden').removeClass("active");
        $('a.Poland + .content-block').removeClass("active");
        $('a.Poland').removeClass("active");
        $('a.Germany + .content-block').removeClass("active");
        $('a.Germany').removeClass("active");
        $('a.Czech.Republic + .content-block').removeClass("active");
        $('a.Czech.Republic').removeClass("active");
      }
      else {
        $('a.Denmark + .content-block').removeClass("active");
        $('a.Denmark').removeClass("active");
      }
    });
    $("a.Czech.Republic").click(function(){
      if(!$('a.Czech.Republic + .content-block').hasClass("active") ) {
        $('a.Czech.Republic + .content-block').addClass("active");
        $('a.Czech.Republic').addClass("active");
        $('a.United.Kingdom + .content-block').removeClass("active");
        $('a.United.Kingdom').removeClass("active");
        $('a.Sweden + .content-block').removeClass("active");
        $('a.Sweden').removeClass("active");
        $('a.Poland + .content-block').removeClass("active");
        $('a.Poland').removeClass("active");
        $('a.Germany + .content-block').removeClass("active");
        $('a.Germany').removeClass("active");
        $('a.Denmark + .content-block').removeClass("active");
        $('a.Denmark').removeClass("active");
      }
      else {
        $('a.Czech.Republic + .content-block').removeClass("active");
        $('a.Czech.Republic').removeClass("active");
      }
    });
});


			// decrypt helper function
		function decryptCharcode(n,start,end,offset) {
			n = n + offset;
			if (offset > 0 && n > end) {
				n = start + (n - end - 1);
			} else if (offset < 0 && n < start) {
				n = end - (start - n - 1);
			}
			return String.fromCharCode(n);
		}
			// decrypt string
		function decryptString(enc,offset) {
			var dec = "";
			var len = enc.length;
			for(var i=0; i < len; i++) {
				var n = enc.charCodeAt(i);
				if (n >= 0x2B && n <= 0x3A) {
					dec += decryptCharcode(n,0x2B,0x3A,offset);	// 0-9 . , - + / :
				} else if (n >= 0x40 && n <= 0x5A) {
					dec += decryptCharcode(n,0x40,0x5A,offset);	// A-Z @
				} else if (n >= 0x61 && n <= 0x7A) {
					dec += decryptCharcode(n,0x61,0x7A,offset);	// a-z
				} else {
					dec += enc.charAt(i);
				}
			}
			return dec;
		}
			// decrypt spam-protected emails
		function linkTo_UnCryptMailto(s) {
			location.href = decryptString(s,-1);
		}
		