vendor: 4,659 bytes, lines 1-4
1 2; /* Start:"a:4:{s:4:"full";s:74:"/local/templates/dresscode_rutrike/js/jquery-1.11.0.min.js?154296332396381";s:6:"source";s:58:"/local/templates/dresscode_rutrike/js/jquery-1.11.0.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ 4!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n
vendor: 6,587 bytes, line 4
4.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}
vendor: 10,444 bytes, line 4
4),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[
vendor: 10,705 bytes, line 4
41].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}
vendor: 4,335 bytes, lines 4-5
4:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f 5}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");
vendor: 22,119 bytes, line 5
5for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a>
vendor: 9,513 bytes, lines 5-6
5<input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) 6},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;
vendor: 28,247 bytes, line 6
6for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
vendor: 1,842 bytes, lines 6-65
6 7 8/* End */ 9; 10; /* Start:"a:4:{s:4:"full";s:73:"/local/templates/dresscode_rutrike/js/jquery.easing.1.3.js?15429633234579";s:6:"source";s:58:"/local/templates/dresscode_rutrike/js/jquery.easing.1.3.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 11jQuery.easing['jswing'] = jQuery.easing['swing']; 12jQuery.extend( jQuery.easing, 13{ 14 def: 'easeOutQuad', 15 swing: function (x, t, b, c, d) { 16 //alert(jQuery.easing.default); 17 return jQuery.easing[jQuery.easing.def](x, t, b, c, d); 18 }, 19 easeInQuad: function (x, t, b, c, d) { 20 return c*(t/=d)*t + b; 21 }, 22 easeOutQuad: function (x, t, b, c, d) { 23 return -c *(t/=d)*(t-2) + b; 24 }, 25 easeInOutQuad: function (x, t, b, c, d) { 26 if ((t/=d/2) < 1) return c/2*t*t + b; 27 return -c/2 * ((--t)*(t-2) - 1) + b; 28 }, 29 easeInCubic: function (x, t, b, c, d) { 30 return c*(t/=d)*t*t + b; 31 }, 32 easeOutCubic: function (x, t, b, c, d) { 33 return c*((t=t/d-1)*t*t + 1) + b; 34 }, 35 easeInOutCubic: function (x, t, b, c, d) { 36 if ((t/=d/2) < 1) return c/2*t*t*t + b; 37 return c/2*((t-=2)*t*t + 2) + b; 38 }, 39 easeInQuart: function (x, t, b, c, d) { 40 return c*(t/=d)*t*t*t + b; 41 }, 42 easeOutQuart: function (x, t, b, c, d) { 43 return -c * ((t=t/d-1)*t*t*t - 1) + b; 44 }, 45 easeInOutQuart: function (x, t, b, c, d) { 46 if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 47 return -c/2 * ((t-=2)*t*t*t - 2) + b; 48 }, 49 easeInQuint: function (x, t, b, c, d) { 50 return c*(t/=d)*t*t*t*t + b; 51 }, 52 easeOutQuint: function (x, t, b, c, d) { 53 return c*((t=t/d-1)*t*t*t*t + 1) + b; 54 }, 55 easeInOutQuint: function (x, t, b, c, d) { 56 if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 57 return c/2*((t-=2)*t*t*t*t + 2) + b; 58 }, 59 easeInSine: function (x, t, b, c, d) { 60 return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 61 }, 62 easeOutSine: function (x, t, b, c, d) { 63 return c * Math.sin(t/d * (Math.PI/2)) + b; 64 }, 65 easeInOutSine: function (x, t, b, c, d) {
66 return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 67 }, 68 easeInExpo: function (x, t, b, c, d) { 69 return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 70 }, 71 easeOutExpo: function (x, t, b, c, d) { 72 return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 73 }, 74 easeInOutExpo: function (x, t, b, c, d) { 75 if (t==0) return b; 76 if (t==d) return b+c; 77 if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 78 return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 79 }, 80 easeInCirc: function (x, t, b, c, d) { 81 return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 82 }, 83 easeOutCirc: function (x, t, b, c, d) { 84 return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 85 }, 86 easeInOutCirc: function (x, t, b, c, d) { 87 if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 88 return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 89 }, 90 easeInElastic: function (x, t, b, c, d) { 91 var s=1.70158;var p=0;var a=c; 92 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 93 if (a < Math.abs(c)) { a=c; var s=p/4; } 94 else var s = p/(2*Math.PI) * Math.asin (c/a); 95 return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 96 }, 97 easeOutElastic: function (x, t, b, c, d) { 98 var s=1.70158;var p=0;var a=c; 99 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 100 if (a < Math.abs(c)) { a=c; var s=p/4; } 101 else var s = p/(2*Math.PI) * Math.asin (c/a); 102 return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 103 }, 104 easeInOutElastic: function (x, t, b, c, d) { 105 var s=1.70158;var p=0;var a=c; 106 if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 107 if (a < Math.abs(c)) { a=c; var s=p/4; } 108 else var s = p/(2*Math.PI) * Math.asin (c/a); 109 if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 110 return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 111 }, 112 easeInBack: function (x, t, b, c, d, s) { 113 if (s == undefined) s = 1.70158; 114 return c*(t/=d)*t*((s+1)*t - s) + b; 115 }, 116 easeOutBack: function (x, t, b, c, d, s) { 117 if (s == undefined) s = 1.70158; 118 return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 119 }, 120 easeInOutBack: function (x, t, b, c, d, s) { 121 if (s == undefined) s = 1.70158; 122 if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 123 return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 124 }, 125 easeInBounce: function (x, t, b, c, d) { 126 return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 127 }, 128 easeOutBounce: function (x, t, b, c, d) { 129 if ((t/=d) < (1/2.75)) { 130 return c*(7.5625*t*t) + b; 131 } else if (t < (2/2.75)) { 132 return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 133 } else if (t < (2.5/2.75)) { 134 return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 135 } else { 136 return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 137 } 138 }, 139 easeInOutBounce: function (x, t, b, c, d) { 140 if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 141 return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 142 } 143}); 144/* End */ 145; 146; /* Start:"a:4:{s:4:"full";s:67:"/local/templates/dresscode_rutrike/js/rangeSlider.js?15429633234276";s:6:"source";s:52:"/local/templates/dresscode_rutrike/js/rangeSlider.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 147(function($) { 148 jQuery.fn.rangeSlider = function(options) { 149 var options = $.extend({ 150 step: 1, 151 }, options); 152 153 return this.each(function() { 154 var mainObject = $(this); 155 var handler = mainObject.find(".handler"); 156 var slider = mainObject.find(".slider"); 157 var mousePush = false; 158 159 var offsetObject = { 160 handler: handler.offset() 161 }; 162 163 var widthObject = { 164 main: slider.width() 165 } 166 167 var blackout = { 168 left: mainObject.find(".blackoutLeft"), 169 right: mainObject.find(".blackoutRight") 170 }; 171 172 var buttons = { 173 left: $(options["leftButton"]), 174 right: $(options["rightButton"]) 175 } 176 177 var input = { 178 left: $(options["inputLeft"]), 179 right: $(options["inputRight"]) 180 }; 181 182 var percent = { 183 range: ((options["max"] - options["min"]) / 100), 184 scroll: (widthObject.main / 100) 185 }; 186 187 var reCalculate = function(part) { 188 var append = part != "left" ? widthObject.main : 0; 189 var shift = Math.abs((input[part].val() - options["min"]) * 100 / (options["max"] - options["min"]) * percent.scroll - append) + "px"; 190 blackout[part].width(shift); 191 }; 192 193 var normalize = function(i) { 194 return i >= 0 ? i : 0; 195 } 196 197 //set current position 198 199 if (input.left.val() != options["min"]) { 200 reCalculate("left"); 201 } 202 203 if (input.right.val() != options["max"]) { 204 reCalculate("right"); 205 } 206 207 input.left.change(function(e) { 208 if (parseInt(input.left.val()) >= parseInt(input.right.val())) { 209 input.left.val(parseInt(input.right.val()) - 1); 210 } else if (parseInt(input.left.val()) < options["min"]) { 211 input.left.val(options["min"]); 212 } 213 reCalculate("left"); 214 }); 215 216 input.right.change(function(e) { 217 if (parseInt(input.right.val()) <= parseInt(input.left.val())) { 218 input.right.val(parseInt(input.left.val()) + 1); 219 } else if (parseInt(input.right.val()) > options["max"]) { 220 input.right.val(options["max"]); 221 } 222 reCalculate("right"); 223 }); 224 225 handler.on("mousedown", function(e) { 226 if (mousePush == false) { // chrome ff click 227 var part = widthObject.main / 2 > e.pageX - offsetObject.handler.left ? "left" : "right"; 228 var move = part == "left" ? e.pageX - offsetObject.handler.left : widthObject.main - (e.pageX - offsetObject.handler.left); 229 var inputVal = Math.round(Math.abs((part == "left" ? options["min"] : -options["max"]) + (normalize(move) / percent.scroll * percent.range))); 230 blackout[part].addClass("trans").css("width", normalize(move)); 231 setTimeout(function() { 232 blackout[part].removeClass("trans"); 233 }, 300) 234 input[part].val(inputVal).trigger("change"); 235 } else { 236 mousePush = false;
237 } 238 239 }); 240 241 buttons.left.mousedown(function(e) { 242 buttons.left.active = true; 243 buttons.left.clickStart = e.pageX; 244 buttons.left.widthStart = parseInt(blackout["left"].width()); 245 e.stopImmediatePropagation(); 246 e.preventDefault(); 247 }); 248 249 buttons.right.mousedown(function(e) { 250 buttons.right.active = true; 251 buttons.right.clickStart = e.pageX; 252 buttons.right.widthStart = parseInt(blackout["right"].width()); 253 e.stopImmediatePropagation(); 254 e.preventDefault(); 255 }); 256 257 $(document).on({ 258 mousemove: function(e) { 259 if (buttons.right.active) { 260 var mouseMove = buttons.right.widthStart + (buttons.right.clickStart - e.pageX); 261 if (mouseMove > widthObject.main - blackout.left.width() || mouseMove < 0) return false; 262 input.right.val(Math.round(options["max"] - (mouseMove / percent.scroll * percent.range))).trigger("change"); 263 blackout["right"].width(mouseMove); 264 mousePush = true; 265 } else if (buttons.left.active) { 266 var mouseMove = buttons.left.widthStart - (buttons.left.clickStart - e.pageX); 267 if (mouseMove > widthObject.main - blackout.right.width() || mouseMove < 0) return false; 268 input.left.val(Math.round(options["min"] + (mouseMove / percent.scroll * percent.range))).trigger("change"); 269 blackout["left"].width(mouseMove); 270 mousePush = true; 271 } 272 273 }, 274 mouseup: function(e) { 275 buttons.left.active = buttons.right.active = mousePush = false; 276 } 277 }); 278 279 $(window).resize(function() { 280 widthObject.main = slider.width(); 281 percent.scroll = widthObject.main / 100; 282 }); 283 284 }); 285 286 }; 287})($); 288/* End */ 289; 290; /* Start:"a:4:{s:4:"full";s:63:"/local/templates/dresscode_rutrike/js/system.js?179129621673770";s:6:"source";s:47:"/local/templates/dresscode_rutrike/js/system.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 291var appOpen = false; 292var timeOutID; 293var intervalID; 294var flushTimeout; 295var appBasketChangeTimeout; 296var lastAddCartText; 297var skuLoading = false; 298var fastBuyOpen = false; 299var fastViewOpen = false; 300var fastViewStoresOpen = false; 301var priceVariantOpen = false; 302var requestPriceOpen = false; 303var specialBlockMoved = false; 304var basketProductsNow = false; 305var oSkuDropdownOpened = false; 306 307var changeAddCartButton = function(jsonData){ 308 309 //search addCart buttons 310 if(typeof jsonData["CATEGORIES"] != "undefined"){ 311 if(typeof jsonData["CATEGORIES"]["READY"] != "undefined"){ 312 //each basket elements 313 $.each(jsonData["CATEGORIES"]["READY"], function(index, nextElement){ 314 if(typeof nextElement["PRODUCT_ID"] != "undefined"){ 315 var $currentButton = $('.addCart[data-id="' + nextElement["PRODUCT_ID"] + '"]'); 316 if(typeof $currentButton != "undefined"){ 317 $currentButton.each(function(ii, nextButton){ 318 updateAddCartButton($(nextButton)); 319 }); 320 } 321 } 322 }); 323 //save current values 324 basketProductsNow = jsonData; 325 } 326 } 327 328}; 329 330var updateAddCartButton = function($currentElement){ 331 var $imageAfterLoad = $currentElement.find("img"); 332 $currentElement.text(LANG["ADDED_CART_SMALL"]) 333 .attr("href", SITE_DIR + "personal/cart/") 334 .prepend($imageAfterLoad.attr("src", TEMPLATE_PATH + "/images/added.png")) 335 .addClass("added"); 336}; 337 338var flushCart = function(id, q) { 339 $.getJSON(ajaxPath + "?act=upd&id=" + id + "&q=" + q + "&site_id=" + SITE_ID, function(data) { 340 if(data["success"] == "Y"){ 341 342 var $appBasket = $("#appBasket"); 343 var $price = $appBasket.find(".price").html(data["PRICE"]).data({"price": data["~PRICE"], "discount": data["OLD_PRICE"]}); 344 var $allSum = $appBasket.find(".allSum").html(data["SUM"]); 345 346 if(data["MEASURE_SYMBOL_RUS"] != undefined && data["MEASURE_SYMBOL_RUS"] != ""){ 347 $price.append( 348 $("<span/>").addClass("measure").html( 349 " / " + data["MEASURE_SYMBOL_RUS"] + " " 350 ) 351 ); 352 } 353 354 if(parseInt(data["DISCOUNT_PRICE"], 10) > 0){ 355 $price.append( 356 $("<s>") 357 .addClass("discount") 358 .html(data["DISCOUNT_PRICE"]) 359 ); 360 } 361 362 if(parseInt(data["DISCOUNT_SUM"], 10) > 0){ 363 $allSum.append( 364 $("<s>") 365 .addClass("discount") 366 .html(" " + data["DISCOUNT_SUM"]) 367 ); 368 } 369 370 cartReload(); 371 372 }else{
373 $basketQty = $("#appBasket .qty").addClass("error"); 374 if(data["error"] == "quantityError"){ 375 376 $basketQty.val(data["currentQuantityValue"]); 377 378 //calc 379 var $appBasket = $("#appBasket"); 380 var $price = $appBasket.find(".price"); 381 var $sum = $appBasket.find(".allSum"); 382 var gStrSum = $sum.html().replace(/\d\.\d/g, '').replace(/[0-9]/g, ''); 383 384 $sum.html( 385 formatPrice( 386 $price.data("price") * $basketQty.val() 387 ) + gStrSum 388 ); 389 390 if($price.data("discount") > 0){ 391 392 var $sumDiscount = $sum.find(".discount"); 393 var gstrSumDiscount = $sumDiscount.html().replace(/\d\.\d/g, '').replace(/[0-9]/g, ''); 394 395 $sumDiscount.html( 396 formatPrice( 397 $price.data("discount") * $basketQty.val() 398 ) + gstrSumDiscount 399 ); 400 } 401 402 } 403 console.error("flushCart: " + data["error"]); 404 } 405 406 }); 407} 408 409var cartReload = function(){ 410 411 if(typeof(window.topCartTemplate) == "undefined"){ 412 window.topCartTemplate = "topCart"; 413 } 414 415 if(typeof(window.wishListTemplate) == "undefined"){ 416 window.wishListTemplate = ".default"; 417 } 418 419 if(typeof(window.compareTemplate) == "undefined"){ 420 window.compareTemplate = ".default"; 421 } 422 423 $.get(ajaxPath + "?act=flushCart&topCartTemplate=" + window.topCartTemplate + "&wishListTemplate=" + window.wishListTemplate + "&compareTemplate=" + window.compareTemplate, function(data){ 424 425 var $items = $(data).find(".dl"); 426 427 $("#flushTopCart").html($items.eq(0).html()); 428 $("#flushFooterCart").html($items.eq(1).html()); 429 $("#flushTopwishlist").html($items.eq(2).html()); 430 $("#flushTopCompare").html($items.eq(3).html()); 431 432 }); 433} 434 435$(function(){ 436 437 $(".questions-answers-list .question").click(function(){ 438 var par = $(this).parents(".question-answer-wrap"); 439 par.toggleClass("active").find(".answer").slideToggle(); 440 }); 441 442 $(".banner-animated").addClass("banner-image-load"); 443 444 // open tabs 445 $(".tab-link").click(function(){ 446 if ( !$(this).hasClass("active") ) { 447 var par = $(this).parents(".tabs-wrap"); 448 var index = $(this).index(); 449 450 $(this).addClass('active').siblings().removeClass("active"); 451 $('.tab-content:eq(' + index + ')', par).addClass("active").siblings().removeClass("active"); 452 } 453 }); 454 455 // call the modal window on the feedback block 456 $(".consultation-btn").click(function(){ 457 $(".callBack").click(); 458 }); 459 460 if($("#footerTabs .tab").size() == 0){ 461 $("#footerTabs, #footerTabsCaption").remove(); 462 }else{ 463 $("#footerTabsCaption .item").eq(0).find("a").addClass("selected"); 464 $("#footerTabs .tab").eq(0).addClass("selected"); 465 } 466 467 if($("#infoTabs .tab").size() == 0){ 468 $("#infoTabs, #infoTabsCaption").remove(); 469 }else{ 470 $("#infoTabsCaption .item").eq(0).find("a").addClass("selected"); 471 $("#infoTabs .tab").eq(0).addClass("selected"); 472 } 473 474 var $upButton = $("#upButton"); 475 476 $(window).on("ready scroll", function(event){ 477 var curScrollValueY = (event.currentTarget.scrollY) ? event.currentTarget.scrollY : $(window).scrollTop() 478 if(curScrollValueY > 0){ 479 $upButton.addClass("enb"); 480 }else{ 481 $upButton.removeClass("enb"); 482 } 483 484 }); 485 486 $upButton.on("click", function(event){ 487 488 $("html,body").animate({ 489 scrollTop: 0 490 }, 250); 491 492 return event.preventDefault(); 493 494 }); 495 496}); 497 498$(window).on("ready", function(event){ 499 500 //vars 501 var $topMenuContainer = $("#mainMenuContainer"); 502 var $mainMenuStaticContainer = $("#mainMenuStaticContainer"); 503 var $body = $("body").removeClass("loading"); // cache body 504 var $window = $(window); 505 506 if($("div").is(".global-block-container") && $("div").is(".global-information-block") && $("div").is(".global-information-block-cn")){ 507 508 //disable fixed menu 509 _topMenuNoFixed = true; 510 511 //vars 512 var $globalBlockContainer = $body.find(".global-block-container"); 513 var $globalInformationBlock = $globalBlockContainer.find(".global-information-block"); 514 var $globalInformationBlockCntr = $globalInformationBlock.find(".global-information-block-cn"); 515 516 //set height 517 $globalBlockContainer.css("min-height", $globalInformationBlock.height()); 518 519 if(!$globalInformationBlock.hasClass("no-fixed")){ 520 var informBlockOffset = $globalInformationBlock.offset(); 521 var maxScrollHeight = $globalBlockContainer.height() + informBlockOffset.top - ($globalInformationBlockCntr.height() + 24); //24 padding top 522 } 523 524 var gbScrollCtr = function(event){ 525 526 var $this = $(this); 527 var currentScrollValue = $this.scrollTop(); 528 529 if(currentScrollValue >= informBlockOffset.top){ 530 if(currentScrollValue >= maxScrollHeight){ 531 $globalInformationBlock.addClass("max-scroll"); 532 }else{ 533 $globalInformationBlock.removeClass("max-scroll"); 534 } 535 $globalInformationBlock.addClass("fixed"); 536 }else{ 537 $globalInformationBlock.removeClass("fixed"); 538 } 539 540 }; 541 542 var reCalcGbParams = function(){ 543 informBlockOffset = $globalInformationBlock.offset(); 544 maxScrollHeight = $globalBlockContainer.height() + informBlockOffset.top - ($globalInformationBlockCntr.height() + 24); //24 padding top 545 } 546 547 $(window).on("scroll", gbScrollCtr); 548 $(window).on("resize", reCalcGbParams); 549 550 } 551 552 var moveBlockToContainer = function(blockID, moveBlockID){ 553 554 //set j vars 555 var $blockID = $(blockID); 556 var $moveBlockID = $(moveBlockID); 557 558 //move 559 $moveBlockID.append($blockID); 560 561 //set global flag var 562 return specialBlockMoved = true; 563 564 }; 565 566 var setSpecialBlockPosition = function(){ 567 568 if($("div").is("#specialBlock")){ 569 if($(window).width() <= 1850){ 570 moveBlockToContainer("#specialBlock", "#specialBlockMoveContainer"); 571 }else if(specialBlockMoved === true && $(window).width() > 1600){ 572 moveBlockToContainer("#specialBlock", "#promoBlock"); 573 } 574 } 575 }; 576 577 //start form load 578 setSpecialBlockPosition(); 579 580 //resize events 581 $(window).on("resize", setSpecialBlockPosition); 582 583 var getRequestPrice = function(event){ 584 585 var $this = $(this); 586 var $requestPrice = $("#requestPrice"); 587 var $foundation = $("#foundation").addClass("blurred"); 588 589 $("#requestPrice, #requestPrice .requstProductContainer").show(); 590 $("#requestPriceResult").hide(); 591 592 //clear form 593 $("#requestPriceForm").find('input[type="text"], textarea').val(""); 594 $requestPrice.find(".requestPricePicture").attr("src", $requestPrice.data("load")); 595 596 var productID = $this.data("id"); 597 598 $this.addClass("loading"); 599 600 var gObj = { 601 id: productID, 602 act: "getRequestPrice" 603 }; 604 605 $.getJSON(ajaxPath, gObj).done(function(jData){ 606 607 if(!jData || parseInt(jData["CART_ID"], 10) <= 0){ 608 $this.removeClass("loading").addClass("error"); 609 alert("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443. \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443."); 610 return; 611 }
612//AGT_26-12-18__Replaced_jData[0]_on_jData["PRODUCT"] 613 614 $this.removeClass("loading"); 615 $requestPrice.find(".requestPriceUrl").attr("href", jData["PRODUCT"]["DETAIL_PAGE_URL"]); 616 $requestPrice.find(".productNameBlock .middle").html(jData["PRODUCT"]["NAME"]); 617 $requestPrice.find("#requestPriceProductID").val(jData["PRODUCT"]["ID"]); 618 $requestPrice.find(".markerContainer").remove(); 619 620 if(jData["PRODUCT"]["MARKER"] != undefined){ 621 622 $requestPrice.find("#fastBuyPicture").prepend( 623 $("<div>").addClass("markerContainer") 624 .append( 625 jData["PRODUCT"]["MARKER"] 626 ) 627 628 ); 629 } 630 631 $requestPrice.show(); 632 633 loadingPictureControl(jData["PRODUCT"]["PICTURE"]["src"], function(){ 634 $requestPrice.find(".requestPricePicture").attr("src", jData["PRODUCT"]["PICTURE"]["src"]); 635 }); 636 637 requestPriceOpen = true; 638 639 }).fail(function(jqxhr, textStatus, error){ 640 641 $.get(ajaxPath, gObj).done(function(Data){ 642 console.log(Data) 643 }); 644 645 $this.removeClass("loading") 646 .addClass("error"); 647 648 console.error( 649 "Request Failed: " + textStatus + ", " + error 650 ); 651 652 }); 653 654 return event.preventDefault(); 655 }; 656 657 var sendRequestPrice = function(event){ 658 659 var $this = $(this).addClass("loading"); 660 var $requestPriceForm = $("#requestPriceForm"); 661 var $requestPriceFormTelephone = $requestPriceForm.find("#requestPriceFormTelephone").removeClass("error"); 662 663 if($requestPriceFormTelephone.val() == ""){ 664 $requestPriceFormTelephone.addClass("error"); 665 } 666 667 var $personalInfo = $requestPriceForm.find("#personalInfoRequest"); 668 if(!$personalInfo.prop("checked")){ 669 $personalInfo.addClass("error"); 670 } 671 672 if($requestPriceFormTelephone.val() !="" && $personalInfo.prop("checked")){ 673 674 $.getJSON(ajaxPath + "?" + $requestPriceForm.serialize()).done(function(jData){ 675 676 $("#requestPriceResultTitle").html(jData["heading"]); 677 $("#requestPriceResultMessage").html(jData["message"]); 678 679 $("#requestPrice .requstProductContainer").hide(); 680 $("#requestPriceResult").show(); 681 682 $this.removeClass("loading"); 683 684 }).fail(function(jqxhr, textStatus, error){ 685 686 $this.removeClass("loading").addClass("error"); 687 688 console.error( 689 "Request Failed: " + textStatus + ", " + error 690 ); 691 692 }); 693 694 }else{ 695 $this.removeClass("loading"); 696 } 697 698 return event.preventDefault(); 699 }; 700 701 702 var closeRequestPrice = function(event){ 703 var $appFastBuy = $("#requestPrice").hide(); 704 var $foundation = $("#foundation").removeClass("blurred"); 705 requestPriceOpen = false; 706 return event.preventDefault(); 707 }; 708 709 var getFastView = function(event){ 710 711 var $this = $(this).addClass("loading"); 712 var $productContainer = $this.parents(".item"); 713 var productID = $this.data("id"); 714 var productIblockID = $productContainer.data("product-iblock-id"); 715 716 if(productID){ 717 $.ajax({ 718 url: ajaxPath + "?act=getFastView&product_id=" + productID + "&product_iblock_id=" + productIblockID + "&product_currency_id=" + $productContainer.data("currency-id") + "&product_convert_currency=" + $productContainer.data("convert-currency") + "&product_price_code=" + $productContainer.data("price-code") + "&product_hide_measures=" + $productContainer.data("hide-measure") + "&product_hide_not_available=" + $productContainer.data("hide-not-available"), 719 success: function(http){ 720 721 //clear carousel cache vars 722 delete fastViewInitPictureCarousel; 723 delete fastViewInitPictureSlider; 724 delete initFastViewApp; 725 delete createFastView; 726 727 //remove fastview window 728 $("#appFastView").remove(); 729 730 //append to body 731 $body.append(http); 732 $this.removeClass("loading"); 733 734 //unbind last events 735 $(document).off("click", "#appFastView .appFastViewExit"); 736 $(document).off("click", "#appFastView .appFastViewPictureCarouselItem"); 737 $(document).off("click", "#appFastView .appFastViewPictureCarouselLeftButton"); 738 $(document).off("click", "#appFastView .appFastViewPictureCarouselRightButton"); 739 $(document).off("mousemove", "#appFastView .appFastViewPictureSliderItemLink"); 740 $(document).off("mouseover", "#appFastView .appFastViewPictureSliderItemLink"); 741 $(document).off("mouseleave", "#appFastView .appFastViewPictureSliderItemLink"); 742 743 //start fastView scrips 744 initFastViewApp(); 745 //reload addCart button 746 cartReload(); 747 //subscribe button reload 748 subscribeOnline(); 749 750 }, 751 cache: false, 752 async: false 753 }); 754 fastViewOpen = true; 755 } 756 757 return event.preventDefault(); 758 } 759 760 var getStoresWindow = function(event){ 761 762 var $this = $(this).addClass("loading"); 763 var productID = $this.data("id"); 764 765 if(productID){ 766 $.getJSON(ajaxPath + "?act=getAvailableWindow&product_id=" + productID, function(json){ 767 if(typeof json["COMPONENT_DATA"] != "undefined"){ 768 $("#fastViewStores").remove(); 769 $body.append(json["COMPONENT_DATA"]); 770 $this.removeClass("loading"); 771 fastViewStoresOpen = true; 772 } 773 }); 774 } 775 776 return event.preventDefault(); 777 778 }; 779 780 var closeStoresWindow = function(event){ 781 $("#fastViewStores").remove(); 782 fastViewStoresOpen = false; 783 return event.preventDefault(); 784 }; 785 786 var getPricesWindow = function(event){ 787 788 var $this = $(this).addClass("loading"); 789 var $thisContainer = $this.parents(".item"); 790 var productID = $this.data("id"); 791 792 if(productID){ 793 $.get(ajaxPath + "?act=getPricesWindow&product_id=" + productID + "&product_price_code=" + encodeURIComponent($thisContainer.data("price-code")) + "&product_currency=" + encodeURIComponent($thisContainer.data("currency")), function(http){ 794 795 $("#appProductPriceVariant").remove(); 796 $this.removeClass("loading"); 797 $body.append(http); 798 799 var thisOffsetLeft = $this.offset().left; 800 var thisOffsetTop = $this.offset().top; 801 802 if(thisOffsetLeft + 320 > $(window).width()){ 803 thisOffsetLeft = $(window).width() - 334; 804 } 805 806 if($this.data("fixed") == "Y"){ 807 $("#appProductPriceVariant").css({ 808 left: thisOffsetLeft, 809 top: thisOffsetTop - $(window).scrollTop(), 810 position: "fixed" 811 });
812 }else{ 813 $("#appProductPriceVariant").css({ 814 left: thisOffsetLeft, 815 top: thisOffsetTop 816 }); 817 } 818 priceVariantOpen = true; 819 }); 820 } 821 822 return event.preventDefault(); 823 824 }; 825 826 var closePricesWindow = function(event){ 827 $("#appProductPriceVariant, .priceVariantStyles").remove(); 828 priceVariantOpen = false; 829 return event.preventDefault(); 830 }; 831 832 var giftView = function($product, http){ 833 var $namer = $product.find(".name"); 834 var $nameMiddler = $namer.find(".middle"); 835 var $elPicture = $product.find(".picture"); 836 var $changeFastBack = $product.find(".fastBack").removeClass("disabled"); 837 838 if($nameMiddler){ 839 $namer.attr("href", http[0]["PRODUCT"]["DETAIL_PAGE_URL"]); 840 $nameMiddler.html(http[0]["PRODUCT"]["NAME"]); 841 }else{ 842 $namer.attr("href", http[0]["PRODUCT"]["DETAIL_PAGE_URL"]).html(http[0]["PRODUCT"]["NAME"]); 843 } 844 845 $elPicture.attr("href", http[0]["PRODUCT"]["DETAIL_PAGE_URL"]); 846 $elPicture.html($("<img/>").attr("src", http[0]["PRODUCT"]["PICTURE"])); 847 $elPicture.append($("<span />", {class: "getFastView"}).data("id", http[0]["PRODUCT"]["ID"]).html(LANG["FAST_VIEW_PRODUCT_LABEL"])); 848 849 $product.find(".addCart, .fastBack, .addCompare").data("id", http[0]["PRODUCT"]["ID"]); 850 851 if(http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"]){ 852 $product.find(".price").html(LANG["GIFT_PRICE_LABEL"] + " ").removeClass("getPricesWindow"); 853 $product.find(".price").append( 854 $("<s/>").addClass("discount").html( 855 http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"] 856 ) 857 ); 858 }else{ 859 $product.find(".price").html(LANG["REQUEST_PRICE_LABEL"]).removeClass("getPricesWindow"); 860 } 861 862 var $changeCart = $product.find(".addCart"); 863 864 $changeCart.find("img").remove(); 865 if(http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"]){ 866 if($changeCart.hasClass("added")){ 867 $changeCart.removeClass("disabled").removeClass("requestPrice") 868 .html($changeCart.data("cart-label")) 869 .prepend($("<img />").attr({src: TEMPLATE_PATH + "/images/added.png", class: "icon"})); 870 }else{ 871 $changeCart.removeClass("disabled").removeClass("requestPrice") 872 .html($product.data("cart-label")) 873 .prepend($("<img />").attr({src: TEMPLATE_PATH + "/images/addGift.png", class: "icon"})) 874 .attr("href", "#"); 875 } 876 }else{ 877 $changeFastBack.addClass("disabled"); 878 $changeCart.addClass("disabled").addClass("requestPrice") 879 .html(LANG["REQUEST_PRICE_BUTTON_LABEL"]) 880 .prepend($("<img />").attr({src: TEMPLATE_PATH + "/images/request.png", class: "icon"})) 881 .attr("href", "#"); 882 http[0]["PRODUCT"]["CAN_BUY"] = "N"; 883 } 884 885 if(http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"]){ 886 if($product.data("hide-measure") != "Y" && http[0]["PRODUCT"]["MEASURE"] != undefined && http[0]["PRODUCT"]["MEASURE"]["SYMBOL_RUS"] != ""){ 887 $product.find(".price").find(".discount").append( 888 $("<span/>").addClass("measure").html( 889 " / " + http[0]["PRODUCT"]["MEASURE"]["SYMBOL_RUS"] + " " 890 ) 891 ); 892 } 893 } 894 895 var $changeAvailable = $product.find(".changeAvailable"); 896 897 $changeAvailable.removeClass("getStoresWindow"); 898 $changeAvailable.removeClass("outOfStock"); 899 $changeAvailable.removeClass("onOrder"); 900 $changeAvailable.removeClass("inStock"); 901 $changeAvailable.removeAttr("href"); 902 903 904 if(http[0]["PRODUCT"]["CATALOG_QUANTITY"] > 0){ 905 if(http[0]["PRODUCT"]["STORES_COUNT"] > 1){ 906 $changeAvailable.html($("<span/>").html(LANG["CATALOG_AVAILABLE"])).addClass("inStock").attr("href", "#").addClass("getStoresWindow").data("id", http[0]["PRODUCT"]["ID"]); 907 $changeAvailable.prepend( 908 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/inStock.png") 909 ); 910 }else{ 911 $changeAvailable.html(LANG["CATALOG_AVAILABLE"]).addClass("inStock"); 912 $changeAvailable.prepend( 913 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/inStock.png") 914 ); 915 } 916 }else{ 917 if(http[0]["PRODUCT"]["CAN_BUY"] != "Y"){ 918 $changeAvailable.html(LANG["CATALOG_NO_AVAILABLE"]).addClass("outOfStock"); 919 $changeFastBack.addClass("disabled"); 920 $changeCart.addClass("disabled"); 921 $changeAvailable.prepend( 922 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/outOfStock.png") 923 ); 924 }else{ 925 $changeAvailable.html(LANG["CATALOG_ON_ORDER"]).addClass("onOrder"); 926 $changeAvailable.prepend( 927 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/onOrder.png") 928 ); 929 } 930 } 931 }; 932 933 var fastViewSku = function($product, http){ 934 var $namer = $product.find(".appFastViewProductHeadingLink"); 935 var $elPicture = $product.find(".picture"); 936 var $changeFastBack = $product.find(".fastBack").removeClass("disabled"); 937 938 $namer.attr("href", http[0]["PRODUCT"]["DETAIL_PAGE_URL"]).html(http[0]["PRODUCT"]["NAME"]); 939 940 $elPicture.attr("href", http[0]["PRODUCT"]["DETAIL_PAGE_URL"]); 941 $elPicture.html($("<img/>").attr("src", http[0]["PRODUCT"]["PICTURE"])); 942 943 $product.find(".addCart, .fastBack, .addCompare").data("id", http[0]["PRODUCT"]["ID"]).attr("data-id", http[0]["PRODUCT"]["ID"]); 944 if(http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"]){ 945 $product.find(".price").html($("<span />", {class: "priceVal"}).html(http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"] + " ")).removeClass("getPricesWindow"); 946 }else{ 947 $product.find(".price").html($("<span />", {class: "priceVal"}).html(LANG["REQUEST_PRICE_LABEL"])).removeClass("getPricesWindow").removeAttr("href"); 948 http[0]["PRODUCT"]["CAN_BUY"] = "N"; 949 } 950 if(http[0]["PRODUCT"]["RESULT_PROPERTIES"]){ 951 $product.find(".changeProperties").html(http[0]["PRODUCT"]["RESULT_PROPERTIES"]); 952 } 953 954 var $changeCart = $product.find(".addCart").removeClass("subscribe unSub
954scribe"); 955 956 $changeCart.find("img").remove(); 957 if(http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"]){ 958 $changeCart.removeClass("added").removeClass("disabled").removeClass("requestPrice") 959 .html(LANG["ADD_BASKET_DEFAULT_LABEL"]) 960 .prepend($("<img />").attr({src: TEMPLATE_PATH + "/images/incart.png", class: "icon"})) 961 .attr("href", "#"); 962 }else{ 963 $changeFastBack.addClass("disabled"); 964 $changeCart.removeClass("added").addClass("disabled").addClass("requestPrice") 965 .html(LANG["REQUEST_PRICE_BUTTON_LABEL"]) 966 .prepend($("<img />").attr({src: TEMPLATE_PATH + "/images/request.png", class: "icon"})) 967 .attr("href", "#"); 968 } 969 970 if(http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"]){ 971 if($product.data("hide-measure") != "Y" && http[0]["PRODUCT"]["MEASURE"] != undefined && http[0]["PRODUCT"]["MEASURE"]["SYMBOL_RUS"] != ""){ 972 $product.find(".price").append( 973 $("<span/>").addClass("measure").html( 974 " / " + http[0]["PRODUCT"]["MEASURE"]["SYMBOL_RUS"] + " " 975 ) 976 ); 977 } 978 } 979 980 if(http[0]["PRODUCT"]["PRICE"]["RESULT_PRICE"]["DISCOUNT"] > 0){ 981 $product.find(".price").append( 982 $("<span/>").addClass("oldPriceLabel").html(CATALOG_LANG["FAST_VIEW_OLD_PRICE_LABEL"]).append( 983 $("<s/>").addClass("discount").html( 984 http[0]["PRODUCT"]["PRICE"]["RESULT_PRICE"]["BASE_PRICE"] 985 ) 986 ) 987 ); 988 } 989 990 if(http[0]["PRODUCT"]["COUNT_PRICES"] > 1){ 991 $product.find(".price").addClass("getPricesWindow").data("id", http[0]["PRODUCT"]["ID"]).prepend($("<span/>", {class: "priceIcon"})).attr("href", "#"); 992 }else{ 993 $product.find(".price").removeAttr("href").find(".priceIcon").remove(); 994 } 995 996 var $changeAvailable = $product.find(".changeAvailable"); 997 998 $changeAvailable.removeClass("getStoresWindow"); 999 $changeAvailable.removeClass("outOfStock"); 1000 $changeAvailable.removeClass("onOrder"); 1001 $changeAvailable.removeClass("inStock"); 1002 $changeAvailable.removeAttr("href"); 1003 1004 1005 if(http[0]["PRODUCT"]["CATALOG_QUANTITY"] > 0){ 1006 if(http[0]["PRODUCT"]["STORES_COUNT"] > 1){ 1007 $changeAvailable.html($("<span/>").html(LANG["CATALOG_AVAILABLE"])).addClass("inStock").attr("href", "#").addClass("getStoresWindow").data("id", http[0]["PRODUCT"]["ID"]); 1008 $changeAvailable.prepend( 1009 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/inStock.png") 1010 ); 1011 }else{ 1012 $changeAvailable.html(LANG["CATALOG_AVAILABLE"]).addClass("inStock"); 1013 $changeAvailable.prepend( 1014 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/inStock.png") 1015 ); 1016 } 1017 }else{ 1018 if(http[0]["PRODUCT"]["CAN_BUY"] != "Y"){ 1019 $changeAvailable.html(LANG["CATALOG_NO_AVAILABLE"]).addClass("outOfStock"); 1020 $changeFastBack.addClass("disabled"); 1021 1022 if(http[0]["PRODUCT"]["CATALOG_SUBSCRIBE"] == "Y" && http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"]){ 1023 $changeCart.html(LANG["ADD_SUBSCRIBE_LABEL"]) 1024 .prepend($("<img />").attr({src: TEMPLATE_PATH + "/images/subscribe.png", class: "icon"})) 1025 .attr("href", "#").addClass("subscribe"); 1026 } 1027 1028 else{ 1029 $changeCart.addClass("disabled"); 1030 } 1031 1032 $changeAvailable.prepend( 1033 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/outOfStock.png") 1034 ); 1035 }else{ 1036/*AGT $changeAvailable.html(LANG["CATALOG_ON_ORDER"]).addClass("onOrder"); 1037 $changeAvailable.prepend( 1038 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/onOrder.png") 1039 ); */ 1040 $changeAvailable.html(LANG["CATALOG_AVAILABLE"]).addClass("inStock"); 1041 $changeAvailable.prepend( 1042 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/inStock.png") 1043 ); 1044 } 1045 } 1046 1047 //article 1048 1049 if(typeof(http[0]["PRODUCT"]["PROPERTIES"]["CML2_ARTICLE"]) != "undefined"){ 1050 if(typeof(http[0]["PRODUCT"]["PROPERTIES"]["CML2_ARTICLE"]["VALUE"]) != "undefined" && http[0]["PRODUCT"]["PROPERTIES"]["CML2_ARTICLE"]["VALUE"] !=""){ 1051 $product.find(".changeArticle").html(http[0]["PRODUCT"]["PROPERTIES"]["CML2_ARTICLE"]["VALUE"]).parents(".article").removeClass("hidden"); 1052 }else{ 1053 if($product.find(".changeArticle").data("first-value")){ 1054 $product.find(".changeArticle").html($product.find(".changeArticle").data("first-value")); 1055 }else{ 1056 $product.find(".changeArticle").parents(".article").addClass("hidden"); 1057 } 1058 } 1059 } 1060 1061 //desc 1062 var $productDescription = $product.find(".appFastViewDescription"); 1063 var $productDescriptionText = $productDescription.find(".appFastViewDescriptionText"); 1064 if(http[0]["PRODUCT"]["PREVIEW_TEXT"]){ 1065 $productDescription.addClass("visible"); 1066 $productDescriptionText.html(http[0]["PRODUCT"]["PREVIEW_TEXT"]); 1067 }else{ 1068 $productDescription.removeClass("visible"); 1069 } 1070 1071 1072 //QTY BOX 1073 1074 //get qty box () 1075 var $qtyBox = $product.find(".catalogQtyBlock .catalogQty"); 1076 $qtyBox.removeAttr("data-extended-price").removeData("extended-price"); 1077 1078 //write values 1079 $qtyBox.val(http[0]["PRODUCT"]["BASKET_STEP"]).data("max-quantity", http[0]["PRODUCT"]["CATALOG_QUANTITY"]).data("step", http[0]["PRODUCT"]["BASKET_STEP"]).removeClass("error"); 1080 $changeCart.data("quantity", http[0]["PRODUCT"]["BASKET_STEP"]); 1081 1082 if(typeof http[0]["PRODUCT"]["PRICE"]["EXTENDED_PRICES_JSON_DATA"] != "undefined"){ 1083 if(http[0]["PRODUCT"]["PRICE"]["EXTENDED_PRICES_JSON_DATA"] != ""){ 1084 $qtyBox.data("extended-price", http[0]["PRODUCT"]["PRICE"]["EXTENDED_PRICES_JSON_DATA"]); 1085 } 1086 } 1087 1088 if(http[0]["PRODUCT"]["CATALOG_QUANTITY_TRACE"] == "Y" && http[0]["PRODUCT"]["CATALOG_CAN_BUY_ZERO"] == "N"){ 1089 $qtyBox.data("enable-trace", "Y"); 1090 }else{ 1091 $qtyBox.data("enable-trace", "N"); 1092 } 1093 1094 if(http[0]["PRODUCT"]["IMAGES"]){ 1095 1096 var $appFastViewPictureSliderItems = $product.find(".appFastViewPictureSliderItems").css({left: 0}); 1097 var $appFastViewPictureCarouselItems = $product.find(".appFastViewPictureCarouselItems").css({left: 0}); 1098 1099 $appFastViewPictureSliderItems.empty(); 1100 $appFastViewPictureCarouselItems.empty(); 1101 1102 $.each(http[0]["PRODUCT"]["IMAGES"], function(i, nextElement){ 1103 $appFastViewPictureSliderItems.append( 1104 $("<div />", {class: "appFastViewPictureSliderItem"}).append( 1105 $("<div />", {class: "appFastViewPictureSliderItemLayout"}).append( 1106 $("<a />", {class: "appFastViewPictureSliderItemLink", href: http[0]["PRODUCT"]["DETAIL_PAGE_URL"]}).data("loupe-picture", nextElement["SUPER_LARGE_PICTURE"]["src"]).append( 1107 $("<img />", {class: "appFastViewPictureSliderItemPicture", src: nextElement["LARGE_PICTURE"]["src"]}) 1108 ) 1109 ) 1110 ) 1111 ); 1112 1113 $appFastViewPictureCarouselItems.append( 1114 $("<div />", {class: "appFastViewPictureCarouselItem"}).append( 1115 $("<a />", {class: "appFastViewPictureCarouselItemLink", href: "#"}).append( 1116 $("<img />", {class: "appFastViewPictureCarouselItemPicture", src: nextElement["SMALL_PICTURE"]["src"]}) 1117 ) 1118 ) 1119 ); 1120 1121 }); 1122 1123 // //addCart button reload 1124 // changeAddCartButton(basketProductsNow); 1125 // //subscribe button reload 1126 // subscribeOnline(); 1127 1128 //sliders 1129 fastViewInitPictureSlider(); 1130 fastViewInitPictureCarousel(); 1131 1132 } 1133 }; 1134 1135 var selectSku = function(event){ 1136
1137 if(skuLoading == true){ 1138 return false; 1139 } 1140 1141 var _params = ""; 1142 var _props = ""; 1143 var _highload= ""; 1144 var _product_width = 200; 1145 var _product_height = 180; 1146 1147 var $_this = $(this); 1148 var $_mProductContainer = $_this.parents(".item"); 1149 var $_mProduct = $_this.parents(".sku"); 1150 var $_parentProp = $_this.parents(".skuProperty"); 1151 var $_propList = $_mProduct.find(".skuProperty"); 1152 var $_clickedProp = $_this.parents(".skuPropertyValue"); 1153 1154 var _level = $_parentProp.data("level"); 1155 1156 $_this.parents(".skuPropertyList").find("li").removeClass("selected"); 1157 $_clickedProp.addClass("selected loading"); 1158 1159 skuLoading = true; //block 1160 1161 // set product image paramets 1162 if($_mProduct.data("product-width") != undefined){ 1163 _product_width = $_mProduct.data("product-width"); 1164 } 1165 1166 if($_mProduct.data("product-height") != undefined){ 1167 _product_height = $_mProduct.data("product-height"); 1168 } 1169 1170 $_propList.each(function(i, prop){ 1171 1172 var $_nextProp = $(prop); 1173 var $_nextPropList = $_nextProp.find("li"); 1174 1175 var propName = $_nextProp.data("name"); 1176 var _used = false; 1177 1178 if($_nextProp.data("highload") == "Y"){ 1179 _highload = _highload + propName + ";" 1180 } 1181 1182 $_nextPropList.each(function(io, obj){ 1183 var $_currentObj = $(obj); 1184 _props = _props + propName + ":" + $_currentObj.data("value") + ";"; 1185 if($_currentObj.hasClass("selected")){ 1186 _params = _params + propName + ":" + $_currentObj.data("value") + ";"; 1187 return _used = true; 1188 } 1189 }); 1190 1191 if(!_used){ 1192 _params = _params + propName + ":-forse;"; 1193 } 1194 1195 }); 1196 1197 $.getJSON(ajaxPath + "?act=selectSku&props=" + encodeURIComponent(_props) + "¶ms=" + encodeURIComponent(_params) + "&level=" + _level + "&iblock_id=" + $_mProduct.data("iblock-id") + "&prop_id=" + $_mProduct.data("prop-id") + "&product_id=" + $_mProduct.data("product-id") + "&highload=" + encodeURIComponent(_highload) + "&product_width=" + _product_width + "&product_height=" + _product_height + "&product-change-prop=" + $_mProduct.data("change-prop") + "&product-more-pictures=" + $_mProduct.data("more-pictures") + "&price-code=" + encodeURIComponent($_mProductContainer.data("price-code"))) 1198 .done(function(http){ 1199 $_propList.each(function(pI, pV){ 1200 var $_sf = $(pV); 1201 $_sf.data("level") > _level && $_sf.find(".skuPropertyValue").removeClass("selected").addClass("disabled"); 1202 }); 1203 $.each(http[1]["PROPERTIES"], function(name, val){ 1204 var $_gPropList = $_propList.filter(function(){ return ($(this).data("name") == name); }); 1205 var $_gPropListValues = $_gPropList.find(".skuPropertyValue"); 1206 $_gPropListValues.each(function(il, element){ 1207 var $nextElement = $(element); 1208 $.each(val, function(pVal, _selected){ 1209 if(pVal == $nextElement.data("value") && _selected != "D"){ 1210 (_selected == "Y") ? $nextElement.addClass("selected").removeClass("disabled").trigger("click") : $nextElement.removeClass("disabled"); 1211 return false; 1212 } 1213 }); 1214 }); 1215 }); 1216 1217 if($_mProduct.data("cast-func")){ 1218 eval($_mProduct.data("castFunc"))($_mProduct, http); // callback function for cast sku change. 1219 }else{ 1220 1221 var $namer = $_mProduct.find(".name"); 1222 var $nameMiddler = $namer.find(".middle"); 1223 var $elPicture = $_mProduct.find(".picture"); 1224 var $changeFastBack = $_mProduct.find(".fastBack").removeClass("disabled"); 1225 1226 if($nameMiddler){ 1227 $namer.attr("href", http[0]["PRODUCT"]["DETAIL_PAGE_URL"]); 1228 $nameMiddler.html(http[0]["PRODUCT"]["NAME"]); 1229 }else{ 1230 $namer.attr("href", http[0]["PRODUCT"]["DETAIL_PAGE_URL"]).html(http[0]["PRODUCT"]["NAME"]); 1231 } 1232 1233 $elPicture.attr("href", http[0]["PRODUCT"]["DETAIL_PAGE_URL"]); 1234 $elPicture.html($("<img/>").attr("src", http[0]["PRODUCT"]["PICTURE"])); 1235 $elPicture.append($("<span />", {class: "getFastView"}).data("id", http[0]["PRODUCT"]["ID"]).html(LANG["FAST_VIEW_PRODUCT_LABEL"])); 1236 1237 $_mProduct.find(".addCart, .fastBack, .addCompare").data("id", http[0]["PRODUCT"]["ID"]).attr("data-id", http[0]["PRODUCT"]["ID"]); 1238 1239 if(http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"]){ 1240 $_mProduct.find(".price").html(http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"] + " ").removeClass("getPricesWindow"); 1241 }else{ 1242 $_mProduct.find(".price").html(LANG["REQUEST_PRICE_LABEL"]).removeClass("getPricesWindow"); 1243 } 1244 1245 var $changeCart = $_mProduct.find(".addCart").removeClass("subscribe unSub
1245scribe"); 1246 1247 $changeCart.find("img").remove(); 1248 if(http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"]){ 1249 $changeCart.removeClass("added").removeClass("disabled").removeClass("requestPrice") 1250 .html(LANG["ADD_BASKET_DEFAULT_LABEL"]) 1251 .prepend($("<img />").attr({src: TEMPLATE_PATH + "/images/incart.png", class: "icon"})) 1252 .attr("href", "#"); 1253 }else{ 1254 $changeFastBack.addClass("disabled"); 1255 $changeCart.removeClass("added").addClass("disabled").addClass("requestPrice") 1256 .html(LANG["REQUEST_PRICE_BUTTON_LABEL"]) 1257 .prepend($("<img />").attr({src: TEMPLATE_PATH + "/images/request.png", class: "icon"})) 1258 .attr("href", "#"); 1259 http[0]["PRODUCT"]["CAN_BUY"] = "N"; 1260 } 1261 1262 if(http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"]){ 1263 if($_mProduct.data("hide-measure") != "Y" && http[0]["PRODUCT"]["MEASURE"] != undefined && http[0]["PRODUCT"]["MEASURE"]["SYMBOL_RUS"] != ""){ 1264 $_mProduct.find(".price").append( 1265 $("<span/>").addClass("measure").html( 1266 " / " + http[0]["PRODUCT"]["MEASURE"]["SYMBOL_RUS"] + " " 1267 ) 1268 ); 1269 } 1270 } 1271 1272 if(http[0]["PRODUCT"]["PRICE"]["RESULT_PRICE"]["DISCOUNT"] > 0){ 1273 $_mProduct.find(".price").append( 1274 $("<s/>").addClass("discount").html( 1275 http[0]["PRODUCT"]["PRICE"]["RESULT_PRICE"]["BASE_PRICE"] 1276 ) 1277 ); 1278 } 1279 1280 if(http[0]["PRODUCT"]["COUNT_PRICES"] > 1){ 1281 $_mProduct.find(".price").addClass("getPricesWindow").data("id", http[0]["PRODUCT"]["ID"]).prepend($("<span/>", {class: "priceIcon"})).attr("href", "#"); 1282 }else{ 1283 $_mProduct.find(".price").find(".priceIcon").remove(); 1284 } 1285 1286 var $changeAvailable = $_mProduct.find(".changeAvailable"); 1287 1288 $changeAvailable.removeClass("getStoresWindow"); 1289 $changeAvailable.removeClass("outOfStock"); 1290 $changeAvailable.removeClass("onOrder"); 1291 $changeAvailable.removeClass("inStock"); 1292 $changeAvailable.removeAttr("href"); 1293 1294 1295 if(http[0]["PRODUCT"]["CATALOG_QUANTITY"] > 0){ 1296 if(http[0]["PRODUCT"]["STORES_COUNT"] > 1){ 1297 $changeAvailable.html($("<span/>").html(LANG["CATALOG_AVAILABLE"])).addClass("inStock").attr("href", "#").addClass("getStoresWindow").data("id", http[0]["PRODUCT"]["ID"]); 1298 $changeAvailable.prepend( 1299 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/inStock.png") 1300 ); 1301 }else{ 1302 $changeAvailable.html(LANG["CATALOG_AVAILABLE"]).addClass("inStock"); 1303 $changeAvailable.prepend( 1304 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/inStock.png") 1305 ); 1306 } 1307 }else{ 1308 if(http[0]["PRODUCT"]["CAN_BUY"] != "Y"){ 1309 1310 $changeAvailable.html(LANG["CATALOG_NO_AVAILABLE"]).addClass("outOfStock"); 1311 $changeFastBack.addClass("disabled"); 1312 1313 if(http[0]["PRODUCT"]["CATALOG_SUBSCRIBE"] == "Y" && http[0]["PRODUCT"]["PRICE"]["DISCOUNT_PRICE"]){ 1314 $changeCart.html(LANG["ADD_SUBSCRIBE_LABEL"]) 1315 .prepend($("<img />").attr({src: TEMPLATE_PATH + "/images/subscribe.png", class: "icon"})) 1316 .attr("href", "#").addClass("subscribe"); 1317 } 1318 1319 else{ 1320 $changeCart.addClass("disabled"); 1321 } 1322 1323 $changeAvailable.prepend( 1324 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/outOfStock.png") 1325 ); 1326 1327 }else{ 1328/*AGT $changeAvailable.html(LANG["CATALOG_ON_ORDER"]).addClass("onOrder"); 1329 $changeAvailable.prepend( 1330 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/onOrder.png") 1331 );*/ 1332 $changeAvailable.html(LANG["CATALOG_AVAILABLE"]).addClass("inStock"); 1333 $changeAvailable.prepend( 1334 $("<img/>").addClass("icon").attr("src", TEMPLATE_PATH + "/images/inStock.png") 1335 ); 1336 } 1337 } 1338 } 1339 1340 //addCart button reload 1341 changeAddCartButton(basketProductsNow); 1342 //subscribe button reload 1343 subscribeOnline(); 1344 1345 $_clickedProp.removeClass("loading"); 1346 skuLoading = false; 1347 1348 }).fail(function(jqxhr, textStatus, error){ 1349 $_clickedProp.removeClass("loading"); 1350 skuLoading = false; 1351 alert("Request Failed: " + textStatus + ", " + error); 1352 }); 1353 1354 event.preventDefault(); 1355 1356 } 1357 1358 var addSubscribe = function(event){ 1359 1360 //j vars 1361 $body = $("body");
1362 $this = $(this); 1363 1364 //vars 1365 productId = $this.data("id"); 1366 1367 //check id 1368 if(productId != ""){ 1369 1370 //loader 1371 $this.addClass("loading"); 1372 1373 //get subscribe window 1374 $.getJSON(ajaxPath + "?act=addSubscribe&id=" + productId + "&site_id=" + SITE_ID, function(jsonData){ 1375 1376 if(jsonData["SUCCESS"] == "Y"){ 1377 1378 //metrica 1379 if(typeof globalSettings != "undefined" && typeof globalSettings["TEMPLATE_METRICA_SUBSCRIBE"] != "undefined" && typeof globalSettings["TEMPLATE_METRICA_ID"] != "undefined"){ 1380 window["yaCounter" + globalSettings["TEMPLATE_METRICA_ID"]].reachGoal(globalSettings["TEMPLATE_METRICA_SUBSCRIBE"]); 1381 } 1382 1383 //show form 1384 if(jsonData["SUBSCRIBE_FORM"] != ""){ 1385 $body.append(jsonData["SUBSCRIBE_FORM"]); 1386 $this.removeClass("loading"); 1387 } 1388 1389 } 1390 1391 else{ 1392 console.error(jsonData); 1393 } 1394 1395 }); 1396 1397 } 1398 1399 else{ 1400 //show error 1401 console.error("product id not found"); 1402 1403 } 1404 1405 //block action 1406 return event.preventDefault(); 1407 1408 }; 1409 1410 var unSubscribe = function(event){ 1411 1412 //j vars 1413 $this = $(this); 1414 $thisImage = $this.find("img"); 1415 1416 //vars 1417 subscribeId = $this.data("subscribe-id"); 1418 1419 //check id 1420 if(subscribeId != ""){ 1421 1422 //loader 1423 $this.addClass("loading"); 1424 1425 //get subscribe window 1426 $.getJSON(ajaxPath + "?act=unSubscribe&subscribeId=" + subscribeId + "&site_id=" + SITE_ID, function(jsonData){ 1427 1428 if(jsonData["SUCCESS"] == "Y"){ 1429 $this.data("subscribe-id", "").text(LANG["ADD_SUBSCRIBE_LABEL"]).prepend($thisImage.attr({ 1430 src: TEMPLATE_PATH + "/images/subscribe.png", 1431 })).removeClass("unSubscribe"); 1432 } 1433 1434 else{ 1435 console.error(jsonData); 1436 } 1437 1438 }); 1439 1440 } 1441 1442 else{ 1443 //show error 1444 console.error("product id not found"); 1445 1446 } 1447 return event.preventDefault(); 1448 }; 1449 1450 var addCart = function(event){ 1451 1452 var $this = $(this); 1453 var productID = $this.data("id"); 1454 var quantity = $this.data("quantity"); 1455 var windowDisplay = $this.data("display-window"); 1456 var refreshPage = $this.data("refresh-page"); 1457 var addedLabel = $this.data("cart-label"); 1458 1459 var _arID = []; 1460 1461 if(!$this.hasClass("disabled") && !$this.hasClass("subscribe")){ 1462 1463 if($this.attr("href") === "#"){ 1464 1465 //metrica 1466 if(typeof globalSettings != "undefined" && typeof globalSettings["TEMPLATE_METRICA_ADD_CART"] != "undefined" && typeof globalSettings["TEMPLATE_METRICA_ID"] != "undefined"){ 1467 window["yaCounter" + globalSettings["TEMPLATE_METRICA_ID"]].reachGoal(globalSettings["TEMPLATE_METRICA_ADD_CART"]); 1468 } 1469 1470 if($this.hasClass("multi")){ 1471 if($this.data("selector") != "" && $this.attr("href") === "#"){ 1472 $this.addClass("loading").text(LANG["ADD_CART_LOADING"]); 1473 var $addElements = $($this.data("selector")).filter(":not(.disabled)"); 1474 var elementsQuantity = ""; 1475 if($addElements.length > 0){ 1476 $addElements.each(function(x, elx){ 1477 var $elx = $(elx); 1478 if($elx.data("id") != ""){ 1479 _arID[x] = $elx.data("id"); 1480 if(parseFloat($elx.data("quantity")) != ""){ 1481 elementsQuantity += $elx.data("id") + ":" + parseFloat($elx.data("quantity")) + ";"; 1482 } 1483 } 1484 }); 1485 1486 if(_arID != ""){ 1487 $.getJSON(ajaxPath + "?act=addCart&id=" + _arID.join(";") + "&q="+ elementsQuantity +"&multi=1&site_id=" + SITE_ID, function(data) { 1488 var $imageAfterLoad = $this.find("img"); 1489 $this.text(LANG["ADDED_CART_SMALL"]) 1490 .attr("href", SITE_DIR + "personal/cart/") 1491 .prepend($imageAfterLoad.attr("src", TEMPLATE_PATH + "/images/added.png")) 1492 .removeClass("loading") 1493 .addClass("added"); 1494 cartReload(); 1495 });
1496 }else{ 1497 alert("error (5)"); 1498 } 1499 }else{ 1500 alert("error(6)"); 1501 } 1502 event.preventDefault(); 1503 } 1504 }else{ 1505 1506 if(parseInt(productID, 10) > 0){ 1507 1508 $this.addClass("loading"); 1509 1510 var gObj = { 1511 act: "addCart", 1512 id: productID, 1513 site_id: SITE_ID 1514 }; 1515 1516 if(quantity > 0){ 1517 gObj["q"] = quantity; 1518 } 1519 1520 $.getJSON(ajaxPath, gObj).done(function(jData){ 1521 1522 var reloadCart = cartReload(); 1523 1524 //show display window 1525 if(typeof(windowDisplay) == "undefined" || typeof(windowDisplay) != "undefined" && windowDisplay == "Y"){ 1526 var cartWindow = displayWindow(jData); 1527 } 1528 1529 //change add cart label 1530 LANG["BASKET_ADDED"] = typeof(addedLabel) == "undefined" ? LANG["BASKET_ADDED"] : addedLabel; 1531 1532 var $imageAfterLoad = $this.find("img"); 1533 1534 $(".bwOpened").removeClass("bwOpened"); 1535 lastAddCartText = $this.html(); 1536 1537 $this.removeClass("loading") 1538 .addClass("added") 1539 .addClass("bwOpened") 1540 .html(LANG["BASKET_ADDED"]) 1541 .prepend($imageAfterLoad.attr("src", TEMPLATE_PATH + "/images/added.png")) 1542 .attr("href", SITE_DIR + "personal/cart/"); 1543 1544 1545 //reload page after add cart 1546 if(typeof(refreshPage) != "undefined" && refreshPage == "Y"){ 1547 document.location.reload(); 1548 window.scrollTo(0, 0); 1549 } 1550 1551 }).fail(function(jqxhr, textStatus, error){ 1552 1553 $this.removeClass("loading") 1554 .addClass("error"); 1555 1556 alert("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443. \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443."); 1557 1558 console.error( 1559 "Request Failed: " + textStatus + ", " + error 1560 ); 1561 1562 }); 1563 1564 } 1565 } 1566 }else{ 1567 return true; 1568 } 1569 } 1570 1571 return event.preventDefault(); 1572 1573 } 1574 1575 var displayWindow = function(jData){ 1576 if($(window).width() > 700){ 1577 var $appBasket = $("#appBasket").data("id", jData["ID"]).show(); 1578 var $container = $appBasket.find(".container"); 1579 var $foundation = $("#foundation").addClass("blurred"); 1580 var $changeAvailable = $appBasket.find(".availability"); 1581 var $moreLink = $appBasket.find(".moreLink").attr("href", jData["DETAIL_PAGE_URL"]); 1582 var $image = $appBasket.find(".image").attr("src", $appBasket.data("load")); 1583 var $wishlist = $appBasket.find(".addWishlist").data("id", jData["ID"]); 1584 var $compare = $appBasket.find(".addCompare").data("id", jData["ID"]); 1585 var $picture = $appBasket.find(".picture"); 1586 var $delete = $appBasket.find(".delete").data("id", jData["CART_ID"]); 1587 var $price = $appBasket.find(".price").html(jData["PRICE"]).data({"price": jData["~PRICE"], "discount": jData["OLD_PRICE"]}); 1588 var $allSum = $appBasket.find(".allSum").html(jData["SUM"]); 1589 var $name = $appBasket.find(".name").text(jData["NAME"]) 1590 var $qty = $appBasket.find(".qty").val(jData["QUANTITY"]).data("id", jData["ID"]).data("ratio", jData["ADDBASKET_QUANTITY_RATIO"]).removeClass("error"); 1591 var $minus = $appBasket.find(".minus").data("id", jData["ID"]); 1592 var $plus = $appBasket.find(".plus").data("id", jData["ID"]); 1593 1594 $changeAvailable.removeClass("outOfStock"); 1595 $changeAvailable.removeClass("onOrder"); 1596 $changeAvailable.removeClass("inStock"); 1597 1598 1599 if(jData["CATALOG_QUANTITY"] > 0){ 1600 $changeAvailable.addClass("inStock"); 1601 }else{ 1602 if(jData["CAN_BUY"] != true){ 1603 $changeAvailable.addClass("outOfStock"); 1604 }else{ 1605 $changeAvailable.addClass("onOrder"); 1606 } 1607 } 1608 1609 if(jData["MEASURE_SYMBOL_RUS"] != undefined && jData["MEASURE_SYMBOL_RUS"] != ""){ 1610 $price.append( 1611 $("<span/>").addClass("measure").html( 1612 " / " + jData["MEASURE_SYMBOL_RUS"] + " " 1613 ) 1614 ); 1615 } 1616 1617 if(parseInt(jData["DISCOUNT_PRICE"], 10) > 0){ 1618 $price.append( 1619 $("<s>") 1620 .addClass("discount") 1621 .html(jData["DISCOUNT_PRICE"]) 1622 ); 1623 } 1624 1625 if(parseInt(jData["DISCOUNT_SUM"], 10) > 0){ 1626 $allSum.append( 1627 $("<s>") 1628 .addClass("discount") 1629 .html(jData["DISCOUNT_SUM"]) 1630 ); 1631 } 1632 1633 if(jData["RATING"] != undefined){ 1634 1635 $container.prepend( 1636 $("<div>").addClass("rating") 1637 .append( 1638 $("<i>") 1639 .addClass("m") 1640 .css("width", (jData["RATING"] * 100 / 5) + "%") 1641 ) 1642 .append( 1643 $("<i>") 1644 .addClass("h") 1645 ) 1646 1647 ); 1648 } 1649 1650 $picture.find(".markerContainer") 1651 .remove(); 1652 1653 if(jData["MARKER"] != undefined){ 1654
1655 $picture.prepend( 1656 $("<div>").addClass("markerContainer") 1657 .append( 1658 jData["MARKER"] 1659 ) 1660 1661 ); 1662 } 1663 1664 loadingPictureControl(jData["DETAIL_PICTURE"], function(){ 1665 $image.attr("src", jData["DETAIL_PICTURE"]); 1666 }); 1667 1668 appOpen = true; //global flag 1669 } 1670 1671 }; 1672 1673 var appBasketDelete = function(event){ 1674 1675 var $this = $(this) 1676 .addClass("loading"); 1677 1678 var gObj = { 1679 id: $this.data("id"), 1680 act: "del" 1681 }; 1682 1683 $.get(ajaxPath, gObj).done(function(hData){ 1684 1685 if(hData != ""){ 1686 var $savedItems = $(".bwOpened").removeClass("added").attr("href", "#"); 1687 $("#appBasket .closeWindow").trigger("click"); 1688 $this.removeClass("loading"); 1689 $savedItems.html(lastAddCartText); 1690 cartReload(); 1691 }else{ 1692 $this.removeClass("loading") 1693 .addClass("error"); 1694 } 1695 1696 }).fail(function(jqxhr, textStatus, error){ 1697 1698 $this.removeClass("loading") 1699 .addClass("error"); 1700 1701 console.error( 1702 "Request Failed: " + textStatus + ", " + error 1703 ); 1704 1705 }); 1706 1707 return event.preventDefault(); 1708 }; 1709 1710 var appBasketClose = function(event){ 1711 1712 var $appBasket = $("#appBasket").hide(); 1713 var $foundation = $("#foundation").removeClass("blurred"); 1714 1715 appOpen = false; //global flag 1716 1717 return event.preventDefault(); 1718 }; 1719 1720 var appBasketMinus = function(event){ 1721 var $this = $(event.currentTarget); 1722 var $qty = $this.siblings(".qty").removeClass("error"); 1723 var gQuantity = Number($qty.val()); 1724 var qtyRatio = Number($qty.data("ratio")); 1725 1726 if(gQuantity > qtyRatio){ 1727 $qty.val((gQuantity * 10 - qtyRatio * 10 ) / 10); 1728 } 1729 1730 appBasketCalc($qty, $this.data("id")); 1731 return event.preventDefault(); 1732 }; 1733 1734 var appBasketPlus = function(event){ 1735 1736 var $this = $(event.currentTarget); 1737 var $qty = $this.siblings(".qty").removeClass("error"); 1738 var gQuantity = Number($qty.val()); 1739 var qtyRatio = Number($qty.data("ratio")); 1740 1741 var finishValue = ((gQuantity * 10 + qtyRatio * 10) / 10); 1742 finishValue = finishValue > 9999 ? 9999 : finishValue; 1743 1744 $qty.val(finishValue); 1745 appBasketCalc($qty, $this.data("id")); 1746 1747 return event.preventDefault(); 1748 }; 1749 1750 var appBasketChange = function(event){ 1751 1752 var $this = $(this); 1753 var gValue = $this.val(); 1754 var qtyRatio = Number($this.data("ratio")); 1755 var wValue; 1756 1757 if(gValue.replace(/[^\d]/gi, '') != gValue){ 1758 wValue = qtyRatio; 1759 }else if(Number(gValue) > qtyRatio){ 1760 wValue = Number(gValue); 1761 }else{ 1762 wValue = qtyRatio; 1763 } 1764 1765 wValue = Math.ceil(wValue / qtyRatio) * qtyRatio; 1766 wValue = wValue > 9999 ? 9999 : wValue; 1767 1768 var tmpWValue = $this.val(wValue); 1769 var tmpWId = $this.data("id"); 1770 1771 clearTimeout(appBasketChangeTimeout); 1772 appBasketChangeTimeout = setTimeout(function() { 1773 appBasketCalc(tmpWValue, tmpWId); 1774 }, 600); 1775 1776 return event.preventDefault(); 1777 }; 1778 1779 var appBasketCalc = function($qty, productID){ 1780 1781 var $appBasket = $("#appBasket"); 1782 var $price = $appBasket.find(".price"); 1783 var $sum = $appBasket.find(".allSum"); 1784 var gStrSum = $sum.html().replace(/\d\.\d/g, '').replace(/[0-9]/g, ''); 1785 $qty.removeClass("error"); 1786 1787 var tmpPriceSum = $price.data("price") * $qty.val(); 1788 1789 $sum.html( 1790 formatPrice( 1791 tmpPriceSum.toFixed(0) 1792 ) + gStrSum 1793 ); 1794 1795 if($price.data("discount") > 0){ 1796 1797 var $sumDiscount = $sum.find(".discount"); 1798 var gstrSumDiscount = $sumDiscount.html().replace(/\d\.\d/g, '').replace(/[0-9]/g, ''); 1799 var tmpDiscPrice = $price.data("discount") * $qty.val(); 1800 1801 $sumDiscount.html( 1802 formatPrice( 1803 tmpDiscPrice.toFixed(0) 1804 ) + gstrSumDiscount 1805 ); 1806 } 1807 1808 clearTimeout(flushTimeout); 1809 flushTimeout = setTimeout(function(){ 1810 flushCart(productID, $qty.val()) 1811 }, 500); 1812 1813 }; 1814 1815 var appBasketPlusHold = function(event){ 1816 intervalID = setInterval(function() { 1817 appBasketPlus(event); 1818 }, 150); 1819 }; 1820 1821 var appBasketPlusHoldUp = function(){ 1822 clearInterval(intervalID); 1823 }; 1824 1825 var appBasketMinusHold = function(event){ 1826 intervalID = setInterval(function() { 1827 appBasketMinus(event); 1828 }, 150); 1829 }; 1830 1831 var appBasketMinusHoldUp = function(){ 1832 clearInterval(intervalID); 1833 }; 1834 1835 var addCompare = function(event){ 1836 1837 var $this = $(event.currentTarget); 1838 var $icon = $this.find("img"); 1839 var productID = $this.data("id"); 1840 1841 if($this.attr("href") == "#"){ 1842 if(parseInt(productID, 10) > 0 && !$this.hasClass("added")){ 1843 1844 $this.addClass("loading"); 1845 1846 var gObj = { 1847 id: productID, 1848 act: "addCompare" 1849 }; 1850 1851 $.get(ajaxPath, gObj).done(function(hData){ 1852 if(hData != ""){ 1853 var reloadCart = cartReload(); 1854 if($this.data("no-label") == "Y"){ 1855 $this.removeClass("loading") 1856 .addClass("added") 1857 .attr("href", SITE_DIR + "compare/"); 1858 }else{ 1859 $this.removeClass("loading") 1860 .addClass("added") 1861 .html(LANG["ADD_COMPARE_ADDED"]) 1862 .prepend($icon) 1863 .attr("href", SITE_DIR + "compare/"); 1864 } 1865 }else{ 1866 $this.removeClass("loading") 1867 .addClass("error"); 1868 } 1869 }).fail(function(jqxhr, textStatus, error){ 1870 1871 $this.removeClass("loading") 1872 .addClass("error"); 1873 1874 console.error( 1875 "Request Failed: " + textStatus + ", " + error 1876 ); 1877 1878 }); 1879 } 1880 1881 return event.preventDefault(); 1882 } 1883 }; 1884 1885 var addWishlist = function(event){ 1886 1887 var $this = $(event.currentTarget); 1888 var $icon = $this.find("img"); 1889 var productID = $this.data("id"); 1890 1891 if($this.attr("href") == "#"){ 1892 if(parseInt(productID, 10) > 0 && !$this.hasClass("added")){ 1893 1894 $this.addClass("loading"); 1895 1896 var gObj = { 1897 id: productID, 1898 act: "addWishlist"
1899 }; 1900 1901 $.get(ajaxPath, gObj).done(function(hData){ 1902 if(hData != ""){ 1903 var reloadCart = cartReload(); 1904 if($this.data("no-label") == "Y"){ 1905 $this.removeClass("loading") 1906 .addClass("added") 1907 .attr("href", SITE_DIR + "wishlist/"); 1908 }else{ 1909 $this.removeClass("loading") 1910 .addClass("added") 1911 .html(LANG["WISHLIST_ADDED"]) 1912 .prepend($icon) 1913 .attr("href", SITE_DIR + "wishlist/"); 1914 } 1915 }else{ 1916 $this.removeClass("loading") 1917 .addClass("error"); 1918 } 1919 }).fail(function(jqxhr, textStatus, error){ 1920 1921 $this.removeClass("loading") 1922 .addClass("error"); 1923 1924 console.error( 1925 "Request Failed: " + textStatus + ", " + error 1926 ); 1927 1928 }); 1929 } 1930 1931 return event.preventDefault(); 1932 } 1933 }; 1934 1935 var openFastBack = function(event){ 1936 1937 var $this = $(this); 1938 1939 if(!$this.hasClass("disabled")){ 1940 1941 var $appFastBuy = $("#appFastBuy"); 1942 var $foundation = $("#foundation").addClass("blurred"); 1943 1944 $("#fastBuyOpenContainer").show(); 1945 $("#fastBuyResult").hide(); 1946 1947 $("#fastBuyForm").find('input[type="text"], textarea').val(""); 1948 1949 var productID = $this.data("id"); 1950 1951 $this.addClass("loading"); 1952 1953 var gObj = { 1954 id: productID, 1955 act: "getFastBuy" 1956 }; 1957 1958 $.getJSON(ajaxPath, gObj).done(function(jData){ 1959 1960 $this.removeClass("loading"); 1961 $appFastBuy.find("#fastBuyPicture .url, #fastBuyName .url").attr("href", jData[0]["DETAIL_PAGE_URL"]); 1962 $appFastBuy.find("#fastBuyPicture .picture").attr("src", $appFastBuy.data("load")); 1963 $appFastBuy.find("#fastBuyPrice").html(jData[0]["PRICE"]["PRICE_FORMATED"]); 1964 $appFastBuy.find("#fastBuyName .middle").html(jData[0]["NAME"]); 1965 $appFastBuy.find("#fastBuyFormId").val(jData[0]["ID"]); 1966 $appFastBuy.find(".markerContainer").remove(); 1967 1968 if(jData[0]["MARKER"] != undefined){ 1969 1970 $appFastBuy.find("#fastBuyPicture").prepend( 1971 $("<div>").addClass("markerContainer") 1972 .append( 1973 jData[0]["MARKER"] 1974 ) 1975 1976 ); 1977 } 1978 1979 $appFastBuy.show(); 1980 1981 loadingPictureControl(jData[0]["PICTURE"]["src"], function(){ 1982 $appFastBuy.find("#fastBuyPicture .picture").attr("src", jData[0]["PICTURE"]["src"]); 1983 }); 1984 1985 }).fail(function(jqxhr, textStatus, error){ 1986 1987 $.get(ajaxPath, gObj).done(function(Data){ 1988 console.log(Data) 1989 }); 1990 1991 $this.removeClass("loading") 1992 .addClass("error"); 1993 1994 console.error( 1995 "Request Failed: " + textStatus + ", " + error 1996 ); 1997 1998 }); 1999 2000 fastBuyOpen = true; 2001 } 2002 2003 return event.preventDefault(); 2004 }; 2005 2006 var sendFastBack = function(event){ 2007 2008 var $this = $(this).addClass("loading"); 2009 var $fastBuyForm = $("#fastBuyForm"); 2010 var $fastBuyFormName = $fastBuyForm.find("#fastBuyFormName").removeClass("error"); 2011 var $fastBuyFormTelephone = $fastBuyForm.find("#fastBuyFormTelephone").removeClass("error"); 2012 2013 if($fastBuyFormName.val() == ""){ 2014 $fastBuyFormName.addClass("error"); 2015 } 2016 2017 if($fastBuyFormTelephone.val() == ""){ 2018 $fastBuyFormTelephone.addClass("error"); 2019 } 2020 2021 var $personalInfo = $fastBuyForm.find("#personalInfoFastBuy"); 2022 if(!$personalInfo.prop("checked")){ 2023 $personalInfo.addClass("error"); 2024 } 2025 2026 if($fastBuyFormName.val() != "" && $fastBuyFormTelephone.val() !="" && $personalInfo.prop("checked")){ 2027 2028 $.getJSON(ajaxPath + "?" + $fastBuyForm.serialize()).done(function(jData){ 2029 2030 //metrica 2031 if(typeof globalSettings != "undefined" && typeof globalSettings["TEMPLATE_METRICA_FAST_BUY"] != "undefined" && typeof globalSettings["TEMPLATE_METRICA_ID"] != "undefined"){ 2032 window["yaCounter" + globalSettings["TEMPLATE_METRICA_ID"]].reachGoal(globalSettings["TEMPLATE_METRICA_FAST_BUY"]); 2033 } 2034 2035 $("#fastBuyResultTitle").html(jData["heading"]); 2036 $("#fastBuyResultMessage").html(jData["message"]); 2037 2038 $("#fastBuyOpenContainer").hide(); 2039 $("#fastBuyResult").show(); 2040 2041 $this.removeClass("loading"); 2042 2043 }).fail(function(jqxhr, textStatus, error){ 2044 2045 $this.removeClass("loading").addClass("error"); 2046 2047 console.error( 2048 "Request Failed: " + textStatus + ", " + error 2049 ); 2050 2051 }); 2052 2053 }else{ 2054 $this.removeClass("loading"); 2055 } 2056 2057 return event.preventDefault(); 2058 }; 2059 2060 var closeFastBack = function(event){
2061 var $appFastBuy = $("#appFastBuy").hide(); 2062 var $foundation = $("#foundation").removeClass("blurred"); 2063 return event.preventDefault(); 2064 }; 2065 2066 var removeFromWishlist = function(event){ 2067 2068 var $this = $(this); 2069 var $wishlist = $("#wishlist"); 2070 var $parentThis = $(this).parents(".item"); 2071 var productID = $this.data("id"); 2072 $this.addClass("loading"); 2073 2074 var gObj = { 2075 id: productID, 2076 act: "removeWishlist" 2077 }; 2078 2079 $.get(ajaxPath, gObj).done(function(hData){ 2080 if(hData != ""){ 2081 if($wishlist.find(".product, .itemRow").length == 1){ 2082 window.location.reload(); 2083 }else{ 2084 reloadCart = cartReload(); 2085 $parentThis.remove(); 2086 } 2087 }else{ 2088 $this.removeClass("loading") 2089 .addClass("error"); 2090 } 2091 }).fail(function(jqxhr, textStatus, error){ 2092 2093 $this.removeClass("loading") 2094 .addClass("error"); 2095 2096 console.error( 2097 "Request Failed: " + textStatus + ", " + error 2098 ); 2099 2100 }); 2101 2102 return event.preventDefault(); 2103 2104 }; 2105 2106 var slideCollapsedBlock = function(event){ 2107 var $collapsed = $("#left").children(".collapsed"); 2108 if(!$collapsed.is(":visible") || $collapsed.hasClass("toggled")){ 2109 $collapsed.stop().slideToggle().addClass("toggled"); 2110 return event.preventDefault(); 2111 } 2112 }; 2113 2114 var openSmartFiler = function(event){ 2115 $smartFilterForm = $("#smartFilterForm"); 2116 if ( $(window).width() > 1024 ) { 2117 if($smartFilterForm.is(":visible")){ 2118 $smartFilterForm.stop().slideUp("fast"); 2119 }else{ 2120 $smartFilterForm.stop().slideDown("fast"); 2121 } 2122 } 2123 }; 2124 2125 var openSmartSections = function(event){ 2126 $smartSections = $("#nextSection ul"); 2127 if($smartSections.is(":visible")){ 2128 $smartSections.stop().slideUp("fast"); 2129 }else{ 2130 $smartSections.stop().slideDown("fast"); 2131 } 2132 }; 2133 2134 var formatPrice = function(data) { 2135 var price = String(data).split('.'); 2136 var strLen = price[0].length; 2137 var str = ""; 2138 2139 for (var i = strLen; i > 0; i--) { 2140 str = str + ((!(i % 3) ? " " : "") + price[0][strLen - i]); 2141 } 2142 2143 return str + (price[1] != undefined ? "." + price[1] : ""); 2144 } 2145 2146 var loadingPictureControl = function(imagePath, callBack){ 2147 2148 if(imagePath){ 2149 var newImage = new Image(); 2150 $(newImage).one("load", callBack); 2151 newImage.src = imagePath; 2152 } 2153 2154 }; 2155 2156 //extented prices 2157 var catalogReCalcPrice = function($qtyBox, currentQuantity){ 2158 if(currentQuantity > 0){ 2159 2160 //price 2161 var $priceContainer = $qtyBox.parents(".item").find(".price"); 2162 var $priceValContainer = $priceContainer.find(".priceVal"); 2163 2164 //check for empty 2165 if($priceValContainer.length > 0){ 2166 var $priceContainerStr = $priceValContainer.html().replace(/\d\.\d/g, '').replace(/[0-9]/g, ''); 2167 } 2168 2169 //discount 2170 var $discountContainer = $priceContainer.find(".discount"); 2171 if($discountContainer.length > 0){ 2172 var $discountContainerStr = $discountContainer.html().replace(/\d\.\d/g, '').replace(/[0-9]/g, ''); 2173 } 2174 2175 //get price object 2176 var obExtentedPrices = $qtyBox.data("extended-price"); 2177 2178 if(typeof obExtentedPrices != "undefined"){ 2179 if(typeof obExtentedPrices == "string"){ 2180 obExtentedPrices = $.parseJSON(obExtentedPrices); 2181 } 2182 } 2183 2184 //check for empty object 2185 if(typeof obExtentedPrices == "object"){ 2186 2187 //each prices 2188 $.each(obExtentedPrices, function(index, nextValue){ 2189 2190 //check for empty quantity 2191 if(nextValue["QUANTITY_FROM"] != null || nextValue["QUANTITY_TO"] != null){ 2192 2193 //check for current quantity 2194 if((nextValue["QUANTITY_FROM"] == null || nextValue["QUANTITY_FROM"] != "" && currentQuantity >= nextValue["QUANTITY_FROM"]) && (nextValue["QUANTITY_TO"] == null || nextValue["QUANTITY_TO"] != "" && currentQuantity <= nextValue["QUANTITY_TO"])){ 2195 2196 //write price 2197 if(typeof nextValue["DISCOUNT_PRICE"] != "undefined"){ 2198 $priceValContainer.html(formatPrice(Number(nextValue["DISCOUNT_PRICE"]).toFixed(0)) + $priceContainerStr); 2199 } 2200 2201 //write discount 2202 if(typeof nextValue["OLD_PRICE"] != "undefined"){ 2203 $discountContainer.html(formatPrice(Number(nextValue["OLD_PRICE"]).toFixed(0)) + $discountContainerStr); 2204 } 2205 2206 } 2207 } 2208 }); 2209 } 2210 2211 } 2212 return; 2213 }; 2214 2215 var catalogAddCartPlus = function(event){ 2216 2217 var $this = $(this); 2218 var $qtyBox = $this.siblings(".catalogQtyBlock .catalogQty"); 2219 var $addCartBtn = $this.parent().siblings(".addCart"); 2220 2221 var xCurrentQtyValue = Number($qtyBox.val()); 2222 var xQtyStep = Number($qtyBox.data("step")); 2223 var xQtyExpression = Number((xCurrentQtyValue * 10 + xQtyStep * 10) / 10); //js magic .9999999 2224 2225 var _enableTrace = $qtyBox.data("enable-trace"); 2226 var _maxQuantity = Number($qtyBox.data("max-quantity")); 2227 2228 var __qtyError = false; 2229 var xTmpExpression = 0; 2230 2231 if(_enableTrace == "Y"){ 2232 2233 xTmpExpression = xQtyExpression; 2234 xQtyExpression = (xQtyExpression > _maxQuantity) ? _maxQuantity : xQtyExpression; 2235 2236 if(xTmpExpression != xQtyExpression){ 2237 __qtyError = true; 2238 } 2239 2240 } 2241 2242 $qtyBox.val(xQtyExpression); 2243 $addCartBtn.data("quantity", xQtyExpression); 2244 2245 //extented prices 2246 catalogReCalcPrice($qtyBox, xQtyExpression); 2247 2248 //set or remove error 2249 __qtyError === true ? $qtyBox.addClass("error") : $qtyBox.removeClass("error"); 2250 2251 return event.preventDefault(); 2252 2253 }; 2254 2255 var catalogAddCartMinus = function(event){ 2256 2257 var $this = $(this); 2258 var $qtyBox = $this.siblings(".catalogQtyBlock .catalogQty"); 2259 var $addCartBtn = $this.parent().siblings(".addCart"); 2260 2261 var xCurrentQtyValue = Number($qtyBox.val()); 2262 var xQtyStep = Number($qtyBox.data("step")); 2263 var xQtyExpression = Number((xCurrentQtyValue * 10 - xQtyStep * 10) / 10); //js magic .9999999 2264 2265 var _enableTrace = $qtyBox.data("enable-trace"); 2266 var _maxQuantity = Number($qtyBox.data("max-quantity")); 2267 2268 var __qtyError = false; 2269 var xTmpExpression = 0; 2270 2271 xQtyExpression = xQtyExpression > xQtyStep ? xQtyExpression : xQtyStep; 2272 2273 if(_enableTrace == "Y"){ 2274 2275 xTmpExpression = xQtyExpression; 2276 xQtyExpression = (xQtyExpression > _maxQuantity) ? _maxQuantity : xQtyExpression; 2277 2278 if(xTmpExpression != xQtyExpression){ 2279 __qtyError = true; 2280 } 2281 2282 } 2283 2284 $qtyBox.val(xQtyExpression); 2285 $addCartBtn.data("quantity", xQtyExpression); 2286 2287 //extented prices 2288 catalogReCalcPrice($qtyBox, xQtyExpression); 2289 2290 //set or remove error 2291 __qtyError === true ? $qtyBox.addClass("error") : $qtyBox.removeClass("error"); 2292 2293 return event.preventDefault(); 2294 2295 }; 2296 2297 var catalogAddCartChange = function(event){ 2298 2299 var $this = $(this); 2300 var $addCartBtn = $this.parent().siblings(".addCart"); 2301 2302 var xCurrentQtyValue = $this.val(); 2303 var xQtyStep = Number($this.data("step")); 2304 2305 var _enableTrace = $this.data("enable-trace"); 2306 var _maxQuantity = Number($this.data("max-quantity")); 2307 2308 var __qtyError = false; 2309 var xTmpExpression = 0; 2310 2311 if(xCurrentQtyValue.replace(/[^\d.]/gi, '') != xCurrentQtyValue){ 2312 xCurrentQtyValue = xQtyStep; 2313 }else{ 2314 xCurrentQtyValue = Number(xCurrentQtyValue); 2315 } 2316 2317 xQtyExpression = Math.ceil(xCurrentQtyValue / xQtyStep) * xQtyStep; 2318 2319 if(_enableTrace == "Y"){ 2320 2321 xTmpExpression = xQtyExpression; 2322 xQtyExpression = (xQtyExpression > _maxQuantity) ? _maxQuantity : xQtyExpression; 2323 2324 if(xTmpExpression != xQtyExpression){ 2325 __qtyError = true; 2326 } 2327 2328 } 2329 2330 $this.val(xQtyExpression); 2331 $addCartBtn.data("quantity", xQtyExpression); 2332 2333 //extented prices 2334 catalogReCalcPrice($qtyBox, xQtyExpression); 2335 2336 //set or remove error 2337 __qtyError === true ? $this.addClass("error") : $this.removeClass("error"); 2338 2339 }; 2340 2341 var closeElementsAfterClick = function(event){ 2342 2343 if(appOpen === true){ 2344 appBasketClose(event); 2345 } 2346 2347 if(fastBuyOpen === true){ 2348 $("#appFastBuy").hide(); 2349 $("#foundation").removeClass("blurred"); 2350 fastBuyOpen = false; 2351 } 2352 2353 if(fastViewOpen === true){ 2354 $("#appFastView").remove(); 2355 fastViewOpen = false; 2356 } 2357 2358 if(fastViewStoresOpen === true){ 2359 $("#fastViewStores").remove(); 2360 fastViewStoresOpen = false; 2361 } 2362 2363 if(priceVariantOpen === true){ 2364 $("#appProductPriceVariant").remove(); 2365 priceVariantOpen = false; 2366 } 2367 2368 if(requestPriceOpen === true){ 2369 $("#foundation").removeClass("blurred"); 2370 $("#requestPrice").hide(); 2371 requestPriceOpen = false; 2372 } 2373 2374 }; 2375 2376 $(document).on("click", "#footerTabsCaption .item", function(event){ 2377 $(this).find("a").addClass("selected"); 2378 $(this).siblings(".item").find("a").removeClass("selected"); 2379 $("#footerTabs").find(".tab").hide().eq($(this).index()).show(); 2380 event.stopImmediatePropagation(); 2381 return event.preventDefault(); 2382 }); 2383 2384 $(document).on("click", "#infoTabsCaption .item", function(event){ 2385 $(this).find("a").addClass("selected"); 2386 $(this).siblings(".item").find("a").removeClass("selected"); 2387 $("#infoTabs").find(".tab").hide().eq($(this).index()).show(); 2388 return event.preventDefault(); 2389 }); 2390
2391 //check checkbox by class name on label 2392 $(".label-class").on("click", function(){ 2393 2394 var $this = $(this); 2395 var $cTarget = $this.attr("for"); 2396 var $parentForm = $this.parents("form"); 2397 var $cCheckBox = $parentForm.find("." + $cTarget); 2398 2399 if($cCheckBox.prop("checked")){ 2400 $cCheckBox.prop("checked", false).focus(); 2401 } 2402 2403 else{ 2404 $cCheckBox.prop("checked", "checked").focus(); 2405 } 2406 2407 return event.preventDefault(); 2408 2409 }); 2410 2411 //check checkbox by data-for label 2412 $(".label-for").on("click", function(){ 2413 2414 var $this = $(this); 2415 var $cTarget = $this.data("for"); 2416 var $parentForm = $this.parents("form"); 2417 var $cCheckBox = $parentForm.find("." + $cTarget); 2418 2419 if($cCheckBox.prop("checked")){ 2420 $cCheckBox.prop("checked", false).focus(); 2421 } 2422 2423 else{ 2424 $cCheckBox.prop("checked", "checked").focus(); 2425 } 2426 2427 return event.preventDefault(); 2428 2429 }); 2430 2431 var openSkuDropDown = function(event){ 2432 2433 //vars 2434 var $this = $(this); 2435 var $dropList = $this.siblings(".oSkuDropdownList"); 2436 2437 //show list 2438 $dropList.toggleClass("opened"); 2439 2440 //opened flag 2441 oSkuDropdownOpened = $dropList.hasClass("opened"); 2442 2443 return event.preventDefault(); 2444 2445 }; 2446 2447 var selectSkuDropDownValue = function(event){ 2448 2449 //vars 2450 var $this = $(this); 2451 var $dropList = $this.parents(".oSkuDropdownList"); 2452 var $dropListItems = $dropList.find(".oSkuDropdownListItem").removeClass("selected"); 2453 var $checkedItem = $dropList.siblings(".oSkuCheckedItem"); 2454 2455 if(!$checkedItem.hasClass("noHideChecked")){ 2456 2457 //hide list 2458 $dropList.removeClass("opened"); 2459 2460 //opened flag 2461 oSkuDropdownOpened = false; 2462 2463 } 2464 2465 //active 2466 $this.addClass("selected"); 2467 2468 //write value 2469 $checkedItem.html($this.text()); 2470 2471 // 2472 return event.preventDefault(); 2473 2474 }; 2475 2476 var closeSkuDropDown = function(event){ 2477 2478 //if opened 2479 if(oSkuDropdownOpened){ 2480 //block trigger events 2481 if(typeof event.isTrigger == "undefined"){ 2482 //close 2483 $(".oSkuDropdownList").removeClass("opened"); 2484 2485 //opened flag 2486 oSkuDropdownOpened = false; 2487 } 2488 } 2489 2490 }; 2491 2492 //fix top menu 2493 if($topMenuContainer.length > 0 && $topMenuContainer.hasClass("auto-fixed")){ 2494 2495 //vars 2496 var scrollUnbind = false; 2497 var topMenuFixed = false; 2498 var menuStartOffset = 0; 2499 var menuStartHeight = 0; 2500 var menuStartbackground = 0; 2501 2502 //check disable flag 2503 if(typeof _topMenuNoFixed == "undefined"){ 2504 2505 //functions 2506 var calcPosFixTopMenu = function(event){ 2507 2508 //to default 2509 $topMenuContainer.removeClass("fixed"); 2510 $mainMenuStaticContainer.css("height", "auto"); 2511 2512 //get offset & css value 2513 menuStartOffset = $topMenuContainer.offset().top; 2514 menuStartHeight = $topMenuContainer.height(); 2515 menuStartbackground = $topMenuContainer.css("background-color"); 2516 2517 //set flag 2518 topMenuFixed = false; 2519 2520 //unbind 2521 if($window.width() <= 1024){ 2522 2523 //bind off 2524 $window.off("scroll", scrollFixTopMenu); 2525 2526 //set flag 2527 scrollUnbind = true; 2528 2529 } 2530 2531 else{ 2532 2533 //check flag 2534 if(scrollUnbind){ 2535 2536 //bind on 2537 $window.on("scroll", scrollFixTopMenu); 2538 2539 //set flag 2540 scrollUnbind = false; 2541 2542 } 2543 2544 //check 2545 scrollFixTopMenu(); 2546 2547 } 2548 2549 }; 2550 2551 var scrollFixTopMenu = function(event){ 2552 2553 //vars 2554 var currentScrollPosition = typeof event != "undefined" ? event.currentTarget.scrollY : $window.scrollTop(); 2555 2556 if(currentScrollPosition >= menuStartOffset){ 2557 if(!topMenuFixed){ 2558 2559 //set clases and css values 2560 $topMenuContainer.addClass("fixed"); 2561 $mainMenuStaticContainer.css("height", $topMenuContainer.height() + "px"); 2562 $mainMenuStaticContainer.css("background-color", menuStartbackground); 2563 2564 //set flag 2565 topMenuFixed = true; 2566 } 2567 } 2568 2569 else{ 2570 //set clases and css values 2571 $topMenuContainer.removeClass("fixed"); 2572 //set flag 2573 topMenuFixed = false; 2574 } 2575 2576 }; 2577 2578 //binds 2579 $window.on("resize", calcPosFixTopMenu); 2580 $window.on("scroll", scrollFixTopMenu); 2581 2582 // 2583 calcPosFixTopMenu(); 2584 2585 } 2586 2587 } 2588 2589 //other binds 2590 $(document).on("click", ".oSkuDropDownProperty .oSkuCheckedItem", openSkuDropDown); 2591 $(document).on("click", ".oSkuDropDownProperty .oSkuDropdownListItem", selectSkuDropDownValue); 2592 $(document).on("click", ".oSkuDropdown", function(event){event.stopImmediatePropagation()}); 2593 $(document).on("click", closeSkuDropDown); 2594 2595 $(document).on("click", ".catalogQtyBlock .catalogPlus", catalogAddCartPlus); 2596 $(document).on("click", ".catalogQtyBlock .catalogMinus", catalogAddCartMinus); 2597 $(document).on("change", ".catalogQtyBlock .catalogQty", catalogAddCartChange); 2598 2599 $(document).on("click", "#appBasket .closeWindow", appBasketClose); 2600 $(document).on("click", "#appBasket .delete", appBasketDelete); 2601 $(document).on("click", "#appBasket .minus", appBasketMinus); 2602 $(document).on("click", "#appBasket .plus", appBasketPlus); 2603 $(document).on("keyup", "#appBasket .qty", appBasketChange); 2604 2605 $(document).on("click", ".skuPropertyLink", selectSku);
2606 $(document).on("click", ".subscribe:not(.unSubscribe)", addSubscribe); 2607 $(document).on("click", ".unSubscribe", unSubscribe); 2608 $(document).on("click", ".addCart", addCart); 2609 2610 $(document).on("click", ".addWishlist", addWishlist); 2611 $(document).on("click", ".addCompare", addCompare); 2612 $(document).on("click", ".fastBack", openFastBack); 2613 $(document).on("click", ".requestPrice", getRequestPrice); 2614 $(document).on("click", "#requestPriceSubmit", sendRequestPrice); 2615 $(document).on("click", "#fastBuyFormSubmit", sendFastBack); 2616 $(document).on("click", "#appFastBuy .closeWindow", closeFastBack); 2617 $(document).on("click", "#requestPrice .closeWindow", closeRequestPrice); 2618 $(document).on("click", ".removeFromWishlist", removeFromWishlist); 2619 2620 $(document).on("mouseout", "#appBasket .plus", appBasketPlusHoldUp); 2621 $(document).on("mouseup", "#appBasket .plus", appBasketPlusHoldUp); 2622 $(document).on("mousedown", "#appBasket .plus", appBasketPlusHold); 2623 2624 $(document).on("mousedown", "#appBasket .minus", appBasketMinusHold); 2625 $(document).on("mouseout", "#appBasket .minus", appBasketMinusHoldUp); 2626 $(document).on("mouseup", "#appBasket .minus", appBasketMinusHoldUp); 2627 2628 $(document).on("click", "#fastViewStores .fastViewStoresExit", closeStoresWindow); 2629 $(document).on("click", ".getStoresWindow", getStoresWindow); 2630 2631 $(document).on("click", "#appProductPriceVariant .appPriceVariantExit", closePricesWindow); 2632 $(document).on("click", ".getPricesWindow", getPricesWindow); 2633 2634 $(document).on("click", ".getFastView", getFastView); 2635 2636 $(document).on("click", "#catalogMenuHeading", slideCollapsedBlock); 2637 $(document).on("click", "#smartFilter .heading", openSmartFiler); 2638 $(document).on("click", "#nextSection .title", openSmartSections); 2639 2640 $(document).on("click", "#appBasketContainer, #appFastView .appFastViewContainer, #fastViewStores .fastViewStoresContainer, #appProductPriceVariant, #appFastBuyContainer, .getFastView, .getPricesWindow, .fastBack, .addCart, #requestPriceContainer, .requestPrice", function(event){ 2641 return event.stopImmediatePropagation(); 2642 }); 2643 2644 //close elements after document click 2645 $(document).on("click", closeElementsAfterClick); 2646 2647 // ajax all error; 2648 2649 $(document).ajaxError(function( event, request, settings ) { 2650 console.error("Error requesting page " + settings.url); 2651 }); 2652 2653}); 2654 2655var formatPrice = function(data) { 2656 var price = String(data).split('.'); 2657 var strLen = price[0].length; 2658 var str = ""; 2659 2660 for (var i = strLen; i > 0; i--) { 2661 str = str + ((!(i % 3) ? " " : "") + price[0][strLen - i]); 2662 } 2663 2664 return str + (price[1] != undefined ? "." + price[1] : ""); 2665} 2666 2667function validateEmail(sEmail){ 2668 2669 //vars 2670 var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; 2671 2672 //check 2673 if (filter.test(sEmail)) { 2674 return true; 2675 } 2676 2677 else{ 2678 return false; 2679 } 2680 2681} 2682 2683/* End */ 2684; 2685; /* Start:"a:4:{s:4:"full";s:63:"/local/templates/dresscode_rutrike/js/topMenu.js?15429633232693";s:6:"source";s:48:"/local/templates/dresscode_rutrike/js/topMenu.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2686$(function(){ 2687 2688 var __menuSelector = "#topMenu"; 2689 var __menuBarClass = "bar"; 2690 var __menuSubClass = "sub"; 2691 var __menuActiveClass = "active"; 2692 2693 var createMenu = function(event){ 2694 2695 // @event.data.reducedWidth 2696 // @event.data.maxMenuWidth 2697 2698 var $_self = $(__menuSelector), 2699 $_list = $_self.children("li:not(." + __menuBarClass + ")"), 2700 $_bar = $_self.find("." + __menuBarClass), 2701 $_sub = $_self.find("." + __menuSubClass), 2702 _enableBar = $_bar.length > 0 ? 1 : 0, 2703 _transElements = $_self.hasClass("transfered") ? 1 : 0; 2704 2705 var $fn_createBar = function(){ 2706 2707 $_self.append( 2708 $("<li/>").addClass(__menuBarClass).append( 2709 $("<a/>").attr("href", "#").addClass("openEnder") 2710 ).append( 2711 $("<ul/>").addClass(__menuSubClass) 2712 ) 2713 ); 2714 2715 $_bar = $_self.find("." + __menuBarClass); 2716 $_sub = $_bar.find("." + __menuSubClass); 2717 2718 return _enableBar++; 2719 }; 2720 2721 var $fn_elementsCopy = function(toggle){ 2722 2723 if(toggle === false){ 2724 $_self.addClass("transfered").children("li").each(function(i){ 2725 var $_this = $(this); 2726 if(!$_this.hasClass(__menuBarClass)){ 2727 $_sub.append($_this.clone()); 2728 $_this.remove(); 2729 } 2730 }); 2731 2732 return _transElements++; 2733 2734 }else{ 2735 $_sub.children("li").each(function(i){ 2736 var $_this = $(this); 2737 if(!$_this.hasClass(__menuBarClass)){ 2738 $_self.append($_this.clone()); 2739 $_this.remove(); 2740 } 2741 }); 2742 $_self.removeClass("transfered"); 2743 $_bar.remove(); 2744 2745 $_list = $_self.children("li:not(." + __menuBarClass + ")"); 2746 2747 return _transElements-- - _enableBar--; 2748 } 2749 }; 2750 2751 if(document.body.clientWidth <= event.data.reducedWidth){ 2752 !_enableBar && $fn_createBar(); 2753 !_transElements && $fn_elementsCopy(false); 2754 }else{ 2755 if(_transElements){ 2756 $fn_elementsCopy(true); 2757 } 2758 2759 if($_self.outerWidth() > event.data.maxMenuWidth){ 2760 for (var i = $_list.length - 1; i >= 0; i--) { 2761 var $_this = $_list.eq(i); 2762 if($_self.outerWidth() <= event.data.maxMenuWidth){ 2763 break; 2764 }else{ 2765 !_enableBar && $fn_createBar(); 2766 $_sub.prepend($_this.clone()); 2767 $_this.remove(); 2768 } 2769 }; 2770 } 2771 } 2772 }; 2773 2774 var openMenu = function(event){ 2775 $(this).closest("." + __menuBarClass).toggleClass(__menuActiveClass); 2776 event.preventDefault(); 2777 }; 2778 2779 var closeMenu = function(event){ 2780 $("#topMenu ." + __menuBarClass).removeClass(__menuActiveClass); 2781 }; 2782 2783 $(window).on("ready resize", { 2784 reducedWidth: 1250, 2785 maxMenuWidth: 800 2786 }, createMenu); 2787 2788 $(document).on("click", "#topMenu ." + __menuBarClass, function(event){event.stopImmediatePropagation();}); 2789 $(document).on("click", "#topMenu .openEnder", openMenu); 2790 $(document).on("click", "html", closeMenu); 2791 2792}); 2793 2794/* End */ 2795; 2796; /* Start:"a:4:{s:4:"full";s:65:"/local/templates/dresscode_rutrike/js/topSearch.js?15429633231157";s:6:"source";s:50:"/local/templates/dresscode_rutrike/js/topSearch.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2797$(function(){ 2798 var searchVisible; 2799 2800 var $searchQuery = $("#searchQuery"); 2801 var openSearch = function(event){ 2802 $("#topSearch, #topSearch3").slideDown(150, function(){ 2803 var tmpSearchKeyword = $searchQuery.val(); 2804 searchVisible = true; 2805 $searchQuery.val(""); 2806 $searchQuery.val(tmpSearchKeyword); 2807 $searchQuery.focus(); 2808 }); 2809 event.preventDefault(); 2810 } 2811 2812 var closeSearch = function(event){ 2813 if(searchVisible == true){ 2814 if(event.which == 1){ 2815 $("#searchProductsClose").trigger("click");
2816 $("#topSearch, #topSearch3").slideUp(150); 2817 searchVisible = false; 2818 return event.preventDefault(); 2819 } 2820 } 2821 } 2822 2823 $(document).keydown(function(event) { 2824 if(searchVisible == true && event.keyCode === 27 ) { 2825 $("#searchProductsClose").trigger("click"); 2826 $("#topSearch, #topSearch3").slideUp(150); 2827 searchVisible = false; 2828 return false; 2829 } 2830 }); 2831 2832 2833 $(document).on("click", "#headerTools, #topSearchForm, #searchResult", function(event){event.stopImmediatePropagation();}); 2834 $(document).on("click", "#openSearch", openSearch); 2835 $(document).on("click", "#topSeachCloseForm", closeSearch); 2836 $(document).on("click", closeSearch); 2837}); 2838/* End */ 2839; 2840; /* Start:"a:4:{s:4:"full";s:66:"/local/templates/dresscode_rutrike/js/dwCarousel.js?15429633237742";s:6:"source";s:51:"/local/templates/dresscode_rutrike/js/dwCarousel.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2841(function($) { 2842 jQuery.fn.dwCarousel = function(options) { 2843 2844 var options = $.extend({ 2845 resizeAutoParams: false, 2846 resizeElement: false, 2847 resizeWidth: false, 2848 countElement: 6, 2849 severity: 8, 2850 speed: 400, 2851 }, options); 2852 2853 options.tmpCountElement = options.countElement; //save original value 2854 2855 var $_this = $(this); 2856 var $main = new Main($(this)); 2857 2858 function Main(obj) { 2859 2860 this.ths = obj; 2861 this.ul = $_this.find(".slideBox"); 2862 this.li = this.ul.children("li"); 2863 this.a = this.ul.find("a"); 2864 this.qtyLI = this.li.length; 2865 this.curPos = null; 2866 this.startTouch = false; 2867 this.startTouchPos = false; 2868 this.clicking = false; 2869 this.active = false; 2870 2871 } 2872 2873 // main functions 2874 2875 var onLoadUp = function(){ 2876 2877 $_this.css({ 2878 "overflow" : "hidden", 2879 "position" : "relative" 2880 }); 2881 2882 $main.ul.css({ 2883 "position": "relative", 2884 "overflow" : "hidden", 2885 "clear" : "both", 2886 "left" : "0px", 2887 }); 2888 2889 }; 2890 2891 var bindEvents = function(e) { 2892 if (e) { 2893 2894 $(document).on("click", options.leftButton, {direction: "left"}, moveUL); 2895 $(document).on("click", options.rightButton, {direction: "right"}, moveUL); 2896 $(document).on("mouseup touchend", touchEnd); 2897 2898 2899 $main.ul.on("mousedown touchstart", touchStart); 2900 $main.ul.on("mousemove touchmove", touchMove); 2901 $main.active = true; 2902 2903 } 2904 } 2905 2906 var resizeElements = function(count) { 2907 $main.ul.css({ 2908 width: ($main.qtyLI * 100) + "%" 2909 }); 2910 2911 $main.li.css({ 2912 width: (100 / $main.qtyLI / count) + "%" 2913 }); 2914 }; 2915 2916 var calculateParams = function(windowSize) { 2917 var currentCount = options.tmpCountElement; 2918 var tmpCount = 15360; 2919 options.countElement = options.tmpCountElement; 2920 if (options.resizeElement === true) { 2921 if(options.resizeWidth !== false){ 2922 options.countElement = Math.floor($_this.outerWidth() / options.resizeWidth); 2923 }else if(options.resizeAutoParams !== false){ 2924 $.each(options.resizeAutoParams, function(screenWidth, countElements) { 2925 if(parseInt(windowSize) <= parseInt(screenWidth)){ 2926 if(parseInt(tmpCount) > parseInt(screenWidth)){ 2927 options.countElement = countElements; 2928 tmpCount = screenWidth; 2929 } 2930 2931 } 2932 }); 2933 } 2934 2935 } 2936 2937 if (options.countElement < $main.qtyLI) { 2938 2939 $(options.leftButton).show(); 2940 $(options.rightButton).show(); 2941 2942 if (!$main.active) { 2943 $main.active = true; 2944 bindEvents(true); 2945 } 2946 2947 } else { 2948 2949 $(options.leftButton).hide(); 2950 $(options.rightButton).hide(); 2951 $main.ul.unbind(); 2952 $main.active = false;
2953 2954 } 2955 2956 $main.ul.css("left", 0); 2957 2958 }; 2959 2960 var moveUL = function(event) { 2961 var direction = event.data.direction == "left" ? "left" : "right", 2962 maxPos = $main.qtyLI - options.countElement, 2963 animateValue = null 2964 2965 if (direction == "left") { 2966 if (!$main.curPos) { 2967 animateValue = "-" + (100 / options.countElement * maxPos) + "%"; 2968 $main.curPos = maxPos; 2969 } else { 2970 animateValue = "-" + (100 / options.countElement * --$main.curPos) + "%"; 2971 } 2972 } else { 2973 if ($main.curPos == maxPos) { 2974 $main.curPos = maxPos; 2975 $main.curPos = animateValue = 0; 2976 } else { 2977 animateValue = "-" + (100 / options.countElement * ++$main.curPos) + "%"; 2978 } 2979 } 2980 2981 $main.ul.finish().animate({ 2982 "left": animateValue 2983 }, options.speed); 2984 2985 event.preventDefault(); 2986 }; 2987 2988 var touchStart = function(event) { 2989 $main.startTouch = event.type == "touchstart" ? event.originalEvent.touches[0].pageX : event.pageX; 2990 $main.startTouchPos = Math.abs(parseInt($main.ul.css("left"), 10)); 2991 if(event.type !== "touchstart"){ 2992 event.preventDefault(); 2993 } 2994 }; 2995 2996 var touchMove = function(event) { 2997 if ($main.startTouch) { 2998 event.pageX = event.type == "touchmove" ? event.originalEvent.touches[0].pageX : event.pageX; 2999 var animateValue = (-$main.startTouchPos - ($main.startTouch - event.pageX)); 3000 var maxPos = ($main.li.outerWidth() * $main.qtyLI) - (options.countElement * $main.li.outerWidth()); 3001 3002 if (animateValue > 0) { 3003 animateValue /= 8; 3004 } else if (maxPos < Math.abs(parseInt($main.ul.css("left")))) { 3005 animateValue = -(maxPos + ((Math.abs(animateValue) - maxPos) / 8)); 3006 } 3007 3008 $main.ul.stop().css({ 3009 "left" : animateValue + "px" 3010 }); 3011 3012 $main.clicking = true; 3013 } 3014 }; 3015 3016 var touchEnd = function(event) { 3017 3018 if ($main.startTouch) { 3019 var maxPos = ($main.li.outerWidth() * $main.qtyLI) - (options.countElement * $main.li.outerWidth()), 3020 posNow = parseInt($main.ul.css("left")), 3021 animateValue = null; 3022 if (posNow > 0) { 3023 animateValue = 0; 3024 } else if (Math.abs($main.startTouchPos - Math.abs(posNow)) < 30) { 3025 animateValue = "-" + $main.startTouchPos; 3026 $main.clicking = false; 3027 } else if (maxPos < Math.abs(posNow)) { 3028 animateValue = "-" + maxPos; 3029 } else { 3030 animateValue = "-" + (Math.abs(posNow) > $main.startTouchPos ? Math.ceil(Math.abs(posNow) / $main.li.outerWidth()) : Math.floor(Math.abs(posNow) / $main.li.outerWidth())) * $main.li.outerWidth(); 3031 } 3032 3033 $main.ul.finish().animate({ 3034 "left": animateValue 3035 }, options.speed); 3036 3037 $main.startTouch = false; 3038 3039 if($main.clicking){ 3040 $main.a.each(function(){ 3041 3042 var $ths = $(this); 3043 3044 if($ths.is(":hover")){ 3045 $ths.one("click", function(event){ 3046 event.preventDefault(); 3047 }); 3048 3049 return false; 3050 } 3051 3052 }); 3053 3054 $main.clicking = false; 3055 3056 } 3057 3058 } 3059 }; 3060 3061 $(window).resize(function(e) { 3062 calculateParams($(window).width()); 3063 resizeElements(options.countElement); 3064 }); 3065 3066 calculateParams($(window).width()); 3067 resizeElements(options.countElement); 3068 bindEvents(); 3069 onLoadUp(); 3070 3071 }; 3072 3073})($); 3074/* End */ 3075; 3076; /* Start:"a:4:{s:4:"full";s:65:"/local/templates/dresscode_rutrike/js/dwSlider.js?154296332311927";s:6:"source";s:49:"/local/templates/dresscode_rutrike/js/dwSlider.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3077(function($) { 3078 jQuery.fn.dwSlider = function(options) { 3079 var options = $.extend({ 3080 rightButton: ".sliderBtnRight", 3081 leftButton: ".sliderBtnLeft", 3082 afterResize: false, 3083 responsive: false, 3084 secondDots: false, 3085 afterLoad: false, 3086 timeLine: false, 3087 autoMove: true, 3088 delay: 3500, 3089 severity: 8, 3090 touch: true, 3091 speed: 500, 3092 }, options); 3093 3094 var link = $(this).css({"overflow" : "hidden", "position" : "relative"}); 3095 var slideBox = link.find(".slideBox").css({"position" : "relative", "left"
3095: "0px", "padding" : "0px", "cursor" : options["touch"] ? "move" : "default", "margin" : "0px"}); 3096 3097 //check for extra div 3098 if(slideBox.children("div").length > 0){ 3099 var slideElements = slideBox.children("div").children("li"); 3100 }else{ 3101 var slideElements = slideBox.children("li"); 3102 } 3103 3104 var leftButton = $(options["leftButton"]); 3105 var rightButton = $(options["rightButton"]); 3106 var currentPosition = 0; 3107 var moveValueFx = 0; 3108 var timeoutID = 0; 3109 var moveValue = 0; 3110 3111 if(options["secondDots"] != false){ 3112 var secondDots = $(options["secondDots"]).children("li"); 3113 } 3114 3115 slideElements.css({ 3116 "position" : "relative", 3117 "list-style" : "none", 3118 "float" : "left", 3119 "width" : "100%" 3120 }); 3121 3122 //check length 3123 options["touch"] = slideElements.length > 1 && options["touch"] == true ? true : false; 3124 3125 if(options["touch"]){ 3126 var slideElementWidth = slideElements.width(); 3127 var slideBoxWidth = ((slideElements.length - 1) * slideElementWidth); 3128 var slideStartPosition = false; 3129 var clickPositionX = false; 3130 var clickPositionY = false;
3131 var clickControl = false; 3132 } 3133 3134 if(options["touch"]){ 3135 3136 slideBox.on("mousedown touchstart", function(e){ 3137 timeoutID && clearTimeout(timeoutID); 3138 slideElementWidth = slideElements.width(); 3139 slideBoxWidth = ((slideElements.length - 1) * slideElementWidth); 3140 slideStartPosition = parseInt(slideBox.css("left"), 10); 3141 clickPositionX = e.type == "touchstart" ? e.originalEvent.touches[0].pageX : e.pageX; 3142 clickPositionY = e.type == "touchstart" ? e.originalEvent.touches[0].pageY : e.pageY; 3143 if(e.type == "mousedown"){ 3144 e.preventDefault(); 3145 } 3146 return clickControl = true; 3147 }); 3148 3149 $(document).on("mousemove touchmove", function(e) { 3150 if(clickControl == true){ 3151 var curTouchPosX = e.type == "touchmove" ? e.originalEvent.touches[0].pageX : e.pageX; 3152 var curTouchPosY = e.type == "touchmove" ? e.originalEvent.touches[0].pageY : e.pageY; 3153 if(Math.abs(clickPositionY - curTouchPosY) < 450){ 3154 var touchExpression = clickPositionX - curTouchPosX; 3155 if(Math.abs(touchExpression) == touchExpression){ 3156 3157 var touchMoveEx = slideStartPosition - Math.abs(touchExpression); 3158 touchMoveEx = slideBoxWidth > Math.abs(touchMoveEx) ? touchMoveEx : -(slideBoxWidth + ((Math.abs(touchMoveEx) - slideBoxWidth) / 6)); 3159 console.log("touchExpression" + touchExpression); 3160 console.log("touchMoveEx" + touchMoveEx); 3161 slideBox.finish().css({ 3162 left: touchMoveEx + "px" 3163 }); 3164 3165 }else{ 3166 var touchMoveEx = slideStartPosition + Math.abs(touchExpression); 3167 touchMoveEx = 0 > touchMoveEx ? touchMoveEx : touchMoveEx / 6; 3168 slideBox.finish().css({ 3169 left: touchMoveEx + "px" 3170 }); 3171 } 3172 } 3173 } 3174 }); 3175 3176 $(document).on("mouseup touchend", function(e) { 3177 if(clickControl == true){ 3178 3179 clickControl = false; 3180 3181 var boxPosition = parseInt(slideBox.css("left"), 10); 3182 3183 if(Math.abs(Math.abs(slideStartPosition) - Math.abs(boxPosition)) < 10){ 3184 slideBox.finish().animate({ 3185 left: slideStartPosition + "px" 3186 }, 200); 3187 3188 }else{ 3189 var touchMoveEx = (slideStartPosition - boxPosition > 0) ? -(Math.ceil(Math.abs(boxPosition) / slideElements.width()) * 100) : -(Math.floor(Math.abs(boxPosition) / slideElements.width()) * 100); 3190 if((Math.abs(touchMoveEx) / 100) > (slideElements.length - 1)){ 3191 currentPosition = touchMoveEx = 0; 3192 }else if(boxPosition > 0){ 3193 touchMoveEx = -((slideElements.length - 1) * 100); 3194 currentPosition = (slideElements.length - 1); 3195 }else{ 3196 currentPosition = (Math.abs(touchMoveEx) / 100); 3197 } 3198 3199 slideBox.finish().animate({ 3200 left: touchMoveEx + "%" 3201 }, 200); 3202 3203 if(slideElements.length > 1){ 3204 slideDotElements.removeAttr("class").eq(currentPosition).addClass("selected"); 3205 if(options["secondDots"] != false){ 3206 secondDots.removeAttr("class").eq(currentPosition).addClass("selected"); 3207 } 3208 } 3209 3210 } 3211 3212 } 3213 }); 3214 } 3215 3216 if(options.responsive === true){ 3217 var slidePictures = slideBox.find("span"); 3218 } 3219 3220 slideBox.width(slideElements.length * 100 + "%"); 3221 slideElements.width(100 / slideElements.length + "%"); 3222 3223 if(slideElements.length > 1){ 3224 3225 link.append( 3226 $("<ol>").addClass("pager").append( 3227 function() { 3228 var str = ""; 3229 for (var i = 1; i <= slideElements.length; i++) { 3230 if (i == 1) { 3231 str = str + '<li class="selected"></li>'; 3232 } else { 3233 str = str + '<li></li>'; 3234 } 3235 } 3236 return str; 3237 } 3238 ) 3239 ); 3240 3241 if(options["timeLine"] === true){ 3242 3243 var timeLine = $("<ins/>").addClass("timeLine").css({ 3244 "position": "absolute", 3245 "display": "block", 3246 "height": "2px", 3247 "width": "0px", 3248 "left": "0px",
3249 "top": "0px" 3250 }); 3251 3252 link.append( 3253 timeLine 3254 ); 3255 3256 } 3257 3258 var slideDotBox = link.find(".pager"); 3259 var slideDotElements = slideDotBox.children("li"); 3260 slideDotBox.css("margin-left", "-" + (slideElements.length * 22 / 2) + "px"); 3261 3262 }else{ 3263 leftButton.hide(); 3264 rightButton.hide(); 3265 } 3266 3267 var slideAuto = function() { 3268 3269 nextTimeLine(true); 3270 slideMove(false); 3271 clearTimeout(timeoutID); 3272 timeoutID = setTimeout(function() { 3273 slideAuto(); 3274 }, options.delay); 3275 3276 } 3277 3278 var slideMove = function(left) { 3279 3280 if (left == true) { 3281 if (-1 == --currentPosition) { 3282 currentPosition = slideElements.length - 1; 3283 } 3284 moveValue = "-" + currentPosition * 100 + "%"; 3285 } else { 3286 if (slideElements.length == ++currentPosition) { 3287 currentPosition = 0; 3288 moveValue = 0; 3289 } else { 3290 moveValue = "-" + (currentPosition * 100) + "%" 3291 } 3292 } 3293 slideAnimate(moveValue, moveValueFx); 3294 } 3295 3296 var slideAnimate = function(value, fxValue) { 3297 3298 slideBox.finish().animate({ 3299 "left": value 3300 }, 550, "easeInCubic", function() { 3301 if(slideElements.length > 1){ 3302 slideDotElements.removeAttr("class").eq(currentPosition).addClass("selected"); 3303 if(options["secondDots"] != false){ 3304 secondDots.removeAttr("class").eq(currentPosition).addClass("selected"); 3305 } 3306 } 3307 }); 3308 3309 } 3310 3311 var makeSlider = function(event){ 3312 3313 if(event.type == "ready"){ 3314 nextTimeLine(true); 3315 } 3316 3317 if(options.responsive === true){ 3318 var wW = $(window).outerWidth(); 3319 var ch = (wW > 1350) ? "large" : "normal"; 3320 slidePictures.each(function(i, el){ 3321 $(el).css({ 3322 "background-image" : "url('" + $(el).data(ch) + "')" 3323 }); 3324 }); 3325 } 3326 3327 //callBack after resize 3328 3329 if(event.type == "resize"){ 3330 if(options["afterResize"] && typeof(options["afterResize"]) === "function"){ 3331 options["afterResize"](link); 3332 } 3333 } 3334 3335 }; 3336 3337 3338 var nextTimeLine = function(enableAnimate){ 3339 3340 if(timeLine != undefined){ 3341 3342 timeLine.finish().css({ 3343 "width" : "0%" 3344 }); 3345 3346 if(enableAnimate == true){ 3347 timeLine.animate({ 3348 "width" : "100%" 3349 }, options.delay); 3350 } 3351 3352 } 3353 3354 }; 3355 3356 leftButton.on("click", function(e) { 3357 clearTimeout(timeoutID); 3358 slideMove(true); 3359 e.preventDefault(); 3360 }); 3361 3362 rightButton.on("click", function(e) { 3363 clearTimeout(timeoutID); 3364 slideMove(false); 3365 e.preventDefault(); 3366 }); 3367 3368 if(slideElements.length > 1){ 3369 slideDotElements.on("click", function(e) { 3370 clearTimeout(timeoutID); 3371 currentPosition = $(this).index() - 1; 3372 slideMove(false); 3373 }); 3374 if(options["secondDots"] != false){ 3375 secondDots.on("click", function(e) { 3376 clearTimeout(timeoutID); 3377 currentPosition = $(this).index() - 1; 3378 slideMove(false); 3379 e.preventDefault(); 3380 }); 3381 } 3382 } 3383 3384 timeoutID = setTimeout(function() { 3385 slideAuto(); 3386 }, options.delay); 3387 3388 link.hover(function(){ 3389 clearTimeout(timeoutID); 3390 nextTimeLine(false); 3391 }, function(){ 3392 timeoutID = setTimeout(function() { 3393 slideAuto(); 3394 }, options.delay); 3395 nextTimeLine(true); 3396 }); 3397 3398 $(window).on("ready resize", makeSlider); 3399 3400 //callBack after load 3401 3402 if(options["afterLoad"] && typeof(options["afterLoad"]) === "function"){ 3403 if(slideElements.length > 0){ 3404 options["afterLoad"](link); 3405 } 3406 } 3407 3408 }; 3409})(jQuery); 3410/* End */ 3411; 3412; /* Start:"a:4:{s:4:"full";s:64:"/local/templates/dresscode_rutrike/js/dwZoomer.js?15429633232421";s:6:"source";s:49:"/local/templates/dresscode_rutrike/js/dwZoomer.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3413$(function(){ 3414 3415 var windowOpened = false; 3416 var openWindow = function(event){ 3417 3418 var $this = $(this); 3419 var picturePath = $this.data("path"); 3420 3421 if(picturePath){ 3422 3423 $("#appZoomWindow").remove(); 3424 3425 var $body = $("body"); 3426 var $appWindow = $("<div />", {id: "appZoomWindow"}); 3427 var $appZoomContainer = $("<div />", {class: "appZoomContainer"}); 3428 var $appZoomContainerImage = $("<img />", {class: "appZoomContainerImage", src: picturePath}); 3429 var $appZoomContainerExit = $("<a />", {class: "appZoomContainerExit", href: "#"}); 3430 3431 $appWindow.css({ 3432 background: "rgba(0, 0, 0, 0.4)", 3433 overflow: "auto", 3434 position: "fixed", 3435 height: "100%", 3436 width: "100%", 3437 zIndex: "40", 3438 left: "0px", 3439 top: "0px" 3440 }); 3441 3442 $appZoomContainer.css({ 3443 boxShadow: "1px 1px 12px rgba(60, 60, 60, 0.3)", 3444 transform: "translateY(-50%) translateX(-50%)", 3445 backgroundColor: "#ffffff", 3446 display: "inline-block", 3447 position: "absolute",
3448 textAlign: "center", 3449 padding: "24px", 3450 left: "50%", 3451 top: "50%", 3452 }); 3453 3454 $appZoomContainerImage.css({ 3455 verticalAlign: "middle", 3456 maxHeight: "85vh", 3457 maxWidth: "85vw", 3458 }); 3459 3460 $appZoomContainer.append($appZoomContainerExit).addClass("loading"); 3461 $appWindow.append($appZoomContainer) 3462 3463 if(picturePath){ 3464 var newImage = new Image(); 3465 newImage.src = picturePath; 3466 $(newImage).one("load", function(){ 3467 $appZoomContainer.append($appZoomContainerImage).removeClass("loading"); 3468 }); 3469 } 3470 3471 $body.append($appWindow).on("keyup.zoomer", function(event){ 3472 if(event.keyCode == 27){ 3473 $("#appZoomWindow").remove(); 3474 $body.off("keyup.zoomer"); 3475 windowOpened = false; 3476 } 3477 }); 3478 3479 windowOpened = true; 3480 3481 }else{ 3482 console.error("picture path is empty"); 3483 } 3484 3485 return event.preventDefault(); 3486 3487 }; 3488 3489 var closeWindow = function(event){ 3490 3491 if(windowOpened){ 3492 $("#appZoomWindow").remove(); 3493 windowOpened = false; 3494 event.preventDefault(); 3495 } 3496 3497 }; 3498 3499 $(document).on("click", ".oZoomer", openWindow); 3500 $(document).on("click", ".appZoomContainerImage, .oZoomer", function(event){event.stopImmediatePropagation();}); 3501 $(document).on("click", "html", closeWindow); 3502 3503}); 3504/* End */ 3505; 3506; /* Start:"a:4:{s:4:"full";s:63:"/local/templates/dresscode_rutrike/js/dwTimer.js?15429633232096";s:6:"source";s:48:"/local/templates/dresscode_rutrike/js/dwTimer.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3507$(function(){ 3508 jQuery.fn.dwTimer = function(options) { 3509 var options = $.extend({ 3510 timerLoop: false, 3511 startDate: false, 3512 endDate: false 3513 }, options); 3514 3515 //vars 3516 var timeoutID; 3517 3518 //j vars 3519 var $this = this; 3520 var $dayContainer = $this.find(".timerDayValue"); 3521 var $hourContainer = $this.find(".timerHourValue"); 3522 var $minuteContainer = $this.find(".timerMinuteValue"); 3523 var $secondContainer = $this.find(".timerSecondValue"); 3524 3525 //functions 3526 var calculateValues = function(){ 3527 3528 //set vars 3529 curDate = new Date(); 3530 3531 //calculate 3532 var remainingDate = new Date(endDate.getTime() - curDate.getTime()); 3533 var remainingSecond = Math.floor((remainingDate / 1000) % 60); 3534 var remainingMinute = Math.floor((remainingDate / 1000 / 60) % 60); 3535 var remainingHour = Math.floor((remainingDate / (1000 * 60 * 60)) % 24); 3536 var remainingDay = Math.floor(remainingDate / (1000 * 60 * 60 * 24)); 3537 3538 //write DOM 3539 $dayContainer.text(remainingDay); 3540 $hourContainer.text(remainingHour); 3541 $minuteContainer.text(remainingMinute); 3542 $secondContainer.text(remainingSecond); 3543 3544 }; 3545 3546 // set end time value 3547 if(options["timerLoop"] > 0 && options["startDate"] > 0){ //loop mode 3548 3549 var endDate = new Date(options["startDate"] * 1000); // timestamp msec (php time() * 1000) 3550 var curDate = new Date(); 3551 3552 //set end date form option 3553 endDate.setDate(endDate.getDate() + parseInt(options["timerLoop"])); // set tmp endDate 3554 3555 //loop mode 3556 while(endDate.getTime() <= curDate.getTime()){ 3557 endDate.setDate(endDate.getDate() + options["timerLoop"]); 3558 } 3559 3560 }else if(options["endDate"] != ""){ 3561 3562 var endDate = new Date(options["endDate"] * 1000); // timestamp msec (php time() * 1000) 3563 var curDate = new Date(); 3564 3565 } 3566 3567 timeoutID = setInterval(function(){ 3568 calculateValues(); 3569 }, 1000); 3570 3571 //start timer 3572 calculateValues(); 3573 3574 }; 3575}); 3576/* End */ 3577; 3578; /* Start:"a:4:{s:4:"full";s:84:"/bitrix/components/dresscode/search.line/templates/version2/script.js?17309561322813";s:6:"source";s:69:"/bitrix/components/dresscode/search.line/templates/version2/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3579$(function(){ 3580 3581 //vars jquery 3582 var $searchQuery = $("#searchQuery"); 3583 var $searchResult = $("#searchResult"); 3584 var $searchOverlap = $("#searchOverlap"); 3585 3586 //vars 3587 var searchTimeoutID; 3588 3589 //functions 3590 var searchKeyPressed = function(event){ 3591 if(event.keyCode !== 27){ 3592 clearTimeout(searchTimeoutID); 3593 if($searchQuery.val().length > 1){ 3594 searchTimeoutID = setTimeout(function(){ 3595 getSearchProductList($searchQuery.val()) 3596 }, 250); 3597 }else{ 3598 $searchResult.empty().removeClass("visible"); 3599 $searchOverlap.hide(); 3600 } 3601 } 3602 }; 3603 3604 var pageElementCount = 6; 3605 if (window.innerWidth > 1920) {pageElementCount = 7} 3606 var getSearchProductList = function(keyword, page){ 3607 3608 var sectionPage = page != "" ? page : 0; 3609 3610 $searchQuery.addClass("loading"); 3611
3612 var searchProductParamsObject = jQuery.parseJSON(searchProductParams); 3613 3614 if(searchProductParamsObject["HIDE_NOT_AVAILABLE"] == undefined){ 3615 searchProductParamsObject["HIDE_NOT_AVAILABLE"] = "N"; 3616 } 3617 3618 var getParamsObject = { 3619 "IBLOCK_TYPE": searchProductParamsObject["IBLOCK_TYPE"], 3620 "IBLOCK_ID": searchProductParamsObject["IBLOCK_ID"], 3621 "CONVERT_CASE": searchProductParamsObject["CONVERT_CASE"], 3622 "ELEMENT_SORT_FIELD": "sort", 3623 "ELEMENT_SORT_ORDER": "asc", 3624 "PROPERTY_CODE": searchProductParamsObject["PROPERTY_CODE"], 3625 "PAGE_ELEMENT_COUNT": pageElementCount, 3626 "PRICE_CODE": searchProductParamsObject["PRICE_CODE"], 3627 "PAGER_TEMPLATE": "round", 3628 "CONVERT_CURRENCY": searchProductParamsObject["CONVERT_CURRENCY"], 3629 "CURRENCY_ID": searchProductParamsObject["CURRENCY_ID"], 3630 "HIDE_NOT_AVAILABLE": searchProductParamsObject["HIDE_NOT_AVAILABLE"], 3631 "FILTER_NAME": "arrFilter", 3632 "ADD_SECTIONS_CHAIN": "N", 3633 "SHOW_ALL_WO_SECTION": "Y", 3634 "HIDE_MEASURES": searchProductParamsObject["HIDE_MEASURES"], 3635 "PAGEN_1": sectionPage, 3636 "SEARCH_QUERY": keyword, 3637 "SEARCH_PROPERTIES": searchProductParamsObject["SEARCH_PROPERTIES"] 3638 }; 3639 3640 var jqxhr = $.post(searchAjaxPath, getParamsObject, afterSearchGetProducts); 3641 3642 }; 3643 3644 var afterSearchGetProducts = function(http){ 3645 $searchQuery.removeClass("loading"); 3646 $searchResult.html(http).addClass("visible"); 3647 $searchOverlap.show(); 3648 }; 3649 3650 var searchCloseWindow = function(event){ 3651 $searchResult.empty().removeClass("visible"); 3652 clearTimeout(searchTimeoutID); 3653 $searchOverlap.hide(); 3654 return event.preventDefault(); 3655 }; 3656 3657 var pageChangeProduct = function(event){ 3658 3659 var $this = $(this); 3660 var page = parseInt($this.data("page")); 3661 3662 if(page > 0 || page == 0){ 3663 getSearchProductList($searchQuery.val(), page); 3664 } 3665 3666 return event.preventDefault(); 3667 3668 }; 3669 3670 //bind 3671 // $searchQuery.on("keyup", searchKeyPressed); 3672 // $(document).on("click", "#searchProductsClose", searchCloseWindow); 3673 // $(document).on("click", "#searchResult .bx-pagination a", pageChangeProduct); 3674 3675}); 3676/* End */ 3677; 3678; /* Start:"a:4:{s:4:"full";s:102:"/local/templates/dresscode_rutrike/components/bitrix/form.result.new/callonme/script.js?17905982482088";s:6:"source";s:87:"/local/templates/dresscode_rutrike/components/bitrix/form.result.new/callonme/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3679var loading = $('#loader'); 3680 3681$(window).on('load', function(){ 3682 $('input[type="tel"]').mask("+7 999 999 99 99"); 3683}); 3684 3685$(document).on('click', 'input[type="tel"]', function(){ 3686 $(this).setCursorPosition(3); 3687}); 3688 3689$(document).on('click', '.openCallOnMe', function(){ 3690 $('.callOnMe').fadeIn(100); 3691 $('body').addClass('showModal'); 3692}); 3693 3694$(document).on('click', '.modalClose', function(){ 3695 $('body').removeClass('showModal'); 3696 $('.modal.forms').fadeOut(100); 3697}); 3698 3699$(document).on('click', '.callOnMe .button', function(){ 3700 $('.callOnMe form').trigger('submit'); 3701}); 3702 3703$(document).on('focusout change', '.callOnMe .input', function(){ 3704 var el = $(this).find('input'); 3705 if(el.val() != '') 3706 $(this).removeClass('error'); 3707}); 3708 3709$(document).on('submit', '.callOnMe form', function(e){ 3710 e.preventDefault(); 3711 loadIn(); 3712 var d = new FormData(this); 3713 $(this).find('.input').removeClass('error'); 3714 $.ajax({ 3715 url: "/local/templates/dresscode_rutrike/components/bitrix/form.result.new/callonme/ajax.php", 3716 data: d, 3717 cache: false, 3718 processData: false, 3719 contentType: false, 3720 type: "POST", 3721 dataType: "json", 3722 success: function(result){ 3723 loadOut(); 3724 if('SUCCESS' in result){ 3725 $('.callOnMe .form').html(result.MESSAGE); 3726 setTimeout(function(){ 3727 $('.modal').fadeOut(); 3728 }, 2000); 3729 } else { 3730 if('NAME' in result.ERROR) 3731 $('.callOnMe .name').addClass('error'); 3732 if('TELEPHONE' in result.ERROR) 3733 $('.callOnMe .phone').addClass('error'); 3734 if('PERSONAL' in result.ERROR) 3735 $('.callOnMe .personal').addClass('error'); 3736 } 3737 } 3738 }); 3739}); 3740 3741function loadOut(){ 3742 loading.fadeOut(100); 3743} 3744 3745function loadIn(){ 3746 loading.fadeIn(100); 3747} 3748 3749$.fn.setCursorPosition = function(pos){ 3750 this.each(function(index, elem){ 3751 if(elem.setSelectionRange){ 3752 elem.setSelectionRange(pos, pos); 3753 } else if(elem.createTextRange){ 3754 var range = elem.createTextRange(); 3755 range.collapse(true); 3756 range.moveEnd('character', pos); 3757 range.moveStart('character', pos); 3758 range.select(); 3759 } 3760 }); 3761 return this; 3762}; 3763/* End */ 3764; 3765; /* Start:"a:4:{s:4:"full";s:91:"/local/templates/dresscode_rutrike/components/bitrix/menu/topMenu5/script.
3765js?15429633232468";s:6:"source";s:76:"/local/templates/dresscode_rutrike/components/bitrix/menu/topMenu5/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3766$(function(){ 3767 3768 var $sliceMenu = $("#subMenu"); 3769 var $sliceMenuItems = $sliceMenu.children("li"); 3770 3771 var sliceMenuOpened = false; 3772 var resizeCacheWidth = 0; 3773 3774 var sliceMenuOnline = function(resize){ 3775 3776 if(resize == true){ 3777 3778 $sliceMenu.find(".removed").each(function(i, nextElement){ 3779 var $nextElement = $(nextElement); 3780 $sliceMenu.append( 3781 $nextElement.removeClass("removed") 3782 ) 3783 }); 3784 3785 $sliceMenu.find(".removedItemsContainer").remove(); 3786 3787 }else{ 3788 $sliceMenu.css("visibility", "visible"); 3789 } 3790 3791 var menuMaxWidth = $("#headerLine3 .headerLineMenu").width(); 3792 var sumMenuItemsWidth = 70; 3793 3794 if($(window).width() <= 1200){ 3795 menuMaxWidth = 0; 3796 } 3797 3798 $sliceMenuItems.each(function(i, nextElement){ 3799 3800 var $nextElement = $(nextElement); 3801 sumMenuItemsWidth += $nextElement.width(); 3802 3803 if(sumMenuItemsWidth >= menuMaxWidth){ 3804 $nextElement.addClass("removed"); 3805 } 3806 3807 }); 3808 3809 //create drop down 3810 var $removedItems = $sliceMenu.find(".removed"); 3811 3812 if($removedItems.length > 0){ 3813 3814 var $removedItemsList = $("<ul/>").addClass("removedItemsList"); 3815 var $removedItemsLink = $("<li/>").addClass("removedItemsContainer").append($("<a/>", {class: "removedItemsLink"}).attr("href", "#")); 3816 3817 $removedItems.each(function(i, nextElement){ 3818 var $nextElement = $(nextElement); 3819 $removedItemsList.append($nextElement); 3820 }); 3821 3822 $sliceMenu.append($removedItemsLink.append($removedItemsList)); 3823 3824 } 3825 3826 } 3827 3828 var openDropDownMenu = function(event){ 3829 3830 if(sliceMenuOpened == false){ 3831 $("#subMenu .removedItemsList").show(); 3832 sliceMenuOpened = true; 3833 }else{ 3834 $("#subMenu .removedItemsList").hide(); 3835 sliceMenuOpened = false; 3836 } 3837 3838 return event.preventDefault(); 3839 } 3840 3841 var closeDropDownMenu = function(event){ 3842 $("#subMenu .removedItemsList").hide(); 3843 sliceMenuOpened = false; 3844 }; 3845 3846 $(document).on("click", ".removedItemsLink", openDropDownMenu); 3847 $(document).on("click", ".removedItemsList, .removedItemsLink", function(event){ 3848 return event.stopImmediatePropagation(); 3849 }); 3850 3851 $(document).on("click", closeDropDownMenu); 3852 3853 $(document).on("ready", function(){ 3854 resizeCacheWidth = $(window).width(); 3855 sliceMenuOnline(false); 3856 }); 3857 3858 $(window).on("resize", function(event){ 3859 //fix mobile scroll/resize lag 3860 if(resizeCacheWidth != $(window).width()){ 3861 resizeCacheWidth = $(window).width(); 3862 sliceMenuOnline(true); 3863 } 3864 }); 3865 3866}); 3867/* End */ 3868; 3869; /* Start:"a:4:{s:4:"full";s:90:"/local/templates/dresscode_rutrike/components/bitrix/menu/leftMenu/script.js?1542963323715";s:6:"source";s:76:"/local/templates/dresscode_rutrike/components/bitrix/menu/leftMenu/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3870var __menuTimeoutID; 3871 3872$(window).on("ready", function(event){ 3873 3874 var __active = "activeDrop"; 3875 var __menuID = "leftMenu"; 3876 var __opener = "eChild"; 3877 var __drop = "drop"; 3878 3879 var $_self = $("#" + __menuID); 3880 var $_eChild = $_self.children("." + __opener); 3881 3882 var openChild = function(){ 3883 3884 var $_this = $(this); 3885 3886 $_eChild.removeClass(__active).find("." + __drop).hide(); 3887 $_this.addClass(__active).find("." + __drop).css("display", "table"); 3888 3889 return clearTimeout(__menuTimeoutID); 3890 3891 } 3892 3893 var closeChild = function(){ 3894 var $_captureThis = $(this); 3895 __menuTimeoutID = setTimeout(function(){ 3896 $_captureThis.removeClass(__active).find("." + __drop).hide(); 3897 }, 500); 3898 } 3899 3900 $_eChild.hover(openChild, closeChild); 3901 3902}); 3903/* End */ 3904; 3905; /* Start:"a:4:{s:4:"full";s:112:"/local/templates/dresscode_rutrike/components/bitrix/catalog.bigdata.products/.default/script.js?179067078336124";s:6:"source";s:96:"/local/templates/dresscode_rutrike/components/bitrix/catalog.bigdata.products/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3906var dwLoadBigData; 3907try { 3908(function (window) { 3909if (!!window.JCCatalogBigdataProducts) 3910{ 3911 return; 3912} 3913 3914var BasketButton = function(params) 3915{ 3916 BasketButton.superclass.constructor.apply(this, arguments); 3917 this.nameNode = BX.create('span', { 3918 props : { className : 'bx_medium bx_bt_button', id : this.id }, 3919 text: params.text 3920 }); 3921 this.buttonNode = BX.create('span', { 3922 attrs: { className: params.ownerClass }, 3923 style: { marginBottom: '0', borderBottom: '0 none transparent' }, 3924 children: [this.nameNode], 3925 events : this.contextEvents 3926 }); 3927 if (BX.browser.IsIE()) 3928 { 3929 this.buttonNode.setAttribute("hideFocus", "hidefocus"); 3930 } 3931}; 3932BX.extend(BasketButton, BX.PopupWindowButton); 3933 3934window.JCCatalogBigdataProducts = function (arParams) 3935{ 3936 this.productType = 0; 3937 this.showQuantity = true;
3938 this.showAbsent = true; 3939 this.secondPict = false; 3940 this.showOldPrice = false; 3941 this.showPercent = false; 3942 this.showSkuProps = false; 3943 this.visual = { 3944 ID: '', 3945 PICT_ID: '', 3946 SECOND_PICT_ID: '', 3947 QUANTITY_ID: '', 3948 QUANTITY_UP_ID: '', 3949 QUANTITY_DOWN_ID: '', 3950 PRICE_ID: '', 3951 DSC_PERC: '', 3952 SECOND_DSC_PERC: '', 3953 DISPLAY_PROP_DIV: '', 3954 BASKET_PROP_DIV: '' 3955 }; 3956 this.product = { 3957 checkQuantity: false, 3958 maxQuantity: 0, 3959 stepQuantity: 1, 3960 isDblQuantity: false, 3961 canBuy: true, 3962 canSubscription: true, 3963 name: '', 3964 pict: {}, 3965 id: 0, 3966 addUrl: '', 3967 buyUrl: '' 3968 }; 3969 this.basketData = { 3970 useProps: false, 3971 emptyProps: false, 3972 quantity: 'quantity', 3973 props: 'prop', 3974 basketUrl: '' 3975 }; 3976 3977 this.defaultPict = { 3978 pict: null, 3979 secondPict: null 3980 }; 3981 3982 this.checkQuantity = false; 3983 this.maxQuantity = 0; 3984 this.stepQuantity = 1; 3985 this.isDblQuantity = false; 3986 this.canBuy = true; 3987 this.canSubscription = true; 3988 this.precision = 6; 3989 this.precisionFactor = Math.pow(10,this.precision); 3990 3991 this.offers = []; 3992 this.offerNum = 0; 3993 this.treeProps = []; 3994 this.obTreeRows = []; 3995 this.showCount = []; 3996 this.showStart = []; 3997 this.selectedValues = {}; 3998 3999 this.obProduct = null; 4000 this.obQuantity = null; 4001 this.obQuantityUp = null; 4002 this.obQuantityDown = null; 4003 this.obPict = null; 4004 this.obSecondPict = null; 4005 this.obPrice = null; 4006 this.obTree = null; 4007 this.obBuyBtn = null; 4008 this.obDscPerc = null; 4009 this.obSecondDscPerc = null; 4010 this.obSkuProps = null; 4011 this.obMeasure = null; 4012 4013 this.obPopupWin = null; 4014 this.basketUrl = ''; 4015 this.basketParams = {}; 4016 4017 this.treeRowShowSize = 5; 4018 this.treeEnableArrow = { display: '', cursor: 'pointer', opacity: 1 }; 4019 this.treeDisableArrow = { display: '', cursor: 'default', opacity:0.2 }; 4020 4021 this.lastElement = false; 4022 this.containerHeight = 0; 4023 4024 this.errorCode = 0; 4025 4026 if ('object' === typeof arParams) 4027 { 4028 this.productType = parseInt(arParams.PRODUCT_TYPE, 10); 4029 this.showQuantity = arParams.SHOW_QUANTITY; 4030 this.showAbsent = arParams.SHOW_ABSENT; 4031 this.secondPict = !!arParams.SECOND_PICT; 4032 this.showOldPrice = !!arParams.SHOW_OLD_PRICE; 4033 this.showPercent = !!arParams.SHOW_DISCOUNT_PERCENT; 4034 this.showSkuProps = !!arParams.SHOW_SKU_PROPS; 4035 4036 this.visual = arParams.VISUAL; 4037 switch (this.productType) 4038 { 4039 case 1://product 4040 case 2://set 4041 if (!!arParams.PRODUCT && 'object' === typeof(arParams.PRODUCT)) 4042 { 4043 if (this.showQuantity) 4044 { 4045 this.product.checkQuantity = arParams.PRODUCT.CHECK_QUANTITY; 4046 this.product.isDblQuantity = arParams.PRODUCT.QUANTITY_FLOAT; 4047 if (this.product.checkQuantity) 4048 { 4049 this.product.maxQuantity = (this.product.isDblQuantity ? parseFloat(arParams.PRODUCT.MAX_QUANTITY) : parseInt(arParams.PRODUCT.MAX_QUANTITY, 10)); 4050 } 4051 this.product.stepQuantity = (this.product.isDblQuantity ? parseFloat(arParams.PRODUCT.STEP_QUANTITY) : parseInt(arParams.PRODUCT.STEP_QUANTITY, 10)); 4052 4053 this.checkQuantity = this.product.checkQuantity; 4054 this.isDblQuantity = this.product.isDblQuantity; 4055 this.maxQuantity = this.product.maxQuantity; 4056 this.stepQuantity = this.product.stepQuantity; 4057 if (this.isDblQuantity) 4058 { 4059 this.stepQuantity = Math.round(this.stepQuantity*this.precisionFactor)/this.precisionFactor; 4060 } 4061 } 4062 this.product.canBuy = arParams.PRODUCT.CAN_BUY; 4063 this.product.canSubscription = arParams.PRODUCT.SUBSCRIPTION; 4064 4065 this.canBuy = this.product.canBuy; 4066 this.canSubscription = this.product.canSubscription; 4067 4068 this.product.name = arParams.PRODUCT.NAME; 4069 this.product.pict = arParams.PRODUCT.PICT; 4070 this.product.id = arParams.PRODUCT.ID; 4071 if (!!arParams.PRODUCT.ADD_URL) 4072 { 4073 this.product.addUrl = arParams.PRODUCT.ADD_URL; 4074 } 4075 if (!!arParams.PRODUCT.BUY_URL) 4076 { 4077 this.product.buyUrl = arParams.PRODUCT.BUY_URL; 4078 } 4079 if (!!arParams.BASKET && 'object' === typeof(arParams.BASKET)) 4080 { 4081 this.basketData.useProps = !!arParams.BASKET.ADD_PROPS; 4082 this.basketData.emptyProps = !!arParams.BASKET.EMPTY_PROPS; 4083 } 4084 } 4085 else 4086 { 4087 this.errorCode = -1; 4088 } 4089 break; 4090 case 3://sku 4091 if (!!arParams.OFFERS && BX.type.isArray(arParams.OFFERS)) 4092 { 4093 if (!!arParams.PRODUCT && 'object' === typeof(arParams.PRODUCT)) 4094 {
4095 this.product.name = arParams.PRODUCT.NAME; 4096 this.product.id = arParams.PRODUCT.ID; 4097 } 4098 this.offers = arParams.OFFERS; 4099 this.offerNum = 0; 4100 if (!!arParams.OFFER_SELECTED) 4101 { 4102 this.offerNum = parseInt(arParams.OFFER_SELECTED, 10); 4103 } 4104 if (isNaN(this.offerNum)) 4105 { 4106 this.offerNum = 0; 4107 } 4108 if (!!arParams.TREE_PROPS) 4109 { 4110 this.treeProps = arParams.TREE_PROPS; 4111 } 4112 if (!!arParams.DEFAULT_PICTURE) 4113 { 4114 this.defaultPict.pict = arParams.DEFAULT_PICTURE.PICTURE; 4115 this.defaultPict.secondPict = arParams.DEFAULT_PICTURE.PICTURE_SECOND; 4116 } 4117 } 4118 else 4119 { 4120 this.errorCode = -1; 4121 } 4122 break; 4123 default: 4124 this.errorCode = -1; 4125 } 4126 if (!!arParams.BASKET && 'object' === typeof(arParams.BASKET)) 4127 { 4128 if (!!arParams.BASKET.QUANTITY) 4129 { 4130 this.basketData.quantity = arParams.BASKET.QUANTITY; 4131 } 4132 if (!!arParams.BASKET.PROPS) 4133 { 4134 this.basketData.props = arParams.BASKET.PROPS; 4135 } 4136 if (!!arParams.BASKET.BASKET_URL) 4137 { 4138 this.basketData.basketUrl = arParams.BASKET.BASKET_URL; 4139 } 4140 } 4141 this.lastElement = (!!arParams.LAST_ELEMENT && 'Y' === arParams.LAST_ELEMENT); 4142 } 4143 if (0 === this.errorCode) 4144 { 4145 BX.ready(BX.delegate(this.Init,this)); 4146 } 4147}; 4148 4149window.JCCatalogBigdataProducts.prototype.Init = function() 4150{ 4151 var i = 0, 4152 strPrefix = '', 4153 TreeItems = null; 4154 4155 this.obProduct = BX(this.visual.ID); 4156 if (!this.obProduct) 4157 { 4158 this.errorCode = -1; 4159 } 4160 this.obPict = BX(this.visual.PICT_ID); 4161 if (!this.obPict) 4162 { 4163 this.errorCode = -2; 4164 } 4165 if (this.secondPict && !!this.visual.SECOND_PICT_ID) 4166 { 4167 this.obSecondPict = BX(this.visual.SECOND_PICT_ID); 4168 } 4169 this.obPrice = BX(this.visual.PRICE_ID); 4170 if (!this.obPrice) 4171 { 4172 this.errorCode = -16; 4173 } 4174 if (this.showQuantity && !!this.visual.QUANTITY_ID) 4175 { 4176 this.obQuantity = BX(this.visual.QUANTITY_ID); 4177 if (!!this.visual.QUANTITY_UP_ID) 4178 { 4179 this.obQuantityUp = BX(this.visual.QUANTITY_UP_ID); 4180 } 4181 if (!!this.visual.QUANTITY_DOWN_ID) 4182 { 4183 this.obQuantityDown = BX(this.visual.QUANTITY_DOWN_ID); 4184 } 4185 } 4186 if (3 === this.productType) 4187 { 4188 if (!!this.visual.TREE_ID) 4189 { 4190 this.obTree = BX(this.visual.TREE_ID); 4191 if (!this.obTree) 4192 { 4193 this.errorCode = -256; 4194 } 4195 strPrefix = this.visual.TREE_ITEM_ID; 4196 for (i = 0; i < this.treeProps.length; i++) 4197 { 4198 this.obTreeRows[i] = { 4199 LEFT: BX(strPrefix+this.treeProps[i].ID+'_left'), 4200 RIGHT: BX(strPrefix+this.treeProps[i].ID+'_right'), 4201 LIST: BX(strPrefix+this.treeProps[i].ID+'_list'), 4202 CONT: BX(strPrefix+this.treeProps[i].ID+'_cont') 4203 }; 4204 if (!this.obTreeRows[i].LEFT || !this.obTreeRows[i].RIGHT || !this.obTreeRows[i].LIST || !this.obTreeRows[i].CONT) 4205 { 4206 this.errorCode = -512; 4207 break; 4208 } 4209 } 4210 } 4211 if (!!this.visual.QUANTITY_MEASURE) 4212 { 4213 this.obMeasure = BX(this.visual.QUANTITY_MEASURE); 4214 } 4215 } 4216 if (!!this.visual.BUY_ID) 4217 { 4218 this.obBuyBtn = BX(this.visual.BUY_ID); 4219 } 4220 4221 if (this.showPercent) 4222 { 4223 if (!!this.visual.DSC_PERC) 4224 { 4225 this.obDscPerc = BX(this.visual.DSC_PERC); 4226 } 4227 if (this.secondPict && !!this.visual.SECOND_DSC_PERC) 4228 { 4229 this.obSecondDscPerc = BX(this.visual.SECOND_DSC_PERC); 4230 } 4231 } 4232 4233 if (this.showSkuProps) 4234 { 4235 if (!!this.visual.DISPLAY_PROP_DIV) 4236 { 4237 this.obSkuProps = BX(this.visual.DISPLAY_PROP_DIV); 4238 } 4239 } 4240 4241 if (0 === this.errorCode) 4242 { 4243 if (this.showQuantity) 4244 { 4245 if (!!this.obQuantityUp) 4246 { 4247 BX.bind(this.obQuantityUp, 'click', BX.delegate(this.QuantityUp, this)); 4248 } 4249 if (!!this.obQuantityDown) 4250 { 4251 BX.bind(this.obQuantityDown, 'click', BX.delegate(this.QuantityDown, this)); 4252 } 4253 if (!!this.obQuantity) 4254 { 4255 BX.bind(this.obQuantity, 'change', BX.delegate(this.QuantityChange, this)); 4256 } 4257 } 4258 switch (this.productType) 4259 { 4260 case 1://product 4261 break; 4262 case 3://sku 4263 TreeItems = BX.findChildren(this.obTree, {tagName: 'li'}, true); 4264 if (!!TreeItems && 0 < TreeItems.length) 4265 { 4266 for (i = 0; i < TreeItems.length; i++) 4267 { 4268 BX.bind(TreeItems[i], 'click', BX.delegate(this.SelectOfferProp, this)); 4269 } 4270 } 4271 for (i = 0; i < this.obTreeRows.length; i++) 4272 { 4273 BX.bind(this.obTreeRows[i].LEFT, 'click', BX.delegate(this.RowLeft, this)); 4274 BX.bind(this.obTreeRows[i].RIGHT, 'click', BX.delegate(this.RowRight, this)); 4275 } 4276 this.SetCurrent(); 4277 break; 4278 } 4279 if (!!this.obBuyBtn) 4280 { 4281 BX.bind(this.obBuyBtn, 'click', BX.delegate(this.Basket, this)); 4282 } 4283 if (this.lastElement) 4284 { 4285 this.containerHeight = parseInt(this.obProduct.parentNode.offsetHeight, 10); 4286 if (isNaN(this.containerHeight)) 4287 { 4288 this.containerHeight = 0; 4289 } 4290 this.setHeight(); 4291 BX.bind(window, 'resize', BX.delegate(this.checkHeight, this)); 4292 BX.bind(this.obProduct.parentNode, 'mouseover', BX.delegate(this.setHeight, this)); 4293 BX.bind(this.obProduct.parentNode, 'mouseout', BX.delegate(this.clearHeight, this)); 4294 } 4295 } 4296}; 4297 4298window.JCCatalogBigdataProducts.prototype.checkHeight = function() 4299{ 4300 this.containerHeight = parseInt(this.obProduct.parentNode.offsetHeight, 10); 4301 if (isNaN(this.containerHeight)) 4302 { 4303 this.containerHeight = 0; 4304 } 4305}; 4306 4307window.JCCatalogBigdataProducts.prototype.setHeight = function() 4308{ 4309 if (0 < this.containerHeight) 4310 { 4311 BX.adjust(this.obProduct.parentNode, {style: { height: this.containerHeight+'px'}}); 4312 } 4313}; 4314 4315window.JCCatalogBigdataProducts.prototype.clearHeight = function() 4316{ 4317 BX.adjust(this.obProduct.parentNode, {style: { height: 'auto'}}); 4318}; 4319 4320window.JCCatalogBigdataProducts.prototype.QuantityUp = function() 4321{ 4322 var curValue = 0, 4323 boolSet = true; 4324 4325 if (0 === this.errorCode && this.showQuantity && this.canBuy) 4326 { 4327 curValue = (this.isDblQuantity ? parseFloat(this.obQuantity.value) : parseInt(this.obQuantity.value, 10)); 4328 if (!isNaN(curValue)) 4329 { 4330 curValue += this.stepQuantity; 4331 if (this.checkQuantity) 4332 { 4333 if (curValue > this.maxQuantity) 4334 { 4335 boolSet = false;
4336 } 4337 } 4338 if (boolSet) 4339 { 4340 if (this.isDblQuantity) 4341 { 4342 curValue = Math.round(curValue*this.precisionFactor)/this.precisionFactor; 4343 } 4344 this.obQuantity.value = curValue; 4345 } 4346 } 4347 } 4348}; 4349 4350window.JCCatalogBigdataProducts.prototype.QuantityDown = function() 4351{ 4352 var curValue = 0, 4353 boolSet = true; 4354 4355 if (0 === this.errorCode && this.showQuantity && this.canBuy) 4356 { 4357 curValue = (this.isDblQuantity ? parseFloat(this.obQuantity.value): parseInt(this.obQuantity.value, 10)); 4358 if (!isNaN(curValue)) 4359 { 4360 curValue -= this.stepQuantity; 4361 if (curValue < this.stepQuantity) 4362 { 4363 boolSet = false; 4364 } 4365 if (boolSet) 4366 { 4367 if (this.isDblQuantity) 4368 { 4369 curValue = Math.round(curValue*this.precisionFactor)/this.precisionFactor; 4370 } 4371 this.obQuantity.value = curValue; 4372 } 4373 } 4374 } 4375}; 4376 4377window.JCCatalogBigdataProducts.prototype.QuantityChange = function() 4378{ 4379 var curValue = 0, 4380 boolSet = true; 4381 4382 if (0 === this.errorCode && this.showQuantity) 4383 { 4384 if (this.canBuy) 4385 { 4386 curValue = (this.isDblQuantity ? parseFloat(this.obQuantity.value) : parseInt(this.obQuantity.value, 10)); 4387 if (!isNaN(curValue)) 4388 { 4389 if (this.checkQuantity) 4390 { 4391 if (curValue > this.maxQuantity) 4392 { 4393 boolSet = false; 4394 curValue = this.maxQuantity; 4395 } 4396 else if (curValue < this.stepQuantity) 4397 { 4398 boolSet = false; 4399 curValue = this.stepQuantity; 4400 } 4401 } 4402 if (!boolSet) 4403 { 4404 this.obQuantity.value = curValue; 4405 } 4406 } 4407 else 4408 { 4409 this.obQuantity.value = this.stepQuantity; 4410 } 4411 } 4412 else 4413 { 4414 this.obQuantity.value = this.stepQuantity; 4415 } 4416 } 4417}; 4418 4419window.JCCatalogBigdataProducts.prototype.QuantitySet = function(index) 4420{ 4421 if (0 === this.errorCode) 4422 { 4423 this.canBuy = this.offers[index].CAN_BUY; 4424 if (this.canBuy) 4425 { 4426 BX.addClass(this.obBuyBtn, 'bx_bt_button'); 4427 BX.removeClass(this.obBuyBtn, 'bx_bt_button_type_2'); 4428 this.obBuyBtn.innerHTML = BX.message('CBD_MESS_BTN_BUY'); 4429 } 4430 else 4431 { 4432 BX.addClass(this.obBuyBtn, 'bx_bt_button_type_2'); 4433 BX.removeClass(this.obBuyBtn, 'bx_bt_button'); 4434 this.obBuyBtn.innerHTML = BX.message('CBD_MESS_NOT_AVAILABLE'); 4435 } 4436 if (this.showQuantity) 4437 { 4438 this.isDblQuantity = this.offers[index].QUANTITY_FLOAT; 4439 this.checkQuantity = this.offers[index].CHECK_QUANTITY; 4440 if (this.isDblQuantity) 4441 { 4442 this.maxQuantity = parseFloat(this.offers[index].MAX_QUANTITY); 4443 this.stepQuantity = Math.round(parseFloat(this.offers[index].STEP_QUANTITY)*this.precisionFactor)/this.precisionFactor; 4444 } 4445 else 4446 { 4447 this.maxQuantity = parseInt(this.offers[index].MAX_QUANTITY, 10); 4448 this.stepQuantity = parseInt(this.offers[index].STEP_QUANTITY, 10); 4449 } 4450 4451 this.obQuantity.value = this.stepQuantity; 4452 this.obQuantity.disabled = !this.canBuy; 4453 if (!!this.obMeasure) 4454 { 4455 if (!!this.offers[index].MEASURE) 4456 { 4457 BX.adjust(this.obMeasure, { html : this.offers[index].MEASURE}); 4458 } 4459 else 4460 { 4461 BX.adjust(this.obMeasure, { html : ''}); 4462 } 4463 } 4464 } 4465 } 4466}; 4467 4468window.JCCatalogBigdataProducts.prototype.SelectOfferProp = function() 4469{ 4470 var i = 0, 4471 value = '', 4472 strTreeValue = '', 4473 arTreeItem = [], 4474 RowItems = null, 4475 target = BX.proxy_context; 4476 4477 if (!!target && target.hasAttribute('data-treevalue')) 4478 { 4479 strTreeValue = target.getAttribute('data-treevalue'); 4480 arTreeItem = strTreeValue.split('_'); 4481 if (this.SearchOfferPropIndex(arTreeItem[0], arTreeItem[1])) 4482 { 4483 RowItems = BX.findChildren(target.parentNode, {tagName: 'li'}, false); 4484 if (!!RowItems && 0 < RowItems.length) 4485 { 4486 for (i = 0; i < RowItems.length; i++) 4487 { 4488 value = RowItems[i].getAttribute('data-onevalue'); 4489 if (value === arTreeItem[1]) 4490 { 4491 BX.addClass(RowItems[i], 'bx_active'); 4492 } 4493 else 4494 { 4495 BX.removeClass(RowItems[i], 'bx_active'); 4496 } 4497 } 4498 } 4499 } 4500 } 4501}; 4502 4503window.JCCatalogBigdataProducts.prototype.SearchOfferPropIndex = function(strPropID, strPropValue) 4504{ 4505 var strName = '', 4506 arShowValues = false, 4507 i, j, 4508 arCanBuyValues = [], 4509 index = -1, 4510 arFilter = {}, 4511 tmpFilter = []; 4512 4513 for (i = 0; i < this.treeProps.length; i++) 4514 { 4515 if (this.treeProps[i].ID === strPropID) 4516 { 4517 index = i; 4518 break; 4519 } 4520 } 4521 4522 if (-1 < index) 4523 { 4524 for (i = 0; i < index; i++) 4525 { 4526 strName = 'PROP_'+this.treeProps[i].ID; 4527 arFilter[strName] = this.selectedValues[strName]; 4528 } 4529 strName = 'PROP_'+this.treeProps[index].ID; 4530 arShowValues = this.GetRowValues(arFilter, strName); 4531 if (!arShowValues) 4532 { 4533 return false;
4534 } 4535 if (!BX.util.in_array(strPropValue, arShowValues)) 4536 { 4537 return false; 4538 } 4539 arFilter[strName] = strPropValue; 4540 for (i = index+1; i < this.treeProps.length; i++) 4541 { 4542 strName = 'PROP_'+this.treeProps[i].ID; 4543 arShowValues = this.GetRowValues(arFilter, strName); 4544 if (!arShowValues) 4545 { 4546 return false; 4547 } 4548 if (this.showAbsent) 4549 { 4550 arCanBuyValues = []; 4551 tmpFilter = []; 4552 tmpFilter = BX.clone(arFilter, true); 4553 for (j = 0; j < arShowValues.length; j++) 4554 { 4555 tmpFilter[strName] = arShowValues[j]; 4556 if (this.GetCanBuy(tmpFilter)) 4557 { 4558 arCanBuyValues[arCanBuyValues.length] = arShowValues[j]; 4559 } 4560 } 4561 } 4562 else 4563 { 4564 arCanBuyValues = arShowValues; 4565 } 4566 if (!!this.selectedValues[strName] && BX.util.in_array(this.selectedValues[strName], arCanBuyValues)) 4567 { 4568 arFilter[strName] = this.selectedValues[strName]; 4569 } 4570 else 4571 { 4572 arFilter[strName] = arCanBuyValues[0]; 4573 } 4574 this.UpdateRow(i, arFilter[strName], arShowValues, arCanBuyValues); 4575 } 4576 this.selectedValues = arFilter; 4577 this.ChangeInfo(); 4578 } 4579 return true; 4580}; 4581 4582window.JCCatalogBigdataProducts.prototype.RowLeft = function() 4583{ 4584 var i = 0, 4585 strTreeValue = '', 4586 index = -1, 4587 target = BX.proxy_context; 4588 4589 if (!!target && target.hasAttribute('data-treevalue')) 4590 { 4591 strTreeValue = target.getAttribute('data-treevalue'); 4592 for (i = 0; i < this.treeProps.length; i++) 4593 { 4594 if (this.treeProps[i].ID === strTreeValue) 4595 { 4596 index = i; 4597 break; 4598 } 4599 } 4600 if (-1 < index && this.treeRowShowSize < this.showCount[index]) 4601 { 4602 if (0 > this.showStart[index]) 4603 { 4604 this.showStart[index]++; 4605 BX.adjust(this.obTreeRows[index].LIST, { style: { marginLeft: this.showStart[index]*20+'%' }}); 4606 BX.adjust(this.obTreeRows[index].RIGHT, { style: this.treeEnableArrow }); 4607 } 4608 4609 if (0 <= this.showStart[index]) 4610 { 4611 BX.adjust(this.obTreeRows[index].LEFT, { style: this.treeDisableArrow }); 4612 } 4613 } 4614 } 4615}; 4616 4617window.JCCatalogBigdataProducts.prototype.RowRight = function() 4618{ 4619 var i = 0, 4620 strTreeValue = '', 4621 index = -1, 4622 target = BX.proxy_context; 4623 4624 if (!!target && target.hasAttribute('data-treevalue')) 4625 { 4626 strTreeValue = target.getAttribute('data-treevalue'); 4627 for (i = 0; i < this.treeProps.length; i++) 4628 { 4629 if (this.treeProps[i].ID === strTreeValue) 4630 { 4631 index = i; 4632 break; 4633 } 4634 } 4635 if (-1 < index && this.treeRowShowSize < this.showCount[index]) 4636 { 4637 if ((this.treeRowShowSize - this.showStart[index]) < this.showCount[index]) 4638 { 4639 this.showStart[index]--; 4640 BX.adjust(this.obTreeRows[index].LIST, { style: { marginLeft: this.showStart[index]*20+'%' }}); 4641 BX.adjust(this.obTreeRows[index].LEFT, { style: this.treeEnableArrow }); 4642 } 4643 4644 if ((this.treeRowShowSize - this.showStart[index]) >= this.showCount[index]) 4645 { 4646 BX.adjust(this.obTreeRows[index].RIGHT, { style: this.treeDisableArrow }); 4647 } 4648 } 4649 } 4650}; 4651 4652window.JCCatalogBigdataProducts.prototype.UpdateRow = function(intNumber, activeID, showID, canBuyID) 4653{ 4654 var i = 0, 4655 showI = 0, 4656 value = '', 4657 countShow = 0, 4658 strNewLen = '', 4659 obData = {}, 4660 pictMode = false, 4661 extShowMode = false, 4662 isCurrent = false, 4663 selectIndex = 0, 4664 obLeft = this.treeEnableArrow, 4665 obRight = this.treeEnableArrow, 4666 currentShowStart = 0, 4667 RowItems = null; 4668 4669 if (-1 < intNumber && intNumber < this.obTreeRows.length) 4670 { 4671 RowItems = BX.findChildren(this.obTreeRows[intNumber].LIST, {tagName: 'li'}, false); 4672 if (!!RowItems && 0 < RowItems.length) 4673 { 4674 pictMode = ('PICT' === this.treeProps[intNumber].SHOW_MODE); 4675 countShow = showID.length; 4676 extShowMode = this.treeRowShowSize < countShow; 4677 strNewLen = (extShowMode ? (100/countShow)+'%' : '20%'); 4678 obData = { 4679 props: { className: '' }, 4680 style: { 4681 width: strNewLen 4682 } 4683 }; 4684 if (pictMode) 4685 { 4686 obData.style.paddingTop = strNewLen; 4687 } 4688 for (i = 0; i < RowItems.length; i++) 4689 { 4690 value = RowItems[i].getAttribute('data-onevalue'); 4691 isCurrent = (value === activeID); 4692 if (BX.util.in_array(value, canBuyID)) 4693 { 4694 obData.props.className = (isCurrent ? 'bx_active' : ''); 4695 } 4696 else 4697 { 4698 obData.props.className = (isCurrent ? 'bx_active bx_missing' : 'bx_missing'); 4699 } 4700 obData.style.display = 'none'; 4701 if (BX.util.in_array(value, showID)) 4702 { 4703 obData.style.display = ''; 4704 if (isCurrent) 4705 { 4706 selectIndex = showI; 4707 } 4708 showI++; 4709 } 4710 BX.adjust(RowItems[i], obData); 4711 } 4712 4713 obData = { 4714 style: { 4715 width: (extShowMode ? 20*countShow : 100)+'%', 4716 marginLeft: '0%' 4717 } 4718 }; 4719 if (pictMode) 4720 { 4721 BX.adjust(this.obTreeRows[intNumber].CONT, {props: {className: (extShowMode ? 'bx_item_detail_scu full' : 'bx_item_detail_scu')}}); 4722 } 4723 else 4724 {
4725 BX.adjust(this.obTreeRows[intNumber].CONT, {props: {className: (extShowMode ? 'bx_item_detail_size full' : 'bx_item_detail_size')}}); 4726 } 4727 if (extShowMode) 4728 { 4729 if (selectIndex +1 === countShow) 4730 { 4731 obRight = this.treeDisableArrow; 4732 } 4733 if (this.treeRowShowSize <= selectIndex) 4734 { 4735 currentShowStart = this.treeRowShowSize - selectIndex - 1; 4736 obData.style.marginLeft = currentShowStart*20+'%'; 4737 } 4738 if (0 === currentShowStart) 4739 { 4740 obLeft = this.treeDisableArrow; 4741 } 4742 BX.adjust(this.obTreeRows[intNumber].LEFT, {style: obLeft }); 4743 BX.adjust(this.obTreeRows[intNumber].RIGHT, {style: obRight }); 4744 } 4745 else 4746 { 4747 BX.adjust(this.obTreeRows[intNumber].LEFT, {style: {display: 'none'}}); 4748 BX.adjust(this.obTreeRows[intNumber].RIGHT, {style: {display: 'none'}}); 4749 } 4750 BX.adjust(this.obTreeRows[intNumber].LIST, obData); 4751 this.showCount[intNumber] = countShow; 4752 this.showStart[intNumber] = currentShowStart; 4753 } 4754 } 4755}; 4756 4757window.JCCatalogBigdataProducts.prototype.GetRowValues = function(arFilter, index) 4758{ 4759 var i = 0, 4760 j, 4761 arValues = [], 4762 boolSearch = false, 4763 boolOneSearch = true; 4764 4765 if (0 === arFilter.length) 4766 { 4767 for (i = 0; i < this.offers.length; i++) 4768 { 4769 if (!BX.util.in_array(this.offers[i].TREE[index], arValues)) 4770 { 4771 arValues[arValues.length] = this.offers[i].TREE[index]; 4772 } 4773 } 4774 boolSearch = true; 4775 } 4776 else 4777 { 4778 for (i = 0; i < this.offers.length; i++) 4779 { 4780 boolOneSearch = true; 4781 for (j in arFilter) 4782 { 4783 if (arFilter[j] !== this.offers[i].TREE[j]) 4784 { 4785 boolOneSearch = false; 4786 break; 4787 } 4788 } 4789 if (boolOneSearch) 4790 { 4791 if (!BX.util.in_array(this.offers[i].TREE[index], arValues)) 4792 { 4793 arValues[arValues.length] = this.offers[i].TREE[index]; 4794 } 4795 boolSearch = true; 4796 } 4797 } 4798 } 4799 return (boolSearch ? arValues : false); 4800}; 4801 4802window.JCCatalogBigdataProducts.prototype.GetCanBuy = function(arFilter) 4803{ 4804 var i = 0, 4805 j, 4806 boolSearch = false, 4807 boolOneSearch = true; 4808 4809 for (i = 0; i < this.offers.length; i++) 4810 { 4811 boolOneSearch = true; 4812 for (j in arFilter) 4813 { 4814 if (arFilter[j] !== this.offers[i].TREE[j]) 4815 { 4816 boolOneSearch = false; 4817 break; 4818 } 4819 } 4820 if (boolOneSearch) 4821 { 4822 if (this.offers[i].CAN_BUY) 4823 { 4824 boolSearch = true; 4825 break; 4826 } 4827 } 4828 } 4829 return boolSearch; 4830}; 4831 4832window.JCCatalogBigdataProducts.prototype.SetCurrent = function() 4833{ 4834 var i = 0, 4835 j = 0, 4836 arCanBuyValues = [], 4837 strName = '', 4838 arShowValues = false, 4839 arFilter = {}, 4840 tmpFilter = [], 4841 current = this.offers[this.offerNum].TREE; 4842 4843 for (i = 0; i < this.treeProps.length; i++) 4844 { 4845 strName = 'PROP_'+this.treeProps[i].ID; 4846 arShowValues = this.GetRowValues(arFilter, strName); 4847 if (!arShowValues) 4848 { 4849 break; 4850 } 4851 if (BX.util.in_array(current[strName], arShowValues)) 4852 { 4853 arFilter[strName] = current[strName]; 4854 } 4855 else 4856 { 4857 arFilter[strName] = arShowValues[0]; 4858 this.offerNum = 0; 4859 } 4860 if (this.showAbsent) 4861 { 4862 arCanBuyValues = []; 4863 tmpFilter = []; 4864 tmpFilter = BX.clone(arFilter, true); 4865 for (j = 0; j < arShowValues.length; j++) 4866 { 4867 tmpFilter[strName] = arShowValues[j]; 4868 if (this.GetCanBuy(tmpFilter)) 4869 { 4870 arCanBuyValues[arCanBuyValues.length] = arShowValues[j]; 4871 } 4872 } 4873 } 4874 else 4875 { 4876 arCanBuyValues = arShowValues; 4877 } 4878 this.UpdateRow(i, arFilter[strName], arShowValues, arCanBuyValues); 4879 } 4880 this.selectedValues = arFilter; 4881 this.ChangeInfo(); 4882}; 4883 4884window.JCCatalogBigdataProducts.prototype.ChangeInfo = function() 4885{ 4886 var i = 0, 4887 j, 4888 index = -1, 4889 obData = {}, 4890 boolOneSearch = true, 4891 strPrice = ''; 4892 4893 for (i = 0; i < this.offers.length; i++) 4894 { 4895 boolOneSearch = true; 4896 for (j in this.selectedValues) 4897 { 4898 if (this.selectedValues[j] !== this.offers[i].TREE[j]) 4899 { 4900 boolOneSearch = false; 4901 break; 4902 } 4903 } 4904 if (boolOneSearch) 4905 { 4906 index = i; 4907 break; 4908 } 4909 } 4910 if (-1 < index) 4911 { 4912 if (!!this.obPict) 4913 { 4914 if (!!this.offers[index].PREVIEW_PICTURE) 4915 { 4916 BX.adjust(this.obPict, {style: {backgroundImage: 'url('+this.offers[index].PREVIEW_PICTURE.SRC+')'}}); 4917 } 4918 else 4919 { 4920 BX.adjust(this.obPict, {style: {backgroundImage: 'url('+this.defaultPict.pict.SRC+')'}}); 4921 } 4922 } 4923 if (this.secondPict && !!this.obSecondPict) 4924 { 4925 if (!!this.offers[index].PREVIEW_PICTURE_SECOND) 4926 { 4927 BX.adjust(this.obSecondPict, {style: {backgroundImage: 'url('+this.offers[index].PREVIEW_PICTURE_SECOND.SRC+')'}}); 4928 } 4929 else if (!!this.offers[index].PREVIEW_PICTURE.SRC) 4930 { 4931 BX.adjust(this.obSecondPict, {style: {backgroundImage: 'url('+this.offers[index].PREVIEW_PICTURE.SRC+')'}}); 4932 } 4933 else if (!!this.defaultPict.secondPict) 4934 { 4935 BX.adjust(this.obSecondPict, {style: {backgroundImage: 'url('+this.defaultPict.secondPict.SRC+')'}}); 4936 } 4937 else 4938 {
4939 BX.adjust(this.obSecondPict, {style: {backgroundImage: 'url('+this.defaultPict.pict.SRC+')'}}); 4940 } 4941 } 4942 if (this.showSkuProps && !!this.obSkuProps) 4943 { 4944 if (0 === this.offers[index].DISPLAY_PROPERTIES.length) 4945 { 4946 BX.adjust(this.obSkuProps, {style: {display: 'none'}, html: ''}); 4947 } 4948 else 4949 { 4950 BX.adjust(this.obSkuProps, {style: {display: ''}, html: this.offers[index].DISPLAY_PROPERTIES}); 4951 } 4952 } 4953 if (!!this.obPrice) 4954 { 4955 strPrice = this.offers[index].PRICE.PRINT_DISCOUNT_VALUE; 4956 if (this.showOldPrice && (this.offers[index].PRICE.DISCOUNT_VALUE !== this.offers[index].PRICE.VALUE)) 4957 { 4958 strPrice += ' <span>'+this.offers[index].PRICE.PRINT_VALUE+'</span>'; 4959 } 4960 BX.adjust(this.obPrice, {html: strPrice}); 4961 if (this.showPercent) 4962 { 4963 if (this.offers[index].PRICE.DISCOUNT_VALUE !== this.offers[index].PRICE.VALUE) 4964 { 4965 obData = { 4966 style: { 4967 display: '' 4968 }, 4969 html: this.offers[index].PRICE.DISCOUNT_DIFF_PERCENT 4970 }; 4971 } 4972 else 4973 { 4974 obData = { 4975 style: { 4976 display: 'none' 4977 }, 4978 html: '' 4979 }; 4980 } 4981 if (!!this.obDscPerc) 4982 { 4983 BX.adjust(this.obDscPerc, obData); 4984 } 4985 if (!!this.obSecondDscPerc) 4986 { 4987 BX.adjust(this.obSecondDscPerc, obData); 4988 } 4989 } 4990 } 4991 this.offerNum = index; 4992 this.QuantitySet(this.offerNum); 4993 } 4994}; 4995 4996window.JCCatalogBigdataProducts.prototype.InitBasketUrl = function() 4997{ 4998 switch (this.productType) 4999 { 5000 case 1://product 5001 case 2://set 5002 this.basketUrl = this.product.addUrl; 5003 break; 5004 case 3://sku 5005 this.basketUrl = this.offers[this.offerNum].ADD_URL; 5006 break; 5007 } 5008 this.basketParams = { 5009 'ajax_basket': 'Y', 5010 'rcm': 'yes' 5011 }; 5012 if (this.showQuantity) 5013 { 5014 this.basketParams[this.basketData.quantity] = this.obQuantity.value; 5015 } 5016}; 5017 5018window.JCCatalogBigdataProducts.prototype.FillBasketProps = function() 5019{ 5020 if (!this.visual.BASKET_PROP_DIV) 5021 { 5022 return; 5023 } 5024 var 5025 i = 0, 5026 propCollection = null, 5027 foundValues = false, 5028 obBasketProps = null; 5029 5030 if (this.basketData.useProps && !this.basketData.emptyProps) 5031 { 5032 if (!!this.obPopupWin && !!this.obPopupWin.contentContainer) 5033 { 5034 obBasketProps = this.obPopupWin.contentContainer; 5035 } 5036 } 5037 else 5038 { 5039 obBasketProps = BX(this.visual.BASKET_PROP_DIV); 5040 } 5041 if (!obBasketProps) 5042 { 5043 return; 5044 } 5045 propCollection = obBasketProps.getElementsByTagName('select'); 5046 if (!!propCollection && !!propCollection.length) 5047 { 5048 for (i = 0; i < propCollection.length; i++) 5049 { 5050 if (!propCollection[i].disabled) 5051 { 5052 switch(propCollection[i].type.toLowerCase()) 5053 { 5054 case 'select-one': 5055 this.basketParams[propCollection[i].name] = propCollection[i].value; 5056 foundValues = true; 5057 break; 5058 default: 5059 break; 5060 } 5061 } 5062 } 5063 } 5064 propCollection = obBasketProps.getElementsByTagName('input'); 5065 if (!!propCollection && !!propCollection.length) 5066 { 5067 for (i = 0; i < propCollection.length; i++) 5068 { 5069 if (!propCollection[i].disabled) 5070 { 5071 switch(propCollection[i].type.toLowerCase()) 5072 { 5073 case 'hidden': 5074 this.basketParams[propCollection[i].name] = propCollection[i].value; 5075 foundValues = true; 5076 break; 5077 case 'radio': 5078 if (propCollection[i].checked) 5079 { 5080 this.basketParams[propCollection[i].name] = propCollection[i].value; 5081 foundValues = true; 5082 } 5083 break; 5084 default: 5085 break; 5086 } 5087 } 5088 } 5089 } 5090 if (!foundValues) 5091 { 5092 this.basketParams[this.basketData.props] = []; 5093 this.basketParams[this.basketData.props][0] = 0; 5094 } 5095}; 5096 5097window.JCCatalogBigdataProducts.prototype.SendToBasket = function() 5098{ 5099 if (!this.canBuy) 5100 { 5101 return; 5102 } 5103 this.InitBasketUrl(); 5104 this.FillBasketProps(); 5105 5106 // check recommendation 5107 if (this.product && this.product.id) 5108 { 5109 if (JCCatalogBigdataProducts.productsByRecommendation && JCCatalogBigdataProducts.productsByRecommendation[this.product.id]) 5110 { 5111 this.RememberProductRecommendation(JCCatalogBigdataProducts.productsByRecommendation[this.product.id], this.product.id); 5112 } 5113 } 5114 5115 BX.ajax({ 5116 method: 'POST', 5117 dataType: 'json', 5118 url: this.basketUrl, 5119 data: this.basketParams, 5120 onsuccess: BX.delegate(this.BasketResult, this) 5121 }); 5122}; 5123 5124/** 5125 * @deprecated 5126 * @param obj 5127 * @param productId 5128 * @constructor 5129 */ 5130window.JCCatalogBigdataProducts.prototype.RememberRecommendation = function(obj, productId) 5131{ 5132 var rcmContainer = BX.findParent(obj, {'className':'bigdata_recommended_products_items'}); 5133 var rcmId = BX.findChild(rcmContainer, {'attr':{'name':'bigdata_recommendation_id'}}, true).value; 5134 5135 this.RememberProductRecommendation(rcmId, productId); 5136}; 5137 5138window.JCCatalogBigdataProducts.prototype.RememberProductRecommendation = function(recommendationId, productId) 5139{ 5140 // save to RCM_PRODUCT_LOG
5141 var plCookieName = BX.cookie_prefix+'_RCM_PRODUCT_LOG'; 5142 var plCookie = getCookie(plCookieName); 5143 var itemFound = false; 5144 5145 var cItems = [], 5146 cItem; 5147 5148 if (plCookie) 5149 { 5150 cItems = plCookie.split('.'); 5151 } 5152 5153 var i = cItems.length; 5154 5155 while (i--) 5156 { 5157 cItem = cItems[i].split('-'); 5158 5159 if (cItem[0] == productId) 5160 { 5161 // it's already in recommendations, update the date 5162 cItem = cItems[i].split('-'); 5163 5164 // update rcmId and date 5165 cItem[1] = recommendationId; 5166 cItem[2] = BX.current_server_time; 5167 5168 cItems[i] = cItem.join('-'); 5169 itemFound = true; 5170 } 5171 else 5172 { 5173 if ((BX.current_server_time - cItem[2]) > 3600*24*30) 5174 { 5175 cItems.splice(i, 1); 5176 } 5177 } 5178 } 5179 5180 if (!itemFound) 5181 { 5182 // add recommendation 5183 cItems.push([productId, recommendationId, BX.current_server_time].join('-')); 5184 } 5185 5186 // serialize 5187 var plNewCookie = cItems.join('.'); 5188 5189 var cookieDate = new Date(new Date().getTime() + 1000*3600*24*365*10); 5190 document.cookie=plCookieName+"="+plNewCookie+"; path=/; expires="+cookieDate.toUTCString()+"; domain="+BX.cookie_domain; 5191}; 5192 5193window.JCCatalogBigdataProducts.prototype.Basket = function() 5194{ 5195 var contentBasketProps = ''; 5196 if (!this.canBuy) 5197 { 5198 return; 5199 } 5200 switch (this.productType) 5201 { 5202 case 1://product 5203 case 2://set 5204 if (this.basketData.useProps && !this.basketData.emptyProps) 5205 { 5206 this.InitPopupWindow(); 5207 this.obPopupWin.setTitleBar(BX.message('CBD_TITLE_BASKET_PROPS')); 5208 if (BX(this.visual.BASKET_PROP_DIV)) 5209 { 5210 contentBasketProps = BX(this.visual.BASKET_PROP_DIV).innerHTML; 5211 } 5212 this.obPopupWin.setContent(contentBasketProps); 5213 this.obPopupWin.setButtons([ 5214 new BasketButton({ 5215 ownerClass: this.obProduct.parentNode.parentNode.parentNode.className, 5216 text: BX.message('CBD_BTN_MESSAGE_SEND_PROPS'), 5217 events: { 5218 click: BX.delegate(this.SendToBasket, this) 5219 } 5220 }) 5221 ]); 5222 this.obPopupWin.show(); 5223 } 5224 else 5225 { 5226 this.SendToBasket(); 5227 } 5228 break; 5229 case 3://sku 5230 this.SendToBasket(); 5231 break; 5232 } 5233}; 5234 5235window.JCCatalogBigdataProducts.prototype.BasketResult = function(arResult) 5236{ 5237 var strContent = '', 5238 strName = '', 5239 strPict = '', 5240 successful, 5241 buttons = []; 5242 5243 if (!!this.obPopupWin) 5244 this.obPopupWin.close(); 5245 5246 if (!BX.type.isPlainObject(arResult)) 5247 return; 5248 5249 successful = ('OK' === arResult.STATUS); 5250 if (successful) 5251 { 5252 BX.onCustomEvent('OnBasketChange'); 5253 strName = this.product.name; 5254 switch(this.productType) 5255 { 5256 case 1:// 5257 case 2:// 5258 strPict = this.product.pict.SRC; 5259 break; 5260 case 3: 5261 strPict = (!!this.offers[this.offerNum].PREVIEW_PICTURE ? 5262 this.offers[this.offerNum].PREVIEW_PICTURE.SRC : 5263 this.defaultPict.pict.SRC 5264 ); 5265 break; 5266 } 5267 strContent = '<div style="width: 100%; margin: 0; text-align: center;"><img src="'+strPict+'" height="130" style="max-height:130px"><p>'+strName+'</p></div>'; 5268 buttons = [ 5269 new BasketButton({ 5270 ownerClass: this.obProduct.parentNode.parentNode.parentNode.className, 5271 text: BX.message("CBD_BTN_MESSAGE_BASKET_REDIRECT"), 5272 events: { 5273 click: BX.delegate(function(){ 5274 location.href = (!!this.basketData.basketUrl ? this.basketData.basketUrl : BX.message('CBD_BASKET_URL')); 5275 }, this) 5276 } 5277 }) 5278 ]; 5279 } 5280 else 5281 { 5282 strContent = (!!arResult.MESSAGE ? arResult.MESSAGE : BX.message('CBD_BASKET_UNKNOWN_ERROR')); 5283 buttons = [ 5284 new BasketButton({ 5285 ownerClass: this.obProduct.parentNode.parentNode.parentNode.className, 5286 text: BX.message('CBD_BTN_MESSAGE_CLOSE'), 5287 events: { 5288 click: BX.delegate(this.obPopupWin.close, this.obPopupWin) 5289 } 5290 }) 5291 ]; 5292 } 5293 this.InitPopupWindow(); 5294 this.obPopupWin.setTitleBar(successful ? BX.message('CBD_TITLE_SUCCESSFUL') : BX.message('CBD_TITLE_ERROR')); 5295 this.obPopupWin.setContent(strContent); 5296 this.obPopupWin.setButtons(buttons); 5297 this.obPopupWin.show(); 5298}; 5299 5300window.JCCatalogBigdataProducts.prototype.InitPopupWindow = function() 5301{ 5302 if (!!this.obPopupWin) 5303 return; 5304 5305 this.obPopupWin = BX.PopupWindowManager.create('CatalogSectionBasket_'+this.visual.ID, null, { 5306 autoHide: false, 5307 offsetLeft: 0, 5308 offsetTop: 0, 5309 overlay : true, 5310 closeByEsc: true, 5311 titleBar: true, 5312 closeIcon: true, 5313 contentColor: 'white' 5314 }); 5315}; 5316})(window); 5317 5318function getCookie(name) { 5319 var matches = document.cookie.match(new RegExp( 5320 "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" 5321 )); 5322 return matches ? decodeURIComponent(matches[1]) : undefined; 5323} 5324 5325/** 5326 * @deprecated see ajax.php 5327 * @param rcm_items_cont 5328 */ 5329function bx_rcm_recommendation_event_attaching(rcm_items_cont) 5330{ 5331 return null; 5332} 5333 5334function bx_rcm_adaptive_recommendation_event_attaching(items, uniqId) 5335{ 5336 // onclick handler 5337 var callback = function (e) { 5338 5339 var link = BX(this), j; 5340 5341 for (j in items) 5342 { 5343 if (items[j].productUrl == link.getAttribute('href')) 5344 { 5345 window.JCCatalogBigdataProducts.prototype.RememberProductRecommendation( 5346 items[j].recommendationId, items[j].productId 5347 ); 5348 5349 break; 5350 } 5351 } 5352 }; 5353 5354 // check if a container was defined is the template 5355 var itemsContainer = BX(uniqId); 5356 5357 if (!itemsContainer) 5358 { 5359 // then get all the links 5360 itemsContainer = document.body; 5361 } 5362 5363 var links = BX.findChildren(itemsContainer, {tag:'a'}, true); 5364 5365 // bind 5366 if (links) 5367 { 5368 var i; 5369 for (i in links) 5370 { 5371 BX.bind(links[i], 'click', callback); 5372 } 5373 } 5374} 5375 5376function bx_rcm_get_from_cloud(injectId, rcmParameters, localAjaxData) 5377{ 5378 var url = 'https://analytics.bitrix.info/crecoms/v1_0/recoms.php';
5379 var data = BX.ajax.prepareData(rcmParameters); 5380 5381 if (data) 5382 { 5383 url += (url.indexOf('?') !== -1 ? "&" : "?") + data; 5384 } 5385 5386 var onready = function(response) { 5387 5388 if (!response.items) 5389 { 5390 response.items = []; 5391 } 5392 BX.ajax({ 5393 url: '/bitrix/components/bitrix/catalog.bigdata.products/ajax.php?'+BX.ajax.prepareData({'AJAX_ITEMS': response.items, 'RID': response.id}), 5394 method: 'POST', 5395 data: localAjaxData, 5396 dataType: 'html', 5397 processData: false, 5398 start: true, 5399 onsuccess: function (html) { 5400 var ob = BX.processHTML(html); 5401 5402 // inject 5403 BX(injectId).innerHTML = ob.HTML; 5404 BX.ajax.processScripts(ob.SCRIPT); 5405 } 5406 }); 5407 }; 5408 5409 /*BX.ajax({ 5410 'method': 'GET', 5411 'dataType': 'json', 5412 'url': url, 5413 'timeout': 3, 5414 'onsuccess': onready, 5415 'onfailure': onready 5416 });*/ 5417} 5418} catch(err){ 5419 console.error(err.message); 5420}finally{ 5421 $(function(){ 5422 dwLoadBigData = function(title, id){ 5423 5424 $("#footerTabsCaption .items").prepend( 5425 $("<div />", {class: "item"}).append( 5426 $("<a/>", {class: "fcBigDataLink", href: "#"}).html(title) 5427 ) 5428 ); 5429 5430 $("#footerTabs .items").prepend($("#fcBigData")); 5431 $(".fcBigDataLink").trigger("click"); 5432 5433 }; 5434 }); 5435} 5436/* End */ 5437; 5438; /* Start:"a:4:{s:4:"full";s:105:"/bitrix/components/dresscode/catalog.product.subscribe.online/templates/.default/script.js?15402276611245";s:6:"source";s:90:"/bitrix/components/dresscode/catalog.product.subscribe.online/templates/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5439var subscribeOnline; 5440var subscribeProductsNow; 5441 5442$(function(){ 5443 5444 //update buttons 5445 var subscribeButtonReload = function(jsonData){ 5446 if(typeof jsonData != "undefined"){ 5447 $.each(jsonData, function(subscribeId, itemId){ 5448 5449 //vars 5450 var $subscribeButton = $('.subscribe[data-id="' + itemId + '"]'); 5451 5452 //each buttons 5453 $subscribeButton.each(function(i, nextButton){ 5454 5455 //vars 5456 var $nextButton = $(nextButton); 5457 var $nextButtonImage = $nextButton.find("img"); 5458 //set labels, clases & id 5459 $nextButton.text(subscribeOnlineLang["delete"]).prepend($nextButtonImage.attr({ 5460 src: TEMPLATE_PATH + "/images/subscribeDelete.png", 5461 }) 5462 ).data("subscribe-id", subscribeId).addClass("unSubscribe"); 5463 }); 5464 5465 }); 5466 5467 } 5468 }; 5469 5470 //re buttons 5471 subscribeOnline = function(jsonData){ 5472 5473 if(typeof jsonData == "undefined" || jsonData == ""){ 5474 if(typeof subscribeOnlineAjaxDir != "undefined" && subscribeOnlineAjaxDir != ""){ 5475 $.getJSON(subscribeOnlineAjaxDir + "/ajax.php?act=getSubscribeItems&site_id=" + SITE_ID, function(jData){ 5476 //update buttons 5477 subscribeButtonReload(jData); 5478 }); 5479 } 5480 } 5481 5482 //update buttons 5483 subscribeButtonReload(jsonData); 5484 5485 }; 5486}); 5487/* End */ 5488;; /* /local/templates/dresscode_rutrike/js/jquery-1.11.0.min.js?154296332396381*/ 5489; /* /local/templates/dresscode_rutrike/js/jquery.easing.1.3.js?15429633234579*/ 5490; /* /local/templates/dresscode_rutrike/js/rangeSlider.js?15429633234276*/ 5491; /* /local/templates/dresscode_rutrike/js/system.js?179129621673770*/ 5492; /* /local/templates/dresscode_rutrike/js/topMenu.js?15429633232693*/ 5493; /* /local/templates/dresscode_rutrike/js/topSearch.js?15429633231157*/ 5494; /* /local/templates/dresscode_rutrike/js/dwCarousel.js?15429633237742*/ 5495; /* /local/templates/dresscode_rutrike/js/dwSlider.js?154296332311927*/ 5496; /* /local/templates/dresscode_rutrike/js/dwZoomer.js?15429633232421*/ 5497; /* /local/templates/dresscode_rutrike/js/dwTimer.js?15429633232096*/ 5498; /* /bitrix/components/dresscode/search.line/templates/version2/script.js?17309561322813*/ 5499; /* /local/templates/dresscode_rutrike/components/bitrix/form.result.new/callonme/script.js?17905982482088*/ 5500; /* /local/templates/dresscode_rutrike/components/bitrix/menu/topMenu5/script.js?15429633232468*/ 5501; /* /local/templates/dresscode_rutrike/components/bitrix/menu/leftMenu/script.js?1542963323715*/ 5502; /* /local/templates/dresscode_rutrike/components/bitrix/catalog.bigdata.products/.default/script.js?179067078336124*/ 5503; /* /bitrix/components/dresscode/catalog.product.subscribe.online/templates/.default/script.js?15402276611245*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.