1 2; /* Start:"a:4:{s:4:"full";s:100:"/local/templates/.default/components/sigma/sale.basket.basket.line/.default/script.js?15230266875504";s:6:"source";s:85:"/local/templates/.default/components/sigma/sale.basket.basket.line/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3'use strict'; 4 5function BitrixSmallCart(){} 6 7BitrixSmallCart.prototype = { 8 9 activate: function () 10 { 11 this.cartElement = BX(this.cartId); 12 this.fixedPosition = this.arParams.POSITION_FIXED == 'Y'; 13 if (this.fixedPosition) 14 { 15 this.cartClosed = true; 16 this.maxHeight = false; 17 this.itemRemoved = false; 18 this.verticalPosition = this.arParams.POSITION_VERTICAL; 19 this.horizontalPosition = this.arParams.POSITION_HORIZONTAL; 20 this.topPanelElement = BX("bx-panel"); 21 22 this.fixAfterRender(); // TODO onready 23 this.fixAfterRenderClosure = this.closure('fixAfterRender'); 24 25 var fixCartClosure = this.closure('fixCart'); 26 this.fixCartClosure = fixCartClosure; 27 28 if (this.topPanelElement && this.verticalPosition == 'top') 29 BX.addCustomEvent(window, 'onTopPanelCollapse', fixCartClosure); 30 31 var resizeTimer = null; 32 BX.bind(window, 'resize', function() { 33 clearTimeout(resizeTimer); 34 resizeTimer = setTimeout(fixCartClosure, 200); 35 }); 36 } 37 this.setCartBodyClosure = this.closure('setCartBody'); 38 BX.addCustomEvent(window, 'OnBasketChange', this.closure('refreshCart', {})); 39 }, 40 41 fixAfterRender: function () 42 { 43 this.statusElement = BX(this.cartId + 'status'); 44 if (this.statusElement) 45 { 46 if (this.cartClosed) 47 this.statusElement.innerHTML = this.openMessage; 48 else 49 this.statusElement.innerHTML = this.closeMessage; 50 } 51 this.productsElement = BX(this.cartId + 'products'); 52 this.fixCart(); 53 }, 54 55 closure: function (fname, data) 56 { 57 var obj = this; 58 return data 59 ? function(){obj[fname](data)} 60 : function(arg1){obj[fname](arg1)}; 61 }, 62 63 toggleOpenCloseCart: function () 64 { 65 if (this.cartClosed) 66 { 67 BX.removeClass(this.cartElement, 'bx-closed'); 68 BX.addClass(this.cartElement, 'bx-opener'); 69 this.statusElement.innerHTML = this.closeMessage; 70 this.cartClosed = false; 71 this.fixCart(); 72 } 73 else // Opened 74 { 75 BX.addClass(this.cartElement, 'bx-closed'); 76 BX.removeClass(this.cartElement, 'bx-opener'); 77 BX.removeClass(this.cartElement, 'bx-max-height'); 78 this.statusElement.innerHTML = this.openMessage; 79 this.cartClosed = true; 80 var itemList = this.cartElement.querySelector("[data-role='basket-item-list']"); 81 if (itemList) 82 itemList.style.top = "auto"; 83 } 84 setTimeout(this.fixCartClosure, 100); 85 }, 86 87 setVerticalCenter: function(windowHeight) 88 { 89 var top = windowHeight/2 - (this.cartElement.offsetHeight/2); 90 if (top < 5) 91 top = 5; 92 this.cartElement.style.top = top + 'px'; 93 }, 94 95 fixCart: function() 96 { 97 // set horizontal center 98 if (this.horizontalPosition == 'hcenter') 99 { 100 var windowWidth = 'innerWidth' in window 101 ? window.innerWidth 102 : document.documentElement.offsetWidth; 103 var left = windowWidth/2 - (this.cartElement.offsetWidth/2); 104 if (left < 5) 105 left = 5; 106 this.cartElement.style.left = left + 'px'; 107 } 108 109 var windowHeight = 'innerHeight' in window 110 ? window.innerHeight 111 : document.documentElement.offsetHeight; 112 113 // set vertical position 114 switch (this.verticalPosition) { 115 case 'top': 116 if (this.topPanelElement) 117 this.cartElement.style.top = this.topPanelElement.offsetHeight + 5 + 'px'; 118 break; 119 case 'vcenter': 120 this.setVerticalCenter(windowHeight); 121 break; 122 } 123 124 // toggle max height 125 if (this.productsElement) 126 { 127 var itemList = this.cartElement.querySelector("[data-role='basket-item-list']"); 128 if (this.cartClosed) 129 { 130 if (this.maxHeight) 131 { 132 BX.removeClass(this.cartElement, 'bx-max-height'); 133 if (itemList) 134 itemList.style.top = "auto"; 135 this.maxHeight = false; 136 } 137 } 138 else // Opened 139 { 140 if (this.maxHeight) 141 { 142 if (this.productsElement.scrollHeight == this.productsElement.clientHeight) 143 { 144 BX.removeClass(this.cartElement, 'bx-max-height'); 145 if (itemList) 146 itemList.style.top = "auto"; 147 this.maxHeight = false; 148 } 149 } 150 else 151 { 152 if (this.verticalPosition == 'top' || this.verticalPosition == 'vcenter') 153 { 154 if (this.cartElement.offsetTop + this.cartElement.offsetHeight >= windowHeight) 155 { 156 BX.addClass(this.cartElement, 'bx-max-height'); 157 if (itemList) 158 itemList.style.top = 82+"px"; 159 this.maxHeight = true; 160 } 161 } 162 else 163 { 164 if (this.cartElement.offsetHeight >= windowHeight) 165 { 166 BX.addClass(this.cartElement, 'bx-max-height'); 167 if (itemList) 168 itemList.style.top = 82+"px"; 169 this.maxHeight = true; 170 } 171 } 172 } 173 } 174 175 if (this.verticalPosition == 'vcenter') 176 this.setVerticalCenter(windowHeight); 177 } 178 }, 179 180 refreshCart: function (data) 181 { 182 if (this.itemRemoved) 183 { 184 this.itemRemoved = false; 185 return; 186 } 187 data.sessid = BX.bitrix_sessid();
vendor: 5,242 bytes, lines 188-220
188 data.siteId = this.siteId; 189 data.templateName = this.templateName; 190 data.arParams = this.arParams; 191 BX.ajax({ 192 url: this.ajaxPath, 193 method: 'POST', 194 dataType: 'html', 195 data: data, 196 onsuccess: this.setCartBodyClosure 197 }); 198 }, 199 200 setCartBody: function (result) 201 { 202 if (this.cartElement) 203 this.cartElement.innerHTML = result; 204 if (this.fixedPosition) 205 setTimeout(this.fixAfterRenderClosure, 100); 206 }, 207 208 removeItemFromCart: function (id) 209 { 210 this.refreshCart ({sbblRemoveItemFromCart: id}); 211 this.itemRemoved = true; 212 BX.onCustomEvent('OnBasketChange'); 213 } 214}; 215 216/* End */ 217; 218; /* Start:"a:4:{s:4:"full";s:39:"/local/js/lib/jquery.js?152302668895786";s:6:"source";s:23:"/local/js/lib/jquery.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 219/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ 220!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s
vendor: 12,883 bytes, line 220
220=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=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{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(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 ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(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=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?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!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.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=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===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]||fb.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]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.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(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(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:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)}
vendor: 78,440 bytes, lines 220-223
220,input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(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]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(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 tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(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 vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(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?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; 221if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(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=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.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 Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px") 222},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.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):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={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}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(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 Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.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||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; 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=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;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 Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m}); 223
224/* End */ 225; 226; /* Start:"a:4:{s:4:"full";s:45:"/local/js/lib/jquery.sigma.js?154504834146507";s:6:"source";s:29:"/local/js/lib/jquery.sigma.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 227$.sigma = { 228 lowerCase: function(s) { return (s || '').toLowerCase(); }, 229 setTpl: function(tpl, vars) { 230 for(var i in vars) { 231 while(tpl.indexOf("#" + i + "#")>=0) 232 tpl = tpl.replace("#" + i + "#", vars[i]); 233 } 234 return tpl; 235 }, 236 isset: function(ob,index) { 237 return ( 238 ((typeof(ob)=='object') || 239 (typeof(ob)=='Array')) && 240 (typeof(ob[index])!=='undefined') 241 ); 242 }, 243 findItem: function(obj, arr) { 244 if((typeof(arr) == 'undefined')||!arr) 245 return -1; 246 for(var i = 0; i < arr.length; i++) { 247 var bOK = true; 248 if(typeof obj == 'object') { 249 for(var j in obj) 250 if(typeof arr[i][j] == 'undefined' || arr[i][j] != obj[j]) { 251 bOK = false; 252 break; 253 } 254 } 255 else 256 bOK = (arr[i]==obj); 257 if(bOK) return i; 258 } 259 260 return -1; 261 }, 262 getOpts: function(node, params, pfx) { 263 var a = node.attributes, p; 264 if(pfx) pfx = 'data-'+pfx.toLowerCase()+'-'; 265 else pfx = 'data-'; 266 for (var i = 0; i < a.length; i++) { 267 if(a[i].name.indexOf(pfx)==0) { 268 p = a[i].name.substr(pfx.length).toLowerCase(); 269 p = p.replace(/\-([a-z])/g, 270 function(s) { return s[1].toUpperCase(); } 271 ); 272 params[p] = a[i].value; 273 } 274 } 275 276 return params; 277 }, 278 toint: function(str) { 279 var m = str.match(/^([0-9\.]+)/); 280 return m ? Math.round(m[1]) : ''; 281 }, 282 getParent: function(o, tagName) { 283 var element = o; 284 tagName = tagName.toUpperCase(); 285 do { 286 var name = element.get(0).nodeName.toUpperCase(); 287 if(name == tagName) { 288 break; 289 } 290 element = element.parent(); 291 } 292 while((name!=='BODY')&&element.length); 293 294 if(!element.length) 295 element = null; 296 297 return element; 298 }, 299 tag: function(name, className) { 300 var s = document.createElement(name); 301 if(typeof(className)!='undefined') 302 s.setAttribute('class', className); 303 return s; 304 }, 305 getBodyScrollTop: function() { 306 return self.pageYOffset || 307 (document.documentElement && document.documentElement.scrollTop) || 308 (document.body && document.body.scrollTop); 309 }, 310 getBodyScrollLeft: function() { 311 return self.pageXOffset || 312 (document.documentElement && document.documentElement.scrollLeft) || 313 (document.body && document.body.scrollLeft); 314 }, 315 getPosition: function(elemId) { 316 var elem = (typeof(elemId)=='string') ? document.getElementById(elemId) : elemId; 317 if(elem.getBoundingClientRect) { 318 var body = document.body, 319 docElem = document.documentElement, 320 box = elem.getBoundingClientRect(); 321 return { 322 left: box.left + (window.pageXOffset || docElem.scrollLeft || body.scrollLeft) - (docElem.clientLeft || body.clientLeft || 0), 323 top: box.top + (window.pageYOffset || docElem.scrollTop || body.scrollTop) - (docElem.clientTop || body.clientTop || 0), 324 width: elem.offsetWidth, height: elem.offsetHeight 325 }; 326 } 327 328 return _getPosition(elem); 329 }, 330 _getPosition: function(elemId) { 331 var elem = (typeof(elemId)=='string') ? document.getElementById(elemId) : elemId, 332 w = elem.offsetWidth, h = elem.offsetHeight, 333 l = 0, t = 0; 334 while (elem) { 335 l += elem.offsetLeft; 336 t += elem.offsetTop; 337 elem = elem.offsetParent; 338 } 339 return {left: l, top: t, width: w, height: h}; 340 }, 341 setOpacity: function(elem, nOpacity) { 342 var opacityProp = this.getOpacityProperty(), 343 elem = typeof(elem)=="string" ? document.getElementById(elem) : elem; 344 if (!elem || !opacityProp) return; 345 if (opacityProp=="filter") { 346 nOpacity *= 100; 347 var oAlpha = elem.filters['DXImageTransform.Microsoft.alpha'] || elem.filters.alpha; 348 if (oAlpha) oAlpha.opacity = nOpacity; 349 else elem.style.filter += "progid:DXImageTransform.Microsoft.Alpha(opacity="+nOpacity+")"; 350 } 351 else 352 elem.style[opacityProp] = nOpacity; 353 }, 354 getOpacity: function(elem) { 355 var opacityProp = this.getOpacityProperty(),
356 elem = typeof(elem)=="string" ? document.getElementById(elem) : elem; 357 if (!elem || !opacityProp) return -1; 358 if (opacityProp=="filter3") { 359 var oAlpha = elem.filters['DXImageTransform.Microsoft.alpha'] || elem.filters.alpha; 360 if(oAlpha) return oAlpha.opacity/100; 361 if(r = elem.style.filter.match(/Alpha\(opacity=(\d+)\)/)) return r[1]/100; 362 return 1; 363 } 364 return this.getRTStyle(elem, opacityProp); 365 }, 366 getOpacityProperty: function () { 367 if (typeof document.body.style.opacity == 'string') return 'opacity'; 368 else if (typeof document.body.style.MozOpacity == 'string') return 'MozOpacity'; 369 else if (typeof document.body.style.KhtmlOpacity == 'string') return 'KhtmlOpacity'; 370 else if (document.body.filters && navigator.appVersion.match(/MSIE ([\d.]+);/)[1]>=5.5) return 'filter'; 371 return false; 372 }, 373 getRTStyle: function(elem, prop) { 374 if (typeof elem!="object") elem = document.getElementById(elem); 375 var view = elem.ownerDocument && elem.ownerDocument.defaultView ? 376 elem.ownerDocument.defaultView : self; 377 // external stylesheet for Mozilla, Opera 7+ and Safari 1.3+ 378 if (view && view.getComputedStyle) { 379 if (prop.match(/[A-Z]/)) prop = prop.replace(/([A-Z])/g, "-$1").toLowerCase(); 380 return view.getComputedStyle(elem, "").getPropertyValue(prop); 381 } 382 // external stylesheet for Explorer and Opera 9 383 if (elem.currentStyle) { 384 var i; 385 while ((i=prop.indexOf("-"))!=-1) prop = prop.substr(0, i) + prop.substr(i+1,1).toUpperCase() + prop.substr(i+2); 386 return elem.currentStyle[prop]; 387 } 388 return ""; 389 }, 390 setRTStyle: function(elem, prop, val) { 391 var m, p; 392 if(typeof(prop)=='string') { 393 if(!val) val = ''; 394 if (m = prop.match(/([a-z]+)\-([a-z])([a-z]+)/)) 395 prop = m[1] + m[2].toUpperCase() + m[3]; 396 elem.style[prop] = val; 397 } 398 else { 399 for(p in prop) { 400 if (m = p.match(/([a-z]+)\-([a-z])([a-z]+)/)) 401 p = m[1] + m[2].toUpperCase() + m[3]; 402 elem.style[p] = prop[p]; 403 } 404 } 405 }, 406 mousePageXY: function (e) { 407 var x = 0, y = 0; 408 if (!e) e = window.event; 409 if (e.pageX || e.pageY) { 410 x = e.pageX; 411 y = e.pageY; 412 } 413 else if (e.clientX || e.clientY) { 414 x = e.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft) - document.documentElement.clientLeft; 415 y = e.clientY + (document.documentElement.scrollTop || document.body.scrollTop) - document.documentElement.clientTop; 416 } 417 return {"x":x, "y":y}; 418 }, 419 getClientSize: function() { 420 var rect = {left:0,top:0}; 421 if (self.innerHeight) { 422 rect.width = self.innerWidth; 423 rect.height = self.innerHeight; 424 } 425 else if (document.documentElement && document.documentElement.clientHeight) { 426 rect.width = document.documentElement.clientWidth; 427 rect.height = document.documentElement.clientHeight; 428 } 429 else if (document.body) { 430 rect.width = document.body.clientWidth; 431 rect.height = document.body.clientHeight; 432 } 433 return rect; 434 }, 435 ready: (function() { 436 var funcs = []; 437 var ready = false; 438 439 function handler(e) { 440 if (ready) return; 441 if (e.type==="readystatechange" && document.readyState !== "complete") return; 442 for(var i = 0; i < funcs.length; i++) 443 funcs[i].call(document); 444 445 ready = true; 446 funcs = null; 447 } 448 if (document.addEventListener) { 449 document.addEventListener("DOMContentLoaded", handler, false); 450 document.addEventListener("readystatechange", handler, false); 451 window.addEventListener("load", handler, false); 452 } 453 else if (document.attachEvent) { 454 document.attachEvent("onreadystatechange", handler); 455 window.attachEvent("onload", handler); 456 } 457 return function(f) { 458 if (ready) f.call(document) 459 else funcs.push(f); 460 } 461 }()), 462 getOpts: function(node, params, pfx) { 463 var a = node.attributes, p; 464 if(pfx) pfx = 'data-'+pfx.toLowerCase()+'-'; 465 else pfx = 'data-'; 466 if(!params) params = {}; 467 for (var i = 0; i < a.length; i++) { 468 if(a[i].name.indexOf(pfx)==0) { 469 p = a[i].name.substr(pfx.length).toLowerCase(); 470 p = p.replace(/\-([a-z])/g, 471 function(s) { return s[1].toUpperCase(); } 472 ); 473 params[p] = a[i].value; 474 } 475 } 476 477 return params; 478 }, 479 extend: function(Child, Parent) { 480 var F = function() {}; 481 F.prototype = Parent.prototype; 482 Child.prototype = new F(); 483 Child.prototype.constructor = Child; 484 Child.superclass = Parent.prototype; 485 return Child; 486 }, 487 finder: function(node) { 488 node = node || document.body; 489 return function(search, attr, tag) { 490 var i, j, elems, cls, value, tilda = false, res = []; 491 if(search[0]=='~') { 492 tilda = true; 493 search = search.substr(1); 494 } 495 else if(search[0]=='.') { 496 tilda = true; 497 search = search.substr(1); 498 attr = 'class'; 499 } 500 if(!attr) attr = 'id'; 501 if(attr == 'id') 502 return [document.getElementById(search)]; 503 504 if(tilda || !document.querySelectorAll) { 505 tag = tag || '*'; 506 elems = node.getElementsByTagName(tag); 507 for(i = 0; i < elems.length; i++) { 508 value = elems[i].getAttribute(attr); 509 if(tilda) { 510 cls = value ? value.split(' ') : []; 511 for(j = 0; j < cls.length; j++) 512 if(cls[j] == search) 513 res[res.length] = elems[i]; 514 } 515 else if(value == search) 516 res[res.length] = elems[i]; 517 } 518 } 519 else { 520 value = (tag ? tag : '*')+'['+attr+'="'+search+'"]'; 521 res = node.querySelectorAll(value); 522 } 523 524 return res; 525 } 526 }, 527 addClass: function(node, cname) { 528 var clas = node.className, n = clas.length; 529 if(clas.indexOf(cname)<0) 530 node.className = clas + (n?' ':'') + cname; 531 }, 532 delClass: function(node, cname) { 533 var clas = node.className; 534 if(clas.indexOf(clas)>=0) { 535 clas = clas.replace(cname, ''); 536 node.className = clas; 537 } 538 }, 539 _allNodes: [], 540 get_node: function(node, creator, params) { 541 var n = this._allNodes.length, i; 542 for(i = 0; i < n; i++) 543 if((node == this._allNodes[i].node) 544 &&(this._allNodes[i].constructor==creator)) 545 return this._allNodes[i];
546// alert('get_node'); 547 params = params || {}; 548 $.sigma._allNodes[n] = new creator(node, params); 549 550 return $.sigma._allNodes[n]; 551 }, 552 del_node: function(node, creator) { 553 var num = this.find_node(node, creator); 554 if(num>=0) this._allNodes.splice(num, 1); 555 } 556} 557 558;(function(w) { 559 var loadingImg = '/local/images/ajax-loader.gif'; 560 var img = new Image(), db = document.body; 561 img.src = loadingImg; 562 563 var _loading = function(node, params) { 564 params.zindex = params.zindex || 9000; 565 //params.bgcolor = params.bgcolor || '#ffffff'; 566 params.opacity = params.opacity || 0.6; 567 params.timeout = params.timeout || 0; 568 params.text = params.text || ''; 569 params.ftext = params.ftext || 'ÐоÑово'; 570 params.css = params.css || ''; 571 572 this.node = node; 573 this.overlay = null; 574 this.pos = null; 575 this.params = $.sigma.getOpts(node, params, 'ld'); 576 this.timeID = null; 577 }; 578 _loading.prototype.setPosition = function() { 579 this.pos = $.sigma.getPosition(this.node); 580 if(db == this.node) { 581 this.overlay.style.position = 'fixed'; 582 this.overlay.style.top = '0px'; 583 this.overlay.style.left = '0px'; 584 this.overlay.style.width = '100%'; 585 this.overlay.style.height = '100%'; 586 } 587 else { 588 this.overlay.style.position = 'absolute'; 589 this.overlay.style.top = this.pos.top+'px'; 590 this.overlay.style.left = this.pos.left+'px'; 591 this.overlay.style.width = this.pos.width+'px'; 592 this.overlay.style.height = this.pos.height+'px'; 593 } 594 this.overlay.style.zIndex = this.params.zindex; 595 this.overlay.style.backgroundColor = this.params.bgcolor; 596 this.overlay.style.lineHeight = this.pos.height+'px'; 597 $.sigma.setOpacity(this.overlay, this.params.opacity); 598 }; 599 _loading.prototype.show = function() { 600 var temp, ps, 601 w = img.width || 1, h = img.height || 1; 602 w = h = 50; 603 this.hide(); 604 if($.sigma.getRTStyle(this.node,'display')=='none') 605 return; 606 ly = document.createElement('div'); 607 document.body.appendChild(ly); 608 this.overlay = ly; 609 this.setPosition(); 610 611 if(w>this.pos.width || h>this.pos.height) { 612 if(w/this.pos.width > h/this.pos.height) { 613 w = parseInt(0.8*this.pos.width); 614 h = parseInt(w*img.height/img.width); 615 } 616 else { 617 h = parseInt(0.8*this.pos.height); 618 w = parseInt(h*img.width/img.height); 619 } 620 } 621 this.overlay.className = this.params.css+' ld-overlay'; 622 this.overlay.innerHTML = //'<table><tr><td>'+ 623 '<img src="'+img.src +'" width="'+w+'" height="'+h+'"> '+ 624 this.params.text; 625 //'</td></tr></table>'; 626 627 }; 628 _loading.prototype.hide = function() { 629 if(this.overlay!==null) { 630 document.body.removeChild(this.overlay); 631 this.overlay = null; 632 } 633 }; 634 _loading.prototype.finish = function() { 635 var _that = this; 636 if(this.params.ftext && this.overlay) { 637 this.overlay.innerHTML = this.params.ftext; 638 if(this.params.timeout > 0) 639 setTimeout(function() { _that.hide(); }, this.params.timeout); 640 } 641 }; 642 643 w.Loading = function(node, params) { 644 node = typeof(node)=='string' ? document.getElementById(node) : node; 645 node = node || db; 646 return $.sigma.get_node(node, _loading, params); 647 } 648}(window)); 649 650;(function($) { 651 var lowerCase = function(s) { return (s || '').toLowerCase(); } 652 var defaults = { 653 // h - horiz, v - vert; lcr Ð´Ð»Ñ v, tmb - Ð´Ð»Ñ h 654 docking: {orient:'vert',alignw:'left',aligno:'left'}, 655 arrow: {width:10,height:10}, // arrow offset 656 css: '', 657 width: 0, 658 height: 0, 659 onshow: null, 660 jparam: 'isAjaxTpl' 661 }, hAjax = null, hTimer = null; 662 663 var lyPopup = null, lyTemp = null, bOpened = false, loadimg = new Image(); 664 loadimg.src = '/local/images/ajax-loader.gif'; 665// sgtipDocking="" 666 var _getOpts = function(object, params) { 667 var opts = object.data(), params = params || {}, parts, i, s, out = {}; 668 for (var p in opts) { 669 // allow props to be accessed sans 'sgtip' prefix and log the overrides 670 if (opts.hasOwnProperty(p) && /^sgtip[A-Z]+/.test(p) ) { 671 val = opts[p]; 672 shortName = p.match(/^sgtip(.*)/)[1].replace(/^[A-Z]/, lowerCase); 673 if(shortName == 'docking') { 674 parts = val.split(':'); 675 val = {}; 676 for(i = 0; i < 3; i++) { 677 s = parts[i] || ''; 678 switch(i) { 679 case 0: if(s!='vert' && s!='horiz') s='vert'; val.orient=s;break; 680 case 1: val.alignw=s;break; 681 case 2: val.aligno=s;break; 682 } 683 } 684 out[shortName] = val; 685 } 686 else if(shortName == 'arrow') { 687 parts = val.split(':'); 688 val = {}; 689 for(i = 0; i < 2; i++) { 690 s = parts[i] || 0; s = parseInt(s); 691 switch(i) { 692 case 0: val.width=s;break; 693 case 1: val.height=s;break; 694 } 695 } 696 out[shortName] = val; 697 } 698 else if(shortName=='css' || shortName=='width' || shortName=='height') { 699 out[shortName] = val; 700 } 701 } 702 } 703 704 return $.extend({}, params, out); 705 }, 706 getXY = function(win, object, params) { 707 var x, y, r, s, ps, pd, doc = $(window.document.body), 708 oOffset = $(object).offset(), 709 oSize = {width:$(object).width(),height:$(object).height()}, 710 wSize = {width:win.width(),height:win.height()}, 711 d = params.docking, a = params.arrow; 712 713 if(d.orient == 'vert') { 714 ps = doc.scrollTop(); 715 pd = doc.height(); 716 y = oSize.height+a.height; 717 r = 'top'; 718 if(y + wSize.height > ps + pd) { 719 y = -oSize.height-a.height; 720 r = 'bottom'; 721 } 722 y += oOffset.top; 723 724 switch(d.aligno) { 725 case 'center' : 726 switch(d.alignw) {
727 case 'center': x = oSize.width/2 - wSize.width/2; break; 728 case 'right': x = oSize.width/2 - wSize.width + a.width/2; break; 729 default: x = oSize.width/2 - a.width/2; 730 } 731 break; 732 case 'right' : 733 switch(d.alignw) { 734 case 'center': x = oSize.width - wSize.width/2 - a.width/2; break; 735 case 'right': x = oSize.width - wSize.width; break; 736 default: x = oSize.width - a.width; 737 } 738 break; 739 default: 740 switch(d.alignw) { 741 case 'center': x = -wSize.width/2 + a.width/2; break; 742 case 'right': x = -wSize.width + a.width; break; 743 default: x = 0; 744 } 745 } 746 switch(d.alignw) { 747 case 'center': s = 'left:50%;margin-left:-'+(a.width/2)+'px'; break; 748 case 'right': s = 'right:0px'; break; 749 default: s = 'left:0px'; 750 } 751 x += oOffset.left; 752 } 753 else if(d.orient == 'horiz') { 754 ps = doc.scrollLeft(); 755 pd = doc.width(); 756 x = oSize.width+a.width; 757 r = 'left'; 758 if(x + oOffset.left + wSize.width > ps + pd) { 759 x = -a.width-wSize.width; 760 r = 'right'; 761 } 762 x += oOffset.left; 763 764 switch(d.aligno) { 765 case 'middle' : 766 switch(d.alignw) { 767 case 'middle': y = oSize.height/2 - wSize.height/2; break; 768 case 'bottom': y = oSize.height/2 - wSize.height + a.height/2; break; 769 default: y = oSize.height/2 - a.height/2; 770 } 771 break; 772 case 'bottom' : 773 switch(d.alignw) { 774 case 'middle': y = oSize.height - wSize.height/2 - a.height/2; break; 775 case 'bottom': y = oSize.height - wSize.height; break; 776 default: y = oSize.height - a.height; 777 } 778 break; 779 default: 780 switch(d.alignw) { 781 case 'middle': y = -wSize.height/2 + a.height/2; break; 782 case 'bottom': y = -wSize.height + a.height; break; 783 default: y = 0; 784 } 785 } 786 switch(d.alignw) { 787 case 'middle': s = 'top:50%;margin-top:-'+(a.height/2)+'px'; break; 788 case 'bottom': s = 'bottom:0px'; break; 789 default: s = 'top:0px'; 790 } 791 y += oOffset.top; 792 } 793 794 return {win:{x:x,y:y},arr:{dir:r,style:s}}; 795 }, 796 _init = function() { 797 var wc, i; 798 lyPopup = $( 799 '<div>'+ 800 '<div class="popup-win">'+ 801 '<a class="popup-win-close" href="#"></a>'+ 802 '<div class="popup-win-arrow"></div>'+ 803 '<div class="popup-win-content"></div>'+ 804 '</div>'+ 805 '</div>'). 806 css({position:'absolute', display:'none',zIndex:9999}). 807 appendTo(document.body).bind('click mousedown', function(e) { e.stopPropagation(); }); 808 809 // Ñлой плаваÑÑий, невидимÑй 810 lyPopup.css({ 811 position: 'absolute', 812 outline: 'none', 813 display:'none' 814 }); 815 816 var t = ['n','ne','e','se','s','sw','w','nw']; 817 wc = lyPopup.find('.popup-win'); 818 for(i in t) 819 wc.append('<div class="popup-bg popup-bg-' + t[i] + '"></div>'); 820 821 wc = lyPopup.find('.popup-win-close'); 822 wc.click(function() { 823 _close(); 824 return false; 825 }); 826 }, 827 _open = function(lyContent, object, params) { 828 object = $(object); 829 var w, wc, pos, layer = null;//, 830 // params = _getOpts(object, params); 831 if(!lyPopup) _init(params); 832 if(!lyPopup) return; 833 _close(); 834 835 pos = lyContent.indexOf('#'); 836 if(pos > 0) lyContent = lyContent.substr(pos); 837 838 if(lyContent[0] == '#') { 839 layer = $(lyContent); 840 if(layer.length <= 0) return; 841 lyTemp = $('<div></div>').insertAfter(layer); 842 layer.detach().css({display:''}).appendTo(lyPopup.find('.popup-win-content')); 843 } 844 else { 845 lyPopup.find('.popup-win-content'). 846 html('<img src="'+loadimg.src+'" width="'+loadimg.width+'" height="'+loadimg.height+'" border="0">'); 847 hAjax = $.ajax({ 848 url: lyContent + ((lyContent.indexOf('?')>=0)?'&':'?') + "isAjaxTpl=Y", 849 success: function(html) { 850 hAjax = null; 851 lyPopup.find('.popup-win-content').html(html); 852 // ajaxAction(lyPopup, object, params); 853 pos = getXY(lyPopup, object, params); 854 lyPopup.css({left:pos.win.x, top:pos.win.y}); 855 }, 856 dataType: 'html' 857 }); 858 } 859 860 lyPopup.get(0).className = ''; 861 if(params.css.length > 0) 862 lyPopup.addClass(params.css); 863 864 wc = lyPopup.find('.popup-win'); 865 if(params.width > 0) wc.css({width:params.width}); 866 else wc.css({width:'auto'}); 867 if(params.height > 0) wc.css({height:params.height}); 868 else wc.css({height:'auto'}); 869 870 lyPopup.css({display:'block'});
871 pos = getXY(lyPopup, object, params); //alert(pos.win.x); 872 lyPopup.css({left:pos.win.x, top:pos.win.y}); 873 874 wc = lyPopup.find('.popup-win-arrow'); 875 wc.attr('style', pos.arr.style); 876 wc.addClass('arrow-'+pos.arr.dir); 877 878 $(document.body).bind('mousedown', _close); 879 $(window).bind('resize', _close); 880 bOpened = true; 881 }, 882 _close = function() { 883 if(bOpened == false) return; 884 if(hAjax != null) { 885 hAjax.abort(); 886 hAjax = null; 887 } 888 889 bOpened = false; 890 lyPopup.attr('class', null); 891 lyPopup.css({display:'none'}); 892 if(lyTemp == null) { 893 lyPopup.find('.popup-win-content').html(''); 894 } 895 else { 896 lyPopup.find('.popup-win-content').children() 897 .first().detach().css({display:'none'}).insertAfter(lyTemp); 898 lyTemp.remove(); 899 lyTemp = null; 900 } 901 902 $(document.body).unbind('mousedown', _close); 903 $(window).unbind('resize', _close); 904 //$(window).unbind('resize', this.bodyClick); 905 return false; 906 }, 907 ajaxAction = function(lyPopup, object, params) { 908 $('a', lyPopup.find('.popup-win-content')).click(function() { 909 var href = this.href; 910 href += ((href.indexOf('?')>=0)?'&':'?') + "isAjaxTpl=Y"; 911 hAjax = $.ajax({ 912 url: href, 913 success: function(html) { 914 lyPopup.find('.popup-win-content').html(html); 915 ajaxAction(lyPopup, object, params); 916 pos = getXY(lyPopup, object, params); 917 lyPopup.css({left:pos.win.x, top:pos.win.y}); 918 }, 919 dataType: 'html' 920 }); 921 }); 922 923 $('form', lyPopup.find('.popup-win-content')).submit(function() { 924 hAjax = $(this).ajaxSubmit({ 925 beforeSubmit: function(formData, jqForm, options) { 926 var form = jqForm[0]; 927 var ok = !bProc; 928 929 if(ok) { 930 // $.fancybox.showLoading(); 931 bProc = true; 932 button.removeClass('submit-input').addClass('submit-input-disabled'); 933 } 934 935 return ok; 936 }, 937 success: function(data) { 938 bProc = false; 939 button.removeClass('submit-input-disabled').addClass('submit-input'); 940 //$.fancybox.hideLoading(); 941 var fn = function() { 942 $(this) 943 .removeClass('error') 944 .unbind('focus', fn) 945 .val(''); 946 }; 947 if(data.status !== 'ok') { 948 for(var i in data.errors) 949 form.find('input[name="' + i + '"]') 950 .addClass('error').bind('focus', fn) 951 .val(data.errors[i]); 952 } 953 else { 954 var height = form.outerHeight(); 955 if(!divAnswer) 956 divAnswer = $('<div class="message-ok">').html(sAnswer) 957 .css({display:'none'}).insertAfter(form); 958 959 var out = divAnswer.css({display:''}).find('td'); 960 961 form.css({display:'none'}); 962 out.html(data.message).height(height); 963 964 setTimeout(function() { 965 jQuery.fancybox.close(); 966 967 form.resetForm(); 968 form.css({display:''}); 969 divAnswer.css({display:'none'}); 970 }, 6000); 971 } 972 }, 973 beforeSerialize: function(form, options) { 974 if(options.url.indexOf('USE_AJAX=') > 0) 975 return true; 976 977 if(options.url.indexOf('?') >= 0) 978 options.url += '&'; 979 else 980 options.url += '?'; 981 options.url += 'USE_JSON=Y'; 982 983 return true; 984 }, 985 dataType: 'json', 986 timeout: 10000 987 }); 988 }); 989 }; 990 991 $.sigmaTip = { 992 open: function(lyContent, object, params) { 993 //params = _getOpts(that, params); 994 _open(lyContent, object, params); 995 return false; 996 }, 997 close: function() { _close(); return false; } 998 } 999 1000 $.fn.sigmaTip = function(options) 1001 { 1002 var options = $.extend({}, this.defaults, options); 1003 // lyContent - #обÑекÑХТÐРили ÑÑÑокаУРР1004 return this.each(function() { 1005 var that = $(this), 1006 params = _getOpts(that, options), 1007 rel = that.attr('rel') || ''; 1008 ta = this.tagName.toLowerCase(), timeID = null; 1009 1010 if(ta == 'a') { 1011 if(rel.length > 0) { 1012 that.hover(function() { 1013 if(timeID !== null) 1014 clearTimeout(timeID); 1015 timeID = setTimeout(function() { 1016 _open('#'+rel, that, params); 1017 }, 400); 1018 }, function() { 1019 if(timeID !== null) 1020 clearTimeout(timeID); 1021 _close(); 1022 });
1023 } 1024 else { 1025 that.bind('click', function() { 1026 var url = that.attr('href'); 1027 if(url.indexOf('#')>0) 1028 url = url.substr(url.indexOf('#')); 1029 _open(url, that, params); 1030 return false; 1031 }); 1032 } 1033 } 1034 else if(ta == 'input') { 1035 if(rel.length > 0) { 1036 that.bind('focus', function() {_open('#'+rel, that, params);}); 1037 that.bind('click', function() { return false; }); 1038 that.bind('blur', function() { _close(); }); 1039 } 1040 } 1041 else if((ta=='div')||(ta=='form')) { 1042 if(rel.length > 0) { 1043 that.bind('papa.tip', function() { _open('#'+rel, that, params); }); 1044 } 1045 } 1046 }); 1047 } 1048 1049 $.fn.sigmaHidelong = function(params) 1050 { 1051 var params = $.extend({}, { 1052 text1: 'ÐодÑобнее', 1053 text2: 'СкÑÑÑÑ', 1054 maxh: 300 1055 }, params); 1056 return this.each(function() { 1057 var that = $(this), 1058 opts, props = that.data(), 1059 bOpened = false, 1060 Height = that.height(), 1061 val, shortName; 1062 1063 opts = $.extend({}, params); 1064 for (var p in props) 1065 if (props.hasOwnProperty(p) && /^hl[A-Z]+/.test(p) ) { 1066 val = props[p]; 1067 shortName = p.match(/^hl(.*)/)[1].replace(/^[A-Z]/, lowerCase); 1068 opts[shortName] = val; 1069 } 1070//alert(Height); 1071 if(Height > opts.maxh) { 1072 1073 this.style.position = 'relative'; 1074 this.innerHTML = '<div class="hide-long-text" style="overflow:hidden;height:'+opts.maxh+'px">'+ 1075 '<div class="hide-long-cc">'+this.innerHTML+'</div></div>'+ 1076 '<div class="hide-long-more" style="position:absolute;">'+ 1077 '<a href="#"><span>'+opts.text1+'</span></a>'+ 1078 '</div>'; 1079 1080 that.find('.hide-long-more a').bind('click', function() { 1081 var a = this; 1082 if(bOpened) { 1083 bOpened = false; 1084 that.find('.hide-long-text') 1085 .animate({height:opts.maxh}, 200, function() { 1086 a.innerHTML = '<span>'+opts.text1+'</span>'; 1087 that.find('.hide-long-more').removeClass('hide-long-opened'); 1088 $('.banner').css({'position':'relative','top':'0px'}); 1089 }); 1090 } 1091 else { 1092 bOpened = true; 1093 Height = that.find('.hide-long-cc').height(); 1094 //Height = 'auto'; 1095 that.find('.hide-long-text') 1096 .animate({height:Height}, 200, function() { 1097 a.innerHTML = '<span>'+opts.text2+'</span>'; 1098 that.find('.hide-long-more').addClass('hide-long-opened'); 1099 top_h = that.find('.hide-long-more').offset().top - 440 - 117; 1100 $('.banner').css({'position':'absolute','top':top_h}); 1101 }); 1102 } 1103 return false; 1104 }); 1105 } 1106 }); 1107 } 1108 1109 var kerzSlide = function(node, params) 1110 { 1111 this.node = node; 1112 this.params = $.sigma.getOpts(node, $.extend({}, params), 'ks'); 1113 this.current = -1; 1114 this.prev = -1; 1115 this.items = []; 1116 this.holded = false; 1117 1118 this.init(); 1119 } 1120 kerzSlide.prototype.init = function() 1121 { 1122 var i, child, that = this; 1123 child = this.find('item', this.node); 1124 i = parseInt(this.params.accordion); 1125 this.params.accordion = isNaN(i) ? false : !!i; 1126 for(i = 0; i < child.length; i++) 1127 this.add(child[i]); 1128 1129 $(this.node).bind('activate', function(e, index) 1130 { 1131 if(typeof index == 'undefined') index = -1; 1132 index = parseInt(index); 1133 if(isNaN(index)) index = -1; 1134 1135 that.setCurrent(index); 1136 that.update(); 1137 }); 1138 1139 this.update(); 1140 } 1141 kerzSlide.prototype.find = function(type, node) { 1142 var find = new $.sigma.finder(node), 1143 params = this.params, result; 1144 if(type == 'name') { 1145 result = params.nameClass.length ? 1146 find('.'+params.nameClass) : find('name', 'data-role'); 1147 return result.length ? result[0] : null; 1148 } 1149 else if(type == 'content') { 1150 result = params.contentClass.length ? 1151 find('.'+params.contentClass) : find('content', 'data-role'); 1152 return result.length ? result[0] : null; 1153 } 1154 else { 1155 result = params.itemClass.length ? 1156 find('.'+params.itemClass) : find('item', 'data-role'); 1157 return result; 1158 } 1159 } 1160 kerzSlide.prototype.add = function(node) { 1161 var name = this.find('name', node), 1162 content = this.find('content', node), 1163 that = this, index, i; 1164 1165 if(name && content) { 1166 index = this.items.length; 1167 this.items[index] = { 1168 item: node, 1169 name: name, 1170 content: content, 1171 ready: (name.tagName.toLowerCase()!='a') 1172 } 1173 1174 if(node.className.indexOf('active')>=0) 1175 this.current = index; 1176 1177 name.onclick = function() { 1178 if(!this.holded) { 1179 that.setCurrent(index);
1180 that.update(); 1181 } 1182 return false; 1183 } 1184 content.style.display = 'none'; 1185 } 1186 } 1187 kerzSlide.prototype.setCurrent = function(n) { 1188 this.current = n; 1189 } 1190 kerzSlide.prototype.open = function(n) { 1191 var item = this.items[n], url, 1192 content = item.content, that = this; 1193 1194 this.holded = true; 1195 if(!item.ready) { 1196 url = item.name.href; 1197 url += ((url.indexOf('?') >= 0) ? '&' : '?')+'USE_AJAX=Y'; 1198 1199 Loading(item.item).show(); 1200 $.ajax({ 1201 url: url, 1202 method: 'GET', 1203 success: function(html) { 1204 $(content).html(html); 1205 $(document).trigger('bx.ready', content); 1206 Loading(item.item).hide(); 1207 item.ready = true; 1208 that.open(n); 1209 }, 1210 error: function() { 1211 content.innerHTML = ''; 1212 Loading(item.item).hide(); 1213 item.ready = true; 1214 that.open(n); 1215 }, 1216 dataType: 'html' 1217 }); 1218 } 1219 else { 1220 content.style.height = '1px'; 1221 content.style.display = ''; 1222 $.sigma.setOpacity(content, 0); 1223 1224 $(content).animate({ 1225 height: content.scrollHeight, opacity: 1 1226 }, 250, 1227 function(){ 1228 content.style.height = 'auto'; 1229 that.holded = false; 1230 $(that.node).trigger('opened', item); 1231 } 1232 ); 1233 item.item.className += ' opened'; 1234 } 1235 } 1236 kerzSlide.prototype.close = function(n) { 1237 var item = this.items[n], 1238 content = item.content, that = this; 1239 $(content).animate({height: 1,opacity: 0}, 1240 250, function() { 1241 that.holded = false; 1242 content.style.display = 'none'; 1243 $(that.node).trigger('change'); 1244 } 1245 ); 1246 item.item.className = item.item.className.replace(' opened', ''); 1247 $(this.node).trigger('closed', item); 1248 } 1249 kerzSlide.prototype.update = function() { 1250 var i, that = this; 1251 for(i = 0; i < this.items.length; i++) { 1252 if(i==this.current) { 1253 if(i==this.prev) { 1254 this.close(i); 1255 this.current = -1; 1256 } 1257 else 1258 this.open(i); 1259 } 1260 else if((i==this.prev) && !!this.params.accordion) 1261 this.close(i); 1262 } 1263 this.prev = this.current; 1264 } 1265 1266 $.fn.kerz = function(params) { 1267 var params = $.extend({}, { 1268 itemClass: '', 1269 nameClass: '', 1270 contentClass: '', 1271 accordion: true 1272 }, params); 1273 1274 return this.each(function() { 1275 var obj = new kerzSlide(this, params); 1276 $(this).bind('open', function(e, n) { 1277 n = (typeof n == 'undefined') ? -1 : parseInt(n); 1278 if(isNaN(n)) n = -1; 1279 obj.setCurrent(n); 1280 obj.update(); 1281 }); 1282 }); 1283 } 1284})(jQuery); 1285 1286;(function($) { 1287 var layout = null, wrap = null, 1288 inner = null, outer = null, 1289 tmpp = null, exit = null, 1290 pos = null, 1291 params = null; 1292 1293 var _createWin = function() { 1294 if(layout) return; 1295 1296 $('html').addClass('pager-no-scroll'); 1297 layout = document.body.appendChild($.sigma.tag('div', 'popup-item-layout')); 1298 wrap = document.body.appendChild($.sigma.tag('div', 'popup-item-wrap')); 1299 outer = wrap.appendChild($.sigma.tag('div', 'popup-item-outer')); 1300 inner = outer.appendChild($.sigma.tag('div', 'popup-item-inner')); 1301 if(params.css) { 1302 outer.className = outer.className + ' ' + params.css; 1303 inner.className = inner.className + ' ' + params.css+'-content'; 1304 } 1305 //var t = ['n','ne','e','se','s','sw','w','nw']; 1306 //for(i in t) outer.appendChild($.sigma.tag('div', 'popup-bg popup-bg-' + t[i])); 1307 1308 exit = outer.appendChild($.sigma.tag('a', 'popup-item-exit')); 1309 exit.href = '#'; 1310 }, 1311 _destroyWin = function() { 1312 if(!layout) return; 1313 1314 layout = document.body.removeChild(layout); 1315 delete layout; 1316 layout = null; 1317 1318 wrap = document.body.removeChild(wrap); 1319 delete wrap; 1320 wrap = null; 1321 1322 inner = null; outer = null; exit = null; 1323 }, 1324 _escape = function(e) { 1325 e = e || window.event; 1326 if(!e) false; 1327 if(e.preventDefault) e.preventDefault(); 1328 if(e.stopPropagation) e.stopPropagation(); 1329 return false; 1330 }; 1331 1332 $.modal = { 1333 openPopup: function(target, arParams) 1334 { 1335 if(typeof(target)=='undefined') return; 1336 var that = this, p; 1337 params = arParams; 1338 that.closePopup(); 1339 1340 _createWin(); 1341 1342 wrap.onclick = function(e) { 1343 var e = e || window.event; 1344 if((e.target == this) && !params.modal) 1345 that.closePopup(); 1346 } 1347 exit.onclick = function(e) { that.closePopup(); return false; }; 1348 1349 if(typeof(target)=='string') { 1350 inner.innerHTML = target; 1351 tmpp = null; 1352 } 1353 else { 1354 p = target.parentNode; 1355 tmpp = p.insertBefore($.sigma.tag('div'), target); 1356 tmpp.style.display = 'none'; 1357 inner = inner.appendChild(p.removeChild(target)); 1358 target.style.display = ''; 1359 } 1360 1361 this.setPos(); 1362 $(window).bind('resize', this.setPos); 1363 }, 1364 setPos: function() { 1365 var size = $.sigma.getClientSize(), mb, mt, pos, w = params.width || 600; 1366 1367 if($.modal.isSmall()) { 1368 $.sigma.setRTStyle(outer, 'margin-top', 0); 1369 $.sigma.setRTStyle(outer, 'margin-bottom', 0); 1370 } 1371 if(size.width - 30 < w) 1372 w = size.width - 30; 1373 mb = parseInt($.sigma.getRTStyle(outer, 'margin-bottom').match(/^([0-9]+)/)[1]); 1374 mt = parseInt($.sigma.getRTStyle(outer, 'margin-top').match(/^([0-9]+)/)[1]); 1375 pos = $.sigma.getPosition(outer); 1376 1377 if(pos.height + mt + mb < size.height) 1378 outer.style.marginTop = ((size.height-pos.height)/2)+'px'; 1379 else 1380 outer.style.marginTop = mt+'px'; 1381 1382 $.sigma.setRTStyle(outer, 'width', w+'px'); 1383 }, 1384 isSmall: function() { 1385 var size = $.sigma.getClientSize(), 1386 width = params.width || 600; 1387 return (size.width < width); 1388 }, 1389 closePopup: function() { 1390 if(layout !== null) { 1391 if(tmpp !== null) { 1392 var pt = tmpp.parentNode, 1393 pi = inner.parentNode; 1394 pt.insertBefore(pi.removeChild(inner), tmpp).style.display = 'none'; 1395 pt.removeChild(tmpp);
1396 if(typeof(params.onclose)!=='undefined' && params.onclose=='clear') 1397 inner.innerHTML = ''; 1398 1399 delete tmpp; 1400 tmpp = null; 1401 inner = null; 1402 } 1403 1404 _destroyWin(); 1405 1406 $('html').removeClass('pager-no-scroll'); 1407 $(window).unbind('resize', this.setPos); 1408 layout = null; 1409 } 1410 }, 1411 getContent: function() { return inner; }, 1412 isOpened: function() { return !!layout; } 1413 } 1414})(jQuery); 1415 1416;(function($) { 1417 var winHeight = 0, 1418 _clientHeight = function() { 1419 if (self.innerHeight) 1420 winHeight = self.innerHeight; 1421 else if (document.documentElement && document.documentElement.clientHeight) 1422 winHeight = document.documentElement.clientHeight; 1423 else if (document.body) 1424 winHeight = document.body.clientHeight; 1425 }; 1426 _clientHeight.call(); 1427 $(window).bind('resize', _clientHeight); 1428 1429 //var size = $.sigma.getClientSize(); 1430 //alert(size.width+', '+size.height); 1431 1432 var ajaxArea = function(node, params, parent) 1433 { 1434 this._link = null; 1435 this._container = null; 1436 this._holded = false; 1437 this._popup = false; 1438 this.params = $.sigma.getOpts(node, $.extend({}, params), 'ap'); 1439 this.curUrl = ''; 1440 this.parent = parent; 1441 1442 if((node.tagName.toLowerCase()=='a') 1443 ||(node.getAttribute('data-href'))) 1444 { 1445 var container = null; 1446 this._link = node; 1447 if(node.rel && node.rel.length) 1448 container = document.getElementById(node.rel); 1449 if(!container) { 1450 this._popup = true; 1451 container = document.getElementById('ajaxArea__container'); 1452 if(!container) { 1453 container = document.body.appendChild($.sigma.tag('div')); 1454 container.id = 'ajaxArea__container'; 1455 } 1456 } 1457 container.style.display = 'none'; 1458 this._container = container; 1459 } 1460 else 1461 this._container = node; 1462 } 1463 ajaxArea.prototype.link = function() { return this._link; } 1464 ajaxArea.prototype.isPopup = function() { return this._popup; } 1465 ajaxArea.prototype.container = function() { return this._container; } 1466 ajaxArea.prototype.target = function() { return this._link || this._container; } 1467 ajaxArea.prototype.init = function() { 1468 var that = this, p; 1469 if(this.link() == null) { 1470 var _load = function() { 1471 //p = $.sigma.getPosition(that.container()); 1472 //if(winHeight + $.sigma.getBodyScrollTop() < p.top) 1473 // return; 1474 //$(window).unbind('scroll', _load); 1475 1476 if(that.params.wait > 0) 1477 setTimeout(function() { 1478 that.load(); 1479 }, that.params.wait); 1480 else { 1481 that.load(); 1482 } 1483 }; 1484 1485 //$(window).bind('scroll', _load); 1486 _load.call(); 1487 } 1488 else { 1489 $(this.link()).click(function() { 1490 var href = (this.tagName.toLowerCase()=='a') ? this.href : this.getAttribute('data-href'); 1491 that.load(href, function() { 1492 if(this.isPopup()) { 1493 var size = $.sigma.getClientSize(), w = this.params.maxWidth; 1494 if((w<=0) || (w>size.width)) w = size.width; 1495 $.modal.openPopup(this.container(), {width: w, css: this.params.popupCss, modal: this.params.modal}); 1496 } 1497 }); 1498 return false; 1499 }); 1500 } 1501 } 1502 ajaxArea.prototype.isHolded = function(val) { 1503 if(typeof(val)!='undefined') this._holded = !!val; 1504 return this._holded; 1505 } 1506 ajaxArea.prototype.load = function(url, callback) { 1507 if(this.isHolded()) return; 1508 1509 var pageSrc = url || this.params.pageSrc, 1510 pos = pageSrc.indexOf('#'), that = this, 1511 div = (this.link()&& !$.modal.isOpened()) ? this.link() : this.container(); 1512 1513 if(pos >= 0) pageSrc = pageSrc.substr(0, pos); 1514 if(this.params.reqSfx.length && pageSrc.length) { 1515 if(pageSrc.indexOf(this.params.reqSfx) < 0) { 1516 pageSrc += (pageSrc.indexOf('?') >= 0) ? '&' : '?'; 1517 pageSrc += this.params.reqSfx; 1518 } 1519 } 1520 this.curUrl = pageSrc; 1521 if(pageSrc.length > 0) { 1522 Loading(div, {text:' ',opacity:0.8}).show(); 1523 this.isHolded(true); 1524 $.ajax({ 1525 url: pageSrc, 1526 method: 'GET', 1527 success: function(strHtml) { 1528 $(that.container()).html(strHtml); 1529 that.initObj(); 1530 $(document).trigger('bx.ready', that.container()); 1531 Loading(div).hide(); 1532 that.isHolded(false); 1533 if(typeof(callback)=='function') 1534 callback.call(that); 1535 }, 1536 dataType: 'html' 1537 }); 1538 } 1539 else { 1540 that.initObj(); 1541 } 1542 } 1543 ajaxArea.prototype.getData = function() { 1544 var child = this.container().getElementsByTagName('form')[0], 1545 data = null; 1546 if(child) data = $.sigma.getOpts(child, {}, 'ad'); 1547 return data; 1548 } 1549 ajaxArea.prototype.initObj = function(back) 1550 { 1551 var that = this; 1552 back = back || false; 1553 $(this.params.findLink, this.container()).each(function() { 1554 if(this.tagName.toLowerCase()=='a') 1555 $(this).click(function() { that.load(this.href); return false; }); 1556 }); 1557 if(this.link() == null) { 1558 $(this.params.findPopup, this.container()).each(function() { 1559 if(this.tagName.toLowerCase()=='a') { 1560 var area = new ajaxArea(this, that.params, that); 1561 $(this).unbind('areaback areaload') 1562 .bind('areaback areaload', function(e, data) 1563 { 1564 $(that.target()).trigger(e.type, data); 1565 e.stopPropagation(); 1566 });
1567 area.init(); 1568 } 1569 }); 1570 } 1571 $(this.params.findForm, this.container()).each(function() { 1572 if(this.tagName.toLowerCase()=='form') { 1573 $(this).bind('submit', function() { 1574 Loading(that.container(), {text:' ',opacity:0.8}).show(); 1575 $(this).ajaxSubmit({ 1576 success: function(html) { 1577 $(that.container()).html(html); 1578 that.initObj(true); 1579 $(document).trigger('bx.ready', that.container()); 1580 Loading(that.container()).hide(); 1581 }, 1582 beforeSerialize: function(form, options) { 1583 if(that.params.reqSfx.length) { 1584 if(options.url.indexOf(that.params.reqSfx) < 0) { 1585 options.url += (options.url.indexOf('?') >= 0) ? '&' : '?'; 1586 options.url += that.params.reqSfx; 1587 } 1588 } 1589 return true; 1590 }, 1591 dataType: 'html', 1592 timeout: 10000 1593 }); 1594 return false; 1595 }); 1596 } 1597 }); 1598 1599 this.params.maxHeight = parseInt(this.params.maxHeight); 1600 if(false && !isNaN(this.params.maxHeight) && this.params.maxHeight && !this.isPopup()) 1601 { 1602 var c = this.container(), h, 1603 hi = parseInt($.sigma.getRTStyle(c, 'height').match(/^([0-9]+)/)[1]); 1604 c.style.height = 'auto'; 1605 $(c).removeClass('have-scroll'); 1606 h = c.scrollHeight; 1607 if(c.scrollHeight > this.params.maxHeight) { 1608 $(c).animate({height:this.params.maxHeight+2}, 400, function() { 1609 $(c).addClass('have-scroll'); 1610 }); 1611 } 1612 else { 1613 $(c).animate({height:c.scrollHeight+2}, 400, function() { 1614 $(c).css({height:'auto'}).removeClass('have-scroll'); 1615 }); 1616 } 1617 } 1618 1619 var data = this.getData(); 1620 $(this.target()).trigger(back ? 'areaback' : 'areaload', data); 1621 if(this.isPopup()) { 1622 if(data && (parseInt(data.status)==this.params.closeStatus)) 1623 { 1624 $.modal.closePopup(); 1625 if(this.parent) this.parent.load(); 1626 } 1627 } 1628 }; 1629 1630 $.fn.ajaxArea = function(params, callback) 1631 { 1632 var params = $.extend({}, { 1633 pageSrc: '', // Ð´Ð»Ñ ÐºÐ¾Ð½ÑейнеÑов Ñипа DIV - URL Ð´Ð»Ñ Ð·Ð°Ð³ÑÑзки 1634 wait: 0, // задеÑжка пеÑед загÑÑзкой 1635 maxHeight: "", // Ð´Ð»Ñ ÐºÐ¾Ð½ÑейнеÑов Ñипа DIV макÑималÑÐ½Ð°Ñ Ð²ÑÑоÑа, 0 - не огÑаниÑиваÑÑ 1636 maxWidth: 0, // Ð´Ð»Ñ ÐºÐ¾Ð½ÑейнеÑов Ñипа A макÑималÑÐ½Ð°Ñ ÑиÑина окна, 0 - по ÑиÑине ÑкÑана 1637 findForm: 'form', // ÑелекÑÐ¾Ñ ÑоÑм, 1638 findPopup: '.popup-link', // ÑелекÑÐ¾Ñ ÑÑÑлок, коÑоÑÑе бÑдÑÑ Ð²ÑплÑваÑÑ 1639 findLink: '.ajax-link', // ÑелекÑÐ¾Ñ ÑÑÑлок, коÑоÑÑе бÑдÑÑ Ð·Ð°Ð¿ÑаÑиваÑÑÑÑ Ð²Ð½ÑÑÑи блока 1640 reqSfx: 'USE_AJAX=Y', 1641 closeStatus: 1, 1642 popupCss: 'popup-layer', 1643 modal: 0 1644 }, params); 1645 // areaload(params, data) 1646 // areaback(params, data) 1647 // ad - ajaxData, ap - ajaxParams 1648 1649 return this.each(function() { 1650 var area = new ajaxArea(this, params); 1651 area.init(); 1652 //$(this).data('area', area); 1653 $(this).bind('load', function(e, url) { 1654 url = url || area.curUrl; 1655 area.load(url); 1656 }); 1657 }); 1658 } 1659})(jQuery); 1660 1661;(function($) { 1662 $.winRect = $.sigma.getClientSize(); 1663 $(window).bind('resize', function() { 1664 $.winRect = $.sigma.getClientSize(); 1665 }); 1666 var lazyImage = function(node, loader) { 1667 this.node = node; 1668 this.loader = loader; 1669 this.loading = null; 1670 1671 this.isLoaded = false; 1672 this.params = $.sigma.getOpts(node, null, 'll'); 1673 } 1674 lazyImage.prototype.init = function() { 1675 var parent = this.node.parentNode, that = this; 1676 this.loading = parent.insertBefore($.sigma.tag('div', 'll-loading'), this.node); 1677 this.loading.innerHTML = '<img src="'+this.loader.params.loadImg+'">'; 1678 this.node.style.display = 'none'; 1679 1680 this.resize(); 1681 } 1682 lazyImage.prototype.resize = function() { 1683 var parent = this.node.parentNode, p = this.params, t, 1684 w = $.sigma.toint($.sigma.getRTStyle(parent, 'width')), 1685 k = p.height / p.width; 1686 w = parseInt((p.width > w) ? w : p.width); 1687 h = parseInt(w * k); 1688 if(this.loading) { 1689 t = this.loading.getElementsByTagName('div')[0]; 1690 t.style.width = w+'px'; 1691 t.style.height = h+'px'; 1692 } 1693 this.node.style.width = w+'px'; 1694 this.node.style.height = h+'px'; 1695 } 1696 lazyImage.prototype.load = function(callbak) 1697 { 1698 var that = this; 1699 if(this.isLoaded) return; 1700 var img = new Image(); 1701 img.onload = function() { 1702 that.node.src = this.src; 1703 $(that.node).css({opacity:0,display:''}).animate({opacity:1}, 400); 1704 callbak(that); 1705 that.node.parentNode.removeChild(that.loading); 1706 that.loading = null; 1707 delete img; 1708 } 1709 1710 img.src = that.params.src; 1711 this.isLoaded = true; 1712 } 1713 lazyImage.prototype.isVisible = function(top, bottom) { 1714 if(this.isLoaded) return false; 1715 var pos = $.sigma.getPosition(this.loading); 1716 return ((top<pos.top+pos.height)&&(bottom>pos.top)); 1717 } 1718 var lazyLoader = function(node, params) { 1719 this.node = node; 1720 this.arImages = []; 1721 this.isLoaded = false; 1722 this.params = $.sigma.getOpts(node, $.extend({}, params), 'll'); 1723 } 1724 lazyLoader.prototype.init = function() { 1725 var i, n = 0, that = this, tt = null, 1726 child = this.node.getElementsByTagName('img'); 1727 var _scroll = function() { 1728 if(that.checkAll()) 1729 $(window).unbind('scroll', _scroll); 1730 }, 1731 _resize = function() { 1732 if(tt) clearInterval(tt); 1733 tt = setTimeout(function() { 1734 for(i in that.arImages) 1735 that.arImages[i].resize(); 1736 that.checkAll(); 1737 tt = null; 1738 }, 200); 1739 }; 1740 for(i in child) 1741 if(child[i].nodeType == 1) { 1742 this.arImages[n++] = new lazyImage(child[i], this); 1743 } 1744 1745 for(i in this.arImages) { 1746 this.arImages[i].init(); 1747 this.arImages[i].resize(); 1748 } 1749 $(window).bind('scroll', _scroll); 1750 this.checkAll(); 1751 1752 $(window).bind('resize', _resize); 1753 } 1754 lazyLoader.prototype.checkAll = function() { 1755 if(this.isLoaded) return true; 1756 var i, top, bottom, that = this; 1757 1758 if(this.tt) { 1759 this.bp = true; 1760 return; 1761 } //clearTimeout(tt); 1762 1763 top = $.sigma.getBodyScrollTop(); 1764 bottom = top + $.winRect.height; 1765 this.tt = setTimeout(function() { 1766 for(i in that.arImages) { 1767 if(that.arImages[i].isVisible(top, bottom)) 1768 that.arImages[i].load(function() { 1769 if(!that._n) that._n = 0; 1770 that._n++; 1771 if(that._n==that.arImages.length) 1772 that.isLoaded = true; 1773 });
1774 } 1775 that.tt = null; 1776 if(that.bp) that.checkAll(); 1777 }, 50); 1778 return false; 1779 } 1780 $.fn.lazyLoader = function(params) 1781 { 1782 var params = $.extend({}, { 1783 defImg: '/local/images/blank.gif', 1784 loadImg: '/local/images/ajax-loader.gif' 1785 }, params); 1786 1787 return this.each(function() { 1788 var lalo = new lazyLoader(this, params); 1789 lalo.init(); 1790 }); 1791 } 1792})(jQuery); 1793/* End */ 1794; 1795; /* Start:"a:4:{s:4:"full";s:46:"/local/js/basic/jquery.form.js?152302668827128";s:6:"source";s:30:"/local/js/basic/jquery.form.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1796/*! 1797 * jQuery Form Plugin 1798 * version: 2.85 (23-SEP-2011) 1799 * @requires jQuery v1.3.2 or later 1800 * 1801 * Examples and documentation at: http://malsup.com/jquery/form/ 1802 * Dual licensed under the MIT and GPL licenses: 1803 * http://www.opensource.org/licenses/mit-license.php 1804 * http://www.gnu.org/licenses/gpl.html 1805 */ 1806;(function($) { 1807 1808/* 1809 Usage Note: 1810 ----------- 1811 Do not use both ajaxSubmit and ajaxForm on the same form. These 1812 functions are intended to be exclusive. Use ajaxSubmit if you want 1813 to bind your own submit handler to the form. For example, 1814 1815 $(document).ready(function() { 1816 $('#myForm').bind('submit', function(e) { 1817 e.preventDefault(); // <-- important 1818 $(this).ajaxSubmit({ 1819 target: '#output' 1820 }); 1821 }); 1822 }); 1823
1824 Use ajaxForm when you want the plugin to manage all the event binding 1825 for you. For example, 1826 1827 $(document).ready(function() { 1828 $('#myForm').ajaxForm({ 1829 target: '#output' 1830 }); 1831 }); 1832 1833 When using ajaxForm, the ajaxSubmit function will be invoked for you 1834 at the appropriate time. 1835*/ 1836 1837/** 1838 * ajaxSubmit() provides a mechanism for immediately submitting 1839 * an HTML form using AJAX. 1840 */ 1841$.fn.ajaxSubmit = function(options) { 1842 // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) 1843 if (!this.length) { 1844 log('ajaxSubmit: skipping submit process - no element selected'); 1845 return this; 1846 } 1847 1848 var method, action, url, $form = this; 1849 1850 if (typeof options == 'function') { 1851 options = { success: options }; 1852 } 1853 1854 method = this.attr('method'); 1855 action = this.attr('action'); 1856 url = (typeof action === 'string') ? $.trim(action) : ''; 1857 url = url || window.location.href || ''; 1858 if (url) { 1859 // clean url (don't include hash vaue) 1860 url = (url.match(/^([^#]+)/)||[])[1]; 1861 } 1862 1863 options = $.extend(true, { 1864 url: url, 1865 success: $.ajaxSettings.success, 1866 type: method || 'GET', 1867 iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' 1868 }, options); 1869 1870 // hook for manipulating the form data before it is extracted; 1871 // convenient for use with rich editors like tinyMCE or FCKEditor 1872 var veto = {}; 1873 this.trigger('form-pre-serialize', [this, options, veto]); 1874 if (veto.veto) { 1875 log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); 1876 return this; 1877 } 1878 1879 // provide opportunity to alter form data before it is serialized 1880 if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { 1881 log('ajaxSubmit: submit aborted via beforeSerialize callback'); 1882 return this; 1883 } 1884 1885 var n,v,a = this.formToArray(options.semantic); 1886 if (options.data) { 1887 options.extraData = options.data; 1888 for (n in options.data) { 1889 if( $.isArray(options.data[n]) ) { 1890 for (var k in options.data[n]) { 1891 a.push( { name: n, value: options.data[n][k] } ); 1892 } 1893 } 1894 else { 1895 v = options.data[n]; 1896 v = $.isFunction(v) ? v() : v; // if value is fn, invoke it 1897 a.push( { name: n, value: v } ); 1898 } 1899 } 1900 } 1901 1902 // give pre-submit callback an opportunity to abort the submit 1903 if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { 1904 log('ajaxSubmit: submit aborted via beforeSubmit callback'); 1905 return this; 1906 } 1907 1908 // fire vetoable 'validate' event 1909 this.trigger('form-submit-validate', [a, this, options, veto]); 1910 if (veto.veto) { 1911 log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); 1912 return this; 1913 } 1914 1915 var q = $.param(a); 1916 1917 if (options.type.toUpperCase() == 'GET') { 1918 options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; 1919 options.data = null; // data is null for 'get' 1920 } 1921 else { 1922 options.data = q; // data is the query string for 'post' 1923 } 1924 1925 var callbacks = []; 1926 if (options.resetForm) { 1927 callbacks.push(function() { $form.resetForm(); }); 1928 } 1929 if (options.clearForm) { 1930 callbacks.push(function() { $form.clearForm(); }); 1931 } 1932 1933 // perform a load on the target only if dataType is not provided 1934 if (!options.dataType && options.target) { 1935 var oldSuccess = options.success || function(){}; 1936 callbacks.push(function(data) { 1937 var fn = options.replaceTarget ? 'replaceWith' : 'html'; 1938 $(options.target)[fn](data).each(oldSuccess, arguments); 1939 }); 1940 } 1941 else if (options.success) { 1942 callbacks.push(options.success); 1943 } 1944 1945 options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg 1946 var context = options.context || options; // jQuery 1.4+ supports scope context 1947 for (var i=0, max=callbacks.length; i < max; i++) { 1948 callbacks[i].apply(context, [data, status, xhr || $form, $form]); 1949 } 1950 }; 1951 1952 // are there files to upload? 1953 var fileInputs = $('input:file', this).length > 0; 1954 var mp = 'multipart/form-data'; 1955 var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); 1956 1957 // options.iframe allows user to force iframe mode 1958 // 06-NOV-09: now defaulting to iframe mode if file input is detected 1959 if (options.iframe !== false && (fileInputs || options.iframe || multipart)) { 1960 // hack to fix Safari hang (thanks to Tim Molendijk for this) 1961 // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d 1962 if (options.closeKeepAlive) { 1963 $.get(options.closeKeepAlive, function() { fileUpload(a); }); 1964 } 1965 else { 1966 fileUpload(a); 1967 } 1968 } 1969 else { 1970 // IE7 massage (see issue 57) 1971// if ($.browser.msie && method == 'get' && typeof options.type === "undefined") { 1972// var ieMeth = $form[0].getAttribute('method'); 1973// if (typeof ieMeth === 'string') 1974// options.type = ieMeth; 1975// } 1976 $.ajax(options); 1977 } 1978 1979 // fire 'notify' event 1980 this.trigger('form-submit-notify', [this, options]); 1981 return this; 1982 1983 1984 // private function for handling file uploads (hat tip to YAHOO!) 1985 function fileUpload(a) { 1986 var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle; 1987 var useProp = !!$.fn.prop; 1988 1989 if (a) { 1990 if ( useProp ) { 1991 // ensure that every serialized input is still enabled 1992 for (i=0; i < a.length; i++) { 1993 el = $(form[a[i].name]); 1994 el.prop('disabled', false); 1995 } 1996 } else { 1997 for (i=0; i < a.length; i++) { 1998 el = $(form[a[i].name]); 1999 el.removeAttr('disabled'); 2000 } 2001 }; 2002 } 2003 2004 if ($(':input[name=submit],:input[id=submit]', form).length) { 2005 // if there is an input with a name or id of 'submit' then we won't be 2006 // able to invoke the submit fn on the form (at least not x-browser) 2007 alert('Error: Form elements must not have name or id of "submit".'); 2008 return; 2009 } 2010 2011 s = $.extend(true, {}, $.ajaxSettings, options); 2012 s.context = s.context || s; 2013 id = 'jqFormIO' + (new Date().getTime()); 2014 if (s.iframeTarget) { 2015 $io = $(s.iframeTarget); 2016 n = $io.attr('name'); 2017 if (n == null) 2018 $io.attr('name', id); 2019 else 2020 id = n; 2021 } 2022 else { 2023 $io = $('<iframe name="' + id + '" src="'+ s.iframeSrc +'" />'); 2024 $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' }); 2025 } 2026 io = $io[0]; 2027 2028 2029 xhr = { // mock object 2030 aborted: 0, 2031 responseText: null, 2032 responseXML: null, 2033 status: 0, 2034 statusText: 'n/a', 2035 getAllResponseHeaders: function() {}, 2036 getResponseHeader: function() {}, 2037 setRequestHeader: function() {}, 2038 abort: function(status) { 2039 var e = (status === 'timeout' ? 'timeout' : 'aborted'); 2040 log('aborting upload... ' + e); 2041 this.aborted = 1; 2042 $io.attr('src', s.iframeSrc); // abort op in progress 2043 xhr.error = e; 2044 s.error && s.error.call(s.context, xhr, e, status); 2045 g && $.event.trigger("ajaxError", [xhr, s, e]); 2046 s.complete && s.complete.call(s.context, xhr, e); 2047 } 2048 }; 2049 2050 g = s.global;
2051 // trigger ajax global events so that activity/block indicators work like normal 2052 if (g && ! $.active++) { 2053 $.event.trigger("ajaxStart"); 2054 } 2055 if (g) { 2056 $.event.trigger("ajaxSend", [xhr, s]); 2057 } 2058 2059 if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) { 2060 if (s.global) { 2061 $.active--; 2062 } 2063 return; 2064 } 2065 if (xhr.aborted) { 2066 return; 2067 } 2068 2069 // add submitting element to data if we know it 2070 sub = form.clk; 2071 if (sub) { 2072 n = sub.name; 2073 if (n && !sub.disabled) { 2074 s.extraData = s.extraData || {}; 2075 s.extraData[n] = sub.value; 2076 if (sub.type == "image") { 2077 s.extraData[n+'.x'] = form.clk_x; 2078 s.extraData[n+'.y'] = form.clk_y; 2079 } 2080 } 2081 } 2082 2083 var CLIENT_TIMEOUT_ABORT = 1; 2084 var SERVER_ABORT = 2; 2085 2086 function getDoc(frame) { 2087 var doc = frame.contentWindow ? frame.contentWindow.document : frame.contentDocument ? frame.contentDocument : frame.document; 2088 return doc; 2089 } 2090 2091 // take a breath so that pending repaints get some cpu time before the upload starts 2092 function doSubmit() { 2093 // make sure form attrs are set 2094 var t = $form.attr('target'), a = $form.attr('action'); 2095 2096 // update form attrs in IE friendly way 2097 form.setAttribute('target',id); 2098 if (!method) { 2099 form.setAttribute('method', 'POST'); 2100 }
2101 if (a != s.url) { 2102 form.setAttribute('action', s.url); 2103 } 2104 2105 // ie borks in some cases when setting encoding 2106 if (! s.skipEncodingOverride && (!method || /post/i.test(method))) { 2107 $form.attr({ 2108 encoding: 'multipart/form-data', 2109 enctype: 'multipart/form-data' 2110 }); 2111 } 2112 2113 // support timout 2114 if (s.timeout) { 2115 timeoutHandle = setTimeout(function() { timedOut = true; cb(CLIENT_TIMEOUT_ABORT); }, s.timeout); 2116 } 2117 2118 // look for server aborts 2119 function checkState() { 2120 try { 2121 var state = getDoc(io).readyState; 2122 log('state = ' + state); 2123 if (state.toLowerCase() == 'uninitialized') 2124 setTimeout(checkState,50); 2125 } 2126 catch(e) { 2127 log('Server abort: ' , e, ' (', e.name, ')'); 2128 cb(SERVER_ABORT); 2129 timeoutHandle && clearTimeout(timeoutHandle); 2130 timeoutHandle = undefined; 2131 } 2132 } 2133 2134 // add "extra" data to form if provided in options 2135 var extraInputs = []; 2136 try { 2137 if (s.extraData) { 2138 for (var n in s.extraData) { 2139 extraInputs.push( 2140 $('<input type="hidden" name="'+n+'" />').attr('value',s.extraData[n]) 2141 .appendTo(form)[0]); 2142 } 2143 } 2144 2145 if (!s.iframeTarget) { 2146 // add iframe to doc and submit the form 2147 $io.appendTo('body'); 2148 io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false); 2149 } 2150 setTimeout(checkState,15); 2151 form.submit(); 2152 } 2153 finally { 2154 // reset attrs and remove "extra" input elements 2155 form.setAttribute('action',a); 2156 if(t) { 2157 form.setAttribute('target', t); 2158 } else { 2159 $form.removeAttr('target'); 2160 } 2161 $(extraInputs).remove(); 2162 } 2163 } 2164 2165 if (s.forceSync) { 2166 doSubmit(); 2167 } 2168 else { 2169 setTimeout(doSubmit, 10); // this lets dom updates render 2170 } 2171 2172 var data, doc, domCheckCount = 50, callbackProcessed; 2173 2174 function cb(e) { 2175 if (xhr.aborted || callbackProcessed) { 2176 return; 2177 } 2178 try { 2179 doc = getDoc(io); 2180 } 2181 catch(ex) { 2182 log('cannot access response document: ', ex); 2183 e = SERVER_ABORT; 2184 } 2185 if (e === CLIENT_TIMEOUT_ABORT && xhr) { 2186 xhr.abort('timeout'); 2187 return; 2188 } 2189 else if (e == SERVER_ABORT && xhr) { 2190 xhr.abort('server abort'); 2191 return; 2192 } 2193 2194 if (!doc || doc.location.href == s.iframeSrc) { 2195 // response not received yet 2196 if (!timedOut) 2197 return; 2198 } 2199 io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false); 2200 2201 var status = 'success', errMsg; 2202 try { 2203 if (timedOut) { 2204 throw 'timeout'; 2205 } 2206 2207 var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc); 2208 log('isXml='+isXml); 2209 if (!isXml && window.opera && (doc.body == null || doc.body.innerHTML == '')) { 2210 if (--domCheckCount) { 2211 // in some browsers (Opera) the iframe DOM is not always traversable when 2212 // the onload callback fires, so we loop a bit to accommodate 2213 log('requeing onLoad callback, DOM not available'); 2214 setTimeout(cb, 250); 2215 return; 2216 } 2217 // let this fall through because server response could be an empty document 2218 //log('Could not access iframe DOM after mutiple tries.'); 2219 //throw 'DOMException: not available'; 2220 } 2221 2222 //log('response detected'); 2223 var docRoot = doc.body ? doc.body : doc.documentElement; 2224 xhr.responseText = docRoot ? docRoot.innerHTML : null; 2225 xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc; 2226 if (isXml) 2227 s.dataType = 'xml'; 2228 xhr.getResponseHeader = function(header){ 2229 var headers = {'content-type': s.dataType}; 2230 return headers[header]; 2231 }; 2232 // support for XHR 'status' & 'statusText' emulation : 2233 if (docRoot) { 2234 xhr.status = Number( docRoot.getAttribute('status') ) || xhr.status; 2235 xhr.statusText = docRoot.getAttribute('statusText') || xhr.statusText; 2236 } 2237 2238 var dt = (s.dataType || '').toLowerCase(); 2239 var scr = /(json|script|text)/.test(dt); 2240 if (scr || s.textarea) { 2241 // see if user embedded response in textarea 2242 var ta = doc.getElementsByTagName('textarea')[0]; 2243 if (ta) { 2244 xhr.responseText = ta.value; 2245 // support for XHR 'status' & 'statusText' emulation : 2246 xhr.status = Number( ta.getAttribute('status') ) || xhr.status; 2247 xhr.statusText = ta.getAttribute('statusText') || xhr.statusText; 2248 } 2249 else if (scr) { 2250 // account for browsers injecting pre around json response 2251 var pre = doc.getElementsByTagName('pre')[0]; 2252 var b = doc.getElementsByTagName('body')[0]; 2253 if (pre) { 2254 xhr.responseText = pre.textContent ? pre.textContent : pre.innerText; 2255 } 2256 else if (b) { 2257 xhr.responseText = b.textContent ? b.textContent : b.innerText; 2258 } 2259 } 2260 } 2261 else if (dt == 'xml' && !xhr.responseXML && xhr.responseText != null) { 2262 xhr.responseXML = toXml(xhr.responseText); 2263 } 2264 2265 try { 2266 data = httpData(xhr, dt, s); 2267 } 2268 catch (e) { 2269 status = 'parsererror'; 2270 xhr.error = errMsg = (e || status); 2271 } 2272 } 2273 catch (e) { 2274 log('error caught: ',e); 2275 status = 'error'; 2276 xhr.error = errMsg = (e || status); 2277 } 2278 2279 if (xhr.aborted) { 2280 log('upload aborted'); 2281 status = null; 2282 } 2283 2284 if (xhr.status) { // we've set xhr.status 2285 status = (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) ? 'success' : 'error'; 2286 } 2287 2288 // ordering of these callbacks/triggers is odd, but that's how $.ajax does it 2289 if (status === 'success') { 2290 s.success && s.success.call(s.context, data, 'success', xhr); 2291 g && $.event.trigger("ajaxSuccess", [xhr, s]); 2292 } 2293 else if (status) { 2294 if (errMsg == undefined) 2295 errMsg = xhr.statusText; 2296 s.error && s.error.call(s.context, xhr, status, errMsg); 2297 g && $.event.trigger("ajaxError", [xhr, s, errMsg]); 2298 } 2299
2300 g && $.event.trigger("ajaxComplete", [xhr, s]); 2301 2302 if (g && ! --$.active) { 2303 $.event.trigger("ajaxStop"); 2304 } 2305 2306 s.complete && s.complete.call(s.context, xhr, status); 2307 2308 callbackProcessed = true; 2309 if (s.timeout) 2310 clearTimeout(timeoutHandle); 2311 2312 // clean up 2313 setTimeout(function() { 2314 if (!s.iframeTarget) 2315 $io.remove(); 2316 xhr.responseXML = null; 2317 }, 100); 2318 } 2319 2320 var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+) 2321 if (window.ActiveXObject) { 2322 doc = new ActiveXObject('Microsoft.XMLDOM'); 2323 doc.async = 'false'; 2324 doc.loadXML(s); 2325 } 2326 else { 2327 doc = (new DOMParser()).parseFromString(s, 'text/xml'); 2328 } 2329 return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null; 2330 }; 2331 var parseJSON = $.parseJSON || function(s) { 2332 return window['eval']('(' + s + ')'); 2333 }; 2334 2335 var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4 2336 2337 var ct = xhr.getResponseHeader('content-type') || '', 2338 xml = type === 'xml' || !type && ct.indexOf('xml') >= 0, 2339 data = xml ? xhr.responseXML : xhr.responseText; 2340 2341 if (xml && data.documentElement.nodeName === 'parsererror') { 2342 $.error && $.error('parsererror'); 2343 } 2344 if (s && s.dataFilter) { 2345 data = s.dataFilter(data, type); 2346 } 2347 if (typeof data === 'string') { 2348 if (type === 'json' || !type && ct.indexOf('json') >= 0) { 2349 data = parseJSON(data); 2350 } else if (type === "script" || !type && ct.indexOf("javascript") >= 0) { 2351 $.globalEval(data); 2352 } 2353 } 2354 return data; 2355 }; 2356 } 2357}; 2358 2359/** 2360 * ajaxForm() provides a mechanism for fully automating form submission. 2361 * 2362 * The advantages of using this method instead of ajaxSubmit() are: 2363 * 2364 * 1: This method will include coordinates for <input type="image" /> elements (if the element 2365 * is used to submit the form). 2366 * 2. This method will include the submit element's name/value data (for the element that was 2367 * used to submit the form). 2368 * 3. This method binds the submit() method to the form for you. 2369 * 2370 * The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely 2371 * passes the options argument along after properly binding events for submit elements and 2372 * the form itself. 2373 */ 2374$.fn.ajaxForm = function(options) { 2375 // in jQuery 1.3+ we can fix mistakes with the ready state 2376 if (this.length === 0) { 2377 var o = { s: this.selector, c: this.context }; 2378 if (!$.isReady && o.s) { 2379 log('DOM not ready, queuing ajaxForm'); 2380 $(function() { 2381 $(o.s,o.c).ajaxForm(options); 2382 }); 2383 return this; 2384 } 2385 // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready() 2386 log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)')); 2387 return this; 2388 } 2389 2390 return this.ajaxFormUnbind().bind('submit.form-plugin', function(e) { 2391 if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed 2392 e.preventDefault(); 2393 $(this).ajaxSubmit(options); 2394 } 2395 }).bind('click.form-plugin', function(e) { 2396 var target = e.target; 2397 var $el = $(target); 2398 if (!($el.is(":submit,input:image"))) { 2399 // is this a child element of the submit el? (ex: a span within a button) 2400 var t = $el.closest(':submit'); 2401 if (t.length == 0) { 2402 return; 2403 } 2404 target = t[0]; 2405 } 2406 var form = this; 2407 form.clk = target; 2408 if (target.type == 'image') { 2409 if (e.offsetX != undefined) { 2410 form.clk_x = e.offsetX; 2411 form.clk_y = e.offsetY; 2412 } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin 2413 var offset = $el.offset(); 2414 form.clk_x = e.pageX - offset.left; 2415 form.clk_y = e.pageY - offset.top; 2416 } else { 2417 form.clk_x = e.pageX - target.offsetLeft; 2418 form.clk_y = e.pageY - target.offsetTop; 2419 } 2420 } 2421 // clear form vars 2422 setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100); 2423 }); 2424}; 2425 2426// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm 2427$.fn.ajaxFormUnbind = function() { 2428 return this.unbind('submit.form-plugin click.form-plugin'); 2429}; 2430 2431/** 2432 * formToArray() gathers form element data into an array of objects that can 2433 * be passed to any of the following ajax functions: $.get, $.post, or load. 2434 * Each object in the array has both a 'name' and 'value' property. An example of 2435 * an array for a simple login form might be: 2436 * 2437 * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ] 2438 * 2439 * It is this array that is passed to pre-submit callback functions provided to the 2440 * ajaxSubmit() and ajaxForm() methods. 2441 */ 2442$.fn.formToArray = function(semantic) { 2443 var a = []; 2444 if (this.length === 0) { 2445 return a; 2446 } 2447 2448 var form = this[0]; 2449 var els = semantic ? form.getElementsByTagName('*') : form.elements; 2450 if (!els) { 2451 return a; 2452 } 2453 2454 var i,j,n,v,el,max,jmax; 2455 for(i=0, max=els.length; i < max; i++) { 2456 el = els[i]; 2457 n = el.name; 2458 if (!n) { 2459 continue; 2460 } 2461 2462 if (semantic && form.clk && el.type == "image") { 2463 // handle image inputs on the fly when semantic == true 2464 if(!el.disabled && form.clk == el) { 2465 a.push({name: n, value: $(el).val()}); 2466 a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); 2467 } 2468 continue; 2469 } 2470 2471 v = $.fieldValue(el, true); 2472 if (v && v.constructor == Array) { 2473 for(j=0, jmax=v.length; j < jmax; j++) { 2474 a.push({name: n, value: v[j]}); 2475 } 2476 } 2477 else if (v !== null && typeof v != 'undefined') { 2478 a.push({name: n, value: v}); 2479 } 2480 } 2481 2482 if (!semantic && form.clk) { 2483 // input type=='image' are not found in elements array! handle it here 2484 var $input = $(form.clk), input = $input[0]; 2485 n = input.name; 2486 if (n && !input.disabled && input.type == 'image') { 2487 a.push({name: n, value: $input.val()}); 2488 a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); 2489 } 2490 } 2491 return a; 2492}; 2493 2494/** 2495 * Serializes form data into a 'submittable' string. This method will return a string 2496 * in the format: name1=value1&name2=value2 2497 */
2498$.fn.formSerialize = function(semantic) { 2499 //hand off to jQuery.param for proper encoding 2500 return $.param(this.formToArray(semantic)); 2501}; 2502 2503/** 2504 * Serializes all field elements in the jQuery object into a query string. 2505 * This method will return a string in the format: name1=value1&name2=value2 2506 */ 2507$.fn.fieldSerialize = function(successful) { 2508 var a = []; 2509 this.each(function() { 2510 var n = this.name; 2511 if (!n) { 2512 return; 2513 } 2514 var v = $.fieldValue(this, successful); 2515 if (v && v.constructor == Array) { 2516 for (var i=0,max=v.length; i < max; i++) { 2517 a.push({name: n, value: v[i]}); 2518 } 2519 } 2520 else if (v !== null && typeof v != 'undefined') { 2521 a.push({name: this.name, value: v}); 2522 } 2523 }); 2524 //hand off to jQuery.param for proper encoding 2525 return $.param(a); 2526}; 2527 2528/** 2529 * Returns the value(s) of the element in the matched set. For example, consider the following form: 2530 * 2531 * <form><fieldset> 2532 * <input name="A" type="text" /> 2533 * <input name="A" type="text" /> 2534 * <input name="B" type="checkbox" value="B1" /> 2535 * <input name="B" type="checkbox" value="B2"/> 2536 * <input name="C" type="radio" value="C1" /> 2537 * <input name="C" type="radio" value="C2" /> 2538 * </fieldset></form> 2539 * 2540 * var v = $(':text').fieldValue(); 2541 * // if no values are entered into the text inputs 2542 * v == ['',''] 2543 * // if values entered into the text inputs are 'foo' and 'bar' 2544 * v == ['foo','bar'] 2545 * 2546 * var v = $(':checkbox').fieldValue(); 2547 * // if neither checkbox is checked 2548 * v === undefined 2549 * // if both checkboxes are checked 2550 * v == ['B1', 'B2'] 2551 * 2552 * var v = $(':radio').fieldValue(); 2553 * // if neither radio is checked 2554 * v === undefined 2555 * // if first radio is checked 2556 * v == ['C1'] 2557 * 2558 * The successful argument controls whether or not the field element must be 'successful' 2559 * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls). 2560 * The default value of the successful argument is true. If this value is false the value(s) 2561 * for each element is returned. 2562 * 2563 * Note: This method *always* returns an array. If no valid value can be determined the 2564 * array will be empty, otherwise it will contain one or more values. 2565 */ 2566$.fn.fieldValue = function(successful) { 2567 for (var val=[], i=0, max=this.length; i < max; i++) { 2568 var el = this[i]; 2569 var v = $.fieldValue(el, successful); 2570 if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) { 2571 continue; 2572 } 2573 v.constructor == Array ? $.merge(val, v) : val.push(v); 2574 } 2575 return val; 2576}; 2577 2578/** 2579 * Returns the value of the field element. 2580 */ 2581$.fieldValue = function(el, successful) { 2582 var n = el.name, t = el.type, tag = el.tagName.toLowerCase(); 2583 if (successful === undefined) { 2584 successful = true; 2585 } 2586 2587 if (successful && (!n || el.disabled || t == 'reset' || t == 'button' || 2588 (t == 'checkbox' || t == 'radio') && !el.checked || 2589 (t == 'submit' || t == 'image') && el.form && el.form.clk != el || 2590 tag == 'select' && el.selectedIndex == -1)) { 2591 return null; 2592 } 2593 2594 if (tag == 'select') { 2595 var index = el.selectedIndex; 2596 if (index < 0) { 2597 return null; 2598 } 2599 var a = [], ops = el.options; 2600 var one = (t == 'select-one'); 2601 var max = (one ? index+1 : ops.length); 2602 for(var i=(one ? index : 0); i < max; i++) { 2603 var op = ops[i]; 2604 if (op.selected) { 2605 var v = op.value; 2606 if (!v) { // extra pain for IE... 2607 v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value; 2608 } 2609 if (one) { 2610 return v; 2611 } 2612 a.push(v); 2613 } 2614 } 2615 return a; 2616 } 2617 return $(el).val(); 2618}; 2619 2620/** 2621 * Clears the form data. Takes the following actions on the form's input fields: 2622 * - input text fields will have their 'value' property set to the empty string 2623 * - select elements will have their 'selectedIndex' property set to -1 2624 * - checkbox and radio inputs will have their 'checked' property set to false 2625 * - inputs of type submit, button, reset, and hidden will *not* be effected 2626 * - button elements will *not* be effected 2627 */ 2628$.fn.clearForm = function() { 2629 return this.each(function() { 2630 $('input,select,textarea', this).clearFields(); 2631 }); 2632}; 2633 2634/** 2635 * Clears the selected form elements. 2636 */ 2637$.fn.clearFields = $.fn.clearInputs = function() { 2638 var re = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; // 'hidden' is not in this list 2639 return this.each(function() { 2640 var t = this.type, tag = this.tagName.toLowerCase(); 2641 if (re.test(t) || tag == 'textarea') { 2642 this.value = ''; 2643 } 2644 else if (t == 'checkbox' || t == 'radio') { 2645 this.checked = false;
2646 } 2647 else if (tag == 'select') { 2648 this.selectedIndex = -1; 2649 } 2650 }); 2651}; 2652 2653/** 2654 * Resets the form data. Causes all form elements to be reset to their original value. 2655 */ 2656$.fn.resetForm = function() { 2657 return this.each(function() { 2658 // guard against an input with the name of 'reset' 2659 // note that IE reports the reset function as an 'object' 2660 if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) { 2661 this.reset(); 2662 } 2663 }); 2664}; 2665 2666/** 2667 * Enables or disables any matching elements. 2668 */ 2669$.fn.enable = function(b) { 2670 if (b === undefined) { 2671 b = true; 2672 } 2673 return this.each(function() { 2674 this.disabled = !b; 2675 }); 2676}; 2677 2678/** 2679 * Checks/unchecks any matching checkboxes or radio buttons and 2680 * selects/deselects and matching option elements. 2681 */ 2682$.fn.selected = function(select) { 2683 if (select === undefined) { 2684 select = true; 2685 } 2686 return this.each(function() { 2687 var t = this.type; 2688 if (t == 'checkbox' || t == 'radio') { 2689 this.checked = select; 2690 } 2691 else if (this.tagName.toLowerCase() == 'option') { 2692 var $sel = $(this).parent('select'); 2693 if (select && $sel[0] && $sel[0].type == 'select-one') { 2694 // deselect all other options 2695 $sel.find('option').selected(false); 2696 } 2697 this.selected = select; 2698 } 2699 }); 2700}; 2701 2702// expose debug var 2703$.fn.ajaxSubmit.debug = false; 2704 2705// helper fn for console logging 2706function log() { 2707 if (!$.fn.ajaxSubmit.debug) 2708 return; 2709 var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,''); 2710 if (window.console && window.console.log) { 2711 window.console.log(msg); 2712 } 2713 else if (window.opera && window.opera.postError) { 2714 window.opera.postError(msg); 2715 } 2716}; 2717 2718})(jQuery); 2719 2720/* End */ 2721; 2722; /* Start:"a:4:{s:4:"full";s:54:"/local/js/basic/jquery.validate.min.js?152302668822691";s:6:"source";s:38:"/local/js/basic/jquery.validate.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2723/*! jQuery Validation Plugin - v1.15.0 - 2/24/2016 2724 * http://jqueryvalidation.org/ 2725 * Copyright (c) 2016 Jörn Zaefferer; Licensed MIT */ 2726!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){if(this.length){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)}
2726,a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable]",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=h&&g.check(e)))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers
2726)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)a[b]&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]),d in c||!b.objectLength(a(this).rules())?!1:(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);if("function"==typeof f.normalizer){if(i=f.normalizer.call(b,i),"string"!=typeof i)throw new TypeError("The normalizer should return a string value.");delete f.normalizer}for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d}
2726,formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.n
2726ame],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);
2726return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e=a(c).attr("type"),f="Step attribute on input type "+e+" is not supported.",g=["text","number","range"],h=new RegExp("\\b"+e+"\\b"),i=e&&!h.test(g.join());if(i)throw new Error(f);return this.optional(c)||b%d===0},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("val
2726idate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})}); 2727/* End */ 2728; 2729; /* Start:"a:4:{s:4:"full";s:47:"/local/js/basic/jquery.cookie.js?15230266881535";s:6:"source";s:32:"/local/js/basic/jquery.cookie.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2730jQuery.cookie = function(name, value, options) { 2731 if (typeof value != 'undefined') { 2732 options = options || {}; 2733 if (value === null) { 2734 value = ''; 2735 options.expires = -1; 2736 } 2737 var expires = ''; 2738 if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { 2739 var date; 2740 if (typeof options.expires == 'number') { 2741 date = new Date(); 2742 date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); 2743 } else { 2744 date = options.expires; 2745 } 2746 expires = '; expires=' + date.toUTCString(); 2747 } 2748 2749 var path = options.path ? '; path=' + (options.path) : '; path=/'; 2750 var domain = options.domain ? '; domain=' + (options.domain) : ''; 2751 var secure = options.secure ? '; secure' : ''; 2752 document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); 2753 } else { 2754 var cookieValue = null; 2755 if (document.cookie && document.cookie != '') { 2756 var cookies = document.cookie.split(';'); 2757 for (var i = 0; i < cookies.length; i++) { 2758 var cookie = jQuery.trim(cookies[i]); 2759 2760 if (cookie.substring(0, name.length + 1) == (name + '=')) { 2761 cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 2762 break; 2763 } 2764 } 2765 } 2766 return cookieValue; 2767 } 2768}; 2769/* End */ 2770; 2771; /* Start:"a:4:{s:4:"full";s:47:"/local/js/basic/jquery.easing.js?15230266888097";s:6:"source";s:32:"/local/js/basic/jquery.easing.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2772/* 2773 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 2774 * 2775 * Uses the built in easing capabilities added In jQuery 1.1 2776 * to offer multiple easing options 2777 * 2778 * TERMS OF USE - jQuery Easing 2779 * 2780 * Open source under the BSD License. 2781 * 2782 * Copyright © 2008 George McGinley Smith 2783 * All rights reserved. 2784 * 2785 * Redistribution and use in source and binary forms, with or without modification, 2786 * are permitted provided that the following conditions are met: 2787 * 2788 * Redistributions of source code must retain the above copyright notice, this list of 2789 * conditions and the following disclaimer. 2790 * Redistributions in binary form must reproduce the above copyright notice, this list 2791 * of conditions and the following disclaimer in the documentation and/or other materials 2792 * provided with the distribution. 2793 * 2794 * Neither the name of the author nor the names of contributors may be used to endorse 2795 * or promote products derived from this software without specific prior written permission. 2796 * 2797 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 2798 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2799 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 2800 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
vendor: 5,091 bytes, lines 2801-2946
2801 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 2802 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 2803 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 2804 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 2805 * OF THE POSSIBILITY OF SUCH DAMAGE. 2806 * 2807*/ 2808 2809// t: current time, b: begInnIng value, c: change In value, d: duration 2810jQuery.easing['jswing'] = jQuery.easing['swing']; 2811 2812jQuery.extend( jQuery.easing, 2813{ 2814 def: 'easeOutQuad', 2815 swing: function (x, t, b, c, d) { 2816 //alert(jQuery.easing.default); 2817 return jQuery.easing[jQuery.easing.def](x, t, b, c, d); 2818 }, 2819 easeInQuad: function (x, t, b, c, d) { 2820 return c*(t/=d)*t + b; 2821 }, 2822 easeOutQuad: function (x, t, b, c, d) { 2823 return -c *(t/=d)*(t-2) + b; 2824 }, 2825 easeInOutQuad: function (x, t, b, c, d) { 2826 if ((t/=d/2) < 1) return c/2*t*t + b; 2827 return -c/2 * ((--t)*(t-2) - 1) + b; 2828 }, 2829 easeInCubic: function (x, t, b, c, d) { 2830 return c*(t/=d)*t*t + b; 2831 }, 2832 easeOutCubic: function (x, t, b, c, d) { 2833 return c*((t=t/d-1)*t*t + 1) + b; 2834 }, 2835 easeInOutCubic: function (x, t, b, c, d) { 2836 if ((t/=d/2) < 1) return c/2*t*t*t + b; 2837 return c/2*((t-=2)*t*t + 2) + b; 2838 }, 2839 easeInQuart: function (x, t, b, c, d) { 2840 return c*(t/=d)*t*t*t + b; 2841 }, 2842 easeOutQuart: function (x, t, b, c, d) { 2843 return -c * ((t=t/d-1)*t*t*t - 1) + b; 2844 }, 2845 easeInOutQuart: function (x, t, b, c, d) { 2846 if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 2847 return -c/2 * ((t-=2)*t*t*t - 2) + b; 2848 }, 2849 easeInQuint: function (x, t, b, c, d) { 2850 return c*(t/=d)*t*t*t*t + b; 2851 }, 2852 easeOutQuint: function (x, t, b, c, d) { 2853 return c*((t=t/d-1)*t*t*t*t + 1) + b; 2854 }, 2855 easeInOutQuint: function (x, t, b, c, d) { 2856 if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 2857 return c/2*((t-=2)*t*t*t*t + 2) + b; 2858 }, 2859 easeInSine: function (x, t, b, c, d) { 2860 return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 2861 }, 2862 easeOutSine: function (x, t, b, c, d) { 2863 return c * Math.sin(t/d * (Math.PI/2)) + b; 2864 }, 2865 easeInOutSine: function (x, t, b, c, d) { 2866 return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 2867 }, 2868 easeInExpo: function (x, t, b, c, d) { 2869 return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 2870 }, 2871 easeOutExpo: function (x, t, b, c, d) { 2872 return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 2873 }, 2874 easeInOutExpo: function (x, t, b, c, d) { 2875 if (t==0) return b; 2876 if (t==d) return b+c; 2877 if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 2878 return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 2879 }, 2880 easeInCirc: function (x, t, b, c, d) { 2881 return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 2882 }, 2883 easeOutCirc: function (x, t, b, c, d) { 2884 return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 2885 }, 2886 easeInOutCirc: function (x, t, b, c, d) { 2887 if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 2888 return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 2889 }, 2890 easeInElastic: function (x, t, b, c, d) { 2891 var s=1.70158;var p=0;var a=c; 2892 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 2893 if (a < Math.abs(c)) { a=c; var s=p/4; } 2894 else var s = p/(2*Math.PI) * Math.asin (c/a); 2895 return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 2896 }, 2897 easeOutElastic: function (x, t, b, c, d) { 2898 var s=1.70158;var p=0;var a=c; 2899 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 2900 if (a < Math.abs(c)) { a=c; var s=p/4; } 2901 else var s = p/(2*Math.PI) * Math.asin (c/a); 2902 return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 2903 }, 2904 easeInOutElastic: function (x, t, b, c, d) { 2905 var s=1.70158;var p=0;var a=c; 2906 if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 2907 if (a < Math.abs(c)) { a=c; var s=p/4; } 2908 else var s = p/(2*Math.PI) * Math.asin (c/a); 2909 if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 2910 return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 2911 }, 2912 easeInBack: function (x, t, b, c, d, s) { 2913 if (s == undefined) s = 1.70158; 2914 return c*(t/=d)*t*((s+1)*t - s) + b; 2915 }, 2916 easeOutBack: function (x, t, b, c, d, s) { 2917 if (s == undefined) s = 1.70158; 2918 return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 2919 }, 2920 easeInOutBack: function (x, t, b, c, d, s) { 2921 if (s == undefined) s = 1.70158; 2922 if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 2923 return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 2924 }, 2925 easeInBounce: function (x, t, b, c, d) { 2926 return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 2927 }, 2928 easeOutBounce: function (x, t, b, c, d) { 2929 if ((t/=d) < (1/2.75)) { 2930 return c*(7.5625*t*t) + b; 2931 } else if (t < (2/2.75)) { 2932 return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 2933 } else if (t < (2.5/2.75)) { 2934 return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 2935 } else { 2936 return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 2937 } 2938 }, 2939 easeInOutBounce: function (x, t, b, c, d) { 2940 if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 2941 return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 2942 } 2943}); 2944 2945/* 2946 *
2947 * TERMS OF USE - EASING EQUATIONS 2948 * 2949 * Open source under the BSD License. 2950 * 2951 * Copyright © 2001 Robert Penner 2952 * All rights reserved. 2953 * 2954 * Redistribution and use in source and binary forms, with or without modification, 2955 * are permitted provided that the following conditions are met: 2956 * 2957 * Redistributions of source code must retain the above copyright notice, this list of 2958 * conditions and the following disclaimer. 2959 * Redistributions in binary form must reproduce the above copyright notice, this list 2960 * of conditions and the following disclaimer in the documentation and/or other materials 2961 * provided with the distribution. 2962 * 2963 * Neither the name of the author nor the names of contributors may be used to endorse 2964 * or promote products derived from this software without specific prior written permission. 2965 * 2966 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 2967 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2968 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 2969 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 2970 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 2971 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 2972 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 2973 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 2974 * OF THE POSSIBILITY OF SUCH DAMAGE. 2975 * 2976 */ 2977/* End */ 2978; 2979; /* Start:"a:4:{s:4:"full";s:56:"/local/js/basic/jquery.mousewheel.pack.js?15230266881384";s:6:"source";s:41:"/local/js/basic/jquery.mousewheel.pack.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2980/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 2981 * Licensed under the MIT License (LICENSE.txt). 2982 * 2983 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 2984 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 2985 * Thanks to: Seamus Leahy for adding deltaX and deltaY 2986 * 2987 * Version: 3.0.6 2988 * 2989 * Requires: 1.2.2+ 2990 */ 2991(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]= 2992d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); 2993/* End */ 2994; 2995; /* Start:"a:4:{s:4:"full";s:49:"/local/js/basic/jquery.lazyload.js?15230266889058";s:6:"source";s:34:"/local/js/basic/jquery.lazyload.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2996/*! 2997 * Lazy Load - jQuery plugin for lazy loading images 2998 * 2999 * Copyright (c) 2007-2015 Mika Tuupola 3000 * 3001 * Licensed under the MIT license: 3002 * http://www.opensource.org/licenses/mit-license.php 3003 * 3004 * Project home: 3005 * http://www.appelsiini.net/projects/lazyload 3006 * 3007 * Version: 1.9.7 3008 * 3009 */ 3010 3011(function($, window, document, undefined) { 3012 var $window = $(window); 3013 3014 $.fn.lazyload = function(options) { 3015 var elements = this; 3016 var $container; 3017 var settings = { 3018 threshold : 0, 3019 failure_limit : 0, 3020 event : "scroll", 3021 effect : "show", 3022 container : window, 3023 data_attribute : "original", 3024 skip_invisible : false, 3025 appear : null, 3026 load : null, 3027 placeholder : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" 3028 }; 3029
vendor: 5,182 bytes, lines 3030-3166
3030 function update() { 3031 var counter = 0; 3032 3033 elements.each(function() { 3034 var $this = $(this); 3035 if (settings.skip_invisible && !$this.is(":visible")) { 3036 return; 3037 } 3038 if ($.abovethetop(this, settings) || 3039 $.leftofbegin(this, settings)) { 3040 /* Nothing. */ 3041 } else if (!$.belowthefold(this, settings) && 3042 !$.rightoffold(this, settings)) { 3043 $this.trigger("appear"); 3044 /* if we found an image we'll load, reset the counter */ 3045 counter = 0; 3046 } else { 3047 if (++counter > settings.failure_limit) { 3048 return false; 3049 } 3050 } 3051 }); 3052 3053 } 3054 3055 if(options) { 3056 /* Maintain BC for a couple of versions. */ 3057 if (undefined !== options.failurelimit) { 3058 options.failure_limit = options.failurelimit; 3059 delete options.failurelimit; 3060 } 3061 if (undefined !== options.effectspeed) { 3062 options.effect_speed = options.effectspeed; 3063 delete options.effectspeed; 3064 } 3065 3066 $.extend(settings, options); 3067 } 3068 3069 /* Cache container as jQuery as object. */ 3070 $container = (settings.container === undefined || 3071 settings.container === window) ? $window : $(settings.container); 3072 3073 /* Fire one scroll event per scroll. Not one scroll event per image. */ 3074 if (0 === settings.event.indexOf("scroll")) { 3075 $container.bind(settings.event, function() { 3076 return update(); 3077 }); 3078 } 3079 3080 this.each(function() { 3081 var self = this; 3082 var $self = $(self); 3083 3084 self.loaded = false; 3085 3086 /* If no src attribute given use data:uri. */ 3087 if ($self.attr("src") === undefined || $self.attr("src") === false) { 3088 if ($self.is("img")) { 3089 $self.attr("src", settings.placeholder); 3090 } 3091 } 3092 3093 /* When appear is triggered load original image. */ 3094 $self.one("appear", function() { 3095 if (!this.loaded) { 3096 if (settings.appear) { 3097 var elements_left = elements.length; 3098 settings.appear.call(self, elements_left, settings); 3099 } 3100 $("<img />") 3101 .bind("load", function() { 3102 3103 var original = $self.attr("data-" + settings.data_attribute); 3104 $self.hide(); 3105 if ($self.is("img")) { 3106 $self.attr("src", original); 3107 } else { 3108 $self.css("background-image", "url('" + original + "')"); 3109 } 3110 $self[settings.effect](settings.effect_speed); 3111 3112 self.loaded = true; 3113 3114 /* Remove image from array so it is not looped next time. */ 3115 var temp = $.grep(elements, function(element) { 3116 return !element.loaded; 3117 }); 3118 elements = $(temp); 3119 3120 if (settings.load) { 3121 var elements_left = elements.length; 3122 settings.load.call(self, elements_left, settings); 3123 } 3124 }) 3125 .attr("src", $self.attr("data-" + settings.data_attribute)); 3126 } 3127 }); 3128 3129 /* When wanted event is triggered load original image */ 3130 /* by triggering appear. */ 3131 if (0 !== settings.event.indexOf("scroll")) { 3132 $self.bind(settings.event, function() { 3133 if (!self.loaded) { 3134 $self.trigger("appear"); 3135 } 3136 }); 3137 } 3138 }); 3139 3140 /* Check if something appears when window is resized. */ 3141 $window.bind("resize", function() { 3142 update(); 3143 }); 3144 3145 /* With IOS5 force loading images when navigating with back button. */ 3146 /* Non optimal workaround. */ 3147 if ((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)) { 3148 $window.bind("pageshow", function(event) { 3149 if (event.originalEvent && event.originalEvent.persisted) { 3150 elements.each(function() { 3151 $(this).trigger("appear"); 3152 }); 3153 } 3154 }); 3155 } 3156 3157 /* Force initial check if images should appear. */ 3158 $(document).ready(function() { 3159 update(); 3160 }); 3161 3162 return this; 3163 }; 3164 3165 /* Convenience methods in jQuery namespace. */ 3166 /* Use as $.belowthefold(element, {threshold : 100, container : window}
3166) */ 3167 3168 $.belowthefold = function(element, settings) { 3169 var fold; 3170 3171 if (settings.container === undefined || settings.container === window) { 3172 fold = (window.innerHeight ? window.innerHeight : $window.height()) + $window.scrollTop(); 3173 } else { 3174 fold = $(settings.container).offset().top + $(settings.container).height(); 3175 } 3176 3177 return fold <= $(element).offset().top - settings.threshold; 3178 }; 3179 3180 $.rightoffold = function(element, settings) { 3181 var fold; 3182 3183 if (settings.container === undefined || settings.container === window) { 3184 fold = $window.width() + $window.scrollLeft(); 3185 } else { 3186 fold = $(settings.container).offset().left + $(settings.container).width(); 3187 } 3188 3189 return fold <= $(element).offset().left - settings.threshold; 3190 }; 3191 3192 $.abovethetop = function(element, settings) { 3193 var fold; 3194 3195 if (settings.container === undefined || settings.container === window) { 3196 fold = $window.scrollTop(); 3197 } else { 3198 fold = $(settings.container).offset().top; 3199 } 3200 3201 return fold >= $(element).offset().top + settings.threshold + $(element).height(); 3202 }; 3203 3204 $.leftofbegin = function(element, settings) { 3205 var fold; 3206 3207 if (settings.container === undefined || settings.container === window) { 3208 fold = $window.scrollLeft(); 3209 } else { 3210 fold = $(settings.container).offset().left; 3211 } 3212 3213 return fold >= $(element).offset().left + settings.threshold + $(element).width(); 3214 }; 3215 3216 $.inviewport = function(element, settings) { 3217 return !$.rightoffold(element, settings) && !$.leftofbegin(element, settings) && 3218 !$.belowthefold(element, settings) && !$.abovethetop(element, settings); 3219 }; 3220 3221 /* Custom selectors for your convenience. */ 3222 /* Use as $("img:below-the-fold").something() or */ 3223 /* $("img").filter(":below-the-fold").something() which is faster */ 3224 3225 $.extend($.expr[":"], { 3226 "below-the-fold" : function(a) { return $.belowthefold(a, {threshold : 0}); }, 3227 "above-the-top" : function(a) { return !$.belowthefold(a, {threshold : 0}); }, 3228 "right-of-screen": function(a) { return $.rightoffold(a, {threshold : 0}); }, 3229 "left-of-screen" : function(a) { return !$.rightoffold(a, {threshold : 0}); }, 3230 "in-viewport" : function(a) { return $.inviewport(a, {threshold : 0}); }, 3231 /* Maintain BC for couple of versions. */ 3232 "above-the-fold" : function(a) { return !$.belowthefold(a, {threshold : 0}); }, 3233 "right-of-fold" : function(a) { return $.rightoffold(a, {threshold : 0}); }, 3234 "left-of-fold" : function(a) { return !$.rightoffold(a, {threshold : 0}); } 3235 }); 3236 3237})(jQuery, window, document); 3238 3239/* End */ 3240; 3241; /* Start:"a:4:{s:4:"full";s:39:"/local/js/basic/ajax.js?152302668814096";s:6:"source";s:23:"/local/js/basic/ajax.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3242;(function(w, $) { 3243 var _all = [], db = document.body; 3244 var _get_node = function(node, params) { 3245 node = typeof(node)=='string' ? document.getElementById(node) : node; 3246 var n = _all.length, i; 3247 for(i = 0; i < n; i++) 3248 if((node == _all[i].node)&&(_all[i].constructor == _jajax)) 3249 return _all[i]; 3250 params = params || {}; 3251 _all[n] = new _jajax(node, params); 3252 return _all[n]; 3253 } 3254 var _jajax = function(node, params) { 3255 var opts; 3256 3257 this.node = node; // a или div 3258 this.button = null; // a 3259 this.container = null; // div 3260 this.ajax_call_id = ''; // запÑоÑиÑÑ Ð¾Ð±Ð»Ð°ÑÑÑ 3261 this.forms = []; // forms в конÑейнеÑе form[class~"formClass"] 3262 this.hrefs = []; // ÑÑÑлки в конÑейнеÑе a[class~"linkClass"] 3263 this.bBind = false; 3264 this.curUrl = ''; 3265 this.params = null; 3266 this.holded = false; 3267 3268 var container = null, href, rel, pos; 3269 if(node.tagName.toLowerCase()=='a') { 3270 this.button = node; 3271 href = this.node.href; 3272 if(href.length > 0) { 3273 pos = href.indexOf('#'); 3274 if(pos >= 0) { 3275 rel = href.substr(pos + 1); 3276 href = href.substr(0, pos); 3277 } 3278 if(rel.length > 0) 3279 container = document.getElementById(rel); 3280 } 3281 3282 if(href.length <= 0) { 3283 href = window.location.href; 3284 pos = href.indexOf('#'); 3285 if(pos >= 0) href = href.substr(0, pos); 3286 } 3287 3288 if(!container) { 3289 this._popup = true; 3290 container = document.getElementById('_jajax__container'); 3291 if(!container) { 3292 container = document.body.appendChild($.sigma.tag('div')); 3293 container.id = '_jajax__container'; 3294 } 3295 } 3296 container.style.display = 'none'; 3297 this.container = container; 3298 } 3299 else 3300 this.container = node; 3301 3302 this.params = $.sigma.getOpts(this.container, params, 'ac'); 3303 if(this.button) 3304 this.params = $.sigma.getOpts(this.button, params, 'ac'); 3305 if(this.params.id) 3306 this.ajax_call_id = this.params.id; 3307 3308 this.init(); 3309 }; 3310 _jajax.prototype.isHolded = function(val) { 3311 if(typeof(val)!='undefined') this.holded = !!val; 3312 return this.holded; 3313 } 3314 _jajax.prototype.init = function() { 3315 var that = this, p; 3316 this.wait.apply(that); 3317 3318 if(this.button != null) { 3319 this.attach(this.button, 'click', function(e) { 3320 $.magnificPopup({ 3321 items: { 3322 src: '#'+that.container.id, 3323 type: 'inline' 3324 } 3325 }); 3326 }); 3327 /* 3328 $(this.link()).click(function() { 3329 that.load(this.href, function() { 3330 if(this.isPopup()) { 3331 var size = $.sigma.getClientSize(), w = this.params.maxWidth; 3332 if((w<=0) || (w>size.width)) w = size.width; 3333 $.modal.openPopup(this.container(), {width: w, css: this.params.popupCss}); 3334 } 3335 }); 3336 return false;
3337 }); */ 3338 } 3339 } 3340 _jajax.prototype.wait = function() { 3341 var that = this; 3342 if(that.params.wait > 0) 3343 setTimeout(function() { 3344 that.load(); 3345 }, that.params.wait); 3346 else { 3347 that.load(); 3348 } 3349 } 3350 _jajax.prototype.load = function(url, callback) { 3351 if(this.isHolded()) return; 3352 3353 var pageSrc = url || this.params.pageSrc, 3354 pos = pageSrc.indexOf('#'), that = this, 3355 div = (this.link()&& !$.modal.isOpened()) ? this.link() : this.container(); 3356 if(pageSrc.length <= 0) return; 3357 3358 if(pos >= 0) pageSrc = pageSrc.substr(0, pos); 3359 if(this.params.reqSfx.length && pageSrc.length) { 3360 if(pageSrc.indexOf(this.params.reqSfx) < 0) { 3361 pageSrc += (pageSrc.indexOf('?') >= 0) ? '&' : '?'; 3362 pageSrc += this.params.reqSfx; 3363 } 3364 } 3365 this.curUrl = pageSrc; 3366 3367 if(pageSrc.length > 0) { 3368 Loading(div, {text:' ',opacity:0.8}).show(); 3369 this.isHolded(true); 3370 $.ajax({ 3371 url: pageSrc, 3372 method: 'GET', 3373 success: function(strHtml) { 3374 $(that.container()).html(strHtml); 3375 that.initObj(); 3376 $(document).trigger('bx.ready', that.container()); 3377 Loading(div).hide(); 3378 that.isHolded(false); 3379 if(typeof(callback)=='function') 3380 callback.call(that); 3381 }, 3382 dataType: 'html' 3383 }); 3384 } 3385 else { 3386 that.initObj(); 3387 } 3388 } 3389 _jajax.prototype.getData = function() { 3390 var child = this.container().getElementsByTagName('form')[0], 3391 data = null; 3392 if(child) data = $.sigma.getOpts(child, {}, 'ad'); 3393 return data; 3394 } 3395 3396 _jajax.prototype.init = function(url, bFull) { 3397 var i, n, child, val; 3398 val = parseInt(this.params.enabled); 3399 if(isNaN(val) || (val <= 0)) return; 3400 3401 if(!this.params.id.length) return; 3402 this.id = this.params.id; 3403 3404 this.forms = this.select('form', this.params.formClass); 3405 this.hrefs = this.select('a', this.params.linkClass); 3406 3407 return this; 3408 } 3409 _jajax.prototype.bind = function(back) 3410 { 3411 var that = this; 3412 back = back || false; 3413 $(this.params.findLink, this.container()).each(function() { 3414 if(this.tagName.toLowerCase()=='a') 3415 $(this).click(function() { that.load(this.href); return false; }); 3416 }); 3417 if(this.link() == null) { 3418 $(this.params.findPopup, this.container()).each(function() { 3419 if(this.tagName.toLowerCase()=='a') { 3420 var area = new _jajax(this, that.params, that); 3421 $(this).unbind('areaback areaload') 3422 .bind('areaback areaload', function(e, data) 3423 { 3424 $(that.target()).trigger(e.type, data); 3425 e.stopPropagation(); 3426 }); 3427 area.init(); 3428 } 3429 }); 3430 } 3431 $(this.params.findForm, this.container()).each(function() { 3432 if(this.tagName.toLowerCase()=='form') { 3433 $(this).bind('submit', function() { 3434 Loading(that.container(), {text:' ',opacity:0.8}).show(); 3435 $(this).ajaxSubmit({ 3436 success: function(html) { 3437 $(that.container()).html(html); 3438 that.initObj(true); 3439 $(document).trigger('bx.ready', that.container()); 3440 Loading(that.container()).hide(); 3441 }, 3442 beforeSerialize: function(form, options) { 3443 if(that.params.reqSfx.length) { 3444 if(options.url.indexOf(that.params.reqSfx) < 0) { 3445 options.url += (options.url.indexOf('?') >= 0) ? '&' : '?'; 3446 options.url += that.params.reqSfx; 3447 } 3448 } 3449 return true; 3450 }, 3451 dataType: 'html', 3452 timeout: 10000 3453 }); 3454 return false; 3455 }); 3456 } 3457 }); 3458 3459 this.params.maxHeight = parseInt(this.params.maxHeight); 3460 if(false && !isNaN(this.params.maxHeight) && this.params.maxHeight && !this.isPopup()) 3461 { 3462 var c = this.container(), h, 3463 hi = parseInt($.sigma.getRTStyle(c, 'height').match(/^([0-9]+)/)[1]); 3464 c.style.height = 'auto'; 3465 $(c).removeClass('have-scroll'); 3466 h = c.scrollHeight; 3467 if(c.scrollHeight > this.params.maxHeight) { 3468 $(c).animate({height:this.params.maxHeight+2}, 400, function() { 3469 $(c).addClass('have-scroll'); 3470 }); 3471 } 3472 else { 3473 $(c).animate({height:c.scrollHeight+2}, 400, function() { 3474 $(c).css({height:'auto'}).removeClass('have-scroll'); 3475 }); 3476 } 3477 } 3478 3479 var data = this.getData(); 3480 $(this.target()).trigger(back ? 'areaback' : 'areaload', data); 3481 if(this.isPopup()) { 3482 if(data && (parseInt(data.status)==this.params.closeStatus)) 3483 { 3484 $.modal.closePopup(); 3485 if(this.parent) this.parent.load(); 3486 } 3487 } 3488 } 3489 3490 _jajax.prototype.select = function(tag, cssName) { 3491 var i, child, cname, res = []; 3492 cssName = cssName || ''; 3493 child = this.node.getElementsByTagName(tag); 3494 for(i in child) 3495 if(child[i].nodeType == 1) { 3496 var found = true; 3497 if(cssName.length) { 3498 cname = ' ' + child[i].className + ' '; 3499 found = (cname.indexOf(' ' + cssName + ' ')>=0); 3500 } 3501 if(found) res[res.length] = child[i]; 3502 } 3503 return res; 3504 } 3505 _jajax.prototype.values = function (form, values) { 3506 if(form.elements) { 3507 for(var i = 0; i < form.elements.length; i++) { 3508 var el = form.elements[i]; 3509 if (el.disabled || !el.type) 3510 continue; 3511 3512 switch(el.type.toLowerCase()) { 3513 case 'text': 3514 case 'textarea': 3515 case 'password': 3516 case 'hidden': 3517 case 'select-one': 3518 //if(el.value.length) 3519 values[values.length] = {name : el.name, value : el.value}; 3520 break; 3521 case 'radio': 3522 case 'checkbox': 3523 if(el.checked) 3524 values[values.length] = {name : el.name, value : el.value}; 3525 break; 3526 case 'select-multiple': 3527 for (var j = 0; j < el.options.length; j++) 3528 { 3529 if (el.options[j].selected) 3530 values[values.length] = {name : el.name, value : el.options[j].value}; 3531 } 3532 break; 3533 default: 3534 break; 3535 } 3536 } 3537 } 3538 } 3539 _jajax.prototype.values2get = function (values) { 3540 var res = '', i; 3541 for(i = 0; i < values.length; i++) { 3542 if(res.length > 0) res += '&'; 3543 res += (values[i].name + '=' + encodeURIComponent(values[i].value)); 3544 } 3545 return res; 3546 } 3547 _jajax.prototype.values2post = function (values) { 3548 var post = []; 3549 var current = post; 3550 var i = 0; 3551 3552 while(i < values.length) { 3553 var p = values[i].name.indexOf('['); 3554 if(p == -1) { 3555 current[values[i].name] = values[i].value; 3556 current = post; 3557 i++; 3558 } 3559 else { 3560 var name = values[i].name.substring(0, p); 3561 var rest = values[i].name.substring(p+1); 3562 if(!current[name]) 3563 current[name] = []; 3564 3565 var pp = rest.indexOf(']'); 3566 if(pp == -1) { 3567 current = post; 3568 i++; 3569 } else if(pp == 0) { 3570 current = current[name]; 3571 values[i].name = '' + current.length; 3572 } else { 3573 current = current[name]; 3574 values[i].name = rest.substring(0, pp) + rest.substring(pp+1); 3575 } 3576 } 3577 } 3578 return post; 3579 }; 3580 _jajax.prototype.get = function(url, bFull) { 3581 var that = this; 3582 url = url || window.location.href; 3583 if(url.indexOf('?') >= 0) url += '&'; 3584 else url += '?'; 3585 url += 'USE_AJAX=Y&ajax_call_id='+this.ajax_call_id; 3586 3587 Loading(this.node).show(); 3588 this.send({ 3589 url: url, 3590 method: 'GET', 3591 callback: function(html, status) { 3592 Loading(that.node).hide(); 3593 if(status == 200) { 3594 $(that.node).html(html); 3595 $(document).trigger('bx.ready', that.node); 3596 } 3597 } 3598 }); 3599 3600 return false;
3601 } 3602 _jajax.prototype.post = function(form, bFull) { 3603 var values = [ 3604 {name: 'USE_AJAX', value: 'Y'}, 3605 {name: 'ajax_call_id', value: this.ajax_call_id} 3606 ], 3607 method = form.method || '', 3608 action = form.action || '', 3609 request, that = this; 3610 3611 this.values(form, values); 3612 request = null; 3613 method = method.toUpperCase() == 'POST' ? 'POST' : 'GET'; 3614 3615 if(action.length <= 0) 3616 action = window.location.href; 3617 if(method != 'POST') { 3618 request = this.values2get(values); 3619 if(request.length > 0) { 3620 if(action.indexOf('?') >= 0) action += '&'; 3621 else action += '?'; 3622 action += request; 3623 } 3624 request = null; 3625 } 3626 else 3627 request = this.values2get(values); 3628 3629 Loading(this.node).show(); 3630 this.send({ 3631 url: action, 3632 method: method, 3633 callback: function(html, status) { 3634 Loading(that.node).hide(); 3635 if(status == 200) { 3636 $(that.node).html(html); 3637 if(that.bBind) that.bind(); 3638 $(document).trigger('bx.ready', that.node); 3639 } 3640 }, 3641 data: request 3642 }); 3643 3644 return false; 3645 } 3646 _jajax.prototype.attach = function(elem, evType, fn) { 3647 if (elem.addEventListener) 3648 elem.addEventListener(evType, fn, false); 3649 else if (elem.attachEvent) 3650 //elem.attachEvent('on' + evType, fn) 3651 elem.attachEvent("on"+evType, function(e) { return fn.apply(elem, [e]) }) 3652 else 3653 elem['on' + evType] = fn 3654 } 3655 3656 _jajax.prototype.bind = function() { 3657 var i, elem, n, that = this; 3658 for(i in this.forms) { 3659 elem = this.forms[i]; 3660 this.attach(elem, 'submit', 3661 function(e) { e.preventDefault(); return that.submit(this); }); 3662 } 3663 for(i in this.hrefs) { 3664 elem = this.hrefs[i]; 3665 this.attach(elem, 'click', 3666 function(e) { return that.click(this); }); 3667 } 3668 this.bBind = true; 3669 } 3670 _jajax.prototype.submit = function(form) { 3671 return this.post(form); 3672 } 3673 _jajax.prototype.click = function(a) { 3674 3675 return false; 3676 } 3677 3678 _jajax.prototype.send = function(request) { 3679 var handle, that = this; 3680 request.data = request.data || null; 3681 3682 if (window.XMLHttpRequest) { 3683 try {handle = new XMLHttpRequest();} catch(e){} 3684 } 3685 else if (window.ActiveXObject) { 3686 try {handle = new ActiveXObject("Microsoft.XMLHTTP");} catch(e){} 3687 if (!handle) 3688 try {handle = new ActiveXObject("Msxml2.XMLHTTP");} catch (e){} 3689 } 3690 3691 if(!handle) return false; 3692 if(typeof(request.callback) == 'function') { 3693 handle.onreadystatechange = function() { 3694 if (handle.readyState==4) { 3695 request.callback.apply(that, [handle.responseText, handle.status]); 3696 } 3697 } 3698 } 3699 3700 //handle.setRequestHeader('Content-Type', 'text/html'); 3701 handle.open(request.method, request.url, true); 3702 if(request.method == 'POST') { 3703 handle.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 3704 } 3705 handle.send(request.data); 3706 } 3707 _jajax.prototype.prepare = function(data, prefix) { 3708 var res = ''; 3709 if (null != data) { 3710 for(var i in data) { 3711 if (res.length > 0) res += '&'; 3712 var name = encodeURIComponent(i); 3713 if(prefix) name = prefix + '[' + name + ']'; 3714 if(typeof data[i] == 'object') 3715 res += this.prepare(data[i], name) 3716 else 3717 res += name + '=' + encodeURIComponent(data[i]) 3718 } 3719 } 3720 return res; 3721 } 3722 3723 jAjax = function(node, params) { 3724 return _get_node(node, params); 3725 } 3726 3727 $.fn.jAjax = function(params) 3728 { 3729 var params = $.extend({}, { 3730 formClass: '', 3731 linkClass: 'ajax-link', 3732 wait: 10, 3733 pageSrc: '', 3734 popupCss: 'popup-layer', 3735 id: '' 3736 }, params); 3737 3738 return this.each(function() { 3739 var ajax = jAjax(this, params); 3740 ajax.bind(); 3741 3742 //$(this).data('area', area); 3743 $(this).bind('geturl', function(e, url) { 3744 url = url || ajax.curUrl; 3745 ajax.get(url); 3746 }); 3747 }); 3748 } 3749}(window, jQuery)); 3750 3751/* 3752 3753jAjax 3754jAjax = { 3755 3756 get: 3757} 3758 3759ФÑнкÑии JS Ð´Ð»Ñ ÐºÐ°Ñалога 3760/local/js/common.js 3761 - аÑÐºÑ (ready, ajax_call_id, to, popup) 3762 - подгÑÑзка ÑлеменÑов (авÑо, по нажаÑÐ¸Ñ Ð½Ð° кнопкÑ) 3763 - ÑелеÑон 3764 3765 3766var jPhone = function(id, params) { 3767 params = { 3768 'ru': 7, 3769 'by': 375, 3770 'kz': 7, 3771 'ua': 380 3772 } 3773} 3774jPhone { 3775 3776} 3777 3778 - даÑа 3779/local/js/list.js 3780/local/js/list.js
3781/local/js/shop.js 3782 3783оÑнована на role="element" 3784role="buy-button" 3785 3786var jElement = function(id) { 3787 3788} 3789var jCatalog = function(id) { 3790 3791} 3792 3793 37941. Ðокладка ÑоваÑов в коÑÐ·Ð¸Ð½Ñ 37952. ФилÑÑÑ ÑоваÑов 37963. ÐодгÑÑзка ÑоваÑов 3797 3798*/ 3799/* End */ 3800; 3801; /* Start:"a:4:{s:4:"full";s:39:"/local/js/basic/shop.js?166081911714586";s:6:"source";s:23:"/local/js/basic/shop.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3802;(function(w, $) { 3803 var jShop = function(node, params, msg) { 3804 this.node = node; 3805 this.params = params; 3806 this.msg = msg; 3807 this.resDiv = null; 3808 3809 this.items = []; 3810 this.itemsMap = []; 3811 3812 this.init(); 3813 } 3814 jShop.prototype.init = function() { 3815 var i, child, n, item; 3816 3817 child = jUtil.Find('item', 'data-role', null, this.node); 3818 n = child.length; 3819 for(i = 0; i < n; i++) { 3820 item = new jElement(child[i], this); 3821 item.init(); 3822 this.items[i] = item; 3823 this.itemsMap[item.getId()] = i; 3824 } 3825 this.resDiv = document.body.appendChild(document.createElement('div')); 3826 this.resDiv.style.display = 'none';
3827 this.resDiv.className = 'popup-shop-result'; 3828 } 3829 jShop.prototype.find = function(id) { 3830 var i = this.itemsMap[id]; 3831 return (typeof i == 'undefined') ? null : this.items[i]; 3832 } 3833 jShop.prototype.addToCompare = function(element) { 3834 var that = this, actionUrl = this.params.COMPARE_URL_TEMPLATE, 3835 tooltip = { content: '', 3836 theme: 'tooltipster-shadow', 3837 trigger: 'custom', 3838 triggerClose: { click: true, scroll: true }, 3839 contentAsHTML: true, 3840 side: 'bottom', 3841 interactive: true }; 3842 3843 actionUrl = actionUrl.replace('#ID#', element.getId()); 3844 Loading(element.node).show(); 3845 $.ajax({ 3846 url: actionUrl + (actionUrl.indexOf('?') >= 0 ? '&' : '?') + 'ajax_action=Y', 3847 method: 'POST', 3848 success: function(data) { 3849 Loading(element.node).hide(); 3850 element.isCompared(true); 3851 tooltip.content = that.msg.COMPARE_OK + '<br />' + 3852 '<a href="' + that.params.COMPARE_PATH + '">' + that.msg.COMPARE_REDIRECT + '</a>'; 3853 $(element.ctrl.compare).tooltipster(tooltip); 3854 $(element.ctrl.compare).tooltipster('open'); 3855 //jObserver.trigger('compareChange', data, element); 3856 BX.onCustomEvent(BX('compareList_small'), 'OnCompareChange'); 3857 }, 3858 error: function() { 3859 Loading(element.node).hide(); 3860 element.isCompared(false); 3861 tooltip.content = that.msg.COMPARE_ERROR; 3862 $(element.ctrl.compare).tooltipster(tooltip); 3863 $(element.ctrl.compare).tooltipster('open'); 3864 }, 3865 dataType: 'json', 3866 timeout: 10000 3867 }); 3868 } 3869 jShop.prototype.removeFromCompare = function(element) { 3870 var that = this, actionUrl = this.params.COMPARE_DELETE_URL_TEMPLATE; 3871 actionUrl = actionUrl.replace('#ID#', element.getId()); 3872 Loading(element.node).show(); 3873 $.ajax({ 3874 url: actionUrl + (actionUrl.indexOf('?') >= 0 ? '&' : '?') + 'ajax_action=Y', 3875 method: 'POST', 3876 success: function(data) { 3877 Loading(element.node).hide(); 3878 element.isCompared(false); 3879 //jObserver.trigger('compareChange', data, element); 3880 BX.onCustomEvent(BX('compareList_small'), 'OnCompareChange'); 3881 }, 3882 error: function() { 3883 element.isCompared(true); 3884 Loading(element.node).hide(); 3885 }, 3886 dataType: 'html', 3887 timeout: 10000 3888 }); 3889 } 3890 jShop.prototype.popupAfterAdd = function(element, data) { 3891 var ctrl = element.ctrl, 3892 image = ctrl.image, 3893 params = this.params; 3894 3895 if(this.popupDiv) { 3896 this.popupDiv.innerHTML = '<div class="main-header">'+this.msg.ADD_BASKET_OK+'</div>' + 3897 '<p>'+data.MESSAGE+'</p>' + 3898 '<div style="text-align: center;">' + 3899 '<p><a class="button-submit button-l" href="'+params.BASKET_URL+'" style="width: 100%;">'+this.msg.MESSAGE_BASKET_REDIRECT+'</a></p>'+ 3900 '<p><a class="button-submit button-r" href="#" onclick="$.modal.closePopup();return false;" style="width: 100%;">'+this.msg.MESSAGE_CLOSE_POPUP+'</a></p>'+ 3901 '</div>'; 3902 $.modal.openPopup(this.popupDiv, {width: 300}); 3903 } 3904 } 3905 jShop.prototype.actionBeforeAdd = function(element) { 3906 var ctrl = element.ctrl, 3907 button = ctrl.addcart, 3908 quantity = ctrl.quantity; 3909 //if(element.isInCart()) { 3910 // element.notify('Ð¢Ð¾Ð²Ð°Ñ Ñже добавлен в коÑзинÑ', 'error'); 3911 // return false; 3912 //} 3913 3914 if(quantity && !quantity.value) { 3915 element.notify('ÐведиÑе колиÑеÑÑво', 'error'); 3916 return false; 3917 } 3918 3919 if(quantity && element.minQuantity 3920 && (element.minQuantity.minNum > 0) 3921 && (parseInt(quantity.value) < element.minQuantity.minNum)) 3922 { 3923 element.notify((element.minQuantity.minNumMsg.length ? element.minQuantity.minNumMsg : 'ÐинималÑнÑй заказ: '+element.minQuantity.minNum+' ÑÑ.'), 'error'); 3924 return false; 3925 } 3926 3927 Loading(button).show(); 3928 element.flyImage(element) 3929 3930 return true; 3931 } 3932 jShop.prototype.actionAfterAdd = function(element, data) { 3933 var ctrl = element.ctrl, 3934 button = ctrl.addcart, 3935 quantity = ctrl.quantity; 3936 3937 element.isInCart((quantity ? quantity.value : 1)); 3938 element.notify('<a href="'+this.params.BASKET_URL+'">'+this.msg.MESSAGE_BASKET_REDIRECT+'</a>', 'ok'); 3939 3940 Loading(button).hide(); 3941 //this.popupAfterAdd(element, data); 3942 jObserver().trigger('cartChange', data, element); 3943 } 3944 jShop.prototype.actionAfterFailed = function(element) { 3945 var ctrl = element.ctrl, 3946 button = ctrl.addcart; 3947 element.notify('ÐÑибка пÑи добавлении. <br />ÐовÑоÑиÑе попÑÑкÑ', 'error'); 3948 Loading(button).hide(); 3949 } 3950 jShop.prototype.cartUrl = function(url) { 3951 if(url.indexOf('ajax_basket=Y') >= 0) 3952 return url; 3953 url += (url.indexOf('?') >= 0) ? '&' : '?'; 3954 url += 'ajax_basket=Y'; 3955 return url; 3956 } 3957 3958 jShop.prototype.addToCart = function(element) { 3959 var that = this, url, 3960 ctrl = element.ctrl, 3961 button = ctrl.addcart, 3962 quantity = ctrl.quantity, 3963 form = ctrl.form; 3964 3965 if(element.isCartForm()) {
3966 $(form).ajaxSubmit({ 3967 beforeSubmit: function(formData, jqForm, options) { 3968 var val; 3969 if(quantity) { 3970 val = parseInt(quantity.value); 3971 if(isNaN(val) || (val < 1)) 3972 quantity.value = 1; 3973 } 3974 3975 return that.actionBeforeAdd(element); 3976 }, 3977 success: function(data) { 3978 that.actionAfterAdd(element, data); 3979 }, 3980 error: function() { 3981 that.actionAfterFailed(element); 3982 }, 3983 beforeSerialize: function(form, options) { 3984 options.url = that.cartUrl(options.url) 3985 return true; 3986 }, 3987 dataType: 'json', 3988 timeout: 10000 3989 }); 3990 } 3991 else if(element.isCartBtn(element)) { 3992 if(!this.actionBeforeAdd(element)) 3993 return false; 3994 url = this.cartUrl(button.href); 3995 $.ajax({ 3996 url: url, 3997 method: 'GET', 3998 dataType: 'json', 3999 success: function(data) { 4000 that.actionAfterAdd(element, data); 4001 } 4002 }); 4003 } 4004 return false; 4005 } 4006 4007 var jElement = function(node, parent) { 4008 this.parent = parent; 4009 this.node = node; 4010 this.id = null; 4011 this.ctrl = { 4012 form: null, 4013 addcart: null, 4014 quantity: null, 4015 id: null, 4016 image: null, 4017 offers: null, 4018 compare: null 4019 } 4020 this.bInCart = false; 4021 this.minQuantity = null; 4022 4023 var node; 4024 node = jUtil.Find('item-form', 'data-role', null, this.node); 4025 if(node.length) this.ctrl.form = node[0]; 4026 node = jUtil.Find('item-2basket', 'data-role', null, this.node); 4027 if(node.length) this.ctrl.addcart = node[0]; 4028 node = jUtil.Find('item-quantity', 'data-role', null, this.node); 4029 if(node.length) this.ctrl.quantity = node[0]; 4030 node = jUtil.Find('item-id', 'data-role', null, this.node); 4031 if(node.length) this.ctrl.id = node[0]; 4032 node = jUtil.Find('item-image', 'data-role', null, this.node); 4033 if(node.length) this.ctrl.image = node[0]; 4034 node = jUtil.Find('item-compare', 'data-role', null, this.node); 4035 if(node.length) this.ctrl.compare = node[0]; 4036 } 4037 jElement.prototype.getId = function() { 4038 return this.id; 4039 } 4040 jElement.prototype.isCompared = function(value) { 4041 if(!this.ctrl.compare) 4042 return false; 4043 var node = this.ctrl.compare, css = 'item-compared', label; 4044 4045 if(typeof value == 'undefined') { 4046 if(node.tagName.toLowerCase()=='input') 4047 return !!node.checked; 4048 return (node.className.indexOf(css) >= 0); 4049 } 4050 4051 value = !!value; 4052 if(node.tagName.toLowerCase()=='input') { 4053 node.checked = value; 4054 $(node).trigger('refresh'); 4055 label = jUtil.Find(node.id, 'for', null, this.node); 4056 if(label.length) label = label[0]; 4057 } 4058 else 4059 label = node; 4060 4061 value ? $(label).addClass(css) : $(label).removeClass(css); 4062 if(label) label.innerHTML = (value ? this.parent.msg.COMPARED : this.parent.msg.BTN_COMPARE); 4063 } 4064 jElement.prototype.isInCart = function(value) { 4065 var ctrl = this.ctrl; 4066 if(typeof value == 'undefined') 4067 return this.bInCart; 4068 4069 if(ctrl.quantity) ctrl.quantity.value = 0; 4070 this.bInCart = !!value; 4071 4072 if(ctrl.addcart) { 4073 if(this.bInCart) { 4074 ctrl.addcart.value = this.parent.msg.MESSAGE_ADD_BASKET_OK + ' ('+value+')'; 4075 ctrl.addcart.className += ' submit-input-disabled'; 4076 this.node.className += ' item-incart'; 4077 } 4078 else { 4079 ctrl.addcart.value = this.parent.msg.MESSAGE_ADD_BASKET; 4080 ctrl.addcart.className = ctrl.addcart.className.replace(' submit-input-disabled', ''); 4081 this.node.className = this.node.className.replace(' item-incart', ''); 4082 } 4083 } 4084 } 4085 jElement.prototype.isCartForm = function() { 4086 return !!this.ctrl.form; 4087 } 4088 jElement.prototype.isCartBtn = function() { 4089 var button = this.ctrl.addcart; 4090 return !!(button && (button.tagName.toLowerCase()=='a')); 4091 } 4092 jElement.prototype.notify = function(message, type) { 4093 var ctrl = this.ctrl, 4094 button = ctrl.addcart; 4095 type = type || 'ok'; 4096 4097 $(button).tooltipster({ 4098 content: '<span class="tooltip-msg-'+type+'">'+message+'</span>', 4099 theme: 'tooltipster-shadow', 4100 trigger: 'custom', 4101 contentAsHTML: true, 4102 side: 'bottom', 4103 interactive: true, 4104 triggerClose: { 4105 click: true, 4106 scroll: true 4107 }, 4108 functionAfter: function(instance, helper) { 4109 instance.destroy(); 4110 } 4111 }); 4112 4113 $(button).tooltipster('open'); 4114 } 4115 jElement.prototype.init = function() { 4116 var node, that = this, params = that.parent.params; 4117 4118 this.id = parseInt(this.node.getAttribute('data-id')); 4119 if(!this.id && this.ctrl.id) 4120 this.id = parseInt(this.ctrl.id.value); 4121 4122 if(this.isCartForm(this)) { 4123 this.ctrl.form.onsubmit = function() { 4124 return that.parent.addToCart(that); 4125 } 4126 } 4127 else if(this.isCartBtn(this)) { 4128 this.ctrl.addcart.onclick = function() { 4129 return that.parent.addToCart(that); 4130 } 4131 } 4132 this.initMinQuantity(); 4133 4134 compare = this.ctrl.compare; 4135 if(params.DISPLAY_COMPARE && compare) 4136 { 4137 if(compare.tagName.toLowerCase()=='a') { 4138 4139 } 4140 else if(compare.tagName.toLowerCase()=='input') { 4141 compare.onchange = function() { 4142 if(this.checked) 4143 that.parent.addToCompare(that); 4144 else 4145 that.parent.removeFromCompare(that); 4146 } 4147 } 4148 } 4149 } 4150 jElement.prototype.initMinQuantity = function() { 4151 var node = this.ctrl.quantity, data; 4152 if(!node) return; 4153 data = $.sigma.getOpts(node, {minNum: 0, minNumMsg: ''}); 4154 if(data.minNum > 0) { 4155 data.minNum = parseInt(data.minNum); 4156 this.minQuantity = data; 4157 $(node).tooltipster({ 4158 content: '<span class="tooltip-msg-error">'+(data.minNumMsg.length ? data.minNumMsg : 'ÐинималÑнÑй заказ: '+data.minNum+' ÑÑ.')+'</span>', 4159 theme: 'tooltipster-shadow', 4160 contentAsHTML: true, 4161 side: 'bottom', 4162 trigger: 'custom', 4163 triggerClose: { click: true, scroll: true } 4164 }); 4165 node.onclick = function() { 4166 if(this.value < data.minNum) 4167 $(this).tooltipster('open'); 4168 else 4169 $(this).tooltipster('close'); 4170 } 4171 node.onchange = function() { 4172 if(this.value < data.minNum) 4173 $(this).tooltipster('open'); 4174 else 4175 $(this).tooltipster('close'); 4176 } 4177 } 4178 } 4179 jElement.prototype.flyImage = function() { 4180 var image = this.ctrl.image, p, fe, 4181 cart = document.getElementById('cart'); 4182 if(image && cart) { 4183 p = $(image).offset(); 4184 fe = $('<div>').css({height: image.offsetHeight, width: image.offsetWidth}) 4185 .appendTo(document.body).css({ 4186 position: "absolute", 4187 left: p.left, 4188 top: p.top, 4189 zIndex: 9999 4190 }).animate({ 4191 width: cart.offsetWidth, height: cart.offsetHeight, 4192 left: $(cart).offset().left, 4193 top: $(cart).offset().top, opacity: 0.5 4194 }, 400, 'linear', function() { 4195 fe.remove(); 4196 }); 4197 } 4198 } 4199 window.jShop = jShop; 4200 4201}(window, jQuery)); 4202 4203 4204;(function(w) { 4205 var eventNodes = []; 4206 4207 w.jObserver = function(node) { 4208 node = node || null; 4209 var n = eventNodes.length, i; 4210 for(i = 0; i < n; i++) 4211 if(node == eventNodes[i].node) 4212 return eventNodes[i]; 4213 4214 eventNodes[n] = new jEvents(node); 4215 return eventNodes[n]; 4216 } 4217 4218 var jEvents = function(node) { 4219 this.node = node; 4220 this.listeners = []; 4221 } 4222 jEvents.prototype.bind = function(type, fnHandler, ctx, pri) { 4223 var i, n, priority, fi = -1, item; 4224 if(!type) return; 4225 if(typeof type != 'string') return; 4226 if(typeof fnHandler != 'function') 4227 return; 4228 4229 n = this.listeners.length; 4230 priority = pri || 0; 4231 for(i = 0; i < n; i++) 4232 if(this.listeners[i].priority > priority) 4233 fi = i; 4234 4235 item = { 4236 type: type, 4237 fnHandler: fnHandler, 4238 context: ctx || null, 4239 priority: priority 4240 }; 4241 if(fi < 0) 4242 this.listeners[n] = item; 4243 else 4244 this.listeners.splice(fi, 0, item); 4245 } 4246 jEvents.prototype.unbind = function(type, fnHandler) { 4247 var i, n = this.listeners.length, found; 4248 if(!type) return; 4249 if(typeof type != 'string') return; 4250 4251 for(i = n - 1; i >= 0 ; i--) { 4252 found = false;
4253 if(type == this.listeners[i].type) { 4254 if(typeof fnHandler != 'function') 4255 found = true; 4256 else if(fnHandler == this.listeners[i].fnHandler) 4257 found = true; 4258 } 4259 if(found) 4260 this.listeners.splice(i, 1); 4261 } 4262 } 4263 jEvents.prototype.trigger = function(type, data, obj) { 4264 var i, n = this.listeners.length, item; 4265 if(!type) return; 4266 if(typeof type != 'string') return; 4267 data = data || {}; 4268 obj = obj || null; 4269 4270 for(i = 0; i < n; i++) 4271 if(type == this.listeners[i].type) { 4272 item = this.listeners[i]; 4273 item.fnHandler.apply(item.context, [ 4274 new jEvent(item.type, data, obj) 4275 ]) 4276 } 4277 } 4278 var jEvent = function(type, data, target) { 4279 this.type = type; 4280 this.data = data || {}; 4281 this.target = target || null; 4282 } 4283 4284 jEvent.prototype.getType = function() { return this.type; } 4285 jEvent.prototype.getData = function() { return this.data; } 4286 jEvent.prototype.getTarget = function() { return this.target; } 4287}(window)); 4288 4289/* 4290 4291jAjax 4292jAjax = { 4293 4294 get: 4295} 4296 4297ФÑнкÑии JS Ð´Ð»Ñ ÐºÐ°Ñалога 4298/local/js/common.js 4299 - аÑÐºÑ (ready, ajax_call_id, to, popup) 4300 - подгÑÑзка ÑлеменÑов (авÑо, по нажаÑÐ¸Ñ Ð½Ð° кнопкÑ) 4301 - ÑелеÑон 4302 4303 4304var jPhone = function(id, params) { 4305 params = { 4306 'ru': 7, 4307 'by': 375, 4308 'kz': 7, 4309 'ua': 380 4310 } 4311} 4312jPhone { 4313 4314} 4315 4316 - даÑа 4317/local/js/list.js 4318/local/js/list.js 4319/local/js/shop.js 4320 4321оÑнована на role="element" 4322role="buy-button" 4323 4324var jElement = function(id) { 4325 4326} 4327var jCatalog = function(id) { 4328 4329} 4330 4331 43321. Ðокладка ÑоваÑов в коÑÐ·Ð¸Ð½Ñ 43332. ФилÑÑÑ ÑоваÑов 43343. ÐодгÑÑзка ÑоваÑов 4335 4336*/ 4337/* End */ 4338; 4339; /* Start:"a:4:{s:4:"full";s:38:"/local/js/basic/list.js?15230266883928";s:6:"source";s:23:"/local/js/basic/list.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4340;(function(w, $) { 4341 var jList = function(node, params) { 4342 this.node = node; 4343 this.parent = null; 4344 this.params = params; 4345 this.nextBtn = null; 4346 this.holded = false; 4347 4348 this.init(); 4349 } 4350 jList.prototype.init = function() { 4351 var node, _load, p, r, that = this, d = 40, 4352 lazy = this.params.lazyLoad || false; 4353 4354 node = jUtil.Find('item', 'data-role', null, this.node); 4355 if(!node.length) return; 4356 this.parent = node[0].parentNode; 4357 4358 $(this.node).bind('load', function(e, d) { 4359 that.load(d, true); 4360 }) 4361 4362 node = jUtil.Find('next-page', 'data-role', null, this.node); 4363 if(!node.length) return; 4364 this.nextBtn = node[0]; 4365 4366 _load = function(e) { 4367 if(!that.nextBtn) { 4368 $(window).unbind('scroll', _load); 4369 return; 4370 } 4371 if(that.holded) return; 4372 4373 p = $.sigma.getPosition(that.node); 4374 r = $.sigma.getClientSize(); 4375 if(r.height+$.sigma.getBodyScrollTop()<p.top+p.height-d) 4376 return; 4377 4378 that.load(); 4379 }; 4380 4381 if(lazy) { 4382 $(window).unbind('scroll', _load).bind('scroll', _load); 4383 _load.call(); 4384 } 4385 4386 this.nextBtn.onclick = function(e) { 4387 that.load(); 4388 return false; 4389 } 4390 } 4391 jList.prototype.onload = function(html, bNew, fn) { 4392 var div, i, node; 4393 div = document.body.appendChild(document.createElement('div')) 4394 div.style.display = 'none'; 4395 div.innerHTML = html; 4396 $(document).trigger('bx.ready', div); 4397 4398 node = jUtil.Find('next-page', 'data-role', null, div); 4399 if(node.length) { 4400 this.nextBtn.style.display = ''; 4401 this.nextBtn.getElementsByTagName('a')[0].href = 4402 node[0].getElementsByTagName('a')[0].href; 4403 } 4404 else if(this.nextBtn) { 4405 this.nextBtn.style.display = 'none'; 4406 //this.nextBtn.parentNode.removeChild(this.nextBtn); 4407 //this.nextBtn = null; 4408 } 4409 4410 if(bNew) { 4411 node = jUtil.Find('item', 'data-role', null, this.parent); 4412 for(i = 0; i < node.length; i++) 4413 node[i].parentNode.removeChild(node[i]); 4414 } 4415 4416 this.preloadImages(div, function() { 4417 node = jUtil.Find('item', 'data-role', null, div); 4418 for(i = 0; i < node.length; i++) { 4419 this.parent.appendChild( 4420 node[i].parentNode.removeChild(node[i]) 4421 ); 4422 } 4423 document.body.removeChild(div); 4424 $(document).trigger('bx.load', this.node); 4425 4426 if(typeof fn == 'function') 4427 fn.apply(this); 4428 }); 4429 } 4430 jList.prototype.preloadImages = function(div, callback) { 4431 var child = div.getElementsByTagName('img'), 4432 i, n = child.length, img, nLoaded = 0, that = this, 4433 _onload = function() { 4434 nLoaded++; 4435 if(nLoaded == n) 4436 if(typeof callback == 'function') 4437 callback.apply(that); 4438 }; 4439 if(n == 0) { 4440 if(typeof callback == 'function') 4441 callback.apply(this); 4442 return; 4443 } 4444 else { 4445 for(i = 0; i < n; i++) { 4446 img = new Image(); 4447 img.onload = _onload; 4448 img.onerror = _onload; 4449 img.src = child[i].src; 4450 } 4451 } 4452 } 4453 jList.prototype.load = function(url, bNew) { 4454 var that = this, ly; 4455 //if(!this.nextBtn) return; 4456 if(this.holded) return; 4457 bNew = bNew || false; 4458 url = url || this.nextBtn.getElementsByTagName('a')[0].href; 4459 ly = bNew ? this.node : this.nextBtn; 4460 4461 this.holded = true; 4462 url = url+((url.indexOf('?')<0)?'?':'&')+'USE_AJAX=Y'; 4463 Loading(ly).show(); 4464 4465 $.ajax({ 4466 url:url, 4467 type: "GET", 4468 success: function(html) { 4469 that.onload(html, bNew, function() { 4470 Loading(ly).hide(); 4471 }); 4472 that.holded = false;
4473 } 4474 }) 4475 } 4476 4477 window.jList = jList; 4478}(window, jQuery)); 4479 4480/* 4481 4482jAjax 4483jAjax = { 4484 4485 get: 4486} 4487 4488Ôóíêöèè JS äëÿ êàòàëîãà 4489/local/js/common.js 4490 - àÿêñ (ready, ajax_call_id, to, popup) 4491 - ïîäãðóçêà ýëåìåíòîâ (àâòî, ïî íàæàòèþ íà êíîïêó) 4492 - òåëåôîí 4493 4494 4495var jPhone = function(id, params) { 4496 params = { 4497 'ru': 7, 4498 'by': 375, 4499 'kz': 7, 4500 'ua': 380 4501 } 4502} 4503jPhone { 4504 4505} 4506 4507 - äàòà 4508/local/js/list.js 4509/local/js/list.js 4510/local/js/shop.js 4511 4512îñíîâàíà íà role="element" 4513role="buy-button" 4514 4515var jElement = function(id) { 4516 4517} 4518var jCatalog = function(id) { 4519 4520} 4521 4522 45231. Ïîêëàäêà òîâàðîâ â êîðçèíó 45242. Ôèëüòð òîâàðîâ 45253. Ïîäãðóçêà òîâàðîâ 4526 4527*/ 4528/* End */ 4529; 4530; /* Start:"a:4:{s:4:"full";s:38:"/local/js/basic/util.js?15230266883315";s:6:"source";s:23:"/local/js/basic/util.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4531;(function(w, $) { 4532 w.jUtil = { 4533 Find: function(search, attr, tag, context) { 4534 var i, j, elems, cls, find, 4535 tilda = false, dot = false, res = []; 4536 if(!context) context = document.body; 4537 if(search[0]=='~') { 4538 tilda = true; 4539 search = search.substr(1); 4540 } 4541 else if(search[0]=='.') { 4542 dot = true; 4543 search = search.substr(1); 4544 attr = 'class'; 4545 } 4546 if(!attr) attr = 'id'; 4547 if(attr == 'id') 4548 return [document.getElementById(search)]; 4549 else { 4550 if(tilda || !context.querySelector) { 4551 tag = tag || '*'; 4552 elems = context.getElementsByTagName(tag); 4553 for(i = 0; i < elems.length; i++) { 4554 if(find = elems[i].getAttribute(attr)) { 4555 if(dot) { 4556 cls = find ? find.split(' ') : []; 4557 for(j = 0; j < cls.length; j++) 4558 if(cls[j] == search) 4559 res[res.length] = elems[i]; 4560 } 4561 else if(tilda) { 4562 if(find.indexOf(search)>=0) 4563 res[res.length] = elems[i]; 4564 } 4565 else if(find == search) 4566 res[res.length] = elems[i]; 4567 } 4568 } 4569 return res; 4570 } 4571 else { 4572 find = (tag ? tag : '*')+'['+attr+'="'+search+'"]'; 4573 elems = context.querySelectorAll(find); 4574 for(i = 0; i < elems.length; i++) 4575 res[res.length] = elems[i]; 4576 } 4577 } 4578 return res; 4579 }, 4580 getOpts: function(node, params, pfx) { 4581 var a = node.attributes, p; 4582 if(!params) params = {}; 4583 if(pfx) pfx = 'data-'+pfx.toLowerCase()+'-'; 4584 else pfx = 'data-'; 4585 for (var i = 0; i < a.length; i++) { 4586 if(a[i].name.indexOf(pfx)==0) { 4587 p = a[i].name.substr(pfx.length).toLowerCase(); 4588 p = p.replace(/\-([a-z])/g, 4589 function(s) { return s[1].toUpperCase(); } 4590 ); 4591 params[p] = a[i].value; 4592 } 4593 } 4594 4595 return params; 4596 }, 4597 getChar: function(e) { 4598 e = e || event; 4599 if (e.which == null) { 4600 if (e.keyCode < 32) return null; 4601 return String.fromCharCode(e.keyCode); 4602 } 4603 if (e.which != 0 && e.charCode != 0) { 4604 if (e.which < 32) return null; 4605 return String.fromCharCode(e.which); 4606 } 4607 return null; 4608 }, 4609 inArray: function(arr, val, f) { 4610 var res; 4611 if(typeof f !== 'string') f = false; 4612 for(var i in arr) { 4613 res = false; 4614 if(f !== false) res = (arr[i][f] == val); 4615 else res = (arr[i] == val); 4616 if(res) return i; 4617 } 4618 return -1; 4619 }, 4620 attach: function(elem, evType, fn) { 4621 if (elem.addEventListener) 4622 elem.addEventListener(evType, fn, false); 4623 else if (elem.attachEvent) 4624 //elem.attachEvent('on' + evType, fn) 4625 elem.attachEvent("on"+evType, function(e) { return fn.apply(elem, [e]) }) 4626 else 4627 elem['on' + evType] = fn 4628 } 4629 }; 4630}(window, jQuery)); 4631 4632/* 4633 4634jAjax 4635jAjax = { 4636 4637 get: 4638} 4639 4640ФÑнкÑии JS Ð´Ð»Ñ ÐºÐ°Ñалога 4641/local/js/common.js 4642 - аÑÐºÑ (ready, ajax_call_id, to, popup) 4643 - подгÑÑзка ÑлеменÑов (авÑо, по нажаÑÐ¸Ñ Ð½Ð° кнопкÑ) 4644 - ÑелеÑон 4645 4646 4647var jPhone = function(id, params) { 4648 params = { 4649 'ru': 7, 4650 'by': 375, 4651 'kz': 7, 4652 'ua': 380 4653 } 4654} 4655jPhone { 4656 4657} 4658 4659 - даÑа 4660/local/js/list.js 4661/local/js/list.js 4662/local/js/shop.js 4663 4664оÑнована на role="element" 4665role="buy-button" 4666 4667var jElement = function(id) { 4668 4669} 4670var jCatalog = function(id) { 4671 4672} 4673 4674 46751. Ðокладка ÑоваÑов в коÑÐ·Ð¸Ð½Ñ 46762. ФилÑÑÑ ÑоваÑов 46773. ÐодгÑÑзка ÑоваÑов 4678 4679*/ 4680/* End */ 4681; 4682; /* Start:"a:4:{s:4:"full";s:41:"/local/js/basic/toogled.js?15710474133590";s:6:"source";s:26:"/local/js/basic/toogled.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4683/* 4684params { 4685 tg-class-name: 'toogled' 4686 tg-target-id: 'targetId' 4687 tg-off-body: true 4688 tg-off-add: true 4689 tg-off-label: 'ÐакÑÑÑÑ' 4690 tg-flag-label: 'ÐакÑÑÑÑ' 4691} 4692*/ 4693;(function($) { 4694 function Toogler(node, params) { 4695 this.node = node; 4696 this.params = $.sigma.getOpts(node, params, 'tg'); 4697 this.closeBtn = null; 4698 this.targetObj = null; 4699 this.bFlag = this.params.flag; 4700 this.loader = null; 4701 4702 this._bodyClose = null; 4703 this._t_clicked = false;
4704 } 4705 Toogler.prototype.init = function() { 4706 var p = this.params, item, that = this; 4707 4708 if(!p.targetId) return; 4709 this.targetObj = document.getElementById(p.targetId); 4710 if(!this.targetObj) return; 4711 4712 if(this.bFlag) this.turnOn(); 4713 4714 this.node.onclick = function(e) { 4715 that.toogle(); 4716 (e || event).stopPropagation(); 4717 return false; 4718 } 4719 if(p.offAdd) { 4720 item = document.createElement('i'); 4721 item.className = 'toogled-close'; 4722 item.innerHTML = p.offLabel; 4723 this.closeBtn = this.targetObj.appendChild(item); 4724 this.closeBtn.onclick = function() { 4725 that.turnOff(); 4726 } 4727 } 4728 4729 if(p.offBody) { 4730 this._bodyClose = function(e) { 4731 if(this == that.targetObj) { 4732 that._t_clicked = true; 4733 } 4734 else { 4735 if(!that._t_clicked) 4736 that.turnOff(); 4737 that._t_clicked = false; 4738 } 4739 }; 4740 } 4741 } 4742 Toogler.prototype.checkLoad = function() { 4743 var url, pos; 4744 if(this.loader !== null) return; 4745 this.loader = false; 4746 if(this.node.tagName.toLowerCase() == 'a') { 4747 url = this.node.getAttribute('href'); 4748 pos = url.indexOf('#'); 4749 if(pos > 0) url = url.substr(0, pos); 4750 else if(pos == 0) url = ''; 4751 4752 if(url.length > 0) { 4753 this.loader = this.targetObj.appendChild( 4754 document.createElement('div')); 4755 this.loader.className = 'ajax-area'; 4756 this.loader.setAttribute('data-ap-page-src', url); 4757 this.loader.setAttribute('data-ap-find-link', 'a.ajax-link'); 4758 this.loader.setAttribute('data-ap-find-popup', ''); 4759 4760 $(document).trigger('bx.ready', this.targetObj); 4761 } 4762 } 4763 } 4764 Toogler.prototype.turnOn = function() { 4765 var p = this.params, that = this; 4766 if(this.bFlag) return; 4767 this.node.className += ' '+p.className; 4768 this.targetObj.className += ' '+p.className; 4769 4770 this.bFlag = true; 4771 this.checkLoad(); 4772 if(this._bodyClose) { 4773 $(this.targetObj).bind('click', this._bodyClose); 4774 $(document.body).bind('click', this._bodyClose); 4775 } 4776 } 4777 Toogler.prototype.turnOff = function() { 4778 var p = this.params, that = this; 4779 if(!this.bFlag) return; 4780 this.node.className = this.node.className.replace(' '+p.className, ''); 4781 this.targetObj.className = this.targetObj.className.replace(' '+p.className, ''); 4782 4783 this.bFlag = false; 4784 if(this._bodyClose) { 4785 $(this.targetObj).bind('click', this._bodyClose); 4786 $(document.body).unbind('click', this._bodyClose); 4787 } 4788 } 4789 Toogler.prototype.toogle = function() { 4790 this.bFlag ? this.turnOff() : this.turnOn(); 4791 } 4792 4793 $.fn.Toogler = function(params) 4794 { 4795 var params = $.extend({}, { 4796 className: 'toogled', // Ð´Ð»Ñ ÐºÐ¾Ð½ÑейнеÑов Ñипа DIV - URL Ð´Ð»Ñ Ð·Ð°Ð³ÑÑзки 4797 targetId: '', // задеÑжка пеÑед загÑÑзкой 4798 offBody: true, 4799 offAdd: true, 4800 offLabel: 'ÐакÑÑÑÑ', 4801 flag: false 4802 }, params); 4803 4804 return this.each(function() { 4805 var toogler = new Toogler(this, params); 4806 toogler.init(); 4807 $(this).bind('toogle', function(e) { 4808 toogler.toogle(); 4809 }); 4810 $(this).bind('off', function(e) { 4811 toogler.turnOff(); 4812 }); 4813 $(this).bind('on', function(e) { 4814 toogler.turnOn(); 4815 }); 4816 }); 4817 } 4818 4819 $(document).ready(function() { 4820 $('.toogles').Toogler(); 4821 }); 4822})(jQuery); 4823 4824 4825 4826/* End */ 4827; 4828; /* Start:"a:4:{s:4:"full";s:40:"/local/js/basic/alignh.js?15230266882836";s:6:"source";s:25:"/local/js/basic/alignh.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4829;(function($) { 4830 // ah-role="root" 4831 var alignHeight = function(node) { 4832 this.node = node; 4833 this.krole = null; 4834 this.steps = []; 4835 this.elements = {}; 4836 4837 this.init(); 4838 } 4839 4840 alignHeight.prototype.init = function() { 4841 var i; 4842 this.map(this.node, function(parent, current) { 4843 var role = current.getAttribute('data-ah-role'), n; 4844 if(role && (role != 'block')) { 4845 if(typeof(this.elements[role]) == 'undefined') 4846 this.elements[role] = []; 4847 n = this.elements[role].length; 4848 if((n == 1) && !this.krole) 4849 if(this.elements[role][0].parentNode == current.parentNode) 4850 this.krole = role; 4851 this.elements[role][n] = current; 4852 } 4853 }); 4854 4855 if(!this.krole) 4856 for(i in this.elements) { 4857 this.krole = i; 4858 break; 4859 } 4860 } 4861 4862 alignHeight.prototype.map = function(parent, callback) { 4863 var i, child = parent.childNodes; 4864 for(i = 0; i < child.length; i++) 4865 if(child[i].nodeType == 1) { 4866 callback.apply(this, [parent, child[i]]);
4867 this.map(child[i], callback); 4868 } 4869 } 4870 alignHeight.prototype.reset = function() { 4871 var items = this.elements[this.krole], 4872 i, step = -1, n = items.length; 4873 4874 this.steps = []; 4875 for(i = 0; i < n; i++) 4876 { 4877 items[i].style.display = 'block'; 4878 items[i].style.height = '60px'; 4879 items[i].className = items[i].className.replace(' first-child', ''); 4880 4881 if((i == 0) || 4882 (items[i-1].offsetTop<items[i].offsetTop)) { 4883 //items[i].style.marginLeft = 0; 4884 items[i].className += ' first-child'; 4885 if(i > 0) { 4886 step = this.steps.length; 4887 this.steps[step] = i; 4888 } 4889 } 4890 4891 } 4892 if((step<0) || (this.steps[step] != n)) 4893 this.steps[step+1] = n; 4894 } 4895 4896 alignHeight.prototype.setHeight = function(only) { 4897 var items, item, step, maxHeight, iFrom, r, j, k, pos; 4898 only = only || false; 4899 for(r in this.elements) 4900 { 4901 items = this.elements[r]; 4902 if(only && (only != r)) continue; 4903 iFrom = 0; 4904 for(j = 0; j < this.steps.length; j++) 4905 { 4906 step = this.steps[j]; 4907 maxHeight = 0; 4908 for(k = iFrom; k < step; k++) 4909 { 4910 item = items[k]; 4911 item.style.height = 'auto'; 4912 if(item.offsetHeight > maxHeight) 4913 maxHeight = item.offsetHeight; 4914 } 4915 if(step - iFrom > 1) 4916 for(k = iFrom; k < step; k++) { 4917 item = items[k]; 4918 item.style.height = maxHeight+'px'; 4919 } 4920 iFrom = step; 4921 } 4922 } 4923 } 4924 4925 alignHeight.prototype.align = function() 4926 { 4927 if(this.krole) { 4928 this.reset(); 4929 this.setHeight(); 4930 this.setHeight(this.krole); 4931 } 4932 } 4933 4934 $.fn.Align = function() 4935 { 4936 return this.each(function() { 4937 var object = new alignHeight(this); 4938 $(this).bind('align', function() { 4939 object.align(); 4940 }); 4941 }); 4942 } 4943 4944 4945})(jQuery); 4946 4947$(function() { 4948 $('.align-items').Align(); 4949 $(window).resize(function () { $('.align-items').trigger('align'); }); 4950}); 4951 4952$(window).bind('load', function(e) { 4953 $('.align-items').trigger('align'); 4954}); 4955/* End */ 4956; 4957; /* Start:"a:4:{s:4:"full";s:46:"/local/js/basic/jquery.tabs2.js?15710474132537";s:6:"source";s:31:"/local/js/basic/jquery.tabs2.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4958;(function($) { 4959 4960 var TabView = function(node) { 4961 this.node = node; 4962 this.tabs = []; 4963 4964 this.init(); 4965 } 4966 4967 TabView.prototype.init = function() { 4968 var i, child, related = null, idRelated, 4969 find = new $.sigma.finder(this.node); 4970 4971 child = find('button', 'data-role'); 4972 for(i = 0; i < child.length; i++) { 4973 idRelated = ''; 4974 if(child[i].tagName.toLowerCase() == 'a') 4975 idRelated = child[i].href.substr(1); 4976 else 4977 idRelated = child[i].getAttribute('rel'); 4978 4979 if(idRelated && idRelated.length) 4980 related = document.getElementById(idRelated); 4981 4982 if(related && (this.findTab(idRelated)<0)) 4983 this.add(child[i], related, idRelated); 4984 else 4985 child[i].style.display = 'none'; 4986 } 4987 4988 i = this.getActiveTab(); 4989 if(i < 0) i = 0; 4990 this.openTab(i); 4991 } 4992 4993 TabView.prototype.findTab = function(code) 4994 { 4995 for(var i = 0; i < this.tabs.length; i++) 4996 if(this.tabs[i].code == code) 4997 return i; 4998 return -1; 4999 } 5000 5001 TabView.prototype.add = function(button, related, code) 5002 { 5003 var that = this, index; 5004 5005 if(button && related) { 5006 index = this.tabs.length; 5007 button.onclick = function() { 5008 that.openTab(index); 5009 return false; 5010 } 5011 this.tabs[index] = { 5012 button: button, 5013 related: related, 5014 code: code 5015 } 5016 // related.style.display = 'none'; 5017 } 5018 } 5019 5020 TabView.prototype.getActiveTab = function() { 5021 var value, pos, index = -1, i; 5022 5023 value = location.hash || ''; 5024 pos = value.indexOf('tab-'); 5025 if(pos >= 0) { 5026 value = value.substr(pos + 4); 5027 index = this.findTab(value); 5028 } 5029 else { 5030 for(i = 0; i < this.tabs.length; i++) 5031 if(this.tabs[i].button.className.indexOf('btn-active') >= 0) 5032 index = i; 5033 } 5034 5035 return index; 5036 } 5037 5038 TabView.prototype.openTab = function(n) { 5039 var i, item; 5040 if(n >= this.tabs.length) 5041 return; 5042 5043 for(i = 0; i < this.tabs.length; i++) { 5044 item = this.tabs[i]; 5045 if(n == i) { 5046 $.sigma.addClass(item.button, 'btn-active'); 5047 $.sigma.addClass(item.related, 'tab-active'); 5048 //item.related.style.display = ''; 5049 } 5050 else { 5051 $.sigma.delClass(item.button, 'btn-active'); 5052 $.sigma.delClass(item.related, 'tab-active'); 5053 //item.related.style.display = 'none'; 5054 } 5055 } 5056 } 5057 5058 $.fn.TabView = function() 5059 { 5060 return this.each(function() { 5061 var obj = new TabView(this); 5062 $(this).bind('open', function(e, n) { 5063 n = (typeof n == 'undefined') ? -1 : parseInt(n); 5064 if(isNaN(n)) n = -1; 5065 obj.openTab(n); 5066 }); 5067 }); 5068 } 5069 5070})(jQuery); 5071/* End */ 5072; 5073; /* Start:"a:4:{s:4:"full";s:32:"/local/js/init.js?15941153725794";s:6:"source";s:17:"/local/js/init.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5074$(function() { 5075 $('.align-items').Align(); 5076 $(window).resize(function () { $('.align-items').trigger('align'); }); 5077 5078 $(document).trigger('bx.ready', null); 5079 5080 $(".pushy-btn").pushy(); 5081 5082}); 5083 5084$(window).bind('load', function(e, parent) { 5085 $(document).trigger('bx.load', null); 5086}); 5087 5088$(document).bind('bx.load', function(e, parent) { 5089 var parent = parent || document.body, 5090 jparent = $(parent); 5091 $('.align-items', jparent).trigger('align'); 5092}); 5093 5094$(document).bind('bx.ready', function(e, parent) { 5095 var parent = parent || document.body, 5096 jparent = $(parent); 5097 5098 $('.fancy', jparent).fancybox({ 5099 prevEffect : 'none', 5100 nextEffect : 'none', 5101 closeBtn : true, 5102 arrows : true, 5103 nextClick : true, 5104 overlayOpacity: 0.3, 5105 padding: 0, 5106 helpers : { 5107 media : {}, 5108 thumbs : {width : 50,height : 50}, 5109 title: null, 5110 overlay: {css: {background : 'rgba(0, 0, 0, 0.3)'}} 5111 } 5112 }); 5113 5114 $(".input-phone", jparent).mask("+7 (999) 999-99-99"); 5115 $(".long-text", jparent).sigmaHidelong(); 5116 $(".ajax-area", jparent).ajaxArea(); 5117 $(".tabs-control", jparent).tabs(); 5118 $(".tabs-view", jparent).TabView(); 5119 5120 $('.form-table select', jparent).styler(); 5121/*
5122 $('input[type="checkbox"],select', jparent).styler({onFormStyled: function() { 5123 $("input.input-color").each(function() { 5124 var value = this.getAttribute('data-bgcolor'); 5125 if(value && value.length) { 5126 if(value.match( /^[a-z0-9]{6}$/i )) 5127 value = '#' + value; 5128 this.parentNode.style.backgroundColor = value; 5129 } 5130 }); 5131 }}); 5132*/ 5133 $(".lazy-load", jparent).lazyload({effect: "fadeIn", effectspeed: 800}); 5134 $(".kerz-list", jparent).kerz(); 5135 $(".tooltip", jparent).tooltipster({ 5136 theme: 'tooltipster-shadow', 5137 contentAsHTML: true, 5138 side: 'bottom', 5139 triggerClose: { 5140 click: true, 5141 scroll: true 5142 }, 5143 maxWidth: 200 5144 }); 5145 5146 $('.mobile-block', jparent).each(function() { 5147 var that = $(this), 5148 title = that.find('> .i-block-title'), 5149 content = that.find('> .i-block-content'); 5150 if(title.length && content.length) { 5151 title.click(function() { 5152 if(that.hasClass('mb-opened')) 5153 that.removeClass('mb-opened'); 5154 else 5155 that.addClass('mb-opened'); 5156 return false; 5157 }); 5158 } 5159 }); 5160 5161 $('input.input-plus-minus', jparent).each(function() 5162 { 5163 var obj = this, 5164 div = document.createElement('div'), 5165 plus = document.createElement('a'), 5166 minus = document.createElement('a'), 5167 step = obj.getAttribute('data-step') || 1, value; 5168 5169 if(step < 1) step = 1; 5170 step = parseInt(step); 5171 5172 div.className = 'input-plus-minus'; 5173 plus.className = 'input-inc-plus'; 5174 minus.className = 'input-inc-minus'; 5175 5176 plus.innerHTML = '<span>+</span>'; 5177 minus.innerHTML = '<span>-</span>'; 5178 plus.href = 'javascript:;'; 5179 minus.href = 'javascript:;'; 5180 5181 obj.parentNode.insertBefore(div, obj); 5182 obj.className = obj.className.replace("plus-minus", ""); 5183 div.appendChild(obj.parentNode.removeChild(obj)); 5184 div.appendChild(plus); 5185 div.appendChild(minus); 5186 5187 obj.onkeypress = function(e) { 5188 var chr = null; 5189 e = e || event; 5190 if (e.which == null) { 5191 if (e.keyCode < 32) return null; 5192 chr = String.fromCharCode(e.keyCode); 5193 } 5194 if (e.which != 0 && e.charCode != 0) { 5195 if (e.which < 32) return null; 5196 chr = String.fromCharCode(e.which); 5197 } 5198 if (e.ctrlKey || e.altKey || chr == null) return; 5199 if (chr < '0' || chr > '9') { 5200 e.stopPropagation(); 5201 return false; 5202 } 5203 } 5204 var oninput = function(e) { 5205 value = parseInt((+this.value)); 5206 if(isNaN(value)) { 5207 value = parseInt(this.value.replace(/[^\d]/g, '')); 5208 if(isNaN(value)) value = 0; 5209 setValue(value, e); 5210 } 5211 }; 5212 var fixValue = function(value) { 5213 if(value < step) 5214 value = step; 5215 if(value % step > 0) { 5216 value = (parseInt(value / step) + 1) * step; 5217 } 5218 return value; 5219 }; 5220 var getValue = function() { 5221 value = parseInt(obj.value); 5222 return isNaN(value) ? 0 : value; 5223 } 5224 var setValue = function(value, e) { 5225 var value = fixValue(value); 5226 if(obj.value != value) { 5227 obj.value = fixValue(value); 5228 $(obj).trigger('change'); 5229 e = (e || event); 5230 if(e) 5231 e.stopPropagation(); 5232 } 5233 return false; 5234 } 5235 obj.oninput = oninput; 5236 obj.onpropertychange = function() { 5237 event.propertyName == "value" && oninput.apply(this, [event]); 5238 } 5239 obj.onblur = function() { 5240 setValue(getValue()); 5241 }; 5242 plus.onclick = function(e) { 5243 return setValue(getValue()+step, e); 5244 }; 5245 minus.onclick = function(e) { 5246 return setValue(getValue()-step, e); 5247 }; 5248 5249 setValue(getValue()); 5250 }); 5251 5252 $('a[data-href]', jparent).click(function () { 5253 elementClick = $('#'+this.getAttribute("data-href")); 5254 if(!elementClick.length) return true; 5255 destination = elementClick.offset().top; 5256 $('body,html').animate({scrollTop: destination}, 1100); 5257 return false; 5258 }); 5259}); 5260 5261$(function() { 5262 return; 5263 var lookup1 = document.getElementById('container'), 5264 lookup2 = document.getElementById('pageFooter'), 5265 posLookup1 = null, posLookup2 = null, wsize = null, 5266 _chekupSticky = function() { 5267 var scrollTop = $.sigma.getBodyScrollTop(); 5268 if(scrollTop + wsize.height > posLookup2.top) { 5269 $(document.body).removeClass('sticky-header'); 5270 $(document.body).addClass('hidden-header'); 5271 } 5272 else if(scrollTop > posLookup1.top+10) { 5273 $(document.body).addClass('sticky-header'); 5274 $(document.body).removeClass('hidden-header'); 5275 } 5276 else { 5277 $(document.body).removeClass('sticky-header'); 5278 $(document.body).removeClass('hidden-header'); 5279 } 5280 }, 5281 _chekupPosition = function() { 5282 posLookup1 = $.sigma.getPosition(lookup1); 5283 posLookup2 = $.sigma.getPosition(lookup2); 5284 wsize = $.sigma.getClientSize(); 5285 }; 5286 if(lookup1 && lookup2) { 5287 $(window).bind('resize scroll load', function() { _chekupPosition(); _chekupSticky(); }); 5288 $(document).ready(function() { _chekupPosition(); _chekupSticky(); }); 5289 } 5290}); 5291 5292/* End */ 5293; 5294; /* Start:"a:4:{s:4:"full";
5294s:52:"/local/templates/gfi-rus/js/script.js?17515421875897";s:6:"source";s:37:"/local/templates/gfi-rus/js/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5295$(function() { 5296 $('#main-menu ul.menu-ul-root li').hover(function() { 5297 $(this).addClass('item-hover'); 5298 //$(this).find('>ul').stop(true, true).delay(50).fadeIn(); 5299 }, function() { 5300 $(this).removeClass('item-hover'); 5301 //$(this).find('>ul').stop(true, true).delay(50).fadeOut(); 5302 }); 5303 5304 $('#catalog-menu ul.menu-ul-root li').hover(function() { 5305 $(this).addClass('item-hover'); 5306 //$(this).find('>ul').stop(true, true).delay(50).fadeIn(); 5307 }, function() { 5308 $(this).removeClass('item-hover'); 5309 //$(this).find('>ul').stop(true, true).delay(50).fadeOut(); 5310 }); 5311 5312 jObserver().bind('cartChange', function(e) { 5313 var htmlCart = document.getElementById('cart'); 5314 if(htmlCart) { 5315 jAjax(cart).get(); 5316 } 5317 }); 5318 5319 var confirmer = function (path, redirect){ 5320 this.path = path; 5321 this.redirect = redirect; 5322 5323 this.init(); 5324 } 5325 confirmer.prototype.getDomain = function() { 5326 var value = location.host; 5327 if(value.indexOf('www.') == 0) 5328 value = value.substr('www.'.length); 5329 } 5330 confirmer.prototype.getOpts = function() { 5331 return { path: '/', domain: this.getDomain(), expires: 7 }; 5332 } 5333 confirmer.prototype.init = function() { 5334 var div; 5335 if(location.href.indexOf(this.path) >= 0) 5336 { 5337 div = document.body.appendChild( 5338 document.createElement('div')); 5339 div.setAttribute('data-href', '/confirm18/'); 5340 $(div).ajaxArea({ 5341 maxWidth: 760, 5342 popupCss: 'confirm18-w', 5343 modal: 1 5344 }); 5345 5346 if(!this.isConfirmed()) 5347 $(div).trigger('click'); 5348 } 5349 } 5350 confirmer.prototype.isConfirmed = function(value) { 5351 if(typeof value == 'undefined') { 5352 if(location.href.indexOf(this.path) < 0) 5353 return true; 5354 var value = $.cookie('iamadult'); 5355 return (value == 'yes'); 5356 } 5357 5358 value = !!value; 5359 $.cookie('iamadult', (value ? 'yes' : 'no'), this.getOpts()); 5360 } 5361 confirmer.prototype.confirm = function() { 5362 this.isConfirmed(1); 5363 if(typeof location.reload == 'function') 5364 location.reload(); 5365 else 5366 location.href = location.href; 5367 return false; 5368 } 5369 confirmer.prototype.decline = function(value) { 5370 this.isConfirmed(0); 5371 location.href = this.redirect; 5372 return false; 5373 } 5374 5375 Confirmer = new confirmer('millernmiller.com', 'http://icedream.ru/'); 5376 5377 var isAuctionShowed = false, 5378 actButton = document.getElementById('auctionButton'); 5379 if(Confirmer.isConfirmed() && actButton) { 5380 isAuctionShowed = ($.cookie('auctionShowed') == 'yes'); 5381 if(!isAuctionShowed) { 5382 setTimeout(function() { 5383 $.cookie('auctionShowed', 'yes', { path: '/', domain: Confirmer.getDomain(), expires: 1 }); 5384 $(actButton).trigger('click'); 5385 }, 10000); 5386 } 5387 } 5388 5389 $(".catalog-en .catalog-list li a").click(function () { 5390 return false; 5391 }); 5392}); 5393 5394 5395$(window).scroll(function() { 5396 if($(this).scrollTop() > 100) { 5397 $('.page-wrapper').addClass('header_fixed'); 5398 } else { 5399 $('.page-wrapper').removeClass('header_fixed'); 5400 } 5401 }); 5402 5403$(document).bind('bx.ready', function(e, parent) { 5404 var parent = parent || document.body, 5405 jparent = $(parent); 5406 $(".long-text", jparent).sigmaHidelong(); 5407 $(".top-cart-obj", jparent).each(function() { 5408 var cartMobile = document.getElementById('cartMobile'), 5409 count = this.getAttribute('data-count') || 0; 5410 if(cartMobile) 5411 cartMobile.getElementsByTagName('span')[0].innerHTML = count; 5412 }); 5413 $(".lazyload-main-block", jparent).lazyload({effect: "fadeIn"}); 5414 //$('input[name="phone"]', jparent).mask("(999) 999-99-99"); 5415}); 5416 5417 5418 5419let cookies = { 5420 get: function(name) { 5421 let matches = document.cookie.match(new RegExp( 5422 "(?:^|; )" + name.replace(/([.$?*|{}()\[\]\\/+^])/g, '\\$1') + "=([^;]*)" 5423 )); 5424 return matches ? decodeURIComponent(matches[1]) : undefined; 5425 }, 5426 set: function(name, value, options) { 5427 options = options || { 5428 path: '/' 5429 }; 5430 if (options.expires instanceof Date) { 5431 options.expires = options.expires.toUTCString(); 5432 } 5433 let updatedCookie = encodeURIComponent(name) + "=" + encodeURIComponent(value); 5434 for (let optionKey in options) { 5435 updatedCookie += "; " + optionKey; 5436 let optionValue = options[optionKey]; 5437 if (optionValue !== true) { 5438 updatedCookie += "=" + optionValue; 5439 } 5440 } 5441 document.cookie = updatedCookie; 5442 }, 5443 delete: function(name) { 5444 this.set(name, "", {'max-age': -1}); 5445 } 5446} 5447 5448document.addEventListener('DOMContentLoaded', () => { 5449 let ccBlock = function() { 5450 this.node = document.body.appendChild( 5451 document.createElement('div') 5452 ) 5453 this.node.className = 'cc-block'; 5454 this.node.innerHTML = '<div class="out"><i class="i-close"></i><div>ÐÑÐ¾Ð´Ð¾Ð»Ð¶Ð°Ñ Ð¿Ð¾Ð»ÑзоваÑÑÑÑ ÑайÑом, Ð²Ñ ÑоглаÑаеÑеÑÑ Ð½Ð° обÑабоÑÐºÑ cookies и подÑвеÑждаеÑе ÑоглаÑие Ñ Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñми <a href="/privacy-cookies">полиÑики</a></div><span class="bts">ÐÑинÑÑÑ</span></div>'; 5455 this.ctrl = { 5456 btnOK: this.node.querySelector('.bts'), 5457 btnClose: this.node.querySelector('.i-close') 5458 } 5459 5460 this.bindEvents(); 5461 if (this.needOpen()) { 5462 this.open(true); 5463 } 5464 }, ccp = ccBlock.prototype; 5465 5466 ccp.bindEvents = function() { 5467 jQuery(this.ctrl.btnOK).click(e => { 5468 this.confirm(); 5469 }); 5470 jQuery(this.ctrl.btnClose).click(e => { 5471 this.open(false); 5472 }); 5473 } 5474 ccp.confirm = function() { 5475 let options = { 5476 expires: new Date(Date.now() + 86400e3) 5477 }; 5478 if (location.href.indexOf('https:') === 0) { 5479 options.secure = true; 5480 } 5481 cookies.set('cc-block', 1, options); 5482 this.open(false); 5483 } 5484 ccp.open = function(showed) { 5485 showed = showed || false; 5486 if (showed) { 5487 if (!this.node.classList.contains('is--opened')) { 5488 this.node.classList.add('is--opened'); 5489 } 5490 } else { 5491 if (this.node.classList.contains('is--opened')) { 5492 this.node.classList.remove('is--opened'); 5493 } 5494 } 5495 } 5496 ccp.needOpen = function() { 5497 return !cookies.get('cc-block'); 5498 } 5499 5500 new ccBlock(); 5501}); 5502 5503 5504 5505 5506 5507/* End */ 5508; 5509; /* Start:"a:4:{s:4:"full";s:61:"/local/js/menu/slicknav/jquery.slicknav.min.js?15230266886826";s:6:"source";s:46:"/local/js/menu/slicknav/jquery.slicknav.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5510/*! 5511 * SlickNav Responsive Mobile Menu v1.0.7 5512 * (c) 2016 Josh Cope 5513 * licensed under MIT 5514 */ 5515!function(e,n,t){function a(n,t){this.element=n,this.settings=e.extend({},i,t),this.settings.duplicate||t.hasOwnProperty("removeIds")||(this.settings.removeIds=!1),this._defaults=i,this._name=s,this.init()}var i={label:"MENU",duplicate:!0,duration:200,easingOpen:"swing",easingClose:"swing",closedSymbol:"►",openedSymbol:"▼",prependTo:"body",appendTo:"",parentTag:"a",closeOnClick:!1,allowParentLinks:!1,nestedParentLinks:!0,showChildren:!1,removeIds:!0,removeClasses:!1,removeStyles:!1,brand:"",init:function(){},beforeOpen:function(){},beforeClose:function(){},afterOpen:function(){},afterClose:function(){}},s="slicknav",l="slicknav";a.prototype.init=function(){var t,a,i=this,s=e(this.element),o=this.settings;if(o.duplicate?i.mobileNav=s.clone():i.mobileNav=s,o.removeIds&&(i.mobileNav.removeAttr("id"),i.mobileNav.find("*").each(function(n,t){e(t).removeAttr("id")})),o.removeClasses&&(i.mobileNav.removeAttr("class"),i.mobileNav.find("*").each(function(n,t){e(t).removeAttr("class")})),o.removeStyles&&(i.mobileNav.removeAttr("style"),i.mobileNav.find("*").each(function(n,t){e(t).removeAttr("style")})),t=l+"_icon",""===o.label&&(t+=" "+l+"_no-text"),"a"==o.parentTag&&(o.parentTag='a href="#"'),i.mobileNav.attr("class",l+"_nav"),a=e('<div class="'+l+'_menu"></div>'),""!==o.brand){var r=e('<div class="'+l+'_brand">
5515'+o.brand+"</div>");e(a).append(r)}i.btn=e(["<"+o.parentTag+' aria-haspopup="true" tabindex="0" class="'+l+"_btn "+l+'_collapsed">','<span class="'+l+'_menutxt">'+o.label+"</span>",'<span class="'+t+'">','<span class="'+l+'_icon-bar"></span>','<span class="'+l+'_icon-bar"></span>','<span class="'+l+'_icon-bar"></span>',"</span>","</"+o.parentTag+">"].join("")),e(a).append(i.btn),""!==o.appendTo?e(o.appendTo).append(a):e(o.prependTo).prepend(a),a.append(i.mobileNav);var d=i.mobileNav.find("li");e(d).each(function(){var n=e(this),t={};if(t.children=n.children("ul").attr("role","menu"),n.data("menu",t),t.children.length>0){var a=n.contents(),s=!1,r=[];e(a).each(function(){return e(this).is("ul")?!1:(r.push(this),void(e(this).is("a")&&(s=!0)))});var d=e("<"+o.parentTag+' role="menuitem" aria-haspopup="true" tabindex="-1" class="'+l+'_item"/>');if(o.allowParentLinks&&!o.nestedParentLinks&&s)e(r).wrapAll('<span class="'+l+"_parent-link "+l+'_row"/>').parent();else{var p=e(r).wrapAll(d).parent();p.addClass(l+"_row")}o.showChildren?n.addClass(l+"_open"):n.addClass(l+"_collapsed"),n.addClass(l+"_parent");var c=e('<span class="'+l+'_arrow">'+(o.showChildren?o.openedSymbol:o.closedSymbol)+"</span>");o.allowParentLinks&&!o.nestedParentLinks&&s&&(c=c.wrap(d).parent()),e(r).last().after(c)}else 0===n.children().length&&n.addClass(l+"_txtnode");n.children("a").attr("role","menuitem").click(function(n){o.closeOnClick&&!e(n.target).parent().closest("li").hasClass(l+"_parent")&&e(i.btn).click()}),o.closeOnClick&&o.allowParentLinks&&(n.children("a").children("a").click(function(n){e(i.btn).click()}),n.find("."+l+"_parent-link a:not(."+l+"_item)").click(function(n){e(i.btn).click()}))}),e(d).each(function(){var n=e(this).data("menu");o.showChildren||i._visibilityToggle(n.children,null,!1,null,!0)}),i._visibilityToggle(i.mobileNav,null,!1,"init",!0),i.mobileNav.attr("role","menu"),e(n).mousedown(function(){i._outlines(!1)}),e(n).keyup(function(){i._outlines(!0)}),e(i.btn).click(function(e){e.preventDefault(),i._menuToggle()}),i.mobileNav.on("click","."+l+"_item",function(n){n.preventDefault(),i._itemClick(e(this))}),e(i.btn).keydown(function(e){var n=e||event;13==n.keyCode&&(e.preventDefault(),i._menuToggle())}),i.mobileNav.on("keydown","."+l+"_item",function(n){var t=n||event;13==t.keyCode&&(n.preventDefault(),i._itemClick(e(n.target)))}),o.allowParentLinks&&o.nestedParentLinks&&e("."+l+"_item a").click(function(e){e.stopImmediatePropagation()})},a.prototype._menuToggle=function(e){var n=this,t=n.btn,a=n.mobileNav;t.hasClass(l+"_collapsed")?(t.removeClass(l+"_collapsed"),t.addClass(l+"_open")):(t.removeClass(l+"_open"),t.addClass(l+"_collapsed")),t.addClass(l+"_animating"),n._visibilityToggle(a,t.parent(),!0,t)},a.prototype._itemClick=function(e){var n=this,t=n.settings,a=e.data("menu");a||(a={},a.arrow=e.children("."+l+"_arrow"),a.ul=e.next("ul"),a.parent=e.parent(),a.parent.hasClass(l+"_parent-link")&&(a.parent=e.parent().parent(),a.ul=e.parent().next("ul")),e.data("menu",a)),a.parent.hasClass(l+"_collapsed")?(a.arrow.html(t.openedSymbol),a.parent.removeClass(l+"_collapsed"),a.parent.addClass(l+"_open"),a.parent.addClass(l+"_animating"),n._visibilityToggle(a.ul,a.parent,!0,e)):(a.arrow.html(t.closedSymbol),a.parent.addClass(l+"_collapsed"),a.parent.removeClass(l+"_open"),a.parent.addClass(l+"_animating"),n._visibilityToggle(a.ul,a.parent,!0,e))},a.prototype._visibilityToggle=function(n,t,a,i,s){var o=this,r=o.settings,d=o._getActionItems(n),p=0;a&&(p=r.duration),n.hasClass(l+"_hidden")?(n.removeClass(l+"_hidden"),s||r.beforeOpen(i),n.slideDown(p,r.easingOpen,function(){e(i).removeClass(l+"_animating"),e(t).removeClass(l+"_animating"),s||r.afterOpen(i)}),n.attr("aria-hidden","false"),d.attr("tabindex","0"),o._setVisAttr(n,!1)):(n.addClass(l+"_hidden"),s||r.beforeClose(i),n.slideUp(p,this.settings.easingClose,function(){n.attr("aria-hidden","true"),d.attr("tabindex","-1"),o._setVisAttr(n,!0),n.hide(),e(i).removeClass(l+"_animating"),e(t).removeClass(l+"_animating"),s?"init"==i&&r.init():r.afterClose(i)}))},a.prototype._setVisAttr=function(n,t){var a=this,i=n.children("li").children("ul").not("."+l+"_hidden");t?i.each(function(){var n=e(this);n.attr("aria-hidden","true");var i=a._getActionItems(n);i.attr("tabindex","-1"),a._setVisAttr(n,t)}):i.each(function(){var n=e(this);n.attr("aria-hidden","false");var i=a._getActionItems(n);i.attr("tabindex","0"),a._setVisAttr(n,t)})},a.prototype._getActionItems=function(e){var n=e.data("menu");if(!n){n={};var t=e.children("li"),a=t.find("a");n.links=a.add(t.find("."+l+"_item")),e.data("menu",n)}return n.links},a.prototype._outlines=function(n){n?e("."+l+"_item, ."+l+"_btn").css("outline",""):e("."+l+"_item, ."+l+"_btn").css("outline","none")},a.prototype.toggle=function(){var e=this;e._menuToggle()},a.prototype.open=function(){var e=this;e.btn.hasClass(l+"_collapsed")&&e._menuToggle()},a.prototype.close=function(){var e=this;e.btn.hasClass(l+"_open")&&e._menuToggle()},e.fn[s]=function(n){var t=arguments;if(void 0===n||"object"==typeof n)return this.each(function(){e.data(this,"plugin_"+s)||e.data(this,"plugin_"+s,new a(this,n))});if("string"==typeof n&&"_"!==n[0]&&"init"!==n){var i;return this.each(function(){var l=e.data(this,"plugin_"+s);l instanceof a&&"function"==typeof l[n]&&(i=l[n].apply(l,Array.prototype.slice.call(t,1)))}),void 0!==i?i:this}}}(jQuery,document,window); 5516/* End */ 5517; 5518; /* Start:"a:4:{s:4:"full";s:44:"/local/js/menu/pushy/pushy.js?15230266886880";s:6:"source";s:29:"/local/js/menu/pushy/pushy.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5519/*! Pushy - v1.0.0 - 2016-3-1 5520* Pushy is a responsive off-canvas navigation menu using CSS transforms & transitions. 5521* https://github.com/christophery/pushy/ 5522* by Christopher Yee */ 5523 5524(function ($) { 5525 var cssTransforms3d = (function csstransforms3d() { 5526 var el = document.createElement('p'), 5527 supported = false, 5528 transforms = { 'webkitTransform':'-webkit-transform', 'OTransform':'-o-transform', 'msTransform':'-ms-transform', 'MozTransform':'-moz-transform', 'transform':'transform'}; 5529 5530 if(document.body === null) 5531 return false;
5532 5533 // Add it to the body to get the computed style 5534 document.body.insertBefore(el, null); 5535 5536 for(var t in transforms) 5537 if( el.style[t] !== undefined ) { 5538 el.style[t] = 'translate3d(1px,1px,1px)'; 5539 supported = window.getComputedStyle(el).getPropertyValue(transforms[t]); 5540 } 5541 5542 document.body.removeChild(el); 5543 5544 return (supported !== undefined && supported.length > 0 && supported !== "none"); 5545 })(); 5546 5547 var allMenu = []; 5548 //close menu w/ esc key 5549 $(document).keyup(function(e) { 5550 var fmenu = (allMenu.length == 1) ? allMenu[0] : null; 5551 //check if esc key is pressed 5552 if (e.keyCode == 27) { 5553 var i, n = allMenu.length; 5554 for(i = 0; i < n; i++) 5555 if(allMenu[i].isOpened()) 5556 allMenu[i].close(); 5557 } 5558 else if (fmenu && (e.keyCode == 37)) { // left 5559 if(fmenu.isLeft()) 5560 fmenu.isOpened() ? fmenu.close() : null; 5561 //else 5562 // fmenu.isOpened() ? null : fmenu.open(); 5563 } 5564 else if (fmenu && (e.keyCode == 39)) { // right 5565 if(!fmenu.isLeft()) 5566 // fmenu.isOpened() ? null : fmenu.open(); 5567 //else 5568 fmenu.isOpened() ? fmenu.close() : null; 5569 } 5570 }); 5571 5572 var body = $('body'), 5573 siteOverlay = document.body.appendChild(document.createElement('div')), 5574 tmpDiv = document.createElement('div'), 5575 pushyLeft = 'pushy-left', //css class for left menu position 5576 pushyOpenLeft = 'pushy-open-left', //css class when menu is open (left position) 5577 pushyOpenRight = 'pushy-open-right', //css class when menu is open (right position) 5578 container = $('.page-wrapper'), //container css class 5579 menuSpeed = 200; //jQuery fallback menu speed 5580 siteOverlay.className = 'site-overlay'; 5581 tmpDiv.style.display = 'none'; 5582 5583 var pushyMenu = function(node, params) { 5584 this.node = node; 5585 this.closeNode = null; 5586 this.bOpened = false; 5587 this.bHolded = false; 5588 this.target = null; 5589 this.params = $.sigma.getOpts(node, params, 'pm'); 5590 this.menuWidth = 0; 5591 } 5592 pushyMenu.prototype = { 5593 init: function() { 5594 var that = this, pos, targetId = ''; 5595 if(this.node.tagName.toLowerCase()=='a') { 5596 targetId = this.node.href; 5597 pos = targetId.indexOf('#'); 5598 if(pos >= 0) 5599 targetId = targetId.substr(pos + 1); 5600 } 5601 else { 5602 targetId = this.node.getAttribute('data-href'); 5603 } 5604 if(targetId) 5605 this.target = document.getElementById(targetId); 5606 5607 if(!this.target) return; 5608 5609 if(cssTransforms3d) { 5610 //make menu visible 5611 this.target.style.visibility = 'visible'; 5612 $(this.target).bind( 5613 'webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd', 5614 function(e) { if(that.target == e.target) that.transitionEnd.apply(that); } 5615 ); 5616 } 5617 else { 5618 //add css class to body 5619 body.addClass('no-csstransforms3d'); 5620 this.menuWidth = this.target.offsetWidth; 5621 5622 //hide menu by default 5623 this.isLeft() ? 5624 (this.target.style.left = "-"+this.menuWidth+"px") : 5625 (this.target.style.right = "-"+this.menuWidth+"px"); 5626 5627 //make menu visible 5628 this.target.style.visibility = 'visible'; 5629 //fixes IE scrollbar issue 5630 container.css({"overflow-x": "hidden"}); 5631 } 5632 5633 this.node.onclick = function() { 5634 that.toggle(); 5635 return false; 5636 } 5637 siteOverlay.onclick = function() { 5638 that.close(); 5639 return false; 5640 } 5641 5642 this.closeNode = this.target.appendChild(document.createElement('i')); 5643 this.closeNode.className = 'pushy-btn-close'; 5644 this.closeNode.innerHTML = this.params.closeLabel; 5645 this.closeNode.onclick = function() { 5646 that.close(); 5647 return false; 5648 } 5649 }, 5650 toggle: function() { 5651 this.bOpened ? this.close() : this.open(); 5652 }, 5653 isHolded: function(value) { 5654 if(typeof value != 'undefined') 5655 this.bHolded = !!value; 5656 return this.bHolded; 5657 }, 5658 isLeft: function() { 5659 return (this.target.className.indexOf(pushyLeft)>=0); 5660 }, 5661 isOpened: function() { 5662 return this.bOpened; 5663 }, 5664 open: function() { 5665 var that = this; 5666 if(this.isHolded()) return; 5667 this.isHolded(true); 5668 this.replaceTarget(); 5669 setTimeout(function() { 5670 if(cssTransforms3d) { 5671 that.isLeft() ? body.addClass(pushyOpenLeft) : 5672 body.addClass(pushyOpenRight); 5673 } 5674 else 5675 that.openFallback(); 5676 }, 10); 5677 }, 5678 close: function() { 5679 if(this.isHolded()) return; 5680 this.isHolded(true); 5681 if(cssTransforms3d) { 5682 this.isLeft() ? body.removeClass(pushyOpenLeft) : 5683 body.removeClass(pushyOpenRight); 5684 } 5685 else 5686 this.closeFallback(); 5687 }, 5688 transitionEnd: function() { console.log(44); 5689 if(this.bOpened) 5690 this.replaceTarget(); 5691 this.bOpened = !this.bOpened; 5692 this.isHolded(false); 5693 }, 5694 replaceTarget: function() { 5695 if(!this.bOpened) { 5696 this.target.parentNode.insertBefore(tmpDiv, this.target); 5697 document.body.appendChild( 5698 this.target.parentNode.removeChild(this.target) 5699 ); 5700 $(this.target).addClass('pushy-active'); 5701 } 5702 else { 5703 tmpDiv.parentNode.insertBefore( 5704 this.target.parentNode.removeChild(this.target), 5705 tmpDiv 5706 ); 5707 tmpDiv.parentNode.removeChild(tmpDiv); 5708 $(this.target).removeClass('pushy-active'); 5709 } 5710 }, 5711 openFallback: function() { 5712 var that = this; 5713 //animate menu position based on CSS class 5714 if(this.isLeft()) { 5715 body.addClass(pushyOpenLeft); 5716 $(this.target).animate({left: 0}, menuSpeed); 5717 container.animate({left: this.menuWidth}, menuSpeed, function() { 5718 that.transitionEnd.apply(); 5719 }); 5720 } 5721 else { 5722 body.addClass(pushyOpenRight); 5723 $(this.target).animate({right: 0}, menuSpeed); 5724 container.animate({right: this.menuWidth}, menuSpeed, function() { 5725 that.transitionEnd.apply(); 5726 }); 5727 } 5728 }, 5729 closeFallback: function () { 5730 var that = this; 5731 //animate menu position based on CSS class 5732 if(this.isLeft()) { 5733 body.removeClass(pushyOpenLeft); 5734 $(this.target).animate({left: "-" + this.menuWidth}, menuSpeed, function() { 5735 that.transitionEnd.apply(); 5736 }); 5737 container.animate({left: 0}, this.menuSpeed); 5738 } 5739 else { 5740 body.removeClass(pushyOpenRight); 5741 $(this.target).animate({right: "-" + this.menuWidth}, menuSpeed, function() { 5742 that.transitionEnd.apply(); 5743 }); 5744 container.animate({right: 0}, this.menuSpeed); 5745 } 5746 } 5747 } 5748 5749 $.fn.pushy = function(params) 5750 { 5751 var params = $.extend({}, { 5752 closeLabel: 'ÐакÑÑÑÑ' 5753 }, params); 5754 5755 return this.each(function() { 5756 var menu = new pushyMenu(this, params); 5757 menu.init(); 5758 allMenu[allMenu.length] = menu; 5759 }); 5760 } 5761}(jQuery)); 5762/* End */ 5763; 5764; /* Start:"a:4:{s:4:"full";s:64:"/local/js/popup/fancybox/jquery.fancybox.pack.js?152302668823135";s:6:"source";s:48:"/local/js/popup/fancybox/jquery.fancybox.pack.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5765/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 5766(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20, 5767width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"}, 5768keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+ 5769(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, 5770openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
5771isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k, 5772c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&& 5773k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current|| 5774b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer= 5775setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current; 5776d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d= 5777a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")), 5778b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(), 5779y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHe
vendor: 5,044 bytes, lines 5779-5788
5779ight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement; 5780if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&& 5781(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0, 5782{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1, 5783mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio= 5784!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href"); 5785"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload= 5786this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href); 5787f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload, 5788e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,
5789outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}", 5790g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll": 5791"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside? 5792h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth|| 5793h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;
5793h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&& 5794"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width(); 5795y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&& 5796!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(), 5797b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a= 5798a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())): 5799(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"=== 5800f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c, 5801{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a= 5802b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay= 5803f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());
5803a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive? 5804b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth), 5805p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"=== 5806f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d= 5807b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d, 5808e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.o
5808pen(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+ 5809":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20=== 5810d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery); 5811/* End */ 5812; 5813; /* Start:"a:4:{s:4:"full";s:73:"/local/js/popup/fancybox/helpers/jquery.fancybox-thumbs.js?15230266883836";s:6:"source";s:58:"/local/js/popup/fancybox/helpers/jquery.fancybox-thumbs.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5814 /*! 5815 * Thumbnail helper for fancyBox 5816 * version: 1.0.7 (Mon, 01 Oct 2012) 5817 * @requires fancyBox v2.0 or later 5818 * 5819 * Usage: 5820 * $(".fancybox").fancybox({ 5821 * helpers : { 5822 * thumbs: { 5823 * width : 50, 5824 * height : 50 5825 * } 5826 * } 5827 * }); 5828 * 5829 */ 5830(function ($) { 5831 //Shortcut for fancyBox object 5832 var F = $.fancybox; 5833 5834 //Add helper object 5835 F.helpers.thumbs = { 5836 defaults : { 5837 width : 50, // thumbnail width 5838 height : 50, // thumbnail height 5839 position : 'bottom', // 'top' or 'bottom' 5840 source : function ( item ) { // function to obtain the URL of the thumbnail image 5841 var href; 5842 5843 if (item.element) { 5844 href = $(item.element).find('img').attr('src'); 5845 } 5846 5847 if (!href && item.type === 'image' && item.href) { 5848 href = item.href; 5849 } 5850 5851 return href; 5852 } 5853 }, 5854 5855 wrap : null, 5856 list : null, 5857 width : 0, 5858 5859 init: function (opts, obj) { 5860 var that = this, 5861 list, 5862 thumbWidth = opts.width, 5863 thumbHeight = opts.height, 5864 thumbSource = opts.source; 5865 5866 //Build list structure 5867 list = ''; 5868 5869 for (var n = 0; n < obj.group.length; n++) { 5870 list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>'; 5871 } 5872 5873 this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position).appendTo('body'); 5874 this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap); 5875 5876 //Load each thumbnail 5877 $.each(obj.group, function (i) { 5878 var href = thumbSource( obj.group[ i ] ); 5879 5880 if (!href) { 5881 return; 5882 } 5883 5884 $("<img />").load(function () { 5885 var width = this.width, 5886 height = this.height, 5887 widthRatio, heightRatio, parent; 5888 5889 if (!that.list || !width || !height) { 5890 return; 5891 } 5892 5893 //Calculate thumbnail width/height and center it 5894 widthRatio = width / thumbWidth; 5895 heightRatio = height / thumbHeight; 5896 5897 parent = that.list.children().eq(i).find('a'); 5898 5899 if (widthRatio >= 1 && heightRatio >= 1) { 5900 if (widthRatio > heightRatio) { 5901 width = Math.floor(width / heightRatio); 5902 height = thumbHeight; 5903 5904 } else { 5905 width = thumbWidth; 5906 height = Math.floor(height / widthRatio); 5907 } 5908 } 5909 5910 $(this).css({ 5911 width : width, 5912 height : height, 5913 top : Math.floor(thumbHeight / 2 - height / 2), 5914 left : Math.floor(thumbWidth / 2 - width / 2) 5915 }); 5916 5917 parent.width(thumbWidth).height(thumbHeight); 5918 5919 $(this).hide().appendTo(parent).fadeIn(300); 5920 5921 }).attr('src', href); 5922 }); 5923 5924 //Set initial width 5925 this.width = this.list.children().eq(0).outerWidth(true); 5926 5927 this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); 5928 }, 5929 5930 beforeLoad: function (opts, obj) { 5931 //Remove self if gallery do not have at least two items 5932 if (obj.group.length < 2) { 5933 obj.helpers.thumbs = false;
5934 5935 return; 5936 } 5937 5938 //Increase bottom margin to give space for thumbs 5939 obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); 5940 }, 5941 5942 afterShow: function (opts, obj) { 5943 //Check if exists and create or update list 5944 if (this.list) { 5945 this.onUpdate(opts, obj); 5946 5947 } else { 5948 this.init(opts, obj); 5949 } 5950 5951 //Set active element 5952 this.list.children().removeClass('active').eq(obj.index).addClass('active'); 5953 }, 5954 5955 //Center list 5956 onUpdate: function (opts, obj) { 5957 if (this.list) { 5958 this.list.stop(true).animate({ 5959 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) 5960 }, 150); 5961 } 5962 }, 5963 5964 beforeClose: function () { 5965 if (this.wrap) { 5966 this.wrap.remove(); 5967 } 5968 5969 this.wrap = null; 5970 this.list = null; 5971 this.width = 0; 5972 } 5973 } 5974 5975}(jQuery)); 5976/* End */ 5977; 5978; /* Start:"a:4:{s:4:"full";s:74:"/local/js/popup/fancybox/helpers/jquery.fancybox-buttons.js?15230266883041";s:6:"source";s:59:"/local/js/popup/fancybox/helpers/jquery.fancybox-buttons.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5979 /*! 5980 * Buttons helper for fancyBox 5981 * version: 1.0.5 (Mon, 15 Oct 2012) 5982 * @requires fancyBox v2.0 or later 5983 * 5984 * Usage: 5985 * $(".fancybox").fancybox({ 5986 * helpers : { 5987 * buttons: { 5988 * position : 'top' 5989 * } 5990 * } 5991 * }); 5992 * 5993 */ 5994(function ($) { 5995 //Shortcut for fancyBox object 5996 var F = $.fancybox; 5997 5998 //Add helper object 5999 F.helpers.buttons = { 6000 defaults : { 6001 skipSingle : false, // disables if gallery contains single image 6002 position : 'top', // 'top' or 'bottom' 6003 tpl : '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:;"></a></li></ul></div>' 6004 }, 6005 6006 list : null, 6007 buttons: null, 6008 6009 beforeLoad: function (opts, obj) { 6010 //Remove self if gallery do not have at least two items 6011 6012 if (opts.skipSingle && obj.group.length < 2) { 6013 obj.helpers.buttons = false; 6014 obj.closeBtn = true; 6015 6016 return; 6017 } 6018 6019 //Increase top margin to give space for buttons 6020 obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; 6021 }, 6022 6023 onPlayStart: function () { 6024 if (this.buttons) { 6025 this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); 6026 } 6027 }, 6028 6029 onPlayEnd: function () { 6030 if (this.buttons) { 6031 this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); 6032 } 6033 }, 6034 6035 afterShow: function (opts, obj) { 6036 var buttons = this.buttons; 6037 6038 if (!buttons) { 6039 this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); 6040 6041 buttons = { 6042 prev : this.list.find('.btnPrev').click( F.prev ), 6043 next : this.list.find('.btnNext').click( F.next ), 6044 play : this.list.find('.btnPlay').click( F.play ), 6045 toggle : this.list.find('.btnToggle').click( F.toggle ), 6046 close : this.list.find('.btnClose').click( F.close ) 6047 } 6048 } 6049 6050 //Prev 6051 if (obj.index > 0 || obj.loop) { 6052 buttons.prev.removeClass('btnDisabled'); 6053 } else { 6054 buttons.prev.addClass('btnDisabled'); 6055 } 6056 6057 //Next / Play 6058 if (obj.loop || obj.index < obj.group.length - 1) { 6059 buttons.next.removeClass('btnDisabled'); 6060 buttons.play.removeClass('btnDisabled'); 6061 6062 } else { 6063 buttons.next.addClass('btnDisabled'); 6064 buttons.play.addClass('btnDisabled'); 6065 } 6066 6067 this.buttons = buttons; 6068 6069 this.onUpdate(opts, obj); 6070 }, 6071 6072 onUpdate: function (opts, obj) { 6073 var toggle; 6074 6075 if (!this.buttons) { 6076 return; 6077 } 6078 6079 toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); 6080 6081 //Size toggle button 6082 if (obj.canShrink) { 6083 toggle.addClass('btnToggleOn'); 6084 6085 } else if (!obj.canExpand) { 6086 toggle.addClass('btnDisabled'); 6087 } 6088 }, 6089 6090 beforeClose: function () { 6091 if (this.list) { 6092 this.list.remove(); 6093 } 6094 6095 this.list = null; 6096 this.buttons = null; 6097 } 6098 }; 6099 6100}(jQuery)); 6101 6102/* End */ 6103; 6104; /* Start:"a:4:{s:4:"full";s:72:"/local/js/popup/fancybox/helpers/jquery.fancybox-media.js?15230266885305";s:6:"source";s:57:"/local/js/popup/fancybox/helpers/jquery.fancybox-media.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 6105/*! 6106 * Media helper for fancyBox 6107 * version: 1.0.6 (Fri, 14 Jun 2013) 6108 * @requires fancyBox v2.0 or later 6109 * 6110 * Usage: 6111 * $(".fancybox").fancybox({ 6112 * helpers : { 6113 * media: true 6114 * } 6115 * }); 6116 * 6117 * Set custom URL parameters: 6118 * $(".fancybox").fancybox({ 6119 * helpers : { 6120 * media: { 6121 * youtube : { 6122 * params : { 6123 * autoplay : 0 6124 * } 6125 * } 6126 * } 6127 * } 6128 * }); 6129 * 6130 * Or: 6131 * $(".fancybox").fancybox({, 6132 * helpers : { 6133 * media: true 6134 * }, 6135 * youtube : { 6136 * autoplay: 0 6137 * } 6138 * }); 6139 * 6140 * Supports: 6141 * 6142 * Youtube 6143 * http://www.youtube.com/watch?v=opj24KnzrWo 6144 * http://www.youtube.com/embed/opj24KnzrWo 6145 * http://youtu.be/opj24KnzrWo 6146 * http://www.youtube-nocookie.com/embed/opj24KnzrWo 6147 * Vimeo 6148 * http://vimeo.com/40648169 6149 * http://vimeo.com/channels/staffpicks/38843628
6150 * http://vimeo.com/groups/surrealism/videos/36516384 6151 * http://player.vimeo.com/video/45074303 6152 * Metacafe 6153 * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ 6154 * http://www.metacafe.com/watch/7635964/ 6155 * Dailymotion 6156 * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people 6157 * Twitvid 6158 * http://twitvid.com/QY7MD 6159 * Twitpic 6160 * http://twitpic.com/7p93st 6161 * Instagram 6162 * http://instagr.am/p/IejkuUGxQn/ 6163 * http://instagram.com/p/IejkuUGxQn/ 6164 * Google maps 6165 * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 6166 * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 6167 * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 6168 */ 6169(function ($) { 6170 "use strict"; 6171 6172 //Shortcut for fancyBox object 6173 var F = $.fancybox, 6174 format = function( url, rez, params ) { 6175 params = params || ''; 6176 6177 if ( $.type( params ) === "object" ) { 6178 params = $.param(params, true); 6179 } 6180 6181 $.each(rez, function(key, value) { 6182 url = url.replace( '$' + key, value || '' ); 6183 }); 6184 6185 if (params.length) { 6186 url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; 6187 } 6188 6189 return url; 6190 }; 6191 6192 //Add helper object 6193 F.helpers.media = { 6194 defaults : { 6195 youtube : { 6196 matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, 6197 params : { 6198 autoplay : 1, 6199 autohide : 1, 6200 fs : 1, 6201 rel : 0, 6202 hd : 1, 6203 wmode : 'opaque', 6204 enablejsapi : 1 6205 }, 6206 type : 'iframe', 6207 url : '//www.youtube.com/embed/$3' 6208 }, 6209 vimeo : { 6210 matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, 6211 params : { 6212 autoplay : 1, 6213 hd : 1, 6214 show_title : 1, 6215 show_byline : 1, 6216 show_portrait : 0, 6217 fullscreen : 1 6218 }, 6219 type : 'iframe', 6220 url : '//player.vimeo.com/video/$1' 6221 }, 6222 metacafe : { 6223 matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, 6224 params : { 6225 autoPlay : 'yes' 6226 }, 6227 type : 'swf', 6228 url : function( rez, params, obj ) { 6229 obj.swf.flashVars = 'playerVars=' + $.param( params, true ); 6230 6231 return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; 6232 } 6233 }, 6234 dailymotion : { 6235 matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, 6236 params : { 6237 additionalInfos : 0, 6238 autoStart : 1 6239 }, 6240 type : 'swf', 6241 url : '//www.dailymotion.com/swf/video/$1' 6242 }, 6243 twitvid : { 6244 matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, 6245 params : { 6246 autoplay : 0 6247 }, 6248 type : 'iframe', 6249 url : '//www.twitvid.com/embed.php?guid=$1' 6250 }, 6251 twitpic : { 6252 matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, 6253 type : 'image', 6254 url : '//twitpic.com/show/full/$1/' 6255 }, 6256 instagram : { 6257 matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, 6258 type : 'image', 6259 url : '//$1/p/$2/media/?size=l' 6260 }, 6261 google_maps : { 6262 matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, 6263 type : 'iframe', 6264 url : function( rez ) { 6265 return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); 6266 } 6267 } 6268 }, 6269 6270 beforeLoad : function(opts, obj) { 6271 var url = obj.href || '', 6272 type = false, 6273 what, 6274 item, 6275 rez, 6276 params; 6277 6278 for (what in opts) { 6279 if (opts.hasOwnProperty(what)) { 6280 item = opts[ what ]; 6281 rez = url.match( item.matcher ); 6282 6283 if (rez) { 6284 type = item.type; 6285 params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); 6286 6287 url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); 6288 6289 break; 6290 } 6291 } 6292 } 6293 6294 if (type) { 6295 obj.href = url; 6296 obj.type = type; 6297 6298 obj.autoHeight = false;
6299 } 6300 } 6301 }; 6302 6303}(jQuery)); 6304/* End */ 6305; 6306; /* Start:"a:4:{s:4:"full";s:56:"/local/js/basic/jquery.maskedinput.min.js?15230266884324";s:6:"source";s:41:"/local/js/basic/jquery.maskedinput.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 6307/* 6308 jQuery Masked Input Plugin 6309 Copyright (c) 2007 - 2015 Josh Bush (digitalbush.com) 6310 Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) 6311 Version: 1.4.1 6312*/ 6313!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b,c=navigator.userAgent,d=/iphone/i.test(c),e=/chrome/i.test(c),f=/android/i.test(c);a.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},a.fn.extend({caret:function(a,b){var c;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof a?(b="number"==typeof b?b:a,this.each(function(){this.setSelectionRange?this.setSelectionRange(a,b):this.createTextRange&&(c=this.createTextRange(),c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",a),c.select())})):(this[0].setSelectionRange?(a=this[0].selectionStart,b=this[0].selectionEnd):document.selection&&document.selection.createRange&&(c=document.selection.createRange(),a=0-c.duplicate().moveStart("character",-1e5),b=a+c.text.length),{begin:a,end:b})},unmask:function(){return this.trigger("unmask")},mask:function(c,g){var h,i,j,k,l,m,n,o;if(!c&&this.length>0){h=a(this[0]);var p=h.data(a.mask.dataName);return p?p():void 0}return g=a.extend({autoclear:a.mask.autoclear,placeholder:a.mask.placeholder,completed:null},g),i=a.mask.definitions,j=[],k=n=c.length,l=null,a.each(c.split(""),function(a,b){"?"==b?(n--,k=a):i[b]?(j.push(new RegExp(i[b])),null===l&&(l=j.length-1),k>a&&(m=j.length-1)):j.push(null)}),this.trigger("unmask").each(function(){function h(){if(g.completed){for(var a=l;m>=a;a++)if(j[a]&&C[a]===p(a))return;g.completed.call(B)}}function p(a){return g.placeholder.charAt(a<g.placeholder.length?a:0)}function q(a){for(;++a<n&&!j[a];);return a}function r(a){for(;--a>=0&&!j[a];);return a}function s(a,b){var c,d;if(!(0>a)){for(c=a,d=q(b);n>c;c++)if(j[c]){if(!(n>d&&j[c].test(C[d])))break;C[c]=C[d],C[d]=p(d),d=q(d)}z(),B.caret(Math.max(l,a))}}function t(a){var b,c,d,e;for(b=a,c=p(a);n>b;b++)if(j[b]){if(d=q(b),e=C[b],C[b]=c,!(n>d&&j[d].test(e)))break;c=e}}function u(){var a=B.val(),b=B.caret();if(o&&o.length&&o.length>a.length){for(A(!0);b.begin>0&&!j[b.begin-1];)b.begin--;if(0===b.begin)for(;b.begin<l&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}else{for(A(!0);b.begin<n&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}h()}function v(){A(),B.val()!=E&&B.change()}function w(a){if(!B.prop("readonly")){var b,c,e,f=a.which||a.keyCode;o=B.val(),8===f||46===f||d&&127===f?(b=B.caret(),c=b.begin,e=b.end,e-c===0&&(c=46!==f?r(c):e=q(c-1),e=46===f?q(e):e),y(c,e),s(c,e-1),a.preventDefault()):13===f?v.call(this,a):27===f&&(B.val(E),B.caret(0,A()),a.preventDefault())}}function x(b){if(!B.prop("readonly")){var c,d,e,g=b.which||b.keyCode,i=B.caret();if(!(b.ctrlKey||b.altKey||b.metaKey||32>g)&&g&&13!==g){if(i.end-i.begin!==0&&(y(i.begin,i.end),s(i.begin,i.end-1)),c=q(i.begin-1),n>c&&(d=String.fromCharCode(g),j[c].test(d))){if(t(c),C[c]=d,z(),e=q(c),f){var k=function(){a.proxy(a.fn.caret,B,e)()};setTimeout(k,0)}else B.caret(e);i.begin<=m&&h()}b.preventDefault()}}}function y(a,b){var c;for(c=a;b>c&&n>c;c++)j[c]&&(C[c]=p(c))}function z(){B.val(C.join(""))}function A(a){var b,c,d,e=B.val(),f=-1;for(b=0,d=0;n>b;b++)if(j[b]){for(C[b]=p(b);d++<e.length;)if(c=e.charAt(d-1),j[b].test(c)){C[b]=c,f=b;break}if(d>e.length){y(b+1,n);break}}else C[b]===e.charAt(d)&&d++,k>b&&(f=b);return a?z():k>f+1?g.autoclear||C.join("")===D?(B.val()&&B.val(""),y(0,n)):z():(z(),B.val(B.val().substring(0,f+1))),k?b:l}var B=a(this),C=a.map(c.split(""),function(a,b){return"?"!=a?i[a]?p(b):a:void 0}),D=C.join(""),E=B.val();B.data(a.mask.dataName,function(){return a.map(C,function(a,b){return j[b]&&a!=p(b)?a:null}).join("")}),B.one("unmask",function(){B.off(".mask").removeData(a.mask.dataName)}).on("focus.mask",function(){if(!B.prop("readonly")){clearTimeout(b);var a;E=B.val(),a=A(),b=setTimeout(function(){B.get(0)===document.activeElement&&(z(),a==c.replace("?","").length?B.caret(0,a):B.caret(a))},10)}}).on("blur.mask",v).on("keydown.mask",w).on("keypress.mask",x).on("input.mask paste.mask",function(){B.prop("readonly")||setTimeout(function(){var a=A(!0);B.caret(a),h()},0)}),e&&f&&B.off("input.mask").on("input.mask",u),A()})}})}); 6314/* End */ 6315; 6316; /* Start:"a:4:{s:4:"full";s:58:"/local/js/basic/jquery.autocomplete.min.js?152302668810689";s:6:"source";s:42:"/local/js/basic/jquery.autocomplete.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 6317/** 6318* Ajax Autocomplete for jQuery, version 1.2.9 6319* (c) 2013 Tomas Kirda 6320* 6321* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT
6321-style license. 6322* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete 6323* 6324*/ 6325(function(d){"function"===typeof define&&define.amd?define(["jquery"],d):d(jQuery)})(function(d){function g(a,b){var c=function(){},c={autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:g.formatResult,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:c,onSearchComplete:c,onSearchError:c,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0, 6326lookupFilter:function(a,b,c){return-1!==a.value.toLowerCase().indexOf(c)},paramName:"q",transformResult:function(a){return"string"===typeof a?d.parseJSON(a):a}};this.element=a;this.el=d(a);this.suggestions=[];this.badQueries=[];this.selectedIndex=-1;this.currentValue=this.element.value;this.intervalId=0;this.cachedResponse={};this.onChange=this.onChangeInterval=null;this.isLocal=!1;this.suggestionsContainer=null;this.options=d.extend({},c,b);this.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"}; 6327this.hint=null;this.hintValue="";this.selection=null;this.initialize();this.setOptions(b)}var k=function(){return{escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},createNode:function(a){var b=document.createElement("div");b.className=a;b.style.position="absolute";b.style.display="none";return b}}}();g.utils=k;d.Autocomplete=g;g.formatResult=function(a,b){var c="("+k.escapeRegExChars(b)+")";return a.value.replace(RegExp(c,"gi"),"<strong>$1</strong>")};g.prototype= 6328{killerFn:null,initialize:function(){var a=this,b="."+a.classes.suggestion,c=a.classes.selected,e=a.options,f;a.element.setAttribute("autocomplete","off");a.killerFn=function(b){0===d(b.target).closest("."+a.options.containerClass).length&&(a.killSuggestions(),a.disableKillerFn())};a.suggestionsContainer=g.utils.createNode(e.containerClass);f=d(a.suggestionsContainer);f.appendTo(e.appendTo);"auto"!==e.width&&f.width(e.width);f.on("mouseover.autocomplete",b,function(){a.activate(d(this).data("index"))}); 6329f.on("mouseout.autocomplete",function(){a.selectedIndex=-1;f.children("."+c).removeClass(c)});f.on("click.autocomplete",b,function(){a.select(d(this).data("index"))});a.fixPosition();a.fixPositionCapture=function(){a.visible&&a.fixPosition()};d(window).on("resize.autocomplete",a.fixPositionCapture);a.el.on("keydown.autocomplete",function(b){a.onKeyPress(b)});a.el.on("keyup.autocomplete",function(b){a.onKeyUp(b)});a.el.on("blur.autocomplete",function(){a.onBlur()});a.el.on("focus.autocomplete",function(){a.onFocus()}); 6330a.el.on("change.autocomplete",function(b){a.onKeyUp(b)})},onFocus:function(){this.fixPosition();if(this.options.minChars<=this.el.val().length)this.onValueChange()},onBlur:function(){this.enableKillerFn()},setOptions:function(a){var b=this.options;d.extend(b,a);if(this.isLocal=d.isArray(b.lookup))b.lookup=this.verifySuggestionsFormat(b.lookup);d(this.suggestionsContainer).css({"max-height":b.maxHeight+"px",width:b.width+"px","z-index":b.zIndex})},clearCache:function(){this.cachedResponse={};this.badQueries= 6331[]},clear:function(){this.clearCache();this.currentValue="";this.suggestions=[]},disable:function(){this.disabled=!0;this.currentRequest&&this.currentRequest.abort()},enable:function(){this.disabled=!1},fixPosition:function(){var a;"body"===this.options.appendTo&&(a=this.el.offset(),a={top:a.top+this.el.outerHeight()+"px",left:a.left+"px"},"auto"===this.options.width&&(a.width=this.el.outerWidth()-2+"px"),d(this.suggestionsContainer).css(a))},enableKillerFn:function(){d(document).on("click.autocomplete", 6332this.killerFn)},disableKillerFn:function(){d(document).off("click.autocomplete",this.killerFn)},killSuggestions:function(){var a=this;a.stopKillSuggestions();a.intervalId=window.setInterval(function(){a.hide();a.stopKillSuggestions()},50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var a=this.el.val().length,b=this.element.selectionStart;return"number"===typeof b?b===a:document.selection?(b=document.selection.createRange(),b.moveStart("character", 6333-a),a===b.text.length):!0}
6333,onKeyPress:function(a){if(!this.disabled&&!this.visible&&40===a.which&&this.currentValue)this.suggest();else if(!this.disabled&&this.visible){switch(a.which){case 27:this.el.val(this.currentValue);this.hide();break;case 39:if(this.hint&&this.options.onHint&&this.isCursorAtEnd()){this.selectHint();break}return;case 9:if(this.hint&&this.options.onHint){this.selectHint();return}case 13:if(-1===this.selectedIndex){this.hide();return}this.select(this.selectedIndex);if(9===a.which&& 6334!1===this.options.tabDisabled)return;break;case 38:this.moveUp();break;case 40:this.moveDown();break;default:return}a.stopImmediatePropagation();a.preventDefault()}},onKeyUp:function(a){var b=this;if(!b.disabled){switch(a.which){case 38:case 40:return}clearInterval(b.onChangeInterval);if(b.currentValue!==b.el.val())if(b.findBestHint(),0<b.options.deferRequestBy)b.onChangeInterval=setInterval(function(){b.onValueChange()},b.options.deferRequestBy);else b.onValueChange()}},onValueChange:function(){var a= 6335this.options,b=this.el.val(),c=this.getQuery(b);this.selection&&(this.selection=null,(a.onInvalidateSelection||d.noop).call(this.element));clearInterval(this.onChangeInterval);this.currentValue=b;this.selectedIndex=-1;if(a.triggerSelectOnValidInput&&(b=this.findSuggestionIndex(c),-1!==b)){this.select(b);return}c.length<a.minChars?this.hide():this.getSuggestions(c)},findSuggestionIndex:function(a){var b=-1,c=a.toLowerCase();d.each(this.suggestions,function(a,d){if(d.value.toLowerCase()===c)return b= 6336a,!1});return b},getQuery:function(a){var b=this.options.delimiter;if(!b)return a;a=a.split(b);return d.trim(a[a.length-1])},getSuggestionsLocal:function(a){var b=this.options,c=a.toLowerCase(),e=b.lookupFilter,f=parseInt(b.lookupLimit,10),b={suggestions:d.grep(b.lookup,function(b){return e(b,a,c)})};f&&b.suggestions.length>f&&(b.suggestions=b.suggestions.slice(0,f));return b},getSuggestions:function(a){var b,c=this,e=c.options,f=e.serviceUrl,l,g;e.params[e.paramName]=a;l=e.ignoreParams?null:e.params; 6337c.isLocal?b=c.getSuggestionsLocal(a):(d.isFunction(f)&&(f=f.call(c.element,a)),g=f+"?"+d.param(l||{}),b=c.cachedResponse[g]);b&&d.isArray(b.suggestions)?(c.suggestions=b.suggestions,c.suggest()):c.isBadQuery(a)||!1===e.onSearchStart.call(c.element,e.params)||(c.currentRequest&&c.currentRequest.abort(),c.currentRequest=d.ajax({url:f,data:l,type:e.type,dataType:e.dataType}).done(function(b){c.currentRequest=null;c.processResponse(b,a,g);e.onSearchComplete.call(c.element,a)}).fail(function(b,d,f){e.onSearchError.call(c.element, 6338a,b,d,f)}))},isBadQuery:function(a){for(var b=this.badQueries,c=b.length;c--;)if(0===a.indexOf(b[c]))return!0;return!1},hide:function(){this.visible=!1;this.selectedIndex=-1;d(this.suggestionsContainer).hide();this.signalHint(null)},suggest:function(){if(0===this.suggestions.length)this.hide();else{var a=this.options,b=a.formatResult,c=this.getQuery(this.currentValue),e=this.classes.suggestion,f=this.classes.selected,g=d(this.suggestionsContainer),k=a.beforeRender,m="",h;if(a.triggerSelectOnValidInput&& 6339(h=this.findSuggestionIndex(c),-1!==h)){this.select(h);return}d.each(this.suggestions,function(a,d){m+='<div class="'+e+'" data-index="'+a+'">'+b(d,c)+"</div>"});"auto"===a.width&&(h=this.el.outerWidth()-2,g.width(0<h?h:300));g.html(m);a.autoSelectFirst&&(this.selectedIndex=0,g.children().first().addClass(f));d.isFunction(k)&&k.call(this.element,g);g.show();this.visible=!0;this.findBestHint()}},findBestHint:function(){var a=this.el.val().toLowerCase(),b=null;a&&(d.each(this.suggestions,function(c, 6340d){var f=0===d.value.toLowerCase().indexOf(a);f&&(b=d);return!f}),this.signalHint(b))},signalHint:function(a){var b="";a&&(b=this.currentValue+a.value.substr(this.currentValue.length));this.hintValue!==b&&(this.hintValue=b,this.hint=a,(this.options.onHint||d.noop)(b))},verifySuggestionsFormat:function(a){return a.length&&"string"===typeof a[0]?d.map(a,function(a){return{value:a,data:null}}):a},processResponse:function(a,b,c){var d=this.options;a=d.transformResult(a,b);a.suggestions=this.verifySuggestionsFormat(a.suggestions); 6341d.noCache||(this.cachedResponse[c]=a,0===a.suggestions.length&&this.badQueries.push(c));b===this.getQuery(this.currentValue)&&(this.suggestions=a.suggestions,this.suggest())},activate:function(a){var b=this.classes.selected,c=d(this.suggestionsContainer),e=c.children();c.children("."+b).removeClass(b);this.selectedIndex=a;return-1!==this.selectedIndex&&e.length>this.selectedIndex?(a=e.get(this.selectedIndex),d(a).addClass(b),a):null},selectHint:function(){var a=d.inArray(this.hint,this.suggestions); 6342this.select(a)},select:function(a){this.hide();this.onSelect(a)},moveUp:function(){-1!==this.selectedIndex&&(0===this.selectedIndex?(d(this.suggestionsContainer).children().first().removeClass(this.classes.selected),this.selectedIndex=-1,this.el.val(this.currentValue),this.findBestHint()):this.adjustScroll(this.selectedIndex-1))},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&this.adjustScroll(this.selectedIndex+1)},adjustScroll:function(a){var b=this.activate(a),c,e;b&&(b=b.offsetTop, 6343c=d(this.suggestionsContainer).scrollTop(),e=c+this.options.maxHeight-25,b<c?d(this.suggestionsContainer).scrollTop(b):b>e&&d(this.suggestionsContainer).scrollTop(b-this.options.maxHeight+25),this.el.val(this.getValue(this.suggestions[a].value)),this.signalHint(null))},onSelect:function(a){var b=this.options.onSelect;a=this.suggestions[a];this.currentValue=this.getValue(a.value);this.el.val(this.currentValue);this.signalHint(null);this.suggestions=[];this.selection=a;d.isFunction(b)&&b.call(this.element, 6344a)},getValue:function(a){var b=this.options.delimiter,c;if(!b)return a;c=this.currentValue;b=c.split(b);return 1===b.length?a:c.substr(0,c.length-b[b.length-1].length)+a},dispose:function(){this.el.off(".autocomplete").removeData("autocomplete");this.disableKillerFn();d(window).off("resize.autocomplete",this.fixPositionCapture);d(this.suggestionsContainer).remove()}};d.fn.autocomplete=function(a,b){return 0===arguments.length?this.first().data("autocomplete"):this.each(function(){var c=d(this),e= 6345c.data("autocomplete");if("string"===typeof a){if(e&&"function"===typeof e[a])e[a](b)}else e&&e.dispose&&e.dispose(),e=new g(this,a),c.data("autocomplete",e)})}}); 6346/* End */ 6347; 6348; /* Start:"a:4:{s:4:"full";s:46:"/local/js/basic/jquery.tabs.js?152302668817921";s:6:"source";s:30:"/local/js/basic/jquery.tabs.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 6349(function($) { // block scope 6350 6351$.extend({ 6352 tabs: { 6353 remoteCount: 0 // TODO in Tabs 3 this is going to be more cleanly in one single namespace 6354 } 6355}); 6356 6357$.fn.tabs = function(initial, settings) { 6358 6359 // settings 6360 if (typeof initial == 'object') settings = initial; // no initial tab given but a settings object 6361 settings = $.extend({ 6362 initial: (initial && typeof initial == 'number' && initial > 0) ? --initial : 0, 6363 disabled: null, 6364 bookmarkable: $.ajaxHistory ? true : false, 6365 remote: false,
6366 spinner: 'Loading…', 6367 hashPrefix: 'remote-tab-', 6368 fxFade: null, 6369 fxSlide: null, 6370 fxShow: null, 6371 fxHide: null, 6372 fxSpeed: 'normal', 6373 fxShowSpeed: null, 6374 fxHideSpeed: null, 6375 fxAutoHeight: false, 6376 onClick: null, 6377 onHide: null, 6378 onShow: null, 6379 navClass: 'tabs-nav', 6380 selectedClass: 'tabs-selected', 6381 disabledClass: 'tabs-disabled', 6382 containerClass: 'tabs-container', 6383 hideClass: 'tabs-hide', 6384 loadingClass: 'tabs-loading', 6385 tabStruct: 'div' 6386 }, settings || {}); 6387 6388 $.browser = {msie6: false}; //$.browser.msie && ($.browser.version && $.browser.version < 7 || /MSIE 6.0/.test(navigator.userAgent)); // do not check for 6.0 alone, userAgent in Windows Vista has "Windows NT 6.0" 6389 6390 // helper to prevent scroll to fragment 6391 function unFocus() { 6392 scrollTo(0, 0); 6393 } 6394 6395 // initialize tabs 6396 return this.each(function() { 6397 6398 // remember wrapper for later 6399 var container = this; 6400 6401 // setup nav 6402 var nav = $('ul.' + settings.navClass, container); 6403 nav = nav.size() && nav || $('>ul:eq(0)', container); // fallback to default structure 6404 var tabs = $('a', nav); 6405 6406 // prepare remote tabs 6407 if (settings.remote) { 6408 tabs.each(function() { 6409 var id = settings.hashPrefix + (++$.tabs.remoteCount), hash = '#' + id, url = this.href; 6410 this.href = hash; 6411 $('<div id="' + id + '" class="' + settings.containerClass + '"></div>').appendTo(container); 6412 6413 $(this).bind('loadRemoteTab', function(e, callback) { 6414 var $$ = $(this).addClass(settings.loadingClass), span = $('span', this)[0], tabTitle = span.innerHTML; 6415 if (settings.spinner) { 6416 // TODO if spinner is image 6417 span.innerHTML = '<em>' + settings.spinner + '</em>'; // WARNING: html(...) crashes Safari with jQuery 1.1.2 6418 } 6419 setTimeout(function() { // Timeout is again required in IE, "wait" for id being restored 6420 $(hash).load(url, function() { 6421 if (settings.spinner) { 6422 span.innerHTML = tabTitle; // WARNING: html(...) crashes Safari with jQuery 1.1.2 6423 } 6424 $$.removeClass(settings.loadingClass); 6425 callback && callback(); 6426 }); 6427 }, 0); 6428 }); 6429 6430 }); 6431 } 6432 6433 // set up containers 6434 var containers = $('div.' + settings.containerClass, container); 6435 containers = containers.size() && containers || $('>' + settings.tabStruct, container); // fallback to default structure 6436 6437 // attach classes for styling if not present 6438 nav.is('.' + settings.navClass) || nav.addClass(settings.navClass); 6439 containers.each(function() { 6440 var $$ = $(this); 6441 $$.is('.' + settings.containerClass) || $$.addClass(settings.containerClass); 6442 }); 6443 6444 // try to retrieve active tab from class in HTML 6445 var hasSelectedClass = $('li', nav).index( $('li.' + settings.selectedClass, nav)[0] ); 6446 if (hasSelectedClass >= 0) { 6447 settings.initial = hasSelectedClass; 6448 } 6449 6450 // try to retrieve active tab from hash in url, will override class in HTML 6451 if (location.hash) { 6452 tabs.each(function(i) { 6453 if (this.hash == location.hash) { 6454 settings.initial = i; 6455 // prevent page scroll to fragment 6456 if (($.browser.msie || $.browser.opera) && !settings.remote) { 6457 var toShow = $(location.hash); 6458 var toShowId = toShow.attr('id'); 6459 toShow.attr('id', ''); 6460 setTimeout(function() { 6461 toShow.attr('id', toShowId); // restore id 6462 }, 500); 6463 } 6464 unFocus(); 6465 return false; // break 6466 } 6467 }); 6468 } 6469 if ($.browser.msie) { 6470 unFocus(); // fix IE focussing bottom of the page for some unknown reason 6471 } 6472 6473 // highlight tab accordingly 6474 containers.filter(':eq(' + settings.initial + ')').show().end().not(':eq(' + settings.initial + ')').addClass(settings.hideClass); 6475 $('li', nav).removeClass(settings.selectedClass).eq(settings.initial).addClass(settings.selectedClass); // we need to remove classes eventually if hash takes precedence over class 6476 // trigger load of initial tab 6477 tabs.eq(settings.initial).trigger('loadRemoteTab').end(); 6478 6479 // setup auto height 6480 if (settings.fxAutoHeight) { 6481 // helper 6482 var _setAutoHeight = function(reset) {
6483 // get tab heights in top to bottom ordered array 6484 var heights = $.map(containers.get(), function(el) { 6485 var h, jq = $(el); 6486 if (reset) { 6487 if ($.browser.msie6) { 6488 el.style.removeExpression('behaviour'); 6489 el.style.height = ''; 6490 el.minHeight = null; 6491 } 6492 h = jq.css({'min-height': ''}).height(); // use jQuery's height() to get hidden element values 6493 } else { 6494 h = jq.height(); // use jQuery's height() to get hidden element values 6495 } 6496 return h; 6497 }).sort(function(a, b) { 6498 return b - a; 6499 }); 6500 if ($.browser.msie6) { 6501 containers.each(function() { 6502 this.minHeight = heights[0] + 'px'; 6503 this.style.setExpression('behaviour', 'this.style.height = this.minHeight ? this.minHeight : "1px"'); // using an expression to not make print styles useless 6504 }); 6505 } else { 6506 containers.css({'min-height': heights[0] + 'px'}); 6507 } 6508 }; 6509 // call once for initialization 6510 _setAutoHeight(); 6511 // trigger auto height adjustment if needed 6512 var cachedWidth = container.offsetWidth; 6513 var cachedHeight = container.offsetHeight; 6514 var watchFontSize = $('#tabs-watch-font-size').get(0) || $('<span id="tabs-watch-font-size">M</span>').css({display: 'block', position: 'absolute', visibility: 'hidden'}).appendTo(document.body).get(0); 6515 var cachedFontSize = watchFontSize.offsetHeight; 6516 setInterval(function() { 6517 var currentWidth = container.offsetWidth; 6518 var currentHeight = container.offsetHeight; 6519 var currentFontSize = watchFontSize.offsetHeight; 6520 if (currentHeight > cachedHeight || currentWidth != cachedWidth || currentFontSize != cachedFontSize) { 6521 _setAutoHeight((currentWidth > cachedWidth || currentFontSize < cachedFontSize)); // if heights gets smaller reset min-height 6522 cachedWidth = currentWidth; 6523 cachedHeight = currentHeight; 6524 cachedFontSize = currentFontSize; 6525 } 6526 }, 50); 6527 } 6528 6529 // setup animations 6530 var showAnim = {}, hideAnim = {}, showSpeed = settings.fxShowSpeed || settings.fxSpeed, hideSpeed = settings.fxHideSpeed || settings.fxSpeed; 6531 if (settings.fxSlide || settings.fxFade) { 6532 if (settings.fxSlide) { 6533 showAnim['height'] = 'show'; 6534 hideAnim['height'] = 'hide'; 6535 } 6536 if (settings.fxFade) { 6537 showAnim['opacity'] = 'show'; 6538 hideAnim['opacity'] = 'hide'; 6539 } 6540 } else { 6541 if (settings.fxShow) { 6542 showAnim = settings.fxShow; 6543 } else { // use some kind of animation to prevent browser scrolling to the tab 6544 showAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox 6545 showSpeed = 1; // as little as 1 is sufficient 6546 } 6547 if (settings.fxHide) { 6548 hideAnim = settings.fxHide; 6549 } else { // use some kind of animation to prevent browser scrolling to the tab 6550 hideAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox 6551 hideSpeed = 1; // as little as 1 is sufficient 6552 } 6553 } 6554 6555 // callbacks 6556 var onClick = settings.onClick, onHide = settings.onHide, onShow = settings.onShow; 6557 6558 // attach activateTab event, required for activating a tab programmatically 6559 tabs.bind('triggerTab', function() { 6560 6561 // if the tab is already selected or disabled or animation is still running stop here 6562 var li = $(this).parents('li:eq(0)'); 6563 if (container.locked || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass)) { 6564 return false;
6565 } 6566 6567 var hash = this.hash; 6568 6569 if ($.browser.msie) { 6570 6571 $(this).trigger('click'); 6572 if (settings.bookmarkable) { 6573 $.ajaxHistory.update(hash); 6574 location.hash = hash.replace('#', ''); 6575 } 6576 6577 } else if ($.browser.safari) { 6578 6579 // Simply setting location.hash puts Safari into the eternal load state... ugh! Submit a form instead. 6580 var tempForm = $('<form action="' + hash + '"><div><input type="submit" value="h" /></div></form>').get(0); // no need to append it to the body 6581 tempForm.submit(); // does not trigger the form's submit event... 6582 $(this).trigger('click'); // ...thus do stuff here 6583 if (settings.bookmarkable) { 6584 $.ajaxHistory.update(hash); 6585 } 6586 6587 } else { 6588 6589 if (settings.bookmarkable) { 6590 location.hash = hash.replace('#', ''); 6591 } else { 6592 $(this).trigger('click'); 6593 } 6594 6595 } 6596 6597 }); 6598 6599 // attach disable event, required for disabling a tab 6600 tabs.bind('disableTab', function() { 6601 var li = $(this).parents('li:eq(0)'); 6602 if ($.browser.safari) { /* fix opacity of tab after disabling in Safari... */ 6603 li.animate({ opacity: 0 }, 1, function() { 6604 li.css({opacity: ''}); 6605 }); 6606 } 6607 li.addClass(settings.disabledClass); 6608 6609 }); 6610 6611 // disabled from settings 6612 if (settings.disabled && settings.disabled.length) { 6613 for (var i = 0, k = settings.disabled.length; i < k; i++) { 6614 tabs.eq(--settings.disabled[i]).trigger('disableTab').end(); 6615 } 6616 }; 6617 6618 // attach enable event, required for reenabling a tab 6619 tabs.bind('enableTab', function() { 6620 var li = $(this).parents('li:eq(0)'); 6621 li.removeClass(settings.disabledClass); 6622 if ($.browser.safari) { /* fix disappearing tab after enabling in Safari... */ 6623 li.animate({ opacity: 1 }, 1, function() { 6624 li.css({opacity: ''}); 6625 }); 6626 } 6627 }); 6628 6629 // attach click event 6630 tabs.bind('click', function(e) { 6631 6632 var trueClick = e.clientX; // add to history only if true click occured, not a triggered click 6633 var clicked = this, li = $(this).parents('li:eq(0)'), toShow = $(this.hash), toHide = containers.filter(':visible'); 6634 6635 // if animation is still running, tab is selected or disabled or onClick callback returns false stop here 6636 // check if onClick returns false last so that it is not executed for a disabled tab 6637 if (container['locked'] || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass) || typeof onClick == 'function' && onClick(this, toShow[0], toHide[0]) === false) { 6638 this.blur(); 6639 return false; 6640 } 6641 6642 container['locked'] = true; 6643 6644 // show new tab 6645 if (toShow.size()) { 6646 6647 // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled 6648 if ($.browser.msie && settings.bookmarkable) { 6649 var toShowId = this.hash.replace('#', ''); 6650 toShow.attr('id', ''); 6651 setTimeout(function() { 6652 toShow.attr('id', toShowId); // restore id 6653 }, 0); 6654 } 6655 6656 var resetCSS = { display: '', overflow: '', height: '' }; 6657 if (!$.browser.msie) { // not in IE to prevent ClearType font issue 6658 resetCSS['opacity'] = ''; 6659 } 6660 6661 // switch tab, animation prevents browser scrolling to the fragment 6662 function switchTab() { 6663 if (settings.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click 6664 $.ajaxHistory.update(clicked.hash); 6665 } 6666 toHide.animate(hideAnim, hideSpeed, function() { // 6667 $(clicked).parents('li:eq(0)').addClass(settings.selectedClass).siblings().removeClass(settings.selectedClass); 6668 toHide.addClass(settings.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc. 6669 if (typeof onHide == 'function') { 6670 onHide(clicked, toShow[0], toHide[0]); 6671 } 6672 if (!(settings.fxSlide || settings.fxFade || settings.fxShow)) { 6673 toShow.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab containers 6674 } 6675 toShow.animate(showAnim, showSpeed, function() { 6676 toShow.removeClass(settings.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc. 6677 if ($.browser.msie) { 6678 toHide[0].style.filter = ''; 6679 toShow[0].style.filter = ''; 6680 } 6681 if (typeof onShow == 'function') { 6682 onShow(clicked, toShow[0], toHide[0]); 6683 } 6684 container['locked'] = null; 6685 }); 6686 }); 6687 } 6688 6689 if (!settings.remote) { 6690 switchTab(); 6691 } else { 6692 $(clicked).trigger('loadRemoteTab', [switchTab]); 6693 } 6694 6695 } else { 6696 alert('There is no such container.'); 6697 } 6698 6699 // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash 6700 var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0; 6701 var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0; 6702 setTimeout(function() { 6703 window.scrollTo(scrollX, scrollY); 6704 }, 0); 6705 6706 this.blur(); // prevent IE from keeping other link focussed when using the back button 6707 6708 return settings.bookmarkable && !!trueClick; // convert undefined to Boolean for IE 6709 6710 }); 6711 6712 // enable history support if bookmarking and history is turned on 6713 if (settings.bookmarkable) { 6714 $.ajaxHistory.initialize(function() { 6715 tabs.eq(settings.initial).trigger('click').end(); 6716 }); 6717 } 6718 6719 }); 6720 6721}; 6722 6723var tabEvents = ['triggerTab', 'disableTab', 'enableTab']; 6724for (var i = 0; i < tabEvents.length; i++) { 6725 $.fn[tabEvents[i]] = (function(tabEvent) { 6726 return function(tab) { 6727 return this.each(function() { 6728 var nav = $('ul.tabs-nav' , this); 6729 nav = nav.size() && nav || $('>ul:eq(0)', this); // fallback to default structure 6730 var a; 6731 if (!tab || typeof tab == 'number') { 6732 a = $('li a', nav).eq((tab && tab > 0 && tab - 1 || 0)); // fall back to 0 6733 } else if (typeof tab == 'string') { 6734 a = $('li a[@href$="#' + tab + '"]', nav); 6735 } 6736 a.trigger(tabEvent); 6737 }); 6738 }; 6739 })(tabEvents[i]); 6740} 6741 6742$.fn.activeTab = function() { 6743 var selectedTabs = []; 6744 this.each(function() { 6745 var nav = $('ul.tabs-nav' , this); 6746 nav = nav.size() && nav || $('>ul:eq(0)', this); //fallback to default structure 6747 var lis = $('li', nav); 6748 selectedTabs.push(lis.index( lis.filter('.tabs-selected')[0] ) + 1); 6749 }); 6750 return selectedTabs[0]; 6751}; 6752 6753})(jQuery); 6754/* End */ 6755; 6756; /* Start:"a:4:{s:4:"full";s:67:"/local/js/input/formstyler/jquery.formstyler.min.js?152302668818798";s:6:"source";s:51:"/local/js/input/formstyler/jquery.formstyler.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 6757/* jQuery Form Styler v1.7.6 | (c) Dimox | https://github.com/Dimox/jQueryFormStyler */ 6758!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";function t(t,s){this.element=t,this.options=e.extend({},l,s),this.init()}function s(t){if(!e(t.target).parents().hasClass("jq-selectbox")&&"OPTION"!=t.target.nodeName&&e("div.jq-selectbox.opened").length){var s=e("div.jq-selectbox.opened"),l=e("div.jq-selectbox__search input",s),o=e("div.jq-selectbox__dropdown",s),a=s.find("select").data("_"+i).options;a.onSelectClosed.call(s),l.length&&l.val("").keyup(),o.hide().find("li.sel").addClass("selected"),s.removeClass("focused opened dropup dropdown")}}var i="styler",l={idSuffix:"-styler",filePlaceholder:"Файл не вÑбÑан",fileBrowse:"ÐбзоÑ...",fileNumber:"Ð
6758ÑбÑано Ñайлов: %s",selectPlaceholder:"ÐÑбеÑиÑе...",selectSearch:!1,selectSearchLimit:10,selectSearchNotFound:"Совпадений не найдено",selectSearchPlaceholder:"ÐоиÑк...",selectVisibleOptions:0,singleSelectzIndex:"100",selectSmartPositioning:!0,onSelectOpened:function(){},onSelectClosed:function(){},onFormStyled:function(){}};t.prototype={init:function(){function t(){void 0!==i.attr("id")&&""!==i.attr("id")&&(this.id=i.attr("id")+l.idSuffix),this.title=i.attr("title"),this.classes=i.attr("class"),this.data=i.data()}var i=e(this.element),l=this.options,o=!(!navigator.userAgent.match(/(iPad|iPhone|iPod)/i)||navigator.userAgent.match(/(Windows\sPhone)/i)),a=!(!navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/(Windows\sPhone)/i));if(i.is(":checkbox")){var d=function(){var s=new t,l=e('<div class="jq-checkbox"><div class="jq-checkbox__div"></div></div>').attr({id:s.id,title:s.title}).addClass(s.classes).data(s.data);i.css({position:"absolute",zIndex:"-1",opacity:0,margin:0,padding:0}).after(l).prependTo(l),l.attr("unselectable","on").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none",display:"inline-block",position:"relative",overflow:"hidden"}),i.is(":checked")&&l.addClass("checked"),i.is(":disabled")&&l.addClass("disabled"),l.click(function(e){e.preventDefault(),l.is(".disabled")||(i.is(":checked")?(i.prop("checked",!1),l.removeClass("checked")):(i.prop("checked",!0),l.addClass("checked")),i.focus().change())}),i.closest("label").add('label[for="'+i.attr("id")+'"]').on("click.styler",function(t){e(t.target).is("a")||e(t.target).closest(l).length||(l.triggerHandler("click"),t.preventDefault())}),i.on("change.styler",function(){i.is(":checked")?l.addClass("checked"):l.removeClass("checked")}).on("keydown.styler",function(e){32==e.which&&l.click()}).on("focus.styler",function(){l.is(".disabled")||l.addClass("focused")}).on("blur.styler",function(){l.removeClass("focused")})};d(),i.on("refresh",function(){i.closest("label").add('label[for="'+i.attr("id")+'"]').off(".styler"),i.off(".styler").parent().before(i).remove(),d()})}else if(i.is(":radio")){var n=function(){var s=new t,l=e('<div class="jq-radio"><div class="jq-radio__div"></div></div>').attr({id:s.id,title:s.title}).addClass(s.classes).data(s.data);i.css({position:"absolute",zIndex:"-1",opacity:0,margin:0,padding:0}).after(l).prependTo(l),l.attr("unselectable","on").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none",display:"inline-block",position:"relative"}),i.is(":checked")&&l.addClass("checked"),i.is(":disabled")&&l.addClass("disabled"),e.fn.commonParents=function(){var t=this;return t.first().parents().filter(function(){return e(this).find(t).length===t.length})},e.fn.commonParent=function(){return e(this).commonParents().first()},l.click(function(t){if(t.preventDefault(),!l.is(".disabled")){var s=e('input[name="'+i.attr("name")+'"]');s.commonParent().find(s).prop("checked",!1).parent().removeClass("checked"),i.prop("checked",!0).parent().addClass("checked"),i.focus().change()}}),i.closest("label").add('label[for="'+i.attr("id")+'"]').on("click.styler",function(t){e(t.target).is("a")||e(t.target).closest(l).length||(l.triggerHandler("click"),t.preventDefault())}),i.on("change.styler",function(){i.parent().addClass("checked")}).on("focus.styler",function(){l.is(".disabled")||l.addClass("focused")}).on("blur.styler",function(){l.removeClass("focused")})};n(),i.on("refresh",function(){i.closest("label").add('label[for="'+i.attr("id")+'"]').off(".styler"),i.off(".styler").parent().before(i).remove(),n()})}else if(i.is(":file")){i.css({position:"absolute",top:0,right:0,margin:0,padding:0,opacity:0,fontSize:"100px"});var r=function(){var s=new t,o=i.data("placeholder");void 0===o&&(o=l.filePlaceholder);var a=i.data("browse");void 0!==a&&""!==a||(a=l.fileBrowse);var d=e('<div class="jq-file"><div class="jq-file__name">'+o+'</div><div class="jq-file__browse">'+a+"</div></div>").css({display:"inline-block",position:"relative",overflow:"hidden"}).attr({id:s.id,title:s.title}).addClass(s.classes).data(s.data);i.after(d).appendTo(d),i.is(":disabled")&&d.addClass("disabled"),i.on("change.styler",function(){var t=i.val(),s=e("div.jq-file__name",d);if(i.is("[multiple]")){t="";var a=i[0].files.length;if(a>0){var n=i.data("number");void 0===n&&(n=l.fileNumber),n=n.replace("%s",a),t=n}}s.text(t.replace(/.+[\\\/]/,"")),""===t?(s.text(o),d.removeClass("changed")):d.addClass("changed")}).on("focus.styler",function(){d.addClass("focused")}).on("blur.styler",function(){d.removeClass("focused")}).on("click.styler",function(){d.removeClass("focused")})};r(),i.on("refresh",function(){i.off(".styler").parent().before(i).remove(),r()})}else if(i.is('input[type="number"]')){var c=function(){var s=new t,l=e('<div class="jq-number"><div class="jq-number__spin minus"></div><div class="jq-number__spin plus"></div></div>').attr({id:s.id,title:s.title}).addClass(s.classes).data(s.data);i.after(l).prependTo(l).wrap('<div class="jq-number__field"></div>'),i.is(":disabled")&&l.addClass("disabled");var o,a,d,n=null,r=null;void 0!==i.attr("min")&&(o=i.attr("min")),void 0!==i.attr("max")&&(a=i.attr("max")),d=void 0!==i.attr("step")&&e.isNumeric(i.attr("step"))?Number(i.attr("step")):Number(1);var c=function(t){var s,l=i.val();e.isNumeric(l)||(l=0,i.val("0")),t.is(".minus")?s=Number(l)-d:t.is(".plus")&&(s=Number(l)+d);var n=(d.toString().split(".")[1]||[]).length;if(n>0){for(var r="1";r.length<=n;)r+="0";s=Math.round(s*r)/r}e.isNumeric(o)&&e.isNumeric(a)?s>=o&&a>=s&&i.val(s):e.isNumeric(o)&&!e.isNumeric(a)?s>=o&&i.val(s):!e.isNumeric(o)&&e.isNumeric(a)?a>=s&&i.val(s):i.val(s)};l.is(".disabled")||(l.on("mousedown","div.jq-number__spin",function(){var t=e(this);c(t),n=setTimeout(function(){r=setInterval(function(){c(t)},40)},350)}).on("mouseup mouseout","div.jq-number__spin",function(){clearTimeout(n),clearInterval(r)}).on("mouseup","div.jq-number__spin",function(){i.change()}),i.on("focus.styler",function(){l.addClass("focused")}).on("blur.styler",function(){l.removeClass("focused")}))};
6758c(),i.on("refresh",function(){i.off(".styler").closest(".jq-number").before(i).remove(),c()})}else if(i.is("select")){var f=function(){function d(t){t.off("mousewheel DOMMouseScroll").on("mousewheel DOMMouseScroll",function(t){var s=null;"mousewheel"==t.type?s=-1*t.originalEvent.wheelDelta:"DOMMouseScroll"==t.type&&(s=40*t.originalEvent.detail),s&&(t.stopPropagation(),t.preventDefault(),e(this).scrollTop(s+e(this).scrollTop()))})}function n(){for(var e=0;e<f.length;e++){var t=f.eq(e),s="",i="",o="",a="",d="",n="",r="",c="",u="",p="disabled",v="selected sel disabled";t.prop("selected")&&(i="selected sel"),t.is(":disabled")&&(i=p),t.is(":selected:disabled")&&(i=v),void 0!==t.attr("id")&&""!==t.attr("id")&&(a=' id="'+t.attr("id")+l.idSuffix+'"'),void 0!==t.attr("title")&&""!==f.attr("title")&&(d=' title="'+t.attr("title")+'"'),void 0!==t.attr("class")&&(r=" "+t.attr("class"),u=' data-jqfs-class="'+t.attr("class")+'"');var m=t.data();for(var g in m)""!==m[g]&&(n+=" data-"+g+'="'+m[g]+'"');i+r!==""&&(o=' class="'+i+r+'"'),s="<li"+u+n+o+d+a+">"+t.html()+"</li>",t.parent().is("optgroup")&&(void 0!==t.parent().attr("class")&&(c=" "+t.parent().attr("class")),s="<li"+u+n+' class="'+i+r+" option"+c+'"'+d+a+">"+t.html()+"</li>",t.is(":first-child")&&(s='<li class="optgroup'+c+'">'+t.parent().attr("label")+"</li>"+s)),h+=s}}function r(){var a=new t,r="",c=i.data("placeholder"),u=i.data("search"),p=i.data("search-limit"),v=i.data("search-not-found"),m=i.data("search-placeholder"),g=i.data("z-index"),b=i.data("smart-positioning");void 0===c&&(c=l.selectPlaceholder),void 0!==u&&""!==u||(u=l.selectSearch),void 0!==p&&""!==p||(p=l.selectSearchLimit),void 0!==v&&""!==v||(v=l.selectSearchNotFound),void 0===m&&(m=l.selectSearchPlaceholder),void 0!==g&&""!==g||(g=l.singleSelectzIndex),void 0!==b&&""!==b||(b=l.selectSmartPositioning);var y=e('<div class="jq-selectbox jqselect"><div class="jq-selectbox__select" style="position: relative"><div class="jq-selectbox__select-text"></div><div class="jq-selectbox__trigger"><div class="jq-selectbox__trigger-arrow"></div></div></div></div>').css({display:"inline-block",position:"relative",zIndex:g}).attr({id:a.id,title:a.title}).addClass(a.classes).data(a.data);i.css({margin:0,padding:0}).after(y).prependTo(y);
vendor: 1,155 bytes, line 6758
6758var C=e("div.jq-selectbox__select",y),x=e("div.jq-selectbox__select-text",y),w=f.filter(":selected");n(),u&&(r='<div class="jq-selectbox__search"><input type="search" autocomplete="off" placeholder="'+m+'"></div><div class="jq-selectbox__not-found">'+v+"</div>");var q=e('<div class="jq-selectbox__dropdown" style="position: absolute">'+r+'<ul style="position: relative; list-style: none; overflow: auto; overflow-x: hidden">'+h+"</ul></div>");y.append(q);var _=e("ul",q),j=e("li",q),k=e("input",q),S=e("div.jq-selectbox__not-found",q).hide();j.length<p&&k.parent().hide(),""===f.first().text()&&f.first().is(":selected")?x.text(c).addClass("placeholder"):x.text(w.text());var T=0,P=0;if(j.css({display:"inline-block"}),j.each(function(){var t=e(this);t.innerWidth()>T&&(T=t.innerWidth(),P=t.width())}),j.css({display:""}),x.is(".placeholder")&&x.width()>T)x.width(x.width());else{var N=y.clone().appendTo("body").width("auto"),A=N.outerWidth();N.remove(),A==y.outerWidth()&&x.width(P)}T>y.width()&&q.width(T),""===f.first().text()&&""!==i.data("placeholder")&&j.first().hide(),i.css({position:"absolute",left:0,top:0,width:"100%",height:"100%",opacity:0}
6758);var D=y.outerHeight(!0),I=k.parent().outerHeight(!0),H=_.css("max-height"),z=j.filter(".selected");z.length<1&&j.first().addClass("selected sel"),void 0===j.data("li-height")&&j.data("li-height",j.outerHeight());var K=q.css("top");if("auto"==q.css("left")&&q.css({left:0}),"auto"==q.css("top")&&(q.css({top:D}),K=D),q.hide(),z.length&&(f.first().text()!=w.text()&&y.addClass("changed"),y.data("jqfs-class",z.data("jqfs-class")),y.addClass(z.data("jqfs-class"))),i.is(":disabled"))return y.addClass("disabled"),!1;C.click(function(){if(e("div.jq-selectbox").filter(".opened").length&&l.onSelectClosed.call(e("div.jq-selectbox").filter(".opened")),i.focus(),!o){var t=e(window),s=j.data("li-height"),a=y.offset().top,n=t.height()-D-(a-t.scrollTop()),r=i.data("visible-options");void 0!==r&&""!==r||(r=l.selectVisibleOptions);var c=5*s,h=s*r;r>0&&6>r&&(c=h),0===r&&(h="auto");var u=function(){q.height("auto").css({bottom:"auto",top:K});var e=function(){_.css("max-height",Math.floor((n-20-I)/s)*s)};e(),_.css("max-height",h),"none"!=H&&_.css("max-height",H),n<q.outerHeight()+20&&e()},p=function(){q.height("auto").css({top:"auto",bottom:K});var e=function(){_.css("max-height",Math.floor((a-t.scrollTop()-20-I)/s)*s)};e(),_.css("max-height",h),"none"!=H&&_.css("max-height",H),a-t.scrollTop()-20<q.outerHeight()+20&&e()};b===!0||1===b?n>c+I+20?(u(),y.removeClass("dropup").addClass("dropdown")):(p(),y.removeClass("dropdown").addClass("dropup")):b!==!1&&0!==b||n>c+I+20&&(u(),y.removeClass("dropup").addClass("dropdown")),y.offset().left+q.outerWidth()>t.width()&&q.css({left:"auto",right:0}),e("div.jqselect").css({zIndex:g-1}).removeClass("opened"),y.css({zIndex:g}),q.is(":hidden")?(e("div.jq-selectbox__dropdown:visible").hide(),q.show(),y.addClass("opened focused"),l.onSelectOpened.call(y)):(q.hide(),y.removeClass("opened dropup dropdown"),e("div.jq-selectbox").filter(".opened").length&&l.onSelectClosed.call(y)),k.length&&(k.val("").keyup(),S.hide(),k.keyup(function(){var t=e(this).val();j.each(function(){e(this).html().match(new RegExp(".*?"+t+".*?","i"))?e(this).show():e(this).hide()}),""===f.first().text()&&""!==i.data("placeholder")&&j.first().hide(),j.filter(":visible").length<1?S.show():S.hide()})),j.filter(".selected").length&&(""===i.val()?_.scrollTop(0):(_.innerHeight()/s%2!==0&&(s/=2),_.scrollTop(_.scrollTop()+j.filter(".selected").position().top-_.innerHeight()/2+s))),d(_)}}),j.hover(function(){e(this).siblings().removeClass("selected")});var M=j.filter(".selected").text();j.filter(":not(.disabled):not(.optgroup)").click(function(){i.focus();var t=e(this),s=t.text();if(!t.is(".selected")){var o=t.index();o-=t.prevAll(".optgroup").length,t.addClass("selected sel").siblings().removeClass("selected sel"),f.prop("selected",!1).eq(o).prop("selected",!0),M=s,x.text(s),y.data("jqfs-class")&&y.removeClass(y.data("jqfs-class")),y.data("jqfs-class",t.data("jqfs-class")),y.addClass(t.data("jqfs-class")),i.change()}q.hide(),y.removeClass("opened dropup dropdown"),l.onSelectClosed.call(y)}),q.mouseout(function(){e("li.sel",q).addClass("selected")}),i.on("change.styler",function(){x.text(f.filter(":selected").text()).removeClass("placeholder"),j.removeClass("selected sel").not(".optgroup").eq(i[0].selectedIndex).addClass("selected sel"),f.first().text()!=j.filter(".selected").text()?y.addClass("changed"):y.removeClass("changed")}).on("focus.styler",function(){y.addClass("focused"),e("div.jqselect").not(".focused").removeClass("opened dropup dropdown").find("div.jq-selectbox__dropdown").hide()}).on("blur.styler",function(){y.removeClass("focused")}).on("keydown.styler keyup.styler",function(e){var t=j.data("li-height");""===i.val()?x.text(c).addClass("placeholder"):x.text(f.filter(":selected").text()),j.removeClass("selected sel").not(".optgroup").eq(i[0].selectedIndex).addClass("selected sel"),38!=e.which&&37!=e.which&&33!=e.which&&36!=e.which||(""===i.val()?_.scrollTop(0):_.scrollTop(_.scrollTop()+j.filter(".selected").position().top)),40!=e.which&&39!=e.which&&34!=e.which&&35!=e.which||_.scrollTop(_.scrollTop()+j.filter(".selected").position().top-_.innerHe
6758ight()+t),13==e.which&&(e.preventDefault(),q.hide(),y.removeClass("opened dropup dropdown"),l.onSelectClosed.call(y))}).on("keydown.styler",function(e){32==e.which&&(e.preventDefault(),C.click())}),s.registered||(e(document).on("click",s),s.registered=!0)}function c(){var s=new t,l=e('<div class="jq-select-multiple jqselect"></div>').css({display:"inline-block",position:"relative"}).attr({id:s.id,title:s.title}).addClass(s.classes).data(s.data);i.css({margin:0,padding:0}).after(l),n(),l.append("<ul>"+h+"</ul>");var o=e("ul",l).css({position:"relative","overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}),a=e("li",l).attr("unselectable","on"),r=i.attr("size"),c=o.outerHeight(),u=a.outerHeight();void 0!==r&&r>0?o.css({height:u*r}):o.css({height:4*u}),c>l.height()&&(o.css("overflowY","scroll"),d(o),a.filter(".selected").length&&o.scrollTop(o.scrollTop()+a.filter(".selected").position().top)),i.prependTo(l).css({position:"absolute",left:0,top:0,width:"100%",height:"100%",opacity:0}),i.is(":disabled")?(l.addClass("disabled"),f.each(function(){e(this).is(":selected")&&a.eq(e(this).index()).addClass("selected")})):(a.filter(":not(.disabled):not(.optgroup)").click(function(t){i.focus();var s=e(this);if(t.ctrlKey||t.metaKey||s.addClass("selected"),t.shiftKey||s.addClass("first"),t.ctrlKey||t.metaKey||t.shiftKey||s.siblings().removeClass("selected first"),(t.ctrlKey||t.metaKey)&&(s.is(".selected")?s.removeClass("selected first"):s.addClass("selected first"),s.siblings().removeClass("first")),t.shiftKey){var l=!1,o=!1;s.siblings().removeClass("selected").siblings(".first").addClass("selected"),s.prevAll().each(function(){e(this).is(".first")&&(l=!0)}),s.nextAll().each(function(){e(this).is(".first")&&(o=!0)}),l&&s.prevAll().each(function(){return e(this).is(".selected")?!1:void e(this).not(".disabled, .optgroup").addClass("selected")}),o&&s.nextAll().each(function(){return e(this).is(".selected")?!1:void e(this).not(".disabled, .optgroup").addClass("selected")}),1==a.filter(".selected").length&&s.addClass("first")}f.prop("selected",!1),a.filter(".selected").each(function(){var t=e(this),s=t.index();t.is(".option")&&(s-=t.prevAll(".optgroup").length),f.eq(s).prop("selected",!0)}),i.change()}),f.each(function(t){e(this).data("optionIndex",t)}),i.on("change.styler",function(){a.removeClass("selected");var t=[];f.filter(":selected").each(function(){t.push(e(this).data("optionIndex"))}),a.not(".optgroup").filter(function(s){return e.inArray(s,t)>-1}).addClass("selected")}).on("focus.styler",function(){l.addClass("focused")}).on("blur.styler",function(){l.removeClass("focused")}),c>l.height()&&i.on("keydown.styler",function(e){38!=e.which&&37!=e.which&&33!=e.which||o.scrollTop(o.scrollTop()+a.filter(".selected").position().top-u),40!=e.which&&39!=e.which&&34!=e.which||o.scrollTop(o.scrollTop()+a.filter(".selected:last").position().top-o.innerHeight()+2*u)}))}var f=e("option",i),h="";if(i.is("[multiple]")){if(a||o)return;c()}else r()};f(),i.on("refresh",function(){i.off(".styler").parent().before(i).remove(),f()})}else i.is(":reset")&&i.on("click",function(){setTimeout(function(){i.closest("form").find("input, select").trigger("refresh")},1)})},destroy:function(){var t=e(this.element);t.is(":checkbox")||t.is(":radio")?(t.removeData("_"+i).off(".styler refresh").removeAttr("style").parent().before(t).remove(),t.closest("label").add('label[for="'+t.attr("id")+'"]').off(".styler")):t.is('input[type="number"]')?t.removeData("_"+i).off(".styler refresh").closest(".jq-number").before(t).remove():(t.is(":file")||t.is("select"))&&t.removeData("_"+i).off(".styler refresh").removeAttr("style").parent().before(t).remove()}},e.fn[i]=function(s){var l=arguments;if(void 0===s||"object"==typeof s)return this.each(function(){e.data(this,"_"+i)||e.data(this,"_"+i,new t(this,s))}).promise().done(function(){var t=e(this[0]).data("_"+i);t&&t.options.onFormStyled.call()}),this;if("string"==typeof s&&"_"!==s[0]&&"init"!==s){var o;return this.each(function(){var a=e.data(this,"_"+i);a instanceof t&&"function"==typeof a[s]&&(o=a[s].apply(a,Array.prototype.slice.call(l,1)))}),void 0!==o?o:this}},s.registered=!1}); 6759/* End */ 6760; 6761; /* Start:"a:4:{s:4:"full";s:59:"/local/js/tooltip/tooltipster.bundle.min.js?152302668839420";s:6:"source";s:43:"/local/js/tooltip/tooltipster.bundle.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 6762/*! tooltipster v4.1.4 */!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){function b(a){this.$container,this.constraints=null,this.__$tooltip,this.__init(a)}function c(b,c){var d=!0;return a.each(b,function(a,e){return void 0===c[a]||b[a]!==c[a]?(d=!1,!1):void 0}),d}function d(b){var c=b.attr("id"),d=c?h.window.document.getElementById(c):null;return d?d===b[0]:a.contains(h.window.document.body,b[0])}function e(){if(!g)return!1;var a=g.document.body||g.document.documentElement,b=a.style,c="transition",d=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof b[c])return!0;c=c.charAt(0).toUpperCase()+c.substr(1);for(var e=0;e<d.length;e++)if("string"==typeof b[d[e]+c])return!0;return!1}var f={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:"body",plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},g="undefined"!=typeof window?window:null,h={hasTouchCapability:!(!g||!("ontouchstart"in g||g.DocumentTouch&&g.document instanceof g.DocumentTouch||g.navigator.maxTouchPoints)),hasTransitions:e(),IE:!1,semVer:"4.1.4",window:g},i=function(){this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__instancesLatestArr=[],this.__plugins={},this._env=h};i.prototype={__bridge:function(b,c,d){if(!c[d]){var e=function(){};e.prototype=b;var g=new e;g.__init&&g.__init(c),a.each(b,function(a,b){0!=a.indexOf("__")&&(c[a]?f.debug&&console.log("The "+a+" method of the "+d+" plugin conflicts with another plugin or native methods"):(c[a]=function(){return g[a].apply(g,Array.prototype.slice.apply(arguments))},c[a].bridged=g))}),c[d]=g}return this},__setWindow:function(a){return h.window=a,this},_getRuler:function(a){return new b(a)},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(b){var c=this;if("string"==typeof b){var d=b,e=null;return d.indexOf(".")>0?e=c.__plugins[d]:a.each(c.__plugins,function(a,b){return b.name.substring(b.name.length-d.length-1)=="."+d?(e=b,!1):void 0}),e}if(b.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");
vendor: 36,590 bytes, lines 6762-6766
6762return c.__plugins[b.name]=b,b.core&&c.__bridge(b.core,c,b.name),this},_trigger:function(){var a=Array.prototype.slice.apply(arguments);return"string"==typeof a[0]&&(a[0]={type:a[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,a),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,a),this},instances:function(b){var c=[],d=b||".tooltipstered";return a(d).each(function(){var b=a(this),d=b.data("tooltipster-ns");d&&a.each(d,function(a,d){c.push(b.data(d))})}),c},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(b){var c=b?b+" ":"";return a(c+".tooltipstered").toArray()},setDefaults:function(b){return a.extend(f,b),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.tooltipster=new i,a.Tooltipster=function(b,c){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__destroying=!1,this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="tooltipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(b,c)},a.Tooltipster.prototype={__init:function(b,c){var d=this;if(d._$origin=a(b),d.__options=a.extend(!0,{},f,c),d.__optionsFormat(),!h.IE||h.IE>=d.__options.IEmin){var e=null;if(void 0===d._$origin.data("tooltipster-initialTitle")&&(e=d._$origin.attr("title"),void 0===e&&(e=null),d._$origin.data("tooltipster-initialTitle",e)),null!==d.__options.content)d.__contentSet(d.__options.content);else{var g,i=d._$origin.attr("data-tooltip-content");i&&(g=a(i)),g&&g[0]?d.__contentSet(g.first()):d.__contentSet(e)}d._$origin.removeAttr("title").addClass("tooltipstered"),d.__prepareOrigin(),d.__prepareGC(),a.each(d.__options.plugins,function(a,b){d._plug(b)}),h.hasTouchCapability&&a("body").on("touchmove."+d.__namespace+"-triggerOpen",function(a){d._touchRecordEvent(a)}),d._on("created",function(){d.__prepareTooltip()})._on("repositioned",function(a){d.__lastPosition=a.position})}else d.__options.disabled=!0},__contentInsert:function(){var a=this,b=a._$tooltip.find(".tooltipster-content"),c=a.__Content,d=function(a){c=a};return a._trigger({type:"format",content:a.__Content,format:d}),a.__options.functionFormat&&(c=a.__options.functionFormat.call(a,a,{origin:a._$origin[0]},a.__Content)),"string"!=typeof c||a.__options.contentAsHTML?b.empty().append(c):b.text(c),a},__contentSet:function(b){return b instanceof a&&this.__options.contentCloning&&(b=b.clone(!0)),this.__Content=b,this._trigger({type:"updated",content:b}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.")},__geometry:function(){var b=this,c=b._$origin,d=b._$origin.is("area");if(d){var e=b._$origin.parent().attr("name");c=a('img[usemap="#'+e+'"]')}var f=c[0].getBoundingClientRect(),g=a(h.window.document),i=a(h.window),j=c,k={available:{document:null,window:null},document:{size:{height:g.height(),width:g.width()}},window:{scroll:{left:h.window.scrollX||h.window.document.documentElement.scrollLeft,top:h.window.scrollY||h.window.document.documentElement.scrollTop},size:{height:i.height(),width:i.width()}},origin:{fixedLineage:!1,offset:{},size:{height:f.bottom-f.top,width:f.right-f.left},usemapImage:d?c[0]:null,windowOffset:{bottom:f.bottom,left:f.left,right:f.right,top:f.top}}};if(d){var l=b._$origin.attr("shape"),m=b._$origin.attr("coords");if(m&&(m=m.split(","),a.map(m,function(a,b){m[b]=parseInt(a)})),"default"!=l)switch(l){case"circle":var n=m[0],o=m[1],p=m[2],q=o-p,r=n-p;k.origin.size.height=2*p,k.origin.size.width=k.origin.size.height,k.origin.windowOffset.left+=r,k.origin.windowOffset.top+=q;break;case"rect":var s=m[0],t=m[1],u=m[2],v=m[3];k.origin.size.height=v-t,k.origin.size.width=u-s,k.origin.windowOffset.left+=s,k.origin.windowOffset.top+=t;break;case"poly":for(var w=0,x=0,y=0,z=0,A="even",B=0;B<m.length;B++){var C=m[B];"even"==A?(C>y&&(y=C,0===B&&(w=y)),w>C&&(w=C),A="odd"):(C>z&&(z=C,1==B&&(x=z)),x>C&&(x=C),A="even")}k.origin.size.height=z-x,k.origin.size.width=y-w,k.origin.windowOffset.left+=w,k.origin.windowOffset.top+=x}}var D=function(a){k.origin.size.height=a.height,k.origin.windowOffset.left=a.left,k.origin.windowOffset.top=a.top,k.origin.size.width=a.width};for(b._trigger({type:"geometry",edit:D,geometry:{height:k.origin.size.height,left:k.origin.windowOffset.left,top:k.origin.windowOffset.top,width:k.origin.size.width}}),k.origin.windowOffset.right=k.origin.windowOffset.left+k.origin.size.width,k.origin.windowOffset.bottom=k.origin.windowOffset.top+k.origin.size.height,k.origin.offset.left=k.origin.windowOffset.left+k.window.scroll.left,k.origin.offset.top=k.origin.windowOffset.top+k.window.scroll.top,k.origin.offset.bottom=k.origin.offset.top+k.origin.size.height,k.origin.offset.right=k.origin.offset.left+k.origin.size.width,k.available.document={bottom:{height:k.document.size.height-k.origin.offset.bottom,width:k.document.size.width},left:{height:k.document.size.height,width:k.origin.offset.left},right:{height:k.document.size.height,width:k.document.size.width-k.origin.offset.right},top:{height:k.origin.offset.top,width:k.document.size.width}},k.available.window={bottom:{height:Math.max(k.window.size.height-Math.max(k.origin.windowOffset.bottom,0),0),width:k.window.size.width},left:{height:k.window.size.height,width:Math.max(k.origin.windowOffset.left,0)},right:{height:k.window.size.height,width:Math.max(k.window.size.width-Math.max(k.origin.windowOffset.right,0),0)},top:{height:Math.max(k.origin.windowOffset.top,0),width:k.window.size.width}};"html"!=j[0].tagName.toLowerCase();){if("fixed"==j.css("position")){k.origin.fixedLineage=!0;break}j=j.parent()}return k},__optionsFormat:function(){return"number"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),"string"==typeof this.__options.parent&&(this.__options.parent=a(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var b=this;return b.__options.selfDestruction?b.__garbageCollector=setInterval(function(){var c=(new Date).getTime();b.__touchEvents=a.grep(b.__touchEvents,function(a,b){return c-a.time>6e4}),d(b._$origin)||b.destroy()},2e4):clearInterval(b.__garbageCollector),b},__prepareOrigin:function(){var a=this;if(a._$origin.off("."+a.__namespace+"-triggerOpen"),h.hasTouchCapability&&a._$origin.on("touchstart."+a.__namespace+"-triggerOpen touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen",function(b){a._touchRecordEvent(b)}),a.__options.triggerOpen.click||a.__options.triggerOpen.tap&&h.hasTouchCapability){var b="";a.__options.triggerOpen.click&&(b+="click."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.tap&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&a._open(b)})}if(a.__options.triggerOpen.mouseenter||a.__options.triggerOpen.touchstart&&h.hasTouchCapability){var b="";a.__options.triggerOpen.mouseenter&&(b+="mouseenter."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.touchstart&&h.hasTouchCapability&&(b+="touchstart."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){!a._touchIsTouchEvent(b)&&a._touchIsEmulatedEvent(b)||(a.__pointerIsOverOrigin=!0,a._openShortly(b))})}if(a.__options.triggerClose.mouseleave||a.__options.triggerClose.touchleave&&h.hasTouchCapability){var b="";a.__options.triggerClose.mouseleave&&(b+="mouseleave."+a.__namespace+"-triggerOpen "),a.__options.triggerClose.touchleave&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&(a.__pointerIsOverOrigin=!1)})}return a},__prepareTooltip:function(){var b=this,c=b.__options.interactive?"auto":"";return b._$tooltip.attr("id",b.__namespace).css({"pointer-events":c,zIndex:b.__options.zIndex}),a.each(b.__previousThemes,function(a,c){b._$tooltip.removeClass(c)}),a.each(b.__options.theme,function(a,c){b._$tooltip.addClass(c)}),b.__previousThemes=a.merge([],b.__options.theme),b},__scrollHandler:function(b){var c=this;if(c.__options.triggerClose.scroll)c._close(b);else{if(b.target===h.window.document)c.__Geometry.origin.fixedLineage||c.__options.repositionOnScroll&&c.reposition(b);else{var d=c.__geometry(),e=!1;if("fixed"!=c._$origin.css("position")&&c.__$originParents.each(function(b,c){var f=a(c),g=f.css("overflow-x"),h=f.css("overflow-y");if("visible"!=g||"visible"!=h){var i=c.getBoundingClientRect();if("visible"!=g&&(d.origin.windowOffset.left<i.left||d.origin.windowOffset.right>i.right))return e=!0,!1;if("visible"!=h&&(d.origin.windowOffset.top<i.top||d.origin.windowOffset.bottom>i.bottom))return e=!0,!1}return"fixed"==f.css("position")?!1:void 0}),e)c._$tooltip.css("visibility","hidden");else if(c._$tooltip.css("visibility","visible"),c.__options.repositionOnScroll)c.reposition(b);else{var f=d.origin.offset.left-c.__Geometry.origin.offset.left,g=d.origin.offset.top-c.__Geometry.origin.offset.top;c._$tooltip.css({left:c.__lastPosition.coord.left+f,top:c.__lastPosition.coord.top+g})}}c._trigger({type:"scroll",event:b})}return c},__stateSet:function(a){return this.__state=a,this._trigger({type:"state",state:a}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,a.each(this.__timeouts.close,function(a,b){clearTimeout(b)}),this.__timeouts.close=[],this},__trackerStart:function(){var a=this,b=a._$tooltip.find(".tooltipster-content");return a.__options.trackTooltip&&(a.__contentBcr=b[0].getBoundingClientRect()),a.__tracker=setInterval(function(){if(d(a._$origin)&&d(a._$tooltip)){if(a.__options.trackOrigin){var e=a.__geometry(),f=!1;c(e.origin.size,a.__Geometry.origin.size)&&(a.__Geometry.origin.fixedLineage?c(e.origin.windowOffset,a.__Geometry.origin.windowOffset)&&(f=!0):c(e.origin.offset,a.__Geometry.origin.offset)&&(f=!0)),f||(a.__options.triggerClose.mouseleave?a._close():a.reposition())}if(a.__options.trackTooltip){var g=b[0].getBoundingClientRect();g.height===a.__contentBcr.height&&g.width===a.__contentBcr.width||(a.reposition(),a.__contentBcr=g)}}else a._close()},a.__options.trackerInterval),a},_close:function(b,c){var d=this,e=!0;if(d._trigger({type:"close",event:b,stop:function(){e=!1}}),e||d.__destroying){c&&d.__callbacks.close.push(c),d.__callbacks.open=[],d.__timeoutsClear();var f=function(){a.each(d.__callbacks.close,function(a,c){c.call(d,d,{event:b,origin:d._$origin[0]})}),d.__callbacks.close=[]};if("closed"!=d.__state){var g=!0,i=new Date,j=i.getTime(),k=j+d.__options.animationDuration[1];if("disappearing"==d.__state&&k>d.__closingTime&&(g=!1),g){d.__closingTime=k,"disappearing"!=d.__state&&d.__stateSet("disappearing");var l=function(){clearInterval(d.__tracker),d._trigger({type:"closing",event:b}),d._$tooltip.off("."+d.__namespace+"-triggerClose").removeClass("tooltipster-dying"),a(h.window).off("."+d.__namespace+"-triggerClose"),d.__$originParents.each(function(b,c){a(c).off("scroll."+d.__namespace+"-triggerClose")}),d.__$originParents=null,a("body").off("."+d.__namespace+"-triggerClose"),d._$origin.off("."+d.__namespace+"-triggerClose"),d._off("dismissable"),d.__stateSet("closed"),d._trigger({type:"after",event:b}),d.__options.functionAfter&&d.__options.functionAfter.call(d,d,{event:b,origin:d._$origin[0]}),f()};h.hasTransitions?(d._$tooltip.css({"-moz-animation-duration":d.__options.animationDuration[1]+"ms","-ms-animation-duration":d.__options.animationDuration[1]+"ms","-o-animation-duration":d.__options.animationDuration[1]+"ms","-webkit-animation-duration":d.__options.animationDuration[1]+"ms","animation-duration":d.__options.animationDuration[1]+"ms","transition-duration":d.__options.animationDuration[1]+"ms"}),d._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),d.__options.animationDuration[1]>0&&d._$tooltip.delay(d.__options.animationDuration[1]),d._$tooltip.queue(l)):d._$tooltip.stop().fadeOut(d.__options.animationDuration[1],l)}}else f()}return d},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(b,c){var e=this;if(!e.__destroying&&d(e._$origin)&&e.__enabled){var f=!0;if("closed"==e.__state&&(e._trigger({type:"before",event:b,stop:function(){f=!1}}),f&&e.__options.functionBefore&&(f=e.__options.functionBefore.call(e,e,{event:b,origin:e._$origin[0]}))),f!==!1&&null!==e.__Content){c&&e.__callbacks.open.push(c),e.__callbacks.close=[],e.__timeoutsClear();var g,i=function(){"stable"!=e.__state&&e.__stateSet("stable"),a.each(e.__callbacks.open,function(a,b){b.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}),e.__callbacks.open=[]};if("closed"!==e.__state)g=0,"disappearing"===e.__state?(e.__stateSet("appearing"),h.hasTransitions?(e._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i)):e._$tooltip.stop().fadeIn(i)):"stable"==e.__state&&i();else{if(e.__stateSet("appearing"),g=e.__options.animationDuration[0],e.__contentInsert(),e.reposition(b,!0),h.hasTransitions?(e._$tooltip.addClass("tooltipster-"+e.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":e.__options.animationDuration[0]+"ms","-ms-animation-duration":e.__options.animationDuration[0]+"ms","-o-animation-duration":e.__options.animationDuration[0]+"ms","-webkit-animation-duration":e.__options.animationDuration[0]+"ms","animation-duration":e.__options.animationDuration[0]+"ms","transition-duration":e.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=e.__state&&(e._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i))},0)):e._$tooltip.css("display","none").fadeIn(e.__options.animationDuration[0],i),e.__trackerStart(),a(h.window).on("resize."+e.__namespace+"-triggerClose",function(a){e.reposition(a)}).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)}),e.__$originParents=e._$origin.parents(),e.__$originParents.each(function(b,c){a(c).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)})}),e.__options.triggerClose.mouseleave||e.__options.triggerClose.touchleave&&h.hasTouchCapability){e._on("dismissable",function(a){a.dismissable?a.delay?(m=setTimeout(function(){e._close(a.event)},a.delay),e.__timeouts.close.push(m)):e._close(a):clearTimeout(m)});var j=e._$origin,k="",l="",m=null;e.__options.interactive&&(j=j.add(e._$tooltip)),e.__options.triggerClose.mouseleave&&(k+="mouseenter."+e.__namespace+"-triggerClose ",l+="mouseleave."+e.__namespace+"-triggerClose "),e.__options.triggerClose.touchleave&&h.hasTouchCapability&&(k+="touchstart."+e.__namespace+"-triggerClose",l+="touchend."+e.__namespace+"-triggerClose touchcancel."+e.__namespace+"-triggerClose"),j.on(l,function(a){if(e._touchIsTouchEvent(a)||!e._touchIsEmulatedEvent(a)){var b="mouseleave"==a.type?e.__options.delay:e.__options.delayTouch;e._trigger({delay:b[1],dismissable:!0,event:a,type:"dismissable"})}}).on(k,function(a){!e._touchIsTouchEvent(a)&&e._touchIsEmulatedEvent(a)||e._trigger({dismissable:!1,event:a,type:"dismissable"})})}e.__options.triggerClose.originClick&&e._$origin.on("click."+e.__namespace+"-triggerClose",function(a){e._touchIsTouchEvent(a)||e._touchIsEmulatedEvent(a)||e._close(a)}),(e.__options.triggerClose.click||e.__options.triggerClose.tap&&h.hasTouchCapability)&&setTimeout(function(){if("closed"!=e.__state){var b="";e.__options.triggerClose.click&&(b+="click."+e.__namespace+"-triggerClose "),e.__options.triggerClose.tap&&h.hasTouchCapability&&(b+="touchend."+e.__namespace+"-triggerClose"),a("body").on(b,function(b){e._touchIsMeaningfulEvent(b)&&(e._touchRecordEvent(b),e.__options.interactive&&a.contains(e._$tooltip[0],b.target)||e._close(b))}),e.__options.triggerClose.tap&&h.hasTouchCapability&&a("body").on("touchstart."+e.__namespace+"-triggerClose",function(a){e._touchRecordEvent(a)})}},0),e._trigger("ready"),e.__options.functionReady&&e.__options.functionReady.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}if(e.__options.timer>0){var m=setTimeout(function(){e._close()},e.__options.timer+g);e.__timeouts.close.push(m)}}}return e},_openShortly:function(a){var b=this,c=!0;if("stable"!=b.__state&&"appearing"!=b.__state&&!b.__timeouts.open&&(b._trigger({type:"start",event:a,stop:function(){c=!1}}),c)){var d=0==a.type.indexOf("touch")?b.__options.delayTouch:b.__options.delay;d[0]?b.__timeouts.open=setTimeout(function(){b.__timeouts.open=null,b.__pointerIsOverOrigin&&b._touchIsMeaningfulEvent(a)?(b._trigger("startend"),b._open(a)):b._trigger("startcancel")},d[0]):(b._trigger("startend"),b._open(a))}return b},_optionsExtract:function(b,c){var d=this,e=a.extend(!0,{},c),f=d.__options[b];return f||(f={},a.each(c,function(a,b){var c=d.__options[a];void 0!==c&&(f[a]=c)})),a.each(e,function(b,c){void 0!==f[b]&&("object"!=typeof c||c instanceof Array||null==c||"object"!=typeof f[b]||f[b]instanceof Array||null==f[b]?e[b]=f[b]:a.extend(e[b],f[b]))}),e},_plug:function(b){var c=a.tooltipster._plugin(b);if(!c)throw new Error('The "'+b+'" plugin is not defined');return c.instance&&a.tooltipster.__bridge(c.instance,this,c.name),this},_touchIsEmulatedEvent:function(a){for(var b=!1,c=(new Date).getTime(),d=this.__touchEvents.length-1;d>=0;d--){var e=this.__touchEvents[d];if(!(c-e.time<500))break;e.target===a.target&&(b=!0)}return b},_touchIsMeaningfulEvent:function(a){return this._touchIsTouchEvent(a)&&!this._touchSwiped(a.target)||!this._touchIsTouchEvent(a)&&!this._touchIsEmulatedEvent(a)},_touchIsTouchEvent:function(a){return 0==a.type.indexOf("touch")},_touchRecordEvent:function(a){return this._touchIsTouchEvent(a)&&(a.time=(new Date).getTime(),this.__touchEvents.push(a)),this},_touchSwiped:function(a){for(var b=!1,c=this.__touchEvents.length-1;c>=0;c--){var d=this.__touchEvents[c];if("touchmove"==d.type){b=!0;break}if("touchstart"==d.type&&a===d.target)break}return b},_trigger:function(){var b=Array.prototype.slice.apply(arguments);return"string"==typeof b[0]&&(b[0]={type:b[0]}),b[0].instance=this,b[0].origin=this._$origin?this._$origin[0]:null,b[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,b),a.tooltipster._trigger.apply(a.tooltipster,b),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,b),this},_unplug:function(b){var c=this;if(c[b]){var d=a.tooltipster._plugin(b);d.instance&&a.each(d.instance,function(a,d){c[a]&&c[a].bridged===c[b]&&delete c[a]}),c[b].__destroy&&c[b].__destroy(),delete c[b]}return c},close:function(a){return this.__destroyed?this.__destroyError():this._close(null,a),this},content:function(a){var b=this;if(void 0===a)return b.__Content;if(b.__destroyed)b.__destroyError();else if(b.__contentSet(a),null!==b.__Content){if("closed"!==b.__state&&(b.__contentInsert(),b.reposition(),b.__options.updateAnimation))if(h.hasTransitions){var c=b.__options.updateAnimation;b._$tooltip.addClass("tooltipster-update-"+c),setTimeout(function(){"closed"!=b.__state&&b._$tooltip.removeClass("tooltipster-update-"+c)},1e3)}else b._$tooltip.fadeTo(200,.5,function(){"closed"!=b.__state&&b._$tooltip.fadeTo(200,1)})}else b._close();return b},destroy:function(){var b=this;return b.__destroyed?b.__destroyError():b.__destroying||(b.__destroying=!0,b._close(null,function(){b._trigger("destroy"),b.__destroying=!1,b.__destroyed=!0,b._$origin.removeData(b.__namespace).off("."+b.__namespace+"-triggerOpen"),a("body").off("."+b.__namespace+"-triggerOpen");var c=b._$origin.data("tooltipster-ns");if(c)if(1===c.length){var d=null;"previous"==b.__options.restoration?d=b._$origin.data("tooltipster-initialTitle"):"current"==b.__options.restoration&&(d="string"==typeof b.__Content?b.__Content:a("<div></div>").append(b.__Content).html()),d&&b._$origin.attr("title",d),b._$origin.removeClass("tooltipstered"),b._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else c=a.grep(c,function(a,c){return a!==b.__namespace}),b._$origin.data("tooltipster-ns",c);b._trigger("destroyed"),b._off(),b.off(),b.__Content=null,b.__$emitterPrivate=null,b.__$emitterPublic=null,b.__options.parent=null,b._$origin=null,b._$tooltip=null,a.tooltipster.__instancesLatestArr=a.grep(a.tooltipster.__instancesLatestArr,function(a,c){return b!==a}),clearInterval(b.__garbageCollector)})),b},disable:function(){return this.__destroyed?(this.__destroyError(),this):(this._close(),this.__enabled=!1,this)},elementOrigin:function(){return this.__destroyed?void this.__destroyError():this._$origin[0]},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(a){return this.close(a)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(a){return this.__destroyed||this.__destroying?this.__destroyError():this._open(null,a),this},option:function(b,c){return void 0===c?this.__options[b]:(this.__destroyed?this.__destroyError():(this.__options[b]=c,this.__optionsFormat(),a.inArray(b,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),"selfDestruction"===b&&this.__prepareGC()),this)},reposition:function(a,b){var c=this;return c.__destroyed?c.__destroyError():(d(c._$tooltip)||b)&&(b||c._$tooltip.detach(),c.__Geometry=c.__geometry(),c._trigger({type:"reposition",event:a,helper:{geo:c.__Geometry}})),c},show:function(a){return this.open(a)},status:function(){return{destroyed:this.__destroyed,destroying:this.__destroying,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.fn.tooltipster=function(){var b=Array.prototype.slice.apply(arguments),c="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";if(0===this.length)return this;if("string"==typeof b[0]){var d="#*$~&";return this.each(function(){var e=a(this).data("tooltipster-ns"),f=e?a(this).data(e[0]):null;if(!f)throw new Error("You called Tooltipster's \""+b[0]+'" method on an uninitialized element');if("function"!=typeof f[b[0]])throw new Error('Unknown method "'+b[0]+'"');this.length>1&&"content"==b[0]&&(b[1]instanceof a||"object"==typeof b[1]&&null!=b[1]&&b[1].tagName)&&!f.__options.contentCloning&&f.__options.debug&&console.log(c);var g=f[b[0]](b[1],b[2]);return g!==f||"instance"===b[0]?(d=g,!1):void 0}),"#*$~&"!==d?d:this}a.tooltipster.__instancesLatestArr=[];var e=b[0]&&void 0!==b[0].multiple,g=e&&b[0].multiple||!e&&f.multiple,h=b[0]&&void 0!==b[0].content,i=h&&b[0].content||!h&&f.content,j=b[0]&&void 0!==b[0].contentCloning,k=j&&b[0].contentCloning||!j&&f.contentCloning,l=b[0]&&void 0!==b[0].debug,m=l&&b[0].debug||!l&&f.debug;return this.length>1&&(i instanceof a||"object"==typeof i&&null!=i&&i.tagName)&&!k&&m&&console.log(c),this.each(function(){var c=!1,d=a(this),e=d.data("tooltipster-ns"),f=null;e?g?c=!0:m&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)):c=!0,c&&(f=new a.Tooltipster(this,b[0]),e||(e=[]),e.push(f.__namespace),d.data("tooltipster-ns",e),d.data(f.__namespace,f),f.__options.functionInit&&f.__options.functionInit.call(f,f,{origin:this}),f._trigger("init")),a.tooltipster.__instancesLatestArr.push(f)}),this},b.prototype={__init:function(b){this.__$tooltip=b,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto"),this.$container=a('<div class="tooltipster-ruler"></div>').append(this.__$tooltip).appendTo("body")},__forceRedraw:function(){var a=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(a)},constrain:function(a,b){return this.constraints={width:a,height:b},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:a}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var a=this.__$tooltip[0].getBoundingClientRect(),b={size:{height:a.height||a.bottom,width:a.width||a.right}};if(this.constraints){var c=this.__$tooltip.find(".tooltipster-content"),d=this.__$tooltip.outerHeight(),e=c[0].getBoundingClientRect(),f={height:d<=this.constraints.height,width:a.width<=this.constraints.width&&e.width>=c[0].scrollWidth-1};b.fits=f.height&&f.width}return h.IE&&h.IE<=11&&(b.size.width=Math.ceil(b.size.width)+1),b}};var j=navigator.userAgent.toLowerCase();-1!=j.indexOf("msie")?h.IE=parseInt(j.split("msie")[1]):-1!==j.toLowerCase().indexOf("trident")&&-1!==j.indexOf(" rv:11")?h.IE=11:-1!=j.toLowerCase().indexOf("edge/")&&(h.IE=parseInt(j.toLowerCase().split("edge/")[1]));var k="tooltipster.sideTip";return a.tooltipster._plugin({name:k,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(a){var b=this;b.__instance=a,b.__namespace="tooltipster-sideTip-"+Math.round(1e6*Math.random()),b.__previousState="closed",b.__options,b.__optionsFormat(),b.__instance._on("state."+b.__namespace,function(a){"closed"==a.state?b.__close():"appearing"==a.state&&"closed"==b.__previousState&&b.__create(),b.__previousState=a.state}),b.__instance._on("options."+b.__namespace,function(){b.__optionsFormat()}),b.__instance._on("reposition."+b.__namespace,function(a){b.__reposition(a.event,a.helper)})},__close:function(){this.__instance.content()instanceof a&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var b=a('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"></div></div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"></div><div class="tooltipster-arrow-background"></div></div></div></div>');this.__options.arrow||b.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide(),this.__options.minWidth&&b.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&b.css("max-width",this.__options.maxWidth+"px"),this.__instance._$tooltip=b,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var b=this;if(b.__options=b.__instance._optionsExtract(k,b.__defaults()),b.__options.position&&(b.__options.side=b.__options.position),"object"!=typeof b.__options.distance&&(b.__options.distance=[b.__options.distance]),b.__options.distance.length<4&&(void 0===b.__options.distance[1]&&(b.__options.distance[1]=b.__options.distance[0]), 6763void 0===b.__options.distance[2]&&(b.__options.distance[2]=b.__options.distance[0]),void 0===b.__options.distance[3]&&(b.__options.distance[3]=b.__options.distance[1]),b.__options.distance={top:b.__options.distance[0],right:b.__options.distance[1],bottom:b.__options.distance[2],left:b.__options.distance[3]}),"string"==typeof b.__options.side){var c={top:"bottom",right:"left",bottom:"top",left:"right"};b.__options.side=[b.__options.side,c[b.__options.side]],"left"==b.__options.side[0]||"right"==b.__options.side[0]?b.__options.side.push("top","bottom"):b.__options.side.push("right","left")}6===a.tooltipster._env.IE&&b.__options.arrow!==!0&&(b.__options.arrow=!1)},__reposition:function(b,c){var d,e=this,f=e.__targetFind(c),g=[];e.__instance._$tooltip.detach();var h=e.__instance._$tooltip.clone(),i=a.tooltipster._getRuler(h),j=!1;switch(a.each(["window","document"],function(d,k){var l=null;if(e.__instance._trigger({container:k,helper:c,satisfied:j,takeTest:function(a){l=a},results:g,type:"positionTest"}),1==l||0!=l&&0==j&&("window"!=k||e.__options.viewportAware))for(var d=0;d<e.__options.side.length;d++){var m={horizontal:0,vertical:0},n=e.__options.side[d];"top"==n||"bottom"==n?m.vertical=e.__options.distance[n]:m.horizontal=e.__options.distance[n],e.__sideChange(h,n),a.each(["natural","constrained"],function(a,d){if(l=null,e.__instance._trigger({container:k,event:b,helper:c,mode:d,results:g,satisfied:j,side:n,takeTest:function(a){l=a},type:"positionTest"}),1==l||0!=l&&0==j){var h={container:k,distance:m,fits:null,mode:d,outerSize:null,side:n,size:null,target:f[n],whole:null},o="natural"==d?i.free():i.constrain(c.geo.available[k][n].width-m.horizontal,c.geo.available[k][n].height-m.vertical),p=o.measure();if(h.size=p.size,h.outerSize={height:p.size.height+m.vertical,width:p.size.width+m.horizontal},"natural"==d?c.geo.available[k][n].width>=h.outerSize.width&&c.geo.available[k][n].height>=h.outerSize.height?h.fits=!0:h.fits=!1:h.fits=p.fits,"window"==k&&(h.fits?"top"==n||"bottom"==n?h.whole=c.geo.origin.windowOffset.right>=e.__options.minIntersection&&c.geo.window.size.width-c.geo.origin.windowOffset.left>=e.__options.minIntersection:h.whole=c.geo.origin.windowOffset.bottom>=e.__options.minIntersection&&c.geo.window.size.height-c.geo.origin.windowOffset.top>=e.__options.minIntersection:h.whole=!1),g.push(h),h.whole)j=!0;else if("natural"==h.mode&&(h.fits||h.size.width<=c.geo.available[k][n].width))return!1}})}}),e.__instance._trigger({edit:function(a){g=a},event:b,helper:c,results:g,type:"positionTested"}),g.sort(function(a,b){if(a.whole&&!b.whole)return-1;if(!a.whole&&b.whole)return 1;if(a.whole&&b.whole){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}if(a.fits&&!b.fits)return-1;if(!a.fits&&b.fits)return 1;if(a.fits&&b.fits){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}return"document"==a.container&&"bottom"==a.side&&"natural"==a.mode?-1:1}),d=g[0],d.coord={},d.side){case"left":case"right":d.coord.top=Math.floor(d.target-d.size.height/2);break;case"bottom":case"top":d.coord.left=Math.floor(d.target-d.size.width/2)}switch(d.side){case"left":d.coord.left=c.geo.origin.windowOffset.left-d.outerSize.width;break;case"right":d.coord.left=c.geo.origin.windowOffset.right+d.distance.horizontal;break;case"top":d.coord.top=c.geo.origin.windowOffset.top-d.outerSize.height;break;case"bottom":d.coord.top=c.geo.origin.windowOffset.bottom+d.distance.vertical}"window"==d.container?"top"==d.side||"bottom"==d.side?d.coord.left<0?c.geo.origin.windowOffset.right-this.__options.minIntersection>=0?d.coord.left=0:d.coord.left=c.geo.origin.windowOffset.right-this.__options.minIntersection-1:d.coord.left>c.geo.window.size.width-d.size.width&&(c.geo.origin.windowOffset.left+this.__options.minIntersection<=c.geo.window.size.width?d.coord.left=c.geo.window.size.width-d.size.width:d.coord.left=c.geo.origin.windowOffset.left+this.__options.minIntersection+1-d.size.width):d.coord.top<0?c.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?d.coord.top=0:d.coord.top=c.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:d.coord.top>c.geo.window.size.height-d.size.height&&(c.geo.origin.windowOffset.top+this.__options.minIntersection<=c.geo.window.size.height?d.coord.top=c.geo.window.size.height-d.size.height:d.coord.top=c.geo.origin.windowOffset.top+this.__options.minIntersection+1-d.size.height):(d.coord.left>c.geo.window.size.width-d.size.width&&(d.coord.left=c.geo.window.size.width-d.size.width),d.coord.left<0&&(d.coord.left=0)),e.__sideChange(h,d.side),c.tooltipClone=h[0],c.tooltipParent=e.__instance.option("parent").parent[0],c.mode=d.mode,c.whole=d.whole,c.origin=e.__instance._$origin[0],c.tooltip=e.__instance._$tooltip[0],delete d.container,delete d.fits,delete d.mode,delete d.outerSize,delete d.whole,d.distance=d.distance.horizontal||d.distance.vertical;var k=a.extend(!0,{},d);if(e.__instance._trigger({edit:function(a){d=a},event:b,helper:c,position:k,type:"position"}),e.__options.functionPosition){var l=e.__options.functionPosition.call(e,e.__instance,c,k);l&&(d=l)}i.destroy();var m,n;"top"==d.side||"bottom"==d.side?(m={prop:"left",val:d.target-d.coord.left},n=d.size.width-this.__options.minIntersection):(m={prop:"top",val:d.target-d.coord.top},n=d.size.height-this.__options.minIntersection),m.val<this.__options.minIntersection?m.val=this.__options.minIntersection:m.val>n&&(m.val=n);var o;o=c.geo.origin.fixedLineage?c.geo.origin.windowOffset:{left:c.geo.origin.windowOffset.left+c.geo.window.scroll.left,top:c.geo.origin.windowOffset.top+c.geo.window.scroll.top},d.coord={left:o.left+(d.coord.left-c.geo.origin.windowOffset.left),top:o.top+(d.coord.top-c.geo.origin.windowOffset.top)},e.__sideChange(e.__instance._$tooltip,d.side),c.geo.origin.fixedLineage?e.__instance._$tooltip.css("position","fixed"):e.__instance._$tooltip.css("position",""),e.__instance._$tooltip.css({left:d.coord.left,top:d.coord.top,height:d.size.height,width:d.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(m.prop,m.val),e.__instance._$tooltip.appendTo(e.__instance.option("parent")),e.__instance._trigger({type:"repositioned",event:b,position:d})},__sideChange:function(a,b){a.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+b)},__targetFind:function(a){var b={},c=this.__instance._$origin[0].getClientRects();if(c.length>1){var d=this.__instance._$origin.css("opacity");1==d&&(this.__instance._$origin.css("opacity",.99),c=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1))}if(c.length<2)b.top=Math.floor(a.geo.origin.windowOffset.left+a.geo.origin.size.width/2),b.bottom=b.top,b.left=Math.floor(a.geo.origin.windowOffset.top+a.geo.origin.size.height/2),b.right=b.left;else{var e=c[0];b.top=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil(c.length/2)-1]:c[0],b.right=Math.floor(e.top+(e.bottom-e.top)/2),e=c[c.length-1],b.bottom=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil((c.length+1)/2)-1]:c[c.length-1],b.left=Math.floor(e.top+(e.bottom-e.top)/2)}return b}}}),a}); 6764/* End */ 6765;; /* /local/templates/.default/components/sigma/sale.basket.basket.line/.default/script.js?15230266875504*/ 6766;
6766 /* /local/js/lib/jquery.js?152302668895786*/ 6767; /* /local/js/lib/jquery.sigma.js?154504834146507*/ 6768; /* /local/js/basic/jquery.form.js?152302668827128*/ 6769; /* /local/js/basic/jquery.validate.min.js?152302668822691*/ 6770; /* /local/js/basic/jquery.cookie.js?15230266881535*/ 6771; /* /local/js/basic/jquery.easing.js?15230266888097*/ 6772; /* /local/js/basic/jquery.mousewheel.pack.js?15230266881384*/ 6773; /* /local/js/basic/jquery.lazyload.js?15230266889058*/ 6774; /* /local/js/basic/ajax.js?152302668814096*/ 6775; /* /local/js/basic/shop.js?166081911714586*/ 6776; /* /local/js/basic/list.js?15230266883928*/ 6777; /* /local/js/basic/util.js?15230266883315*/ 6778; /* /local/js/basic/toogled.js?15710474133590*/ 6779; /* /local/js/basic/alignh.js?15230266882836*/ 6780; /* /local/js/basic/jquery.tabs2.js?15710474132537*/ 6781; /* /local/js/init.js?15941153725794*/ 6782; /* /local/templates/gfi-rus/js/script.js?17515421875897*/ 6783; /* /local/js/menu/slicknav/jquery.slicknav.min.js?15230266886826*/ 6784; /* /local/js/menu/pushy/pushy.js?15230266886880*/ 6785; /* /local/js/popup/fancybox/jquery.fancybox.pack.js?152302668823135*/ 6786; /* /local/js/popup/fancybox/helpers/jquery.fancybox-thumbs.js?15230266883836*/ 6787; /* /local/js/popup/fancybox/helpers/jquery.fancybox-buttons.js?15230266883041*/ 6788; /* /local/js/popup/fancybox/helpers/jquery.fancybox-media.js?15230266885305*/ 6789; /* /local/js/basic/jquery.maskedinput.min.js?15230266884324*/ 6790; /* /local/js/basic/jquery.autocomplete.min.js?152302668810689*/ 6791; /* /local/js/basic/jquery.tabs.js?152302668817921*/ 6792; /* /local/js/input/formstyler/jquery.formstyler.min.js?152302668818798*/ 6793; /* /local/js/tooltip/tooltipster.bundle.min.js?152302668839420*/
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.