/*! jQuery v2.0.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-2.0.2.min.map
*/
(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.2",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return f.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,p,f,h,d,g,m,y,v="sizzle"+-new Date,b=e.document,w=0,T=0,C=at(),k=at(),N=at(),E=!1,S=function(){return 0},j=typeof undefined,D=1<<31,A={}.hasOwnProperty,L=[],H=L.pop,q=L.push,O=L.push,F=L.slice,P=L.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",$=W.replace("w","w#"),B="\\["+M+"*("+W+")"+M+"*(?:([*^$|!~]?=)"+M+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+$+")|)|)"+M+"*\\]",I=":("+W+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+B.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=RegExp("^"+M+"*,"+M+"*"),X=RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=RegExp(M+"*[+~]"),Y=RegExp("="+M+"*([^\\]'\"]*)"+M+"*\\]","g"),V=RegExp(I),G=RegExp("^"+$+"$"),J={ID:RegExp("^#("+W+")"),CLASS:RegExp("^\\.("+W+")"),TAG:RegExp("^("+W.replace("w","w*")+")"),ATTR:RegExp("^"+B),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:RegExp("^(?:"+R+")$","i"),needsContext:RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,et=/^h\d$/i,tt=/'|\\/g,nt=RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{O.apply(L=F.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(it){O={apply:L.length?function(e,t){q.apply(e,F.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function ot(e,t,r,i){var o,s,a,u,l,f,g,m,x,w;if((t?t.ownerDocument||t:b)!==p&&c(t),t=t||p,r=r||[],!e||"string"!=typeof e)return r;if(1!==(u=t.nodeType)&&9!==u)return[];if(h&&!i){if(o=K.exec(e))if(a=o[1]){if(9===u){if(s=t.getElementById(a),!s||!s.parentNode)return r;if(s.id===a)return r.push(s),r}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&y(t,s)&&s.id===a)return r.push(s),r}else{if(o[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=o[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&(!d||!d.test(e))){if(m=g=v,x=t,w=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){f=vt(e),(g=t.getAttribute("id"))?m=g.replace(tt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=f.length;while(l--)f[l]=m+xt(f[l]);x=U.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return O.apply(r,x.querySelectorAll(w)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return St(e.replace(z,"$1"),t,r,i)}function st(e){return Q.test(e+"")}function at(){var e=[];function t(n,r){return e.push(n+=" ")>i.cacheLength&&delete t[e.shift()],t[n]=r}return t}function ut(e){return e[v]=!0,e}function lt(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t,n){e=e.split("|");var r,o=e.length,s=n?null:t;while(o--)(r=i.attrHandle[e[o]])&&r!==t||(i.attrHandle[e[o]]=s)}function pt(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:e[t]===!0?t.toLowerCase():null}function ft(e,t){return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}function ht(e){return"input"===e.nodeName.toLowerCase()?e.defaultValue:undefined}function dt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function gt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function mt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function yt(e){return ut(function(t){return t=+t,ut(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},n=ot.support={},c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:b,r=t.parentWindow;return t!==p&&9===t.nodeType&&t.documentElement?(p=t,f=t.documentElement,h=!s(t),r&&r.frameElement&&r.attachEvent("onbeforeunload",function(){c()}),n.attributes=lt(function(e){return e.innerHTML="<a href='#'></a>",ct("type|href|height|width",ft,"#"===e.firstChild.getAttribute("href")),ct(R,pt,null==e.getAttribute("disabled")),e.className="i",!e.getAttribute("className")}),n.input=lt(function(e){return e.innerHTML="<input>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}),ct("value",ht,n.attributes&&n.input),n.getElementsByTagName=lt(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=lt(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),n.getById=lt(function(e){return f.appendChild(e).id=v,!t.getElementsByName||!t.getElementsByName(v).length}),n.getById?(i.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete i.find.ID,i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=n.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&h?t.getElementsByClassName(e):undefined},g=[],d=[],(n.qsa=st(t.querySelectorAll))&&(lt(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll(":checked").length||d.push(":checked")}),lt(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&d.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")})),(n.matchesSelector=st(m=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&lt(function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",I)}),d=d.length&&RegExp(d.join("|")),g=g.length&&RegExp(g.join("|")),y=st(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},n.sortDetached=lt(function(e){return 1&e.compareDocumentPosition(t.createElement("div"))}),S=f.compareDocumentPosition?function(e,r){if(e===r)return E=!0,0;var i=r.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(r);return i?1&i||!n.sortDetached&&r.compareDocumentPosition(e)===i?e===t||y(b,e)?-1:r===t||y(b,r)?1:l?P.call(l,e)-P.call(l,r):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],u=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:l?P.call(l,e)-P.call(l,n):0;if(o===s)return dt(e,n);r=e;while(r=r.parentNode)a.unshift(r);r=n;while(r=r.parentNode)u.unshift(r);while(a[i]===u[i])i++;return i?dt(a[i],u[i]):a[i]===b?-1:u[i]===b?1:0},t):p},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Y,"='$1']"),!(!n.matchesSelector||!h||g&&g.test(t)||d&&d.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&c(e);var r=i.attrHandle[t.toLowerCase()],o=r&&A.call(i.attrHandle,t.toLowerCase())?r(e,t,!h):undefined;return o===undefined?n.attributes||!h?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null:o},ot.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,o=0;if(E=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(S),E){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return e},o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=ot.selectors={cacheLength:50,createPseudo:ut,match:J,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[4]||e[5]||"").replace(nt,rt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return J.CHILD.test(e[0])?null:(e[3]&&e[4]!==undefined?e[2]=e[4]:n&&V.test(n)&&(t=vt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,y=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){while(g){p=t;while(p=p[g])if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){c=m[v]||(m[v]={}),l=c[e]||[],h=l[0]===w&&l[1],f=l[0]===w&&l[2],p=h&&m.childNodes[h];while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[w,h,f];break}}else if(x&&(l=(t[v]||(t[v]={}))[e])&&l[0]===w)f=l[1];else while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if((a?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(x&&((p[v]||(p[v]={}))[e]=[w,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return r[v]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ut(function(e,n){var i,o=r(e,t),s=o.length;while(s--)i=P.call(e,o[s]),e[i]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ut(function(e){var t=[],n=[],r=a(e.replace(z,"$1"));return r[v]?ut(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ut(function(e){return function(t){return ot(e,t).length>0}}),contains:ut(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ut(function(e){return G.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return et.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:yt(function(){return[0]}),last:yt(function(e,t){return[t-1]}),eq:yt(function(e,t,n){return[0>n?n+t:n]}),even:yt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:yt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:yt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:yt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=gt(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=mt(t);function vt(e,t){var n,r,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=i.preFilter;while(a){(!n||(r=_.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(z," ")}),a=a.slice(n.length));for(s in i.filter)!(r=J[s].exec(a))||l[s]&&!(r=l[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ot.error(e):k(e,u).slice(0)}function xt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function bt(e,t,n){var i=t.dir,o=n&&"parentNode"===i,s=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,a){var u,l,c,p=w+" "+s;if(a){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,a))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[v]||(t[v]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,a)||r,l[1]===!0)return!0}}function wt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Tt(e,t,n,r,i){var o,s=[],a=0,u=e.length,l=null!=t;for(;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function Ct(e,t,n,r,i,o){return r&&!r[v]&&(r=Ct(r)),i&&!i[v]&&(i=Ct(i,o)),ut(function(o,s,a,u){var l,c,p,f=[],h=[],d=s.length,g=o||Et(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:Tt(g,f,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r){l=Tt(y,h),r(l,[],a,u),c=l.length;while(c--)(p=l[c])&&(y[h[c]]=!(m[h[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?P.call(o,p):f[c])>-1&&(o[l]=!(s[l]=p))}}else y=Tt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):O.apply(s,y)})}function kt(e){var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,c=bt(function(e){return e===t},a,!0),p=bt(function(e){return P.call(t,e)>-1},a,!0),f=[function(e,n,r){return!s&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>l;l++)if(n=i.relative[e[l].type])f=[bt(wt(f),n)];else{if(n=i.filter[e[l].type].apply(null,e[l].matches),n[v]){for(r=++l;o>r;r++)if(i.relative[e[r].type])break;return Ct(l>1&&wt(f),l>1&&xt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&kt(e.slice(l,r)),o>r&&kt(e=e.slice(r)),o>r&&xt(e))}f.push(n)}return wt(f)}function Nt(e,t){var n=0,o=t.length>0,s=e.length>0,a=function(a,l,c,f,h){var d,g,m,y=[],v=0,x="0",b=a&&[],T=null!=h,C=u,k=a||s&&i.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(u=l!==p&&l,r=n);null!=(d=k[x]);x++){if(s&&d){g=0;while(m=e[g++])if(m(d,l,c)){f.push(d);break}T&&(w=N,r=++n)}o&&((d=!m&&d)&&v--,a&&b.push(d))}if(v+=x,o&&x!==v){g=0;while(m=t[g++])m(b,y,l,c);if(a){if(v>0)while(x--)b[x]||y[x]||(y[x]=H.call(f));y=Tt(y)}O.apply(f,y),T&&!a&&y.length>0&&v+t.length>1&&ot.uniqueSort(f)}return T&&(w=N,u=C),b};return o?ut(a):a}a=ot.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=vt(e)),n=t.length;while(n--)o=kt(t[n]),o[v]?r.push(o):i.push(o);o=N(e,Nt(i,r))}return o};function Et(e,t,n){var r=0,i=t.length;for(;i>r;r++)ot(e,t[r],n);return n}function St(e,t,r,o){var s,u,l,c,p,f=vt(e);if(!o&&1===f.length){if(u=f[0]=f[0].slice(0),u.length>2&&"ID"===(l=u[0]).type&&n.getById&&9===t.nodeType&&h&&i.relative[u[1].type]){if(t=(i.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return r;e=e.slice(u.shift().value.length)}s=J.needsContext.test(e)?0:u.length;while(s--){if(l=u[s],i.relative[c=l.type])break;if((p=i.find[c])&&(o=p(l.matches[0].replace(nt,rt),U.test(u[0].type)&&t.parentNode||t))){if(u.splice(s,1),e=o.length&&xt(u),!e)return O.apply(r,o),r;break}}}return a(e,f)(o,t,!h,r,U.test(e)),r}i.pseudos.nth=i.pseudos.eq;function jt(){}jt.prototype=i.filters=i.pseudos,i.setFilters=new jt,n.sortStable=v.split("").sort(S).join("")===v,c(),[0,0].sort(S),n.detectDuplicates=E,x.find=ot,x.expr=ot.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ot.uniqueSort,x.text=ot.getText,x.isXMLDoc=ot.isXML,x.contains=ot.contains}(e);var D={};function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(p){for(t=e.memory&&p,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(p[0],p[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,a,n))>-1)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!a||n&&!u||(r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},a,u,l;if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,H,q=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))x.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){return t===undefined||t&&"string"==typeof t&&n===undefined?this.get(e,t):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(t===undefined)this.cache[o]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):(i=x.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(w)||[])),n=r.length;while(n--)delete s[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}},L=new F,H=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||H.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return H.access(e,t,n)},_removeData:function(e,t){H.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!H.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.slice(5)),P(i,r,s[r]));H.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}});function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:q.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=H.get(e,t),n&&(!r||x.isArray(n)?r=H.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()
},_queueHooks:function(e,t){var n=t+"queueHooks";return H.get(e,n)||H.access(e,n,{empty:x.Callbacks("once memory").add(function(){H.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(s--)n=H.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n\f]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,i="boolean"==typeof t;return x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,s=0,a=x(this),u=t,l=e.match(w)||[];while(o=l[s++])u=i?u:!a.hasClass(o),a[u?"addClass":"removeClass"](o)}else(n===r||"boolean"===n)&&(this.className&&H.set(this,"__className__",this.className),this.className=this.className||e===!1?"":H.get(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,x(this).val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;for(;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),s=i.length;while(s--)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.bool.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,p,f,h,d,g,m,y=H.get(e);if(y){n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;while(c--)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(f=x.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=x.event.special[d]||{},p=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,f.setup&&f.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),f.add&&(f.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,p):h.push(p),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,p,f,h,d,g,m=H.hasData(e)&&H.get(e);if(m&&(u=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){p=x.event.special[h]||{},h=(r?p.delegateType:p.bindType)||h,f=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;while(o--)c=f[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&p.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,H.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,p,f,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),f=x.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!x.isWindow(r)){for(l=f.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}s=0;while((a=h[s++])&&!t.isPropagationStopped())t.type=s>1?l:f.bindType||d,p=(H.get(a,"events")||{})[t.type]&&H.get(a,"handle"),p&&p.apply(a,n),p=c&&a[c],p&&x.acceptData(a)&&p.apply&&p.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(H.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),t=0;while((i=s[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,s=e,a=this.fixHooks[i];a||(this.fixHooks[i]=a=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new x.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=o),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=/^(?:parents|prev(?:Until|All))/,Q=x.expr.match.needsContext,K={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(et(this,e||[],!0))},filter:function(e){return this.pushStack(et(this,e||[],!1))},is:function(e){return!!et(this,"string"==typeof e&&Q.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],s=Q.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function Z(e,t){while((e=e[t])&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return Z(e,"nextSibling")},prev:function(e){return Z(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return e.contentDocument||x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(K[e]||x.unique(i),J.test(e)&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function et(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,nt=/<([\w:]+)/,rt=/<|&#?\w+;/,it=/<(?:script|style|link)/i,ot=/^(?:checkbox|radio)$/i,st=/checked\s*(?:[^=]|=\s*.checked.)/i,at=/^$|\/(?:java|ecma)script/i,ut=/^true\/(.*)/,lt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ct={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ct.optgroup=ct.option,ct.tbody=ct.tfoot=ct.colgroup=ct.caption=ct.thead,ct.th=ct.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(mt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&dt(mt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(mt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!ct[(nt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(tt,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(mt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=f.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,p=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&st.test(d))return this.each(function(r){var i=p.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(mt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,mt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,ht),l=0;s>l;l++)a=o[l],at.test(a.type||"")&&!H.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(lt,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),o=i.length-1,s=0;for(;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=mt(a),o=mt(e),r=0,i=o.length;i>r;r++)yt(o[r],s[r]);if(t)if(n)for(o=o||mt(e),s=s||mt(a),r=0,i=o.length;i>r;r++)gt(o[r],s[r]);else gt(e,a);return s=mt(a,"script"),s.length>0&&dt(s,!u&&mt(e,"script")),a},buildFragment:function(e,t,n,r){var i,o,s,a,u,l,c=0,p=e.length,f=t.createDocumentFragment(),h=[];for(;p>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(rt.test(i)){o=o||f.appendChild(t.createElement("div")),s=(nt.exec(i)||["",""])[1].toLowerCase(),a=ct[s]||ct._default,o.innerHTML=a[1]+i.replace(tt,"<$1></$2>")+a[2],l=a[0];while(l--)o=o.firstChild;x.merge(h,o.childNodes),o=f.firstChild,o.textContent=""}else h.push(t.createTextNode(i));f.textContent="",c=0;while(i=h[c++])if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=mt(f.appendChild(i),"script"),u&&dt(o),n)){l=0;while(i=o[l++])at.test(i.type||"")&&n.push(i)}return f},cleanData:function(e){var t,n,r,i,o,s,a=x.event.special,u=0;for(;(n=e[u])!==undefined;u++){if(F.accepts(n)&&(o=n[H.expando],o&&(t=H.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(s=0;(i=r[s])!==undefined;s++)a[i]?x.event.remove(n,i):x.removeEvent(n,i,t.handle);H.cache[o]&&delete H.cache[o]}delete L.cache[n[L.expando]]}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}});function pt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ht(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function dt(e,t){var n=e.length,r=0;for(;n>r;r++)H.set(e[r],"globalEval",!t||H.get(t[r],"globalEval"))}function gt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(H.hasData(e)&&(o=H.access(e),s=H.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function mt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function yt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ot.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var vt,xt,bt=/^(none|table(?!-c[ea]).+)/,wt=/^margin/,Tt=RegExp("^("+b+")(.*)$","i"),Ct=RegExp("^("+b+")(?!px)[a-z%]+$","i"),kt=RegExp("^([+-])=("+b+")","i"),Nt={BODY:"block"},Et={position:"absolute",visibility:"hidden",display:"block"},St={letterSpacing:0,fontWeight:400},jt=["Top","Right","Bottom","Left"],Dt=["Webkit","O","Moz","ms"];function At(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Dt.length;while(i--)if(t=Dt[i]+n,t in e)return t;return r}function Lt(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function Ht(t){return e.getComputedStyle(t,null)}function qt(e,t){var n,r,i,o=[],s=0,a=e.length;for(;a>s;s++)r=e[s],r.style&&(o[s]=H.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Lt(r)&&(o[s]=H.access(r,"olddisplay",Rt(r.nodeName)))):o[s]||(i=Lt(r),(n&&"none"!==n||!i)&&H.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=Ht(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return qt(this,!0)},hide:function(){return qt(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:Lt(this))?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=vt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=At(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=kt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=At(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=vt(e,t,r)),"normal"===i&&t in St&&(i=St[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),vt=function(e,t,n){var r,i,o,s=n||Ht(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Ct.test(a)&&wt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a};function Ot(e,t,n){var r=Tt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ft(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;for(;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+jt[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+jt[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+jt[o]+"Width",!0,i))):(s+=x.css(e,"padding"+jt[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+jt[o]+"Width",!0,i)));return s}function Pt(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Ht(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=vt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ct.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ft(e,t,n||(s?"border":"content"),r,o)+"px"}function Rt(e){var t=o,n=Nt[e];return n||(n=Mt(e,t),"none"!==n&&n||(xt=(xt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(xt[0].contentWindow||xt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=Mt(e,t),xt.detach()),Nt[e]=n),n}function Mt(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,t){x.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&bt.test(x.css(e,"display"))?x.swap(e,Et,function(){return Pt(e,t,r)}):Pt(e,t,r):undefined},set:function(e,n,r){var i=r&&Ht(e);return Ot(e,n,r?Ft(e,t,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,t){return t?x.swap(e,{display:"inline-block"},vt,[e,"marginRight"]):undefined}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,t){x.cssHooks[t]={get:function(e,n){return n?(n=vt(e,t),Ct.test(n)?x(e).position()[t]+"px":n):undefined}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+jt[r]+t]=o[r]||o[r-2]||o[0];return i}},wt.test(e)||(x.cssHooks[e+t].set=Ot)});var Wt=/%20/g,$t=/\[\]$/,Bt=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i,zt=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&zt.test(this.nodeName)&&!It.test(e)&&(this.checked||!ot.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(Bt,"\r\n")}}):{name:t.name,value:n.replace(Bt,"\r\n")}}).get()}}),x.param=function(e,t){var n,r=[],i=function(e,t){t=x.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===undefined&&(t=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){i(this.name,this.value)});else for(n in e)_t(n,e[n],t,i);return r.join("&").replace(Wt,"+")};function _t(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||$t.test(e)?r(e,i):_t(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)_t(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Xt,Ut,Yt=x.now(),Vt=/\?/,Gt=/#.*$/,Jt=/([?&])_=[^&]*/,Qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Kt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Zt=/^(?:GET|HEAD)$/,en=/^\/\//,tn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,nn=x.fn.load,rn={},on={},sn="*/".concat("*");try{Ut=i.href}catch(an){Ut=o.createElement("a"),Ut.href="",Ut=Ut.href}Xt=tn.exec(Ut.toLowerCase())||[];function un(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ln(e,t,n,r){var i={},o=e===on;function s(a){var u;return i[a]=!0,x.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):undefined:(t.dataTypes.unshift(l),s(l),!1)}),u}return s(t.dataTypes[0])||!i["*"]&&s("*")}function cn(e,t){var n,r,i=x.ajaxSettings.flatOptions||{};for(n in t)t[n]!==undefined&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,t,n){if("string"!=typeof e&&nn)return nn.apply(this,arguments);var r,i,o,s=this,a=e.indexOf(" ");return a>=0&&(r=e.slice(a),e=e.slice(0,a)),x.isFunction(t)?(n=t,t=undefined):t&&"object"==typeof t&&(i="POST"),s.length>0&&x.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?x("<div>").append(x.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ut,type:"GET",isLocal:Kt.test(Xt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":sn,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":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?cn(cn(e,x.ajaxSettings),t):cn(x.ajaxSettings,e)},ajaxPrefilter:un(rn),ajaxTransport:un(on),ajax:function(e,t){"object"==typeof e&&(t=e,e=undefined),t=t||{};var n,r,i,o,s,a,u,l,c=x.ajaxSetup({},t),p=c.context||c,f=c.context&&(p.nodeType||p.jquery)?x(p):x.event,h=x.Deferred(),d=x.Callbacks("once memory"),g=c.statusCode||{},m={},y={},v=0,b="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===v){if(!o){o={};while(t=Qt.exec(i))o[t[1].toLowerCase()]=t[2]}t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===v?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return v||(e=y[n]=y[n]||e,m[e]=t),this},overrideMimeType:function(e){return v||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>v)for(t in e)g[t]=[g[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),k(0,t),this}};if(h.promise(T).complete=d.add,T.success=T.done,T.error=T.fail,c.url=((e||c.url||Ut)+"").replace(Gt,"").replace(en,Xt[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=x.trim(c.dataType||"*").toLowerCase().match(w)||[""],null==c.crossDomain&&(a=tn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===Xt[1]&&a[2]===Xt[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(Xt[3]||("http:"===Xt[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=x.param(c.data,c.traditional)),ln(rn,c,t,T),2===v)return T;u=c.global,u&&0===x.active++&&x.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Zt.test(c.type),r=c.url,c.hasContent||(c.data&&(r=c.url+=(Vt.test(r)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=Jt.test(r)?r.replace(Jt,"$1_="+Yt++):r+(Vt.test(r)?"&":"?")+"_="+Yt++)),c.ifModified&&(x.lastModified[r]&&T.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&T.setRequestHeader("If-None-Match",x.etag[r])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&T.setRequestHeader("Content-Type",c.contentType),T.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+sn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)T.setRequestHeader(l,c.headers[l]);if(c.beforeSend&&(c.beforeSend.call(p,T,c)===!1||2===v))return T.abort();b="abort";for(l in{success:1,error:1,complete:1})T[l](c[l]);if(n=ln(on,c,t,T)){T.readyState=1,u&&f.trigger("ajaxSend",[T,c]),c.async&&c.timeout>0&&(s=setTimeout(function(){T.abort("timeout")},c.timeout));try{v=1,n.send(m,k)}catch(C){if(!(2>v))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,t,o,a){var l,m,y,b,w,C=t;2!==v&&(v=2,s&&clearTimeout(s),n=undefined,i=a||"",T.readyState=e>0?4:0,l=e>=200&&300>e||304===e,o&&(b=pn(c,T,o)),b=fn(c,b,T,l),l?(c.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(x.lastModified[r]=w),w=T.getResponseHeader("etag"),w&&(x.etag[r]=w)),204===e||"HEAD"===c.type?C="nocontent":304===e?C="notmodified":(C=b.state,m=b.data,y=b.error,l=!y)):(y=C,(e||!C)&&(C="error",0>e&&(e=0))),T.status=e,T.statusText=(t||C)+"",l?h.resolveWith(p,[m,C,T]):h.rejectWith(p,[T,C,y]),T.statusCode(g),g=undefined,u&&f.trigger(l?"ajaxSuccess":"ajaxError",[T,c,l?m:y]),d.fireWith(p,[T,C]),u&&(f.trigger("ajaxComplete",[T,c]),--x.active||x.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,undefined,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,r,i){return x.isFunction(n)&&(i=i||r,r=n,n=undefined),x.ajax({url:e,type:t,dataType:i,data:n,success:r})}});function pn(e,t,n){var r,i,o,s,a=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):undefined}function fn(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(p){return{state:"parsererror",error:s?p:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=x("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),o.head.appendChild(t[0])},abort:function(){n&&n()}}}});var hn=[],dn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=hn.pop()||x.expando+"_"+Yt++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,s,a=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=x.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(Vt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||x.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},r.always(function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,hn.push(i)),s&&x.isFunction(o)&&o(s[0]),s=o=undefined}),"script"):undefined}),x.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var gn=x.ajaxSettings.xhr(),mn={0:200,1223:204},yn=0,vn={};e.ActiveXObject&&x(e).on("unload",function(){for(var e in vn)vn[e]();vn=undefined}),x.support.cors=!!gn&&"withCredentials"in gn,x.support.ajax=gn=!!gn,x.ajaxTransport(function(e){var t;return x.support.cors||gn&&!e.crossDomain?{send:function(n,r){var i,o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)s[i]=e.xhrFields[i];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)s.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete vn[o],t=s.onload=s.onerror=null,"abort"===e?s.abort():"error"===e?r(s.status||404,s.statusText):r(mn[s.status]||s.status,s.statusText,"string"==typeof s.responseText?{text:s.responseText}:undefined,s.getAllResponseHeaders()))}},s.onload=t(),s.onerror=t("error"),t=vn[o=yn++]=t("abort"),s.send(e.hasContent&&e.data||null)},abort:function(){t&&t()}}:undefined});var xn,bn,wn=/^(?:toggle|show|hide)$/,Tn=RegExp("^(?:([+-])=|)("+b+")([a-z%]*)$","i"),Cn=/queueHooks$/,kn=[An],Nn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Tn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),s=(x.cssNumber[e]||"px"!==o&&+r)&&Tn.exec(x.css(n.elem,e)),a=1,u=20;if(s&&s[3]!==o){o=o||s[3],i=i||[],s=+r||1;do a=a||".5",s/=a,x.style(n.elem,e,s+o);while(a!==(a=n.cur()/r)&&1!==a&&--u)}return i&&(s=n.start=+s||+r||0,n.unit=o,n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]),n}]};function En(){return setTimeout(function(){xn=undefined}),xn=x.now()}function Sn(e,t,n){var r,i=(Nn[t]||[]).concat(Nn["*"]),o=0,s=i.length;for(;s>o;o++)if(r=i[o].call(n,t,e))return r}function jn(e,t,n){var r,i,o=0,s=kn.length,a=x.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=xn||En(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,s=0,u=l.tweens.length;for(;u>s;s++)l.tweens[s].run(o);return a.notifyWith(e,[l,o,n]),1>o&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:xn||En(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),c=l.props;for(Dn(c,l.opts.specialEasing);s>o;o++)if(r=kn[o].call(l,e,c,l.opts))return r;return x.map(c,Sn,l),x.isFunction(l.opts.start)&&l.opts.start.call(e,l),x.fx.timer(x.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function Dn(e,t){var n,r,i,o,s;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),s=x.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(jn,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Nn[n]=Nn[n]||[],Nn[n].unshift(t)},prefilter:function(e,t){t?kn.unshift(e):kn.push(e)}});function An(e,t,n){var r,i,o,s,a,u,l=this,c={},p=e.style,f=e.nodeType&&Lt(e),h=H.get(e,"fxshow");n.queue||(a=x._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,l.always(function(){l.always(function(){a.unqueued--,x.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",l.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],wn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show")){if("show"!==i||!h||h[r]===undefined)continue;f=!0}c[r]=h&&h[r]||x.style(e,r)}if(!x.isEmptyObject(c)){h?"hidden"in h&&(f=h.hidden):h=H.access(e,"fxshow",{}),o&&(h.hidden=!f),f?x(e).show():l.done(function(){x(e).hide()}),l.done(function(){var t;H.remove(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)s=Sn(f?h[r]:0,r,l),r in h||(h[r]=s.start,f&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}}function Ln(e,t,n,r,i){return new Ln.prototype.init(e,t,n,r,i)}x.Tween=Ln,Ln.prototype={constructor:Ln,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=Ln.propHooks[this.prop];return e&&e.get?e.get(this):Ln.propHooks._default.get(this)},run:function(e){var t,n=Ln.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ln.propHooks._default.set(this),this}},Ln.prototype.init.prototype=Ln.prototype,Ln.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Ln.propHooks.scrollTop=Ln.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(Hn(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Lt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),s=function(){var t=jn(this,x.extend({},e),o);(i||H.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=undefined),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=x.timers,s=H.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&Cn.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=H.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,s=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function Hn(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=jt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:Hn("show"),slideUp:Hn("hide"),slideToggle:Hn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=Ln.prototype.init,x.fx.tick=function(){var e,t=x.timers,n=0;for(xn=x.now();t.length>n;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||x.fx.stop(),xn=undefined},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){bn||(bn=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(bn),bn=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===undefined?this:this.each(function(t){x.offset.setOffset(this,e,t)});var t,n,i=this[0],o={top:0,left:0},s=i&&i.ownerDocument;if(s)return t=s.documentElement,x.contains(t,i)?(typeof i.getBoundingClientRect!==r&&(o=i.getBoundingClientRect()),n=qn(s),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}):o},x.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l,c=x.css(e,"position"),p=x(e),f={};"static"===c&&(e.style.position="relative"),a=p.offset(),o=x.css(e,"top"),u=x.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=p.position(),s=r.top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),x.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(f.top=t.top-a.top+s),null!=t.left&&(f.left=t.left-a.left+i),"using"in t?t.using.call(e,f):p.css(f)}},x.fn.extend({position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===x.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(r=e.offset()),r.top+=x.css(e[0],"borderTopWidth",!0),r.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-x.css(n,"marginTop",!0),left:t.left-r.left-x.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r="pageYOffset"===n;x.fn[t]=function(i){return x.access(this,function(t,i,o){var s=qn(t);return o===undefined?s?s[n]:t[i]:(s?s.scrollTo(r?e.pageXOffset:o,r?o:e.pageYOffset):t[i]=o,undefined)},t,i,arguments.length,null)}});function qn(e){return x.isWindow(e)?e:9===e.nodeType&&e.defaultView}x.each({Height:"height",Width:"width"},function(e,t){x.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){x.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||i===!0?"margin":"border");return x.access(this,function(t,n,r){var i;return x.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):r===undefined?x.css(t,n,s):x.style(t,n,r,s)},t,o?r:undefined,o,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}),"object"==typeof e&&"object"==typeof e.document&&(e.jQuery=e.$=x)})(window);

/*! jQuery Migrate v1.1.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){o[n]||(o[n]=!0,e.migrateWarnings.push(n),t.console&&console.warn&&!e.migrateMute&&(console.warn("JQMIGRATE: "+n),e.migrateTrace&&console.trace&&console.trace()))}function a(t,a,o,i){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(i),o},set:function(e){r(i),o=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=o}var o={};e.migrateWarnings=[],!e.migrateMute&&t.console&&console.log&&console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){o={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var i=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",i||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,o,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(i?a in i:e.isFunction(e.fn[a])))?e(t)[a](o):("type"===a&&o!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,o=e.prop(t,r);return o===!0||"boolean"!=typeof o&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,o))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^(?:[^<]*(<[\w\W]+>)[^>]*|#([\w\-]*))$/;e.fn.init=function(t,n,a){var o;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(o=y.exec(t))&&o[1]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(e.trim(t),n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,o,i=this[0];return!i||"events"!==t||1!==arguments.length||(a=e.data(i,t),o=e._data(i,t),a!==n&&a!==o||o===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),o)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,o,i){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),o)for(c=function(e){return!e.type||j.test(e.type)?i?i.push(e.parentNode?e.parentNode.removeChild(e):e):o.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(o.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,C=e.fn.live,S=e.fn.die,T="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",M=RegExp("\\b(?:"+T+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,o){e!==document&&M.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,o)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,o=t.guid||e.guid++,i=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%i;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=o;a.length>i;)a[i++].guid=o;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),C?C.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),S?S.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||M.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(T.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
/* @ sourceMappingURL=dist/jquery-migrate.min.map */

/* .data() fixup */
(function(jQuery){var _dataFn=jQuery.fn.data;jQuery.fn.data=function(key,val){if(typeof val!=='undefined'){jQuery.expr.attrHandle[key]=function(elem){return jQuery(elem).attr(key)||jQuery(elem).data(key);};}return _dataFn.apply(this,arguments);};})(jQuery);

var jq=jQuery.noConflict();
/**
 * StyleFix 1.0.3 & PrefixFree 1.0.7
 * @author Lea Verou
 * MIT license
 */(function(){function t(e,t){return[].slice.call((t||document).querySelectorAll(e))}if(!window.addEventListener)return;var e=window.StyleFix={link:function(t){try{if(t.rel!=="stylesheet"||t.hasAttribute("data-noprefix"))return}catch(n){return}var r=t.href||t.getAttribute("data-href"),i=r.replace(/[^\/]+$/,""),s=t.parentNode,o=new XMLHttpRequest,u;o.onreadystatechange=function(){o.readyState===4&&u()};u=function(){var n=o.responseText;if(n&&t.parentNode&&(!o.status||o.status<400||o.status>600)){n=e.fix(n,!0,t);if(i){n=n.replace(/url\(\s*?((?:"|')?)(.+?)\1\s*?\)/gi,function(e,t,n){return/^([a-z]{3,10}:|\/|#)/i.test(n)?e:'url("'+i+n+'")'});var r=i.replace(/([\\\^\$*+[\]?{}.=!:(|)])/g,"\\$1");n=n.replace(RegExp("\\b(behavior:\\s*?url\\('?\"?)"+r,"gi"),"$1")}var u=document.createElement("style");u.textContent=n;u.media=t.media;u.disabled=t.disabled;u.setAttribute("data-href",t.getAttribute("href"));s.insertBefore(u,t);s.removeChild(t);u.media=t.media}};try{o.open("GET",r);o.send(null)}catch(n){if(typeof XDomainRequest!="undefined"){o=new XDomainRequest;o.onerror=o.onprogress=function(){};o.onload=u;o.open("GET",r);o.send(null)}}t.setAttribute("data-inprogress","")},styleElement:function(t){if(t.hasAttribute("data-noprefix"))return;var n=t.disabled;t.textContent=e.fix(t.textContent,!0,t);t.disabled=n},styleAttribute:function(t){var n=t.getAttribute("style");n=e.fix(n,!1,t);t.setAttribute("style",n)},process:function(){t('link[rel="stylesheet"]:not([data-inprogress])').forEach(StyleFix.link);t("style").forEach(StyleFix.styleElement);t("[style]").forEach(StyleFix.styleAttribute)},register:function(t,n){(e.fixers=e.fixers||[]).splice(n===undefined?e.fixers.length:n,0,t)},fix:function(t,n,r){for(var i=0;i<e.fixers.length;i++)t=e.fixers[i](t,n,r)||t;return t},camelCase:function(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()}).replace("-","")},deCamelCase:function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()})}};(function(){setTimeout(function(){t('link[rel="stylesheet"]').forEach(StyleFix.link)},10);document.addEventListener("DOMContentLoaded",StyleFix.process,!1)})()})();(function(e){function t(e,t,r,i,s){e=n[e];if(e.length){var o=RegExp(t+"("+e.join("|")+")"+r,"gi");s=s.replace(o,i)}return s}if(!window.StyleFix||!window.getComputedStyle)return;var n=window.PrefixFree={prefixCSS:function(e,r,i){var s=n.prefix;n.functions.indexOf("linear-gradient")>-1&&(e=e.replace(/(\s|:|,)(repeating-)?linear-gradient\(\s*(-?\d*\.?\d*)deg/ig,function(e,t,n,r){return t+(n||"")+"linear-gradient("+(90-r)+"deg"}));e=t("functions","(\\s|:|,)","\\s*\\(","$1"+s+"$2(",e);e=t("keywords","(\\s|:)","(\\s|;|\\}|$)","$1"+s+"$2$3",e);e=t("properties","(^|\\{|\\s|;)","\\s*:","$1"+s+"$2:",e);if(n.properties.length){var o=RegExp("\\b("+n.properties.join("|")+")(?!:)","gi");e=t("valueProperties","\\b",":(.+?);",function(e){return e.replace(o,s+"$1")},e)}if(r){e=t("selectors","","\\b",n.prefixSelector,e);e=t("atrules","@","\\b","@"+s+"$1",e)}e=e.replace(RegExp("-"+s,"g"),"-");e=e.replace(/-\*-(?=[a-z]+)/gi,n.prefix);return e},property:function(e){return(n.properties.indexOf(e)?n.prefix:"")+e},value:function(e,r){e=t("functions","(^|\\s|,)","\\s*\\(","$1"+n.prefix+"$2(",e);e=t("keywords","(^|\\s)","(\\s|$)","$1"+n.prefix+"$2$3",e);return e},prefixSelector:function(e){return e.replace(/^:{1,2}/,function(e){return e+n.prefix})},prefixProperty:function(e,t){var r=n.prefix+e;return t?StyleFix.camelCase(r):r}};(function(){var e={},t=[],r={},i=getComputedStyle(document.documentElement,null),s=document.createElement("div").style,o=function(n){if(n.charAt(0)==="-"){t.push(n);var r=n.split("-"),i=r[1];e[i]=++e[i]||1;while(r.length>3){r.pop();var s=r.join("-");u(s)&&t.indexOf(s)===-1&&t.push(s)}}},u=function(e){return StyleFix.camelCase(e)in s};if(i.length>0)for(var a=0;a<i.length;a++)o(i[a]);else for(var f in i)o(StyleFix.deCamelCase(f));var l={uses:0};for(var c in e){var h=e[c];l.uses<h&&(l={prefix:c,uses:h})}n.prefix="-"+l.prefix+"-";n.Prefix=StyleFix.camelCase(n.prefix);n.properties=[];for(var a=0;a<t.length;a++){var f=t[a];if(f.indexOf(n.prefix)===0){var p=f.slice(n.prefix.length);u(p)||n.properties.push(p)}}n.Prefix=="Ms"&&!("transform"in s)&&!("MsTransform"in s)&&"msTransform"in s&&n.properties.push("transform","transform-origin");n.properties.sort()})();(function(){function i(e,t){r[t]="";r[t]=e;return!!r[t]}var e={"linear-gradient":{property:"backgroundImage",params:"red, teal"},calc:{property:"width",params:"1px + 5%"},element:{property:"backgroundImage",params:"#foo"},"cross-fade":{property:"backgroundImage",params:"url(a.png), url(b.png), 50%"}};e["repeating-linear-gradient"]=e["repeating-radial-gradient"]=e["radial-gradient"]=e["linear-gradient"];var t={initial:"color","zoom-in":"cursor","zoom-out":"cursor",box:"display",flexbox:"display","inline-flexbox":"display",flex:"display","inline-flex":"display"};n.functions=[];n.keywords=[];var r=document.createElement("div").style;for(var s in e){var o=e[s],u=o.property,a=s+"("+o.params+")";!i(a,u)&&i(n.prefix+a,u)&&n.functions.push(s)}for(var f in t){var u=t[f];!i(f,u)&&i(n.prefix+f,u)&&n.keywords.push(f)}})();(function(){function s(e){i.textContent=e+"{}";return!!i.sheet.cssRules.length}var t={":read-only":null,":read-write":null,":any-link":null,"::selection":null},r={keyframes:"name",viewport:null,document:'regexp(".")'};n.selectors=[];n.atrules=[];var i=e.appendChild(document.createElement("style"));for(var o in t){var u=o+(t[o]?"("+t[o]+")":"");!s(u)&&s(n.prefixSelector(u))&&n.selectors.push(o)}for(var a in r){var u=a+" "+(r[a]||"");!s("@"+u)&&s("@"+n.prefix+u)&&n.atrules.push(a)}e.removeChild(i)})();n.valueProperties=["transition","transition-property"];e.className+=" "+n.prefix;StyleFix.register(n.prefixCSS)})(document.documentElement);
if(typeof jq==="undefined"){var jq=undefined;}
var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version=-1;}}return version;}function GetSwfVer(){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4];}if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1);}else if(versionRevision[0]=="r"){versionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"));}}var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}}else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){flashVer=4;}else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){flashVer=3;}else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){flashVer=2;}else if(isIE&&isWin&&!isOpera){flashVer=ControlVersion();}return flashVer;}function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision){versionStr=GetSwfVer();if(versionStr==-1){return false;}else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer)){return true;}else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision)){return true;}}}return false;}}function AC_AddExtension(src,ext){if(src.indexOf('?')!=-1){return src.replace(/\?/,ext+'?');}else{return src+ext;}}function AC_Generateobj(objAttrs,params,embedAttrs){var str='';if(isIE&&isWin&&!isOpera){str+='<object ';for(var i in objAttrs){str+=i+'="'+objAttrs[i]+'" ';}str+='>';for(var i in params){str+='<param name="'+i+'" value="'+params[i]+'" /> ';}str+='</object>';}else{str+='<embed ';for(var i in embedAttrs){str+=i+'="'+embedAttrs[i]+'" ';}str+='> </embed>';}document.write(str);}function AC_FL_RunContent(){var ret=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}function AC_SW_RunContent(){var ret=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblclick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}ret.objAttrs["classid"]=classid;if(mimeType){ret.embedAttrs["type"]=mimeType;}return ret;}function correctPNG(){var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);if((version>=5.5)&&(document.body.filters)){for(var i=0;i<document.images.length;i++){var img=document.images[i];var imgName=img.src.toUpperCase();if(imgName.substring(imgName.length-3,imgName.length)=="PNG"){var imgID=(img.id)?"id='"+img.id+"'":"";var imgClass=(img.className)?"class='"+img.className+"'":"";var imgTitle=(img.title)?"title='"+img.title+"'":"title='"+img.alt+"'";var imgStyle="display:inline-block;"+img.style.cssText;if(img.align=="left"){imgStyle="float:left;"+imgStyle;}if(img.align=="right"){imgStyle="float:right;"+imgStyle;}if(img.parentElement.href){imgStyle="cursor:hand;"+imgStyle;}var strNewHTML="<span"+imgID+imgClass+imgTitle+"style=\""+"width:"+img.width+"px;height:"+img.height+"px;"+imgStyle+";"+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src=\'"+img.src+"\',sizingMethod='scale');\"></span>";img.outerHTML=strNewHTML;i=i-1;}}}}function SetContainerHTML(id,html,processScripts,entorn){var ent=(entorn==undefined?document:entorn);mydiv=ent.getElementById(id);mydiv.innerHTML=html;if(processScripts!=false){var elementos=mydiv.getElementsByTagName("script");for(i=0;i<elementos.length;i++){var elemento=elementos[i];nuevoScript=ent.createElement("script");nuevoScript.text=elemento.innerHTML;nuevoScript.type="text/javascript";nuevoScript.language="JavaScript";if(elemento.src!=null&&elemento.src.length>0){nuevoScript.src=elemento.src;}elemento.parentNode.replaceChild(nuevoScript,elemento);}}}function cambiarBotoIn(id,src){id.src=src;}function cambiarBotoOut(id,src){id.src=src;}function cambiarBotoPress(id,src){id.src=src;}function miniaturaEncima(obj){jq("#"+obj.id).removeClass("box").addClass("resplandor");}function miniaturaFuera(obj){jq("#"+obj.id).removeClass("resplandor").addClass("box");}function barIn(id,n){if(n==undefined){n=0;}id.style.backgroundImage='url(https://static.paudedamasc.com/img/bar'+n+'1.png)';id.style.backgroundRepeat='repeat-x';id.style.MozBorderRadius='5px';id.style.backgroundPosition='left top';}function barOut(id,n){if(n==undefined){n=0;}if(id.className.indexOf("cell_blau_fluix")==-1){id.style.backgroundImage='url(https://static.paudedamasc.com/img/bar'+n+'0.png)';id.style.backgroundRepeat='repeat-x';id.style.MozBorderRadius='5px';id.style.backgroundPosition='left top';}else{id.style.backgroundImage='url()';}}bo1=0;function mueveReloj(){if(bo1==0){bo1=1;year=document.reloj.ano.value;month=document.reloj.mes.value;day=document.reloj.dia.value;hour=document.reloj.hora.value;minute=document.reloj.minuto.value;second=document.reloj.segundo.value;}if((year%4==0&&year%100!=0)||year%400==0){mf=29;}else{mf=28;}mlen=new Array(31,mf,31,30,31,30,31,31,30,31,30,31);mstr=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");if(second<59){second++;}else{second=0;if(minute<59){minute++;}else{minute=0;if(hour<23){hour++;}else{hour=0;if(day<mlen[month-1]){day++;}else{day=1;if(month!=12){month++;}else{month=1;year++;}}}}}if(second<10){second="0"+second*1;}if(minute<10){minute="0"+minute*1;}if(hour<10){hour="0"+hour*1;}dTime=hour+" : "+minute+" : "+second;dDate=day*1+" de "+mstr[month-1]+" de "+year;document.reloj.hora_servidor.value=dTime;document.reloj.fecha_servidor.value=dDate;main_to=window.setTimeout("mueveReloj()",1000);}function bookmarksite(title,url){if(window.sidebar){window.sidebar.addPanel(title,url,"");}else if(window.opera&&window.print){var elem=document.createElement('a');elem.setAttribute('href',url);elem.setAttribute('title',title);elem.setAttribute('rel','sidebar');elem.click();}else if(document.all){window.external.AddFavorite(url,title);}}horaSortida=6;horaMigdia=12;horaPosta=21;horaMitjanit=0;colors=Array("DFF4FF","DFF5FE","DEF4FE","DDF4FE","DDF3FD","DDF2FC","DCF2FC","DBF1FB","DAF1FA","DAF0F9","D9EFF9","D8EFF9","D8EEF8","D7EDF7","D6ECF6","D6ECF5","D4EBF5","D4EAF4","D3E9F3","D2E8F2","D1E7F1","D1E6F1","D0E6EF","CFE5EF","CEE5EE","CEE4ED","CDE3EC","CBE1EB","CBE0EA","CAE0EA","C8DFE9","C8DDE8","C7DCE6","C6DCE6","C4DBE5","C3DAE4","C3D9E2","C1D8E2","C0D7E0","BFD5E0","BFD5DE","BED4DD","BCD3DD","BBD2DB","BAD0DA","B9CFD9","B8CED8","B6CDD7","B5CCD6","B5CBD4","B3CAD4","B2C8D2","B1C7D1","B0C6D0","AFC4CF","AEC4CE","ADC3CC","ABC1CB","AAC0CA","A8BFC9","A8BEC8","A7BDC7","A6BBC6","A5BAC4","A3B9C3","A1B8C2","A0B6C1","9FB5BF","9EB4BE","9CB3BC","9CB1BC","9AB0BA","99AFB9","98AEB8","97ACB6","95ACB5","94AAB4","92A9B2","91A8B1","91A6B0","8FA5AF","8DA4AE","8CA2AD","8BA1AB","8AA0AA","899FA9","889EA8","869CA6","859BA5","849AA4","8399A2","8197A2","8096A0","7F959F","7D939E","7C929D","7B919B","7A909A","788F99","778D97","768C96","758B95","748A94","728892","728791","718791","6F868F","6E848E","6D838D","6C828C","6B808B","6A7F8A","687E88","677D87","667C86","657B84","647A84","637982","617882","617781","5F767F","5E757F","5E737E","5C737D","5B727C","5B707A","5A6F79","586E78","576E78","566C77","566B76","546A75","536973","526873","526772","516671","506670","4F656F","4F646E","4D646D","4C636C","4C616B","4B606B","4A606A","495F69","485F68","475D68","475D67","465C66","455C65","455B65","445A64","445A63","435963","425863","425762","415761","405761","405660","405660");function CheckYear(Y){if(((Y%4==0)&&(Y%100!=0))||(Y%400==0)){mf=29;}else{mf=28;}mlen=Array(31,mf,31,30,31,30,31,31,30,31,30,31);return mlen;}function ConvertToDays(Y,m,d){mlen=CheckYear(Y);days=d;for(i=0;i<m;i++){days+=mlen[i];}return days;}function ConvertToMinutes(h,m){return h*60+m;}function RGB_a_Decimal(cadena){digits=Array(cadena.substring(1,2),cadena.substring(2,3),cadena.substring(3,4),cadena.substring(4,5),cadena.substring(5,6),cadena.substring(6,7));for(var i=0;i<digits.length;i++){if(digits[i]=="A"||digits[i]=="a"){digits[i]=10;}else if(digits[i]=="B"||digits[i]=="b"){digits[i]=11;}else if(digits[i]=="C"||digits[i]=="c"){digits[i]=12;}else if(digits[i]=="D"||digits[i]=="d"){digits[i]=13;}else if(digits[i]=="E"||digits[i]=="e"){digits[i]=14;}else if(digits[i]=="F"||digits[i]=="f"){digits[i]=15;}}return Array(digits[0]*16+digits[1]*1,digits[2]*16+digits[3]*1,digits[4]*16+digits[5]*1);}function Decimal_a_RGB(R,G,B){digits=Array(Math.floor(R/16),R%16,Math.floor(G/16),G%16,Math.floor(B/16),B%16);for(var i=0;i<digits.length;i++){if(digits[i]==10){digits[i]="A";}else if(digits[i]==11){digits[i]="B";}else if(digits[i]==12){digits[i]="C";}else if(digits[i]==13){digits[i]="D";}else if(digits[i]==14){digits[i]="E";}else if(digits[i]==15){digits[i]="F";}}return"#"+digits[0]+digits[1]+digits[2]+digits[3]+digits[4]+digits[5];}function complementari(color){matriu=RGB_a_Decimal(color);return Decimal_a_RGB(255-matriu[0],255-matriu[1],255-matriu[2]);}function getColor(){date=new Date();minut=date.getMinutes();hora=date.getHours();numMinuts=ConvertToMinutes(hora,minut);var Y=80*Math.sin((Math.PI/12)*(numMinuts/60-horaSortida))-76;var c=Math.floor((-1)*Y);color="#"+colors[(c>=0?c:0)];return color;}function colorFons(){var color=getColor();jq('-webkit-scrollbar-track').css('background',color);var baseHref_=document.getElementsByTagName("base");if(baseHref_.length>0){var baseHref=baseHref_[0].href.split("https://batmanapollo.ru/");if(baseHref[1]=="/"||(baseHref[1]=="/cpanel/"&&(""=="/cpanel/"||"".indexOf("/cpanel/?")!=-1))||baseHref[1]=="/libros/"||baseHref[1]=="/biografias/"||baseHref[1]=="/editoriales/"||baseHref[1]=="/indice-materias-ibic/"||baseHref[1]=="/recomendaciones/"||baseHref[1]=="/usuarios/"||baseHref[1]=="/comentarios/"||baseHref[1]=="/libros-de-antroposofia/"||baseHref[1]=="/comentarios/"||baseHref[1]=="/nuevo-pedido/"||baseHref[1]=="/contactar/"||baseHref[1]=="/galerias/"||baseHref[1]=="/novedades/"||baseHref[1]=="/buscar/"||baseHref[1]=="/catalogo/buscar/"||baseHref[1]=="/catalogo-completo-extendido/"||baseHref[1]=="/busqueda-avanzada/"){document.body.style.backgroundColor=color;document.body.style.backgroundColor=color;div=document.getElementById("cos");if(div!==null&&div!==undefined){div.style.backgroundColor=color;div.style.backgroundColor=color;jq(".menu").css("background-color",color);}var i=0;while(trans=document.getElementById('transparent'+i)){trans.style.backgroundColor=color;trans.style.backgroundColor=color;i++;}p=document.getElementById("peu");if(p!==null&&p!==undefined){p.style.color=complementari(color);}p2=document.getElementById("peu2");if(p2!==null&&p2!==undefined){p2.style.color=complementari(color);}trans=document.getElementById("transparent");if(trans!==null&&trans!==undefined){trans.style.backgroundColor=color;trans.style.backgroundColor=color;}}}}function rellotge(){colorFons();}var Cookie={read:function(name){var arrCookies=document.cookie.split("; ");for(var i=0;i<arrCookies.length;i++){var arrCookie=arrCookies[i].split("=");if(arrCookie[0]==name){return decodeURIComponent(arrCookie[1]);}}return false;},write:function(name,value,expires,path){if(expires){var date=new Date();date.setTime(date.getTime()+(((((expires*24)*60)*60)*1000)));expires="; expires="+date.toGMTString();}else{expires="";}if(!path){path="/";}document.cookie=name+"="+encodeURIComponent(value)+expires+"; path="+path;},remove:function(name){this.write(name,"",-1);}};function browserSupportsCookies(){Cookie.write("cookiesEnabled",1);var boolCookiesEnabled=Cookie.read("cookiesEnabled");Cookie.remove("cookiesEnabled");if(boolCookiesEnabled!=1){return false;}return true;}function browserSupportsAjax(){if(typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject=="undefined"&&window.createRequest=="undefined"){return false;}return true;}function ActiveXEnabledOrUnnecessary(){if(typeof ActiveXObject!="undefined"){var xhr=null;try{xhr=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xhr=new ActiveXObject("Microsoft.XMLHTTP");}catch(e2){try{xhr=new ActiveXObject("Msxml2.XMLHTTP.4.0");}catch(e3){xhr=null;}}}if(xhr==null){return false;}}return true;}function getCookie(name){var cname=name+"=";var dc=document.cookie;if(dc.length>0){begin=dc.indexOf(cname);if(begin!=-1){return true;}}return false;}function detectar(){if(!browserSupportsCookies()){var msger="<br /><img src=\"img/alert_p.gif\" alt=\"Alerta\" align=\"absbottom\" border=\"0\"> Esta página web, para funcionar adecuadamente, requiere <strong>Cookies</strong> (llamadas \"Galletas\" en su navegador) ";msger+="y éstas parecen estar deshabilitadas. ";msger+="Por favor habilite las <strong>Cookies</strong> en las opciones de internet de su navegador.<br />";msger+="<ul><strong>Para habilitar las Cookies en Internet Explorer:</strong><br />";msger+="<li>En el menú \"Herramientas\" haga clic en \"Opciones de Internet\".</li><li>A continuación haga clic en la ficha de \"Privacidad\". Sitúe el nivel de privacidad a \"Medio-Alto\" o inferior, con el botón regulador.</li><li>Haga clic en el botón \"Aceptar\" y actualice la página (pulse F5).</li></ul>";msger+="<ul><strong>Para habilitar las Cookies en Mozilla Firefox:</strong><br />";msger+="<li>En el menú \"Herramientas\" haga clic en \"Opciones...\".</li><li>A continuación haga clic en la ficha de \"Privacidad\". En el apartado \"Galletas\" marque la opción \"Acepta galletas de los sitios web\".</li><li>Haga clic en el botón \"Aceptar\" y actualice la página (pulse F5).</li></ul>";msger+="En caso necesario, instale una nueva versión de navegador.<br /><br />";document.getElementById("cookies_div").style.display="inline";document.getElementById("cookies_div").innerHTML=msger;document.getElementById("autologin").disabled=true;}if(!browserSupportsAjax()){var msgaj="<br /><img src=\"img/alert_p.gif\" alt=\"Alerta\" align=\"absbottom\" border=\"0\"> Esta página web requiere <strong>Ajax</strong> para funcionar adecuadamente ";msgaj+="y su navegador de internet no le da soporte. ";msgaj+="Por este motivo algunas funciones de ésta página web pueden fallar.<br /><br />";msgaj+="En caso necesario, instale una nueva versión de navegador.<br /><br />";document.getElementById("ajax_div").style.display="inline";document.getElementById("ajax_div").innerHTML=msgaj;}if(!ActiveXEnabledOrUnnecessary()){var msgax="<br /><img src=\"img/alert_p.gif\" alt=\"Alerta\" align=\"absbottom\" border=\"0\"> En las versiones de Internet Explorer anteriores a la 7.0, ";msgax+="es necesario que <strong>ActiveX</strong> esté habilitado en la configuración de seguridad de su navegador.<br /><br />";msgax+="En caso necesario, instale una nueva versión de navegador.<br /><br />";document.getElementById("activex_div").style.display="inline";document.getElementById("activex_div").innerHTML=msgax;}}var Cookie={read:function(name){var arrCookies=document.cookie.split('; ');for(var i=0;i<arrCookies.length;i++){var arrCookie=arrCookies[i].split('=');if(arrCookie[0]==name){return decodeURIComponent(arrCookie[1]);}}return false;},write:function(name,value,expires,path){if(expires){var date=new Date();date.setTime(date.getTime()+(((((expires*24)*60)*60)*1000)));expires='; expires='+date.toGMTString();}else{expires='';}if(!path){path='/';}document.cookie=name+'='+encodeURIComponent(value)+expires+'; path='+path;},remove:function(name){this.write(name,'',-1);}};var curobj;function findPos(obj){var clft=ctop=0;if(obj.offsetParent){clft=jq(obj).offset().left;ctop=jq(obj).offset().top;/*while(obj=obj.offsetParent){clft+=obj.offsetLeft;ctop+=obj.offsetTop;}*/}return[clft,ctop];}function mostrarMensaje(objeto,direccion,ifm,flotante){var entorn=(ifm==undefined?document:window.parent.document);curobj=objeto;var pos=findPos(curobj);jq("#imgoculta"+direccion,entorn).attr("src","https://static.paudedamasc.com/img/loader.gif").fadeIn(500);if(flotante==undefined){jq("#divoculto"+direccion,entorn).css("left",Math.max(pos[0]-210,0));if(direccion==1){jq("#divoculto"+direccion,entorn).css("top",pos[1]-220);}else if(direccion==2){jq("#divoculto"+direccion,entorn).css("top",pos[1]);}}else{jq("#divoculto"+direccion,entorn).addClass("flotant").css({"right":230,"bottom":10,"position":"fixed"});}jq("#divoculto"+direccion,entorn).fadeIn(500);}function esconderMensaje(direccion,ifm){var entorn=(ifm==undefined?document:window.parent.document);jq("#divoculto"+direccion,entorn).fadeOut(500,function(){jq(this).html('<div class="popup_pedido'+direccion+'" align="center"><div style="position: relative; top: 40%; left: 44%; width: 20px; height: 20px;"><img id="imgoculta'+direccion+'" src="https://static.paudedamasc.com/img/loader.gif" alt="Cargando..." style="width:20px;height:20px;display:none;" /></div></div>');});}var reserva = function(){}; function pedir(articulo,titulo,obj,cant,direccion,limitat,unitats_reservables,id_apend,ifm,accio){
	var entorn = (ifm==undefined?document:window.parent.document);
	id_apend = id_apend==undefined?"":id_apend;
	//esconderMensaje(direccion,ifm);
	if(cant*1>1){
		cantidad = cant+"";
	}else{
		if(!cant){
			cantidad="1";
		}else{
			var cnt=jq("#cantidad_serie"+id_apend,entorn);cantidad=cnt.val();
		}
	}
	pls="";ples="";pln="";
	if(cantidad>1){
		pls="s";ples="es";pln="n";
	}
	pedido="<p><strong>Si ha terminado la selección de títulos:</strong></p><ul style='padding-left:12px;'><li><a href='https://batmanapollo.ru//mi-pedido.php' title='Ir a Mi Pedido en curso'>Revise el estado de su pedido</a></li><li><a href='javascript:;' title='Registrar los datos personales' onclick='window.onbeforeunload=function(oEvent){};document.registrar_datos.submit();'>Registre directamente sus datos personales</a>.</li></ul>";
	if(articulo.length<=3){
		mensaje="Se ha"+pln+" añadido <strong>"+cantidad+"</strong> ejemplar"+ples+" de cada título de la serie <strong>"+titulo+"</strong> al pedido."+pedido;
	}else{
		mensaje="Se ha"+pln+" añadido <strong>"+cantidad+"</strong> ejemplar"+ples+" del título <strong>"+titulo+"</strong> al pedido."+pedido;
	}
	mensaje = "<form name='registrar_datos' action='https://batmanapollo.ru//mi-pedido.php' method='post' style='margin:0px;display:inline;'><input type='hidden' name='accion' value='1'><input type='hidden' name='eleccion' value='2'>"+mensaje+"</form>";
	if(cantidad*1!=cantidad||cantidad==""||(cantidad*1<=0)||cantidad.indexOf(".")!=-1){
		alert("¡Atención! Introduzca un valor numérico posible por favor.");
		if(cnt!=undefined){
			cnt.value="";cnt.focus();
		}
	}else{
		var donatiu = "";
		don = document.getElementById("donatiu"+id_apend);
		if(don!==undefined && don!==null && unitats_reservables==-2){
			if(don.value*1!=don.value||don.value==""||don.value*1<=0){
				alert("¡Atención! Introduzca un importe posible por favor.");
				don.value="";
				don.focus();
				return false;
			}else{
				donatiu = don.value;
			}
		}
		if(limitat==undefined || limitat==false){
			mostrarMensaje(obj,direccion,ifm);
			v=jq.post("https://batmanapollo.ru//peticion.php",{"articulo":articulo,"cantidad":cantidad,"donatiu":donatiu},function(datos){
				if(datos!=""){
					SetContainerHTML("scripts",datos,true,entorn);
					var r=reserva();
					if(r>0){
						mostrarPedido(mensaje,direccion,ifm);
						if(accio!=undefined){
							accio();
						}
					}else{
						jq("#divoculto"+direccion,entorn).fadeOut(500);
					}
				}else{
					mostrarPedido(mensaje,direccion,ifm);
					if(accio!=undefined){
						accio();
					}
				}
			});
		}else{
			conf("¿Tenía usted una reserva ya hecha?",'<p><strong>Unidades pedidas:</strong> <input type="text" value="'+cantidad+'" disabled style="width:50px;text-align:center;border:1px solid #666666;color:#000000;"></p><p>Para este título disponemos de un <strong>estoc limitado</strong>.</p><p>Si usted <strong>realizó con anterioridad su reserva</strong>, solamente tendrá que introducir su dirección de correo electrónico y seguir con el proceso de compra.</p>'+(unitats_reservables>0?'<p>Si ud. <strong>no ha hecho ninguna reserva</strong> ¡no se preocupe! Le garantizamos que podemos servirle las unidades que nos pida hasta un máximo de <strong>'+unitats_reservables+'</strong>.</p>':'')+'<input type="radio" name="reserva'+id_apend+'" id="reserva'+id_apend+'" onclick=\'jq("#comanda'+id_apend+'",entorn).attr("checked",false);if(!jq("#email_div'+id_apend+'",entorn).is(":visible")){jq("#email_div'+id_apend+'",entorn).fadeIn(500,function(){jq("#email'+id_apend+'",entorn).focus();});jq("#avis_reserva'+id_apend+'",entorn).fadeIn(500);}\'><label for="reserva'+id_apend+'" style="cursor:pointer;"> Ya tengo una reserva hecha</label><br><input type="radio" name="comanda'+id_apend+'" id="comanda'+id_apend+'"'+(unitats_reservables<1?' disabled':'')+' onclick=\'jq("#reserva'+id_apend+'",entorn).attr("checked",false);if(jq("#email_div'+id_apend+'",entorn).is(":visible")){jq("#email_div'+id_apend+'",entorn).fadeOut(500);jq("#avis_reserva'+id_apend+'",entorn).fadeOut(500);}\''+(unitats_reservables>0?'checked':'')+'><label for="comanda'+id_apend+'" style="cursor:pointer;"> Aún no he hecho ninguna reserva</label>'+(unitats_reservables<1?' <span class="error petit">(No disponemos de más stock)</span>':'')+'<div style="display:none; margin-top:10px;" id="email_div'+id_apend+'"><strong>Introduzca su email:</strong> <input type="text" maxlength="255" id="email'+id_apend+'" style="width:300px;"></div><p id="avis_reserva'+id_apend+'" class="peu" style="display:none;"><span class="error">Nota:</span> a partir del momento en que haga clic en <em>Añadir a mi pedido</em> le garantizamos la conservación de su reserva durante un plazo de 45 minutos. Si no tiene intención de finalizar su pedido ahora, haga clic en <em>Cancelar</em> y le seguiremos guardando su reserva.</p>',function(){
				if(!jq("#reserva"+id_apend,entorn).is(":checked")&&!jq("#comanda"+id_apend,entorn).is(":checked")){
					msg(false,"Atención","Por favor, seleccione una de las dos opciones. Gracias.");
				}else{
					if(jq("#reserva"+id_apend,entorn).is(":checked")){
						if(jq("#email"+id_apend,entorn).val()==""){
							msg(false,"Atención","Introduzca una dirección de correo electrónico. Gracias.");
						}else{
							jq.post("https://batmanapollo.ru//funciones-ajax.php",{"email_reserva":jq("#email"+id_apend,entorn).val(),"codi":articulo,"quantitat":cantidad,"titol":escape(titulo)},function(datos){
								var sp=datos.split("%_%");
								if(sp[0]!="1"){
									msg(false,sp[1],sp[2]);
								}else{
									var email_t = jq("#email"+id_apend,entorn).val();
									jq("#widget-avis",entorn).dialog("close");
									mostrarMensaje(obj,direccion,ifm);
									v=jq.post("https://batmanapollo.ru//peticion.php",{"articulo":articulo,"cantidad":cantidad},function(datos){
										if(datos!=""){
											SetContainerHTML("scripts",datos,true,entorn);
											var r=reserva(email_t);
											if(r>0){
												mostrarPedido(mensaje,direccion,ifm);
												if(accio!=undefined){
													accio();
												}
											}else{
												jq("#divoculto"+direccion,entorn).fadeOut(500);
											}
										}else{
											mostrarPedido(mensaje,direccion,ifm);
											if(accio!=undefined){
												accio();
											}
										}
									});
								}
							});
						}
					}else if(jq("#comanda"+id_apend,entorn).is(":checked")){
						jq("#widget-avis",entorn).dialog("close");
						mostrarMensaje(obj,direccion,ifm);
						v=jq.post("https://batmanapollo.ru//peticion.php",{"articulo":articulo,"cantidad":cantidad},function(datos){
							if(datos!=""){
								SetContainerHTML("scripts",datos,true,entorn);
								var r=reserva();
								if(r>0){
									mostrarPedido(mensaje,direccion,ifm);
									if(accio!=undefined){
										accio();
									}
								}else{
									jq("#divoculto"+direccion,entorn).fadeOut(500);
								}
							}else{
								mostrarPedido(mensaje,direccion,ifm);
								if(accio!=undefined){
									accio();
								}
							}
						});
					}
				}
			},function(){},true,"Añadir a mi pedido");
		}
	}
}
jq( window ).resize(function(){
	stickProduct('.miniatura .lateral', '.text_lateral', 50, 15, jq('.miniatura .lateral').data('width'));
});
jq( window ).scroll(function(){
	stickProduct('.miniatura .lateral', '.text_lateral', 50, 15, jq('.miniatura .lateral').data('width'));
});
function stickProduct(fixedSelector,sideSelector,headerHeight,marginTop,absWidth,rightPositioned){if(jq(fixedSelector).length && jq(sideSelector).length){jq(fixedSelector).each(function(){if(jq(this).is(':visible')){$fixedSelector=jq(this);return false;}});jq(sideSelector).each(function(){if(jq(this).is(':visible')){$sideSelector=jq(this);return false;}});var sideBottom=$sideSelector.offset().top+$sideSelector.height();var scrollY=jq(window).scrollTop()+headerHeight+$fixedSelector.height()+marginTop;if(scrollY>=sideBottom){$fixedSelector.removeClass('product-sticky').addClass('product-sticky-end').css({'top':Math.max($sideSelector.outerHeight()-$fixedSelector.outerHeight()-15,0),'width':absWidth+'px'});if(rightPositioned){$fixedSelector.css('transform', 'none');}}else{$fixedSelector.removeClass('product-sticky-end');if(jq(window).scrollTop()+headerHeight+marginTop>$sideSelector.offset().top){$fixedSelector.addClass('product-sticky').css({'top':Math.max(headerHeight+marginTop,0),'width':absWidth+'px'});if(rightPositioned){$fixedSelector.css('transform', 'translateX('+$sideSelector.outerWidth(true)+'px)');}}else{$fixedSelector.removeClass('product-sticky').css({'top':0,'width':absWidth+'px'});if(rightPositioned){$fixedSelector.css('transform','none');}}}}else{jq(fixedSelector).removeClass('product-sticky product-sticky-end').css('transform','none');}}function prevPedido(direccion,ifm,ver){var entorn=(ifm==undefined?window:window.parent);jq.post("https://batmanapollo.ru//funciones-ajax.php",{"mostrar_comanda":1,"ver":(ver!==undefined?1:0)},function(dades){if(jq("#dialog-avis-promo").hasClass("ui-dialog-content") && jq("#dialog-avis-promo").dialog("isOpen")){jq("#dialog-avis-promo").dialog("close");}entorn.msg(true,"Mi pedido en curso",dades,undefined,undefined,"Cerrar","",undefined,800);jq(".ui-dialog-buttonpane.ui-widget-content, .ui-dialog-titlebar-close").hide();jq(document).find(":button:not(.btn_blanc_cp)").button();jq("#divoculto"+direccion,ifm).fadeOut(500);});}function mostrarPedido(mensaje,direccion,ifm){var entorn=(ifm==undefined?document:window.parent.document);jq("#imgoculta"+direccion,entorn).fadeOut(500);jq("#divoculto"+direccion,entorn).html('<div class="popup_pedido'+direccion+'" align="center"><img id="imgoculta'+direccion+'" src="https://static.paudedamasc.com/img/loader.gif" alt="Cargando..." style="width:20px;height:20px;display:none;" /><img src="https://static.paudedamasc.com/img/tick_p.gif" alt="Correcto" class="esq"> '+mensaje+"</div>");prevPedido(direccion,ifm);jq.post("https://batmanapollo.ru//funciones-ajax.php",{"llibres":1},function(datos){if(datos!=""){jq("#llibres",entorn).html(datos);}});}function refrescarChat(){var browser="";if(jq.browser.safari){browser="safari";}else if(jq.browser.opera){browser="opera";}else if(jq.browser.msie){browser="msie";}else if(jq.browser.mozilla){browser="mozilla";}v=jq.post("https://batmanapollo.ru//funciones-ajax.php",{"chat":1,"IP":"18.97.14.83","browser":browser},function(datos){if(datos!=""){SetContainerHTML("chat_div",datos,true);cID=window.setTimeout("refrescarChat()",1000*45);}else{cID=window.setTimeout("refrescarChat()",1000*200);}});}function popUp(URL,w,h){pday=new Date();id=pday.getTime();eval("page"+id+"=window.open(URL,'"+id+"','toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=0,width="+w+",height="+h+",left=120,top=50');");}function cambiarVista(mod){jq.post("https://batmanapollo.ru//funciones-ajax.php",{"carregar_mode":mod},function(datos){var s=window.location+"";if(datos=="1"){var loc=s.replace(/(\/\?|&)m=[0-1]/g,"");if(window.location!=loc){window.location=loc;}else{location.reload(true);}}else{alert("No se ha podido cambiar de vista. Vuelva a intentarlo en unos minutos.");}});}function mostrarText(codiText,vars,id,titol){msg(true,titol==undefined?"Información":titol,"<div id='mCont_txt' style='text-align:center;'  align='center'><img id='mLoader_txt' src='https://static.paudedamasc.com/img/loader.gif' alt='Cargando...' style='width:20px;height:20px;'><div id='mText_txt' style='display:none;text-align:justify;'></div></div>",id);var params={"codiText":codiText};if(vars!=undefined){params["vars"]={};for(var i in vars){params["vars"][i]=escape(vars[i]);}}jq.post("https://batmanapollo.ru//funciones-ajax.php",params,function(datos){jq("#mLoader_txt").hide(500,function(){jq("#mText_txt").html(datos!=""?datos:"No se ha podido cargar el mensaje.").show(500);});});}
function liveMediaButtons(id){twttr.widgets.load();gapi.plusone.go();addthis.init();FB.XFBML.parse(document.getElementById(id));jq("#"+id).ready(function(){jq(".reflect").reflect();jq("#content_"+id+" :button").button();var add_scr="http://s7.addthis.com/js/250/addthis_widget.js#domready=1";if(window.addthis){window.addthis=null;window._adr=null;window._atc=null;window._atd=null;window._ate=null;window._atr=null;window._atw=null;}jq.getScript(add_scr);});}
if(jq!=undefined){jq(document).ready(function(){jq('#top-menu,.boto-dreta').click(function(){jq('#menu-fons').fadeToggle(400);jq('#top-menu').toggleClass('obert');});
if("".indexOf("/cpanel/")==-1&&""!="/cpanel/"){var st_cf=window.setTimeout(rellotge,60*1000);}jq(".fletxa:not(.cell_gris)").mouseenter(function(){jq(this).removeClass("cell_correcte").addClass("cell_verds");}).mouseleave(function(){jq(this).removeClass("cell_verds").addClass("cell_correcte");});jq(".fletxa:not(.cell_gris)").parent().mouseenter(function(){jq(".fletxa").removeClass("translucid");}).mouseleave(function(){jq(".fletxa:not(.cell_gris)").addClass("translucid");});});}
function createStyleSheet(href,doc){if(typeof doc==='undefined'){doc=document;}if(typeof href!=='undefined'){var element=doc.createElement('link');element.type='text/css';element.rel='stylesheet';element.href=href;}else{var element=doc.createElement('style');element.type='text/css';}doc.getElementsByTagName('head')[0].appendChild(element);if(doc.styleSheets.length>0){var sheet=doc.styleSheets[doc.styleSheets.length - 1];if(typeof sheet.addRule==='undefined'){sheet.addRule=addRule;}if(typeof sheet.removeRule==='undefined'){sheet.removeRule=sheet.deleteRule;}return sheet;}else{return false;}}function addRule(selectorText,cssText,index){if(typeof index==='undefined'){index=this.cssRules.length;}this.insertRule(selectorText+' {'+cssText+'}',index);}
function encode(html){return encodeURIComponent(html).replace(/'/g,"%27").replace(/"/g,"%22");}function decode(html){return decodeURIComponent(html.replace(/\+/g," "));}
function getCheckedValue(form_name,field_name){var f=eval("document."+form_name+"."+field_name);for(j=0;j<f.length;j++){if(f[j].checked) return f[j].value;}return "";}
function setCheckedValue(radioObj,newValue){if(!radioObj){return;}var radioLength=radioObj.length;if(radioLength==undefined){radioObj.checked=(radioObj.value==newValue.toString());return;}for(var i=0;i<radioLength;i++){radioObj[i].checked=false;if(radioObj[i].value==newValue.toString()){radioObj[i].checked=true;}}}
var openSelect=function(selector){var element=jq(selector)[0];if(element!=undefined){var worked=false;if(document.createEvent){var e=document.createEvent("MouseEvents");e.initMouseEvent("mousedown",true,true,window,0,0,0,0,0,false,false,false,false,0,null);worked=element.dispatchEvent(e);}else if(element.fireEvent){worked=element.fireEvent("onmousedown");}}};
var sc_project=4022525; 
var sc_invisible=1; 
var sc_security="e034f8fc"; 
var scJsHost = (("https:" == document.location.protocol) ?
"https://secure." : "http://www."); var sc_width=screen.width;var sc_height=screen.height;var sc_referer=""+document.referrer;try{sc_referer=""+parent.document.referrer}catch(ex){sc_referer=""+document.referrer}var sc_unique=0;var sc_returning=0;var sc_returns=0;var sc_error=0;var sc_remove=0;var sc_cls=-1;var sc_inv=0;var sc_os="";var sc_title="";var sc_url="";var sc_base_dir="";var sc_click_dir="";var sc_link_back_start="";var sc_link_back_end="";var sc_security_code="";var sc_http_url="http";var sc_host="statcounter.com";var sc_dc="c";var sc_alt_text="StatCounter - Free Web Tracker and Counter";var sc_counter_size="";var sc_prerendering=0;var sc_uuid="";var sc_uuid_q="&u1=za";var sc_unique_returning="";var sc_sp="cookie";if(window.sc_client_storage){sc_sp=window.sc_client_storage}if(typeof window.sc_first_party_cookie!="undefined"&&sc_first_party_cookie=="0"){sc_sp="disabled"}var _statcounter_pending=_statcounter;var _statcounter={push:function(_1){}};if(window.sc_invisible){if(window.sc_invisible==1){sc_inv=1}}if(window.sc_click_stat){sc_cls=window.sc_click_stat}sc_doc_loc=""+document.location;myRE=new RegExp("^https","i");if(sc_doc_loc.match(myRE)){sc_http_url="https"}if(window.sc_local){sc_base_dir=sc_local}else{if(sc_cls==-1){sc_cls=1}sc_base_dir=sc_http_url+"://"+sc_dc+"."+sc_host+"/"}sc_click_dir=sc_base_dir;if(window.sc_counter_target){sc_base_dir+=window.sc_counter_target+"?"}else{if(window.sc_text){sc_base_dir+="text.php?"}else{sc_base_dir+="t.php?"}}if(window.sc_project){if(sc_project=="4135125"||sc_project=="6169619"||sc_project=="6222332"||sc_project=="5106510"||sc_project=="6311399"||sc_project=="6320092"||sc_project=="5291656"||sc_project=="7324465"||sc_project=="6640020"||sc_project=="4629288"||sc_project=="1480088"||sc_project=="2447031"){if(Math.floor(Math.random()*6)!=1){sc_remove=1}}sc_base_dir+="sc_project="+sc_project}else{if(window.usr){sc_base_dir+="usr="+usr}else{sc_error=1}}if(window.sc_remove_link){sc_link_back_start="";sc_link_back_end=""}else{sc_link_back_start="<a class=\"statcounter\" href=\"http://www."+sc_host+"\" target=\"_blank\">";sc_link_back_end="</a>"}sc_date=new Date();sc_time=sc_date.getTime();sc_time_difference=3600000;sc_title=""+document.title;sc_url=""+document.location;sc_title=sc_title.substring(0,300);sc_url=sc_url.substring(0,300);if(encodeURIComponent){sc_title=encodeURIComponent(sc_title)}else{sc_title=escape(sc_title)}sc_url=escape(sc_url);if(window.sc_security){sc_security_code=sc_security}if(sc_script_num){sc_script_num++}else{var sc_script_num=1}if(typeof _sc_imgs=="undefined"){var _sc_imgs={}}var sc_pageview_tag_string="";(function(_2,_3,_4,_5){var _6="";var _7={"google":null,"bing":["q"],"search.yahoo":null,"m.yahoo":null,"m2.yahoo":null,"baidu":["wd","word"],"yandex":["text"],"ya.ru":["text"],"haosou":["q"],"so.com":["q"],"360.cn":["q"],"360sou":["q"],"aol":["query","q"],"duckduckgo":null,"ask.com":["q","QUERYT"],"mail.ru":["words"],"sogou":["q","query"]};var _8={"fb":["facebook.com","fb.me"],"pi":["pinterest.com"],"tw":["twitter.com","t.co"],"ln":["linkedin.com"],"gp":["plus.google.com","plus.url.google.com"]};function classify_referrer(r){if(r==""){return "d"}if(r.search(/\bgoogle\..*\?.*adurl=http/)!==-1){return "p"}var _a=["utm_source=bing","gclid=","utm_medium=cpc","utm_medium=paid-media","utm_medium=ppc","aclk?","cid="];for(var i=0;i<_a.length;i++){if(document.location.search.indexOf(_a[i])!==-1){return "p"}}var _c=["utm_medium=email"];for(var i=0;i<_c.length;i++){if(document.location.search.indexOf(_c[i])!==-1){return "e"}}var _d=r.split("/")[2].replace(/^www\./,"");if(document.location.host.replace(/^www\./,"")==_d){return "internal"}for(var _e in _7){if(_d.replace(_e,"#").split(".").indexOf("#")!==-1){if(_7[_e]===null){return _e}for(var i=0;i<_7[_e].length;i++){var _f=_7[_e][i];if(r.indexOf("?"+_f+"=")!==-1||r.indexOf("&"+_f+"=")!==-1){return _e}}}}for(var _10 in _8){for(var i=0;i<_8[_10].length;i++){var _e=_8[_10][i];if(_d.replace(_e,"#").split(".").indexOf("#")!==-1){return _10}}}return _d}function categorize_class(cls){if(cls=="d"||cls=="p"||cls=="e"||cls=="internal"){return cls}if(cls in _7){return "o"}if(cls in _8){return "s"}return "r"}if(sc_remove!=1){if(document.webkitVisibilityState!="prerender"){sc_prerendering=0}else{sc_prerendering=1;document.addEventListener("webkitvisibilitychange",function(evt){if(sc_prerendering==1){sc_prerendering=2;sc_send_data()}else{return}},false)}}var _13=parseInt(sc_project,10);var _14=_13==9560334||_13==6709687||_13==9879613||_13==4124138||_13==204609||_13==10776808;try{var _15=Math.pow(_3,_4),_16=Math.pow(2,_5),_17=_16*2,_18=_3-1;var _19;var _1a=function(_1b,_1c){var key=[];var _1e=mixkey(flatten(_1c?[_1b,tostring(_2)]:0 in arguments?_1b:autoseed(),3),key);var _1f=new ARC4(key);mixkey(tostring(_1f.S),_2);_19=function(){var n=_1f.g(_4),d=_15,x=0;while(n<_16){n=(n+x)*_3;d*=_3;x=_1f.g(1)}while(n>=_17){n/=2;d/=2;x>>>=1}return (n+x)/d};return _1e};function ARC4(key){var t,_25=key.length,me=this,i=0,j=me.i=me.j=0,s=me.S=[];if(!_25){key=[_25++]}while(i<_3){s[i]=i++}for(i=0;i<_3;i++){s[i]=s[j=_18&(j+key[i%_25]+(t=s[i]))];s[j]=t}(me.g=function(_2a){var t,r=0,i=me.i,j=me.j,s=me.S;while(_2a--){t=s[i=_18&(i+1)];r=r*_3+s[_18&((s[i]=s[j=_18&(j+t)])+(s[j]=t))]}me.i=i;me.j=j;return r})(_3)}function flatten(obj,_2e){var _2f=[],typ=(typeof obj)[0],_31;if(_2e&&typ=="o"){for(_31 in obj){try{_2f.push(flatten(obj[_31],_2e-1))}catch(e){}}}return (_2f.length?_2f:typ=="s"?obj:obj+"\x00")}function mixkey(_32,key){var _34=_32+"",_35,j=0;while(j<_34.length){key[_18&j]=_18&((_35^=key[_18&j]*19)+_34.charCodeAt(j++))}return tostring(key)}function autoseed(_37){try{window.crypto.getRandomValues(_37=new Uint8Array(_3));return tostring(_37)}catch(e){return [+new Date,window,window.navigator.plugins,window.screen,tostring(_2)]}}function tostring(a){return String.fromCharCode.apply(0,a)}mixkey(Math.random(),_2);function _localStorageAvailable(){var _39=false;if("localStorage" in window){try{_39=window["localStorage"]!==null}catch(e){if(!e.name||e.name.toLowerCase().replace(/_/g,"").substring(0,16)!=="quotaexceedederr"){if(!e.number||parseInt(e.number,10)!==-2147024891){throw e}}}}return _39}function _setLocalStorage(_3a,_3b,_3c){if(_localStorageAvailable()){try{if(_3a==="is_visitor_unique"){localStorage.setItem("statcounter.com/localstorage/",_3b)}else{localStorage.setItem("statcounter_"+_3a,_3b)}}catch(e){if(!e.name||e.name.toLowerCase().replace(/_/g,"").substring(0,16)!=="quotaexceedederr"){if(!e.number||parseInt(e.number,10)!==-2147024891){throw e}}return false}return true}return false}function setLocal(_3d,_3e,_3f,_40,_41){if(typeof _3e==="string"){_3e=[_3e]}if(_40===undefined){_40=""}if(_41===undefined){_41=30}var _42=false;if(sc_sp=="localStorage"){_42=_setLocalStorage(_3d,_40+_3e.join("-"),_3f);if(!_42){_42=_writeCookie(_3d,_40+_3e.join("-"),_3f)}else{if(_readCookie(_3d)!==null){_removeCookie(_3d,_3f)}}}else{cookie_value=_3e.slice(0,_41).join("-");_42=_writeCookie(_3d,_40+cookie_value,_3f);if(!_42){_42=_setLocalStorage(_3d,_40+_3e.join("-"),_3f)}else{if(_3e.length>_41){_setLocalStorage(_3d,"mx"+_3e.slice(_41).join("-"),_3f)}else{_removeLocalStorage(_3d)}}}return _42}function getLocal(_43){var val=null;if(_localStorageAvailable()){if(_43==="is_visitor_unique"){val=localStorage.getItem("statcounter.com/localstorage/")}else{val=localStorage.getItem("statcounter_"+_43)}}if(sc_sp=="localStorage"&&val!==null&&val.substring(0,2)=="rx"){return val}var _45=_readCookie(_43);if(val!==null){if(_45===null&&val.substring(0,2)=="rx"){return val}else{if(_45!==null&&val.substring(0,2)=="mx"){_45+="-"+val.substring(2)}}}return _45}function _removeLocalStorage(_46){if(_localStorageAvailable()){if(_46==="is_visitor_unique"){localStorage.removeItem("statcounter.com/localstorage/")}localStorage.removeItem("statcounter_"+_46)}}function removeLocal(_47,_48){_removeLocalStorage(_47);if(_readCookie(_47)){_removeCookie(_47,_48)}}function _readCookie(_49){var _4a="sc_"+_49+"=";if(document.cookie){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(_4a)==0){return c.substring(_4a.length,c.length)}}}return null}function _writeCookie(_4e,_4f,_50,_51){if(_51===undefined){var _52=1000*60*60*24*365*2}else{var _52=1000*_51}expiration=new Date();expiration.setTime(expiration.getTime()+_52);var _53=3050;if(_4f.length>_53-50&&_4f.substring(0,_53).indexOf("-")!==-1){_4f=_4f.substring(0,_4f.substring(0,_53).lastIndexOf("-"))}document.cookie="sc_"+_4e+"="+_4f+"; expires="+expiration.toGMTString()+"; domain="+_50+"; path=/";if(_readCookie(_4e)!==null){return true}else{return false}}function _removeCookie(_54,_55){document.cookie="sc_"+_54+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; domain="+_55+"; path=/"}function detectBrowserFeatures(){var _56=[];var i;var _58;var _59={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"};var _5a=(new RegExp("Mac OS X.*Safari/")).test(navigator.userAgent)?window.devicePixelRatio||1:1;if(!((new RegExp("MSIE")).test(navigator.userAgent))){if(navigator.mimeTypes&&navigator.mimeTypes.length){for(i in _59){if(Object.prototype.hasOwnProperty.call(_59,i)){_58=navigator.mimeTypes[_59[i]];_56.push((_58&&_58.enabledPlugin)?"1":"0")}}}if(typeof navigator.javaEnabled!=="unknown"&&typeof navigator.javaEnabled!=="undefined"&&navigator.javaEnabled()){_56.push("java")}if(typeof window.GearsFactory==="function"){_56.push("gears")}}_56.push(screen.width*_5a+"x"+screen.height*_5a);return _56.join("")}function generate_uuid(){var now=new Date();var _5c=false;var _5d=32;if(_5c){_5d=36}var _5e=Math.round(now.getTime()/1000)+now.getMilliseconds();var _5f=(navigator.userAgent||"")+(navigator.platform||"")+detectBrowserFeatures()+now.getTimezoneOffset()+window.innerWidth+window.innerHeight+window.screen.colorDepth+document.URL+_5e;_1a(_5f);var _60="0123456789ABCDEF".split(""),_61=new Array(_5d),rnd=0,r;for(var i=0;i<_5d;i++){if(_5c&&(i==8||i==13||i==18||i==23)){_61[i]="-"}else{if((i==12&&!_5c)||(i==14&&_5c)){_61[i]="4"}else{if((i==13&&!_5c)||(i==15&&_5c)){_61[i]="F"}else{if(rnd<=2){rnd=33554432+(_19()*16777216)|0}r=rnd&15;rnd=rnd>>4;_61[i]=_60[(i==19)?(r&3)|8:r]}}}}return _61.join("")}var _65=classify_referrer(sc_referer);var _66=categorize_class(_65);if(_65!="internal"){_6="&rcat="+_66+"&rdom="+_65}try{localStorage.removeItem("statcounter_medium_source")}catch(ignore){}var _67=Math.round((new Date()).getTime()/1000);if(sc_sp!="disabled"){try{var _68=JSON.parse(localStorage.getItem("sc_medium_source"));if(_68==null){_68={}}else{if("internal" in _68){delete _68["internal"]}}var _69=null;var _6a=null;var _6b=null;var msl=0;for(var k in _68){if(_69===null||_68[k]>_68[_69]){_69=k}var _6e=categorize_class(k);if(_66==_6e&&(_6a===null||_68[k]>_68[_6a])){_6a=k}if(_6e=="r"&&(_6b===null||_68[k]<_68[_6b])){_6b=k}msl+=1}if(msl>30&&_6b!==null){delete _68[_6b]}var _6f="";if(sessionStorage.getItem("statcounter_bounce")){sessionStorage.removeItem("statcounter_bounce");_6f="&bb=0"}if(_65=="d"&&_69!==null&&_69!="d"&&(_67-_68[_69])<60*15){_65="internal"}if(_66=="r"&&sessionStorage.getItem("statcounter_exit_domain")==_65){_65="internal"}if(_65=="internal"){if(_69!==null){_6="&rcat="+categorize_class(_69)+"&rdomo="+_69;_6+="&rdomg="+(_67-_68[_69]);_68[_69]=_67}}else{var _70=false;if(_65 in _68){if(_65==_69){_6=_6.replace("rdom=","rdomo=")}_6+="&rdomg="+(_67-_68[_65]);if(_67-_68[_65]<60*30){_70=true}}else{_6+="&rdomg=new"}if(_6f==""&&!_70){sessionStorage.setItem("statcounter_bounce","1");_6f="&bb=1"}if(_6a!==null&&(!(_65 in _68)||_65!=_6a)){_6+="&rcatg="+(_67-_68[_6a])}_68[_65]=_67}_6+=_6f;try{localStorage.setItem("sc_medium_source",JSON.stringify(_68))}catch(maybe_not_enough_space){}}catch(ignore){}if(_13==10227105){try{var _71=new Image();_71.src="http://statcounter.com/feedback/?email=javascript@statcounter.com&page_url="+encodeURIComponent(document.location.protocol+"//"+document.location.host+document.location.pathname+document.location.search+document.location.hash)+"&name=Auto%20JS&feedback_username=statcounter&pid="+sc_project+"&fake_post&user_company&feedback=consistent%20uniques%20js%20exception:%20"+encodeURIComponent(localStorage.getItem("statcounter.com/localstorage/")+":::"+_readCookie("is_visitor_unique"))}catch(ignore){}}var _72="1.1.1.1.1.1.1.1.1";if(typeof window.sc_cookie_domain=="undefined"){var _73=window.location.host}if(_73.substring(0,1)!="."){_73="."+_73}var _74="is_visitor_unique";try{var _75=getLocal(_74)}catch(e){var _75=false;sc_uuid=".ex"}var _76=[];var _77=[];if(_75&&_75.substring(0,2)=="rx"){removeLocal(_74,_73);var _78=_75.substring(2);_76=_78.split("-");var _79=false;var _7a=false;for(var i=0;i<_76.length;i++){var _7c=_76[i].split(".");if(_7c[0]==sc_project){_79=true;var _7d=parseInt(_7c[1],10);var _7e=[30,60,120,180,360,720,1440,2880,10080];var _7f=[];var _80=2;if(_7c[2].length==32){sc_uuid="."+_7c[2];_80=3}else{sc_uuid=_7a}for(var ir=0;ir<_7e.length;ir++){var _82=parseInt(_7c[ir+_80],10);if(isNaN(_82)){_82=1}_7f.push(_82)}sc_unique_returning+="&jg="+(_67-_7d);for(var ir=0;ir<_7e.length;ir++){if(_6.indexOf("rdom=")!==-1){_7f[ir]++}else{if(_67>(_7d+60*_7e[ir])){_7f[ir]++}}}sc_unique_returning+="&rr="+_7f.join(".");_77.push(sc_project+"."+_67+sc_uuid+"."+_7f.join("."))}else{_77.push(_76[i]);if(i==0&&_7c[2].length==32&&sc_uuid==""){sc_uuid="."+_7c[2]}}if(i==0){_7a=sc_uuid}}if(!_79){if(_77.length==0&&sc_uuid==""){sc_uuid="."+generate_uuid()}_77.push(sc_project+"."+_67+sc_uuid+"."+_72);sc_unique_returning+="&jg=new&rr="+_72}_77.sort(function(a,b){return parseInt(b.split(".")[1],10)-parseInt(a.split(".")[1],10)});for(var iv=1;iv<_77.length;iv++){_77[iv]=_77[iv].replace("."+_77[0].split(".")[2]+".",".")}setLocal(_74,_77,_73,"rx",3)}else{if(sc_uuid!=".ex"){sc_uuid="."+generate_uuid();_77=[sc_project+"."+_67+sc_uuid+"."+_72];var _86=setLocal(_74,_77,_73,"rx",3);if(_86){sc_unique_returning+="&jg=new&rr="+_72}else{sc_uuid=".na"}}}if(sc_uuid!=""){sc_uuid_q="&u1="+sc_uuid.substring(1)}}}catch(e){if(_14){if(typeof encodeURIComponent!="function"){encodeURIComponent=function(s){return escape(s)}}var _88="";_88+="unique_returning: "+sc_unique_returning+"\n";_88+="uuid: "+sc_uuid+"\n";_88+="cookie_projects_in: rx"+_76.join("-")+"\n";_88+="cookie_projects_out: rx"+_77.join("-")+"\n";for(var _89 in e){_88+="property: "+_89+" value: ["+e[_89]+"]\n"}_88+="toString(): "+" value: ["+e.toString()+"]\n";var _71=new Image();_71.src="http://statcounter.com/feedback/?email=javascript@statcounter.com&page_url="+encodeURIComponent(document.location.protocol+"//"+document.location.host+document.location.pathname+document.location.search+document.location.hash)+"&name=Auto%20JS&feedback_username=statcounter&pid="+sc_project+"&fake_post&user_company&feedback=consistent%20uniques%20js%20exception:%20"+encodeURIComponent(_88)}sc_unique_returning="";sc_uuid_q="&u1=f2"}function _8a(obj,_8c){var _8d=obj.__proto__||obj.constructor.prototype;return (_8c in obj)&&(!(_8c in _8d)||_8d[_8c]!==obj[_8c])}if(Object.prototype.hasOwnProperty){var _8a=function(obj,_8f){return obj.hasOwnProperty(_8f)}}function _sc_strip_tags(_90,_91){_91=(((_91||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var _92=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,_93=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return _90.replace(_93,"").replace(_92,function($0,$1){return _91.indexOf("<"+$1.toLowerCase()+">")>-1?$0:""})}function _sc_validateTags(_96){var _97=5;var _98=1;var _99=300;var _9a=[];if(!(_96.length%2==0)){_9a.push("Every tag must have a name and value.")}else{if(_96.length/2>_97){_9a.push("No more than "+_97+" tags can be passed - "+_96.length/2+" passed.")}for(i=0;i<_96.length;i++){var _9b=(""+_96[i]).length;if(_9b<_98||_9b>_99){_9a.push("Tag names and values must be between "+_98+" and "+_99+" characters in length ('"+_96[i]+"' is "+_96[i].length+" characters long).")}}for(i=0;i<_96.length;i++){if(_sc_strip_tags(""+_96[i])!=""+_96[i]){_9a.push("Tag names and values may not contain HTML tags.")}}}if(_9a.length!=0){for(i=0;i<_9a.length;i++){}return false}return true}function _sc_sanitiseTags(_9c){for(i=0;i<_9c.length;i++){_9c[i]=(""+_9c[i]).trim()}return _9c}if(Object.prototype.toString.call(_statcounter_pending)==="[object Array]"){var _9d=_statcounter_pending.length;if(_9d>=1){if(_8a(_statcounter_pending[0],"tags")){var _9e=[];for(var tag in _statcounter_pending[0]["tags"]){_9e[_9e.length]=tag;_9e[_9e.length]=_statcounter_pending[0]["tags"][tag]}if(_sc_validateTags(_9e)){_9e=_sc_sanitiseTags(_9e);for(i=0;i<_9e.length;i=i+2){sc_pageview_tag_string+="&sc_ev_"+encodeURIComponent(_9e[i])+"="+encodeURIComponent(_9e[i+1])}}}}}sc_base_dir+="&java=1&security="+sc_security_code+sc_uuid_q;var _a0=sc_unique_returning+"&resolution="+sc_width+"&h="+sc_height+"&camefrom="+escape(sc_referer.substring(0,600))+"&u="+sc_url+"&t="+sc_title+_6+"&sc_snum="+sc_script_num+sc_pageview_tag_string+"&sess=a181b5";if(window.sc_counter_width&&window.sc_counter_height){sc_counter_size=" width=\""+sc_counter_width+"\" height=\""+sc_counter_height+"\""}if(window.sc_remove_alt){sc_alt_text=""}if(sc_error==1){document.writeln("Code corrupted. Insert fresh copy.")}else{if(sc_remove==1){}else{sc_send_data()}}function sc_send_data(){if(sc_inv==1||sc_prerendering==2){_a0+="&p="+sc_prerendering+"&invisible=1";if(window.sc_call){sc_call++}else{sc_call=1}var _a1=false;if(sc_uuid!=""&&typeof JSON=="object"&&JSON&&typeof JSON.stringify=="function"&&"sessionStorage" in window){_a1=true}var _a2=false;if(_a1){try{var _a3=sessionStorage.getItem("statcounter_pending");if(!_a3){var _a4={}}else{try{var _a4=JSON.parse(_a3)}catch(ignore){var _a4={}}}if(_a4[sc_project]===undefined){_a4[sc_project]={}}var now=new Date().getTime();_a4[sc_project][now]=_a0;while(true){_a3=JSON.stringify(_a4);if(_a3=="{}"){sessionStorage.removeItem("statcounter_pending");break}var _a6=_a3.split(/:.{20}/).length-1;if(_a6<20){var _a7=true;try{sessionStorage.setItem("statcounter_pending",_a3)}catch(e){if(!e.name||e.name.toLowerCase().replace(/_/g,"").substring(0,16)!=="quotaexceedederr"){throw e}_a7=false}if(_a7){break}}var _a8=false;var _a9=false;var _aa=false;for(var _ab in _a4){for(var _ac in _a4[_ab]){var _ad=/jg=(\d+)/.exec(_a4[_ab][_ac]);if(_ad!==null){var _ae=parseInt(_ad[1])}else{var _ae=false}if(_a8===false||(_ae!==false&&_ae<_a8)){if(_ae!==false){_a8=_ae}_a9=_ab;_aa=_ac}}}if(_aa===false){break}delete _a4[_a9][_aa];if(JSON.stringify(_a4[_a9])=="{}"){delete _a4[_a9]}}for(var ts in _a4[sc_project]){(function(_b0,_b1){var _b2=_a4[_b1][_b0];_sc_imgs[sc_call+"."+_b0]=new Image();_sc_imgs[sc_call+"."+_b0].onload=function(){var _b3=JSON.parse(sessionStorage.getItem("statcounter_pending"));delete _b3[_b1][_b0];if(JSON.stringify(_b3[_b1])=="{}"){delete _b3[_b1]}var _b4=JSON.stringify(_b3);if(_b4=="{}"){sessionStorage.removeItem("statcounter_pending")}else{sessionStorage.setItem("statcounter_pending",_b4)}};if(_b0!=now){_b2+="&pg="+Math.round((now-_b0)/1000)}else{_a2=true}_sc_imgs[sc_call+"."+_b0].src=sc_base_dir+"&sc_random="+Math.random()+_b2})(parseInt(ts,10),sc_project)}}catch(e){if(_14){if(typeof encodeURIComponent!="function"){encodeURIComponent=function(s){return escape(s)}}var _b6="";for(var _b7 in e){_b6+="e["+_b7+"]: "+e[_b7]+"\n"}_b6+="unique_returning: "+sc_unique_returning+"\n";_b6+="uuid: "+sc_uuid+"\n";_b6+="toString(): "+" value: ["+e.toString()+"]\n";var _b8=new Image();_b8.src="http://statcounter.com/feedback/?email=javascript@statcounter.com&page_url="+encodeURIComponent(document.location.protocol+"//"+document.location.host+document.location.pathname+document.location.search+document.location.hash)+"&name=Auto%20JS&feedback_username=statcounter&pid="+sc_project+"&fake_post&user_company&feedback=pending%20exception:%20"+encodeURIComponent(_b6)}}}if(!_a1||!_a2){_sc_imgs[sc_call]=new Image();_sc_imgs[sc_call].src=sc_base_dir+"&sc_random="+Math.random()+_a0}}else{var _b9=sc_base_dir+"&sc_random="+Math.random()+_a0+"&p="+sc_prerendering;_b9=_b9.replace(/&/g,"&amp;");if(window.sc_text){document.writeln("<scr"+"ipt"+" src="+_b9+"&amp;text="+sc_text+"></scr"+"ipt>")}else{document.writeln("<span class=\"statcounter\">"+sc_link_back_start+"<img src=\""+_b9+"\" alt=\""+sc_alt_text+"\" border=\"0\""+sc_counter_size+">"+sc_link_back_end+"</span>")}}}})([],256,6,52);if(sc_cls>0){if(clickstat_done!=1){var clickstat_done=1;var clickstat_project=window.sc_project;var clickstat_security=window.sc_security_code;var dlext="7z|aac|avi|csv|doc|docx|exe|flv|gif|gz|jpe?g|js|mp(3|4|e?g)|mov|pdf|phps|png|ppt|rar|sit|tar|torrent|txt|wma|wmv|xls|xlsx|xml|zip";if(typeof (window.sc_download_type)=="string"){dlext=window.sc_download_type}var ltype="https?|ftp|telnet|ssh|ssl|mailto|spotify|tel";var second="ac|co|gov|ltd|me|mod|net|nic|nhs|org|plc|police|sch|com";var dl=new RegExp("\\.("+dlext+")$","i");var lnk=new RegExp("^("+ltype+"):","i");var domsec=new RegExp("^("+second+")$","i");var host_name=location.host.replace(/^www\./i,"");var host_splitted=host_name.split(".");var domain=host_splitted.pop();var host_split=host_splitted.pop();if(domsec.test(host_split)){domain=host_split+"."+domain;host_split=host_splitted.pop()}domain=host_split+"."+domain;var lnklocal_mask="^https?://(.*)("+domain+"|webcache.googleusercontent.com)";var lnklocal=new RegExp(lnklocal_mask,"i");if(document.getElementsByTagName){var anchors=document.getElementsByTagName("a");for(var i=0;i<anchors.length;i++){var anchor=anchors[i];if(anchor.onmousedown){var original_click=anchor.onmousedown;var s=original_click.toString().split("\n").join(" ");var bs=s.indexOf("{");var head=s.substr(0,bs);var ps=head.indexOf("(");var pe=head.indexOf(")");var params=head.substring(ps+1,pe);var plist=params.split(",");var body=s.substr(bs+1,s.length-bs-2);var insert="sc_clickstat_call(this,'"+sc_click_dir+"');";var final_body=insert+body;var ev_head="new Function(";var ev_params="";var ev_sep="";for(var sc_i=0;sc_i<plist.length;sc_i++){ev_params=ev_sep+"'"+plist[sc_i]+"'";ev_sep=","}if(ev_sep==","){ev_params+=","}var ev_foot="final_body);";var ev_final=ev_head+ev_params+ev_foot;anchor.onmousedown=eval(ev_final)}else{anchor.onmousedown=new Function("event","sc_clickstat_call(this,'"+sc_click_dir+"');return true;")}}}function sc_none(){return}function sc_delay(){if(window.sc_click_stat){var d=window.sc_click_stat}else{var d=0}var n=new Date();var t=n.getTime()+d;while(n.getTime()<t){var n=new Date()}}function sc_clickstat_call(_bd,_be){if(_bd){var _bf=0;if(lnk.test(_bd)){if((lnklocal.test(_bd))){if(dl.test(_bd)){_bf=1}else{if(window.sc_exit_link_detect&&new RegExp(sc_exit_link_detect,"i").test(_bd)){_bf=2}else{if(sc_cls==2){_bf=2}}}}else{_bf=2}}if(_bf!=0){var _c0=escape(_bd);if(_c0.length>0){if(sc_unique_returning==""){sc_unique_returning="&jg=&rr="}if(_bf==2&&sc_sp!="disabled"){try{sessionStorage.setItem("statcounter_exit_domain",_c0.split("/")[2].replace(/^www\./,""))}catch(ignore){}}var _c1=_be+"click.gif?sc_project="+clickstat_project+"&security="+clickstat_security+"&c="+_c0+"&m="+_bf+"&u="+sc_url+"&t="+sc_title+"&sess=a181b5&rand="+Math.random()+sc_uuid_q+sc_unique_returning;var _c2=new Image();_c2.onload=sc_none;_c2.src=_c1;sc_delay()}}}}var sc_gsyn_pattern="googlesyndication.com|ypn-js.overture.com|ypn-js.ysm.yahoo.com|googleads.g.doubleclick.net";var sc_gsyn_pattern2="^aswift_[0-9]+$";var sc_px;var sc_py;function sc_adsense_click(_c3){if(_c3.src.match(sc_gsyn_pattern)){var _c4=escape(_c3.src)}else{var _c4=escape("Google Adsense "+_c3.width+"x"+_c3.height)}var i=new Image();var _c6=sc_click_dir+"click.gif?sc_project="+clickstat_project+"&security="+clickstat_security+"&c="+_c4+"&m=2&u="+sc_url+"&t="+sc_title+"&sess=a181b5&rand="+Math.random()+sc_uuid_q+sc_unique_returning;i.src=_c6;sc_delay()}function sc_adsense_init(){if(document.all&&typeof window.opera=="undefined"){var el=document.getElementsByTagName("iframe");for(var i=0;i<el.length;i++){if(el[i].src.match(sc_gsyn_pattern)||el[i].id.match(sc_gsyn_pattern2)){el[i].onfocus=function(){sc_adsense_click(this)}}}}else{if(typeof window.addEventListener!="undefined"){window.addEventListener("unload",sc_exitpage,false);window.addEventListener("mousemove",sc_getmouse,true)}}}if(typeof window.addEventListener!="undefined"){window.addEventListener("load",sc_adsense_init,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",sc_adsense_init,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",sc_adsense_init)}else{if(typeof window.onload=="function"){var sc_existing=onload;window.onload=function(){sc_existing();sc_adsense_init()}}else{window.onload=sc_adsense_init}}}}function sc_getmouse(e){if(typeof e.pageX=="number"){sc_px=e.pageX;sc_py=e.pageY}else{if(typeof e.clientX=="number"){sc_px=e.clientX;sc_py=e.clientY;if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){sc_px+=document.body.scrollLeft;sc_py+=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){sc_px+=document.documentElement.scrollLeft;sc_py+=document.documentElement.scrollTop}}}}}function sc_findy(obj){var y=0;while(obj){y+=obj.offsetTop;obj=obj.offsetParent}return (y)}function sc_findx(obj){var x=0;while(obj){x+=obj.offsetLeft;obj=obj.offsetParent}return (x)}function sc_exitpage(e){ad=document.getElementsByTagName("iframe");if(typeof sc_px=="undefined"){return}for(var i=0;i<ad.length;i++){var _d0=sc_findx(ad[i]);var _d1=sc_findy(ad[i]);var adW=parseInt(_d0,10)+parseInt(ad[i].width,10)+15;var adH=parseInt(_d1,10)+parseInt(ad[i].height,10)+10;var _d4=(sc_px>(_d0-10)&&sc_px<adW);var _d5=(sc_py>(_d1-10)&&sc_py<adH);if(_d5&&_d4){if(ad[i].src.match(sc_gsyn_pattern)||ad[i].id.match(sc_gsyn_pattern2)){sc_adsense_click(ad[i])}}}}}}
imagesDir="https://static.paudedamasc.com/wysiwyg/icons/";cssDir="https://static.paudedamasc.com/wysiwyg/styles/";popupsDir="$pattern_path/wysiwyg/popups/";wysiwygWidth="100%";wysiwygHeight="100%";document.write('<link rel="stylesheet" type="text/css" href="'+cssDir+'styles.css">\n');var Fonts=new Array();Fonts[0]="Arial";Fonts[1]="Sans Serif";Fonts[2]="Tahoma";Fonts[3]="Verdana";Fonts[4]="Courier New";Fonts[5]="Georgia";Fonts[6]="Times New Roman";Fonts[7]="Impact";Fonts[8]="Comic Sans MS";var BlockFormats=new Array();BlockFormats[0]="Address";BlockFormats[1]="Bulleted List";BlockFormats[2]="Definition";BlockFormats[3]="Definition Term";BlockFormats[4]="Directory List";BlockFormats[5]="Formatted";BlockFormats[6]="Heading 1";BlockFormats[7]="Heading 2";BlockFormats[8]="Heading 3";BlockFormats[9]="Heading 4";BlockFormats[10]="Heading 5";BlockFormats[11]="Heading 6";BlockFormats[12]="Menu List";BlockFormats[13]="Normal";BlockFormats[14]="Numbered List";var FontSizes=new Array();FontSizes[0]="1";FontSizes[1]="2";FontSizes[2]="3";FontSizes[3]="4";FontSizes[4]="5";FontSizes[5]="6";FontSizes[6]="7";var buttonName=new Array();buttonName[0]="bold";buttonName[1]="italic";buttonName[2]="underline";buttonName[4]="seperator";buttonName[5]="subscript";buttonName[6]="superscript";buttonName[7]="seperator";buttonName[8]="unorderedlist";buttonName[9]="orderedlist";buttonName[10]="outdent";buttonName[11]="indent";var buttonName2=new Array();buttonName2[0]="justifyleft";buttonName2[1]="justifycenter";buttonName2[2]="justifyright";buttonName2[3]="seperator";buttonName2[4]="forecolor";buttonName2[5]="backcolor";buttonName2[6]="seperator";buttonName2[7]="cut";buttonName2[8]="copy";buttonName2[9]="paste";buttonName2[10]="seperator";buttonName2[11]="undo";buttonName2[12]="redo";buttonName2[13]="seperator";buttonName2[14]="inserttable";buttonName2[15]="insertimage";buttonName2[16]="createlink";buttonName2[17]="seperator";buttonName2[18]="viewSource";buttonName2[19]="seperator";buttonName2[20]="help";var ToolbarList={"bold":['Bold','Bold',imagesDir+'bold.gif',imagesDir+'bold_on.gif'],"italic":['Italic','Italic',imagesDir+'italics.gif',imagesDir+'italics_on.gif'],"underline":['Underline','Underline',imagesDir+'underline.gif',imagesDir+'underline_on.gif'],"strikethrough":['Strikethrough','Strikethrough',imagesDir+'strikethrough.gif',imagesDir+'strikethrough_on.gif'],"seperator":['','',imagesDir+'seperator.gif',imagesDir+'seperator.gif'],"subscript":['Subscript','Subscript',imagesDir+'subscript.gif',imagesDir+'subscript_on.gif'],"superscript":['Superscript','Superscript',imagesDir+'superscript.gif',imagesDir+'superscript_on.gif'],"unorderedlist":['InsertUnorderedList','InsertUnorderedList',imagesDir+'list_unordered.gif',imagesDir+'list_unordered_on.gif'],"orderedlist":['InsertOrderedList','InsertOrderedList',imagesDir+'list_ordered.gif',imagesDir+'list_ordered_on.gif'],"outdent":['Outdent','Outdent',imagesDir+'indent_left.gif',imagesDir+'indent_left_on.gif'],"indent":['Indent','Indent',imagesDir+'indent_right.gif',imagesDir+'indent_right_on.gif'],"justifyleft":['Justifyleft','Justifyleft',imagesDir+'justify_left.gif',imagesDir+'justify_left_on.gif'],"justifycenter":['Justifycenter','Justifycenter',imagesDir+'justify_center.gif',imagesDir+'justify_center_on.gif'],"justifyright":['Justifyright','Justifyright',imagesDir+'justify_right.gif',imagesDir+'justify_right_on.gif'],"cut":['Cut','Cut',imagesDir+'cut.gif',imagesDir+'cut_on.gif'],"copy":['Copy','Copy',imagesDir+'copy.gif',imagesDir+'copy_on.gif'],"paste":['Paste','Paste',imagesDir+'paste.gif',imagesDir+'paste_on.gif'],"forecolor":['ForeColor','ForeColor',imagesDir+'forecolor.gif',imagesDir+'forecolor_on.gif'],"backcolor":['BackColor','BackColor',imagesDir+'backcolor.gif',imagesDir+'backcolor_on.gif'],"undo":['Undo','Undo',imagesDir+'undo.gif',imagesDir+'undo_on.gif'],"redo":['Redo','Redo',imagesDir+'redo.gif',imagesDir+'redo_on.gif'],"inserttable":['InsertTable','InsertTable',imagesDir+'insert_table.gif',imagesDir+'insert_table_on.gif'],"insertimage":['InsertImage','InsertImage',imagesDir+'insert_picture.gif',imagesDir+'insert_picture_on.gif'],"createlink":['CreateLink','CreateLink',imagesDir+'insert_hyperlink.gif',imagesDir+'insert_hyperlink_on.gif'],"viewSource":['ViewSource','ViewSource',imagesDir+'view_source.gif',imagesDir+'view_source_on.gif'],"viewText":['ViewText','ViewText',imagesDir+'view_text.gif',imagesDir+'view_text_on.gif'],"help":['Help','Help',imagesDir+'help.gif',imagesDir+'help_on.gif'],"selectfont":['SelectFont','SelectFont',imagesDir+'select_font.gif',imagesDir+'select_font_on.gif'],"selectsize":['SelectSize','SelectSize',imagesDir+'select_size.gif',imagesDir+'select_size_on.gif']};if(typeof HTMLElement!="undefined"&&!HTMLElement.prototype.insertAdjacentElement){HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode){switch(where){case'beforeBegin':this.parentNode.insertBefore(parsedNode,this);break;case'afterBegin':this.insertBefore(parsedNode,this.firstChild);break;case'beforeEnd':this.appendChild(parsedNode);break;case'afterEnd':if(this.nextSibling){this.parentNode.insertBefore(parsedNode,this.nextSibling);}else{this.parentNode.appendChild(parsedNode);}break;}};HTMLElement.prototype.insertAdjacentHTML=function(where,htmlStr){var r=this.ownerDocument.createRange();r.setStartBefore(this);var parsedHTML=r.createContextualFragment(htmlStr);this.insertAdjacentElement(where,parsedHTML)};HTMLElement.prototype.insertAdjacentText=function(where,txtStr){var parsedText=document.createTextNode(txtStr);this.insertAdjacentElement(where,parsedText)}};viewTextMode=0;function generate_wysiwyg(textareaID){document.getElementById(textareaID).style.display='none';var n=textareaID;toolbarWidth=(typeof(wysiwygWidth)==='number'?(parseFloat(wysiwygWidth)+2)+'px':wysiwygWidth);var toolbar;toolbar='<table cellpadding="0" cellspacing="0" border="0" class="toolbar1" style="width:'+toolbarWidth+';"><tr><td style="width: 6px;"><img src="'+imagesDir+'seperator2.gif" alt="" hspace="3"></td>';toolbar+='<td style="width: 90px;"><span id="FontSelect'+n+'"></span></td>';toolbar+='<td style="width: 60px;"><span id="FontSizes'+n+'"></span></td>';for(var i=0;i<=buttonName.length;){if(buttonName[i]){var buttonObj=ToolbarList[buttonName[i]];var buttonID=buttonObj[0];var buttonTitle=buttonObj[1];var buttonImage=buttonObj[2];var buttonImageRollover=buttonObj[3];if(buttonName[i]=="seperator"){toolbar+='<td style="width: 12px;" align="center"><img src="'+buttonImage+'" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"></td>';}else{toolbar+='<td style="width: 22px;"><img src="'+buttonImage+'" border=0 unselectable="on" title="'+buttonTitle+'" id="'+buttonID+'" class="button" onClick="formatText(this.id,\''+n+'\');" onmouseover="if(className==\'button\'){className=\'buttonOver\'}; this.src=\''+buttonImageRollover+'\';" onmouseout="if(className==\'buttonOver\'){className=\'button\'}; this.src=\''+buttonImage+'\';" unselectable="on" width="20" height="20"></td>';}}i++;}toolbar+='<td> </td></tr></table>';var toolbar2;toolbar2='<table cellpadding="0" cellspacing="0" border="0" class="toolbar2" style="width:'+toolbarWidth+';"><tr><td style="width: 6px;"><img src="'+imagesDir+'seperator2.gif" alt="" hspace="3"></td>';for(var j=0;j<=buttonName2.length;){if(buttonName2[j]){var buttonObj=ToolbarList[buttonName2[j]];var buttonID=buttonObj[0];var buttonTitle=buttonObj[1];var buttonImage=buttonObj[2];var buttonImageRollover=buttonObj[3];if(buttonName2[j]=="seperator"){toolbar2+='<td style="width: 12px;" align="center"><img src="'+buttonImage+'" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"></td>';}else if(buttonName2[j]=="viewSource"){toolbar2+='<td style="width: 22px;">';toolbar2+='<span id="HTMLMode'+n+'"><img src="'+buttonImage+'" border=0 unselectable="on" title="'+buttonTitle+'" id="'+buttonID+'" class="button" onClick="formatText(this.id,\''+n+'\');" onmouseover="if(className==\'button\'){className=\'buttonOver\'}; this.src=\''+buttonImageRollover+'\';" onmouseout="if(className==\'buttonOver\'){className=\'button\'}; this.src=\''+buttonImage+'\';" unselectable="on"  width="20" height="20"></span>';toolbar2+='<span id="textMode'+n+'"><img src="'+imagesDir+'view_text.gif" border=0 unselectable="on" title="viewText"          id="ViewText"       class="button" onClick="formatText(this.id,\''+n+'\');" onmouseover="if(className==\'button\'){className=\'buttonOver\'}; this.src=\''+imagesDir+'view_text_on.gif\';"    onmouseout="if(className==\'buttonOver\'){className=\'button\'}; this.src=\''+imagesDir+'view_text.gif\';" unselectable="on"  width="20" height="20"></span>';toolbar2+='</td>';}else{toolbar2+='<td style="width: 22px;"><img src="'+buttonImage+'" border=0 unselectable="on" title="'+buttonTitle+'" id="'+buttonID+'" class="button" onClick="formatText(this.id,\''+n+'\');" onmouseover="if(className==\'button\'){className=\'buttonOver\'}; this.src=\''+buttonImageRollover+'\';" onmouseout="if(className==\'buttonOver\'){className=\'button\'}; this.src=\''+buttonImage+'\';" unselectable="on" width="20" height="20"></td>';}}j++;}toolbar2+='<td> </td></tr></table>';var iframe='<table cellpadding="0" cellspacing="0" border="0" style="width:'+(typeof(wysiwygWidth)==='number'?wysiwygWidth+'px':wysiwygWidth)+'; height:'+(typeof(wysiwygHeight)==='number'?wysiwygHeight+'px':wysiwygHeight)+';border: 1px inset #CCCCCC;" id="wys_'+n+'"><tr><td valign="top">\n'+'<iframe frameborder="0" id="wysiwyg'+n+'"></iframe>\n'+'</td></tr></table>\n';if(document.getElementById("wysdiv_"+n)===null){document.getElementById(n).insertAdjacentHTML("afterEnd",'<div id="wysdiv_'+n+'" class="auto-x">'+toolbar+toolbar2+iframe+'</div>');}else{document.getElementById("wysdiv_"+n).innerHTML=toolbar+toolbar2+iframe;}outputFontSelect(n);outputFontSizes(n);hideFonts(n);hideFontSizes(n);document.getElementById("textMode"+n).style.display='none';document.getElementById("wysiwyg"+n).style.height="100%";document.getElementById("wysiwyg"+n).style.width=(typeof(wysiwygWidth)==='number'?wysiwygWidth+'px':wysiwygWidth);var c=document.getElementById(n).value;var content=replacePaths(c);var doc=document.getElementById("wysiwyg"+n).contentWindow.document;doc.open();doc.write(content);doc.close();doc.body.contentEditable=true;doc.body.style.fontFamily="Georgia,trebuchet ms,Verdana,Arial,Helvetica,sans-serif";doc.body.style.fontSize="13px";doc.body.style.backgroundColor="#FBFAF6";doc.body.style.padding="10px";doc.body.style.boxSizing="border-box";createStyleSheet('https://static.paudedamasc.com/main.css',doc);doc.designMode="on";var browserName=navigator.appName;if(browserName=="Microsoft Internet Explorer"){for(var idx=0;idx<document.forms.length;idx++){document.forms[idx].attachEvent('onsubmit',function(){updateTextArea(n);});}}else{for(var idx=0;idx<document.forms.length;idx++){document.forms[idx].addEventListener('submit',function OnSubmit(){updateTextArea(n);},true);}}};function formatText(id,n,selected){document.getElementById("wysiwyg"+n).contentWindow.focus();var formatIDs=new Array("FontSize","FontName","Bold","Italic","Underline","Subscript","Superscript","Strikethrough","Justifyleft","Justifyright","Justifycenter","InsertUnorderedList","InsertOrderedList","Indent","Outdent","ForeColor","BackColor","InsertImage","InsertTable","CreateLink");for(var i=0;i<=formatIDs.length;){if(formatIDs[i]==id){var disabled_id=1;}i++;}if(viewTextMode==1&&disabled_id==1){alert("You are in HTML Mode. This feature has been disabled.");}else{if(id=="FontSize"){document.getElementById("wysiwyg"+n).contentWindow.document.execCommand("FontSize",false,selected);}else if(id=="FontName"){document.getElementById("wysiwyg"+n).contentWindow.document.execCommand("FontName",false,selected);}else if(id=='ForeColor'||id=='BackColor'){var w=screen.availWidth;var h=screen.availHeight;var popW=210,popH=165;var leftPos=(w-popW)/2,topPos=(h-popH)/2;var currentColor=_dec_to_rgb(document.getElementById("wysiwyg"+n).contentWindow.document.queryCommandValue(id));window.open(popupsDir+'select_color.html?color='+currentColor+'&command='+id+'&wysiwyg='+n,'popup','location=0,status=0,scrollbars=0,width='+popW+',height='+popH+',top='+topPos+',left='+leftPos);}else if(id=="InsertImage"){window.open(popupsDir+'insert_image.html?wysiwyg='+n,'popup','location=0,status=0,scrollbars=0,resizable=0,width=400,height=190');}else if(id=="InsertTable"){window.open(popupsDir+'create_table.html?wysiwyg='+n,'popup','location=0,status=0,scrollbars=0,resizable=0,width=400,height=360');}else if(id=="CreateLink"){window.open(popupsDir+'insert_hyperlink.html?wysiwyg='+n,'popup','location=0,status=0,scrollbars=0,resizable=0,width=300,height=110');}else if(id=="ViewSource"){viewSource(n);}else if(id=="ViewText"){viewText(n);}else if(id=="Help"){window.open(popupsDir+'about.html','popup','location=0,status=0,scrollbars=0,resizable=0,width=400,height=330');}else{document.getElementById("wysiwyg"+n).contentWindow.document.execCommand(id,false,null);}}};function insertHTML(html,n){var browserName=navigator.appName;if(browserName=="Microsoft Internet Explorer"){document.getElementById('wysiwyg'+n).contentWindow.document.selection.createRange().pasteHTML(html);}else{var div=document.getElementById('wysiwyg'+n).contentWindow.document.createElement("div");div.innerHTML=html;var node=insertNodeAtSelection(div,n);}}function insertNodeAtSelection(insertNode,n){var sel=document.getElementById('wysiwyg'+n).contentWindow.getSelection();var range=sel.getRangeAt(0);sel.removeAllRanges();range.deleteContents();var container=range.startContainer;var pos=range.startOffset;range=document.createRange();if(container.nodeType==3&&insertNode.nodeType==3){container.insertData(pos,insertNode.nodeValue);range.setEnd(container,pos+insertNode.length);range.setStart(container,pos+insertNode.length);}else{var afterNode;if(container.nodeType==3){var textNode=container;container=textNode.parentNode;var text=textNode.nodeValue;var textBefore=text.substr(0,pos);var textAfter=text.substr(pos);var beforeNode=document.createTextNode(textBefore);afterNode=document.createTextNode(textAfter);container.insertBefore(afterNode,textNode);container.insertBefore(insertNode,afterNode);container.insertBefore(beforeNode,insertNode);container.removeChild(textNode);}else{afterNode=container.childNodes[pos];container.insertBefore(insertNode,afterNode);}range.setEnd(afterNode,0);range.setStart(afterNode,0);}sel.addRange(range);};function _dec_to_rgb(value){var hex_string="";for(var hexpair=0;hexpair<3;hexpair++){var myByte=value&0xFF;value>>=8;var nybble2=myByte&0x0F;var nybble1=(myByte>>4)&0x0F;hex_string+=nybble1.toString(16);hex_string+=nybble2.toString(16);}return hex_string.toUpperCase();};function outputFontSelect(n){var FontSelectObj=ToolbarList['selectfont'];var FontSelect=FontSelectObj[2];var FontSelectOn=FontSelectObj[3];Fonts.sort();var FontSelectDropDown=new Array;FontSelectDropDown[n]='<table border="0" cellpadding="0" cellspacing="0"><tr><td onMouseOver="document.getElementById(\'selectFont'+n+'\').src=\''+FontSelectOn+'\';" onMouseOut="document.getElementById(\'selectFont'+n+'\').src=\''+FontSelect+'\';"><img src="'+FontSelect+'" id="selectFont'+n+'" width="85" height="20" onClick="showFonts(\''+n+'\');" unselectable="on"><br>';FontSelectDropDown[n]+='<span id="Fonts'+n+'" class="dropdown" style="width: 145px;">';for(var i=0;i<=Fonts.length;){if(Fonts[i]){FontSelectDropDown[n]+='<button type="button" onClick="formatText(\'FontName\',\''+n+'\',\''+Fonts[i]+'\')\; hideFonts(\''+n+'\');" onMouseOver="this.className=\'mouseOver\'" onMouseOut="this.className=\'mouseOut\'" class="mouseOut" style="width: 120px;"><table cellpadding="0" cellspacing="0" border="0"><tr><td align="left" style="font-family:'+Fonts[i]+'; font-size: 12px;">'+Fonts[i]+'</td></tr></table></button><br>';}i++;}FontSelectDropDown[n]+='</span></td></tr></table>';document.getElementById('FontSelect'+n).insertAdjacentHTML("afterBegin",FontSelectDropDown[n]);};function outputFontSizes(n){var FontSizeObj=ToolbarList['selectsize'];var FontSize=FontSizeObj[2];var FontSizeOn=FontSizeObj[3];FontSizes.sort();var FontSizesDropDown=new Array;FontSizesDropDown[n]='<table border="0" cellpadding="0" cellspacing="0"><tr><td onMouseOver="document.getElementById(\'selectSize'+n+'\').src=\''+FontSizeOn+'\';" onMouseOut="document.getElementById(\'selectSize'+n+'\').src=\''+FontSize+'\';"><img src="'+FontSize+'" id="selectSize'+n+'" width="49" height="20" onClick="showFontSizes(\''+n+'\');" unselectable="on"><br>';FontSizesDropDown[n]+='<span id="Sizes'+n+'" class="dropdown" style="width: 170px;">';for(var i=0;i<=FontSizes.length;){if(FontSizes[i]){FontSizesDropDown[n]+='<button type="button" onClick="formatText(\'FontSize\',\''+n+'\',\''+FontSizes[i]+'\')\;hideFontSizes(\''+n+'\');" onMouseOver="this.className=\'mouseOver\'" onMouseOut="this.className=\'mouseOut\'" class="mouseOut" style="width: 145px;"><table cellpadding="0" cellspacing="0" border="0"><tr><td align="left" style="font-family: arial, verdana, helvetica;"><font size="'+FontSizes[i]+'">size '+FontSizes[i]+'</font></td></tr></table></button><br>';}i++;}FontSizesDropDown[n]+='</span></td></tr></table>';document.getElementById('FontSizes'+n).insertAdjacentHTML("afterBegin",FontSizesDropDown[n]);};function hideFonts(n){document.getElementById('Fonts'+n).style.display='none';};function hideFontSizes(n){document.getElementById('Sizes'+n).style.display='none';};function showFonts(n){if(document.getElementById('Fonts'+n).style.display=='block'){document.getElementById('Fonts'+n).style.display='none';}else{document.getElementById('Fonts'+n).style.display='block';document.getElementById('Fonts'+n).style.position='absolute';}};function showFontSizes(n){if(document.getElementById('Sizes'+n).style.display=='block'){document.getElementById('Sizes'+n).style.display='none';}else{document.getElementById('Sizes'+n).style.display='block';document.getElementById('Sizes'+n).style.position='absolute';}};function viewSource(n){var getDocument=document.getElementById("wysiwyg"+n).contentWindow.document;var browserName=navigator.appName;if(browserName=="Microsoft Internet Explorer"){var iHTML=getDocument.body.innerHTML;getDocument.body.innerText=setPaths(iHTML);}else{var html=document.createTextNode(setPaths(getDocument.body.innerHTML));getDocument.body.innerHTML="";getDocument.body.appendChild(html);}document.getElementById('HTMLMode'+n).style.display='none';document.getElementById('textMode'+n).style.display='block';getDocument.body.style.fontSize="12px";getDocument.body.style.fontFamily="Courier New";viewTextMode=1;};function viewText(n){var getDocument=document.getElementById("wysiwyg"+n).contentWindow.document;var browserName=navigator.appName;if(browserName=="Microsoft Internet Explorer"){var iText=getDocument.body.innerText;getDocument.body.innerHTML=replacePaths(iText);}else{var html=getDocument.body.ownerDocument.createRange();html.selectNodeContents(getDocument.body);getDocument.body.innerHTML=replacePaths(html.toString());}document.getElementById('textMode'+n).style.display='none';document.getElementById('HTMLMode'+n).style.display='block';getDocument.body.style.fontSize="";getDocument.body.style.fontFamily="";viewTextMode=0;};function updateTextArea(n,f){var codi=document.getElementById("wysiwyg"+n).contentWindow.document.body.innerHTML;codi=replacePaths(codi);document.getElementById(n).value=codi;if(f!==undefined){f();}};var paths=("https://static1.paudedamasc.com|https://static2.paudedamasc.com|https://static.paudedamasc.com|https://static1.paudedamasc.com/|https://static2.paudedamasc.com/|https://static.paudedamasc.com/|https://www.paudedamasc.com/|https://www.paudedamasc.com").split("|");var path_names=("$static_pattern_path1|$static_pattern_path2|$static_pattern_path|$static_path1|$static_path2|$static_path|$web_spath2|$pattern_spath").split("|");function replacePaths(codi){for(var i=0;i<path_names.length;i++){var re=new RegExp("\\"+path_names[i],"g");codi=codi.replace(re,paths[i]);}return codi;};function setPaths(codi){for(var i=0;i<paths.length;i++){var re=new RegExp(paths[i],"g");codi=codi.replace(re,path_names[i]);}return codi;};
(function(jq){jq.fn.extend({reflect:function(options){options=jq.extend({height:1/2,opacity:0.5},options);return this.unreflect().each(function(){var img=this;if(/^img$/i.test(img.tagName)){function doReflect(){var imageWidth=img.width,imageHeight=img.height,reflection,reflectionHeight,wrapper,context,gradient;reflectionHeight=Math.floor((options.height>1)?Math.min(imageHeight,options.height):imageHeight*options.height);if(jq.browser.msie){reflection=jq("<img />").attr("src",img.src).addClass(img.className).removeClass("reflect").css({width:imageWidth,height:imageHeight,marginBottom:reflectionHeight-imageHeight,filter:"flipv progid:DXImageTransform.Microsoft.Alpha(opacity="+(options.opacity*100)+", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy="+(reflectionHeight/imageHeight*100)+")"})[0];}else{reflection=jq("<canvas />")[0];if(!reflection.getContext){return;}context=reflection.getContext("2d");try{jq(reflection).attr({width:imageWidth,height:reflectionHeight});context.save();context.translate(0,imageHeight-1);context.scale(1,-1);context.drawImage(img,0,-1,imageWidth,imageHeight);context.restore();context.globalCompositeOperation="destination-out";gradient=context.createLinearGradient(0,0,0,reflectionHeight);gradient.addColorStop(0,"rgba(255,255,255,"+(1-options.opacity)+")");gradient.addColorStop(1,"rgba(255,255,255,1.0)");context.fillStyle=gradient;context.rect(0,0,imageWidth,reflectionHeight);context.fill();}catch(e){return;}}jq(reflection).attr("style",img.style.cssText).css({display:"block",border:0,position:"relative"}).removeClass("reflect").addClass(img.className);wrapper=jq(/^a$/i.test(img.parentNode.tagName)?"<span />":"<span />").insertAfter(img).append([img,reflection])[0];

wrapper.className=img.className;jq.data(img,"reflected",wrapper.style.cssText=img.style.cssText);

jq(wrapper).css({width:imageWidth,height:imageHeight+reflectionHeight,overflow:"hidden"});img.style.cssText="display: block; border: 0px;"+(img.style.maxWidth!==""&&img.style.maxWidth!==undefined?"max-width:"+img.style.maxWidth:"");jq(img).removeClass("reflect");}if(img.complete){doReflect();}else{jq(img).load(doReflect);}}});},unreflect:function(){return this.unbind("load").each(function(){var img=this,reflected=jq.data(this,"reflected"),wrapper;if(reflected!==undefined){wrapper=img.parentNode;img.className=wrapper.className;/*img.style.cssText=reflected;jq.removeData(img,"reflected");*/wrapper.parentNode.replaceChild(img,wrapper);}});}});})(jQuery);jQuery(function(jq){jq("img.reflect").reflect();});
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,m,g,v,b,_=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return b=n(_),_[0].preventDefault&&(e.at="left top"),p=b.width,m=b.height,g=b.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),a=i(k.at,p,m),v.left+=a[0],v.top+=a[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),b=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,T=d+b+s(this,"marginBottom")+w.height,C=t.extend({},v),M=i(k.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?C.left-=u:"center"===e.my[0]&&(C.left-=u/2),"bottom"===e.my[1]?C.top-=d:"center"===e.my[1]&&(C.top-=d/2),C.left+=M[0],C.top+=M[1],t.support.offsetFractions||(C.left=h(C.left),C.top=h(C.top)),n={marginLeft:f,marginTop:b},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](C,{targetWidth:p,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:T,offset:[a[0]+M[0],a[1]+M[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=g.left-C.left,s=i+p-u,n=g.top-C.top,a=n+m-d,h={target:{element:_,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:C.left,top:C.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>m&&m>r(n+a)&&(h.vertical="middle"),h.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(C,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-o-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-o-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-o-a,t.top+p+f+m>c&&(0>s||r(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,t.top+p+f+m>u&&(i>0||u>r(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(t){var e,i,s,n,a="ui-button ui-widget ui-state-default ui-corner-all",o="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var o=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(a).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){o.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){o.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||o.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),o.buttonElement.attr("aria-pressed","true");var e=o.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,o.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(a+" "+o+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):a.push("ui-button-text-only"),e.addClass(a.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);
jq(document).ready(function(){jq(":button:not(.btn_blanc,.btn_blanc_cp,.dropdown button), :submit:not(.btn_blanc,.btn_blanc_cp), :reset:not(.btn_blanc,.btn_blanc_cp), a.ui-button").button();});
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT
* MODIFICACIONS: 1) .text( per .html( 2) Codi comentat: t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))
 */
(function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var a=t.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:e=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case a.UP:e=!0,this._keyEvent("previous",n);break;case a.DOWN:e=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.html(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;/*t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))*/},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").html(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.html(e))}})})(jQuery);
jq.extend({URLEncode:function(c){var o='';var x=0;c=c.toString();var r=/(^[a-zA-Z0-9_.]*)/;
  while(x<c.length){var m=r.exec(c.substr(x));
    if(m!=null && m.length>1 && m[1]!=''){o+=m[1];x+=m[1].length;
    }else{if(c[x]==' ')o+='+';else{var d=c.charCodeAt(x);var h=d.toString(16);
    o+='%'+(h.length<2?'0':'')+h.toUpperCase();}x++;}}return o;},
URLDecode:function(s){var o=s;var binVal,t;var r=/(%[^%]{2})/;
  while((m=r.exec(o))!=null && m.length>1 && m[1]!=''){b=parseInt(m[1].substr(1),16);
  t=String.fromCharCode(b);o=o.replace(m[1],t);}return o;}
});
jq.widget( "custom.catcomplete", jq.ui.autocomplete, {
	_renderMenu: function( ul, items ) {
		var self = this, currentCategory = "";
		if(items.length>0){
			jq.each( items, function( index, item ) {
				if ( item.category != currentCategory && item.category != undefined) {
					ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
					currentCategory = item.category;
				}
				self._renderItemData( ul, item );
			});
		}
	}
});
function auto(id_btn,id_buscar,id_clasificar,id_form,s_taula,s_camps,s_db_source,restrict,onSelect,onNotFound,onFound){
        id_btn = ((id_btn != null && id_btn != undefined && id_btn != "null" && id_btn != "undefined") ? id_btn : "search_button");
        id_buscar = ((id_buscar != null && id_buscar != undefined && id_buscar != "null" && id_buscar != "undefined") ? id_buscar : "buscar");
        id_clasificar = ((id_clasificar != null && id_clasificar != undefined && id_clasificar != "null" && id_clasificar != "undefined") ? id_clasificar : "clasificar");
        id_form = ((id_form != null && id_form != undefined && id_form != "null" && id_form != "undefined") ? id_form : "search_form");
        s_taula = ((s_taula != null && s_taula != undefined && s_taula != "null" && s_taula != "undefined") ? s_taula : (jq("#s_taula").val()!=""&&jq("#s_taula").val()!=undefined?jq("#s_taula").val():""));
        s_camps = ((s_camps != null && s_camps != undefined && s_camps != "null" && s_camps != "undefined") ? s_camps : (jq("#s_camps").val()!=""&&jq("#s_camps").val()!=undefined?jq("#s_camps").val():""));
        s_db_source = ((s_db_source != null && s_db_source != undefined && s_db_source != "null" && s_db_source != "undefined") ? s_db_source : (jq("#db_source").val()!=""&&jq("#db_source").val()!=undefined?jq("#db_source").val():"_B"));
        restrict = ((restrict != null && restrict != undefined && restrict != "null" && restrict != "undefined") ? restrict : "0");
	if(typeof onSelect==="string"){
		try{
			eval(onSelect);
		}catch(err){
			console.log(onSelect+"\n\n"+err);
		}
	}
        onSelect = ((onSelect != null && onSelect != undefined && onSelect != "null" && onSelect != "undefined") ? onSelect : function(){});
        onNotFound = ((onNotFound != null && onNotFound != undefined && onNotFound != "null" && onNotFound != "undefined") ? onNotFound : function(){});
        onFound = ((onFound != null && onFound != undefined && onFound != "null" && onFound != "undefined") ? onFound : function(){});
	var cache = {};
	var inCache = false;
	jq( "#" + id_btn ).button({
		icons: {
			primary: "ui-icon-search",
			secondary: null
		}
	}).click(function(){
		if("0"=="1"){
			var link = "https://batmanapollo.ru//?clasificar=" + jq( "#" + id_clasificar ).val() + "&buscar=" + jq.URLEncode(jq( "#" + id_buscar ).val());
			window.open(link);
		}else{
			document.forms[id_form].submit();
		}
        	return false;
	});
	jq( "#" + id_buscar ).keypress(function(event){
  		if(event.keyCode=='13'){
			if("0"=="1"){
				var link = "https://batmanapollo.ru//?clasificar=" + jq( "#" + id_clasificar ).val() + "&buscar=" + jq.URLEncode(jq( "#" + id_buscar ).val());
				window.open(link);
			}else{
				document.forms[id_form].submit();
			}
			return false;
  		}
  		jq("#autocomplete-menu").css({zIndex:9999});
	}).catcomplete({
		minLength: 1,
		source: function(request, response) {
			request.ambit = jq("#" + id_clasificar).val();
			request.items = "15";
			request.maxChar = "50";
			request.db = s_db_source;
			request.min = "0";
			request.taula = s_taula;
			request.camps = s_camps;
			request.restrict = restrict;
			if("0"=="1"){
		            request.cat = 1;	
			}
			if ( request.term in cache ) {
				response( cache[ request.term ] );
				edit( cache[ request.term ] );
				jq("#autocomplete-menu").css({zIndex:9999});
				return;
			}
			if(request.term != ""){
				jq.ajax({
					url: "https://batmanapollo.ru//search.php",
					dataType: "json",
					data: request,
					success: function( data ) {
						cache[ request.term ] = data;
						response( data );
						edit( data, id_buscar );
  						jq("#autocomplete-menu").css({zIndex:9999});
						if(data.length>0){
							onFound();
						}else{
							onNotFound();
						}
					}
				});
			}
		},
		select: function(event, ui){
			onSelect(ui.item.label.replace(/(<([^>]+)>)/ig,""));
		},
		open: function(event, ui){
			if(jq("#"+id_buscar).val() in cache){
				onFound();
			}
		},
		close: function(event, ui){
			if(jq("#"+id_buscar).val() in cache){
				//onNotFound();
			}
		}
	});
	jq( "#" + id_clasificar ).change(function(){
		cache = {};
	});
}
function edit(data){
	var temp_id = 0;
	jq("#autocomplete-menu li:not(.ui-autocomplete-category)").each(function(index) {
		var t = jq(this);
		if(data[index]!==undefined && data[index]["edit"]!==undefined && data[index]["edit"]!=""){
			jq(this).mouseover(function(){
				temp_id++;
				jq("<div>"+data[index]["edit"]+"</div>").css({position:"absolute",top:parseInt(t.position().top+jq("#autocomplete-menu").position().top),left:parseInt(jq("#autocomplete-menu").position().left+t.width()+5),paddingLeft:5,paddingRight:5,paddingTop:4,paddingBottom:4,zIndex:99999,opacity:.8,filter:"Alpha(Opacity=80)",display:"inline"}).attr("id","temp_div"+temp_id).addClass("ui-widget ui-autocomplete ui-menu-item ui-widget-content ui-corner-all ui-helper-reset").appendTo("body").fadeIn(400).mouseover(function(){
					jq(this).fadeOut(400,function(){
						jq(this).remove();
					});
				});
			}).mouseout(function(){
				jq("#temp_div"+temp_id).fadeOut(400,function(){
					jq(this).remove();
				});
			});
		}
	});
}
jq(document).ready(function(){
	// Buscador índex
	auto();
	// Buscador menú mòbil
	auto("search_button_mobil","buscar_mobil","clasificar_mobil","search_form_mobil");
	jq(".auto").each(function(index,valor){
		txt = jq(this).val().replace(/"#/ig,'"{hash}').replace(/'#/ig,"'{hash}");
		sp = txt.split("#");
		var func;
		if(sp.length>7){
			func = sp[7].replace(/{hash}/ig,'#');
		}
		auto(sp[0],sp[1],sp[2],"",sp[3],sp[4],sp[5],sp[6],func);
	});
});
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[c[l].cache]=o[c[l].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,o,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,h],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),a=c[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],l=s[a],c=u[n.type]||{};null!==l&&(null===o?h[a]=l:(c.mod&&(l-o>c.mod/2?o+=c.mod:o-l>c.mod/2&&(o-=c.mod)),h[a]=i((l-o)*e+o,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[o]=d,n):l(d)},f(a,function(e,i){l.fn[e]||(l.fn[e]=function(n){var a,o=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=l(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var h=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",m=i.test(u),g={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),a=t.effects.createWrapper(h).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,g[p]=v?o:0,m||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?r:o+r),v&&(a.css(p,0),m||a.css(f,r+o)),a.animate(g,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}})(jQuery);
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,a;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(a).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,a){s.position=[a.position.left-i.document.scrollLeft(),a.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(a))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,a){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(a))}}).css("position",a)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,a=!1,o={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(a=!0),t in i&&(o[t]=s)}),a&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})})(jQuery);
/* Títols HTML */
jQuery.widget("ui.dialog",jQuery.extend({},jQuery.ui.dialog.prototype,{_title: function(title){if(!this.options.title){title.html("&#160;");}else{title.html(this.options.title);}}}));
var amigos = 0;
jq(document).ready(function(){
	jq("#dialog-message").hide();
	jq("#widget-dialog,#widget-dialog2").hide();
	jq("#subs_btn1").button({
            icons: {
                primary: "ui-icon-pdf"
            }
        }).css({padding:5,fontSize:14}).click(function(){
                mostrarSubs();
        });
        jq("#subs_btn2").button({
            icons: {
                primary: "ui-icon-pdf"
            }
        }).css({padding:5,fontSize:14}).click(function(){
                mostrarSubs(2);
        });
        jq("#amigo_btn,#amigo_btn_cat").button({
            icons: {
                primary: "ui-icon-circle-plus"
            }
        }).click(function(){
	    cat_id = (jq(this).attr("id")=="amigo_btn_cat"?"_cat":"");
	    if(amigos<50){
                jq('<li style="padding: 2px;" class="li_amic">Email del amigo ('+(amigos+1)+'): <input type="text" style="width: 65%;" id="email'+cat_id+amigos+'" maxlength="255"><\/li>').insertBefore("#last_li"+cat_id);
                document.getElementById("email"+cat_id+amigos).setAttribute("maxlength", 255);
                amigos++;
	        if(amigos==50){
	            jq(this).button("disable");
	        }
	    }
        });
	jq("#tipus1").click(function(){
		if(jq("#li_assoc").is(":visible")){
			jq("#li_assoc").hide("blind",{},300);
		}
	});
	jq("#tipus2").click(function(){
		if(!jq("#li_assoc").is(":visible")){
			jq("#li_assoc").show("blind",{},300);
		}
	});
	jq("#tipus1_cat").click(function(){
		if(jq("#li_assoc_cat").is(":visible")){
			jq("#li_assoc_cat").hide("blind",{},300);
		}
	});
	jq("#tipus2_cat").click(function(){
		if(!jq("#li_assoc_cat").is(":visible")){
			jq("#li_assoc_cat").show("blind",{},300);
		}
	});
	jq("#widget-dialog,#widget-dialog2").bind("dialogclose",function(event,ui){
		jq(".li_amic").remove();
		amigos = 0;
	});
});
function mostrarSubs(id){
	if(id===undefined) id = "";
	accio_btn = (id===""?"Descargar catálogos":"Suscribirme");
	jq("#widget-dialog"+id).dialog({
		width: 600,
		modal: true,
		buttons: 
			[
				{
					text: "Cancelar",
					click: function() {
						jq( this ).dialog( "close" );
					}
				},
				{
					text: accio_btn,
					click: function() {
						subs(id);
					}
				}
			]
	});
}
function subs(id){
    if(id===undefined) id = "";
    var error_form = false;
    var params_form;
    var adjs = "";
    if(""!=""){
            adjs = "";
    }else{
        for(var i=0;i<jq("#ids_cat").val();i++){
    	    if(document.getElementById("cat"+i).checked){
    		    adjs += (adjs!=""?",":"") + jq("#nomcat"+i).val();
    	    }
    	}
    }
    if(adjs==="" && document.getElementById("ids_cat")!==undefined && id!=2){
	msg(false,"¡Atención!","Seleccione al menos un catálogo de la lista por favor.");
	error_form = true;
    }else{
	//subscripció a les novetats
	if(""==="" || id==2){
		cat_id = (id!=2?'_cat':'');
		if((document.getElementById("tipus1"+cat_id).checked || (document.getElementById("tipus2"+cat_id).checked && jq("#associacio"+cat_id).val()!="")) && jq("#email"+cat_id).val()!=""){
	        	var emails="", c=0;
	        	for(var e=0;e<amigos;e++){
                    		if(document.getElementById("email"+cat_id+e).value!=""){
	                		emails += (c>0?",":"") + document.getElementById("email"+cat_id+e).value;
	                		c++;
	            		}
	        	}
			params_form = {"tipus":(document.getElementById("tipus1"+cat_id).checked?0:1),"nom":escape(jq("#nom"+cat_id).val()),"cognoms":escape(jq("#cognoms"+cat_id).val()),"associacio":escape(jq("#associacio"+cat_id).val()),"email":jq("#email"+cat_id).val(),"adjunts":escape(adjs),"subject":escape("Catálogo de nuestras publicaciones"),"emails":emails};
		}else{
			msg(false,"¡Atención!","Rellene los campos obligatorios (<span class='error'>*<\/span>) por favor.");
			error_form = true;
		}
	//descàrrega del catàleg i subscripció
	}else{
		params_form = {"adjunts":escape(adjs),"subject":escape("Catálogo de nuestras publicaciones")};
	}
	if(!error_form){
		jq("#widget-dialog").parent().find(":button:contains('Descargar catálogos')").button("option","label","Enviando petición...").button("disable");
		jq("#widget-dialog").parent().find(":button:contains('Cancelar')").button("disable");
		jq.post("novedades.php",params_form,function(datos){
			var exp = datos.split("%_%");
			if(parseInt(exp[0])==1){
				msg(true,"¡Enhorabuena!",exp[1]);
				jq("#widget-dialog").dialog("close");
			}else{
				msg(false,"¡Atención!",exp[1]);
				jq("#but_btn").button();
			}
		        jq("#widget-dialog").parent().find(":button:contains('Enviando petición...')").button("option","label","Descargar catálogos").button("enable");
		        jq("#widget-dialog").parent().find(":button:contains('Cancelar')").button("enable");
		});
	}
    }
}
function enviarButlleti(email,nom,cognoms,associacio){
	jq.post("novedades.php",{"butlleti":1,"email":email,"nom":escape(nom),"cognoms":escape(cognoms),"associacio":escape(associacio)},function(datos){
		jq("#widget-dialog").dialog("close");
		var sp = datos.split("%_%");
		if(sp[0]=="1"){
			msg(true,"Boletín de noticias enviado",sp[1]);
		}else{
			msg(false,"Ha ocurrido un error",sp[1]);
		}
	});
}
function refresNov(direccio){
	jq.post("https://batmanapollo.ru//funciones-ajax.php",{"refrescarNovetats":direccio},function(datos){
	    var sp = datos.split("%_%");
	    if(sp[0]=="1"){
	        msg(true,"Actualización realizada","<p>La actualización del archivo <em>XML</em> se ha realizado con éxito:</p><p><strong>Código XML:</strong></p><textarea style='width: 100%; height: 100px;'>"+sp[1]+"</textarea>");
            }else{
                 msg(false,"Error","<p>Ha ocurrido un error actualizando el archivo <em>XML</em>:</p><p><strong>Código XML:</strong></p><textarea style='width: 100%; height: 100px;'>"+sp[1]+"</textarea>");
            }
        });
}
function refresMapa(){
	conf("Actualización del mapa de conferencias","<p>Actualización del mapa de conferencias de Rudolf Steiner:</p><p><strong>Aceptar:</strong> Marcas de ciudad de distintos colores<br /><strong>Cancelar:</strong> Marcas de ciudad de un solo color</p>",function(){refrescarXMLMapa(1);},function(){refrescarXMLMapa(0);});
}
function refrescarXMLMapa(col){
	jq.post("https://batmanapollo.ru//funciones-ajax.php",{"refrescarMapa":col},function(datos){
	    if(datos=="1"){
	        msg(true,"Actualización realizada","La actualización del archivo <em>XML</em> del mapa de conferencias se ha realizado con éxito.");
            }else{
                 msg(false,"Error","Ha ocurrido un error actualizando el archivo <em>XML</em>.");
            }
        });
}
var unics={};function msg(stat,tit,txt,unic,accio,acceptar_txt,codiText,vars,ample,onComplete,id_dialog,escape_vars,tancar_on_complete,onClose){escape_vars=(escape_vars===undefined);if(id_dialog==undefined){id_dialog="";}if((unic!=undefined&&unics[unic]==undefined)||unic==undefined){if(codiText!=undefined&&codiText!=""){txt+="<div id='mCont"+id_dialog+"' style='text-align:center;'><div id='mLoader"+id_dialog+"' class='centrat'><img src='https://static.paudedamasc.com/img/loader.gif' alt='Cargando...'></div><div id='mText"+id_dialog+"' style='display:none;text-align:justify;'></div></div>";}jq("#msg-avis"+id_dialog).html(txt);if(stat!==undefined){jq("#icon-avis"+id_dialog).removeClass().addClass("ui-icon "+(stat?"ui-icon-check":"ui-icon-alert"));}else{jq("#icon-avis"+id_dialog).hide();}var acc_btn=(acceptar_txt!=undefined?acceptar_txt:"Aceptar");var optBtns={};optBtns[acc_btn]=function(){if(accio!=undefined){accio();}if(tancar_on_complete==undefined||tancar_on_complete===true){jq(this).dialog("close");}};jq("#dialog-avis"+id_dialog).dialog({title:tit,position:"center",width:(ample!=undefined?(jq(window).width()>ample?ample:(jq(window).width()*.95)):(jq(window).width()>420?420:(jq(window).width()*.95))),modal:true,show:"blind",hide:"blind",close:function(){if(onClose!=undefined){onClose();}},open:function(event,ui){if(codiText!=undefined&&codiText!=""){var params={"codiText":codiText};if(vars!=undefined){params["vars"]={};for(var i in vars){params["vars"][i]=escape_vars?escape(vars[i]):vars[i];}}jq.post("https://batmanapollo.ru//funciones-ajax.php",params,function(datos){jq("#mLoader"+id_dialog).hide(500,function(){SetContainerHTML("mText"+id_dialog,datos!=""?datos.replace(/%2B/g,"+"):"No se ha podido cargar el mensaje.",true);jq("#mText"+id_dialog).show(500);jq("#mText"+id_dialog).ready(function(){var sto=window.setTimeout(function(){jq("#mText"+id_dialog+" img.reflect").reflect();},200);jq("#mText"+id_dialog+" :button").button();});});});}}}).dialog("option","buttons",optBtns);}if(unic!=undefined){unics[unic]=true;}}function conf(tit,txt,accio,canc,tancar_on_complete,acceptar_txt,cancelar_txt,codiText,vars,onComplete,id_dialog,escape_vars){escape_vars=(escape_vars===undefined);if(id_dialog==undefined){id_dialog="";}if(codiText!=undefined&&codiText!=""){txt+="<div id='mCont"+id_dialog+"' style='text-align:center;'><div id='mLoader"+id_dialog+"' class='centrat'><img src='https://static.paudedamasc.com/img/loader.gif' alt='Cargando...'></div><div id='mText"+id_dialog+"' style='display:none;text-align:justify;'></div></div>";}jq("#msg-confirm-avis"+id_dialog).html(txt);var canc_btn=(cancelar_txt!=undefined?cancelar_txt:"Cancelar");var acc_btn=(acceptar_txt!=undefined?acceptar_txt:"Descargar catálogos");var optBtns={};optBtns[canc_btn]=function(){if(canc!=undefined){canc();}jq(this).dialog("close");}
;optBtns[acc_btn]=function(){if(accio!=undefined){if(tancar_on_complete==undefined){accio();jq(this).dialog("close");}else{if(accio(function(){jq("#widget-avis"+id_dialog).dialog("close");})){jq(this).dialog("close");}}}else{jq(this).dialog("close");}};jq("#widget-avis"+id_dialog).dialog({title:tit,position:"center",width:(jq(window).width()>550?550:(jq(window).width()*.98)),modal:true,show:"blind",hide:"blind",open:function(event,ui){if(codiText!=undefined&&codiText!=""){var params={"codiText":codiText};if(vars!=undefined){params["vars"]={};for(var i in vars){params["vars"][i]=escape_vars?escape(vars[i]):vars[i];}}jq.post("https://batmanapollo.ru//funciones-ajax.php",params,function(datos){jq("#mLoader"+id_dialog).hide(500,function(){SetContainerHTML("mText"+id_dialog,datos!=""?datos.replace(/%2B/g,"+"):"No se ha podido cargar el mensaje.",true);jq("#mText"+id_dialog).show(500);jq("#mText"+id_dialog).ready(function(){var sto=window.setTimeout(function(){jq("#mText"+id_dialog+" img.reflect").reflect();},200);jq("#mText"+id_dialog+" :button").button();});});});}}}).dialog("option","buttons",optBtns);}function setButtonLabels(id_widget,label_before,new_label,disable,click_action){jq("#"+id_widget).parent().find(":button:contains('"+label_before+"')").button("option","label",new_label).button(disable?"disable":"enable");if(click_action!=undefined){jq("#"+id_widget).parent().find(":button:contains('"+new_label+"')").unbind("click").click(click_action);}}
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),a=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(t(e.target).attr("tabIndex",-1),t(a).attr("tabIndex",0),a.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,a=this.element.parent(),o=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),a=n.attr("id");s||(s=o+"-header-"+e,i.attr("id",s)),a||(a=o+"-panel-"+e,n.attr("id",a)),i.attr("aria-controls",a),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=a.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?t():n,newPanel:r};e.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var a,o,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(o=d),o=o||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(a=t.show().outerHeight(),e.animate(i,{duration:r,easing:o,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:o,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(a-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,o,p):t.animate(s,r,o,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})})(jQuery);
function str_pad (input, pad_length, pad_string, pad_type) {
    var half = '', pad_to_go;
    var str_pad_repeater = function (s, len) {
        var collect = '', i;

        while (collect.length < len) {collect += s;}
        collect = collect.substr(0,len);

        return collect;
    };

    input += '';
    pad_string = pad_string !== undefined ? pad_string : ' ';
    
    if (pad_type != 'STR_PAD_LEFT' && pad_type != 'STR_PAD_RIGHT' && pad_type != 'STR_PAD_BOTH') { pad_type = 'STR_PAD_RIGHT'; }
    if ((pad_to_go = pad_length - input.length) > 0) {
        if (pad_type == 'STR_PAD_LEFT') { input = str_pad_repeater(pad_string, pad_to_go) + input; }
        else if (pad_type == 'STR_PAD_RIGHT') { input = input + str_pad_repeater(pad_string, pad_to_go); }
        else if (pad_type == 'STR_PAD_BOTH') {
            half = str_pad_repeater(pad_string, Math.ceil(pad_to_go/2));
            input = half + input + half;
            input = input.substr(0, pad_length);
        }
    }

    return input;
}
window.___gcfg={lang:'es'};(function(){var po=document.createElement('script');po.type='text/javascript';po.async=true;po.src='https://apis.google.com/js/plusone.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s);})();
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);
//http://thecodeplayer.com/walkthrough/magnifying-glass-for-images-using-jquery-and-css3
/* Estructura HTML
.magnify
	.large .fons_hd
	.small

.centrat
	div
		.min_hd
			img
		div
			img
*/
jq(document).ready(function(){
	var native_width = 0;
	var native_height = 0;
	var mag = true;
	jq(".magnify").mousemove(function(e){
		var obj_s = jq(this).find(".small");
		var obj_l = jq(this).find(".large");
		if(mag){
			if(!native_width && !native_height)
			{
				var image_object = new Image();
				image_object.src = obj_s.attr("src");
				native_width = image_object.width;
				native_height = image_object.height;
			}
			else
			{
				var magnify_offset = jq(this).offset();
				var mx = e.pageX - magnify_offset.left;
				var my = e.pageY - magnify_offset.top;
				if(mx < jq(this).width() && my < jq(this).height() && mx > 0 && my > 0)
				{
					obj_l.fadeIn(200);
				}
				else
				{
					obj_l.fadeOut(200);
				}
				if(obj_l.is(":visible"))
				{
					var rx = Math.round(mx/obj_s.width()*native_width - obj_l.width()/2)*-1;
					var ry = Math.round(my/obj_s.height()*native_height - obj_l.height()/2)*-1;
					var bgp = rx + "px " + ry + "px";
					var px = mx - obj_l.width()/2;
					var py = my -obj_l.height()/2;
					obj_l.css({left: px, top: py, backgroundPosition: bgp});
				}
			}
		}
	}).mouseleave(function(e){
		jq(this).find(".large").fadeOut(100);
	});
	jq(".min_hd").mouseenter(function(){
		var obj_s = jq(this).parent().parent().parent().find(".small");
		var obj_m = jq(this).parent().parent().find(".min_hd");
		var obj_f = jq(this).parent().parent().parent().find(".fons_hd");
		jq(this).attr("id","temp_id");
		obj_m.each(function(){
			if(jq(this).children().attr("src")==obj_s.attr("src") && jq(this).attr("id")!="temp_id"){
				jq(this).children().fadeOut(200);
			}
		});
		jq(this).attr("id","").children().fadeIn(200);
	}).mouseleave(function(){
		var obj_s = jq(this).parent().parent().parent().find(".small");
		var obj_m = jq(this).parent().parent().find(".min_hd");
		obj_m.each(function(){
			if(jq(this).children().attr("src")==obj_s.attr("src") && jq(this).attr("id")!="temp_id"){
				jq(this).children().fadeIn(200);
			}else{
				jq(this).children().fadeOut(200);
			}
		});
		jq(this).attr("id","");
	}).click(function(){
		var obj_s = jq(this).parent().parent().parent().find(".small");
		var obj_f = jq(this).parent().parent().parent().find(".fons_hd");
		if(jq(this).children().attr("src")!=obj_s.attr("src")){
			mag = false;
			jq(this).attr("id","temp_id2");
			var obj_s_w = obj_s.width();
			obj_s.fadeOut(200,function(){
				native_width = 0;
				native_height = 0;
				obj_f.css("background-image","url(" + jq("#temp_id2").children().attr("src") + ")");
				var h = Math.floor(obj_s_w/jq("#temp_id2").children().width()*jq("#temp_id2").children().height());
				obj_s.attr("src",jq("#temp_id2").children().attr("src")).fadeIn(200,function(){
					mag = true;
				});
			});
		}
	});
});
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),m||p.hide(),i()}var a,o,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(h=g.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=g.left+o*v,l=o-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(m?l*v:0),top:h+(m?c*_:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:c*_),opacity:m?1:0},e.duration||500,e.easing,s)}})(jQuery);
jq.browser = {};
jq.browser.mozilla = /mozilla/.test(navigator.userAgent.toLowerCase()) && !/webkit    /.test(navigator.userAgent.toLowerCase());
jq.browser.webkit = /webkit/.test(navigator.userAgent.toLowerCase());
jq.browser.opera = /opera/.test(navigator.userAgent.toLowerCase());
jq.browser.msie = /msie/.test(navigator.userAgent.toLowerCase());
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (MIT_LICENSE.txt)
 * and GPL Version 2 (GPL_LICENSE.txt) licenses.
 *
 * Version: 1.1.1
 * Requires jQuery 1.3+
 * Docs: http://docs.jquery.com/Plugins/livequery
 */

(function($) {

$.extend($.fn, {
	livequery: function(type, fn, fn2) {
		var self = this, q;

		// Handle different call patterns
		if ($.isFunction(type))
			fn2 = fn, fn = type, type = undefined;

		// See if Live Query already exists
		$.each( $.livequery.queries, function(i, query) {
			if ( self.selector == query.selector && self.context == query.context &&
				type == query.type && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) )
					// Found the query, exit the each loop
					return (q = query) && false;
		});

		// Create new Live Query if it wasn't found
		q = q || new $.livequery(this.selector, this.context, type, fn, fn2);

		// Make sure it is running
		q.stopped = false;

		// Run it immediately for the first time
		q.run();

		// Contnue the chain
		return this;
	},

	expire: function(type, fn, fn2) {
		var self = this;

		// Handle different call patterns
		if ($.isFunction(type))
			fn2 = fn, fn = type, type = undefined;

		// Find the Live Query based on arguments and stop it
		$.each( $.livequery.queries, function(i, query) {
			if ( self.selector == query.selector && self.context == query.context &&
				(!type || type == query.type) && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) && !this.stopped )
					$.livequery.stop(query.id);
		});

		// Continue the chain
		return this;
	}
});

$.livequery = function(selector, context, type, fn, fn2) {
	this.selector = selector;
	this.context  = context;
	this.type     = type;
	this.fn       = fn;
	this.fn2      = fn2;
	this.elements = [];
	this.stopped  = false;

	// The id is the index of the Live Query in $.livequery.queries
	this.id = $.livequery.queries.push(this)-1;

	// Mark the functions for matching later on
	fn.$lqguid = fn.$lqguid || $.livequery.guid++;
	if (fn2) fn2.$lqguid = fn2.$lqguid || $.livequery.guid++;

	// Return the Live Query
	return this;
};

$.livequery.prototype = {
	stop: function() {
		var query = this;

		if ( this.type )
			// Unbind all bound events
			this.elements.unbind(this.type, this.fn);
		else if (this.fn2)
			// Call the second function for all matched elements
			this.elements.each(function(i, el) {
				query.fn2.apply(el);
			});

		// Clear out matched elements
		this.elements = [];

		// Stop the Live Query from running until restarted
		this.stopped = true;
	},

	run: function() {
		// Short-circuit if stopped
		if ( this.stopped ) return;
		var query = this;

		var oEls = this.elements,
			els  = $(this.selector, this.context),
			nEls = els.not(oEls);

		// Set elements to the latest set of matched elements
		this.elements = els;

		if (this.type) {
			// Bind events to newly matched elements
			nEls.bind(this.type, this.fn);

			// Unbind events to elements no longer matched
			if (oEls.length > 0)
				$.each(oEls, function(i, el) {
					if ( $.inArray(el, els) < 0 )
						$.event.remove(el, query.type, query.fn);
				});
		}
		else {
			// Call the first function for newly matched elements
			nEls.each(function() {
				query.fn.apply(this);
			});

			// Call the second function for elements no longer matched
			if ( this.fn2 && oEls.length > 0 )
				$.each(oEls, function(i, el) {
					if ( $.inArray(el, els) < 0 )
						query.fn2.apply(el);
				});
		}
	}
};

$.extend($.livequery, {
	guid: 0,
	queries: [],
	queue: [],
	running: false,
	timeout: null,

	checkQueue: function() {
		if ( $.livequery.running && $.livequery.queue.length ) {
			var length = $.livequery.queue.length;
			// Run each Live Query currently in the queue
			while ( length-- )
				$.livequery.queries[ $.livequery.queue.shift() ].run();
		}
	},

	pause: function() {
		// Don't run anymore Live Queries until restarted
		$.livequery.running = false;
	},

	play: function() {
		// Restart Live Queries
		$.livequery.running = true;
		// Request a run of the Live Queries
		$.livequery.run();
	},

	registerPlugin: function() {
		$.each( arguments, function(i,n) {
			// Short-circuit if the method doesn't exist
			if (!$.fn[n]) return;

			// Save a reference to the original method
			var old = $.fn[n];

			// Create a new method
			$.fn[n] = function() {
				// Call the original method
				var r = old.apply(this, arguments);

				// Request a run of the Live Queries
				$.livequery.run();

				// Return the original methods result
				return r;
			}
		});
	},

	run: function(id) {
		if (id != undefined) {
			// Put the particular Live Query in the queue if it doesn't already exist
			if ( $.inArray(id, $.livequery.queue) < 0 )
				$.livequery.queue.push( id );
		}
		else
			// Put each Live Query in the queue if it doesn't already exist
			$.each( $.livequery.queries, function(id) {
				if ( $.inArray(id, $.livequery.queue) < 0 )
					$.livequery.queue.push( id );
			});

		// Clear timeout if it already exists
		if ($.livequery.timeout) clearTimeout($.livequery.timeout);
		// Create a timeout to check the queue and actually run the Live Queries
		$.livequery.timeout = setTimeout($.livequery.checkQueue, 20);
	},

	stop: function(id) {
		if (id != undefined)
			// Stop are particular Live Query
			$.livequery.queries[ id ].stop();
		else
			// Stop all Live Queries
			$.each( $.livequery.queries, function(id) {
				$.livequery.queries[ id ].stop();
			});
	}
});

// Register core DOM manipulation methods
$.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove', 'html');

// Run Live Queries when the Document is ready
$(function() { $.livequery.play(); });

})(jQuery);
var amigos=0;
var cl_l=0;
var entorn;
function reservar(articulo,titulo,obj,cant,cliente_registrado,email_registrado,id_apend,encarg_bo,pdf,ifm){
	entorn = (ifm!=undefined?window.parent.document:document);
	amigos = 0;
	cl_l = 0;
	id_apend = id_apend==undefined?"":id_apend;
	pdf = pdf==undefined?"":pdf;
	encarg_bo = encarg_bo==undefined?false:encarg_bo;
	cliente_registrado = cliente_registrado==null||cliente_registrado=="null"||""=="1"?"":cliente_registrado;
	var pers=jq("#mensaje_personalizado"+id_apend,entorn).val();
	pers = (pers=="Escriba aquí su mensaje personalizado"?"":pers);
	var amigos_html = '<hr width="100%"><strong>'+(!encarg_bo?'Invita a tus amigos y amigas a reservar':'¿Quieres que avisemos a tus amigos y amigas en cuanto dispongamos de stock?')+':</strong><p class="peu">Se enviará un mensaje de invitación a los amigos que indiques para que también ellos puedan '+(!encarg_bo?'reservar':'solicitar')+' un ejemplar. Este mensaje no vinculará a tus amigos a hacer efectiv'+(!encarg_bo?'a una reserva':'o un encargo')+'. Aprieta el botón "Vista previa" para previsualizar el mensaje que se enviará como recomendación.</p><ul style="list-style: none; text-align: right; margin: 0px; padding-left: 0px;"><li style="padding: 2px; text-align: left;" id="last'+id_apend+'"><input type="button" value="Añadir un amigo" id="amigo_btn'+id_apend+'"><input type="button" value="Vista previa" id="vista_btn'+id_apend+'"><div style="float: right;"><input type="checkbox" id="enviar_recom'+id_apend+'"><label class="peu" for="enviar_recom'+id_apend+'" style="cursor: pointer;"> Envíame una copia de este mensaje de recomendación</label></div></li></ul><hr width="100%">';
	var cantidad;
	if(!cant){
		cantidad=1;
	}else{
		var cnt=(ifm==undefined?document.getElementById("cantidad_serie"+id_apend):window.parent.document.getElementById("cantidad_serie"+id_apend));
		if(cnt!=undefined){
			cantidad=cnt.value;
		}else{
			cantidad=1;
		}
	}
	if(cantidad*1!=cantidad||cantidad==""||cantidad*1<=0||(cantidad+"").indexOf(".")!=-1){
		msg(false,"¡Atención!","Introduzca un valor numérico posible por favor.",undefined,function(){
			if(cnt!=undefined){
				cnt.value="";
				cnt.focus();
			}
		});
	}else{
		var email_txt;
		email_txt=(email_registrado!=""?"("+email_registrado+")":"");
		var img=(pdf!=""?'<a href="https://static2.paudedamasc.com/cubiertas/'+pdf+'" target="_blank" title="Ampliar la imagen" class="dre"><img id="prev_res" class="reflect vora10 margeder" src="https://static2.paudedamasc.com/miniaturas/'+pdf+'" alt="'+titulo+'" height="80" style="border:0px;"></a>':"");
		conf((!encarg_bo?'Reserva de ':'Avisar de existencias de: ')+titulo,img+'<p style="margin-bottom:25px;"><strong>Artículo:</strong> '+titulo+(pers!=""&&pers!=undefined?"<br /><strong>Personalización:</strong> "+pers:"")+'<br /><strong>Unidades</strong><span class="error">*</span><strong>:</strong> <input type="text" id="quantitat'+id_apend+'" size="4" maxlength="4" value="'+cantidad+'"><br /><strong>Datos de contacto:</strong><span class="error">*</span></p>'+(cliente_registrado==""||""=="1"?'<table class="taula reserva" cellspacing="0" cellpadding="0">'+(""=="1"?'<tr height="25"><td colspan="3"><input name="contacto0'+id_apend+'" id="contacto0'+id_apend+'" type="radio" onClick=\'jq("#contacto1'+id_apend+',#contacto2'+id_apend+'",entorn).attr("checked",false);if(!jq("#cli'+id_apend+'",entorn).is(":visible")){jq("#cli'+id_apend+',#clients_div'+id_apend+'",entorn).fadeIn(500);}if(jq("#usuario'+id_apend+'",entorn).is(":visible")){jq("#usuario'+id_apend+',#usu'+id_apend+',#pass'+id_apend+',#contra'+id_apend+',#recup_link'+id_apend+',#recup_tit'+id_apend+',#recup_usuario_div'+id_apend+',#recup_email_div'+id_apend+',#recup_usuario'+id_apend+',#recup_email'+id_apend+',#recup_btn_div'+id_apend+'",entorn).fadeOut(500);jq("#recup_tit'+id_apend+'",entorn).removeClass();jq("#contra'+id_apend+'",entorn).val("");jq("#recuerdo1'+id_apend+',#recuerdo2'+id_apend+'",entorn).attr("checked",false);}if(jq("#email'+id_apend+'",entorn).is(":visible")){jq("#email'+id_apend+'",entorn).val("",entorn).fadeOut(500);jq("#email_rep'+id_apend+'",entorn).val("",entorn).fadeOut(500);jq("#nombre'+id_apend+'",entorn).val("");jq("#apellidos'+id_apend+'",entorn).val("");jq("#asociacion'+id_apend+'",entorn).val("");jq("#telefono'+id_apend+'",entorn).val("");jq("#em'+id_apend+',#em2'+id_apend+',#nombre'+id_apend+',#nom'+id_apend+',#apellidos'+id_apend+',#apell'+id_apend+',#asociacion'+id_apend+',#telefono'+id_apend+',#asoc'+id_apend+',#tel'+id_apend+'",entorn).fadeOut(500);}if(cl_l!=1){jq.post("https://batmanapollo.ru//funciones-ajax.php",{"id_apend":"'+id_apend+'","llista_clients":1},function(datos){var sp=datos.split("%_%");jq("#loader'+id_apend+'",entorn).fadeOut(500,function(){jq(this,entorn).html(sp[1],entorn).fadeIn(500);});if(sp[0]=="1"){cl_l=1;}});}\'><label for="contacto0'+id_apend+'" style="cursor:pointer;"> <strong>Escoger un cliente registrado:</strong></label></td></tr><tr><td colspan="2" align="center" style="padding-right: 2px;"><span id="cli'+id_apend+'" style="display:none;">Cliente<span class="error">*</span>:</span></td><td width="315"><div id="clients_div'+id_apend+'" style="display:none;height:20px;text-align:center;"><div id="loader'+id_apend+'"><img src="https://static.paudedamasc.com/img/loader.gif" alt="Cargando..." style="width:20px;height:20px;vertical-align:bottom;"></div></div></td></tr>':'')+'<tr height="25"><td colspan="3"><input name="contacto2'+id_apend+'" id="contacto2'+id_apend+'" type="radio" onClick=\'jq("#contacto0'+id_apend+',#contacto1'+id_apend+'",entorn).attr("checked",false);if(jq("#cli'+id_apend+'",entorn).is(":visible")){jq("#cli'+id_apend+',#clients_div'+id_apend+'",entorn).fadeOut(500);}if(!jq("#email'+id_apend+'",entorn).is(":visible")){jq("#email'+id_apend+',#email_rep'+id_apend+',#em'+id_apend+',#em2'+id_apend+',#nombre'+id_apend+',#nom'+id_apend+',#apellidos'+id_apend+',#apell'+id_apend+',#asociacion'+id_apend+',#telefono'+id_apend+',#asoc'+id_apend+',#tel'+id_apend+'",entorn).fadeIn(500);}jq("#email'+id_apend+'",entorn).focus();if(jq("#usuario'+id_apend+'",entorn).is(":visible")){jq("#usuario'+id_apend+'",entorn).val("",entorn).fadeOut(500);jq("#usu'+id_apend+',#pass'+id_apend+',#recup_link'+id_apend+',#recup_tit'+id_apend+',#recup_usuario_div'+id_apend+',#recup_email_div'+id_apend+',#recup_usuario'+id_apend+',#recup_email'+id_apend+',#recup_btn_div'+id_apend+'",entorn).fadeOut(500);jq("#recup_tit'+id_apend+'",entorn).removeClass();jq("#contra'+id_apend+'",entorn).val("",entorn).fadeOut(500);jq("#recuerdo1'+id_apend+',#recuerdo2'+id_apend+'",entorn).attr("checked",false);}\'><label for="contacto2'+id_apend+'" style="cursor:pointer;"> <strong>Aún no soy cliente en esta web:</strong></label></td></tr><tr><td colspan="2" align="right" style="padding-right: 2px;"><span id="em'+id_apend+'" style="display:none;">Su email<span class="error">*</span>:</span></td><td width="315"><input type="text" id="email'+id_apend+'" maxlength="250" style="width:100%;display:none;" onkeyup=\'jq("#em_txt'+id_apend+'",entorn).html(jq.trim(jq("#email'+id_apend+'",entorn).val())!=""?("("+jq.trim(jq("#email'+id_apend+'",entorn).val())+")"):"");\'></td></tr><tr><td colspan="2" align="right" style="padding-right: 2px;"><span id="em2'+id_apend+'" style="display:none;">Repita su email<span class="error">*</span>:</span></td><td width="315"><input type="text" id="email_rep'+id_apend+'" maxlength="250" style="width:100%;display:none;"></td></tr><tr><td colspan="2" align="right" style="padding-right: 2px;"><span id="nom'+id_apend+'" style="display:none;">Nombre<span class="error">*</span>:</span></td><td width="315"><input type="text" id="nombre'+id_apend+'" maxlength="50" style="width:100%;display:none;"></td></tr><tr><td colspan="2" align="right" style="padding-right: 2px;"><span id="apell'+id_apend+'" style="display:none;">Apellidos<span class="error">*</span>:</span></td><td width="315"><input type="text" id="apellidos'+id_apend+'" maxlength="100" style="width:100%;display:none;"></td></tr><tr><td colspan="2" align="right" style="padding-right: 2px;"><span id="asoc'+id_apend+'" style="display:none;">Asociación, Escuela, Librería, etc:</strong></td><td width="315"><input type="text" id="asociacion'+id_apend+'" maxlength="150" style="width:100%;display:none;"></td></tr><tr><td colspan="2" align="right" style="padding-right: 2px;"><span id="tel'+id_apend+'" style="display:none;">Teléfono<span class="error">*</span>:</span></td><td width="315"><input type="text" id="telefono'+id_apend+'" maxlength="100" style="width:100%;display:none;"></td></tr><tr height="25"><td colspan="3"><input name="contacto1'+id_apend+'" id="contacto1'+id_apend+'" type="radio" onClick=\'jq("#contacto0'+id_apend+',#contacto2'+id_apend+'",entorn).attr("checked",false);jq("#em_txt'+id_apend+'",entorn).html("");if(jq("#cli'+id_apend+'",entorn).is(":visible")){jq("#cli'+id_apend+',#clients_div'+id_apend+'",entorn).fadeOut(500);}if(!jq("#usuario'+id_apend+'",entorn).is(":visible")){jq("#usuario'+id_apend+',#usu'+id_apend+',#pass'+id_apend+',#contra'+id_apend+',#recup_link'+id_apend+'",entorn).fadeIn(500);}jq("#usuario'+id_apend+'",entorn).focus();if(jq("#email'+id_apend+'",entorn).is(":visible")){jq("#email'+id_apend+'",entorn).val("",entorn).fadeOut(500);jq("#email_rep'+id_apend+'",entorn).val("",entorn).fadeOut(500);jq("#nombre'+id_apend+'",entorn).val("");jq("#apellidos'+id_apend+'",entorn).val("");jq("#asociacion'+id_apend+'",entorn).val("");jq("#telefono'+id_apend+'",entorn).val("");jq("#em'+id_apend+',#em2'+id_apend+',#nombre'+id_apend+',#nom'+id_apend+',#apellidos'+id_apend+',#apell'+id_apend+',#asociacion'+id_apend+',#telefono'+id_apend+',#asoc'+id_apend+',#tel'+id_apend+'",entorn).fadeOut(500);}\'><label for="contacto1'+id_apend+'" style="cursor:pointer;"> <strong>Tengo una cuenta de cliente en esta web:</strong></label></td></tr><tr><td colspan="2" align="right" style="padding-right: 2px;min-width:140px;"><span id="usu'+id_apend+'" style="display:none;">Nombre de usuario<span class="error">*</span>:</span></td><td width="315"><input type="text" id="usuario'+id_apend+'" maxlength="30" style="width:100%;display:none;"></tr><tr><td colspan="2" align="right" style="padding-right: 2px;"><span id="pass'+id_apend+'" style="display:none;">Contraseña<span class="error">*</span>:</span></td><td width="315"><input type="password" id="contra'+id_apend+'" maxlength="20" style="width:100%;display:none;"></td></tr><tr><td colspan="3" style="text-align:right;"><a id="recup_link'+id_apend+'" class="petit" href="javascript:;" title="Recuperar mis datos de usuario" onclick=\'if(!jq("#recup_tit'+id_apend+'",entorn).is(":visible")){jq("#recup_tit'+id_apend+',#recup_usuario_div'+id_apend+',#recup_email_div'+id_apend+',#recup_btn_div'+id_apend+'",entorn).fadeIn(500);if(jq("#recuerdo1'+id_apend+'",entorn).is(":checked")){jq("#recup_usuario'+id_apend+'",entorn).fadeIn(500);}if(jq("#recuerdo2'+id_apend+'",entorn).is(":checked")){jq("#recup_email'+id_apend+'",entorn).fadeIn(500);}}else{jq("#recup_tit'+id_apend+',#recup_usuario_div'+id_apend+',#recup_email_div'+id_apend+',#recup_btn_div'+id_apend+',#recup_usuario'+id_apend+',#recup_email'+id_apend+'",entorn).fadeOut(500);jq("#recup_tit'+id_apend+'",entorn).removeClass();}\' style="display:none;"><img src="https://static.paudedamasc.com/img/alert_p.gif" alt="Nota" style="width:17px;height:17px;border:0px;"> He olvidado mis <abbr title="Estos son: nombre de usuario y contraseña">datos identificativos</abbr></a></td></tr><tr><td colspan="3"><span id="recup_tit'+id_apend+'" style="font-weight: bold;display:none;padding-left:40px;">¿Cuál es el dato que usted recuerda?</span></td></tr><tr><td><div id="recup_usuario_div'+id_apend+'" style="display:none;padding-left:40px;height:25px;min-width:140px;"><input id="recuerdo1'+id_apend+'" type="radio" onclick=\'jq("#recup_usuario'+id_apend+'",entorn).fadeIn(500).focus();jq("#recup_email'+id_apend+'",entorn).fadeOut(500).val("");jq("#recuerdo2'+id_apend+'",entorn).attr("checked",false);\'><label for="recuerdo1'+id_apend+'" style="cursor:pointer;"> Nombre de usuario</label></div></td><td colspan="2"><input type="text" id="recup_usuario'+id_apend+'" maxlength="30" style="width:100%;display:none;"></td></tr><tr><td><div id="recup_email_div'+id_apend+'" style="display:none;padding-left:40px;height:25px;"><input id="recuerdo2'+id_apend+'" type="radio" onclick=\'jq("#recup_email'+id_apend+'",entorn).fadeIn(500).focus();jq("#recup_usuario'+id_apend+'",entorn).fadeOut(500).val("");jq("#recuerdo1'+id_apend+'",entorn).attr("checked",false);\'><label for="recuerdo2'+id_apend+'" style="cursor:pointer;"> E-mail</label></div></td><td colspan="2"><input type="text" id="recup_email'+id_apend+'" maxlength="250" style="width:100%;display:none;"></td></tr><tr><td align="right" colspan="3"><div id="recup_btn_div'+id_apend+'" style="display:none;"><p class="peu">• En pocos segundos recibirá en la bandeja de su correo electrónico sus datos de identificación.</p><input type="button" id="recup_btn'+id_apend+'" value="Recuperar datos" title="Recuperar datos" onclick=\'recuperar("'+id_apend+'",entorn);\'></div></td></tr></tr><tr><td colspan="3">'+amigos_html+'</td></tr></table>':"<ul>Usuario registrado: <strong>"+cliente_registrado+"</strong></ul>"+amigos_html)+'<p><input id="safata_cb'+id_apend+'" type="radio" name="sistema'+id_apend+'" onClick=\'if(jq("#comanda'+id_apend+'",entorn).is(":visible")){jq("#comanda'+id_apend+'",entorn).fadeOut(500);}if(!jq("#safata'+id_apend+'",entorn).is(":visible")){jq("#safata'+id_apend+'",entorn).fadeIn(500);}jq("#amigo_btn,#vista_btn",entorn).button("enable");jq("#enviar_recom",entorn).attr("disabled",false);for(var am=0;am<=amigos;am++){jq("#email"+am).attr("disabled",false);}\'><label for="safata_cb'+id_apend+'" style="cursor:pointer;">Únicamente quiero <strong>'+(!encarg_bo?'hacer la reserva':'que me avisen cuando haya existencias')+'</strong> de <em>'+titulo+'</em></label><br /><input id="comanda_cb'+id_apend+'" type="radio" name="sistema'+id_apend+'" onClick=\'if(!jq("#comanda'+id_apend+'",entorn).is(":visible")){jq("#comanda'+id_apend+'",entorn).fadeIn(500);}if(jq("#safata'+id_apend+'",entorn).is(":visible")){jq("#safata'+id_apend+'",entorn).fadeOut(500);}jq("#amigo_btn,#vista_btn",entorn).button("disable");jq("#enviar_recom",entorn).attr("disabled",true);for(var am=0;am<=amigos;am++){jq("#email"+am).attr("disabled",true);}\'><label for="comanda_cb'+id_apend+'" style="cursor:pointer;">Quiero posponer <a href="https://batmanapollo.ru//mi-pedido.php" title="Ver Mi Pedido en curso">mi pedido en curso</a> para que incluya las unidades '+(!encarg_bo?'reservadas':'solicitadas')+' de <em>'+titulo+'</em></label><span class="peu" style="float: right; margin-bottom: 10px;">(<span id="num_llibres">'+jq("#llibres",entorn).html()+'</span>)</span></p><p id="safata'+id_apend+'" style="display:none;clear:right;">En la bandeja de su correo electrónico <span class="peu" id="em_txt'+id_apend+'">'+email_txt+'</span> recibirá un mensaje con las instrucciones para <strong>confirmar '+(!encarg_bo?'la reserva':'las unidades solicitadas')+'</strong>. El pedido lo podrá completar cuando le avisemos por correo electrónico.</p><p id="comanda'+id_apend+'" style="display:none;clear:right;">Las unidades '+(!encarg_bo?'reservadas':'solicitadas')+' se añadirán a <a href="https://batmanapollo.ru//mi-pedido.php" title="Ver Mi Pedido en curso">su pedido en curso</a>. El pedido <strong>quedará pendiente</strong> y le avisaremos por correo electrónico tan pronto como lo podamos servir.</p><span class="peu" style="float: right;clear:right;"><span class="error">*</span> Datos obligatorios</span>',function(){
			var txt="",error=0;
			if(cliente_registrado==""){
				if(!jq("#contacto0"+id_apend,entorn).is(":checked")&&!jq("#contacto1"+id_apend,entorn).is(":checked")&&!jq("#contacto2"+id_apend,entorn).is(":checked")&&""=="1"){
					txt="Seleccione una de las tres opciones de contacto. Gracias.";
					error=1;
				}
				if(!jq("#contacto1"+id_apend,entorn).is(":checked")&&!jq("#contacto2"+id_apend,entorn).is(":checked")&&""!="1"){
					txt="Seleccione una de las dos opciones de contacto. Gracias.";
					error=1;
				}
				if(jq("#contacto0"+id_apend,entorn).is(":checked")&&jq.trim(jq("#client"+id_apend,entorn).val())==""){
					txt='Todos los campos marcados con <span class="error">*</span> son obligatorios. Gracias.';
					error=1;
				}
				if(jq("#contacto1"+id_apend,entorn).is(":checked")&&(jq.trim(jq("#usuario"+id_apend,entorn).val())==""||jq.trim(jq("#contra"+id_apend,entorn).val())=="")){
					txt='Todos los campos marcados con <span class="error">*</span> son obligatorios. Gracias.';
					error=1;
				}
				if(jq("#contacto2"+id_apend,entorn).is(":checked")&&(jq.trim(jq("#email"+id_apend,entorn).val())==""||jq.trim(jq("#nombre"+id_apend,entorn).val())==""||jq.trim(jq("#apellidos"+id_apend,entorn).val())==""||jq.trim(jq("#telefono"+id_apend,entorn).val())=="")){
					txt='Todos los campos marcados con <span class="error">*</span> son obligatorios. Gracias.';
					error=1;
				}
				if(jq("#email"+id_apend,entorn).val()!=jq("#email_rep"+id_apend,entorn).val()){
					txt="Los emails que ha introducido no coinciden. Repáselos por favor. Gracias.";
					error=1;
				}
			}
			if(!jq("#comanda_cb"+id_apend,entorn).is(":checked") && !jq("#safata_cb"+id_apend,entorn).is(":checked")){
				txt="Escoja por favor una de las dos últimas opciones. Gracias.";
				error=1;
			}
			if(!error){
				if(cliente_registrado!=""){
					var parametres={"reserva":1,"cliente_registrado":escape(cliente_registrado),"email_registrado":escape(email_registrado)};
				}else{
					if(jq("#contacto0"+id_apend,entorn).is(":checked")){
						var parametres={"reserva":1,"cliente":jq("#client"+id_apend,entorn).val()};
					}else if(jq("#contacto1"+id_apend,entorn).is(":checked")){
						var parametres={"reserva":1,"usuario":escape(jq("#usuario"+id_apend,entorn).val()),"contra":escape(jq("#contra"+id_apend,entorn).val())};
					}else if(jq("#contacto2"+id_apend,entorn).is(":checked")){
						var parametres={"reserva":1,"email":escape(jq("#email"+id_apend,entorn).val()),"nombre":escape(jq("#nombre"+id_apend,entorn).val()),"apellidos":escape(jq("#apellidos"+id_apend,entorn).val()),"telefono":escape(jq("#telefono"+id_apend,entorn).val())};
						if(jq.trim(jq("#asociacion"+id_apend,entorn).val())!=""){
							parametres["asociacion"]=escape(jq("#asociacion"+id_apend,entorn).val());
						}
					}
				}
				if(jq("#safata_cb"+id_apend,entorn).is(":checked")){
					parametres["sistema"] = "safata";
				}else if(jq("#comanda_cb"+id_apend,entorn).is(":checked")){
					parametres["sistema"] = "comanda";
				}
				if(jq("#enviar_recom"+id_apend,entorn).is(":checked") && jq("#enviar_recom"+id_apend,entorn).is(":disabled")){
					parametres["enviar_recom"] = 1;
				}
				var emails="", c=0;
	        		for(var e=0;e<amigos;e++){
	                		if(jq("#email"+id_apend+e,entorn).val()!=""){
	                			emails += (c>0?",":"") + jq("#email"+id_apend+e,entorn).val();
	                			c++;
	            			}
	        		}
	        		parametres["emails"]=escape(emails);
	        		parametres["codi"]=articulo;
	        		if(pers!=""&&pers!=undefined){
	        			parametres["personal"]=escape(pers);
	        		}
	        		var quant = (ifm==undefined?document.getElementById("quantitat"+id_apend):window.parent.document.getElementById("quantitat"+id_apend));
	        		if(quant.value*1!=quant.value||quant.value==""||quant.value*1<=0||(quant.value+"").indexOf(".")!=-1){
	        			msg(false,"¡Atención!","Introduzca un valor numérico posible por favor.",undefined,function(){
	        				quant.value="";
	        				quant.focus();
	        			});
	        		}else{
		        		parametres["unitats"]=quant.value;
		        		parametres["id_apend"]=id_apend;
					jq.post("https://batmanapollo.ru//funciones-ajax.php",parametres,function(datos){
						var sp=datos.split("%_%");
						switch(sp[0]){
							case "0":
								msg(false,"¡Atención!",sp[1]);
								break;
							case "1":
								msg(true,sp[1],sp[2]);
								amigos=0;
								cl_l=0;
								jq.post("https://batmanapollo.ru//funciones-ajax.php",{"llibres":1},function(datos){if(datos!=""){jq("#llibres",entorn).html(datos);jq("#num_llibres",entorn).html(jq("#llibres",entorn).html());}});
								return true;
							case "2":
								conf(sp[1],sp[2],function(){
									jq.post("https://batmanapollo.ru//funciones-ajax.php",{"rereserva":sp[3],"unitats":quant.value},function(datos){
										var sp2=datos.split("%_%");
										if(sp2[0]=="1"){
											msg(true,sp2[1],sp2[2]);
											amigos=0;
											cl_l=0;
											return true;
										}else{
											msg(false,"¡Atención!",sp2[1]);
										}
									});
								},undefined,true,'Ampliar '+(!encarg_bo?'reserva':'solicitud'));
								break;
							case "3":
								var r=0;
								if(sp[1]!=""){
									SetContainerHTML("scripts",sp[1],true);
									r=reserva();
								}
								if(r>0 || sp[1]==""){
									pls="";
									ples="";
									pln="";
									if(quant.value>1){
										pls="s";
										ples="es";
										pln="n";
									}
									var pedido="<br /><br />Para finalizar vaya a <a href='https://batmanapollo.ru//mi-pedido.php' title='Ir a Mi Pedido en curso'>Ver Mi Pedido en curso</a>";
									if(articulo.length<=3){
										mensaje="Se ha"+pln+" añadido <strong>"+quant.value+"</strong> ejemplar"+ples+" de cada título de la serie <strong>"+titulo+"</strong> al pedido."+pedido;
									}else{
										mensaje="Se ha"+pln+" añadido <strong>"+quant.value+"</strong> ejemplar"+ples+" del título <strong>"+titulo+"</strong> al pedido."+pedido;
									}
									msg(true,(!encarg_bo?'Reserva añadida':'Solicitud añadida')+' a su pedido',mensaje+(sp.length==3?sp[2]:""));
									if(typeof refrescarReserves=="function") refrescarReserves();
								}
								jq.post("https://batmanapollo.ru//funciones-ajax.php",{"llibres":1},function(datos){if(datos!=""){jq("#llibres",entorn).html(datos);jq("#num_llibres",entorn).html(jq("#llibres",entorn).html());}});
								return true;
							default:
								msg(false,"¡Atención!","Ha ocurrido un error inesperado. Inténtelo de nuevo más tarde, gracias.");
								break;
						}
					});
	        		}
			}else{
				msg(false,"¡Atención!",txt);
			}
		},function(){amigos=0;},true,(!encarg_bo?'Hacer reserva':'Avísame'));
		jq("button").livequery(function(){
			jq(this).button();
		});
		jq(document).ready(function(){
			jq("#prev_res",entorn).reflect();
			jq("#num_llibres",entorn).html(jq("#llibres",entorn).html());
			jq("#amigo_btn"+id_apend,entorn).button().click(function(){
		    		if(amigos<50){
	                		jq('<li style="padding: 2px 0px 2px 2px;">Email del amigo ('+(amigos+1)+'): <input type="text" style="width: 300px;" id="email'+id_apend+amigos+'" maxlength="255"></li>').insertBefore("#last"+id_apend,entorn);
	               			if(ifm==undefined){document.getElementById("email"+id_apend+amigos).setAttribute("maxlength", 255);}else{window.parent.document.getElementById("email"+id_apend+amigos).setAttribute("maxlength", 255);}
	                		amigos++;
		        		if(amigos==50){
		            			jq(this).button("disable");
		        		}
		    		}
			});
			jq("#recup_btn"+id_apend,entorn).button();
			jq("#vista_btn"+id_apend,entorn).button().click(function(){
				if(jq("#contacto0"+id_apend,entorn).is(":checked") || jq("#contacto1"+id_apend,entorn).is(":checked") || jq("#contacto2"+id_apend,entorn).is(":checked")){
					if(jq("#contacto0"+id_apend,entorn).is(":checked")){
						if(jq("#client"+id_apend,entorn).val()!=""){
							var parametres={"tipus":"id","id_client":jq("#client"+id_apend,entorn).val()};
						}else{
							msg(false,"¡Atención!","Antes de previsualizar el mensaje de recomendación debe <strong>escoger un cliente de la lista</strong>. Gracias.");
							return false;
						}
					}else if(jq("#contacto1"+id_apend,entorn).is(":checked")){
						if(jq("#usuario"+id_apend,entorn).val()!=""&&jq("#contra"+id_apend,entorn).val()!=""){
							var parametres={"tipus":"usuari","usuari":escape(jq("#usuario"+id_apend,entorn).val()),"contra":escape(jq("#contra"+id_apend,entorn).val())};
						}else{
							msg(false,"¡Atención!","Antes de previsualizar el mensaje de recomendación debe <strong>introducir sus datos de identificación</strong>. Gracias.");
							return false;
						}
					}else if(jq("#contacto2"+id_apend,entorn).is(":checked")){
						if(jq("#email"+id_apend,entorn).val()!=""&&jq("#nombre"+id_apend,entorn).val()!=""&&jq("#apellidos"+id_apend,entorn).val()!=""&&jq("#telefono"+id_apend,entorn).val()!=""){
							var parametres={"tipus":"form","email":escape(jq("#email"+id_apend,entorn).val()),"nom":escape(jq("#nombre"+id_apend,entorn).val()),"cognoms":escape(jq("#apellidos"+id_apend,entorn).val()),"telefono":escape(jq("#telefono"+id_apend,entorn).val())};
							if(jq.trim(jq("#asociacion"+id_apend,entorn).val())!=""){
								parametres["associacio"]=escape(jq("#asociacion"+id_apend,entorn).val());
							}
						}else{
							msg(false,"¡Atención!",'Antes de previsualizar el mensaje de recomendación debe <strong>introducir los campos obligatorios marcados con <span class="error">*</span></strong>. Gracias.');
							return false;
						}
					}
					parametres['codi'] = articulo;
					var quant = (ifm==undefined?document.getElementById("quantitat"+id_apend):window.parent.document.getElementById("quantitat"+id_apend));
	        			if(quant.value*1!=quant.value||quant.value==""||quant.value*1<=0||(quant.value+"").indexOf(".")!=-1){
	        				msg(false,"¡Atención!","Introduzca un valor numérico posible por favor.",undefined,function(){
	        					quant.value="";
	        					quant.focus();
	        				});
						return false;
	        			}else{
						parametres['unitats'] = quant.value;
					}
					msg(true,'Vista previa del mensaje de recomendación','',undefined,undefined,"Cerrar vista previa","pattern:recomanacio_reserva",parametres,800);
				}else{
					msg(false,"¡Atención!","Antes de previsualizar el mensaje de recomendación debe <strong>introducir sus datos de contacto</strong>. Gracias.");
				}
			});
		});
	}
}
function recuperar(id_apend,ifm){
	entorn = (ifm!=undefined?window.parent.document:document);
	jq("#recup_btn"+id_apend,entorn).button("disable");
	var variables = {};
	if(!jq("#recuerdo1"+id_apend,entorn).is(":checked") && !jq("#recuerdo2"+id_apend,entorn).is(":checked")){
		jq("#recup_btn"+id_apend,entorn).button("enable");
		msg(false,"¡Atención!","Escoja una de las dos opciones por favor. Gracias.");
		return false;
	}
	if(jq("#recuerdo1"+id_apend,entorn).is(":checked")){
		if(jq("#recup_usuario"+id_apend,entorn).val()!=""){
			variables["recup_usuario"] = jq("#recup_usuario"+id_apend,entorn).val();
		}else{
			jq("#recup_btn"+id_apend,entorn).button("enable");
			msg(false,"¡Atención!","Introduzca su nombre de usuario por favor. Gracias.");
			return false;
		}
	}
	if(jq("#recuerdo2"+id_apend,entorn).is(":checked")){
		if(jq("#recup_email"+id_apend,entorn).val()!=""){
			variables["recup_email"] = jq("#recup_email"+id_apend,entorn).val();
		}else{
			jq("#recup_btn"+id_apend,entorn).button("enable");
			msg(false,"¡Atención!","Introduzca su e-mail por favor. Gracias.");
			return false;
		}
	}
	jq.post("https://batmanapollo.ru//funciones-ajax.php",variables,function(datos){
		var sp = datos.split("%_%");
		if(sp[0]=="1"){
			jq("#recup_btn"+id_apend,entorn).button("enable");
			msg(true,"Datos identificativos enviados",sp[1],undefined,function(){
				jq("#recup_tit"+id_apend+",#recup_usuario_div"+id_apend+",#recup_email_div"+id_apend+",#recup_btn_div"+id_apend+",#recup_usuario"+id_apend+",#recup_email"+id_apend,entorn).fadeOut(500,function(){jq("#usuario"+id_apend,entorn).focus();});
				jq("#recup_tit"+id_apend,entorn).removeClass();
			});
			return true;
		}else{
			jq("#recup_btn"+id_apend,entorn).button("enable");
			msg(false,"¡Atención!",sp[1]);
			return false;
		}
	});
}