// remote scripting library var sajax_debug_mode = false; var sajax_request_type = "POST"; var sajax_target_id = ""; var sajax_failure_redirect = ""; function sajax_debug(text) { if (sajax_debug_mode) alert(text); } function sajax_init_object() { sajax_debug("sajax_init_object() called..") var A; var msxmlhttp = new Array( 'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'); for (var i = 0; i < msxmlhttp.length; i++) { try { A = new ActiveXObject(msxmlhttp[i]); } catch (e) { A = null; } } if(!A && typeof XMLHttpRequest != "undefined") A = new XMLHttpRequest(); if (!A) sajax_debug("Could not create connection object."); return A; } var sajax_requests = new Array(); function sajax_cancel() { for (var i = 0; i < sajax_requests.length; i++) sajax_requests[i].abort(); } function sajax_do_call(func_name, args) { var i, x, n; var uri; var post_data; var target_id; sajax_debug("in sajax_do_call().." + sajax_request_type + "/" + sajax_target_id); target_id = sajax_target_id; if (typeof(sajax_request_type) == "undefined" || sajax_request_type == "") sajax_request_type = "GET"; uri = "/store/squirrelcart/js/storefront.js.php?no_comments=1&tct=447497001731515136"; if (sajax_request_type == "GET") { if (uri.indexOf("?") == -1) uri += "?rs=" + escape(func_name); else uri += "&rs=" + escape(func_name); uri += "&rst=" + escape(sajax_target_id); uri += "&rsrnd=" + new Date().getTime(); for (i = 0; i < args.length-1; i++) uri += "&rsargs[]=" + escape(args[i]); post_data = null; } else if (sajax_request_type == "POST") { post_data = "rs=" + escape(func_name); post_data += "&rst=" + escape(sajax_target_id); post_data += "&rsrnd=" + new Date().getTime(); for (i = 0; i < args.length-1; i++) post_data = post_data + "&rsargs[]=" + escape(args[i]); } else { alert("Illegal request type: " + sajax_request_type); } x = sajax_init_object(); if (x == null) { if (sajax_failure_redirect != "") { location.href = sajax_failure_redirect; return false; } else { sajax_debug("NULL sajax object for user agent:\n" + navigator.userAgent); return false; } } else { x.open(sajax_request_type, uri, true); sajax_requests[sajax_requests.length] = x; if (sajax_request_type == "POST") { x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1"); x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); } x.onreadystatechange = function() { if (x.readyState != 4) return; sajax_debug("received " + x.responseText); var status; var data; var txt = x.responseText.replace(/^\s*|\s*$/g,""); status = txt.charAt(0); data = txt.substring(2); if (status == "") { } else if (status == "-") alert("Error: " + data); else { if (target_id != "") document.getElementById(target_id).innerHTML = eval(data); else { try { var callback; var extra_data = false; if (typeof args[args.length-1] == "object") { callback = args[args.length-1].callback; extra_data = args[args.length-1].extra_data; } else { callback = args[args.length-1]; } callback(eval(data), extra_data); } catch (e) { sajax_debug("Caught error " + e + ": Could not eval " + data ); } } } } } sajax_debug(func_name + " uri = " + uri + "/post = " + post_data); x.send(post_data); sajax_debug(func_name + " waiting.."); delete x; return true; } function x_sc_get_discount() { sajax_do_call("sc_get_discount", x_sc_get_discount.arguments); } function x_sc_ship_estimator_get() { sajax_do_call("sc_ship_estimator_get", x_sc_ship_estimator_get.arguments); } !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=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.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(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.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||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[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,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=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=ha(),z=ha(),A=ha(),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=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),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")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=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)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){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 ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(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 ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(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 pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.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.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);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 p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' 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(".#.+[+~]")}),ja(function(a){var b=g.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=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.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===g||a.ownerDocument===v&&t(v,a)?-1:b===g||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,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||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 ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.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},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.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=ga.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=ga.selectors={cacheLength:50,createPseudo:ia,match:X,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(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===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]||ga.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]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.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(ca,da).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=ga.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(Q," ")+" ").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;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(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:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(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:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).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 Z.test(a.nodeName)},input:function(a){return Y.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:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(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]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.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=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[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?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(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=[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(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(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 ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(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 wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(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=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(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=[sa(ta(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 wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.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(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.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(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(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}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(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&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.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=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.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=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.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 m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.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=m._data(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=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(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},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!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&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.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]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(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=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.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+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=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};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.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}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(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+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{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":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.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=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){ return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,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||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.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):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.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 kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),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:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.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.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.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)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(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=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.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)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.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})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},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||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.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=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.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){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},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)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.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 Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(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}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.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?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m}); $.noConflict(); !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var b,c,e;b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e&&this.preloadAutoWidthImages(b)}this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),(null===this.settings||this._breakpoint!==d)&&(this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.$element.is(":visible")?(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized"))):!1:!1},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.coordinates(this.settings.rtl?this.maximum():this.minimum()),c=this.coordinates(this.settings.rtl?this.minimum():this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var d=-1,e=30,f=this.width(),g=this.coordinates();return this.settings.freeDrag||a.each(g,a.proxy(function(a,h){return b>h-e&&h+e>b?d=a:this.op(b,"<",h)&&this.op(b,">",g[a+1]||h-f)&&(d="left"===c?a+1:a),-1===d},this)),this.settings.loop||(this.op(b,">",g[this.minimum()])?d=b=this.minimum():this.op(b,"<",g[this.maximum()])&&(d=b=this.maximum())),d},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(b,c){var e=this._items.length,f=c?0:this._clones.length;return!a.isNumeric(b)||1>e?b=d:(0>b||b>=e+f)&&(b=((b-f/2)%e+e)%e+f/2),b},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c=this.settings,d=this._coordinates.length,e=Math.abs(this._coordinates[d-1])-this._width,f=-1;if(c.loop)d=this._clones.length/2+this._items.length-1;else if(c.autoWidth||c.merge)for(;d-f>1;)Math.abs(this._coordinates[b=d+f>>1])<e?f=b:d=b;else d=c.center?this._items.length-1:this._items.length-c.items;return a&&(d-=this._clones.length/2),Math.max(d,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c=null;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[b-1]||0))/2*(this.settings.rtl?-1:1)):c=this._coordinates[b-1]||0,c)},e.prototype.duration=function(a,b,c){return Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(0>e),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,d=((a-h)%g+g)%g+h,d!==a&&i>=d-e&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.$element.is(":visible")&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.leave("animating"),void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(a.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,d=c.center&&Math.ceil(c.items/2)||c.items,e=c.center&&-1*d||0,f=(b.property&&b.property.value||this._core.current())+e,g=this._core.clones().length,h=a.proxy(function(a,b){this.load(b)},this);e++<d;)this.load(g/2+this._core.relative(f)),g&&a.each(this._core.clones(this._core.relative(f)),h),f++},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c);heights=[],maxheight=0,a.each(d,function(b,c){heights.push(a(c).height())}),maxheight=Math.max.apply(null,heights),this._core.$stage.parent().height(maxheight).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=a.attr("data-vimeo-id")?"vimeo":"youtube",d=a.attr("data-vimeo-id")||a.attr("data-youtube-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else{if(!(d[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");c="vimeo"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="http://img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type&&a.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}))},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='<iframe width="'+g+'" height="'+h+'" src="http://www.youtube.com/embed/'+f.id+"?autoplay=1&v="+f.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===f.type&&(c='<iframe src="http://player.vimeo.com/video/'+f.id+'?autoplay=1" width="'+g+'" height="'+h+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),a('<div class="owl-video-frame">'+c+"</div>").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._paused=!1,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name&&(this._core.settings.autoplay?this.play():this.stop())},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){ this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(d,e){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._interval=b.setInterval(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout))},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearInterval(this._interval),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("<div>").addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;e>a;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):0>b&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;d?a.proxy(this._overrides.to,this._core)(b,c):(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c))},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){return g[b]!==d?(e=c?b:!0,!1):void 0}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document); !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}); String.prototype.contains = undefined; !function(){function t(t,e,i){if(r)for(var s=r.length;s--;){var o=r[s];n.call(t,o)&&e.call(i,o,t[o])}}this.BooTools={version:"1.6.0",build:"529422872adfff401b901b8b6c7ca5114ee95e2b"};var e=this.typeOf=function(t){if(null==t)return"null";if(null!=t.$family)return t.$family();if(t.nodeName){if(1==t.nodeType)return"element";if(3==t.nodeType)return/\S/.test(t.nodeValue)?"textnode":"whitespace"}else if("number"==typeof t.length){if("callee"in t)return"arguments";if("item"in t)return"collection"}return typeof t},n=(this.instanceOf=function(t,e){if(null==t)return!1;for(var n=t.$constructor||t.constructor;n;){if(n===e)return!0;n=n.parent}return!!t.hasOwnProperty&&t instanceof e},Object.prototype.hasOwnProperty),r=!0;for(var i in{toString:1})r=null;r&&(r=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]);var s=this.Function;s.prototype.overloadSetter=function(e){var n=this;return function(r,i){if(null==r)return this;if(e||"string"!=typeof r){for(var s in r)n.call(this,s,r[s]);t(r,n,this)}else n.call(this,r,i);return this}},s.prototype.overloadGetter=function(t){var e=this;return function(n){var r,i;if("string"!=typeof n?r=n:arguments.length>1?r=arguments:t&&(r=[n]),r){i={};for(var s=0;s<r.length;s++)i[r[s]]=e.call(this,r[s])}else i=e.call(this,n);return i}},s.prototype.extend=function(t,e){this[t]=e}.overloadSetter(),s.prototype.implement=function(t,e){this.prototype[t]=e}.overloadSetter();var o=Array.prototype.slice;Array.convert=function(t){return null==t?[]:a.isEnumerable(t)&&"string"!=typeof t?"array"==e(t)?t:o.call(t):[t]},s.convert=function(t){return"function"==e(t)?t:function(){return t}},Number.convert=function(t){var e=parseFloat(t);return isFinite(e)?e:null},String.convert=function(t){return t+""},s.from=s.convert,Number.from=Number.convert,String.from=String.convert,s.implement({hide:function(){return this.$hidden=!0,this},protect:function(){return this.$protected=!0,this}});var a=this.Type=function(t,n){if(t){var r=t.toLowerCase(),i=function(t){return e(t)==r};a["is"+t]=i,null!=n&&(n.prototype.$family=function(){return r}.hide())}return null==n?null:(n.extend(this),n.$constructor=a,n.prototype.$constructor=n,n)},u=Object.prototype.toString;a.isEnumerable=function(t){return null!=t&&"number"==typeof t.length&&"[object Function]"!=u.call(t)};var c={},l=function(t){var n=e(t.prototype);return c[n]||(c[n]=[])},h=function(t,n){if(!n||!n.$hidden){for(var r=l(this),i=0;i<r.length;i++){var s=r[i];"type"==e(s)?h.call(s,t,n):s.call(this,t,n)}var a=this.prototype[t];null!=a&&a.$protected||(this.prototype[t]=n),null==this[t]&&"function"==e(n)&&f.call(this,t,function(t){return n.apply(t,o.call(arguments,1))})}},f=function(t,e){if(!e||!e.$hidden){var n=this[t];null!=n&&n.$protected||(this[t]=e)}};a.implement({implement:h.overloadSetter(),extend:f.overloadSetter(),alias:function(t,e){h.call(this,t,this.prototype[e])}.overloadSetter(),mirror:function(t){return l(this).push(t),this}}),new a("Type",a);var p=function(t,e,n){var r=e!=Object,i=e.prototype;r&&(e=new a(t,e));for(var s=0,o=n.length;s<o;s++){var u=n[s],c=e[u],l=i[u];c&&c.protect(),r&&l&&e.implement(u,l.protect())}if(r){var h=i.propertyIsEnumerable(n[0]);e.forEachMethod=function(t){if(!h)for(var e=0,r=n.length;e<r;e++)t.call(i,i[n[e]],n[e]);for(var s in i)t.call(i,i[s],s)}}return p};p("String",String,["charAt","charCodeAt","concat","contains","indexOf","lastIndexOf","match","quote","replace","search","slice","split","substr","substring","trim","toLowerCase","toUpperCase"])("Array",Array,["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice","indexOf","lastIndexOf","filter","forEach","every","map","some","reduce","reduceRight","contains"])("Number",Number,["toExponential","toFixed","toLocaleString","toPrecision"])("Function",s,["apply","call","bind"])("RegExp",RegExp,["exec","test"])("Object",Object,["create","defineProperty","defineProperties","keys","getPrototypeOf","getOwnPropertyDescriptor","getOwnPropertyNames","preventExtensions","isExtensible","seal","isSealed","freeze","isFrozen"])("Date",Date,["now"]),Object.extend=f.overloadSetter(),Date.extend("now",function(){return+new Date}),new a("Boolean",Boolean),Number.prototype.$family=function(){return isFinite(this)?"number":"null"}.hide(),Number.extend("random",function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}),Array.implement({forEach:function(t,e){for(var n=0,r=this.length;n<r;n++)n in this&&t.call(e,this[n],n,this)},each:function(t,e){return Array.forEach(this,t,e),this}}),Object.extend({keys:function(e){var r=[];for(var i in e)n.call(e,i)&&r.push(i);return t(e,function(t){r.push(t)}),r},forEach:function(t,e,n){Object.keys(t).forEach(function(r){e.call(n,t[r],r,t)})}}),Object.each=Object.forEach;var d=function(t){switch(e(t)){case"array":return t.clone();case"object":return Object.clone(t);default:return t}};Array.implement("clone",function(){for(var t=this.length,e=new Array(t);t--;)e[t]=d(this[t]);return e});var m=function(t,n,r){switch(e(r)){case"object":"object"==e(t[n])?Object.merge(t[n],r):t[n]=Object.clone(r);break;case"array":t[n]=r.clone();break;default:t[n]=r}return t};Object.extend({merge:function(t,n,r){if("string"==e(n))return m(t,n,r);for(var i=1,s=arguments.length;i<s;i++){var o=arguments[i];for(var a in o)m(t,a,o[a])}return t},clone:function(t){var e={};for(var n in t)e[n]=d(t[n]);return e},append:function(t){for(var e=1,n=arguments.length;e<n;e++){var r=arguments[e]||{};for(var i in r)t[i]=r[i]}return t}}),["Object","WhiteSpace","TextNode","Collection","Arguments"].each(function(t){new a(t)});var v=Date.now();String.extend("uniqueID",function(){return(v++).toString(36)})}(),Array.implement({every:function(t,e){for(var n=0,r=this.length>>>0;n<r;n++)if(n in this&&!t.call(e,this[n],n,this))return!1;return!0},filter:function(t,e){for(var n,r=[],i=0,s=this.length>>>0;i<s;i++)i in this&&(n=this[i],t.call(e,n,i,this)&&r.push(n));return r},indexOf:function(t,e){for(var n=this.length>>>0,r=e<0?Math.max(0,n+e):e||0;r<n;r++)if(this[r]===t)return r;return-1},map:function(t,e){for(var n=this.length>>>0,r=Array(n),i=0;i<n;i++)i in this&&(r[i]=t.call(e,this[i],i,this));return r},some:function(t,e){for(var n=0,r=this.length>>>0;n<r;n++)if(n in this&&t.call(e,this[n],n,this))return!0;return!1},clean:function(){return this.filter(function(t){return null!=t})},invoke:function(t){var e=Array.slice(arguments,1);return this.map(function(n){return n[t].apply(n,e)})},associate:function(t){for(var e={},n=Math.min(this.length,t.length),r=0;r<n;r++)e[t[r]]=this[r];return e},link:function(t){for(var e={},n=0,r=this.length;n<r;n++)for(var i in t)if(t[i](this[n])){e[i]=this[n],delete t[i];break}return e},contains:function(t,e){return-1!=this.indexOf(t,e)},append:function(t){return this.push.apply(this,t),this},getLast:function(){return this.length?this[this.length-1]:null},getRandom:function(){return this.length?this[Number.random(0,this.length-1)]:null},include:function(t){return this.contains(t)||this.push(t),this},combine:function(t){for(var e=0,n=t.length;e<n;e++)this.include(t[e]);return this},erase:function(t){for(var e=this.length;e--;)this[e]===t&&this.splice(e,1);return this},empty:function(){return this.length=0,this},flatten:function(){for(var t=[],e=0,n=this.length;e<n;e++){var r=typeOf(this[e]);"null"!=r&&(t=t.concat("array"==r||"collection"==r||"arguments"==r||instanceOf(this[e],Array)?Array.flatten(this[e]):this[e]))}return t},pick:function(){for(var t=0,e=this.length;t<e;t++)if(null!=this[t])return this[t];return null},hexToRgb:function(t){if(3!=this.length)return null;var e=this.map(function(t){return 1==t.length&&(t+=t),parseInt(t,16)});return t?e:"rgb("+e+")"},rgbToHex:function(t){if(this.length<3)return null;if(4==this.length&&0==this[3]&&!t)return"transparent";for(var e=[],n=0;n<3;n++){var r=(this[n]-0).toString(16);e.push(1==r.length?"0"+r:r)}return t?e:"#"+e.join("")}}),Function.extend({attempt:function(){for(var t=0,e=arguments.length;t<e;t++)try{return arguments[t]()}catch(t){}return null}}),Function.implement({attempt:function(t,e){try{return this.apply(e,Array.convert(t))}catch(t){}return null},bind:function(t){var e=this,n=arguments.length>1?Array.slice(arguments,1):null,r=function(){},i=function(){var s=t,o=arguments.length;this instanceof i&&(r.prototype=e.prototype,s=new r);var a=n||o?e.apply(s,n&&o?n.concat(Array.slice(arguments)):n||arguments):e.call(s);return s==t?a:s};return i},pass:function(t,e){var n=this;return null!=t&&(t=Array.convert(t)),function(){return n.apply(e,t||arguments)}},delay:function(t,e,n){return setTimeout(this.pass(null==n?[]:n,e),t)},periodical:function(t,e,n){return setInterval(this.pass(null==n?[]:n,e),t)}}),Number.implement({limit:function(t,e){return Math.min(e,Math.max(t,this))},round:function(t){return t=Math.pow(10,t||0).toFixed(t<0?-t:0),Math.round(this*t)/t},times:function(t,e){for(var n=0;n<this;n++)t.call(e,n,this)},toFloat:function(){return parseFloat(this)},toInt:function(t){return parseInt(this,t||10)}}),Number.alias("each","times"),function(t){var e={};t.each(function(t){Number[t]||(e[t]=function(){return Math[t].apply(null,[this].concat(Array.convert(arguments)))})}),Number.implement(e)}(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]),String.implement({contains:function(t,e){return(e?String(this).slice(e):String(this)).indexOf(t)>-1},test:function(t,e){return("regexp"==typeOf(t)?t:new RegExp(""+t,e)).test(this)},trim:function(){return String(this).replace(/^\s+|\s+$/g,"")},clean:function(){return String(this).replace(/\s+/g," ").trim()},camelCase:function(){return String(this).replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()})},hyphenate:function(){return String(this).replace(/[A-Z]/g,function(t){return"-"+t.charAt(0).toLowerCase()})},capitalize:function(){return String(this).replace(/\b[a-z]/g,function(t){return t.toUpperCase()})},escapeRegExp:function(){return String(this).replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},toInt:function(t){return parseInt(this,t||10)},toFloat:function(){return parseFloat(this)},hexToRgb:function(t){var e=String(this).match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return e?e.slice(1).hexToRgb(t):null},rgbToHex:function(t){var e=String(this).match(/\d{1,3}/g);return e?e.rgbToHex(t):null},substitute:function(t,e){return String(this).replace(e||/\\?\{([^{}]+)\}/g,function(e,n){return"\\"==e.charAt(0)?e.slice(1):null!=t[n]?t[n]:""})}}),function(){var t=this.document,e=t.window=this,n=function(t,e){t=t.toLowerCase(),e=e?e.toLowerCase():"";var n=t.match(/(edge)[\s\/:]([\w\d\.]+)/);return n||(n=t.match(/(opera|ie|firefox|chrome|trident|crios|version)[\s\/:]([\w\d\.]+)?.*?(safari|(?:rv[\s\/:]|version[\s\/:])([\w\d\.]+)|$)/)||[null,"unknown",0]),"trident"==n[1]?(n[1]="ie",n[4]&&(n[2]=n[4])):"crios"==n[1]&&(n[1]="chrome"),e=t.match(/ip(?:ad|od|hone)/)?"ios":(t.match(/(?:webos|android)/)||t.match(/mac|win|linux/)||["other"])[0],"win"==e&&(e="windows"),{extend:Function.prototype.extend,name:"version"==n[1]?n[3]:n[1],version:parseFloat("opera"==n[1]&&n[4]?n[4]:n[2]),platform:e}},r=this.Browser=n(navigator.userAgent,navigator.platform);if("ie"==r.name&&t.documentMode&&(r.version=t.documentMode),r.extend({Features:{xpath:!!t.evaluate,air:!!e.runtime,query:!!t.querySelector,json:!!e.JSON},parseUA:n}),r.Request=function(){var t=function(){return new XMLHttpRequest},e=function(){return new ActiveXObject("MSXML2.XMLHTTP")},n=function(){return new ActiveXObject("Microsoft.XMLHTTP")};return Function.attempt(function(){return t(),t},function(){return e(),e},function(){return n(),n})}(),r.Features.xhr=!!r.Request,r.exec=function(n){if(!n)return n;if(e.execScript)e.execScript(n);else{var r=t.createElement("script");r.setAttribute("type","text/javascript"),r.text=n,t.head.appendChild(r),t.head.removeChild(r)}return n},String.implement("stripScripts",function(t){var e="",n=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(t,n){return e+=n+"\n",""});return!0===t?r.exec(e):"function"==typeOf(t)&&t(e,n),n}),r.extend({Document:this.Document,Window:this.Window,Element:this.Element,Event:this.Event}),this.Window=this.$constructor=new Type("Window",function(){}),this.$family=Function.convert("window").hide(),Window.mirror(function(t,n){e[t]=n}),this.Document=t.$constructor=new Type("Document",function(){}),t.$family=Function.convert("document").hide(),Document.mirror(function(e,n){t[e]=n}),t.html=t.documentElement,t.head||(t.head=t.getElementsByTagName("head")[0]),t.execCommand)try{t.execCommand("BackgroundImageCache",!1,!0)}catch(t){}if(this.attachEvent&&!this.addEventListener){var i=function(){this.detachEvent("onunload",i),t.head=t.html=t.window=null,e=this.Window=t=null};this.attachEvent("onunload",i)}var s=Array.convert;try{s(t.html.childNodes)}catch(t){Array.convert=function(t){if("string"!=typeof t&&Type.isEnumerable(t)&&"array"!=typeOf(t)){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}return s(t)};var o=Array.prototype,a=o.slice;["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice"].each(function(t){var e=o[t];Array[t]=function(t){return e.apply(Array.convert(t),a.call(arguments,1))}})}}(),function(){var t=this.Class=new Type("Class",function(r){instanceOf(r,Function)&&(r={initialize:r});var i=function(){if(n(this),i.$prototyping)return this;this.$caller=null,this.$family=null;var t=this.initialize?this.initialize.apply(this,arguments):this;return this.$caller=this.caller=null,t}.extend(this).implement(r);return i.$constructor=t,i.prototype.$constructor=i,i.prototype.parent=e,i}),e=function(){if(!this.$caller)throw new Error('The method "parent" cannot be called.');var t=this.$caller.$name,e=this.$caller.$owner.parent,n=e?e.prototype[t]:null;if(!n)throw new Error('The method "'+t+'" has no parent.');return n.apply(this,arguments)},n=function(t){for(var e in t){var r=t[e];switch(typeOf(r)){case"object":var i=function(){};i.prototype=r,t[e]=n(new i);break;case"array":t[e]=r.clone()}}return t},r=function(t,e,n){n.$origin&&(n=n.$origin);var r=function(){if(n.$protected&&null==this.$caller)throw new Error('The method "'+e+'" cannot be called.');var t=this.caller,i=this.$caller;this.caller=i,this.$caller=r;var s=n.apply(this,arguments);return this.$caller=i,this.caller=t,s}.extend({$owner:t,$origin:n,$name:e});return r},i=function(e,n,i){if(t.Mutators.hasOwnProperty(e)&&null==(n=t.Mutators[e].call(this,n)))return this;if("function"==typeOf(n)){if(n.$hidden)return this;this.prototype[e]=i?n:r(this,e,n)}else Object.merge(this.prototype,e,n);return this},s=function(t){t.$prototyping=!0;var e=new t;return delete t.$prototyping,e};t.implement("implement",i.overloadSetter()),t.Mutators={Extends:function(t){this.parent=t,this.prototype=s(t)},Implements:function(t){Array.convert(t).each(function(t){var e=new t;for(var n in e)i.call(this,n,e[n],!0)},this)}}}(),function(){this.Chain=new Class({$chain:[],chain:function(){return this.$chain.append(Array.flatten(arguments)),this},callChain:function(){return!!this.$chain.length&&this.$chain.shift().apply(this,arguments)},clearChain:function(){return this.$chain.empty(),this}});var t=function(t){return t.replace(/^on([A-Z])/,function(t,e){return e.toLowerCase()})};this.Events=new Class({$events:{},addEvent:function(e,n,r){return e=t(e),this.$events[e]=(this.$events[e]||[]).include(n),r&&(n.internal=!0),this},addEvents:function(t){for(var e in t)this.addEvent(e,t[e]);return this},fireEvent:function(e,n,r){e=t(e);var i=this.$events[e];return i?(n=Array.convert(n),i.each(function(t){r?t.delay(r,this,n):t.apply(this,n)},this),this):this},removeEvent:function(e,n){e=t(e);var r=this.$events[e];if(r&&!n.internal){var i=r.indexOf(n);-1!=i&&delete r[i]}return this},removeEvents:function(e){var n;if("object"==typeOf(e)){for(n in e)this.removeEvent(n,e[n]);return this}e&&(e=t(e));for(n in this.$events)if(!e||e==n)for(var r=this.$events[n],i=r.length;i--;)i in r&&this.removeEvent(n,r[i]);return this}}),this.Options=new Class({setOptions:function(){var t=this.options=Object.merge.apply(null,[{},this.options].append(arguments));if(this.addEvent)for(var e in t)"function"==typeOf(t[e])&&/^on[A-Z]/.test(e)&&(this.addEvent(e,t[e]),delete t[e]);return this}})}(),function(){function t(r,i){if(r.$thenableState===o)if(r===i)n(r,new TypeError("Tried to resolve a thenable with itself."));else if(!i||"object"!=typeof i&&"function"!=typeof i)e(r,i);else{var s;try{s=i.then}catch(t){n(r,t)}if("function"==typeof s){var a=!1;l(function(){try{s.call(i,function(e){a||(a=!0,t(r,e))},function(t){a||(a=!0,n(r,t))})}catch(t){a||(a=!0,n(r,t))}})}else e(r,i)}}function e(t,e){t.$thenableState===o&&(t.$thenableResult=e,t.$thenableState=a,i(t))}function n(t,e){t.$thenableState===o&&(t.$thenableResult=e,t.$thenableState=u,i(t))}function r(t){t.$thenableState!==o&&(t.$thenableResult=null,t.$thenableState=o)}function i(t){var e,n=t.$thenableState,r=t.$thenableResult,i=t.$thenableReactions;n===a?(t.$thenableReactions=[],e="fulfillHandler"):n==u&&(t.$thenableReactions=[],e="rejectHandler"),e&&l(s.pass([r,i,e]))}function s(e,r,i){for(var s=0,o=r.length;s<o;++s){var a=r[s],u=a[i];if("Identity"===u)t(a.thenable,e);else if("Thrower"===u)n(a.thenable,e);else try{t(a.thenable,u(e))}catch(t){n(a.thenable,t)}}}var o=0,a=1,u=2,c=Class.Thenable=new Class({$thenableState:o,$thenableResult:null,$thenableReactions:[],resolve:function(e){return t(this,e),this},reject:function(t){return n(this,t),this},getThenableState:function(){switch(this.$thenableState){case o:return"pending";case a:return"fulfilled";case u:return"rejected"}},resetThenable:function(t){return n(this,t),r(this),this},then:function(t,e){"function"!=typeof t&&(t="Identity"),"function"!=typeof e&&(e="Thrower");var n=new c;return this.$thenableReactions.push({thenable:n,fulfillHandler:t,rejectHandler:e}),this.$thenableState!==o&&i(this),n},catch:function(t){return this.then(null,t)}});c.extend({resolve:function(e){var n;return e instanceof c?n=e:(n=new c,t(n,e)),n},reject:function(t){var e=new c;return n(e,t),e}});var l;l="undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick:"undefined"!=typeof setImmediate?setImmediate:function(t){setTimeout(t,0)}}(),function(){Object.extend({subset:function(t,e){for(var n={},r=0,i=e.length;r<i;r++){var s=e[r];s in t&&(n[s]=t[s])}return n},map:function(t,e,n){for(var r={},i=Object.keys(t),s=0;s<i.length;s++){var o=i[s];r[o]=e.call(n,t[o],o,t)}return r},filter:function(t,e,n){for(var r={},i=Object.keys(t),s=0;s<i.length;s++){var o=i[s],a=t[o];e.call(n,a,o,t)&&(r[o]=a)}return r},every:function(t,e,n){for(var r=Object.keys(t),i=0;i<r.length;i++){var s=r[i];if(!e.call(n,t[s],s))return!1}return!0},some:function(t,e,n){for(var r=Object.keys(t),i=0;i<r.length;i++){var s=r[i];if(e.call(n,t[s],s))return!0}return!1},values:function(t){for(var e=[],n=Object.keys(t),r=0;r<n.length;r++){var i=n[r];e.push(t[i])}return e},getLength:function(t){return Object.keys(t).length},keyOf:function(t,e){for(var n=Object.keys(t),r=0;r<n.length;r++){var i=n[r];if(t[i]===e)return i}return null},contains:function(t,e){return null!=Object.keyOf(t,e)},toQueryString:function(t,e){var n=[];return Object.each(t,function(t,r){e&&(r=e+"["+r+"]");var i;switch(typeOf(t)){case"object":i=Object.toQueryString(t,r);break;case"array":var s={};t.each(function(t,e){s[e]=t}),i=Object.toQueryString(s,r);break;default:i=r+"="+encodeURIComponent(t)}null!=t&&n.push(i)}),n.join("&")}})}(),function(){function t(t,s,o,u,l,f,p,d,m,v,g,y,b,x,E,S){if((s||-1===n)&&(e.expressions[++n]=[],r=-1,s))return"";if(o||u||-1===r){o=o||" ";var w=e.expressions[n];i&&w[r]&&(w[r].reverseCombinator=c(o)),w[++r]={combinator:o,tag:"*"}}var k=e.expressions[n][r];if(l)k.tag=l.replace(a,"");else if(f)k.id=f.replace(a,"");else if(p)p=p.replace(a,""),k.classList||(k.classList=[]),k.classes||(k.classes=[]),k.classList.push(p),k.classes.push({value:p,regexp:new RegExp("(^|\\s)"+h(p)+"(\\s|$)")});else if(b)S=S||E,S=S?S.replace(a,""):null,k.pseudos||(k.pseudos=[]),k.pseudos.push({key:b.replace(a,""),value:S,type:1==y.length?"class":"element"});else if(d){d=d.replace(a,""),g=(g||"").replace(a,"");var T,C;switch(m){case"^=":C=new RegExp("^"+h(g));break;case"$=":C=new RegExp(h(g)+"$");break;case"~=":C=new RegExp("(^|\\s)"+h(g)+"(\\s|$)");break;case"|=":C=new RegExp("^"+h(g)+"(-|$)");break;case"=":T=function(t){return g==t};break;case"*=":T=function(t){return t&&t.indexOf(g)>-1};break;case"!=":T=function(t){return g!=t};break;default:T=function(t){return!!t}}""==g&&/^[*$^]=$/.test(m)&&(T=function(){return!1}),T||(T=function(t){return t&&C.test(t)}),k.attributes||(k.attributes=[]),k.attributes.push({key:d,operator:m,value:g,test:T})}return""}var e,n,r,i,s={},o={},a=/\\/g,u=function(r,a){if(null==r)return null;if(!0===r.Slick)return r;r=(""+r).replace(/^\s+|\s+$/g,""),i=!!a;var c=i?o:s;if(c[r])return c[r];for(e={Slick:!0,expressions:[],raw:r,reverse:function(){return u(this.raw,!0)}},n=-1;r!=(r=r.replace(f,t)););return e.length=e.expressions.length,c[e.raw]=i?l(e):e},c=function(t){return"!"===t?" ":" "===t?"!":/^!/.test(t)?t.replace(/^!/,""):"!"+t},l=function(t){for(var e=t.expressions,n=0;n<e.length;n++){for(var r=e[n],i={parts:[],tag:"*",combinator:c(r[0].combinator)},s=0;s<r.length;s++){var o=r[s];o.reverseCombinator||(o.reverseCombinator=" "),o.combinator=o.reverseCombinator,delete o.reverseCombinator}r.reverse().push(i)}return t},h=function(t){return t.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,function(t){return"\\"+t})},f=new RegExp("^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(/<combinator>/,"["+h(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),p=this.Slick||{};p.parse=function(t){return u(t)},p.escapeRegExp=h,this.Slick||(this.Slick=p)}.apply("undefined"!=typeof exports?exports:this),function(){var t={},e={},n=Object.prototype.toString;t.isNativeCode=function(t){return/\{\s*\[native code\]\s*\}/.test(""+t)},t.isXML=function(t){return!!t.xmlVersion||!!t.xml||"[object XMLDocument]"==n.call(t)||9==t.nodeType&&"HTML"!=t.documentElement.nodeName},t.setDocument=function(t){var n=t.nodeType;if(9==n);else if(n)t=t.ownerDocument;else{if(!t.navigator)return;t=t.document}if(this.document!==t){this.document=t;var r,i=t.documentElement,s=this.getUIDXML(i),o=e[s];if(o)for(r in o)this[r]=o[r];else{o=e[s]={},o.root=i,o.isXMLDocument=this.isXML(t),o.brokenStarGEBTN=o.starSelectsClosedQSA=o.idGetsName=o.brokenMixedCaseQSA=o.brokenGEBCN=o.brokenCheckedQSA=o.brokenEmptyAttributeQSA=o.isHTMLDocument=o.nativeMatchesSelector=!1;var a,u,c,l,h,f,p="slick_uniqueid",d=t.createElement("div"),m=t.body||t.getElementsByTagName("body")[0]||i;m.appendChild(d);try{d.innerHTML='<a id="'+p+'"></a>',o.isHTMLDocument=!!t.getElementById(p)}catch(t){}if(o.isHTMLDocument){d.style.display="none",d.appendChild(t.createComment("")),u=d.getElementsByTagName("*").length>1;try{d.innerHTML="foo</foo>",f=d.getElementsByTagName("*"),a=f&&!!f.length&&"/"==f[0].nodeName.charAt(0)}catch(t){}o.brokenStarGEBTN=u||a;try{d.innerHTML='<a name="'+p+'"></a><b id="'+p+'"></b>',o.idGetsName=t.getElementById(p)===d.firstChild}catch(t){}if(d.getElementsByClassName){try{d.innerHTML='<a class="f"></a><a class="b"></a>',d.getElementsByClassName("b").length,d.firstChild.className="b",l=2!=d.getElementsByClassName("b").length}catch(t){}try{d.innerHTML='<a class="a"></a><a class="f b a"></a>',c=2!=d.getElementsByClassName("a").length}catch(t){}o.brokenGEBCN=l||c}if(d.querySelectorAll){try{d.innerHTML="foo</foo>",f=d.querySelectorAll("*"),o.starSelectsClosedQSA=f&&!!f.length&&"/"==f[0].nodeName.charAt(0)}catch(t){}try{d.innerHTML='<a class="MiX"></a>',o.brokenMixedCaseQSA=!d.querySelectorAll(".MiX").length}catch(t){}try{d.innerHTML='<select><option selected="selected">a</option></select>',o.brokenCheckedQSA=0==d.querySelectorAll(":checked").length}catch(t){}try{d.innerHTML='<a class=""></a>',o.brokenEmptyAttributeQSA=0!=d.querySelectorAll('[class*=""]').length}catch(t){}}try{d.innerHTML='<form action="s"><input id="action"/></form>',h="s"!=d.firstChild.getAttribute("action")}catch(t){}if(o.nativeMatchesSelector=i.matches||i.mozMatchesSelector||i.webkitMatchesSelector,o.nativeMatchesSelector)try{o.nativeMatchesSelector.call(i,":slick"),o.nativeMatchesSelector=null}catch(t){}}try{i.slick_expando=1,delete i.slick_expando,o.getUID=this.getUIDHTML}catch(t){o.getUID=this.getUIDXML}m.removeChild(d),d=f=m=null,o.getAttribute=o.isHTMLDocument&&h?function(t,e){var n=this.attributeGetters[e];if(n)return n.call(t);var r=t.getAttributeNode(e);return r?r.nodeValue:null}:function(t,e){var n=this.attributeGetters[e];return n?n.call(t):t.getAttribute(e)},o.hasAttribute=i&&this.isNativeCode(i.hasAttribute)?function(t,e){return t.hasAttribute(e)}:function(t,e){return!(!(t=t.getAttributeNode(e))||!t.specified&&!t.nodeValue)};var v=i&&this.isNativeCode(i.contains),g=t&&this.isNativeCode(t.contains);o.contains=v&&g?function(t,e){return t.contains(e)}:v&&!g?function(e,n){return e===n||(e===t?t.documentElement:e).contains(n)}:i&&i.compareDocumentPosition?function(t,e){return t===e||!!(16&t.compareDocumentPosition(e))}:function(t,e){if(e)do{if(e===t)return!0}while(e=e.parentNode);return!1},o.documentSorter=i.compareDocumentPosition?function(t,e){return t.compareDocumentPosition&&e.compareDocumentPosition?4&t.compareDocumentPosition(e)?-1:t===e?0:1:0}:"sourceIndex"in i?function(t,e){return t.sourceIndex&&e.sourceIndex?t.sourceIndex-e.sourceIndex:0}:t.createRange?function(t,e){if(!t.ownerDocument||!e.ownerDocument)return 0;var n=t.ownerDocument.createRange(),r=e.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,0),r.setStart(e,0),r.setEnd(e,0),n.compareBoundaryPoints(Range.START_TO_END,r)}:null,i=null;for(r in o)this[r]=o[r]}}};var r=/^([#.]?)((?:[\w-]+|\*))$/,i=/\[.+[*$^]=(?:""|'')?\]/,s={};t.search=function(t,e,n,o){var a=this.found=o?null:n||[];if(!t)return a;if(t.navigator)t=t.document;else if(!t.nodeType)return a;var u,c,l,f,p=this.uniques={},d=!(!n||!n.length),m=9==t.nodeType;if(this.document!==(m?t:t.ownerDocument)&&this.setDocument(t),d)for(c=a.length;c--;)p[this.getUID(a[c])]=!0;if("string"==typeof e){var v=e.match(r);t:if(v){var g=v[1],y=v[2];if(g){if("#"==g){if(!this.isHTMLDocument||!m)break t;if(!(l=t.getElementById(y)))return a;if(this.idGetsName&&l.getAttributeNode("id").nodeValue!=y)break t;if(o)return l||null;d&&p[this.getUID(l)]||a.push(l)}else if("."==g){if(!this.isHTMLDocument||(!t.getElementsByClassName||this.brokenGEBCN)&&t.querySelectorAll)break t;if(t.getElementsByClassName&&!this.brokenGEBCN){if(f=t.getElementsByClassName(y),o)return f[0]||null;for(c=0;l=f[c++];)d&&p[this.getUID(l)]||a.push(l)}else{var b=new RegExp("(^|\\s)"+h.escapeRegExp(y)+"(\\s|$)");for(f=t.getElementsByTagName("*"),c=0;l=f[c++];)if(className=l.className,className&&b.test(className)){if(o)return l;d&&p[this.getUID(l)]||a.push(l)}}}}else{if("*"==y&&this.brokenStarGEBTN)break t;if(f=t.getElementsByTagName(y),o)return f[0]||null;for(c=0;l=f[c++];)d&&p[this.getUID(l)]||a.push(l)}return d&&this.sort(a),o?null:a}t:if(t.querySelectorAll){if(!this.isHTMLDocument||s[e]||this.brokenMixedCaseQSA||this.brokenCheckedQSA&&e.indexOf(":checked")>-1||this.brokenEmptyAttributeQSA&&i.test(e)||!m&&e.indexOf(",")>-1||h.disableQSA)break t;var x,E=e,S=t;m||(x=S.getAttribute("id"),slickid="slickid__",S.setAttribute("id",slickid),E="#"+slickid+" "+E,t=S.parentNode);try{if(o)return t.querySelector(E)||null;f=t.querySelectorAll(E)}catch(t){s[e]=1;break t}finally{m||(x?S.setAttribute("id",x):S.removeAttribute("id"),t=S)}if(this.starSelectsClosedQSA)for(c=0;l=f[c++];)!(l.nodeName>"@")||d&&p[this.getUID(l)]||a.push(l);else for(c=0;l=f[c++];)d&&p[this.getUID(l)]||a.push(l);return d&&this.sort(a),a}if(u=this.Slick.parse(e),!u.length)return a}else{if(null==e)return a;if(!e.Slick)return this.contains(t.documentElement||t,e)?(a?a.push(e):a=e,a):a;u=e}this.posNTH={},this.posNTHLast={},this.posNTHType={},this.posNTHTypeLast={},this.push=!d&&(o||1==u.length&&1==u.expressions[0].length)?this.pushArray:this.pushUID,null==a&&(a=[]);var w,k,T,C,N,O,A,L,M,$,j,D,P,H,F=u.expressions;t:for(c=0;D=F[c];c++)for(w=0;P=D[w];w++){if(C="combinator:"+P.combinator,!this[C])continue t;if(N=this.isXMLDocument?P.tag:P.tag.toUpperCase(),O=P.id,A=P.classList,L=P.classes,M=P.attributes,$=P.pseudos,H=w===D.length-1,this.bitUniques={},H?(this.uniques=p,this.found=a):(this.uniques={},this.found=[]),0===w){if(this[C](t,N,O,L,M,$,A),o&&H&&a.length)break t}else if(o&&H){for(k=0,T=j.length;k<T;k++)if(this[C](j[k],N,O,L,M,$,A),a.length)break t}else for(k=0,T=j.length;k<T;k++)this[C](j[k],N,O,L,M,$,A);j=this.found}return(d||u.expressions.length>1)&&this.sort(a),o?a[0]||null:a},t.uidx=1,t.uidk="slick-uniqueid",t.getUIDXML=function(t){var e=t.getAttribute(this.uidk);return e||(e=this.uidx++,t.setAttribute(this.uidk,e)),e},t.getUIDHTML=function(t){return t.uniqueNumber||(t.uniqueNumber=this.uidx++)},t.sort=function(t){return this.documentSorter?(t.sort(this.documentSorter),t):t},t.cacheNTH={},t.matchNTH=/^([+-]?\d*)?([a-z]+)?([+-]\d+)?$/,t.parseNTHArgument=function(t){var e=t.match(this.matchNTH);if(!e)return!1;var n=e[2]||!1,r=e[1]||1;"-"==r&&(r=-1);var i=+e[3]||0;return e="n"==n?{a:r,b:i}:"odd"==n?{a:2,b:1}:"even"==n?{a:2,b:0}:{a:0,b:r},this.cacheNTH[t]=e},t.createNTHPseudo=function(t,e,n,r){return function(i,s){var o=this.getUID(i);if(!this[n][o]){var a=i.parentNode;if(!a)return!1;var u=a[t],c=1;if(r){var l=i.nodeName;do{u.nodeName==l&&(this[n][this.getUID(u)]=c++)}while(u=u[e])}else do{1==u.nodeType&&(this[n][this.getUID(u)]=c++)}while(u=u[e])}s=s||"n";var h=this.cacheNTH[s]||this.parseNTHArgument(s);if(!h)return!1;var f=h.a,p=h.b,d=this[n][o];if(0==f)return p==d;if(f>0){if(d<p)return!1}else if(p<d)return!1;return(d-p)%f==0}},t.pushArray=function(t,e,n,r,i,s){this.matchSelector(t,e,n,r,i,s)&&this.found.push(t)},t.pushUID=function(t,e,n,r,i,s){var o=this.getUID(t);!this.uniques[o]&&this.matchSelector(t,e,n,r,i,s)&&(this.uniques[o]=!0,this.found.push(t))},t.matchNode=function(t,e){if(this.isHTMLDocument&&this.nativeMatchesSelector)try{return this.nativeMatchesSelector.call(t,e.replace(/\[([^=]+)=\s*([^'"\]]+?)\s*\]/g,'[$1="$2"]'))}catch(t){}var n=this.Slick.parse(e);if(!n)return!0;var r,i,s=n.expressions,o=0;for(r=0;i=s[r];r++)if(1==i.length){var a=i[0];if(this.matchSelector(t,this.isXMLDocument?a.tag:a.tag.toUpperCase(),a.id,a.classes,a.attributes,a.pseudos))return!0;o++}if(o==n.length)return!1;var u,c=this.search(this.document,n);for(r=0;u=c[r++];)if(u===t)return!0;return!1},t.matchPseudo=function(t,e,n){var r="pseudo:"+e;if(this[r])return this[r](t,n);var i=this.getAttribute(t,e);return n?n==i:!!i},t.matchSelector=function(t,e,n,r,i,s){if(e){var o=this.isXMLDocument?t.nodeName:t.nodeName.toUpperCase();if("*"==e){if(o<"@")return!1}else if(o!=e)return!1}if(n&&t.getAttribute("id")!=n)return!1;var a,u,c;if(r)for(a=r.length;a--;)if(!(c=this.getAttribute(t,"class"))||!r[a].regexp.test(c))return!1;if(i)for(a=i.length;a--;)if(u=i[a],u.operator?!u.test(this.getAttribute(t,u.key)):!this.hasAttribute(t,u.key))return!1;if(s)for(a=s.length;a--;)if(u=s[a],!this.matchPseudo(t,u.key,u.value))return!1;return!0};var o={" ":function(t,e,n,r,i,s,o){var a,u,c;if(this.isHTMLDocument){t:if(n){if(!(u=this.document.getElementById(n))&&t.all||this.idGetsName&&u&&u.getAttributeNode("id").nodeValue!=n){if(!(c=t.all[n]))return;for(c[0]||(c=[c]),a=0;u=c[a++];){var l=u.getAttributeNode("id");if(l&&l.nodeValue==n){this.push(u,e,null,r,i,s);break}}return}if(!u){if(this.contains(this.root,t))return;break t}if(this.document!==t&&!this.contains(t,u))return;return void this.push(u,e,null,r,i,s)}t:if(r&&t.getElementsByClassName&&!this.brokenGEBCN){ if(!(c=t.getElementsByClassName(o.join(" ")))||!c.length)break t;for(a=0;u=c[a++];)this.push(u,e,n,null,i,s);return}}if((c=t.getElementsByTagName(e))&&c.length)for(this.brokenStarGEBTN||(e=null),a=0;u=c[a++];)this.push(u,e,n,r,i,s)},">":function(t,e,n,r,i,s){if(t=t.firstChild)do{1==t.nodeType&&this.push(t,e,n,r,i,s)}while(t=t.nextSibling)},"+":function(t,e,n,r,i,s){for(;t=t.nextSibling;)if(1==t.nodeType){this.push(t,e,n,r,i,s);break}},"^":function(t,e,n,r,i,s){(t=t.firstChild)&&(1==t.nodeType?this.push(t,e,n,r,i,s):this["combinator:+"](t,e,n,r,i,s))},"~":function(t,e,n,r,i,s){for(;t=t.nextSibling;)if(1==t.nodeType){var o=this.getUID(t);if(this.bitUniques[o])break;this.bitUniques[o]=!0,this.push(t,e,n,r,i,s)}},"++":function(t,e,n,r,i,s){this["combinator:+"](t,e,n,r,i,s),this["combinator:!+"](t,e,n,r,i,s)},"~~":function(t,e,n,r,i,s){this["combinator:~"](t,e,n,r,i,s),this["combinator:!~"](t,e,n,r,i,s)},"!":function(t,e,n,r,i,s){for(;t=t.parentNode;)t!==this.document&&this.push(t,e,n,r,i,s)},"!>":function(t,e,n,r,i,s){(t=t.parentNode)!==this.document&&this.push(t,e,n,r,i,s)},"!+":function(t,e,n,r,i,s){for(;t=t.previousSibling;)if(1==t.nodeType){this.push(t,e,n,r,i,s);break}},"!^":function(t,e,n,r,i,s){(t=t.lastChild)&&(1==t.nodeType?this.push(t,e,n,r,i,s):this["combinator:!+"](t,e,n,r,i,s))},"!~":function(t,e,n,r,i,s){for(;t=t.previousSibling;)if(1==t.nodeType){var o=this.getUID(t);if(this.bitUniques[o])break;this.bitUniques[o]=!0,this.push(t,e,n,r,i,s)}}};for(var a in o)t["combinator:"+a]=o[a];var u={empty:function(t){var e=t.firstChild;return!(e&&1==e.nodeType||(t.innerText||t.textContent||"").length)},not:function(t,e){return!this.matchNode(t,e)},contains:function(t,e){return(t.innerText||t.textContent||"").indexOf(e)>-1},"first-child":function(t){for(;t=t.previousSibling;)if(1==t.nodeType)return!1;return!0},"last-child":function(t){for(;t=t.nextSibling;)if(1==t.nodeType)return!1;return!0},"only-child":function(t){for(var e=t;e=e.previousSibling;)if(1==e.nodeType)return!1;for(var n=t;n=n.nextSibling;)if(1==n.nodeType)return!1;return!0},"nth-child":t.createNTHPseudo("firstChild","nextSibling","posNTH"),"nth-last-child":t.createNTHPseudo("lastChild","previousSibling","posNTHLast"),"nth-of-type":t.createNTHPseudo("firstChild","nextSibling","posNTHType",!0),"nth-last-of-type":t.createNTHPseudo("lastChild","previousSibling","posNTHTypeLast",!0),index:function(t,e){return this["pseudo:nth-child"](t,""+(e+1))},even:function(t){return this["pseudo:nth-child"](t,"2n")},odd:function(t){return this["pseudo:nth-child"](t,"2n+1")},"first-of-type":function(t){for(var e=t.nodeName;t=t.previousSibling;)if(t.nodeName==e)return!1;return!0},"last-of-type":function(t){for(var e=t.nodeName;t=t.nextSibling;)if(t.nodeName==e)return!1;return!0},"only-of-type":function(t){for(var e=t,n=t.nodeName;e=e.previousSibling;)if(e.nodeName==n)return!1;for(var r=t;r=r.nextSibling;)if(r.nodeName==n)return!1;return!0},enabled:function(t){return!t.disabled},disabled:function(t){return t.disabled},checked:function(t){return t.checked||t.selected},focus:function(t){return this.isHTMLDocument&&this.document.activeElement===t&&(t.href||t.type||this.hasAttribute(t,"tabindex"))},root:function(t){return t===this.root},selected:function(t){return t.selected}};for(var c in u)t["pseudo:"+c]=u[c];var l=t.attributeGetters={for:function(){return"htmlFor"in this?this.htmlFor:this.getAttribute("for")},href:function(){return"href"in this?this.getAttribute("href",2):this.getAttribute("href")},style:function(){return this.style?this.style.cssText:this.getAttribute("style")},tabindex:function(){var t=this.getAttributeNode("tabindex");return t&&t.specified?t.nodeValue:null},type:function(){return this.getAttribute("type")},maxlength:function(){var t=this.getAttributeNode("maxLength");return t&&t.specified?t.nodeValue:null}};l.MAXLENGTH=l.maxLength=l.maxlength;var h=t.Slick=this.Slick||{};h.version="1.1.7",h.search=function(e,n,r){return t.search(e,n,r)},h.find=function(e,n){return t.search(e,n,null,!0)},h.contains=function(e,n){return t.setDocument(e),t.contains(e,n)},h.getAttribute=function(e,n){return t.setDocument(e),t.getAttribute(e,n)},h.hasAttribute=function(e,n){return t.setDocument(e),t.hasAttribute(e,n)},h.match=function(e,n){return!(!e||!n)&&(!n||n===e||(t.setDocument(e),t.matchNode(e,n)))},h.defineAttributeGetter=function(e,n){return t.attributeGetters[e]=n,this},h.lookupAttributeGetter=function(e){return t.attributeGetters[e]},h.definePseudo=function(e,n){return t["pseudo:"+e]=function(t,e){return n.call(t,e)},this},h.lookupPseudo=function(e){var n=t["pseudo:"+e];return n?function(t){return n.call(this,t)}:null},h.override=function(e,n){return t.override(e,n),this},h.isXML=t.isXML,h.uidOf=function(e){return t.getUIDHTML(e)},this.Slick||(this.Slick=h)}.apply("undefined"!=typeof exports?exports:this);var Element=this.Element=function(t,e){var n=Element.Constructors[t];if(n)return n(e);if("string"!=typeof t)return document.id(t).set(e);if(e||(e={}),!/^[\w-]+$/.test(t)){var r=Slick.parse(t).expressions[0][0];t="*"==r.tag?"div":r.tag,r.id&&null==e.id&&(e.id=r.id);var i=r.attributes;if(i)for(var s,o=0,a=i.length;o<a;o++)s=i[o],null==e[s.key]&&(null!=s.value&&"="==s.operator?e[s.key]=s.value:s.value||s.operator||(e[s.key]=!0));r.classList&&null==e.class&&(e.class=r.classList.join(" "))}return document.newElement(t,e)};Browser.Element&&(Element.prototype=Browser.Element.prototype,Element.prototype._fireEvent=function(t){return function(e,n){return t.call(this,e,n)}}(Element.prototype.fireEvent)),new Type("Element",Element).mirror(function(t){if(!Array.prototype[t]){var e={};e[t]=function(){for(var e=[],n=arguments,r=!0,i=0,s=this.length;i<s;i++){var o=this[i],a=e[i]=o[t].apply(o,n);r=r&&"element"==typeOf(a)}return r?new Elements(e):e},Elements.implement(e)}}),Browser.Element||(Element.parent=Object,Element.Prototype={$constructor:Element,$family:Function.convert("element").hide()},Element.mirror(function(t,e){Element.Prototype[t]=e})),Element.Constructors={};var IFrame=new Type("IFrame",function(){var t,e=Array.link(arguments,{properties:Type.isObject,iframe:function(t){return null!=t}}),n=e.properties||{};e.iframe&&(t=document.id(e.iframe));var r=n.onload||function(){};delete n.onload,n.id=n.name=[n.id,n.name,t?t.id||t.name:"IFrame_"+String.uniqueID()].pick(),t=new Element(t||"iframe",n);var i=function(){r.call(t.contentWindow)};return window.frames[n.id]?i():t.addListener("load",i),t}),Elements=this.Elements=function(t){if(t&&t.length)for(var e,n={},r=0;e=t[r++];){var i=Slick.uidOf(e);n[i]||(n[i]=!0,this.push(e))}};Elements.prototype={length:0},Elements.parent=Array,new Type("Elements",Elements).implement({filter:function(t,e){return t?new Elements(Array.filter(this,"string"==typeOf(t)?function(e){return e.match(t)}:t,e)):this}.protect(),push:function(){for(var t=this.length,e=0,n=arguments.length;e<n;e++){var r=document.id(arguments[e]);r&&(this[t++]=r)}return this.length=t}.protect(),unshift:function(){for(var t=[],e=0,n=arguments.length;e<n;e++){var r=document.id(arguments[e]);r&&t.push(r)}return Array.prototype.unshift.apply(this,t)}.protect(),concat:function(){for(var t=new Elements(this),e=0,n=arguments.length;e<n;e++){var r=arguments[e];Type.isEnumerable(r)?t.append(r):t.push(r)}return t}.protect(),append:function(t){for(var e=0,n=t.length;e<n;e++)this.push(t[e]);return this}.protect(),empty:function(){for(;this.length;)delete this[--this.length];return this}.protect()}),function(){var t=Array.prototype.splice,e={0:0,1:1,length:2};t.call(e,1,1),1==e[1]&&Elements.implement("splice",function(){for(var e=this.length,n=t.apply(this,arguments);e>=this.length;)delete this[e--];return n}.protect()),Array.forEachMethod(function(t,e){Elements.implement(e,t)}),Array.mirror(Elements);var n;try{n="x"==document.createElement("<input name=x>").name}catch(t){}var r=function(t){return(""+t).replace(/&/g,"&").replace(/"/g,""")},i=function(){var t=document.createElement("style"),e=!1;try{t.innerHTML="#justTesing{margin: 0px;}",e=!!t.innerHTML}catch(t){}return e}();Document.implement({newElement:function(t,e){if(e){if(null!=e.checked&&(e.defaultChecked=e.checked),"checkbox"!=e.type&&"radio"!=e.type||null!=e.value||(e.value="on"),!i&&"style"==t){var s=document.createElement("style");return s.setAttribute("type","text/css"),e.type&&delete e.type,this.id(s).set(e)}n&&(t="<"+t,e.name&&(t+=' name="'+r(e.name)+'"'),e.type&&(t+=' type="'+r(e.type)+'"'),t+=">",delete e.name,delete e.type)}return this.id(this.createElement(t)).set(e)}})}(),function(){Slick.uidOf(window),Slick.uidOf(document),Document.implement({newTextNode:function(t){return this.createTextNode(t)},getDocument:function(){return this},getWindow:function(){return this.window},id:function(){var t={string:function(e,n,r){return e=Slick.find(r,"#"+e.replace(/(\W)/g,"\\$1")),e?t.element(e,n):null},element:function(t,e){if(Slick.uidOf(t),!e&&!t.$family&&!/^(?:object|embed)$/i.test(t.tagName)){var n=t.fireEvent;t._fireEvent=function(t,e){return n(t,e)},Object.append(t,Element.Prototype)}return t},object:function(e,n,r){return e.toElement?t.element(e.toElement(r),n):null}};return t.textnode=t.whitespace=t.window=t.document=function(t){return t},function(e,n,r){if(e&&e.$family&&e.uniqueNumber)return e;var i=typeOf(e);return t[i]?t[i](e,n,r||document):null}}()}),null==window.$&&Window.implement("$",function(t,e){return document.id(t,e,this.document)}),Window.implement({getDocument:function(){return this.document},getWindow:function(){return this}}),[Document,Element].invoke("implement",{getElements:function(t){return Slick.search(this,t,new Elements)},getElement:function(t){return document.id(Slick.find(this,t))}});var t={contains:function(t){return Slick.contains(this,t)}};document.contains||Document.implement(t),document.createElement("div").contains||Element.implement(t);var e=function(t,e){if(!t)return e;t=Object.clone(Slick.parse(t));for(var n=t.expressions,r=n.length;r--;)n[r][0].combinator=e;return t};Object.forEach({getNext:"~",getPrevious:"!~",getParent:"!"},function(t,n){Element.implement(n,function(n){return this.getElement(e(n,t))})}),Object.forEach({getAllNext:"~",getAllPrevious:"!~",getSiblings:"~~",getChildren:">",getParents:"!"},function(t,n){Element.implement(n,function(n){return this.getElements(e(n,t))})}),Element.implement({getFirst:function(t){return document.id(Slick.search(this,e(t,">"))[0])},getLast:function(t){return document.id(Slick.search(this,e(t,">")).getLast())},getWindow:function(){return this.ownerDocument.window},getDocument:function(){return this.ownerDocument},getElementById:function(t){return document.id(Slick.find(this,"#"+(""+t).replace(/(\W)/g,"\\$1")))},match:function(t){return!t||Slick.match(this,t)}}),null==window.$$&&Window.implement("$$",function(t){if(1==arguments.length){if("string"==typeof t)return Slick.search(this.document,t,new Elements);if(Type.isEnumerable(t))return new Elements(t)}return new Elements(arguments)});var n={before:function(t,e){var n=e.parentNode;n&&n.insertBefore(t,e)},after:function(t,e){var n=e.parentNode;n&&n.insertBefore(t,e.nextSibling)},bottom:function(t,e){e.appendChild(t)},top:function(t,e){e.insertBefore(t,e.firstChild)}};n.inside=n.bottom;var r={},i={},s={};Array.forEach(["type","value","defaultValue","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","rowSpan","tabIndex","useMap"],function(t){s[t.toLowerCase()]=t}),s.html="innerHTML",s.text=null==document.createElement("div").textContent?"innerText":"textContent",Object.forEach(s,function(t,e){i[e]=function(e,n){e[t]=n},r[e]=function(e){return e[t]}}),i.text=function(){return function(t,e){"style"==t.get("tag")?t.set("html",e):t[s.text]=e}}(i.text),r.text=function(t){return function(e){return"style"==e.get("tag")?e.innerHTML:t(e)}}(r.text);var o=["compact","nowrap","ismap","declare","noshade","checked","disabled","readOnly","multiple","selected","noresize","defer","defaultChecked","autofocus","controls","autoplay","loop"],a={};Array.forEach(o,function(t){var e=t.toLowerCase();a[e]=t,i[e]=function(e,n){e[t]=!!n},r[e]=function(e){return!!e[t]}}),Object.append(i,{class:function(t,e){"className"in t?t.className=e||"":t.setAttribute("class",e)},for:function(t,e){"htmlFor"in t?t.htmlFor=e:t.setAttribute("for",e)},style:function(t,e){t.style?t.style.cssText=e:t.setAttribute("style",e)},value:function(t,e){t.value=null!=e?e:""}}),r.class=function(t){return"className"in t?t.className||null:t.getAttribute("class")};var u=document.createElement("button");try{u.type="button"}catch(t){}"button"!=u.type&&(i.type=function(t,e){t.setAttribute("type",e)}),u=null;var c,h,f=function(){var t=document.createElement("style"),e=!1;try{t.innerHTML="#justTesing{margin: 0px;}",e=!!t.innerHTML}catch(t){}return e}(),p=document.createElement("input");p.value="t",p.type="submit",c="t"!=p.value;try{p.value="",p.type="email",h="email"==p.type}catch(t){}p=null,!c&&h||(i.type=function(t,e){try{var n=t.value;t.type=e,t.value=n}catch(t){}});var d=function(t){return t.random="attribute","attribute"==t.getAttribute("random")}(document.createElement("div")),m=function(t){return t.innerHTML='<object><param name="should_fix" value="the unknown" /></object>',1!=t.cloneNode(!0).firstChild.childNodes.length}(document.createElement("div")),v=!!document.createElement("div").classList,g=function(t){var e=(t||"").clean().split(" "),n={};return e.filter(function(t){if(""!==t&&!n[t])return n[t]=t})},y=function(t){this.classList.add(t)},b=function(t){this.classList.remove(t)};Element.implement({setProperty:function(t,e){var n=i[t.toLowerCase()];if(n)n(this,e);else{var r;d&&(r=this.retrieve("$attributeWhiteList",{})),null==e?(this.removeAttribute(t),d&&delete r[t]):(this.setAttribute(t,""+e),d&&(r[t]=!0))}return this},setProperties:function(t){for(var e in t)this.setProperty(e,t[e]);return this},getProperty:function(t){var e=r[t.toLowerCase()];if(e)return e(this);if(d){var n=this.getAttributeNode(t),i=this.retrieve("$attributeWhiteList",{});if(!n)return null;if(n.expando&&!i[t]){var s=this.outerHTML;if(s.substr(0,s.search(/\/?['"]?>(?![^<]*<['"])/)).indexOf(t)<0)return null;i[t]=!0}}var o=Slick.getAttribute(this,t);return o||Slick.hasAttribute(this,t)?o:null},getProperties:function(){var t=Array.convert(arguments);return t.map(this.getProperty,this).associate(t)},removeProperty:function(t){return this.setProperty(t,null)},removeProperties:function(){return Array.each(arguments,this.removeProperty,this),this},set:function(t,e){var n=Element.Properties[t];n&&n.set?n.set.call(this,e):this.setProperty(t,e)}.overloadSetter(),get:function(t){var e=Element.Properties[t];return e&&e.get?e.get.apply(this):this.getProperty(t)}.overloadGetter(),erase:function(t){var e=Element.Properties[t];return e&&e.erase?e.erase.apply(this):this.removeProperty(t),this},hasClass:v?function(t){return this.classList.contains(t)}:function(t){return g(this.className).contains(t)},addClass:v?function(t){return g(t).forEach(y,this),this}:function(t){return this.className=g(t+" "+this.className).join(" "),this},removeClass:v?function(t){return g(t).forEach(b,this),this}:function(t){var e=g(this.className);return g(t).forEach(e.erase,e),this.className=e.join(" "),this},toggleClass:function(t,e){return null==e&&(e=!this.hasClass(t)),e?this.addClass(t):this.removeClass(t)},adopt:function(){var t,e=this,n=Array.flatten(arguments),r=n.length;r>1&&(e=t=document.createDocumentFragment());for(var i=0;i<r;i++){var s=document.id(n[i],!0);s&&e.appendChild(s)}return t&&this.appendChild(t),this},appendText:function(t,e){return this.grab(this.getDocument().newTextNode(t),e)},grab:function(t,e){return n[e||"bottom"](document.id(t,!0),this),this},inject:function(t,e){return n[e||"bottom"](this,document.id(t,!0)),this},replaces:function(t){return t=document.id(t,!0),t.parentNode.replaceChild(this,t),this},wraps:function(t,e){return t=document.id(t,!0),this.replaces(t).grab(t,e)},getSelected:function(){return this.selectedIndex,new Elements(Array.convert(this.options).filter(function(t){return t.selected}))},toQueryString:function(){var t=[];return this.getElements("input, select, textarea").each(function(e){var n=e.type;if(e.name&&!e.disabled&&"submit"!=n&&"reset"!=n&&"file"!=n&&"image"!=n){var r="select"==e.get("tag")?e.getSelected().map(function(t){return document.id(t).get("value")}):"radio"!=n&&"checkbox"!=n||e.checked?e.get("value"):null;Array.convert(r).each(function(n){void 0!==n&&t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(n))})}}),t.join("&")}});var x={before:"beforeBegin",after:"afterEnd",bottom:"beforeEnd",top:"afterBegin",inside:"beforeEnd"};Element.implement("appendHTML","insertAdjacentHTML"in document.createElement("div")?function(t,e){return this.insertAdjacentHTML(x[e||"bottom"],t),this}:function(t,e){var r=new Element("div",{html:t}),i=r.childNodes,s=r.firstChild;if(!s)return this;if(i.length>1){s=document.createDocumentFragment();for(var o=0,a=i.length;o<a;o++)s.appendChild(i[o])}return n[e||"bottom"](s,this),this});var E={},S={},w=function(t){return S[t]||(S[t]={})},k=function(t){var e=t.uniqueNumber;return t.removeEvents&&t.removeEvents(),t.clearAttributes&&t.clearAttributes(),null!=e&&(delete E[e],delete S[e]),t},T={input:"checked",option:"selected",textarea:"value"};if(Element.implement({destroy:function(){var t=k(this).getElementsByTagName("*");return Array.each(t,k),Element.dispose(this),null},empty:function(){return Array.convert(this.childNodes).each(Element.dispose),this},dispose:function(){return this.parentNode?this.parentNode.removeChild(this):this},clone:function(t,e){t=!1!==t;var n,r=this.cloneNode(t),i=[r],s=[this];for(t&&(i.append(Array.convert(r.getElementsByTagName("*"))),s.append(Array.convert(this.getElementsByTagName("*")))),n=i.length;n--;){var o=i[n],a=s[n];if(e||o.removeAttribute("id"),o.clearAttributes&&(o.clearAttributes(),o.mergeAttributes(a),o.removeAttribute("uniqueNumber"),o.options))for(var u=o.options,c=a.options,l=u.length;l--;)u[l].selected=c[l].selected;var h=T[a.tagName.toLowerCase()];h&&a[h]&&(o[h]=a[h])}if(m){var f=r.getElementsByTagName("object"),p=this.getElementsByTagName("object");for(n=f.length;n--;)f[n].outerHTML=p[n].outerHTML}return document.id(r)}}),[Element,Window,Document].invoke("implement",{addListener:function(t,e){return window.attachEvent&&!window.addEventListener&&(E[Slick.uidOf(this)]=this),this.addEventListener?this.addEventListener(t,e,!!arguments[2]):this.attachEvent("on"+t,e),this},removeListener:function(t,e){return this.removeEventListener?this.removeEventListener(t,e,!!arguments[2]):this.detachEvent("on"+t,e),this},retrieve:function(t,e){var n=w(Slick.uidOf(this)),r=n[t];return null!=e&&null==r&&(r=n[t]=e),null!=r?r:null},store:function(t,e){return w(Slick.uidOf(this))[t]=e,this},eliminate:function(t){return delete w(Slick.uidOf(this))[t],this}}),window.attachEvent&&!window.addEventListener){var C=function(){Object.each(E,k),window.CollectGarbage&&CollectGarbage(),window.removeListener("unload",C)};window.addListener("unload",C)}Element.Properties={},Element.Properties.style={set:function(t){this.style.cssText=t},get:function(){return this.style.cssText},erase:function(){this.style.cssText=""}},Element.Properties.tag={get:function(){return this.tagName.toLowerCase()}},Element.Properties.html={set:function(t){null==t?t="":"array"==typeOf(t)&&(t=t.join("")),this.styleSheet&&!f?this.styleSheet.cssText=t:this.innerHTML=t},erase:function(){this.set("html","")}};var N,O=!0,A=!0,L=!0,M=document.createElement("div");if(M.innerHTML="<nav></nav>",!(O=1==M.childNodes.length)){var $="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" ");for(N=document.createDocumentFragment(),l=$.length;l--;)N.createElement($[l])}M=null,A=Function.attempt(function(){return document.createElement("table").innerHTML="<tr><td></td></tr>",!0});var j=document.createElement("tr");j.innerHTML="<td></td>",L="<td></td>"==j.innerHTML,j=null,A&&L&&O||(Element.Properties.html.set=function(t){var e={table:[1,"<table>","</table>"],select:[1,"<select>","</select>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"]};return e.thead=e.tfoot=e.tbody,function(n){if(this.styleSheet)return t.call(this,n);var r=e[this.get("tag")];if(r||O||(r=[0,"",""]),!r)return t.call(this,n);var i=r[0],s=document.createElement("div"),o=s;for(O||N.appendChild(s),s.innerHTML=[r[1],n,r[2]].flatten().join("");i--;)o=o.firstChild;this.empty().adopt(o.childNodes),O||N.removeChild(s),s=null}}(Element.Properties.html.set));var D=document.createElement("form");D.innerHTML="<select><option>s</option></select>","s"!=D.firstChild.value&&(Element.Properties.value={set:function(t){if("select"!=this.get("tag"))return this.setProperty("value",t);var e=this.getElements("option");t=String(t);for(var n=0;n<e.length;n++){var r=e[n],i=r.getAttributeNode("value");if((i&&i.specified?r.value:r.get("text"))===t)return r.selected=!0}},get:function(){var t=this,e=t.get("tag");if("select"!=e&&"option"!=e)return this.getProperty("value");if("select"==e&&!(t=t.getSelected()[0]))return"";var n=t.getAttributeNode("value");return n&&n.specified?t.value:t.get("text")}}),D=null,document.createElement("div").getAttributeNode("id")&&(Element.Properties.id={set:function(t){this.id=this.getAttributeNode("id").value=t},get:function(){return this.id||null},erase:function(){this.id=this.getAttributeNode("id").value=""}})}(),function(){var t={},e=function(t){var e;if(t.wheelDelta)e=t.wheelDelta%120==0?t.wheelDelta/120:t.wheelDelta/12;else{var n=t.deltaY||t.detail||0;e=-(n%3==0?n/3:10*n)}return e},n=this.DOMEvent=new Type("DOMEvent",function(n,r){if(r||(r=window),n=n||r.event,n.$extended)return n;this.event=n,this.$extended=!0,this.shift=n.shiftKey,this.control=n.ctrlKey,this.alt=n.altKey,this.meta=n.metaKey;for(var i=this.type=n.type,s=n.target||n.srcElement;s&&3==s.nodeType;)s=s.parentNode;if(this.target=document.id(s),0==i.indexOf("key")){var o=this.code=n.which||n.keyCode;this.shift&&"keypress"==i||(this.key=t[o]),"keydown"!=i&&"keyup"!=i||(o>111&&o<124?this.key="f"+(o-111):o>95&&o<106&&(this.key=o-96)),null==this.key&&(this.key=String.fromCharCode(o).toLowerCase())}else if("click"==i||"dblclick"==i||"contextmenu"==i||"wheel"==i||"DOMMouseScroll"==i||0==i.indexOf("mouse")){var a=r.document;if(a=a.compatMode&&"CSS1Compat"!=a.compatMode?a.body:a.html,this.page={x:null!=n.pageX?n.pageX:n.clientX+a.scrollLeft,y:null!=n.pageY?n.pageY:n.clientY+a.scrollTop},this.client={x:null!=n.pageX?n.pageX-r.pageXOffset:n.clientX,y:null!=n.pageY?n.pageY-r.pageYOffset:n.clientY},"DOMMouseScroll"!=i&&"wheel"!=i&&"mousewheel"!=i||(this.wheel=e(n)),this.rightClick=3==n.which||2==n.button,"mouseover"==i||"mouseout"==i||"mouseenter"==i||"mouseleave"==i){for(var u="mouseover"==i||"mouseenter"==i,c=n.relatedTarget||n[(u?"from":"to")+"Element"];c&&3==c.nodeType;)c=c.parentNode;this.relatedTarget=document.id(c)}}else if(0==i.indexOf("touch")||0==i.indexOf("gesture")){this.rotation=n.rotation,this.scale=n.scale,this.targetTouches=n.targetTouches,this.changedTouches=n.changedTouches;var l=this.touches=n.touches;if(l&&l[0]){var h=l[0];this.page={x:h.pageX,y:h.pageY},this.client={x:h.clientX,y:h.clientY}}}this.client||(this.client={}),this.page||(this.page={})});n.implement({stop:function(){return this.preventDefault().stopPropagation()},stopPropagation:function(){return this.event.stopPropagation?this.event.stopPropagation():this.event.cancelBubble=!0,this},preventDefault:function(){return this.event.preventDefault?this.event.preventDefault():this.event.returnValue=!1,this}}),n.defineKey=function(e,n){return t[e]=n,this},n.defineKeys=n.defineKey.overloadSetter(!0),n.defineKeys({38:"up",40:"down",37:"left",39:"right",27:"esc",32:"space",8:"backspace",9:"tab",46:"delete",13:"enter"})}(),function(){Element.Properties.events={set:function(t){this.addEvents(t)}},[Element,Window,Document].invoke("implement",{addEvent:function(t,e){var n=this.retrieve("events",{});if(n[t]||(n[t]={keys:[],values:[]}),n[t].keys.contains(e))return this;n[t].keys.push(e);var r=t,i=Element.Events[t],s=e,o=this;i&&(i.onAdd&&i.onAdd.call(this,e,t),i.condition&&(s=function(n){return!i.condition.call(this,n,t)||e.call(this,n)}),i.base&&(r=Function.convert(i.base).call(this,t)));var a=function(){return e.call(o)},u=Element.NativeEvents[r];return u&&(2==u&&(a=function(t){t=new DOMEvent(t,o.getWindow()),!1===s.call(o,t)&&t.stop()}),this.addListener(r,a,arguments[2])),n[t].values.push(a),this},removeEvent:function(t,e){var n=this.retrieve("events");if(!n||!n[t])return this;var r=n[t],i=r.keys.indexOf(e);if(-1==i)return this;var s=r.values[i];delete r.keys[i],delete r.values[i];var o=Element.Events[t];return o&&(o.onRemove&&o.onRemove.call(this,e,t),o.base&&(t=Function.convert(o.base).call(this,t))),Element.NativeEvents[t]?this.removeListener(t,s,arguments[2]):this},addEvents:function(t){for(var e in t)this.addEvent(e,t[e]);return this},removeEvents:function(t){var e;if("object"==typeOf(t)){for(e in t)this.removeEvent(e,t[e]);return this}var n=this.retrieve("events");if(!n)return this;if(t)n[t]&&(n[t].keys.each(function(e){this.removeEvent(t,e)},this),delete n[t]);else{for(e in n)this.removeEvents(e);this.eliminate("events")}return this},fireEvent:function(t,e,n){var r=this.retrieve("events");return r&&r[t]?(e=Array.convert(e),r[t].keys.each(function(t){n?t.delay(n,this,e):t.apply(this,e)},this),this):this},cloneEvents:function(t,e){t=document.id(t);var n=t.retrieve("events");if(!n)return this;if(e)n[e]&&n[e].keys.each(function(t){this.addEvent(e,t)},this);else for(var r in n)this.cloneEvents(t,r);return this}}),Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,wheel:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,orientationchange:2,touchstart:2,touchmove:2,touchend:2,touchcancel:2,gesturestart:2,gesturechange:2,gestureend:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,paste:2,input:2,load:2,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,hashchange:1,popstate:2,pageshow:2,pagehide:2,error:1,abort:1,scroll:1,message:2},Element.Events={mousewheel:{base:"onwheel"in document?"wheel":"onmousewheel"in document?"mousewheel":"DOMMouseScroll"}};var t=function(t){var e=t.relatedTarget;return null==e||!!e&&(e!=this&&"xul"!=e.prefix&&"document"!=typeOf(this)&&!this.contains(e))};"onmouseenter"in document.documentElement?(Element.NativeEvents.mouseenter=Element.NativeEvents.mouseleave=2,Element.MouseenterCheck=t):(Element.Events.mouseenter={base:"mouseover",condition:t},Element.Events.mouseleave={base:"mouseout",condition:t}),window.addEventListener||(Element.NativeEvents.propertychange=2,Element.Events.change={base:function(){var t=this.type;return"input"!=this.get("tag")||"radio"!=t&&"checkbox"!=t?"change":"propertychange"},condition:function(t){return"propertychange"!=t.type||"checked"==t.event.propertyName}})}(),function(){var t=!!window.addEventListener;Element.NativeEvents.focusin=Element.NativeEvents.focusout=2;var e=function(t,e,n,r,i){for(;i&&i!=t;){if(e(i,r))return n.call(i,r,i);i=document.id(i.parentNode)}},n={mouseenter:{base:"mouseover",condition:Element.MouseenterCheck},mouseleave:{base:"mouseout",condition:Element.MouseenterCheck},focus:{base:"focus"+(t?"":"in"),capture:!0},blur:{base:t?"blur":"focusout",capture:!0}},r="$delegation:",i=function(t){return{base:"focusin",remove:function(e,n){var i=e.retrieve(r+t+"listeners",{})[n];if(i&&i.forms)for(var s=i.forms.length;s--;)i.forms[s].removeEvent&&i.forms[s].removeEvent(t,i.fns[s])},listen:function(n,i,s,o,a,u){var c="form"==a.get("tag")?a:o.target.getParent("form");if(c){var l=n.retrieve(r+t+"listeners",{}),h=l[u]||{forms:[],fns:[]},f=h.forms,p=h.fns;if(-1==f.indexOf(c)){f.push(c);var d=function(t){e(n,i,s,t,a)};c.addEvent(t,d),p.push(d),l[u]=h,n.store(r+t+"listeners",l)}}}}},s=function(t){return{base:"focusin",listen:function(n,r,i,s,o){var a={blur:function(){this.removeEvents(a)}};a[t]=function(t){e(n,r,i,t,o)},s.target.addEvents(a)}}};t||Object.append(n,{submit:i("submit"),reset:i("reset"),change:s("change"),select:s("select")});var o=Element.prototype,a=o.addEvent,u=o.removeEvent,c=function(t,e){return function(n,r,i){if(-1==n.indexOf(":relay"))return t.call(this,n,r,i);var s=Slick.parse(n).expressions[0][0];if("relay"!=s.pseudos[0].key)return t.call(this,n,r,i);var o=s.tag;return s.pseudos.slice(1).each(function(t){o+=":"+t.key+(t.value?"("+t.value+")":"")}),t.call(this,n,r),e.call(this,o,s.pseudos[0].value,r)}},l={addEvent:function(t,r,i){var s=this.retrieve("$delegates",{}),o=s[t];if(o)for(var u in o)if(o[u].fn==i&&o[u].match==r)return this;var c=t,l=r,h=i,f=n[t]||{};t=f.base||c,r=function(t){return Slick.match(t,l)};var p=Element.Events[c];if(f.condition||p&&p.condition){var d=r,m=f.condition||p.condition;r=function(e,n){return d(e,n)&&m.call(e,n,t)}}var v=this,g=String.uniqueID(),y=f.listen?function(t,e){!e&&t&&t.target&&(e=t.target),e&&f.listen(v,r,i,t,e,g)}:function(t,n){!n&&t&&t.target&&(n=t.target),n&&e(v,r,i,t,n)};return o||(o={}),o[g]={match:l,fn:h,delegator:y},s[c]=o,a.call(this,t,y,f.capture)},removeEvent:function(t,e,r,i){var s=this.retrieve("$delegates",{}),o=s[t];if(!o)return this;if(i){var a=t,c=o[i].delegator,h=n[t]||{};return t=h.base||a,h.remove&&h.remove(this,i),delete o[i],s[a]=o,u.call(this,t,c,h.capture)}var f,p;if(r){for(f in o)if(p=o[f],p.match==e&&p.fn==r)return l.removeEvent.call(this,t,e,r,f)}else for(f in o)p=o[f],p.match==e&&l.removeEvent.call(this,t,e,p.fn,f);return this}};[Element,Window,Document].invoke("implement",{addEvent:c(a,l.addEvent),removeEvent:c(u,l.removeEvent)})}(),function(){var t,e=document.html;t=document.createElement("div"),t.style.color="red",t.style.color=null;var n="red"==t.style.color;t.style.border="1px solid #123abc";var r="1px solid #123abc"!=t.style.border;t=null;var i=!!window.getComputedStyle,s=null!=document.createElement("div").style.borderRadius;Element.Properties.styles={set:function(t){this.setStyles(t)}};var o=null!=e.style.opacity,a=null!=e.style.filter,u=/alpha\(opacity=([\d.]+)\)/i,c=function(t,e){t.store("$opacity",e),t.style.visibility=e>0||null==e?"visible":"hidden"},l=function(t,e,n){var r=t.style,i=r.filter||t.getComputedStyle("filter")||"";r.filter=(e.test(i)?i.replace(e,n):i+" "+n).trim(),r.filter||r.removeAttribute("filter")},h=o?function(t,e){t.style.opacity=e}:a?function(t,e){t.currentStyle&&t.currentStyle.hasLayout||(t.style.zoom=1),null==e||1==e?(l(t,u,""),1==e&&1!=f(t)&&l(t,u,"alpha(opacity=100)")):l(t,u,"alpha(opacity="+(100*e).limit(0,100).round()+")")}:c,f=o?function(t){var e=t.style.opacity||t.getComputedStyle("opacity");return""==e?1:e.toFloat()}:a?function(t){var e,n=t.style.filter||t.getComputedStyle("filter");return n&&(e=n.match(u)),null==e||null==n?1:e[1]/100}:function(t){var e=t.retrieve("$opacity");return null==e&&(e="hidden"==t.style.visibility?0:1),e},p=null==e.style.cssFloat?"styleFloat":"cssFloat",d={left:"0%",top:"0%",center:"50%",right:"100%",bottom:"100%"},m=null!=e.style.backgroundPositionX,v=/^-(ms)-/,g=function(t){return t.replace(v,"$1-").camelCase()},y=function(t,e){"backgroundPosition"==e&&(t.removeAttribute(e+"X"),e+="Y"),t.removeAttribute(e)};Element.implement({getComputedStyle:function(t){if(!i&&this.currentStyle)return this.currentStyle[g(t)];var e=Element.getDocument(this).defaultView,n=e?e.getComputedStyle(this,null):null;return n?n.getPropertyValue(t==p?"float":t.hyphenate()):""},setStyle:function(t,e){if("opacity"==t)return null!=e&&(e=parseFloat(e)),h(this,e),this;if(t=g("float"==t?p:t),"string"!=typeOf(e)){var r=(Element.Styles[t]||"@").split(" ");e=Array.convert(e).map(function(t,e){return r[e]?"number"==typeOf(t)?r[e].replace("@",Math.round(t)):t:""}).join(" ")}else e==String(Number(e))&&(e=Math.round(e));return this.style[t]=e, (""==e||null==e)&&n&&this.style.removeAttribute&&y(this.style,t),this},getStyle:function(t){if("opacity"==t)return f(this);if(t=g("float"==t?p:t),s&&-1!=t.indexOf("borderRadius"))return["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"].map(function(t){return this.style[t]||"0px"},this).join(" ");var e=this.style[t];if(!e||"zIndex"==t){if(Element.ShortStyles.hasOwnProperty(t)){e=[];for(var n in Element.ShortStyles[t])e.push(this.getStyle(n));return e.join(" ")}e=this.getComputedStyle(t)}if(m&&/^backgroundPosition[XY]?$/.test(t))return e.replace(/(top|right|bottom|left)/g,function(t){return d[t]})||"0px";if(!e&&"backgroundPosition"==t)return"0px 0px";if(e){e=String(e);var o=e.match(/rgba?\([\d\s,]+\)/);o&&(e=e.replace(o[0],o[0].rgbToHex()))}if(!i&&!this.style[t]){if(/^(height|width)$/.test(t)&&!/px$/.test(e)){var a="width"==t?["left","right"]:["top","bottom"],u=0;return a.each(function(t){u+=this.getStyle("border-"+t+"-width").toInt()+this.getStyle("padding-"+t).toInt()},this),this["offset"+t.capitalize()]-u+"px"}if(/^border(.+)Width|margin|padding/.test(t)&&isNaN(parseFloat(e)))return"0px"}return r&&/^border(Top|Right|Bottom|Left)?$/.test(t)&&/^#/.test(e)?e.replace(/^(.+)\s(.+)\s(.+)$/,"$2 $3 $1"):e},setStyles:function(t){for(var e in t)this.setStyle(e,t[e]);return this},getStyles:function(){var t={};return Array.flatten(arguments).each(function(e){t[e]=this.getStyle(e)},this),t}}),Element.Styles={left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundSize:"@px",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@",borderRadius:"@px @px @px @px"},Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}},["Top","Right","Bottom","Left"].each(function(t){var e=Element.ShortStyles,n=Element.Styles;["margin","padding"].each(function(r){var i=r+t;e[r][i]=n[i]="@px"});var r="border"+t;e.border[r]=n[r]="@px @ rgb(@, @, @)";var i=r+"Width",s=r+"Style",o=r+"Color";e[r]={},e.borderWidth[i]=e[r][i]=n[i]="@px",e.borderStyle[s]=e[r][s]=n[s]="@",e.borderColor[o]=e[r][o]=n[o]="rgb(@, @, @)"}),m&&(Element.ShortStyles.backgroundPosition={backgroundPositionX:"@",backgroundPositionY:"@"})}(),function(){function t(t,e){return p(t,e).toInt()||0}function e(e){return t(e,"border-top-width")}function n(e){return t(e,"border-left-width")}function r(t){return/^(?:body|html)$/i.test(t.tagName)}function i(t){var e=t.getDocument();return e.compatMode&&"CSS1Compat"!=e.compatMode?e.body:e.html}var s=document.createElement("div"),o=document.createElement("div");s.style.height="0",s.appendChild(o);var a=o.offsetParent===s;s=o=null;var u=["height","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],c=["width","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],l=function(t){var e=window.getComputedStyle(t),n={x:0,y:0};return u.each(function(t){n.y+=parseFloat(e[t])}),c.each(function(t){n.x+=parseFloat(e[t])}),n},h=function(t){return"static"!=p(t,"position")||r(t)},f=function(t){return h(t)||/^(?:table|td|th)$/i.test(t.tagName)};Element.implement({scrollTo:function(t,e){return r(this)?this.getWindow().scrollTo(t,e):(this.scrollLeft=t,this.scrollTop=e),this},getSize:function(){if(r(this))return this.getWindow().getSize();if(!window.getComputedStyle)return{x:this.offsetWidth,y:this.offsetHeight};if("svg"==this.get("tag"))return l(this);try{var t=this.getBoundingClientRect();return{x:t.width,y:t.height}}catch(t){return{x:0,y:0}}},getScrollSize:function(){return r(this)?this.getWindow().getScrollSize():{x:this.scrollWidth,y:this.scrollHeight}},getScroll:function(){return r(this)?this.getWindow().getScroll():{x:this.scrollLeft,y:this.scrollTop}},getScrolls:function(){for(var t=this.parentNode,e={x:0,y:0};t&&!r(t);)e.x+=t.scrollLeft,e.y+=t.scrollTop,t=t.parentNode;return e},getOffsetParent:a?function(){var t=this;if(r(t)||"fixed"==p(t,"position"))return null;for(var e="static"==p(t,"position")?f:h;t=t.parentNode;)if(e(t))return t;return null}:function(){var t=this;if(r(t)||"fixed"==p(t,"position"))return null;try{return t.offsetParent}catch(t){}return null},getOffsets:function(){if(this.getBoundingClientRect){var t=this.getBoundingClientRect(),e=document.id(this.getDocument().documentElement),n=e.getScroll(),i=this.getScrolls(),s="fixed"==p(this,"position");return{x:t.left.toFloat()+i.x+(s?0:n.x)-e.clientLeft,y:t.top.toFloat()+i.y+(s?0:n.y)-e.clientTop}}var o=this,a={x:0,y:0};if(r(this))return a;for(;o&&!r(o);)a.x+=o.offsetLeft,a.y+=o.offsetTop,o=o.offsetParent;return a},getPosition:function(t){var r=this.getOffsets(),i=this.getScrolls(),s={x:r.x-i.x,y:r.y-i.y};if(t&&(t=document.id(t))){var o=t.getPosition();return{x:s.x-o.x-n(t),y:s.y-o.y-e(t)}}return s},getCoordinates:function(t){if(r(this))return this.getWindow().getCoordinates();var e=this.getPosition(t),n=this.getSize(),i={left:e.x,top:e.y,width:n.x,height:n.y};return i.right=i.left+i.width,i.bottom=i.top+i.height,i},computePosition:function(e){return{left:e.x-t(this,"margin-left"),top:e.y-t(this,"margin-top")}},setPosition:function(t){return this.setStyles(this.computePosition(t))}}),[Document,Window].invoke("implement",{getSize:function(){var t=i(this);return{x:t.clientWidth,y:t.clientHeight}},getScroll:function(){var t=this.getWindow(),e=i(this);return{x:t.pageXOffset||e.scrollLeft,y:t.pageYOffset||e.scrollTop}},getScrollSize:function(){var t=i(this),e=this.getSize(),n=this.getDocument().body;return{x:Math.max(t.scrollWidth,n.scrollWidth,e.x),y:Math.max(t.scrollHeight,n.scrollHeight,e.y)}},getPosition:function(){return{x:0,y:0}},getCoordinates:function(){var t=this.getSize();return{top:0,left:0,bottom:t.y,right:t.x,height:t.y,width:t.x}}});var p=Element.getComputedStyle}(),Element.alias({position:"setPosition"}),[Window,Document,Element].invoke("implement",{getHeight:function(){return this.getSize().y},getWidth:function(){return this.getSize().x},getScrollTop:function(){return this.getScroll().y},getScrollLeft:function(){return this.getScroll().x},getScrollHeight:function(){return this.getScrollSize().y},getScrollWidth:function(){return this.getScrollSize().x},getTop:function(){return this.getPosition().y},getLeft:function(){return this.getPosition().x}}),function(){var t=this.Fx=new Class({Implements:[Chain,Events,Options,Class.Thenable],options:{fps:60,unit:!1,duration:500,frames:null,frameSkip:!0,link:"ignore"},initialize:function(t){this.subject=this.subject||this,this.setOptions(t)},getTransition:function(){return function(t){return-(Math.cos(Math.PI*t)-1)/2}},step:function(t){if(this.options.frameSkip){var e=null!=this.time?t-this.time:0,n=e/this.frameInterval;this.time=t,this.frame+=n}else this.frame++;if(this.frame<this.frames){var r=this.transition(this.frame/this.frames);this.set(this.compute(this.from,this.to,r))}else this.frame=this.frames,this.set(this.compute(this.from,this.to,1)),this.stop()},set:function(t){return t},compute:function(e,n,r){return t.compute(e,n,r)},check:function(){if(!this.isRunning())return!0;switch(this.options.link){case"cancel":return this.cancel(),!0;case"chain":return this.chain(this.caller.pass(arguments,this)),!1}return!1},start:function(e,n){if(!this.check(e,n))return this;this.from=e,this.to=n,this.frame=this.options.frameSkip?0:-1,this.time=null,this.transition=this.getTransition();var r=this.options.frames,s=this.options.fps,o=this.options.duration;return this.duration=t.Durations[o]||o.toInt(),this.frameInterval=1e3/s,this.frames=r||Math.round(this.duration/this.frameInterval),"pending"!==this.getThenableState()&&this.resetThenable(this.subject),this.fireEvent("start",this.subject),i.call(this,s),this},stop:function(){return this.isRunning()&&(this.time=null,s.call(this,this.options.fps),this.frames==this.frame?(this.fireEvent("complete",this.subject),this.callChain()||this.fireEvent("chainComplete",this.subject)):this.fireEvent("stop",this.subject),this.resolve(this.subject===this?null:this.subject)),this},cancel:function(){return this.isRunning()&&(this.time=null,s.call(this,this.options.fps),this.frame=this.frames,this.fireEvent("cancel",this.subject).clearChain(),this.reject(this.subject)),this},pause:function(){return this.isRunning()&&(this.time=null,s.call(this,this.options.fps)),this},resume:function(){return this.isPaused()&&i.call(this,this.options.fps),this},isRunning:function(){var t=e[this.options.fps];return t&&t.contains(this)},isPaused:function(){return this.frame<this.frames&&!this.isRunning()}});t.compute=function(t,e,n){return(e-t)*n+t},t.Durations={short:250,normal:500,long:1e3};var e={},n={},r=function(){for(var t=Date.now(),e=this.length;e--;){var n=this[e];n&&n.step(t)}},i=function(t){var i=e[t]||(e[t]=[]);i.push(this),n[t]||(n[t]=r.periodical(Math.round(1e3/t),i))},s=function(t){var r=e[t];r&&(r.erase(this),!r.length&&n[t]&&(delete e[t],n[t]=clearInterval(n[t])))}}(),Fx.CSS=new Class({Extends:Fx,prepare:function(t,e,n){n=Array.convert(n);var r=n[0],i=n[1];if(null==i){i=r,r=t.getStyle(e);var s=this.options.unit;if(s&&r&&"string"==typeof r&&r.slice(-s.length)!=s&&0!=parseFloat(r)){t.setStyle(e,i+s);var o=t.getComputedStyle(e);if(!/px$/.test(o)&&null==(o=t.style[("pixel-"+e).camelCase()])){var a=t.style.left;t.style.left=i+s,o=t.style.pixelLeft,t.style.left=a}r=(i||1)/(parseFloat(o)||1)*(parseFloat(r)||0),t.setStyle(e,r+s)}}return{from:this.parse(r),to:this.parse(i)}},parse:function(t){return t=Function.convert(t)(),t="string"==typeof t?t.split(" "):Array.convert(t),t.map(function(t){t=String(t);var e=!1;return Object.each(Fx.CSS.Parsers,function(n){if(!e){var r=n.parse(t);(r||0===r)&&(e={value:r,parser:n})}}),e=e||{value:t,parser:Fx.CSS.Parsers.String}})},compute:function(t,e,n){var r=[];return Math.min(t.length,e.length).times(function(i){r.push({value:t[i].parser.compute(t[i].value,e[i].value,n),parser:t[i].parser})}),r.$family=Function.convert("fx:css:value"),r},serve:function(t,e){"fx:css:value"!=typeOf(t)&&(t=this.parse(t));var n=[];return t.each(function(t){n=n.concat(t.parser.serve(t.value,e))}),n},render:function(t,e,n,r){t.setStyle(e,this.serve(n,r))},search:function(t){if(Fx.CSS.Cache[t])return Fx.CSS.Cache[t];var e={},n=new RegExp("^"+t.escapeRegExp()+"$"),r=function(t){Array.each(t,function(t){if(t.media)return void r(t.rules||t.cssRules);if(t.style){var i=t.selectorText?t.selectorText.replace(/^\w+/,function(t){return t.toLowerCase()}):null;i&&n.test(i)&&Object.each(Element.Styles,function(n,r){t.style[r]&&!Element.ShortStyles[r]&&(n=String(t.style[r]),e[r]=/^rgb/.test(n)?n.rgbToHex():n)})}})};return Array.each(document.styleSheets,function(t){var e=t.href;if(!(e&&e.indexOf("://")>-1&&-1==e.indexOf(document.domain))){var n=t.rules||t.cssRules;r(n)}}),Fx.CSS.Cache[t]=e}}),Fx.CSS.Cache={},Fx.CSS.Parsers={Color:{parse:function(t){return t.match(/^#[0-9a-f]{3,6}$/i)?t.hexToRgb(!0):!!(t=t.match(/(\d+),\s*(\d+),\s*(\d+)/))&&[t[1],t[2],t[3]]},compute:function(t,e,n){return t.map(function(r,i){return Math.round(Fx.compute(t[i],e[i],n))})},serve:function(t){return t.map(Number)}},Number:{parse:parseFloat,compute:Fx.compute,serve:function(t,e){return e?t+e:t}},String:{parse:Function.convert(!1),compute:function(t,e){return e},serve:function(t){return t}}},Fx.Morph=new Class({Extends:Fx.CSS,initialize:function(t,e){this.element=this.subject=document.id(t),this.parent(e)},set:function(t){"string"==typeof t&&(t=this.search(t));for(var e in t)this.render(this.element,e,t[e],this.options.unit);return this},compute:function(t,e,n){var r={};for(var i in t)r[i]=this.parent(t[i],e[i],n);return r},start:function(t){if(!this.check(t))return this;"string"==typeof t&&(t=this.search(t));var e={},n={};for(var r in t){var i=this.prepare(this.element,r,t[r]);e[r]=i.from,n[r]=i.to}return this.parent(e,n)}}),Element.Properties.morph={set:function(t){return this.get("morph").cancel().setOptions(t),this},get:function(){var t=this.retrieve("morph");return t||(t=new Fx.Morph(this,{link:"cancel"}),this.store("morph",t)),t}},Element.implement({morph:function(t){return this.get("morph").start(t),this}}),Fx.implement({getTransition:function(){var t=this.options.transition||Fx.Transitions.Sine.easeInOut;if("string"==typeof t){var e=t.split(":");t=Fx.Transitions,t=t[e[0]]||t[e[0].capitalize()],e[1]&&(t=t["ease"+e[1].capitalize()+(e[2]?e[2].capitalize():"")])}return t}}),Fx.Transition=function(t,e){e=Array.convert(e);var n=function(n){return t(n,e)};return Object.append(n,{easeIn:n,easeOut:function(n){return 1-t(1-n,e)},easeInOut:function(n){return(n<=.5?t(2*n,e):2-t(2*(1-n),e))/2}})},Fx.Transitions={linear:function(t){return t}},Fx.Transitions.extend=function(t){for(var e in t)Fx.Transitions[e]=new Fx.Transition(t[e])},Fx.Transitions.extend({Pow:function(t,e){return Math.pow(t,e&&e[0]||6)},Expo:function(t){return Math.pow(2,8*(t-1))},Circ:function(t){return 1-Math.sin(Math.acos(t))},Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Back:function(t,e){return e=e&&e[0]||1.618,Math.pow(t,2)*((e+1)*t-e)},Bounce:function(t){for(var e,n=0,r=1;1;n+=r,r/=2)if(t>=(7-4*n)/11){e=r*r-Math.pow((11-6*n-11*t)/4,2);break}return e},Elastic:function(t,e){return Math.pow(2,10*--t)*Math.cos(20*t*Math.PI*(e&&e[0]||1)/3)}}),["Quad","Cubic","Quart","Quint"].each(function(t,e){Fx.Transitions[t]=new Fx.Transition(function(t){return Math.pow(t,e+2)})}),Fx.Tween=new Class({Extends:Fx.CSS,initialize:function(t,e){this.element=this.subject=document.id(t),this.parent(e)},set:function(t,e){return 1==arguments.length&&(e=t,t=this.property||this.options.property),this.render(this.element,t,e,this.options.unit),this},start:function(t,e,n){if(!this.check(t,e,n))return this;var r=Array.flatten(arguments);this.property=this.options.property||r.shift();var i=this.prepare(this.element,this.property,r);return this.parent(i.from,i.to)}}),Element.Properties.tween={set:function(t){return this.get("tween").cancel().setOptions(t),this},get:function(){var t=this.retrieve("tween");return t||(t=new Fx.Tween(this,{link:"cancel"}),this.store("tween",t)),t}},Element.implement({tween:function(t,e,n){return this.get("tween").start(t,e,n),this},fade:function(){var t,e,n=this.get("tween"),r=["opacity"].append(arguments);switch(null==r[1]&&(r[1]="toggle"),r[1]){case"in":t="start",r[1]=1;break;case"out":t="start",r[1]=0;break;case"show":t="set",r[1]=1;break;case"hide":t="set",r[1]=0;break;case"toggle":var i=this.retrieve("fade:flag",1==this.getStyle("opacity"));t="start",r[1]=i?0:1,this.store("fade:flag",!i),e=!0;break;default:t="start"}e||this.eliminate("fade:flag"),n[t].apply(n,r);var s=r[r.length-1];return"set"==t?this.setStyle("visibility",0==s?"hidden":"visible"):0!=s?n.$chain.length?n.chain(function(){this.element.setStyle("visibility","visible"),this.callChain()}):this.setStyle("visibility","visible"):n.chain(function(){this.element.getStyle("opacity")||(this.element.setStyle("visibility","hidden"),this.callChain())}),this},highlight:function(t,e){e||(e=this.retrieve("highlight:original",this.getStyle("background-color")),e="transparent"==e?"#fff":e);var n=this.get("tween");return n.start("background-color",t||"#ffff88",e).chain(function(){this.setStyle("background-color",this.retrieve("highlight:original")),n.callChain()}.bind(this)),this}}),function(){var t=function(){},e="onprogress"in new Browser.Request,n=this.Request=new Class({Implements:[Chain,Events,Options,Class.Thenable],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:!0,format:!1,method:"post",link:"ignore",isSuccess:null,emulation:!0,urlEncoded:!0,encoding:"utf-8",evalScripts:!1,evalResponse:!1,timeout:0,noCache:!1},initialize:function(t){this.xhr=new Browser.Request,this.setOptions(t),this.headers=this.options.headers},onStateChange:function(){var n=this.xhr;4==n.readyState&&this.running&&(this.running=!1,this.status=0,Function.attempt(function(){var t=n.status;this.status=1223==t?204:t}.bind(this)),n.onreadystatechange=t,e&&(n.onprogress=n.onloadstart=t),this.timer&&(clearTimeout(this.timer),delete this.timer),this.response={text:this.xhr.responseText||"",xml:this.xhr.responseXML},this.options.isSuccess.call(this,this.status)?this.success(this.response.text,this.response.xml):this.failure())},isSuccess:function(){var t=this.status;return t>=200&&t<300},isRunning:function(){return!!this.running},processScripts:function(t){return this.options.evalResponse||/(ecma|java)script/.test(this.getHeader("Content-type"))?Browser.exec(t):t.stripScripts(this.options.evalScripts)},success:function(t,e){this.onSuccess(this.processScripts(t),e),this.resolve({text:t,xml:e})},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain()},failure:function(){this.onFailure(),this.reject({reason:"failure",xhr:this.xhr})},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr)},loadstart:function(t){this.fireEvent("loadstart",[t,this.xhr])},progress:function(t){this.fireEvent("progress",[t,this.xhr])},timeout:function(){this.fireEvent("timeout",this.xhr),this.reject({reason:"timeout",xhr:this.xhr})},setHeader:function(t,e){return this.headers[t]=e,this},getHeader:function(t){return Function.attempt(function(){return this.xhr.getResponseHeader(t)}.bind(this))},check:function(){if(!this.running)return!0;switch(this.options.link){case"cancel":return this.cancel(),!0;case"chain":return this.chain(this.caller.pass(arguments,this)),!1}return!1},send:function(t){if(!this.check(t))return this;this.options.isSuccess=this.options.isSuccess||this.isSuccess,this.running=!0;var n=typeOf(t);"string"!=n&&"element"!=n||(t={data:t});var r=this.options;t=Object.append({data:r.data,url:r.url,method:r.method},t);var i=t.data,s=String(t.url),o=t.method.toLowerCase();switch(typeOf(i)){case"element":i=document.id(i).toQueryString();break;case"object":case"hash":i=Object.toQueryString(i)}if(this.options.format){var a="format="+this.options.format;i=i?a+"&"+i:a}if(this.options.emulation&&!["get","post"].contains(o)){var u="_method="+o;i=i?u+"&"+i:u,o="post"}if(this.options.urlEncoded&&["post","put"].contains(o)){var c=this.options.encoding?"; charset="+this.options.encoding:"";this.headers["Content-type"]="application/x-www-form-urlencoded"+c}s||(s=document.location.pathname);var l=s.lastIndexOf("/");l>-1&&(l=s.indexOf("#"))>-1&&(s=s.substr(0,l)),this.options.noCache&&(s+=(s.indexOf("?")>-1?"&":"?")+String.uniqueID()),!i||"get"!=o&&"delete"!=o||(s+=(s.indexOf("?")>-1?"&":"?")+i,i=null);var h=this.xhr;return e&&(h.onloadstart=this.loadstart.bind(this),h.onprogress=this.progress.bind(this)),h.open(o.toUpperCase(),s,this.options.async,this.options.user,this.options.password),this.options.withCredentials&&"withCredentials"in h&&(h.withCredentials=!0),h.onreadystatechange=this.onStateChange.bind(this),Object.each(this.headers,function(t,e){try{h.setRequestHeader(e,t)}catch(n){this.fireEvent("exception",[e,t]),this.reject({reason:"exception",xhr:h,exception:n})}},this),"pending"!==this.getThenableState()&&this.resetThenable({reason:"send"}),this.fireEvent("request"),h.send(i),this.options.async?this.options.timeout&&(this.timer=this.timeout.delay(this.options.timeout,this)):this.onStateChange(),this},cancel:function(){if(!this.running)return this;this.running=!1;var n=this.xhr;return n.abort(),this.timer&&(clearTimeout(this.timer),delete this.timer),n.onreadystatechange=t,e&&(n.onprogress=n.onloadstart=t),this.xhr=new Browser.Request,this.fireEvent("cancel"),this.reject({reason:"cancel",xhr:n}),this}}),r={};["get","post","put","delete","patch","head","GET","POST","PUT","DELETE","PATCH","HEAD"].each(function(t){r[t]=function(e){var n={method:t};return null!=e&&(n.data=e),this.send(n)}}),n.implement(r),Element.Properties.send={set:function(t){return this.get("send").cancel().setOptions(t),this},get:function(){var t=this.retrieve("send");return t||(t=new n({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")}),this.store("send",t)),t}},Element.implement({send:function(t){var e=this.get("send");return e.send({data:this,url:t||e.options.url}),this}})}(),Request.HTML=new Class({Extends:Request,options:{update:!1,append:!1,evalScripts:!0,filter:!1,headers:{Accept:"text/html, application/xml, text/xml, */*"}},success:function(t){var e=this.options,n=this.response;n.html=t.stripScripts(function(t){n.javascript=t});var r=n.html.match(/<body[^>]*>([\s\S]*?)<\/body>/i);r&&(n.html=r[1]);var i=new Element("div").set("html",n.html);if(n.tree=i.childNodes,n.elements=i.getElements(e.filter||"*"),e.filter&&(n.tree=n.elements),e.update){var s=document.id(e.update).empty();e.filter?s.adopt(n.elements):s.set("html",n.html)}else if(e.append){var o=document.id(e.append);e.filter?n.elements.reverse().inject(o):o.adopt(i.getChildren())}e.evalScripts&&Browser.exec(n.javascript),this.onSuccess(n.tree,n.elements,n.html,n.javascript),this.resolve({tree:n.tree,elements:n.elements,html:n.html,javascript:n.javascript})}}),Element.Properties.load={set:function(t){return this.get("load").cancel().setOptions(t),this},get:function(){var t=this.retrieve("load");return t||(t=new Request.HTML({data:this,link:"cancel",update:this,method:"get"}),this.store("load",t)),t}},Element.implement({load:function(){return this.get("load").send(Array.link(arguments,{data:Type.isObject,url:Type.isString})),this}}),"undefined"==typeof JSON&&(this.JSON={}),function(){var special={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},escape=function(t){return special[t]||"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)};JSON.validate=function(t){return t=t.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""),/^[\],:{}\s]*$/.test(t)},JSON.encode=JSON.stringify?function(t){return JSON.stringify(t)}:function(t){switch(t&&t.toJSON&&(t=t.toJSON()),typeOf(t)){case"string":return'"'+t.replace(/[\x00-\x1f\\"]/g,escape)+'"';case"array":return"["+t.map(JSON.encode).clean()+"]";case"object":case"hash":var e=[];return Object.each(t,function(t,n){var r=JSON.encode(t);r&&e.push(JSON.encode(n)+":"+r)}),"{"+e+"}";case"number":case"boolean":return""+t;case"null":return"null"}return null},JSON.secure=!0,JSON.decode=function(string,secure){if(!string||"string"!=typeOf(string))return null;if(null==secure&&(secure=JSON.secure),secure){if(JSON.parse)return JSON.parse(string);if(!JSON.validate(string))throw new Error("JSON could not decode the input; security is enabled and the value is not secure.")}return eval("("+string+")")}}(),Request.JSON=new Class({Extends:Request,options:{secure:!0},initialize:function(t){this.parent(t),Object.append(this.headers,{Accept:"application/json","X-Request":"JSON"})},success:function(t){var e;try{e=this.response.json=JSON.decode(t,this.options.secure)}catch(e){return void this.fireEvent("error",[t,e])}null==e?this.failure():(this.onSuccess(e,t),this.resolve({json:e,text:t}))}});var Cookie=new Class({Implements:Options,options:{path:"/",domain:!1,duration:!1,secure:!1,document:document,encode:!0,httpOnly:!1},initialize:function(t,e){this.key=t,this.setOptions(e)},write:function(t){if(this.options.encode&&(t=encodeURIComponent(t)),this.options.domain&&(t+="; domain="+this.options.domain),this.options.path&&(t+="; path="+this.options.path),this.options.duration){var e=new Date;e.setTime(e.getTime()+24*this.options.duration*60*60*1e3),t+="; expires="+e.toGMTString()}return this.options.secure&&(t+="; secure"),this.options.httpOnly&&(t+="; HttpOnly"),this.options.document.cookie=this.key+"="+t,this},read:function(){var t=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");return t?decodeURIComponent(t[1]):null},dispose:function(){return new Cookie(this.key,Object.merge({},this.options,{duration:-1})).write(""),this}});Cookie.write=function(t,e,n){return new Cookie(t,n).write(e)},Cookie.read=function(t){return new Cookie(t).read()},Cookie.dispose=function(t,e){return new Cookie(t,e).dispose()},function(t,e){var n,r,i,s,o=[],a=e.createElement("div"),u=function(){clearTimeout(s),n||(Browser.loaded=n=!0,e.removeListener("DOMContentLoaded",u).removeListener("readystatechange",c),e.fireEvent("domready"),t.fireEvent("domready")),e=t=a=null},c=function(){for(var t=o.length;t--;)if(o[t]())return u(),!0;return!1},l=function(){clearTimeout(s),c()||(s=setTimeout(l,10))};e.addListener("DOMContentLoaded",u);var h=function(){try{return a.doScroll(),!0}catch(t){}return!1};a.doScroll&&!h()&&(o.push(h),i=!0),e.readyState&&o.push(function(){var t=e.readyState;return"loaded"==t||"complete"==t}),"onreadystatechange"in e?e.addListener("readystatechange",c):i=!0,i&&l(),Element.Events.domready={onAdd:function(t){n&&t.call(this)}},Element.Events.load={base:"load",onAdd:function(e){r&&this==t&&e.call(this)},condition:function(){return this==t&&(u(),delete Element.Events.load),!0}},t.addEvent("load",function(){r=!0})}(window,document); var isMac = navigator.appVersion.indexOf("Mac")!=-1 ? true : false; var isFireFox = navigator.userAgent.indexOf("Firefox")!=-1 ? true : false; var isFF = isFireFox; var isSafari = navigator.userAgent.indexOf("Safari")!=-1 ? true : false; var isNetscape = navigator.appName == "Netscape" ? true : false; var isOpera = navigator.userAgent.indexOf("Opera")!=-1 ? true : false; var isIE = document.all && !isOpera ? true : false; var isMoz = isFF || (isNetscape && !isSafari) ? true : false; window.addEvent('domready', function() { scDatePickerSetup(); scFormSetup(); }); // optionally support time selection with additional class of dateTimeFld function scDatePickerSetup() { $$('.dateFld, .dateTimeFld').each(function(datePickerFld) { if (datePickerFld.hasAttribute('readonly') || datePickerFld.hasClass('datePickerSetup') || datePickerFld.type != 'text') return; var datePickerBtnId = datePickerFld.id + '_toggle'; var datePickerBtn = new Element('a', {'class': 'datePickerBtn', 'id': datePickerBtnId}); datePickerBtn.inject(datePickerFld,'after'); if (datePickerFld.hasClass('dateTimeFld')) { var timePicker = true; var dateFormat = '%b %d, %Y %I:%M %p'; } else { var timePicker = false; var dateFormat = '%b %d, %Y'; } new DatePicker( datePickerFld, { pickerClass: 'datepicker_vista', toggle: datePickerFld.id + '_toggle', timePicker: datePickerFld.hasClass('dateTimeFld'), format: dateFormat } ); if (datePickerFld.getStyle('display') == 'none') $(datePickerFld.id + '_toggle').setStyle('display','none'); datePickerFld.addClass('datePickerSetup'); }); } function scFormSetup() { // so that when you enter 3 numbers, it jumps to the next field automatically. $$('.phone1, .phone2').addEvent('keyup', function(e){ if (this.value.length == 3 && e.code != 16 && e.code != 9 && e.code != 17 && e.code !=37 && e.code != 39) { var parent = this.getParent(); var nextFld = parent.getElement(this.hasClass('phone1') ? '.phone2' : '.phone3'); if (nextFld) nextFld.focus(); } }); } // this is here, because IE doesn't support CSS pseudo classes "hover, active, etc..." // elemRef is optional...if left out, the element that was moused over will get it's className swapped // elemId is the ID of the elemnt you want to swap. function swapClass(evtRef, elemRef, elemId) { if (!evtRef) return; if (!elemRef && elemId) elemRef = document.getElementById(elemId); if (!elemRef) var elemRef = evtRef.target ? evtRef.target : evtRef.srcElement; if (!elemRef.oldClassName) elemRef.oldClassName = elemRef.className; if (evtRef.type == "mouseover" || evtRef.type == "mousedown") { if (elemRef.className.indexOf('click') == -1) elemRef.className = elemRef.oldClassName + "-" + evtRef.type; } else if (evtRef.type == "click"){ if (elemRef.className.indexOf('click') == -1) { elemRef.className = elemRef.oldClassName + "-click" } else { elemRef.className = elemRef.oldClassName; } } else { if (elemRef.className.indexOf('click') == -1) elemRef.className = elemRef.oldClassName; } } function swapDisplay(elemRef) { elemRef = typeof(elemRef) == 'object' ? elemRef : document.getElementById(elemRef); if (elemRef) { // doesn't have an inline style, set one based on class if possible if (!elemRef.style.display && (elemRef.className.indexOf('sc_hide') != -1 || elemRef.className.indexOf('sc_show') != -1)) { if (elemRef.className.indexOf('sc_hide') != -1) { elemRef.className = elemRef.className.replace('sc_hide','sc_show'); } else if (elemRef.className.indexOf('sc_show') != -1) { elemRef.className = elemRef.className.replace('sc_show','sc_hide'); } } else { elemRef.style.display = elemRef.style.display == 'none' ? '' : 'none'; } elemRef.style.zoom = '1'; } } function getFirstChildElement(elemRef) { if (typeof(elemRef) == 'string') elemRef = document.getElementById(elemRef); if (elemRef) { // IE prior to 6.0 still treats a comment as node type 1, so we add something to throw that out by nodeName firstChildRef = elemRef.firstChild; if (firstChildRef) { if (firstChildRef.nodeType != 1 || firstChildRef.nodeName == '!') { firstChildRef = firstChildRef.nextSibling; } if (firstChildRef) { if (firstChildRef.nodeType != 1 || firstChildRef.nodeName == '!') { firstChildRef = firstChildRef.nextSibling; } } if (firstChildRef) { if (firstChildRef.nodeType != 1 || firstChildRef.nodeName == '!') { firstChildRef = firstChildRef.nextSibling; } } } if (firstChildRef) return firstChildRef; } } function getElementsByPartialId(parent,tag,match) { var i; var matches = new Array(); if (typeof (parent) == 'string') { parent = document.getElementById(parent); } if (!parent) return false; var allTags = parent.getElementsByTagName(tag); if (!allTags) return matches; for(i=0;allTags[i];i++) { if (allTags[i].id.indexOf(match) != -1) { matches[matches.length] = allTags[i]; } } return matches; } function dumpElement(elemRef) { // into a table showing each prop and its value var t; var dumpArr = new Array(); var propArr = new Array(); var prop; for(prop in elemRef) { dumpArr[prop] = elemRef[prop]; propArr[propArr.length] = prop; } propArr.sort(); t += '<html><head><style>td {font-size: 10px; font-family: tahoma}</style></head><body><table border="1">'; for(i=0; i < propArr.length; i++) { prop = propArr[i]; t += '<tr><td>' + prop + '</td><td>'; if (prop == 'innerHTML' || prop == 'outerHTML') { t += 'HTML ...'; } else { t += dumpArr[prop]; } t += ' </td></tr>'; } t += '</table></body></html>'; var newWin = window.open(); newWin.document.write(t); } // useful when you need to simulate tabbing to the next field via focus. function findNextTabStop(el) { var universe = document.querySelectorAll('input, button, select, textarea, a[href]'); var list = Array.prototype.filter.call(universe, function(item) {return item.tabIndex >= "0"}); var index = list.indexOf(el); return list[index + 1] || list[0]; } function formatDecimal (num, decplaces) { num = parseFloat(num); if (!isNaN(num)) { // round the result to the nearest integer; var str = "" + Math.round (eval(num) * Math.pow(10,decplaces)); if (str.indexOf("e") != -1) { return "Out of Range"; } // to the left of the number while (str.length <= decplaces) { str = "0" + str; } var decpoint = str.length - decplaces; // the decimal point; (b) the decimal point; and (c) the balance return str.substring(0,decpoint) + "." + str.substring(decpoint,str.length); } else { return "NaN"; } } function formatCommas(numString) { if (numString == 'NaN') return; var re = /(\.\d*)/; var dec = numString.match(re)[0]; numString = numString.replace(dec,''); re = /(-?\d+)(\d{3})/; while (re.test(numString)) { numString = numString.replace(re, "$1,$2"); } numString += dec; return numString; } function formatCurrency(num) { if (typeof(num) != 'string') num = num.toString(); return formatCommas(formatDecimal(num,2)); } function setIFrameHeight(iFrame) { if (!iFrame) return; if (typeof(iFrame) == 'string') iFrame = document.getElementById(iFrame); var extraHeight = 20; var firstDiv = getFirstChildElement(iFrame.contentWindow.document.body); if (firstDiv && firstDiv.nodeName == 'DIV' && firstDiv.offsetTop > 0) extraHeight += firstDiv.offsetTop; iFrame.style.height = (iFrame.contentWindow.document.body.scrollHeight + extraHeight) + 'px'; var waitDiv = document.getElementById(iFrame.id.replace('post_frame_','post_frame_wait_')); if (waitDiv && waitDiv.nodeName == 'DIV') waitDiv.style.display = 'none'; iFrame.style.visibility = 'visible'; } function trim(str) { return str.replace(/^\s*|\s*$/g,""); } function validColorHex(str) { return str.match(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/); } function validEmail(str){ return str.match(/^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$/); } function validNonHTML(str) { return !str.match(/<(\"[^\"]*\"|'[^']*'|[^'\">])*>/); } function validURL(str) { return str.match(/^(ht|f)tp(s?)\:\/\/[a-zA-Z0-9-\._]+([a-zA-Z0-9\-\._]*(\.[a-zA-Z0-9\-\._]+){2,})?(\/?)([a-zA-Z0-9:\-\.\?\,\'\/\\\+&%\$#_~]*)?$/); } function validURLFolder(str) { return str.match(/^[_a-zA-Z0-9-]*$/); } function validRelativePathNoDots(str) { return str.match(/^[_a-zA-Z0-9-\/]*$/); } function validRelativePath(str) { return str.match(/^[_a-zA-Z0-9-\/\.]*$/); } function validInteger(str) { return str.match(/^[0-9]*$/); } // matches: // 1 // 1.245 function validAmount(str) { return str.match(/^[0-9]*(\.[0-9]*)?$/); } function scCreateCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function scReadCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function scEraseCookie(name) { createCookie(name,"",-1); } if (typeof (typeOf) != 'function') { function typeOf(e) { return typeof e; } } function contactForm(elem, evt) { if (elem.id == 'State_Other' && evt.type == 'keyup') { if (elem.value.length) { if (document.getElementById('State_or_Province')) document.getElementById('State_or_Province').value = 2 } } else if (elem.id == 'State_or_Province' && evt.type == 'change') { if (document.getElementById('State_Other')) { var stateOther = document.getElementById('State_Other'); if (elem.options[elem.selectedIndex].value == '2') { stateOther.value = ''; stateOther.focus(); } else { stateOther.value=''; } } } } window.addEvent('domready', function() { scQtSetup(); scQtUpdateAll(); }); function getPseudoAttribute(elemRef, attr) { elemRef = typeof(elemRef) == 'object' ? elemRef : document.getElementById(elemRef); if (typeof(elemRef) != 'object') return null; var className = elemRef.className; if (!className) return null; var re = new RegExp(attr + "([^\\s]*)\\s?"); var attrMatch = className.match(re); if (!attrMatch) return null; if (attrMatch[1]) { return attrMatch[1]; } else if (attrMatch[0]) { return attrMatch[0]; } else { return null; } } function scQtBail(trigger, qtOuterDiv, isMultiAdd, noMultiAdd) { scQtHide(qtOuterDiv); if (isMultiAdd && !noMultiAdd) scQtUpdateAll(trigger); } var qtLastIdPrefix; function scQtChange(trigger) { var prodDiv = trigger.getParent('.prod'); if (!prodDiv) return; var prodRnFld = prodDiv.getElement('.prod_rn'); var prodRn = prodRnFld.value; var idPrefix = prodRnFld.id.replace('prod_rn',''); qtLastIdPrefix = idPrefix; var qtyFld = $(idPrefix + 'quantity'); var isMultiAdd = qtyFld.name == 'MULTI_ADD_' + prodRn + '_quantity'; var namePrefix = isMultiAdd ? 'MULTI_ADD_' + prodRn + '_' : ''; var discountsPresent = prodDiv.getElement('input[name=' + namePrefix + 'discounts_present]') ? 1 : 0; var isAddOn = trigger.getParent('.add_on_products'); if (trigger.id == idPrefix + 'quantity' && discountsPresent && !isAddOn) { var qty = trigger.value; if (qty) { qty = parseInt(qty); if (qty) x_sc_get_discount('product',prodRn,0,0,0,0,qty,scQtUpdate); } else { scQtUpdate(trigger); } } else { scQtUpdate(trigger); } } function scQtHide(qtOuterDiv) { qtOuterDiv.setStyle('display','none'); } function scQtSetup() { $$('#sc .prod input, #sc .prod textarea').addEvents({ keyup: function() {scQtChange(this);}, paste: function() {scQtChange(this);} }); $$('#sc .prod input[type="file"], #sc .prod input[type="checkbox"]').addEvent('change', function(){scQtChange(this); return false;}); $$('#sc .prod select, #sc .prod input[type="radio"]').addEvents({ click: function(){scQtChange(this);}, keyup: function(){scQtChange(this);} }); } function scQtShow(qtOuterDiv, prodTotal) { prodTotal = formatCurrency(prodTotal); qtOuterDiv.getElement('.quick_total_total').set('html', '$' + prodTotal + ''); qtOuterDiv.setStyle('display','block'); var modal = qtOuterDiv.getParent('.modal'); scModalSize(modal); } function scQtUpdate(trigger, noMultiAdd) { var prodRn; var discountPrice = 0; var discountedQty = 0; var discountedQtyInCart = 0; if (typeof trigger == 'string') { var discountArray = trigger.split('^^^'); var prodRn = discountArray[0]; discountPrice = discountArray[1]; discountedQty = discountArray[2]; discountedQtyInCart = discountArray[3]; trigger = qtLastIdPrefix.contains(prodRn) ? $(qtLastIdPrefix + 'quantity') : $('P' + prodRn + '_' + 'quantity'); } var prodDiv = trigger.getParent('.prod'); if (!prodDiv) return; var qtOuterDiv = prodDiv.getElement('.quick_total'); if (!qtOuterDiv) return; var qtTotalDiv = qtOuterDiv.getElement('.quick_total_total'); if (!qtTotalDiv) return scQtHide(qtOuterDiv); var prodRnInput = prodDiv.getElement('.prod_rn'); if (!prodRn) prodRn = prodRnInput.value; var prodForm = trigger.getParent('form'); if (!prodForm) return scQtHide(qtOuterDiv); var prodTotal = 0; var opsPrice = 0; var liOpsPrice = 0; var idPrefix = prodRnInput.id.replace('prod_rn',''); var qtyFld = $(idPrefix + 'quantityCopy') || $(idPrefix + 'quantity'); var qty; if (qtyFld.type == 'checkbox') { var qtyMain = 0; var qtyLabel = qtyFld.getParent('label'); if (!qtyLabel) { var qtyWrap = qtyFld.getParent('.add_on_qty_wrap'); if (qtyWrap) qtyLabel = qtyWrap.getElement('label'); } if (qtyLabel && qtyLabel.id) { var qtyMainId = qtyLabel.id.replace(idPrefix + 'ADDON_FOR_',''); qtyMainId = 'P' + qtyMainId + '_quantity'; var qtyMainFld = $(qtyMainId); if (qtyMainFld) { qtyMain = qtyMainFld.type == 'checkbox' && qtyMainFld.checked ? 1 : qtyMainFld.value; } } qty = qtyFld.checked ? qtyMain : 0; } else { qty = qtyFld.value.toFloat(); } var isMultiAdd = qtyFld.name == 'MULTI_ADD_' + prodRn + '_quantity'; var isInModal = qtyFld.getParent('.modal'); var namePrefix = isMultiAdd ? 'MULTI_ADD_' + prodRn + '_' : ''; var basePrice = $(idPrefix + 'b_price'); var optCountFld = $(idPrefix + 'option_count'); var optCount = optCountFld ? optCountFld.value.toInt() : 0; var basePrice = !basePrice ? 0 : basePrice.value.toFloat(); if (isNaN(qty) || !qty) { return scQtBail(trigger, qtOuterDiv, isMultiAdd, noMultiAdd); } if (discountArray) { if (discountedQty) { prodDiv.getElement('input[name=' + namePrefix + 'discount_price]').value = discountPrice; prodDiv.getElement('input[name=' + namePrefix + 'discounted_qty]').value = discountedQty; prodDiv.getElement('input[name=' + namePrefix + 'discounted_qty_in_cart]').value = discountedQtyInCart; } else { prodDiv.getElement('input[name=' + namePrefix + 'discount_price]').value = 0; prodDiv.getElement('input[name=' + namePrefix + 'discounted_qty]').value = 0; prodDiv.getElement('input[name=' + namePrefix + 'discounted_qty_in_cart]').value = 0; } } var optsHandled = 0; var optIndex = 0; while(optsHandled != optCount) { val = 0; isPercentage = 0; fld = prodDiv.getElements('*[name=' + namePrefix + 'option_' + optIndex + ']'); if (fld && fld.length) { var isPerLineItem = fld.getParent('.opt_calculate2') != ''; if (fld.length == 1) fld = fld[0]; if (prodForm['saved_option_' + (optIndex)] && prodForm['saved_option_' + (optIndex)].value.length > 0) fld = prodForm['saved_option_' + (optIndex)]; optQtyFld = prodDiv.getElementById(idPrefix + 'QTY_option_' + (optIndex)); if (optQtyFld) { optQty = optQtyFld.nodeName == 'SELECT' ? optQtyFld.options[optQtyFld.options.selectedIndex].value : optQtyFld.value; } else { optQty = 1; } if (!fld.nodeName) { x=0; while (opt = fld[x]) { if (opt.checked) val = parseFloat(getPseudoAttribute(opt, 'qt_price-')); isPercentage = getPseudoAttribute(opt, 'qt_percentage'); if (val > 0) break x++; } } else if (fld.nodeName == 'SELECT') { val = parseFloat( getPseudoAttribute(fld.options[fld.options.selectedIndex], 'qt_price-') ); isPercentage = getPseudoAttribute(fld.options[fld.options.selectedIndex], 'qt_percentage'); } else if (fld.hasClass('opt_var_price')) { val = parseFloat(fld.value); isPercentage = 0; } else if ( ( (fld.type == 'text' || fld.type == 'textarea' || fld.type == 'file') && fld.value.length > 0 ) || ( fld.type == 'checkbox' && fld.checked ) || ( fld.type == 'radio' && fld.checked ) || ( fld.type == 'hidden' && optQty ) ) { val = parseFloat(getPseudoAttribute(fld, 'qt_price-')); isPercentage = getPseudoAttribute(fld, 'qt_percentage'); } else { val = 0; isPercentage = 0; } if (!val) val = 0; val *= optQty; if (fld.nodeName) { pricePoint = getPseudoAttribute(fld, 'qt_price_point-'); if (pricePoint == 'char' || pricePoint == 'char_spaces') { if (pricePoint == 'char_spaces') { val *= fld.value.length; } else if (pricePoint == 'char') { val *= fld.value.replace(/\s/g,'').length; } } } if (isPercentage == '1') { percentOpts[percentOpts.length] = val; } else if (isPerLineItem) { liOpsPrice += val; } else { opsPrice += val; } } else if (prodDiv.getElements('*[name=' + namePrefix + 'option_' + optIndex + '\[0\]]')) { var choiceIndex = 0; while (fld = prodDiv.getElement('*[name="' + namePrefix + 'option_' + optIndex + '[' + choiceIndex + ']"]')) { if (fld.type == 'hidden' || fld.hasClass('sc_hide')) { val = parseFloat(getPseudoAttribute(fld, 'qt_price-')); optQtyFld = prodDiv.getElementById(idPrefix + 'QTY_option_' + optIndex + '_' + choiceIndex); if (optQtyFld) { if (optQtyFld.type == 'text' || optQtyFld.type == 'number') { optQty = parseFloat(optQtyFld.value); } else if (optQtyFld.nodeName == 'SELECT') { optQty = optQtyFld.options[optQtyFld.options.selectedIndex].value; } if (optQty > 0) { val = val * optQty; } else { val = 0; } } } else if (fld.type == 'checkbox') { val = fld.checked ? parseFloat(getPseudoAttribute(fld, 'qt_price-')) : 0; } if (isNaN(val)) val = 0; if (isPerLineItem) { liOpsPrice += val; } else { opsPrice += val; } choiceIndex++; } } optsHandled++; optIndex++; } var discountedQty = prodDiv.getElement('input[name=' + namePrefix + 'discounted_qty]'); discountedQty = discountedQty && discountedQty.value ? discountedQty.value.toInt() : 0; if (discountedQty) { if (discountedQty >= qty) discountedQty = qty; var discountPrice = prodDiv.getElement('input[name=' + namePrefix + 'discount_price]'); if (!isNaN(discountPrice.value)) { discountPrice = discountPrice.value.toFloat(); } else { discountPrice = basePrice; } var discountedQtyInCart = parseInt(prodDiv.getElement('input[name=' + namePrefix + 'discounted_qty_in_cart]').value); if (isNaN(discountedQtyInCart)) discountedQtyInCart = 0; var regPriceQty = qty - discountedQty; var discountedTotal = (opsPrice + discountPrice) * discountedQty; var regTotal = (opsPrice + basePrice) * regPriceQty; prodTotal = discountedTotal + regTotal; prodTotal += liOpsPrice; } else { prodTotal = basePrice + opsPrice; if (qty) { prodTotal *= qty; } else { prodTotal = 0; } prodTotal += liOpsPrice; } if (qty.toString().length > 14) prodTotal = basePrice; if (prodTotal == 0 || (prodTotal == basePrice && !isMultiAdd && !isInModal)) { scQtHide(qtOuterDiv); } else { scQtShow(qtOuterDiv, prodTotal); } if (isMultiAdd && !noMultiAdd) scQtUpdateAll(trigger); if (!isNaN(prodTotal)) { return prodTotal; } else { return 0; } } function scQtUpdateAll() { var qtyFlds = $$('.qty'); var grandTotal = 0; var quickTotalMultiDiv = $$('.multi_add_footer .quick_total'); var isMultiAdd = quickTotalMultiDiv.length > 0; qtyFlds.each( function(qtyFld) { if (isMultiAdd) { prodTotal = scQtUpdate(qtyFld, true); if (!isNaN(prodTotal)) grandTotal += prodTotal; } else { scQtChange(qtyFld); } } ); if (grandTotal) scQtShow(quickTotalMultiDiv, grandTotal); } function rvSetRating(starA) { var raterID = starA.parentNode.parentNode.id; if (typeof raterID != 'string') return; var currentRatingLI = getFirstChildElement(document.getElementById(raterID)); var ratingNumber = starA.innerHTML; var ratingInt = parseInt(ratingNumber); var ratingPercent = ratingInt * 20; document.getElementById(raterID + '_rating').value = ratingNumber; currentRatingLI.style.backgroundPosition = 'left bottom'; currentRatingLI.style.width = ratingPercent.toString() + '%'; document.getElementById(raterID + '_your_rating_number').innerHTML = ratingNumber; document.getElementById(raterID + '_rv_your_rating_info').style.display = 'inline'; } window.addEvent('domready', function() { scStoreSetup(); }); window.addEvent('load', function() { scSmartFloatSetup(); }); (function($){ $(document).ready(function(){ if (("ontouchstart" in document.documentElement)) $('body').addClass('touch'); scCarouselSetup(); scCartFormSetup(); scLightboxSetup(); scFadeInOnScrollSetup(); }); $(window).load(function(){ }); function scFadeInOnScrollSetup() { scFadeInOnScroll(1); $(window).scroll( function() {scFadeInOnScroll()}); } function scFadeInOnScroll(init) { $('.sc_content, .boxc, .nav_block').each( function(i){ var bottom_of_object = $(this).offset().top + $(this).outerHeight(); var top_of_object = $(this).offset().top; var bottom_of_window = $(window).scrollTop() + $(window).height(); if(!init && bottom_of_window > top_of_object + 50){ $(this).animate({'opacity':'1'},1000); } else if (bottom_of_window < top_of_object + 50) { $(this).css('opacity', '.2'); } }); } function scCarouselSetup() { $('.sc_carousel').each(function(){ var csl = $(this); var prodXtraMode; var opItems = parseInt(csl.attr('data-csl-items')) || 3; var opAutoWidth = false; var opResponsive = {}; var opMargin = 0; var opAutoplay = csl.attr('data-csl-autoplay') == 1; var opLoop = csl.attr('data-csl-loop') == 1; var opAutoplayHoverPause = opAutoplay ? true : false; var opLazyLoad = csl.attr('data-csl-lazyload') == 1; var opNav = csl.attr('data-csl-nav') != 0; var opAnimateOut= csl.attr('data-csl-animateout') || false; var prodOuter = csl.parents('.prod_img_outer'); var res = csl.attr('data-csl-responsive'); if (res) { var resPieces = res.split(','); var resOpt; $.each(resPieces, function(i, value) { resOpt = value.split(':'); opResponsive[resOpt[0]] = {items: parseInt(resOpt[1])}; }); } if (csl.hasClass('prod_img1')) { prodXtraMode = 1; opItems = 1; opAnimateOut = 'fadeOut'; } else if (prodOuter.hasClass('prod_img2')) { prodXtraMode = 2; opNav = false; var mainImgA = prodOuter.find('.prod_img a').first(); var xtraImgsA = csl.find('a'); csl.find('a').on('click', function(evt){ evt.preventDefault(); evt.stopImmediatePropagation(); var xtraImgA = $(this).first(); var xtraImgAHref = xtraImgA.attr('href'); var xtraImg = xtraImgA.find('img').first(); var xtraImgSrc = xtraImg.attr('src'); var mainImg = mainImgA.find('img').first(); var mainImgAHref = mainImgA.attr('href'); mainImg .attr('src', xtraImgA.attr('data-csl-reg-img')); mainImgA.attr('href',xtraImgAHref); mainImgA.attr('data-csl-img-thumb', xtraImgSrc); xtraImgA.attr('href',mainImgAHref); }) } else if (csl.hasClass('opt_carousel')) { opItems = 6; } var opAutoWidth = prodXtraMode == 2; if (csl.hasClass('opt_carousel')) { var imgCount = csl.find('img').length; opMargin = 10; var inModal = $(csl).parents('.modal').length; if (inModal) { opItems = 4; } else { opResponsive = {0:{items: 4},320:{items: 4},380:{items: 5},420:{items: 6},480:{items: 7},560:{items: 5},750:{items: 6},780:{items: 7},890:{items: 8},1045:{items: 9}}; for (prop in opResponsive) { if (prop < 750 && opResponsive[prop].items > imgCount) opResponsive[prop].items = imgCount; } } } csl.owlCarousel({ nav: opNav, items: opItems, autoWidth: opAutoWidth, autoplay: opAutoplay, loop: opLoop, autoplayHoverPause: opAutoplayHoverPause, lazyLoad: opLazyLoad, animateOut: opAnimateOut, margin: opMargin, responsive: opResponsive }); }); } function scCartFormSetup() { var cartForm = $('form#cart'); if (cartForm.length) { var formAction = cartForm.attr('action'); var shipEstZip = $('#Ship_Est_Postal_Code'); if (shipEstZip.length) { shipEstZip.on('touchstart', function(){cartForm.removeAttr('action')}); shipEstZip.on('blur', function(){cartForm.attr('action',formAction)}); shipEstZip.on('keypress', function(evt){ var code = evt.keyCode || evt.which; if (code == 13) { scShipEstGet(); evt.preventDefault(); evt.stopImmediatePropagation(); return false; } }); } } } function scLightboxSetup() { var links = $('a[data-rel]'); if (!links.length) return; links.each(function(){ var link = $(this); if (link.hasClass('setup')) return; var dataRel = link.attr('data-rel'); if(dataRel.indexOf('[') != -1) { grpLinks = $('a[data-rel="' + dataRel + '"]'); grpLinks.magnificPopup({ type: 'image', gallery: { enabled: grpLinks.length > 1 } }); grpLinks.addClass('setup'); } else { link.magnificPopup({type: 'image'}); link.addClass('setup'); } }); } })(jQuery); function acctForm(elem, evt) { if (elem.id == 'State_Other' && evt.type == 'keyup') { if (elem.value.length) { if (document.getElementById('State_or_Province')) document.getElementById('State_or_Province').value = 2 } } else if (elem.id == 'State_or_Province' && evt.type == 'change') { if (document.getElementById('State_Other')) { var stateOther = document.getElementById('State_Other'); if (elem.options[elem.selectedIndex].value == '2') { stateOther.value = ''; stateOther.focus(); } else { stateOther.value=''; } } } } function addrForm(elem, evt) { if (elem.id == 'Bill_State_Other' && evt.type == 'keyup') { if (elem.value.length) { if (document.getElementById('Bill_State_or_Province')) document.getElementById('Bill_State_or_Province').value = 2 } } else if (elem.id == 'Ship_State_Other' && evt.type == 'keyup') { if (elem.value.length) { if (document.getElementById('Ship_State_or_Province')) document.getElementById('Ship_State_or_Province').value = 2 } } else if (elem.id == 'Bill_State_or_Province' && evt.type == 'change') { if (document.getElementById('Bill_State_Other')) { var stateOther = document.getElementById('Bill_State_Other'); if (elem.options[elem.selectedIndex].value == '2') { stateOther.value = ''; stateOther.focus(); } else { stateOther.value=''; } } } else if (elem.id == 'Ship_State_or_Province' && evt.type == 'change') { if (document.getElementById('Ship_State_Other')) { var stateOther = document.getElementById('Ship_State_Other'); if (elem.options[elem.selectedIndex].value == '2') { stateOther.value = ''; stateOther.focus(); } else { stateOther.value=''; } } } } function scAddressCopy(evt) { evt.stop(); var form = document.address_form; var billFldId, shipFldId, billFld, shipFld; for(x=0; x < form.elements.length; x++) { billFldId = form.elements[x].id; billFld = form.elements[x]; if (billFldId.indexOf('Bill_') != -1) { shipFldId = billFldId.replace('Bill_','Ship_'); shipFld = document.getElementById(shipFldId); if (shipFld) { shipFld.value = billFld.value; if (shipFldId == 'Ship_Country' || shipFldId == 'Ship_State_or_Province') shipFld.fireEvent('change'); } } } } // - list: Array the list of elements to autocomplete from // - mode: string the autocomplete mode ('tag' or 'text'), default 'text' // - render: function(value) the function called when rendering an element from the list // - set: function(value) the function called when putting an element from the list into the input element (detauls to the get function) function MooComplete(element, options) { options = options || {}; var list = options.list || []; this.setList = function(l) { list = l; } if (!options.filters) { options.filters = [ function(o, v) { return (o.indexOf(v) == 0); }, function(o, v) { return ((v.length > 1) && (o.indexOf(v) > 0)); } ]; } options.size = options.size || 10; options.mode = options.mode || 'text'; options.showonkeydown = (typeof options.showonkeydown == 'undefined') ? true : false; if (!options.render) { options.render = function(v) { return new Element('span', { 'text': v }); }; } if (!options.get) { options.get = function(v) { return v; }; } if (!options.set) { options.set = options.get; } element = typeOf(element)==='string' ? $(element) : element; element.setAttribute('autocomplete', 'off'); element.setAttribute('autocorrect', 'off'); element.setAttribute('autocapitalize', 'off'); var xtraClass = options.xtraClass ? options.xtraClass : ''; var box = new Element('div', { 'class': 'moocomplete ' + xtraClass, 'styles': { 'position': 'absolute', 'display': 'none' } }).inject(document.body); var old, hover = -1, hiding = false, suggestions = 0; function position() { box.setStyles({ 'width': (element.getWidth() - 2) + 'px', 'top': (element.getCoordinates().top + element.getHeight()) + 'px', 'left': element.getCoordinates().left +'px' }); } window.addEvent('resize', position); function getNeedle() { if (options.mode === 'tag') { element.store('input_value', element.get('value').substring(0, element.get('value').lastIndexOf(',') + 1)); return element.get('value').substr(element.get('value').lastIndexOf(',') + 1 || 0).toLowerCase().trim(); } else { return element.get('value').toLowerCase(); } } function showSuggestions(noEmpty) { var v = getNeedle(); if ((v.length == 0) && !noEmpty) { box.setStyle('display', 'none'); return; } suggestions = 0; box.empty(); options.filters.each(function(f) { if (suggestions == options.size) { return; } list.every(function(o) { if (f(options.get(o).toLowerCase(), v)) { var li = suggestions++; box.adopt(new Element('div', { 'events': { 'mousemove': function() { if (!hiding) { hover = li; showHover(); } } } }).adopt(options.render(o)).store('val', o)); if (suggestions == options.size) { return false; } } return true; }); }); position(); if (suggestions > 0) { box.setStyle('display', 'block'); } else { box.setStyle('display', 'none'); } } this.showSuggestions = showSuggestions; function showHover() { var c = box.getChildren(); c.removeClass('hovered'); if (hover >= 0) { c[hover].addClass('hovered'); if (options.mode==='tag') { element.set('value', element.retrieve('input_value') + options.set(c[hover].retrieve('val'))); } else { element.set('value', options.set(c[hover].retrieve('val'))); } } } element.addEvents({ 'keydown': function(e) { if (box.getStyle('display') == 'none') { if (options.showonkeydown && (e.code == 40)) { showSuggestions(true); } return; } if (e.code == 38) { if (hover >= 0) { if (hover == 0) { element.set('value', options.set(old)); } --hover; showHover(); } } else if (e.code == 40) { if (hover < (suggestions - 1)) { ++hover; showHover(); } } else { hover = -1; } }, 'keyup': function(e) { if (e.code == 27) { box.setStyle('display', 'none'); } else if ((e.code != 38) && (e.code != 40)) { old = element.retrieve('val'); if (e.code != 13) { showSuggestions(); } else { box.setStyle('display', 'none'); } } }, 'focus': function() { hiding = false; if (box.getStyle('display') == 'none') { showSuggestions(); } }, 'blur': function() { hover = -1; old = element.retrieve('val'); hiding = true; (function() { box.setStyle('display', 'none'); }).delay(100); }, 'mousemove': function() { if (hover >= 0) { element.set('value', options.set(old)); hover = -1; showHover(); } } }); } function scAutoComplete(fld, list, setFunc, showLength) { fld.addEvent('keyup', function(){ if (!showLength || fld.value.length >= showLength) { $$('.moocomplete').setStyle('opacity',1) } else { $$('.moocomplete').setStyle('opacity',0) } }); fld.addEvent('keydown', function(event) { if (event.key == 'enter') { event.preventDefault(); return false; } }); fld.mooList = []; opts = { list: fld.mooList, size: 1000, xtraClass: 'moocomplete_' + fld.id } if (typeOf(setFunc) === 'function') { opts.set = function(val) {setFunc(fld, val); return fld.value; } } fld.mooComplete = new MooComplete( fld.id, opts ) if (typeOf(list) == 'function') { fld.addEvent('keyup', function(event){ if (event.key != 'down' && event.key != 'up' && event.key != 'enter') list(fld); fld.lastKey = event.key; }); list(fld); } else { fld.mooComplete.setList(list); } } function scAutoCompleteUpdate(fld, list) { fld.mooComplete.setList(list); var activeElement = document.activeElement; if (activeElement && activeElement.id == fld.id && fld.lastKey != 'enter') fld.mooComplete.showSuggestions(); } function payMethodOn(fldId,methodType) { radio = document.getElementById(fldId); if (radio.type == 'radio') radio.checked = 1; paySectionOn(methodType); } function paySectionOn(methodType) { var ccSection = $('pay_cc'); var echeckSection = $('pay_echeck'); var poSection = $('pay_purchase_order'); var payBtn = $('place_order_btn_link'); if (ccSection && ccSection.className) ccSection.className = ccSection.className.replace('sc_show','sc_hide'); if (echeckSection && echeckSection.className) echeckSection.className = echeckSection.className.replace('sc_show','sc_hide'); if (poSection && poSection.className) poSection.className = poSection.className.replace('sc_show','sc_hide'); if (methodType) { if (methodType == 'cc') ccSection.className = ccSection.className.replace('sc_hide','sc_show'); if (methodType == 'echeck') echeckSection.className = echeckSection.className.replace('sc_hide','sc_show'); if (methodType == 'purchase_order') poSection.className = poSection.className.replace('sc_hide','sc_show'); if (typeof(Braintree) !== 'undefined') { var payForm = ccSection.getParent('form'); if (methodType != 'cc') payBtn.addEvent('click', function(evt) {payForm.submit();}); } if (payGwyUsesIframe && payHideSubmit && methodType == 'cc') { payBtn.setStyle('display', 'none'); } else { payBtn.setStyle('display',''); } } } function scAdminLinkClasses() { $$('.sc_admin_edit, .sc_smaller').each(function(btn) {btn.setStyle('font','normal 10px Arial');}); } function scButtonClasses() { $$('.btn').each( function(btn) { if (!btn.hasClass('btn_tiny') && !btn.hasClass('btn_bigger') && !btn.hasClass('btn_smaller')) btn.addClass('btn_reg'); } ); } function scCheckCookies() { } function scDisableAutoComplete() { var flds = $$('.qty, #card_number, #id_number, #bank_routing_number, #bank_account_number'); if (flds) flds.setProperty('autocomplete','off'); } function scDisableSubmitBtn(evt, btn) { if (btn.hasClass('btn_no_disable') || !$('sc').hasClass('btn_wait_toggle')) return; if (btn.hasClass('btn_checkout')) { btn.addClass('btn_please_wait'); btn.oldHTML = btn.get('html'); btn.set('html','Please Wait...'); return; } var btnSizeClass = 'btn_reg'; if (btn.hasClass('btn_smaller')) { btnSizeClass = 'btn_smaller'; } else if (btn.hasClass('btn_bigger')) { btnSizeClass = 'btn_reg'; } else if (btn.hasClass('btn_tiny')) { btnSizeClass = 'btn_tiny'; } var waitBtn = new Element('a', {'class': btnSizeClass + ' btn btn_please_wait', 'html': 'Please Wait...', id: btn.id + '_' + 'wait'}); var btnSize = btn.getSize(); waitBtn.inject(btn,'after'); var borderLeftWidth = waitBtn.getStyle('border-left-width'); var borderRightWidth = waitBtn.getStyle('border-right-width'); borderLeftWidth = borderLeftWidth.replace('px','').toInt(); borderRightWidth = borderRightWidth.replace('px','').toInt(); var borderWidth = borderLeftWidth + borderRightWidth; waitBtn.setStyle('width', btnSize.x - borderWidth + 'px'); waitBtn.setStyle('margin', btn.getStyle('margin')); btn.addClass('sc_hide'); } function scHideToolTip(tipId) { var tipElem = document.getElementById(tipId); if (tipElem) tipElem.onmouseout(); } var popupLinkConfig = new Array; popupLinkConfig["medium_popup"] = new Array ( "", "width=625,height=400,scrollbars=1,menubar=1,resizable=1"); function scInitPopupLinks() { if (!document.getElementsByTagName) return true; var pageLinks = document.getElementsByTagName("a"); for (var i = 0; i < pageLinks.length; i++) { if (((pageLinks[i].className != null) && (pageLinks[i].className != "")) || ((pageLinks[i].parentNode.className != null) && (pageLinks[i].parentNode.className != ""))) { var linkClass = " " + pageLinks[i].className + " "; if ((linkClass == " ") && (pageLinks[i].parentNode.className != "")) { linkClass = " " + pageLinks[i].parentNode.className + " "; } for (var theKey in popupLinkConfig) { if (linkClass.indexOf(" " + theKey + " ") > -1) { if ((pageLinks[i].target == "") || (pageLinks[i].target == null)) { pageLinks[i].target = (popupLinkConfig[theKey][0] != "") ? popupLinkConfig[theKey][0] : theKey; } pageLinks[i].settings = popupLinkConfig[theKey][1]; pageLinks[i].onclick = scPopUp; } } } } return true; } function scMicroTimes() { var microTimes = $$('.microtime'); if (microTimes.length) { microTimes.each( function(microTime) { microTime.value += ( $random(1,1000)); } ); } } function scOnLoad() {} var payHideSubmit, payGwyUsesIframe; function scPayFormSetup() { var payBtn = $('place_order_btn_link'); if (!payBtn) return; payGwyUsesIframe = false; payHideSubmit = false; var payMethod = $$('.pay_method_row input[type="radio"]:checked'); var payType = ''; if (payMethod[0]) payType = payMethod[0].getAttribute('data-paytype'); paySectionOn(payType); var nonCCPresent = false; $$('.pay_method_row input').each(function(payMethod){ if (payMethod.getAttribute('data-paytype') != 'cc') { nonCCPresent = true; } }); if (payGwyUsesIframe) { if (!nonCCPresent) { $('pay_methods').addClass('sc_hide'); var payMethod1 = $$('.pay_method_row input'); payMethod1[0].checked = true;; paySectionOn('cc'); } } } function scPopUp() { newWin = window.open(this.href, this.target, this.settings); newWin.focus(); return false; } function scProdOptsFileChange(changeLink) { var optId = changeLink.id.replace('change_',''); var savedOptId = optId.replace('_option','_saved_option'); var savedDiv = $(optId + '_saved_div'); savedDiv.removeClass('sc_show'); savedDiv.addClass('sc_hide'); $(optId + '_edit_div').removeClass('sc_hide') $(savedOptId).value = ''; } function scProdOptsSetup() { $$('.change_file_option').addEvent('click', function() {scProdOptsFileChange(this); return false;}); $$('.prod_options input[maxlength!=-1], textarea.maxlength').addEvents({ keyup: function() {scShowCharLimit(this); return false;}, paste: function() {scShowCharLimit(this); return false;} }); var selectables = $$('.prod_options select, .prod_options input[type=radio], .prod_options input[type=checkbox]'); if (selectables.length) { selectables.addEvent('change', function() { scSelectOpt(this.id, this.value, this); }); selectables.each(function(fld){ if ((fld.nodeName == 'INPUT' && fld.checked) || fld.nodeName == 'SELECT') scSelectOpt(fld.id, fld.value) }); } } function scShowCharLimit(fld) { var charLimitSpan = $(fld.id + '_chars_left'); var charLimitOuter = $(fld.id + '_chars_left_outer'); var maxLength = fld.nodeName == 'TEXTAREA' ? $(fld.id + '_max_length').value : fld.get('maxlength'); if (!fld.value) { charLimitOuter.setStyle('display','none'); return; } if (!maxLength) return; var charsLeft = maxLength - fld.value.length; charLimitSpan.set('html', charsLeft > 0 ? charsLeft : 'No'); if (charsLeft < 0) fld.value = fld.value.substr(0,maxLength); charLimitOuter.setStyle('display','block'); if (!fld.hasClass('charLimitSetup')) { var modal = fld.getParent('.modal'); if (modal) { scModalSize(modal); fld.addClass('charLimitSetup'); } } } function scShowToolTip(tipId) { var tipElem = document.getElementById(tipId); if (tipElem) tipElem.onmouseover(); } function scSmartFloatSetup() { window.addEvent('resize', function(){scSmartFloatAdjustAll();}); scSmartFloatAdjustAll(); } function scSmartFloatAdjustAll() { $$('.smart_float').each(function(sf){scSmartFloatAdjust(sf)}); } function scSmartFloatAdjust(sf) { var sfLeft = sf.getElement('.left'); var sfRight = sf.getElement('.right'); if (!sfLeft || !sfRight) return; var sfImg = sfLeft.getElement('img'); var sfText = sfRight.getElement(':first-child'); if (!sfImg || !sfText) return; var sfWidth = sf.getSize().x; var sfImgSize = sfImg.getSize(); var sfImgWidth = sfImgSize.x; var sfImgHeight = sfImgSize.y; var sfTextHeight = sfText.getSize().y; sfImgWidthPercent = sfImgWidth / sfWidth * 100; sf.removeClass('wrap'); sf.removeClass('wrap_all'); if (sfImgWidthPercent > 65) { sf.addClass('wrap_all'); } else if (sfTextHeight > sfImgHeight) { sf.addClass('wrap'); } } var isIOS = false; function scStoreSetup() { scMaskSetup(); scCheckCookies(); scInitPopupLinks(); scMicroTimes(); scPayFormSetup(); scProdOptsSetup(); scDisableAutoComplete(); scThemeChooserSetup(); scButtonClasses(); ssoSetup(); scBdayFieldSetup(); scAddressFieldSetup(); scProdFormSetup(); scModalSetup(); scShipEstSetup(); $$('.date_wrap, .datetime-local_wrap').addEvent('click', function(){this.getElement('input').focus()}); $$('.btn_same_as_billing').addEvent('click',function(evt) {scAddressCopy(evt);}); var scDiv = $('sc'); if (scDiv && !scDiv.hasClass('btns_old')) $$('button.btn[type=submit], input.btn[type=submit], .btn_disable_on_click').addEvent('click',function(evt) {scDisableSubmitBtn(evt,this);}); $$('.error_field').addEvent('change',function() {this.removeClass('error_field')}); } var scMask; function scMaskSetup() { var scDiv = $('sc'); if (!scDiv) return; scMask = $('sc_mask'); if (!scMask) { scMask = new Element('div', {id: 'sc_mask'}); scMask.inject(scDiv); } } function scMaskShow(forceScrollFix) { scMask.setStyle('display','block'); var html = $(document.documentElement); var body = $$('body'); var htmlBeforeX = html.clientWidth; var isBadSafari = 'Unknown' == 'sf' && '0' == '0'; html.addClass('modal_is_open'); if (!isBadSafari || window.getSize().x < 1030 || forceScrollFix) { var top = window.pageYOffset || document.documentElement.scrollTop; html.oldTop = top; html.setStyle('top', '-' + top + 'px'); html.addClass('ios_scroll_fix'); } body.oldMarginRight = body.getStyle('margin-right'); if (html.clientWidth > htmlBeforeX) { body.setStyle('margin-right', (html.clientWidth - htmlBeforeX) + 'px'); } } function scMaskHide() { if (scMask.getStyle('display') == 'none') return; scMask.setStyle('display','none'); var html = $(document.documentElement); var body = $$('body'); html.removeClass('modal_is_open'); html.removeClass('ios_scroll_fix'); body.setStyle('margin-right',body.oldMarginRight); if (html.oldTop) window.scrollTo(0,html.oldTop); } function scProdFormSetup() { var addOnQtys = $$('.add_on_products input.qty[type=number]'); if (addOnQtys.length) { addOnQtys.addEvent('keyup', function(){ if (this.id.contains('Copy')) { var qtyId = this.id.replace('Copy',''); var qtyFld = $(qtyId); if (qtyFld) qtyFld.value = this.value; } }); } $$('.prod_detail form, .prod_thumb form').addEvent('submit', function(evt){ return scProdFormSubmit(this, evt);}); var scAddOnMsgs = $$('.add_on_products .cat_products .sc_msg'); scAddOnMsgs.each(function(msg){ var msgX = new Element('a', {href: '#', class: 'sc_msg_close'}); msgX.inject(msg); msgX.addEvent('click', function(){this.getParent('.sc_msg').addClass('sc_hide'); return false}); }); } function scProdFormSubmit(prodForm, evt) { var modalAddOns = $('modal_add_ons'); if (modalAddOns && !modalAddOns.yes_clicked && !modalAddOns.no_clicked) { var addOns = $$('.add_on_products'); if (addOns.length) { addOns = addOns[0]; var prodRn = addOns.id.replace('add_ons_',''); if ($('updating_item_' + prodRn)) return true; var addOnsChecked = addOns.getElement('.qty:checked'); if (addOnsChecked) return true; var addOnQtys = addOns.getElements('input.qty[type=number]'); if (addOnQtys.length) { for(x=0; x < addOnQtys.length; x++) { if (addOnQtys[x].value) return true; } } scModalShow(modalAddOns); return scProdFormSubmitStop(prodForm); } } var modalThumbOpts = prodForm.getElement('.modal_prodthumb_opts'); if (modalThumbOpts) { if (modalThumbOpts.hasClass('show')) { return true; } else { scModalShow(modalThumbOpts); return scProdFormSubmitStop(prodForm); } } return true; } function scProdFormSubmitStop(prodForm) { $$('.btn_please_wait').setStyle('display','none');; $$('.btn_add_to_cart').removeClass('sc_hide'); return false; } function scSelectOpt(fldId, fldValue, trigger, fireClick) { var fld = $(fldId); var radioFix; if (!fld) { fld = $(fldId + fldValue); if (fld.type == 'radio') radioFix = true; } if (!fld) return; var triggerCheckBox = trigger && trigger.type=='checkbox'; var noSelectImg = triggerCheckBox && !fld.checked; if (fld.nodeName == 'INPUT' && (fld.type == 'radio' || fld.type == 'checkbox')) { if (!triggerCheckBox) fld.set('checked',true); } else { fld.set('value', fldValue); } if (fireClick) fld.fireEvent('click'); var optImgAID; optImgAID = fldId + '_' + fldValue + '_img'; if (fld.type == 'radio' && !radioFix) optImgAID = fldId.replace('-','-_') + '_img'; var optImgA = $(optImgAID); if (optImgA) { var optImgParent; if (fld.type == 'radio') { optImgParent = optImgA.getParent('.radios'); } else { optImgParent = optImgA.getParent('.opt_carousel'); } if (optImgParent) optImgParent.getElements('a').removeClass('selected'); if (!noSelectImg) optImgA.addClass('selected'); } } var scModalA; function scModalAlert(text, title, ok) { if (!scModalA) { scModalA = new Element('div', {id: 'modal_js', class: 'modal modal_closeable'}); if (title) { var h4 = new Element('h4');; h4.inject(scModalA); } var modalInner = new Element('div', {class: 'inner' }); modalInner.inject(scModalA); scModalA.inject($('sc')); } if (ok) text += '<br/><div class="center"><a href="#" class="modal_close btn btn_ok">OK</a></div>'; scModalA.getElement('.inner').set('html', text); scModalA.getElement('h4').set('html', title); scModalA.removeClass('setup'); scModalSetup(); scModalShow(scModalA); } function scModalClose(modal) { modal.removeClass('show'); var modalReturn = modal.getParent('.modal_return'); if (modalReturn) { var modalBack = $(modalReturn.getAttribute('data-modal-return')); scModalShow(modalBack); } else if (modal.hasClass('modal_backable')) { var modalBack = $(modal.getAttribute('data-modal-back')); scModalShow(modalBack); } else { scMaskHide(); } } function scModalCloseAll() { $$('.modal').removeClass('show'); scMaskHide(); } function scModalSetup() { scModalTipSetup(); var modals = $$('.modal:not(".setup")'); var modal; if (modals.length) { for(x=0; x < modals.length; x++) { modal = modals[x]; modal.addClass('setup'); if (modal.hasClass('modal_closeable')) { modalX = new Element('a', {href: '#', class: 'modal_close modal_closex'}); modalX.inject(modal); } window.addEvent('resize',function(){ $$('.modal.show').each(function(modal){ scModalSize(modal); }); }); modal.getElements('.btn_select_fld').addEvent('click', function(){ var fldId = this.getAttribute('data-field-id'); var fldValue = this.getAttribute('data-field-value'); scSelectOpt(fldId, fldValue, 0, true); }); } } $$('.modal_close').addEvent('click', function(){ scModalClose(this.getParent('.modal')); if (this.getAttribute('href') == '#') return false; }); $$('.modal .btn_yes').addEvent('click', function(){ modal.yes_clicked = true; }); $$('.modal .btn_no').addEvent('click', function(){ modal.no_clicked = true; }); $$('#modal_add_ons .btn_yes').addEvent('click', function(){ var addOns = $$('.add_on_products'); if (addOns.length) { addOns.addClass('add_ons_review'); } }); $$('.modal_addon_opts .modal_ok').addEvent('click', function() { var modal = this.getParent('.modal'); var qtyId = modal.id.replace('opts_modal','quantity'); var qty = $(qtyId); qty.checked = true; scModalClose(modal); modal.addClass('add_on_selected'); return false; }); $$('.modal_addon_opts .modal_cancel').addEvent('click', function() { var modal = this.getParent('.modal'); var qtyId = modal.id.replace('opts_modal','quantity'); var qty = $(qtyId); var qtyFldCopy = $(qtyId + 'Copy'); qty.checked = false; if (qtyFldCopy) { qtyFldCopy.value = ''; qtyFldCopy.fireEvent('keyup'); } scModalClose(modal); modal.removeClass('add_on_selected'); return false; }); $$('.modal_open').addEvent('click', function(evt){ var modalId = this.getAttribute('data-modal'); if (modalId) { var modal = $(modalId); if (modal) { scModalShow(modal); evt.cancelBubble=true; evt.stop(); return false; } else { return true; } } }); scMask.addEvent('click',function(){scModalCloseAll();}); } function scModalFixIE(modal) { var modalSize = modal.getSize(); var modalLeft = Math.round(modalSize.x/2); var modalTop = Math.round(modalSize.y/2); modal.setStyle('-ms-transform', 'translate(-' + modalLeft + 'px, -' + modalTop + 'px)'); modal.setStyle('transform', 'translate(-' + modalLeft + 'px, -' + modalTop + 'px)'); } function scModalSize(modal, stripWrapHeight) { if (!modal || !modal.getElement) return; var title = modal.getElement('h4'); var inner = modal.getElement('.inner'); if (title && inner) { inner.setStyle('height','auto'); var modalSize = modal.getSize(); modalSize.y -= title.getSize().y; inner.setStyle('height', modalSize.y + 1); if (stripWrapHeight) modal.getElements('.lazy_load_wrap img').setStyle('height','auto'); } scModalFixIE(modal); } function scModalShow(modal, skipLazyLoad) { scModalCloseAll(); $(document.body).fireEvent('click') var isLazyLoad = false; if (!skipLazyLoad) { var imgs = $(modal).getElements('img'); var img, src; if (imgs.length) { for(x=0; x < imgs.length; x++) { img = imgs[x]; src = img.getAttribute('data-src'); if (src) { img.setAttribute('src',src); img.removeAttribute('data-src'); isLazyLoad = img; } } if (isLazyLoad) isLazyLoad.addEvent('load',function(){scModalSize(isLazyLoad.getParent('.modal'), 1);}); } } modal.getElement('.inner').scrollTo(0,0); modal.addClass('show'); modal.shown = true; scMaskShow(); scModalSize(modal); } function scModalTipSetup() { if (window.getSize().x > 1045 && !isIOS) return; var scDiv = $('sc'); if (!scDiv) return; var tips = $$('.ico_info.tip, .tip_modal.tip'); if (!tips.length) return; var tip, modalId, modal, modalInner, modalTitle, modalParent, modalBackClass, modalBackBtn; for(x=0; x < tips.length; x++) { tip = tips[x]; if (!tip.title) continue; modalId = 'modal_dyn_' + x; tip.addClass('modal_open'); tip.setAttribute('data-modal', modalId); modalParent = tip.getParent('.modal'); if (modalParent) modalBackClass = 'modal_backable'; modal = new Element('div', {id: modalId, class: 'modal modal_info modal_closeable ' + modalBackClass}); if (modalParent) modal.setAttribute('data-modal-back', modalParent.id); modalTitle = new Element('h4'); modalTitle.inject(modal); modalInner = new Element('div', {class: 'inner', html: tip.title + '<br/>'}); modalBackBtn = new Element('a', {class: 'modal_back modal_close', href: '#', text: 'Back'}); modalBackBtn.inject(modalTitle); modalInner.inject(modal); modal.inject(scDiv); } } var scCountriesByAlpha2 = new Object(); var scStatesByAbbrev = new Object(); scCountriesByAlpha2 = { US: '180', CW: '251', SX: '252', }; scStatesByAbbrev = { C180_AL: '3', C180_AK: '4', C180_AZ: '5', C180_AR: '6', C180_CA: '7', C180_CO: '8', C180_CT: '9', C180_DE: '10', C180_DC: '11', C180_FL: '12', C180_GA: '13', C180_HI: '14', C180_ID: '15', C180_IL: '16', C180_IN: '17', C180_IA: '18', C180_KS: '19', C180_KY: '20', C180_LA: '21', C180_ME: '22', C180_MD: '23', C180_MA: '24', C180_MI: '25', C180_MN: '26', C180_MS: '27', C180_MO: '28', C180_MT: '29', C180_NE: '30', C180_NV: '31', C180_NH: '32', C180_NJ: '33', C180_NM: '34', C180_NY: '35', C180_NC: '36', C180_ND: '37', C180_OH: '38', C180_OK: '39', C180_OR: '40', C180_PA: '41', C180_RI: '42', C180_SC: '43', C180_SD: '44', C180_TN: '45', C180_TX: '46', C180_UT: '47', C180_VT: '48', C180_VA: '49', C180_WA: '50', C180_WV: '51', C180_WI: '52', C180_WY: '53', C180_AA: '54', C180_AE: '55', C180_AP: '56', C10_ACT: '67', C10_JBT: '68', C10_NSW: '69', C10_NT: '70', C10_QLD: '71', C10_SA: '72', C10_TAS: '73', C10_VIC: '74', C10_WA: '75', C180_PR: '76', C180_GU: '77', C180_VI: '78', }; function scAddressFieldSetup() { var countryFlds = $$('#Country, #Ship_Country, #Bill_Country, #Ship_Est_Country'); var stateFlds = $$('#State_or_Province, #Ship_State_or_Province, #Bill_State_or_Province, #Ship_Est_State_or_Province'); if (countryFlds) { countryFlds.addEvent('change',function() {scAddressFieldChange(this);}); stateFlds. addEvent('change',function() {scAddressFieldChange(this);}); countryFlds.each(function(fld) {scAddressFieldChange(fld,1);}); } } function scAddressFieldChange(triggerFld, init) { var prefix = ''; if (triggerFld.id.contains('Bill_')) { prefix = 'Bill_'; } else if (triggerFld.id.contains('Ship_Est_')) { prefix = 'Ship_Est_'; } else if (triggerFld.id.contains('Ship_')) { prefix = 'Ship_'; } var countryFld = $(prefix + 'Country'); var stateFld = $(prefix + 'State_or_Province'); if (!stateFld) return; var stateValue = stateFld.value; var stateLi = stateFld.getParent('li'); if (stateLi.hasClass('double')) stateLi = stateLi.getElement('div'); var stateLabel = stateLi.getElement('label'); var stateOptsSelector = '#' + stateFld.id + ' option'; var stateOtherFld = $(prefix + 'State_Other'); if (stateOtherFld) { var stateOtherLi = stateOtherFld.getParent('li'); var stateOtherLabel = stateOtherLi.getElement('label'); if (stateOtherLabel) stateOtherLabel.origHTML = stateOtherLabel.origHTML ? stateOtherLabel.origHTML : stateOtherLabel.get('html'); if (stateValue == 2) { stateOtherLi.removeClass('sc_hide'); } else { stateOtherLi.addClass('sc_hide'); } } if (!countryFld || !countryFld.value) return; if (!stateFld.savedOptions) stateFld.savedOptions = $$(stateOptsSelector).clone(); if (init || triggerFld.id.contains('Country')) { $$(stateOptsSelector).destroy(); var newStates = Array(); var statesMatched = 0; var newSelectedIndex = 0 ; stateFld.savedOptions.each( function(savedOpt) { var stateCountry = savedOpt.getAttribute('data-country'); if (stateCountry == countryFld.value || savedOpt.value == 2 || savedOpt.value == '') { savedOpt.clone().inject(stateFld); newStates.push(savedOpt.value); if (stateCountry == countryFld.value) statesMatched++; } } ); if (!statesMatched) { if (stateOtherLabel) stateOtherLabel.set('html', stateLabel.get('html')); if (stateOtherLi) { stateOtherLi.removeClass('sc_hide'); stateLi.addClass('sc_hide'); } stateFld.value = 2; } else { if (stateOtherLabel) stateOtherLabel.set('html', stateOtherLabel.origHTML); if (stateOtherLi) { if (stateValue != 2) stateOtherLi.addClass('sc_hide'); stateOtherLi.addClass('sc_hide'); } stateLi.removeClass('sc_hide'); } } if (triggerFld.id.contains('Country') && !init) stateFld.value = ''; } function scBdayFieldSetup() { $$('.bdayMonth').addEvent('change', function() {scBdayMonthChange(this);}); } function scBdayMonthChange(bdayMonthFld) { var day30Months = ['04','06','09','11']; var day31Months = ['01','03','05','07','08','10','12']; var bdayMonth = bdayMonthFld.value; var bdayMonthId = bdayMonthFld.id; var bdayDayId = bdayMonthId.replace('Month','Day'); var bdayDayFld = $(bdayDayId); var bday29opt = $(bdayDayId + '29'); var bday30opt = $(bdayDayId + '30'); var bday31opt = $(bdayDayId + '31'); if(!bday29opt || !bday30opt || !bday31opt) return; bday29opt.setStyle('display',''); bday30opt.setStyle('display',''); bday31opt.setStyle('display',''); if (day30Months.contains(bdayMonth)) { bday31opt.setStyle('display','none'); if (bdayDayFld.value == '31') bdayDayFld.set('value',''); } else if (bdayMonth == '02') { bday31opt.setStyle('display','none'); bday30opt.setStyle('display','none'); if (bdayDayFld.value == '30' || bdayDayFld.value == '31') bdayDayFld.set('value',''); } } var scShipEstWaiting = false; function scShipEstSetup() { var shipEstBtn = $('ship_est_btn'); if (!shipEstBtn) return; shipEstBtn.addEvent('click', function() {scShipEstGet(); return false}); $$('.qty_row input').addEvent('change', function() {scShipEstDisable();}); $$('.qty_row input').addEvent('keyup', function() {scShipEstDisable();}); $('ship_estimator').setStyle('display','block'); } function scShipEstGet() { var country = $('Ship_Est_Country'); var state = $('Ship_Est_State_or_Province'); var stateLi = state.getParent('li'); var stateOther = $('Ship_Est_State_Other'); var stateOtherLi= stateOther.getParent('li'); var postal = $('Ship_Est_Postal_Code'); var city = $('Ship_Est_City'); var btn = $('ship_est_btn'); var wait = $('ship_est_wait'); var err = ''; if (!country.value) err += '<li>Country</li>'; if (city && !city.value) err += '<li>City</li>'; if (!state.value && !stateLi.hasClass('sc_hide')) err += '<li>State</li>'; if (!stateOther.value && !stateOtherLi.hasClass('sc_hide')) err += '<li>State</li>'; if (!postal.value) err += '<li>Postal Code</li>'; if (err) return scModalAlert('One or more fields are missing:<br/><ul>' + err + '</ul>', 'Missing info', 1); btn.setStyle('display','none'); wait.setStyle('display','inline-block'); var cityValue = city ? city.value : ''; scShipEstWaiting = true; x_sc_ship_estimator_get(country.value, state.value, stateOther.value, postal.value, cityValue, scShipEstCallback); setTimeout( 'scShipEstCallback("We were unable to determine shipping costs for your order. Please check your address information for accuracy or <a href=\\"https://www.midwestvolleyball.com/store/store.php/contact/\\">contact us</a> for assistance.")', 20000 ); } function scShipEstDisable() { var shipEst = $('ship_estimator'); if (shipEst.hasClass('disabled')) return; $$('.ship_rate input').set('checked',false); shipEst.addClass('disabled'); fadeIn($('ship_est_disabled'), 'inline-block'); } function scShipEstCallback(html) { if (!scShipEstWaiting) return; $('ship_est_wait').setStyle('display','none'); $('ship_est_btn').setStyle('display',''); var shipEstRatesOuter = $('ship_est_rates_outer'); var shipEstRates = $('ship_est_rates'); shipEstRates.set('html', html); fadeIn(shipEstRatesOuter, 'block'); $$('.ship_rate_detail .sr_inner').each(function(rateDetail) { var hiddenHeight = rateDetail.scrollHeight - rateDetail.clientHeight; if (hiddenHeight > 3) { var rateOuter = rateDetail.getParent('div'); if (rateOuter) { var readMoreLink = rateOuter.getElement('.rate_detail_more'); if (readMoreLink) { readMoreLink.setStyle('visibility','visible'); readMoreLink.addEvent( 'click', function(){ var rateOuter = readMoreLink.getParent('.ship_rate_detail'); if (rateOuter) { rateDetail = rateOuter.getElement('.sr_inner') rateDetail.setStyle('display','none'); rateDetail.addClass('show_more'); fadeIn(rateDetail); readMoreLink.setStyle('display','none'); } return false; } ); } } } }); scShipEstWaiting = false; } function fadeIn(el, display) { if (display == undefined) display = 'block'; el.setStyle('opacity',0); el.setStyle('display', display); fadeIn1 = new Fx.Morph(el, {duration: 700}); fadeIn1.start({ opacity: 1 }); } function fadeOut(el) { el.setStyle('opacity', 1); el.oldHeight = el.getStyle('height'); fadeOut1 = new Fx.Morph( el, { duration: 300, onComplete: function() { this.element.setStyle('display',''); this.element.setStyle('height',el.oldHeight); } } ); fadeOut1.start({ opacity: 0, height: 0 }); } function ssoFormShow(ssoFormOuter, ssoUsBtn, noFade) { var isNavBlock = ssoFormOuter.getParent('.sc_acct_nav_block'); var ssoForm = ssoFormOuter.getElement('form'); if (isNavBlock) { var ssoUsH2 = $$('.sc_acct_nav_block .sc_title'); ssoUsH2.removeClass('sc_hide'); } ssoUsBtn.dispose(); if (!ssoForm.hasClass('acct_opts_header')) { $('login_form_outer').addClass('nav_block'); ssoForm.addClass('nav_block_content'); } if (noFade) { ssoForm.setStyle('display', 'block'); } else { fadeIn(ssoForm); ssoForm.setStyle('opacity',1); } ssoFormOuter.addClass('login_form_fixed'); } function ssoSetup() { var scDiv = $('sc'); if (!(scDiv && scDiv.hasClass('sso_on') && !scDiv.hasClass('logged_in'))) return; var ssoFormOuter = $$('.sso_on .login_form_outer, .sso_on #login_form_outer'); if (!ssoFormOuter) return; ssoFormOuter.each( function(ssoFormOut){ ssoFormOut.addClass('setup'); var ssoUsBtn = ssoFormOut.getElement('.sso_us'); ssoUsBtn.setStyle('display','block'); var isNavBlock = ssoFormOut.hasClass('nav_block'); if (isNavBlock) { $$('.sc_acct_nav_block .sc_title').addClass('sc_hide'); $$('.sc_acct_nav_block .nav_block').removeClass('nav_block'); } if (!ssoFormOut.hasClass('login_failed')) { ssoFormOut.removeClass('login_form_fixed'); ssoUsBtn.addEvent('click', function() { ssoFormShow(ssoFormOut, ssoUsBtn); return false;}); } else { if (isNavBlock) { var loginForm = $$('.login_form_fixed'); if (loginForm) ssoFormShow(loginForm, ssoUsBtn); } } } ); } function toggleOptionDetail() { var optDetailULs = getElementsByPartialId(document.body,'ul','opt_detail_'); if (optDetailULs) { for(var i=0;optDetailULs[i];i++) { swapDisplay(optDetailULs[i]); } } } var rateInfoState; function toggleRateInfo(courierDivId){ var rateDetails = getElementsByPartialId(courierDivId,'div','rate_detail_'); for(x=0; x < rateDetails.length; x++) { swapDisplay(rateDetails[x]); } if (scTweakColumns) scTweakColumns(); } var themeURL, defaultThemeURL; function scThemeChooserSetup() { var themeShowLink = $('theme_nav_show'); if (themeShowLink) themeShowLink.addEvent('click', function() {scThemeNavShow(this); return false}); $$('.theme_chooser select').addEvent('change', function() {scThemeChooserChange(this); return false;}); $$('.theme_chooser .themeSetButton').addEvent('click', function() {scThemeSetStartPoint(this); return false;}); $$('.theme_chooser .themeSaveButton').addEvent('click', function() {scThemeSave(this); return false;}); $$('.theme_var').each( function(themeVar) { scThemeChooserHide(themeVar,true); } ) $$('.theme_chooser .hide').getParent('li').each(function(li){if (!li) return; li.setStyle('display','none');}); if ($('starting_point_mismatch')) { var themeSaveFld = $('Custom_Variants'); var noPrompt = $$('body')[0].hasClass('demo_mode') || (themeSaveFld && !themeSaveFld.value); if (noPrompt || confirm("This theme has a starting point for customization that does not match your current theme setting.\r\nWould you like to use your current theme as a starting point?\r\n\r\nTo start with your current theme setting, click OK. To start with the previously saved starting point, click CANCEL.")) { themeSaveFld.value = $('starting_point_mismatch').value; scThemeSetStartPoint($$('.theme_chooser .themeSetButton'), noPrompt); } } if ($('record_form') && $$('.theme_chooser') && $('Custom_Variants') && !$('Custom_Variants').value) { scThemeChooserChange(); scThemeSetStartPoint($$('.theme_chooser .themeSetButton'), 1); } if ($('default_theme_chooser')) scThemeChooserChange(); } function scThemeChooserChange(fld) { if (!fld) fld = $$('.theme_var1')[0]; var themeFld = fld != undefined ? fld.getParent('.theme_chooser').getElement('.theme_name') : $$('.theme_name')[0]; var themeChooser = themeFld.getParent('.theme_chooser'); var isDefaultThemeChooser = $('default_theme_chooser'); if (fld != undefined && isDefaultThemeChooser && fld.hasClass('theme_name')) { toggleWait('on','Loading variants...'); window.location = "https://www.midwestvolleyball.com/store/squirrelcart/index.php?table=Themes&ctv=" + fld.value; } var recordForm = themeChooser.getParent('#record_form'); var themeVar1 = themeChooser.getElement('.theme_var1'); var themeVar2 = themeChooser.getElement('.theme_var2'); var themeVar3 = themeChooser.getElement('.theme_var3'); var themeVar4 = themeChooser.getElement('.theme_var4'); var themeVar5 = themeChooser.getElement('.theme_var5'); var themeVar6 = themeChooser.getElement('.theme_var6'); var themeVar7 = themeChooser.getElement('.theme_var7'); var themeVar8 = themeChooser.getElement('.theme_var8'); var themeVar9 = themeChooser.getElement('.theme_var9'); var themeVar10 = themeChooser.getElement('.theme_var10'); var themeVar11 = themeChooser.getElement('.theme_var11'); var themeVar12 = themeChooser.getElement('.theme_var12'); var themeVar13 = themeChooser.getElement('.theme_var13'); var themeVar14 = themeChooser.getElement('.theme_var14'); var themeVar15 = themeChooser.getElement('.theme_var15'); var themeVar16 = themeChooser.getElement('.theme_var16'); var themeVar17 = themeChooser.getElement('.theme_var17'); var themeVar18 = themeChooser.getElement('.theme_var18'); var themeVar19 = themeChooser.getElement('.theme_var19'); var themeVar20 = themeChooser.getElement('.theme_var20'); if (!themeFld || !themeFld.value) return; var themeFlds = $$('.theme_var'); themeFlds.getParent('li').setStyle('display', 'inline-block'); themeFlds.setStyle('display', 'inline'); themeFlds.each( function(themeFld) {scThemeChooserHide(themeFld)} ); var iniFieldSets = $$('fieldset.theme_ini_settings'); if (iniFieldSets.length) { iniFieldSets.setStyle('display','none'); var setBtn = themeChooser.getElement('.themeSetButton'); setBtn.set('html','Set Starting Point'); } var themeSetting; if (fld == undefined) { themeSetting = themeFld.value; } else if ($(fld).value.contains('^^')) { scThemeChooserHide(fld); themeSetting = fld.value; } else { var defaultValPieces = themeFld.value.split('^^'); var themeRn = defaultValPieces[0]; themeSetting = themeRn; if (themeVar1) themeSetting += '^^' + themeVar1.value; if (themeVar2) themeSetting += '^^' + themeVar2.value; if (themeVar3) themeSetting += '^^' + themeVar3.value; if (themeVar4) themeSetting += '^^' + themeVar4.value; if (themeVar5) themeSetting += '^^' + themeVar5.value; if (themeVar6) themeSetting += '^^' + themeVar6.value; if (themeVar7) themeSetting += '^^' + themeVar7.value; if (themeVar8) themeSetting += '^^' + themeVar8.value; if (themeVar9) themeSetting += '^^' + themeVar9.value; if (themeVar10) themeSetting += '^^' + themeVar10.value; if (themeVar11) themeSetting += '^^' + themeVar11.value; if (themeVar12) themeSetting += '^^' + themeVar12.value; if (themeVar13) themeSetting += '^^' + themeVar13.value; if (themeVar14) themeSetting += '^^' + themeVar14.value; if (themeVar15) themeSetting += '^^' + themeVar15.value; if (themeVar16) themeSetting += '^^' + themeVar16.value; if (themeVar17) themeSetting += '^^' + themeVar17.value; if (themeVar18) themeSetting += '^^' + themeVar18.value; if (themeVar19) themeSetting += '^^' + themeVar19.value; if (themeVar20) themeSetting += '^^' + themeVar20.value; } themeURL = "https://www.midwestvolleyball.com/store/store.php?theme_current=" + themeSetting; defaultThemeURL = "https://www.midwestvolleyball.com/store/squirrelcart/index.php?theme_default=" + themeSetting + "&token=e1a340638357c9e1da18fd9a097a4495"; if (themeChooser.hasClass('themeCurrent')) { window.location = themeURL; scThemeLoading(themeChooser); } else if (themeChooser.hasClass('themeSave')) { var themeSaveFld = $('Custom_Variants'); if (!themeSaveFld) { themeSaveFld = $$('.Custom_Variants'); if (themeSaveFld) themeSaveFld = themeSaveFld[0]; } if (themeSaveFld) themeSaveFld.value = themeSetting; if (recordForm && fld.hasClass('theme_name')) { toggleWait('on','Loading theme variants...'); recordForm.submit(); } } } function scThemeLoading(themeChooser) { var wait = themeChooser.getElement('.wait'); wait.removeClass('sc_hide'); wait.removeClass('hide'); wait.setStyle('display','inline'); $$('.theme_chooser li').setStyle('display','none'); var cog = themeChooser.getElement('.cog'); if (cog) cog.setStyle('display','none'); } function scThemeChooserHide(srcField, setupRun) { if (!srcField) return; if (srcField.name == 'theme_var1' && srcField.value.indexOf('^^') != -1) { $$('.theme_var').each(function(fld) {if (fld.name != 'theme_var1') fld.getParent('li').setStyle('display','none');}); return; } $$('.hideWhen' + srcField.name + 'xxx' + srcField.value).getParent('li').setStyle('display','none'); if (srcField.options.length == 1) srcField.getParent('li').setStyle('display','none'); } function scThemeNavShow(showLink) { var themeNav = $('theme_nav'); if (themeNav) { if (themeNav.hasClass('sc_show')) { fadeOut(themeNav); themeNav.removeClass('sc_show'); } else { fadeIn(themeNav); themeNav.addClass('sc_show'); } } } function scThemeSave(btn) { if (!defaultThemeURL) defaultThemeURL = 'index.php?Themes'; toggleWait('on','Setting Default Theme...'); window.location = defaultThemeURL; } function scThemeSetStartPoint(btn, noPrompt) { var recordForm = $('record_form'); var confirmMsg, resetValue; if (btn.hasClass('themeUpdateButton')) { confirmMsg = 'Click OK to continue, which will merge your custom styles with any "Starting Point" settings that have been changed. You will then be able to customize them further. \r\n\r\nWhen done, don\'t forget to save your changes.'; resetValue = 2; } else { confirmMsg = 'When setting the starting point for the custom variant of this theme, any custom styles you specified in this section will be reset to defaults.\r\n\r\nClick OK to continue, which will load the default settings for this starting point which you will then be able to customize. \r\n\r\nWhen done, don\'t forget to save your changes.'; resetValue = 1; } if ($$('body')[0].hasClass('demo_mode') || noPrompt || confirm(confirmMsg)) { toggleWait('on','Loading settings...'); $('themeIniReset').value = resetValue; recordForm.submit(); } else { toggleWait('off'); } }// bail if not on small device and not iOS if (window.getSize().x > 1045 && !isIOS) { // // qTip - CSS Tool Tips - by Craig Erskine var uniTipTag = "a,img,div,span,label"; var uniTipClass = "tip"; var uniTipX = 0; var uniTipY = 15; //______________________________________________There's no need to edit anything below this line// var offsetX = uniTipX, offsetY = uniTipY, elewidth = null, eleheight = null, tipid = null, tiptop = null, tipbot = null, tipcapin=null, tippointin=null, altText=false; var x=0, y=0, WinWidth=0, WinHeight=0, TipWidth=0, TipHeight=0, CapHeight=0, PointHeight=0; init = function () { var elementList = uniTipTag.split(","); for(var j = 0; j < elementList.length; j++) { var elements = document.getElementsByTagName(elementList[j]); if(elements) { for (var i = 0; i < elements.length; i ++) { if (uniTipClass != '') { var elClass = elements[i].className; var elClassList = uniTipClass.split(","); for (var h=0; h < elClassList.length; h++) { if (elClass.match(elClassList[h])) unitipize(elements[i]); } } else unitipize(elements[i]); } } } } unitipize = function (element) { var a = element; altText = (a.alt && a.getAttribute("alt") != '' ) ? true : false; var sTitle = (altText == true) ? a.getAttribute("alt") : a.getAttribute("title"); if(sTitle) { a.onmouseover = function() {build(a, sTitle);}; a.onmouseout = function() {hide(a, sTitle);}; } } build = function (a, sTitle) { if (a.title) a.title = ""; if (altText==true) a.alt = ""; var tipContainer = document.createElement("div"); tipContainer.setAttribute("id", "unitip"); document.body.appendChild(tipContainer); var tipContainerTop = document.createElement("div"); tipContainerTop.setAttribute("id", "unitippoint"); tipContainer.appendChild(tipContainerTop); var tipContainerMid = document.createElement("div"); tipContainerMid.setAttribute("id", "unitipmid"); tipContainer.appendChild(tipContainerMid); var tipContainerBot = document.createElement("div"); tipContainerBot.setAttribute("id", "unitipcap"); tipContainer.appendChild(tipContainerBot); tipid = document.getElementById("unitip"); tippoint = document.getElementById("unitippoint"); tipmid = document.getElementById("unitipmid"); tipcap = document.getElementById("unitipcap"); document.getElementById("unitipmid").innerHTML = sTitle; tipid.style.display = "block"; elewidth = document.getElementById("unitipmid").offsetWidth; eleheight = document.getElementById("unitip").offsetHeight; WinWidth = document.body.offsetWidth; WinHeight = (document.body.clientHeight < document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight; CapHeight = document.getElementById('unitipcap').offsetHeight; PointHeight = document.getElementById('unitippoint').offsetHeight; if (typeof pngfix=="function") { if (tippoint.currentStyle.backgroundImage.match(/\.png/gi)) { var tipP = tippoint.innerHTML; tippoint.id = 'unitipP'; tippoint.style.overflow = "hidden"; tippoint.style.height = PointHeight + "px"; tippoint.style.width = elewidth + "px"; tippoint.style.position = "relative"; tippoint.style.display = "block"; tippoint.innerHTML = '<div id="unitippoint">' + tipP + '</div>'; tippointin = document.getElementById("unitippoint"); tippointin.style.width = (elewidth * 2) + "px"; tippointin.style.height = (PointHeight * 2) + "px"; tippointin.style.backgroundImage = tippoint.style.backgroundImage; tippointin.style.position = "absolute"; tippoint.style.backgroundImage = "none"; } if (tipcap.currentStyle.backgroundImage.match(/\.png/gi)) { var tipC = tipcap.innerHTML; tipcap.id = 'unitipC'; tipcap.style.overflow = "hidden"; tipcap.style.height = CapHeight + "px"; tipcap.style.width = elewidth + "px"; tipcap.style.position = "relative"; tipcap.style.display = "block"; tipcap.innerHTML = '<div id="unitipcap">' + tipP + '</div>'; tipcapin = document.getElementById("unitipcap"); tipcapin.style.height = (CapHeight * 2) + "px"; tipcapin.style.backgroundImage = tipcap.style.backgroundImage; tipcapin.style.position = "absolute"; tipcap.style.backgroundImage = "none"; } pngfix(); } document.onmousemove = function (evt) {move (evt)}; } move = function (evt) { if (window.event) { x = window.event.clientX; y = window.event.clientY; if (document.documentElement.scrollLeft) tipid.style.left = (TipWidth >= WinWidth ) ? ((x - offsetX - elewidth) + document.documentElement.scrollLeft) + "px" : (x + offsetX + document.documentElement.scrollLeft) + "px"; else tipid.style.left = (TipWidth >= WinWidth ) ? ((x - offsetX - elewidth) + document.body.scrollLeft) + "px" : (x + offsetX + document.body.scrollLeft) + "px"; if (document.documentElement.scrollTop) tipid.style.top = (TipHeight >= WinHeight) ? ((y - offsetY - eleheight) + document.documentElement.scrollTop) + "px" : (y + offsetY + document.documentElement.scrollTop) + "px"; else tipid.style.top = (TipHeight >= WinHeight) ? ((y - offsetY - eleheight) + document.body.scrollTop) + "px" : (y + offsetY + document.body.scrollTop) + "px"; } else { x = evt.clientX; y = evt.clientY; tipid.style.left = (TipWidth >= WinWidth ) ? ((x - offsetX - elewidth) + window.scrollX) + "px" : (x + offsetX + window.scrollX) + "px"; tipid.style.top = (TipHeight >= WinHeight) ? ((y - offsetY - eleheight) + window.scrollY) + "px" : (y + offsetY + window.scrollY) + "px"; } TipWidth = x + elewidth + 20; TipHeight = y + eleheight + 20; if (TipHeight >= WinHeight ) { tipid.removeChild(tippoint); tipid.removeChild(tipmid); tipid.removeChild(tipcap); tipid.appendChild(tipcap); tipid.appendChild(tipmid); tipid.appendChild(tippoint); } else { tipid.removeChild(tippoint); tipid.removeChild(tipmid); tipid.removeChild(tipcap); tipid.appendChild(tippoint); tipid.appendChild(tipmid); tipid.appendChild(tipcap); } if (TipHeight >= WinHeight) { if (document.getElementById('uniTipP')) { tippointin.style.left = (TipWidth >= WinWidth ) ? "-" + elewidth + "px" : "0px"; tippointin.style.top = "-" + PointHeight + "px"; } else tippoint.style.backgroundPosition = (TipWidth >= WinWidth ) ? "right bottom" : "left bottom"; if (document.getElementById('uniTipC')) tipcapin.style.top = "-" + CapHeight + "px"; else tipcap.style.backgroundPosition = "0 -" + CapHeight + "px"; } else { if (document.getElementById('uniTipP')) { tippointin.style.left = (TipWidth >= WinWidth ) ? "-" + elewidth + "px" : "0px"; tippointin.style.top = "0px"; } else tippoint.style.backgroundPosition = (TipWidth >= WinWidth ) ? "right top" : "left top"; if (document.getElementById('uniTipC')) tipcapin.style.top = "0px"; else tipcap.style.backgroundPosition = "0 0"; } } hide = function (a, sTitle) { if (document.getElementById("unitipmid")) { document.getElementById("unitipmid").innerHTML = ""; document.onmousemove = ''; document.body.removeChild(tipid); tipid.style.display = "none"; if (altText==false) a.setAttribute("title", sTitle); else a.setAttribute("alt", sTitle); altText=false; } } if (window.addEventListener) window.addEventListener("load", init, false); if (window.attachEvent) window.attachEvent("onload", init); }//setup everything AFTER the DOM is available window.addEvent('domready', function() { window.addEvent('resize',function(){scTweakColumns()}); scMenuSetup(); }); window.addEvent('load', function() { scTweakColumns(); }); function scTweakColumns() { var columns = $$('#sc_main, #sc_col1, #sc_col2'); var max_height = 0; var scOuter = $$('.var1_layout11 #sc_outer'); var scDiv = $('sc'); if (scOuter && scDiv) { scOuter = scOuter[0]; var windowHeight = window.getSize().y; var scHeight = scDiv.getSize().y; if (windowHeight > scHeight) { scOuter.setStyle('height', scOuter.getSize().y + windowHeight - scHeight); } } var col1 = $('sc_col1'); var col2 = $('sc_col2'); var scMain = $('sc_main'); if (col1) col1.setStyle('min-height',0); if (col2) col2.setStyle('min-height',0); var col1Height = col1 ? col1.getSize().y : 0; var col2Height = col2 ? col2.getSize().y : 0; var scMainHeight= scMain.getSize().y; if (col1 && col2 && col2.getStyle('clear') == 'left') { var navHeight = col1Height + col2Height; if (navHeight < scMainHeight) { col2.setStyle('min-height', col2Height + (scMainHeight - navHeight)); col1.setStyle('min-height',0); } } else { max_height = Math.max(col1Height, col2Height, scMainHeight); columns.setStyle('min-height', max_height); } } function scMenuSetup() { var scNav = $('sc_nav'); var scDiv = $('sc'); if (!scDiv) return; if (scNav) { $$('#sc_header .ico_menu').addEvent('click', function(){scNavShow(); return false;}); scNavClose = new Element('a', {id: 'sc_nav_close', class: 'ico ico_close', href: '#'}); scNavClose.inject(scDiv); scNavClose.addEvent('click', function() {scNavShow()}); scMask.addEvent('click', function(){ scNavShow('off')}); } var menu1s = $$('.menu1_outer'); if (menu1s) { menu1s.each(function(menu){scMenu1Setup(menu)}); $(document.body).addEvent('click', function() { menu1s.each(function(menu){scMenu1Toggle(menu, 1);}); }); } } function scMenu1Click(evt, menu1) { menu1.addClass('menu1_on'); evt.stopPropagation(); } function scMenu1IcoClick(evt, ico) { menuOuter = ico.getParent('.menu1_outer'); if (menuOuter.getElement('.menu1').getStyle('visibility') == 'visible' && evt.type == 'click') { scMenu1Toggle(menuOuter,1); return false; } $$('.menu1_outer').removeClass('menu1_on'); menuOuter.removeClass('closed'); } function scMenu1Toggle(menu, close) { var menuInner = menu.getElement('.menu1'); if (close || menu.hasClass('menu1_on')) { menu.removeClass('menu1_on'); menu.addClass('closed'); } else { menu.addClass('menu1_on'); } } function scMenu1Setup(menu) { menu.addEvent('click', function(evt) { scMenu1Click(evt, this);}); var menuIco = menu.getElement('a.ico:first-child'); menuIco.addEvent('click', function(evt){scMenu1IcoClick(evt, this);}); menu.addClass('setup'); } function scNavShow(mode) { var scDiv = $('sc'); if (!scDiv) return; $(document.body).fireEvent('click'); if (scDiv.hasClass('sc_menu_on') || mode == 'off') { scMaskHide(); scDiv.removeClass('sc_menu_on'); } else { scMaskShow(true); scDiv.addClass('sc_menu_on'); } }