/* failed ##### #### */ /* start: /ISS_Static/WW/site/scripts/modernizr.js (cachekey: [])*/ /* Modernizr 2.6.2 (Custom Build) | MIT & BSD * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-css_boxsizing-load */ ;window.Modernizr=function(a,b,c){function C(a){j.cssText=a}function D(a,b){return C(n.join(a+";")+(b||""))}function E(a,b){return typeof a===b}function F(a,b){return!!~(""+a).indexOf(b)}function G(a,b){for(var d in a){var e=a[d];if(!F(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:E(f,"function")?f.bind(d||b):f}return!1}function I(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return E(b,"string")||E(b,"undefined")?G(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),H(e,b,c))}function J(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=E(e[d],"function"),E(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),A={}.hasOwnProperty,B;!E(A,"undefined")&&!E(A.call,"undefined")?B=function(a,b){return A.call(a,b)}:B=function(a,b){return b in a&&E(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return I("flexWrap")},s.flexboxlegacy=function(){return I("boxDirection")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!E(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!I("indexedDB",a)},s.hashchange=function(){return z("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return C("background-color:rgba(150,255,150,.5)"),F(j.backgroundColor,"rgba")},s.hsla=function(){return C("background-color:hsla(120,40%,100%,.5)"),F(j.backgroundColor,"rgba")||F(j.backgroundColor,"hsla")},s.multiplebgs=function(){return C("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return I("backgroundSize")},s.borderimage=function(){return I("borderImage")},s.borderradius=function(){return I("borderRadius")},s.boxshadow=function(){return I("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return D("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return I("animationName")},s.csscolumns=function(){return I("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return C((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),F(j.backgroundImage,"gradient")},s.cssreflections=function(){return I("boxReflect")},s.csstransforms=function(){return!!I("transform")},s.csstransforms3d=function(){var a=!!I("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return I("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var K in s)B(s,K)&&(x=K.toLowerCase(),e[x]=s[K](),v.push((e[x]?"":"no-")+x));return e.input||J(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)B(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},C(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.hasEvent=z,e.testProp=function(a){return G([a])},e.testAllProps=I,e.testStyles=y,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f7)}); /* end: /ISS_Static/WW/site/scripts/modernizr.js(15316) */ /* start: /ISS_Static/WW/site/scripts/urlparams.min.js (cachekey: [])*/ /* * URL Params - v1.0 - 8/28/2013 * http://pastebin.com/yvfeK76y * * Include this in the document for best results. It will create a global * object "urlParams" that stores all querystring parameters in a URL. * * Uses/examples: * if ("foo" in urlParams) { ... } * var foo_value = urlParams["foo"]; * */ var urlParams={};(function(){var e,a=/\+/g,r=/([^&=]+)=?([^&]*)/g,d=function(s){return decodeURIComponent(s.replace(a," "));},q=window.location.search.substring(1);while(e=r.exec(q)) urlParams[d(e[1])]=d(e[2]);})(); /* end: /ISS_Static/WW/site/scripts/urlparams.min.js(540) */ /* start: /ISS_Static/WW/site/scripts/noconsole.min.js (cachekey: [])*/ /* * No Console - v1.0 - 8-Dec-2013 * http://pastebin.com/86yXEc7G * * Include this in the document for best results. It will create dummy * versions of any missing "console" methods of the Window object so uncaught * console commands do not cause script errors. */ ;(function(window){var method;var noop=function(){};var methods=["_commandLineAPI","assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollasped","groupEnd","info","log","profile","profileEnd","table","timeEnd","timeline","timelineEnd","timeStamp","trace","warn"];var length=methods.length;var console=(window.console=window.console||{});while(length--){method=methods[length];if(!console[method]){console[method]=noop;}}})(window); /* end: /ISS_Static/WW/site/scripts/noconsole.min.js(744) */ /* start: /ISS_Static/WW/site/scripts/owv2/urls.js (cachekey: [])*/ // Generated by CoffeeScript 1.7.1 /* * LENOVO.ENV module * ----------------- * Dependencies: LENOVO.MAIN * * This module standardizes and stores application URL references to important * workflows and templates on Lenovo.com. It registers its methods under * LENOVO.ENV and on initialization, saves an object to store and reference in * other modules. */ (function(app, $) { var applyBase, self, _M, _debug, _devUrls, _prodUrls, _staticUrls, _version; _M = "ENV"; _version = "2014-06-24"; _debug = window.debugAllowed || /(\.leni2\.)/i.test(window.location.hostname) || false; _staticUrls = { builder: { templates: { builderCallback: "/WW/site/templates/configurator/owv2/builderCallback.html", configData: "/WW/site/templates/configurator/owv2/configData.html", openConfigCallback: "/WW/site/templates/configurator/owv2/openConfigCallback.html", transition: "/WW/site/templates/configurator/owv2/transition.html", interstitialCallback: "/WW/site/templates/configurator/owv2/interstitialCallback.html" }, workflow: { loadBuilderTemplate: "/builder.workflow:LoadBuilderTemplate", enter: "/builder.workflow:Enter", exit: "/builder.workflow:Exit", hmd: "/builder.workflow:HMD", navigate: "/builder.workflow:Navigate", update: "/builder.workflow:Update", itemDetails: "/builder.workflow:ItemDetails", undo: "/builder.workflow:Undo" } }, wci: { workflow: { friendlyload: "/wci.workflow:friendlyload", load: "/wci.workflow:load" } }, handlebars: "/WW/site/templates/handlebars/owv2/" }; _prodUrls = {}; _devUrls = { seutil: { workflow: { debugBOM: "/seutil.workflow:DebugBOM" } } }; applyBase = function(base, hash) { var key, value; if (!base) { return hash; } for (key in hash) { if (!hash.hasOwnProperty(key)) { continue; } value = hash[key]; if ($.isPlainObject(value)) { value = applyBase(base, value); } else if (value.indexOf(".workflow") > -1) { value = base + value; } hash[key] = value; } return hash; }; self = app[_M] = {}; /* * LENOVO.ENV.urls -- Method to save URLs based on several parameters like * production mode and environment. * @param {String} base Base URL to concatenate workflow URLs * @param {String} mode Prod or Dev mode * @return {Object} URLs */ self.urls = function(base, mode) { var urls; if (!base) { base = window.long_url || ""; } if (!mode) { mode = (_debug ? "dev" : "prod"); } mode = mode.toLowerCase(); urls = {}; if (mode === "dev") { $.extend(true, urls, _staticUrls, _prodUrls, _devUrls); } else { $.extend(true, urls, _staticUrls, _prodUrls); } return applyBase(base, urls); }; })(window.LENOVO = window.LENOVO || {}, jQuery); /* end: /ISS_Static/WW/site/scripts/owv2/urls.js(3004) */ /* start: /ISS_Static/WW/site/scripts/handlebars.min.js (cachekey: [])*/ /*! handlebars v1.1.2 Copyright (C) 2011 by Yehuda Katz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @license */ var Handlebars=function(){var a=function(){"use strict";function a(a){this.string=a}var b;return a.prototype.toString=function(){return""+this.string},b=a}(),b=function(a){"use strict";function b(a){return h[a]||"&"}function c(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])}function d(a){return a instanceof g?a.toString():a||0===a?(a=""+a,j.test(a)?a.replace(i,b):a):""}function e(a){return a||0===a?m(a)&&0===a.length?!0:!1:!0}var f={},g=a,h={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},i=/[&<>"'`]/g,j=/[&<>"'`]/;f.extend=c;var k=Object.prototype.toString;f.toString=k;var l=function(a){return"function"==typeof a};l(/x/)&&(l=function(a){return"function"==typeof a&&"[object Function]"===k.call(a)});var l;f.isFunction=l;var m=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===k.call(a):!1};return f.isArray=m,f.escapeExpression=d,f.isEmpty=e,f}(a),c=function(){"use strict";function a(){for(var a=Error.prototype.constructor.apply(this,arguments),b=0;b0?a.helpers.each(b,c):d(this):e(b)}),a.registerHelper("each",function(a,b){var c,d=b.fn,e=b.inverse,f=0,g="";if(m(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(l(a))for(var h=a.length;h>f;f++)c&&(c.index=f,c.first=0===f,c.last=f===a.length-1),g+=d(a[f],{data:c});else for(var i in a)a.hasOwnProperty(i)&&(c&&(c.key=i),g+=d(a[i],{data:c}),f++);return 0===f&&(g=e(this)),g}),a.registerHelper("if",function(a,b){return m(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||g.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,b){return m(a)&&(a=a.call(this)),g.isEmpty(a)?void 0:b.fn(a)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)})}function e(a,b){p.log(a,b)}var f={},g=a,h=b,i="1.1.2";f.VERSION=i;var j=4;f.COMPILER_REVISION=j;var k={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};f.REVISION_CHANGES=k;var l=g.isArray,m=g.isFunction,n=g.toString,o="[object Object]";f.HandlebarsEnvironment=c,c.prototype={constructor:c,logger:p,log:e,registerHelper:function(a,b,c){if(n.call(a)===o){if(c||b)throw new h("Arg not supported with multiple helpers");g.extend(this.helpers,a)}else c&&(b.not=c),this.helpers[a]=b},registerPartial:function(a,b){n.call(a)===o?g.extend(this.partials,a):this.partials[a]=b}};var p={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(p.level<=a){var c=p.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}};f.logger=p,f.log=e;var q=function(a){var b={};return g.extend(b,a),b};return f.createFrame=q,f}(b,c),e=function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=m;if(b!==c){if(c>b){var d=n[c],e=n[b];throw new Error("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new Error("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){if(!b)throw new Error("No environment passed to template");var c;c=b.compile?function(a,c,d,e,f,g){var i=h.apply(this,arguments);if(i)return i;var j={helpers:e,partials:f,data:g};return f[c]=b.compile(a,{data:void 0!==g},b),f[c](d,j)}:function(a,b){var c=h.apply(this,arguments);if(c)return c;throw new l("The partial "+b+" could not be compiled when running in runtime-only mode")};var e={escapeExpression:k.escapeExpression,invokePartial:c,programs:[],program:function(a,b,c){var d=this.programs[a];return c?d=g(a,b,c):d||(d=this.programs[a]=g(a,b)),d},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c={},k.extend(c,b),k.extend(c,a)),c},programWithDepth:f,noop:i,compilerInfo:null};return function(c,f){f=f||{};var g,h,i=f.partial?f:b;f.partial||(g=f.helpers,h=f.partials);var j=a.call(e,i,c,g,h,f.data);return f.partial||d(e.compilerInfo),j}}function f(a,b,c){var d=Array.prototype.slice.call(arguments,3),e=function(a,e){return e=e||{},b.apply(this,[a,e.data||c].concat(d))};return e.program=a,e.depth=d.length,e}function g(a,b,c){var d=function(a,d){return d=d||{},b(a,d.data||c)};return d.program=a,d.depth=0,d}function h(a,b,c,d,e,f){var g={partial:!0,helpers:d,partials:e,data:f};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,g):void 0}function i(){return""}var j={},k=a,l=b,m=c.COMPILER_REVISION,n=c.REVISION_CHANGES;return j.template=e,j.programWithDepth=f,j.program=g,j.invokePartial=h,j.noop=i,j}(b,c,d),f=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c,j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();return m.create=l,f=m}(d,a,c,b,e),g=function(a){"use strict";var b,c=a,d={ProgramNode:function(a,b,c){this.type="program",this.statements=a,this.strip={},c?(this.inverse=new d.ProgramNode(c,b),this.strip.right=b.left):b&&(this.strip.left=b.right)},MustacheNode:function(a,b,c,d){this.type="mustache",this.hash=b,this.strip=d;var e=c[3]||c[2];this.escaped="{"!==e&&"&"!==e;var f=this.id=a[0],g=this.params=a.slice(1),h=this.eligibleHelper=f.isSimple;this.isHelper=h&&(g.length||b)},PartialNode:function(a,b,c){this.type="partial",this.partialName=a,this.context=b,this.strip=c},BlockNode:function(a,b,d,e){if(a.id.original!==e.path.original)throw new c(a.id.original+" doesn't match "+e.path.original);this.type="block",this.mustache=a,this.program=b,this.inverse=d,this.strip={left:a.strip.left,right:e.strip.right},(b||d).strip.left=a.strip.right,(d||b).strip.right=e.strip.left,d&&!b&&(this.isInverse=!0)},ContentNode:function(a){this.type="content",this.string=a},HashNode:function(a){this.type="hash",this.pairs=a},IdNode:function(a){this.type="ID";for(var b="",d=[],e=0,f=0,g=a.length;g>f;f++){var h=a[f].part;if(b+=(a[f].separator||"")+h,".."===h||"."===h||"this"===h){if(d.length>0)throw new c("Invalid path: "+b);".."===h?e++:this.isScoped=!0}else d.push(h)}this.original=b,this.parts=d,this.string=d.join("."),this.depth=e,this.isSimple=1===a.length&&!this.isScoped&&0===e,this.stringModeValue=this.string},PartialNameNode:function(a){this.type="PARTIAL_NAME",this.name=a.original},DataNode:function(a){this.type="DATA",this.id=a},StringNode:function(a){this.type="STRING",this.original=this.string=this.stringModeValue=a},IntegerNode:function(a){this.type="INTEGER",this.original=this.integer=a,this.stringModeValue=Number(a)},BooleanNode:function(a){this.type="BOOLEAN",this.bool=a,this.stringModeValue="true"===a},CommentNode:function(a){this.type="comment",this.comment=a}};return b=d}(c),h=function(){"use strict";var a,b=function(){function a(a,b){return{left:"~"===a[2],right:"~"===b[0]||"~"===b[1]}}function b(){this.yy={}}var c={trace:function(){},yy:{},symbols_:{error:2,root:3,statements:4,EOF:5,program:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,partial_option0:27,inMustache_repetition0:28,inMustache_option0:29,dataName:30,param:31,STRING:32,INTEGER:33,BOOLEAN:34,hash:35,hash_repetition_plus0:36,hashSegment:37,ID:38,EQUALS:39,DATA:40,pathSegments:41,SEP:42,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",38:"ID",39:"EQUALS",40:"DATA",42:"SEP"},productions_:[0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[35,1],[37,3],[26,1],[26,1],[26,1],[30,2],[21,1],[41,3],[41,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[36,1],[36,2]],performAction:function(b,c,d,e,f,g){var h=g.length-1;switch(f){case 1:return new e.ProgramNode(g[h-1]);case 2:return new e.ProgramNode([]);case 3:this.$=new e.ProgramNode([],g[h-1],g[h]);break;case 4:this.$=new e.ProgramNode(g[h-2],g[h-1],g[h]);break;case 5:this.$=new e.ProgramNode(g[h-1],g[h],[]);break;case 6:this.$=new e.ProgramNode(g[h]);break;case 7:this.$=new e.ProgramNode([]);break;case 8:this.$=new e.ProgramNode([]);break;case 9:this.$=[g[h]];break;case 10:g[h-1].push(g[h]),this.$=g[h-1];break;case 11:this.$=new e.BlockNode(g[h-2],g[h-1].inverse,g[h-1],g[h]);break;case 12:this.$=new e.BlockNode(g[h-2],g[h-1],g[h-1].inverse,g[h]);break;case 13:this.$=g[h];break;case 14:this.$=g[h];break;case 15:this.$=new e.ContentNode(g[h]);break;case 16:this.$=new e.CommentNode(g[h]);break;case 17:this.$=new e.MustacheNode(g[h-1][0],g[h-1][1],g[h-2],a(g[h-2],g[h]));break;case 18:this.$=new e.MustacheNode(g[h-1][0],g[h-1][1],g[h-2],a(g[h-2],g[h]));break;case 19:this.$={path:g[h-1],strip:a(g[h-2],g[h])};break;case 20:this.$=new e.MustacheNode(g[h-1][0],g[h-1][1],g[h-2],a(g[h-2],g[h]));break;case 21:this.$=new e.MustacheNode(g[h-1][0],g[h-1][1],g[h-2],a(g[h-2],g[h]));break;case 22:this.$=new e.PartialNode(g[h-2],g[h-1],a(g[h-3],g[h]));break;case 23:this.$=a(g[h-1],g[h]);break;case 24:this.$=[[g[h-2]].concat(g[h-1]),g[h]];break;case 25:this.$=[[g[h]],null];break;case 26:this.$=g[h];break;case 27:this.$=new e.StringNode(g[h]);break;case 28:this.$=new e.IntegerNode(g[h]);break;case 29:this.$=new e.BooleanNode(g[h]);break;case 30:this.$=g[h];break;case 31:this.$=new e.HashNode(g[h]);break;case 32:this.$=[g[h-2],g[h]];break;case 33:this.$=new e.PartialNameNode(g[h]);break;case 34:this.$=new e.PartialNameNode(new e.StringNode(g[h]));break;case 35:this.$=new e.PartialNameNode(new e.IntegerNode(g[h]));break;case 36:this.$=new e.DataNode(g[h]);break;case 37:this.$=new e.IdNode(g[h]);break;case 38:g[h-2].push({part:g[h],separator:g[h-1]}),this.$=g[h-2];break;case 39:this.$=[{part:g[h]}];break;case 42:this.$=[];break;case 43:g[h-1].push(g[h]);break;case 46:this.$=[g[h]];break;case 47:g[h-1].push(g[h])}},table:[{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,38:[1,28],40:[1,27],41:26},{17:29,21:24,30:25,38:[1,28],40:[1,27],41:26},{17:30,21:24,30:25,38:[1,28],40:[1,27],41:26},{17:31,21:24,30:25,38:[1,28],40:[1,27],41:26},{21:33,26:32,32:[1,34],33:[1,35],38:[1,28],41:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,38:[1,28],40:[1,27],41:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,42],24:[2,42],28:43,32:[2,42],33:[2,42],34:[2,42],38:[2,42],40:[2,42]},{18:[2,25],24:[2,25]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],38:[2,37],40:[2,37],42:[1,44]},{21:45,38:[1,28],41:26},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],38:[2,39],40:[2,39],42:[2,39]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,40],21:50,27:49,38:[1,28],41:26},{18:[2,33],38:[2,33]},{18:[2,34],38:[2,34]},{18:[2,35],38:[2,35]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,38:[1,28],41:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,44],21:56,24:[2,44],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:55,36:61,37:62,38:[1,63],40:[1,27],41:26},{38:[1,64]},{18:[2,36],24:[2,36],32:[2,36],33:[2,36],34:[2,36],38:[2,36],40:[2,36]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,65]},{18:[2,41]},{18:[1,66]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24]},{18:[2,43],24:[2,43],32:[2,43],33:[2,43],34:[2,43],38:[2,43],40:[2,43]},{18:[2,45],24:[2,45]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],38:[2,26],40:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],38:[2,27],40:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],38:[2,28],40:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],38:[2,29],40:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],38:[2,30],40:[2,30]},{18:[2,31],24:[2,31],37:67,38:[1,68]},{18:[2,46],24:[2,46],38:[2,46]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],38:[2,39],39:[1,69],40:[2,39],42:[2,39]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],38:[2,38],40:[2,38],42:[2,38]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{18:[2,47],24:[2,47],38:[2,47]},{39:[1,69]},{21:56,30:60,31:70,32:[1,57],33:[1,58],34:[1,59],38:[1,28],40:[1,27],41:26},{18:[2,32],24:[2,32],38:[2,32]}],defaultActions:{3:[2,2],16:[2,1],50:[2,41]},parseError:function(a){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},d=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 14;break;case 1:return 14;case 2:return"\\"!==b.yytext.slice(-1)&&this.popState(),"\\"===b.yytext.slice(-1)&&e(0,1),14;case 3:return e(0,4),this.popState(),15;case 4:return 25;case 5:return 16;case 6:return 20;case 7:return 19;case 8:return 19;case 9:return 23;case 10:return 22;case 11:this.popState(),this.begin("com");break;case 12:return e(3,5),this.popState(),15;case 13:return 22;case 14:return 39;case 15:return 38;case 16:return 38;case 17:return 42;case 18:break;case 19:return this.popState(),24;case 20:return this.popState(),18;case 21:return b.yytext=e(1,2).replace(/\\"/g,'"'),32;case 22:return b.yytext=e(1,2).replace(/\\'/g,"'"),32;case 23:return 40;case 24:return 34;case 25:return 34;case 26:return 33;case 27:return 38;case 28:return b.yytext=e(1,2),38;case 29:return"INVALID";case 30:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s])))/,/^(?:false(?=([~}\s])))/,/^(?:-?[0-9]+(?=([~}\s])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[3],inclusive:!1},INITIAL:{rules:[0,1,30],inclusive:!0}},a}();return c.lexer=d,b.prototype=c,c.Parser=b,new b}();return a=b}(),i=function(a,b){"use strict";function c(a){return a.constructor===f.ProgramNode?a:(e.yy=f,e.parse(a))}var d={},e=a,f=b;return d.parser=e,d.parse=c,d}(h,g),j=function(a){"use strict";function b(a){this.value=a}function c(){}var d,e=a.COMPILER_REVISION,f=a.REVISION_CHANGES,g=a.log;c.prototype={nameLookup:function(a,b){var d,e;return 0===a.indexOf("depth")&&(d=!0),e=/^[0-9]+$/.test(b)?a+"["+b+"]":c.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']",d?"("+a+" && "+e+")":e},appendToBuffer:function(a){return this.environment.isSimple?"return "+a+";":{appendToBuffer:!0,content:a,toString:function(){return"buffer += "+a+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,c,d){this.environment=a,this.options=b||{},g("debug",this.environment.disassemble()+"\n\n"),this.name=this.environment.name,this.isChild=!!c,this.context=c||{programs:[],environments:[],aliases:{}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.registers={list:[]},this.compileStack=[],this.inlineStack=[],this.compileChildren(a,b);var e,f=a.opcodes;this.i=0;for(var h=f.length;this.ih;h++)d.push("depth"+this.environment.depths.list[h]);var j=this.mergeSource();if(!this.isChild){var k=e,l=f[k];j="this.compilerInfo = ["+k+",'"+l+"'];\n"+j}if(a)return d.push(j),Function.apply(this,d);var m="function "+(this.name||"")+"("+d.join(",")+") {\n "+j+"}";return g("debug",m+"\n\n"),m},mergeSource:function(){for(var a,b="",c=0,d=this.source.length;d>c;c++){var e=this.source[c];e.appendToBuffer?a=a?a+"\n + "+e.content:e.content:(a&&(b+="buffer += "+a+";\n ",a=void 0),b+=e+"\n ")}return b},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=["depth0"];this.setupParams(0,a),this.replaceStack(function(b){return a.splice(1,0,b),"blockHelperMissing.call("+a.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=["depth0"];this.setupParams(0,a);var b=this.topStack();a.splice(1,0,b),a[a.length-1]="options",this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){this.pendingContent&&(a=this.pendingContent+a),this.stripNext&&(a=a.replace(/^\s+/,"")),this.pendingContent=a},strip:function(){this.pendingContent&&(this.pendingContent=this.pendingContent.replace(/\s+$/,"")),this.stripNext="strip"},append:function(){this.flushInline();var a=this.popStack();this.pushSource("if("+a+" || "+a+" === 0) { "+this.appendToBuffer(a)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){this.lastContext!==a&&(this.lastContext=a)},lookupOnContext:function(a){this.push(this.nameLookup("depth"+this.lastContext,a,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"',this.replaceStack(function(a){return"typeof "+a+" === functionType ? "+a+".apply(depth0) : "+a})},lookup:function(a){this.replaceStack(function(b){return b+" == null || "+b+" === false ? "+b+" : "+this.nameLookup(b,a,"context")})},lookupData:function(){this.push("data")},pushStringParam:function(a,b){this.pushStackLiteral("depth"+this.lastContext),this.pushString(b),"string"==typeof a?this.pushString(a):this.pushStackLiteral(a)},emptyHash:function(){this.pushStackLiteral("{}"),this.options.stringParams&&(this.register("hashTypes","{}"),this.register("hashContexts","{}"))},pushHash:function(){this.hash={values:[],types:[],contexts:[]}},popHash:function(){var a=this.hash;this.hash=void 0,this.options.stringParams&&(this.register("hashContexts","{"+a.contexts.join(",")+"}"),this.register("hashTypes","{"+a.types.join(",")+"}")),this.push("{\n "+a.values.join(",\n ")+"\n }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){return this.inlineStack.push(a),a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},invokeHelper:function(a,b){this.context.aliases.helperMissing="helpers.helperMissing";var c=this.lastHelper=this.setupHelper(a,b,!0),d=this.nameLookup("depth"+this.lastContext,b,"context");this.push(c.name+" || "+d),this.replaceStack(function(a){return a+" ? "+a+".call("+c.callParams+") : helperMissing.call("+c.helperMissingParams+")"})},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.context.aliases.functionType='"function"',this.pushStackLiteral("{}");var c=this.setupHelper(0,a,b),d=this.lastHelper=this.nameLookup("helpers",a,"helper"),e=this.nameLookup("depth"+this.lastContext,a,"context"),f=this.nextStack();this.pushSource("if ("+f+" = "+d+") { "+f+" = "+f+".call("+c.callParams+"); }"),this.pushSource("else { "+f+" = "+e+"; "+f+" = typeof "+f+" === functionType ? "+f+".call("+c.callParams+") : "+f+"; }")},invokePartial:function(a){var b=[this.nameLookup("partials",a,"partial"),"'"+a+"'",this.popStack(),"helpers","partials"];this.options.data&&b.push("data"),this.context.aliases.self="this",this.push("self.invokePartial("+b.join(", ")+")")},assignToHash:function(a){var b,c,d=this.popStack();this.options.stringParams&&(c=this.popStack(),b=this.popStack());var e=this.hash;b&&e.contexts.push("'"+a+"': "+b),c&&e.types.push("'"+a+"': "+c),e.values.push("'"+a+"': ("+d+")")},compiler:c,compileChildren:function(a,b){for(var c,d,e=a.children,f=0,g=e.length;g>f;f++){c=e[f],d=new this.compiler;var h=this.matchExistingProgram(c);null==h?(this.context.programs.push(""),h=this.context.programs.length,c.index=h,c.name="program"+h,this.context.programs[h]=d.compile(c,b,this.context),this.context.environments[h]=c):(c.index=h,c.name="program"+h)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){if(this.context.aliases.self="this",null==a)return"self.noop";for(var b,c=this.environment.children[a],d=c.depths.list,e=[c.index,c.name,"data"],f=0,g=d.length;g>f;f++)b=d[f],1===b?e.push("depth0"):e.push("depth"+(b-1));return(0===d.length?"self.program(":"self.programWithDepth(")+e.join(", ")+")"},register:function(a,b){this.useRegister(a),this.pushSource(a+" = "+b+";")},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStackLiteral:function(a){return this.push(new b(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),a&&this.source.push(a)},pushStack:function(a){this.flushInline();var b=this.incrStack();return a&&this.pushSource(b+" = "+a+";"),this.compileStack.push(b),b},replaceStack:function(a){var c,d="",e=this.isInline();if(e){var f=this.popStack(!0);if(f instanceof b)c=f.value;else{var g=this.stackSlot?this.topStackName():this.incrStack();d="("+this.push(g)+" = "+f+"),",c=this.topStack()}}else c=this.topStack();var h=a.call(this,c);return e?((this.inlineStack.length||this.compileStack.length)&&this.popStack(),this.push("("+d+h+")")):(/^stack/.test(c)||(c=this.nextStack()),this.pushSource(c+" = ("+d+h+");")),c},nextStack:function(){return this.pushStack()},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var c=0,d=a.length;d>c;c++){var e=a[c];e instanceof b?this.compileStack.push(e):this.pushStack(e)}}},isInline:function(){return this.inlineStack.length },popStack:function(a){var c=this.isInline(),d=(c?this.inlineStack:this.compileStack).pop();return!a&&d instanceof b?d.value:(c||this.stackSlot--,d)},topStack:function(a){var c=this.isInline()?this.inlineStack:this.compileStack,d=c[c.length-1];return!a&&d instanceof b?d.value:d},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},setupHelper:function(a,b,c){var d=[];this.setupParams(a,d,c);var e=this.nameLookup("helpers",b,"helper");return{params:d,name:e,callParams:["depth0"].concat(d).join(", "),helperMissingParams:c&&["depth0",this.quotedString(b)].concat(d).join(", ")}},setupParams:function(a,b,c){var d,e,f,g=[],h=[],i=[];g.push("hash:"+this.popStack()),e=this.popStack(),f=this.popStack(),(f||e)&&(f||(this.context.aliases.self="this",f="self.noop"),e||(this.context.aliases.self="this",e="self.noop"),g.push("inverse:"+e),g.push("fn:"+f));for(var j=0;a>j;j++)d=this.popStack(),b.push(d),this.options.stringParams&&(i.push(this.popStack()),h.push(this.popStack()));return this.options.stringParams&&(g.push("contexts:["+h.join(",")+"]"),g.push("types:["+i.join(",")+"]"),g.push("hashContexts:hashContexts"),g.push("hashTypes:hashTypes")),this.options.data&&g.push("data:data"),g="{"+g.join(",")+"}",c?(this.register("options",g),b.push("options")):b.push(g),b.join(", ")}};for(var h="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),i=c.RESERVED_WORDS={},j=0,k=h.length;k>j;j++)i[h[j]]=!0;return c.isValidJavaScriptVariableName=function(a){return!c.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(a)?!0:!1},d=c}(d),k=function(a,b,c,d){"use strict";function e(){}function f(a,b){if(null==a||"string"!=typeof a&&a.constructor!==l.ProgramNode)throw new i("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0);var c=j(a),d=(new e).compile(c,b);return(new k).compile(d,b)}function g(a,b,c){function d(){var d=j(a),f=(new e).compile(d,b),g=(new k).compile(f,b,void 0,!0);return c.template(g)}if(null==a||"string"!=typeof a&&a.constructor!==l.ProgramNode)throw new i("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=b||{},"data"in b||(b.data=!0);var f;return function(a,b){return f||(f=d()),f.call(this,a,b)}}var h={},i=a,j=b.parse,k=c,l=d;return h.Compiler=e,e.prototype={compiler:e,disassemble:function(){for(var a,b,c,d=this.opcodes,e=[],f=0,g=d.length;g>f;f++)if(a=d[f],"DECLARE"===a.opcode)e.push("DECLARE "+a.name+"="+a.value);else{b=[];for(var h=0;hc;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||d.args.length!==e.args.length)return!1;for(var f=0;fc;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=b;var c=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0},c)for(var d in c)this.options.knownHelpers[d]=c[d];return this.accept(a)},accept:function(a){var b,c=a.strip||{};return c.left&&this.opcode("strip"),b=this[a.type](a),c.right&&this.opcode("strip"),b},program:function(a){for(var b=a.statements,c=0,d=b.length;d>c;c++)this.accept(b[c]);return this.isSimple=1===d,this.depths.list=this.depths.list.sort(function(a,b){return a-b}),this},compileProgram:function(a){var b,c=(new this.compiler).compile(a,this.options),d=this.guid++;this.usePartial=this.usePartial||c.usePartial,this.children[d]=c;for(var e=0,f=c.depths.list.length;f>e;e++)b=c.depths.list[e],2>b||this.addDepth(b-1);return d},block:function(a){var b=a.mustache,c=a.program,d=a.inverse;c&&(c=this.compileProgram(c)),d&&(d=this.compileProgram(d));var e=this.classifyMustache(b);"helper"===e?this.helperMustache(b,c,d):"simple"===e?(this.simpleMustache(b),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("blockValue")):(this.ambiguousMustache(b,c,d),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(a){var b,c,d=a.pairs;this.opcode("pushHash");for(var e=0,f=d.length;f>e;e++)b=d[e],c=b[1],this.options.stringParams?(c.depth&&this.addDepth(c.depth),this.opcode("getContext",c.depth||0),this.opcode("pushStringParam",c.stringModeValue,c.type)):this.accept(c),this.opcode("assignToHash",b[0]);this.opcode("popHash")},partial:function(a){var b=a.partialName;this.usePartial=!0,a.context?this.ID(a.context):this.opcode("push","depth0"),this.opcode("invokePartial",b.name),this.opcode("append")},content:function(a){this.opcode("appendContent",a.string)},mustache:function(a){var b=this.options,c=this.classifyMustache(a);"simple"===c?this.simpleMustache(a):"helper"===c?this.helperMustache(a):this.ambiguousMustache(a),a.escaped&&!b.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousMustache:function(a,b,c){var d=a.id,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("invokeAmbiguous",e,f)},simpleMustache:function(a){var b=a.id;"DATA"===b.type?this.DATA(b):b.parts.length?this.ID(b):(this.addDepth(b.depth),this.opcode("getContext",b.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperMustache:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.id.parts[0];if(this.options.knownHelpers[e])this.opcode("invokeKnownHelper",d.length,e);else{if(this.options.knownHelpersOnly)throw new Error("You specified knownHelpersOnly, but used the unknown helper "+e);this.opcode("invokeHelper",d.length,e)}},ID:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0];b?this.opcode("lookupOnContext",a.parts[0]):this.opcode("pushContext");for(var c=1,d=a.parts.length;d>c;c++)this.opcode("lookup",a.parts[c])},DATA:function(a){if(this.options.data=!0,a.id.isScoped||a.id.depth)throw new i("Scoped data references are not supported: "+a.original);this.opcode("lookupData");for(var b=a.id.parts,c=0,d=b.length;d>c;c++)this.opcode("lookup",b[c])},STRING:function(a){this.opcode("pushString",a.string)},INTEGER:function(a){this.opcode("pushLiteral",a.integer)},BOOLEAN:function(a){this.opcode("pushLiteral",a.bool)},comment:function(){},opcode:function(a){this.opcodes.push({opcode:a,args:[].slice.call(arguments,1)})},declare:function(a,b){this.opcodes.push({opcode:"DECLARE",name:a,value:b})},addDepth:function(a){if(isNaN(a))throw new Error("EWOT");0!==a&&(this.depths[a]||(this.depths[a]=!0,this.depths.list.push(a)))},classifyMustache:function(a){var b=a.isHelper,c=a.eligibleHelper,d=this.options;if(c&&!b){var e=a.id.parts[0];d.knownHelpers[e]?b=!0:d.knownHelpersOnly&&(c=!1)}return b?"helper":c?"ambiguous":"simple"},pushParams:function(a){for(var b,c=a.length;c--;)b=a[c],this.options.stringParams?(b.depth&&this.addDepth(b.depth),this.opcode("getContext",b.depth||0),this.opcode("pushStringParam",b.stringModeValue,b.type)):this[b.type](b)},setupMustacheParams:function(a){var b=a.params;return this.pushParams(b),a.hash?this.hash(a.hash):this.opcode("emptyHash"),b},setupFullMustacheParams:function(a,b,c){var d=a.params;return this.pushParams(d),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.hash(a.hash):this.opcode("emptyHash"),d}},h.precompile=f,h.compile=g,h}(c,i,j,g),l=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c.parser,j=c.parse,k=d.Compiler,l=d.compile,m=d.precompile,n=e,o=g.create,p=function(){var a=o();return a.compile=function(b,c){return l(b,c,a)},a.precompile=m,a.AST=h,a.Compiler=k,a.JavaScriptCompiler=n,a.Parser=i,a.parse=j,a};return g=p(),g.create=p,f=g}(f,g,i,k,j);return l}(); /* end: /ISS_Static/WW/site/scripts/handlebars.min.js(41624) */ /* start: /ISS_Static/WW/site/scripts/handlebars_helpers.js (cachekey: [])*/ /** * Handlebars Helpers - Dan Harper (http://github.com/danharper) * https://github.com/danharper/Handlebars-Helpers * * This is a compilation of the current branch (v2.0.0) and old version 1.1.0 * (https://github.com/danharper/Handlebars-Helpers/tree/v1.1.0) * * This program is free software. It comes without any warranty, to * the extent permitted by applicable law. You can redistribute it * and/or modify it under the terms of the Do What The Fuck You Want * To Public License, Version 2, as published by Sam Hocevar. See * http://sam.zoy.org/wtfpl/COPYING for more details. */ (function (root, factory) { if (typeof exports === 'object') { module.exports = factory(require('handlebars')); } else if (typeof define === 'function' && define.amd) { define(['handlebars'], factory); } else { root.HandlebarsHelpersRegistry = factory(root.Handlebars); } }(this, function (Handlebars) { var isArray = function(value) { return Object.prototype.toString.call(value) === '[object Array]'; } var ExpressionRegistry = function() { this.expressions = []; }; ExpressionRegistry.prototype.add = function (operator, method) { this.expressions[operator] = method; }; ExpressionRegistry.prototype.call = function (operator, left, right) { if ( ! this.expressions.hasOwnProperty(operator)) { throw new Error('Unknown operator "'+operator+'"'); } return this.expressions[operator](left, right); }; var eR = new ExpressionRegistry; eR.add('not', function(left, right) { return left != right; }); eR.add('>', function(left, right) { return left > right; }); eR.add('<', function(left, right) { return left < right; }); eR.add('>=', function(left, right) { return left >= right; }); eR.add('<=', function(left, right) { return left <= right; }); eR.add('===', function(left, right) { return left === right; }); eR.add('!==', function(left, right) { return left !== right; }); eR.add('in', function(left, right) { if ( ! isArray(right)) { right = right.split(','); } return right.indexOf(left) !== -1; }); var isHelper = function() { var args = arguments , left = args[0] , operator = args[1] , right = args[2] , options = args[3] ; if (args.length == 2) { options = args[1]; if (left) return options.fn(this); return options.inverse(this); } if (args.length == 3) { right = args[1]; options = args[2]; if (left == right) return options.fn(this); return options.inverse(this); } if (eR.call(operator, left, right)) { return options.fn(this); } return options.inverse(this); }; /** * Is * Given one argument, is acts exactly like if: {{#is this}}...{{/is}} * Given two arguments, is compares the two are equal (a non-strict, == comparison): {{#is this that}}...{{/is}} * Given three arguments, the second argument becomes the comparator: {{#is this "not" that}}...{{/is}} * Built-in comparators: * == (same as not providing a comparator) * != * not (alias for !=) * === * !== * > * >= * < * <= * in (check a value exists in either a comma-separated string, or an array) */ Handlebars.registerHelper('is', isHelper); /** * Convert new line (\n\r) to
* from http://phpjs.org/functions/nl2br:480 * {{nl2br description}} */ Handlebars.registerHelper('nl2br', function(text) { var nl2br = (text + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + '
' + '$2'); return new Handlebars.SafeString(nl2br); }); /** * Log * Log one or multiple values to the console: {{log foo bar}} */ Handlebars.registerHelper('log', function() { console.log(['Values:'].concat( Array.prototype.slice.call(arguments, 0, -1) )); }); /** * Debug * Log one or multiple values to the console, /with the current context/: {{debug foo bar}} */ Handlebars.registerHelper('debug', function() { console.log('Context:', this); console.log(['Values:'].concat( Array.prototype.slice.call(arguments, 0, -1) )); }); /** * If Equals * {{#if_eq this compare=that}}...{{/if_eq}} */ Handlebars.registerHelper('if_eq', function(context, options) { if (context == options.hash.compare) return options.fn(this); return options.inverse(this); }); /** * Unless Equals * {{#unless_eq this compare=that}}...{{/unless_eq}} */ Handlebars.registerHelper('unless_eq', function(context, options) { if (context == options.hash.compare) return options.inverse(this); return options.fn(this); }); /** * If Greater Than * {{#if_gt this compare=that}}...{{/if_gt}} */ Handlebars.registerHelper('if_gt', function(context, options) { if (context > options.hash.compare) return options.fn(this); return options.inverse(this); }); /** * Unless Greater Than * {{#unless_gt this compare=that}}...{{/unless_gt}} */ Handlebars.registerHelper('unless_gt', function(context, options) { if (context > options.hash.compare) return options.inverse(this); return options.fn(this); }); /** * If Less Than * {{#if_lt this compare=that}}...{{/if_lt}} */ Handlebars.registerHelper('if_lt', function(context, options) { if (context < options.hash.compare) return options.fn(this); return options.inverse(this); }); /** * Unless Less Than * {{#unless_lt this compare=that}}...{{/unless_lt}} */ Handlebars.registerHelper('unless_lt', function(context, options) { if (context < options.hash.compare) return options.inverse(this); return options.fn(this); }); /** * If Greater Than or Equal To * {{#if_gteq this compare=that}}...{{/if_gteq}} */ Handlebars.registerHelper('if_gteq', function(context, options) { if (context >= options.hash.compare) return options.fn(this); return options.inverse(this); }); /** * Unless Greater Than or Equal To * {{#unless_gteq this compare=that}}...{{/unless_gteq}} */ Handlebars.registerHelper('unless_gteq', function(context, options) { if (context >= options.hash.compare) return options.inverse(this); return options.fn(this); }); /** * If Less Than or Equal To * {{#if_lteq this compare=that}}...{{/if_lteq}} */ Handlebars.registerHelper('if_lteq', function(context, options) { if (context <= options.hash.compare) return options.fn(this); return options.inverse(this); }); /** * Unless Less Than or Equal To * {{#unless_lteq this compare=that}}...{{/unless_lteq}} */ Handlebars.registerHelper('unless_lteq', function(context, options) { if (context <= options.hash.compare) return options.inverse(this); return options.fn(this); }); return eR; })); /* end: /ISS_Static/WW/site/scripts/handlebars_helpers.js(7100) */ /* start: /ISS_Static/WW/site/scripts/fancybox/jquery.easing-1.3.pack.js (cachekey: [])*/ /* * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ * * Uses the built in easing capabilities added In jQuery 1.1 * to offer multiple easing options * * TERMS OF USE - jQuery Easing * * Open source under the BSD License. * * Copyright © 2008 George McGinley Smith * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ // t: current time, b: begInnIng value, c: change In value, d: duration eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('

The requested content cannot be loaded.
Please try again later.

'); F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)|| c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick= false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('
').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel", function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='';P="";b.each(e.swf,function(x,H){C+='';P+=" "+x+'="'+H+'"'});C+='";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win== "function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('
');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor, opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length? d.titlePosition=="float"?'
'+s+'
':'
'+s+"
":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding}); y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height== i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents()); f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode== 37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto"); s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('').appendTo(j); f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c); j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type== "image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"), 10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)}; b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k= 0,C=a.length;ko.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+ 1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h= true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1; b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5- d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('
'),t=b('
'),u=b('
'),f=b('
'));D=b('
').append('
').appendTo(f); D.append(j=b('
'),E=b(''),n=b('
'),z=b(''),A=b(''));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()}); b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('').prependTo(D)}}}; b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing", easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery); /* end: /ISS_Static/WW/site/scripts/fancybox/jquery.fancybox-1.3.4.pack.js(15625) */ /* start: /ISS_Static/WW/site/scripts/jquery/jquery.ba-bbq.min.js (cachekey: [])*/ /* * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010 * http://benalman.com/projects/jquery-bbq-plugin/ * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ (function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('
"); } var json = $.getJSON(_GALLERY_JSON_FILE,function(data){ if(typeof data.video == 'object'){ assets.video.count = (typeof data.video.length == 'number') ? data.video.length : 1; if (assets.video.count === 1){ assets.video.label = _GALLERY_RSB["video"]; } if (data.hasOwnProperty('ls_video')) { assets.video.bg_url = data.ls_video.video_bg_url; assets.video.bg_color_name = data.ls_video.video_bg_color_name; } } else { delete assets.video; } if(typeof data.image == 'object'){ assets.image.count = (typeof data.image.length == 'number') ? data.image.length : 1; if (assets.image.count === 1){ assets.image.label = _GALLERY_RSB["photo"]; } if (data.hasOwnProperty('ls_image')) { assets.image.bg_url = data.ls_image.image_bg_url; assets.image.bg_color_name = data.ls_image.image_bg_color_name; } } else { delete assets.image; } if(typeof data.view_360 == 'object'){ assets.view_360.url = data.view_360.link; if (data.hasOwnProperty('ls_360')) { assets.view_360.bg_url = data.ls_360.view_360_bg_url; assets.view_360.bg_color_name = data.ls_360.view_360_bg_color_name; } } else { delete assets.view_360; } // Begin ------------------ FP2420 - GWE-867 if ((typeof data.video == 'undefined') && (typeof data.view_360 == 'undefined') && parseInt($longscrollVersion) > 1){ source ='{{#each .}}'+ ''+ '{{/each}}'; } // END ------------------ FP2420 - GWE-867 var template = Handlebars.compile(source); $mediaGallery.append(template(assets)); setMediaGalleryLinkWidth($mediaGallery); var $body = $('body'), $liCount = $(".galleryOptions > li").length, galleryClass = "eq-" + $liCount; if ($longscroll.length) $(".galleryOptions").addClass(galleryClass); if(!$('html').hasClass('lt-ie9')){ $mediaGallery.off("click",".galleryMedia").on("click", ".galleryMedia, .label-galleryMedia", function(){ //var $window = $(window); var $document = $(document); //ratio/proportion calculator helper var __r = function(w, h, n, d) { var value = null; if (typeof n === "number" && typeof d === "number") { var scalar = (n / (d > 0 ? d : 1)); if (typeof w !== "undefined") { //solve for width value = Math.round(w / scalar); } else if (typeof h !== "undefined") { //solve for height value = Math.round(h * scalar); } } return value; }; //start building iframe url var iframeUrl = $(this).attr('data-url'); //get viewport dimensions var winW = _viewport().width, winH = _viewport().height, //iframe dimenstions should be ~80% of window (margin/padding, etc) iW = winW * 0.80, iH = winH * 0.80; //set iframe+video sizes based on current viewport //keep 4:3 ratio; maxheight=430.5px, maxwidth=574px /*if (iW > 575) { iW = 575; if (iH > 430.5) { iH = 430.5; } else { iW = __r(undefined, iH, 4, 3); } } else { iH = __r(iW, undefined, 4, 3); }*/ if(iframeUrl .indexOf('?') == -1){ iframeUrl += "?width=" + iW + "&height=" + iH; }else{ iframeUrl += "&width=" + iW + "&height=" + iH; } //If the page is long scroll and iPad size or less if($longscroll.length > 0 && _viewport().width <= longscrollMediumBreakPointEnd) { modalMediaGalleryNavigation(iframeUrl); } //If the page is NOT a long scroll page OR not iPad size or less else { //call openModal method via app.MODAL window.openModal(iframeUrl+"&_nocache="+(new Date()).getTime(), { contentType: "iframe", //force iframe content modalType: "overlay" //force overlay method }); } var setIframeSize = function(){ if(winW < 650){ $body.find(".lnvmodal .lnvmodal-content").addClass("lnvmodal-gallery").find("iframe").width("100%").height(iH); } else { if (iH < (iW / 1.333333)) { $body.find(".lnvmodal .lnvmodal-content").addClass("lnvmodal-gallery").find("iframe").css({ 'max-width': '1000px', 'max-height': '750px' }).width(iH * 1.333333).height(iH); } else { $body.find(".lnvmodal .lnvmodal-content").addClass("lnvmodal-gallery").find("iframe").css({ 'max-width': '1000px', 'max-height': '750px' }).width(iW).height(iW / 1.333333); } } //Long Scroll specific stuff if($longscroll.length) { $(".lnvmodal-content.lnvmodal-gallery").attr("style", "max-height: 760px !important"); if(_viewport().width <= longscrollSmallBreakPointEnd) { $body.find(".mediaGalleryMobileInlineGallery").find("iframe").width("100%").height("50vh").css({ 'max-height': '50vh' }); } else if(_viewport().width <= longscrolliPadWidth) { $body.find(".mediaGalleryMobileInlineGallery").find("iframe").width("100%").height("432px").css({ 'max-height': '432px' }); } } }; if($longscroll.length) { var htmlOutput = addMediaGalleryLinksToModal($(this).attr("class")); $(".lnvmodal-inner").append(htmlOutput); $(".selectionWrapper > .galleryMedia").on("click", function() { $(".selectionWrapper > .galleryMedia").removeClass("activeMediaLink"); if($(this).hasClass("activeMediaLink")) { return false; } else { $(this).addClass("activeMediaLink"); } }); } setIframeSize(); $(window).resize(function(){ winW = _viewport().width; winH = _viewport().height; //iframe dimenstions should be ~80% of window (margin/padding, etc) iW = winW * 0.80; iH = winH * 0.80; setIframeSize(); if($longscroll.length && _viewport().width > longscrolliPadWidth) { if($("#mobile-mediagallery-iframe").length) { $("#mobile-mediagallery-iframe").addClass("hidden"); } } }); }); } /*Workaround for IE8 browser, force the gallery to open in a new window*/ else{ $mediaGallery.off("click",".galleryMedia").on("click", ".galleryMedia, .label-galleryMedia", function(){ var Url = "http://"+ location.host + $(this).attr('data-url'); window.open(Url,null,"menubar=no,resizable=yes,scrollbars=yes,status=no,width=575,height=430,location=no"); }); } }); $(window).resize(function(){ setMediaGalleryLinkWidth($mediaGallery); }); $('body').find(".lnvmodal .lnvmodal-content").find("iframe").children(".galleria-container.notouch").click(function(){ event.preventDefault(); }); function setMediaGalleryLinkWidth ($mediaGallery) { var $photoWidth, galleryOptionsWidth, $listItemWidth = 0, liPadding; if (_viewport().width > 750 && _viewport().width < 835) { liPadding = 15; } else { liPadding = 11; } if ($("body").hasClass("potato-head-configuration")){ liPadding = 30; } $photoWidth = $(".productImg").outerWidth(); $mediaGallery.find(".galleryOptions li").each(function(){ $listItemWidth += $(this).outerWidth(); }); galleryOptionsWidth = Math.round(($listItemWidth / $photoWidth) * 100) + liPadding; //$mediaGallery.find(".galleryOptions").css("width", galleryOptionsWidth+"%" ); } var _viewport = function () { var e = window, a = 'inner'; if (!('innerWidth' in window )) { a = 'client'; e = document.documentElement || document.body; } return { width : e[ a+'Width' ] , height : e[ a+'Height' ] }; }; $(document).keydown(function(e){ imageGalleryKeyboardSupport(e); }); }); function modalMediaGalleryNavigation(dataURL) { var modalIFrame = $(".lnvmodal-inner").find("iframe"), mobileIFrame = $(".mediaGalleryMobileInlineGallery").find("iframe"), mobileIFrameWrapper = $(".mediaGalleryMobileInlineGallery"); if(modalIFrame.length) { modalIFrame.attr("src", dataURL); } else if(mobileIFrame.length) { mobileIFrame.attr("src", dataURL); mobileIFrameWrapper.removeClass("hidden"); } //var iframe = $(".lnvmodal-inner").find("iframe"); } function addMediaGalleryLinksToModal(clickedLink) { var galleryOptionsLinks = $(".galleryOptions li .galleryMedia", ".mediaGallery").clone(), htmlOutput = ""; return htmlOutput; } function imageGalleryKeyboardSupport(e) { //Variables set, for checking if gallery is in lightbox modal or embedded on page KeyboardSupport.lightboxModal = $(".lnvmodal-content > iframe"), KeyboardSupport.embeddedGallery = $(".mediaGallery > iframe"); if(KeyboardSupport.lightboxModal.length > 0) { KeyboardSupport.galleria = KeyboardSupport.lightboxModal[0].contentWindow.Galleria || KeyboardSupport.lightboxModal[0].contentDocument.Galleria, KeyboardSupport.lightBoxModalCheck = true; } else if(KeyboardSupport.embeddedGallery.length > 0) { KeyboardSupport.galleria = KeyboardSupport.embeddedGallery[0].contentWindow.Galleria || KeyboardSupport.embeddedGallery[0].contentDocument.Galleria, KeyboardSupport.embeddedGalleryCheck = true; } //supported key functions for lightboxModal and embeddedGallery if(KeyboardSupport.lightBoxModalCheck == true || KeyboardSupport.embeddedGalleryCheck == true) { gallery = KeyboardSupport.galleria.get(0), galleryLength = gallery.getDataLength(); //Right Arrow Support if (e.keyCode == KeyboardSupport.keyboardLeft) { e.preventDefault(); gallery.next(); } //Left Arrow Support if (e.keyCode == KeyboardSupport.keyboardRight) { e.preventDefault(); gallery.prev(); } //Supported key functions for only lightboxModal if(KeyboardSupport.lightBoxModalCheck == true) { //Tab Key Support if(e.keyCode == KeyboardSupport.keyboardTab) { e.preventDefault(); gallery.next(); } //Home Key Support if (e.keyCode == KeyboardSupport.keyboardHome) { e.preventDefault(); gallery.show(0); } //End Key Support if (e.keyCode == KeyboardSupport.keyboardEnd) { e.preventDefault(); gallery.show(galleryLength); } } } } /* end: /ISS_Static/WW/site/scripts/owv2/gallery-v2.js(14312) */ /* start: /ISS_Static/WW/site/scripts/owv2/configurator_v2.js (cachekey: [])*/ // Generated by CoffeeScript 1.8.0 /* * LENOVO.CONFIGURATOR module (2EXFIX) * -------------------------- * Dependencies: jQuery, LENOVO.MAIN, LENOVO.TEMPLATES, LENOVO.ENV, LENOVO.UTILS */ (function(app, $) { var $addToCart, $body, $configurator, $ctaPriceLabel, $ctaPriceValue, $document, $interstitial, $itemsummary, $mainsummary, $productlistings, $tabcontainer, $tabtrigger, $window, $wrapper, $stackableSection, $stackableHeader, $sectionContent, COMBINEDPARTS, DESKTOP_PAGE2_SOFTWARE_PARTS, NOTEBOOK_PAGE2_SOFTWARE_PARTS, PREMIUM_SUPPORT_PARTS, NOTEBOOK_PAGE2_WARRANTY_PARTS, DESKTOP_PAGE2_WARRANTY_PARTS, self, _M, __getNextTab, __htmlDecode, __isUrl, __makeRel, __progress, __scrollTo, __scrub, _activeTab, _activityMessage, _addInterstitialMbox, _addToCart, _addToWishlist, _autoOpenCategories, _basedata, _baseurl, _breakPoints, _builderdata, _buildermode, _category, _configuratorInputUpdate, _createBuilderUI, _createPriceMap, _createProductInfo, _createTabMap, _createTelesalesForm, _created, _currentSelect, _debug, _defaults, _firstRun, _focusInterstitialUI, _getBuilderMode, _getConfigParams, _getHeaderSelections, _getJSON, _getMandatoryParams, _getSelectionsTitle, _getTemplate, _goToStep, _groupFeatures, _handleAjaxError, _handleContinue, _handleDepleted, _handleParseError, _handleUndo, _hasSelections, _hiddenTabs, _hideExpandAllLink, _initCustomize, _initialized, _interstitial, _loadBuilder, _loadInterstitial, _mode, _multibase, _navigateNext, _navigatePrevious, _navigateTo, _newTabs, _nextStep, _openCategories, _openConfigurator, _openSections, _originalCtaPrice, _parseJSON, _partMap, _postAttempts, _postLimit, _postProgress, _postToCart, _pricedata, _renderBuilderUI, _renderInterstitialUI, _rsb, _selectBoxItemByCode, _selectItem, _setupConfigurator, _showItemDetailsPopup, _showProgress, _subtitles, _tabMap, _task, _templateFilePath, _timer, _toggleSection, _transition, _unfocusInterstitialUI, _updateAsConfiguredPrice, _updateContentHeight, _urlParams, _urls, _useCached, _usedefaults, _verbose, _version, _visitedSteps, _trackEvents, _triggerEvent, _startingPrice, _currentPrice, _userSelections, _baseWarrKey, _lang; _M = "CONFIGURATOR"; _version = "2014-12-02"; _baseurl = window.long_url || ""; _debug = window.debugAllowed || false; _verbose = false; _usedefaults = false; _initialized = false; _urls = null; _userSelections = {}; _initialEvent = true; _newTabs = function() { return $(".tabbedBrowse").length > 0; }; _breakPoints = { ModeWizard: "(max-width: 55.99em)", ModeList: "(min-width: 56em)" }; _basedata = null; _builderdata = null; _pricedata = null; _rsb = null; _subtitles = null; _activeTab = { name: "SYSTEM", item: null, id: null, next: null, pn: null, prev: null }; _activityMessage = "Loading..."; _autoOpenCategories = false; _buildermode = null; _category = null; _created = false; _currentSelect = null; _firstRun = true; _interstitial = false; _hiddenTabs = []; _mode = "CTO"; _multibase = false; _openCategories = []; _openSections = {}; _originalCtaPrice = null; _postAttempts = 0; _postLimit = 2; _postProgress = 0; _task = "configure"; _templateFilePath = null; _timer = null; _urlParams = null; _useCached = false; _stackableWarranty = false; _stackableWarrContent = null; _curApplicableKey = ""; _baseWarrKey = ""; _lang = ""; _visitedSteps = { SYSTEM: true, WARRANTY: false, SOFTWARE: false, ACCESSORIES: false, CART: false }; _builderHistory = { trackHistory: false, queue: [], scrollTop: false, interstitial: false, enabled : true }; _defaults = { loadingMessage: "Loading...", mode: "CTO", task: "configure", hmdBundle: {}, hideParts: {}, templateSources: ["/ISS_Static/WW/site/templates/handlebars/owv2/builder.html"], templates: { bom: "builder_bom", configurator: "builder_configurator", interstitial: "builder_interstitial", modelist: "builder_modelist", modewizard: "builder_modewizard", mtm: "builder_mtm", recommendations: "builder_recommendations", mainsummary: "builder_mainsummary", tabs: "builder_tabs", telesales: "builder_telesales" }, collapsibleCalloutBoxClass: "sectionHeader-collapsible", currentTabClass: "tab-item-currentTab", expandedClass: "tabbedBrowse-configurator-expandItems-expand-all-is-expanded", expressShipButtonClass: "button-expressShip", fullWidthClass: "fullwidth", itemHiddenClass: "is-visuallyhidden", interstitialHideMeClass: "hide-elements-on-warranties-page", interstitialTabActiveClass: "stepsItem-item-currentStep", interstitialAccordionActiveClass: "configuratorItem-accordion-currentStep", interstitialAccordionCollapsedClass: "configuratorItem-accordion-collapsed", itemExpandedClass: "expandableHeading-is-expanded", selectedClass: "configuratorItem-optionList-option-selected", stackableSelectedClass: "stackableWarranty-optionList-option-selected", accordionContent: ".configuratorItem-accordion-content", bomSummary: "#system-components", buttonAddToCart: ".pricingSummary-cta .pricingSummary-button:not(.nextStep), .stepsItem-item > #CART, .configuratorItem-accordion-wrapper > #CART", buttonCTAs: ".tabbedBrowse-productListing-footer-button-first, .tabbedBrowse-productListing-footer-button-second, .tabbedBrowse-productListing-title a", buttonContainer: ".tabbedBrowse-productListing-button-container", buttonDebug: "#debugConfig", buttonLegacy: "#legacyLink", buttonNextStep: ".pricingSummary-cta .pricingSummary-button.nextStep", buttonSkip: ".pricingSummary-cta .pricingSummary-buttonSkip", buttonStartOver: "#startOver", summaryBox: ".subseries-minor", calloutBox: ".sectionHeader", collapsibleCalloutBox: ".sectionHeader-collapsible", closeItemSummary: ".js-closeSummary", configurator: ".tabbedBrowse-configurator", configuratorControls: ".tabbedBrowse-productListings-controls", configuratorForm: "form.expandableMenu", ctaPriceLabel: ".subseriesHeader .cta-price > dt", ctaPriceValue: ".subseriesHeader .cta-price > dd", expandAll: ".tabbedBrowse-configurator-expandItems-expand-all", expandableHeading: ".expandableHeading", expandableMenuList: ".configuratorItem .expandableMenu-list", expressShip: ".pricingSummary-expressShip", helpMeDecide: "a.hmd", interstitial: ".add-accessory-inner-wrapper", interstitialForm: ".configuratorItem-accessories-wrapper", interstitialHideUI: ".mainContent > :not(.tabbed-browse-wrapper, .footer-paymentOptions, .footer-legal-wrapper, #longscroll-subseries, .config-do-not-hide), .tabbedBrowse .tab-item > a, .tabbedBrowse-module:not(#tab-customize), #standard-on, .tabbedBrowse-title, #longscroll-subseries > :not(.tabbed-browse-wrapper, .pageWrapper, .footer-paymentOptions, .footer-legal-wrapper, .subseries-minor), #longscroll-subseries #tab-content > .content-item:not(#tab-li-currentmodels), #longscroll-subseries #tab-li-currentmodels #subtab-content .content-item:eq(1), #longscroll-subseries .mediaGallery, #longscroll-subseries > .pageWrapper > .tabbed-nav-wrapper", interstitialHideUIOld: ".mainContent > :not(.tabbedBrowse-modulesWrapper, .footer-paymentOptions, .footer-legal-wrapper), #standard-on, .tabbedBrowse-title", interstitialTab: ".stepsItem-item > a:not(#CART), .configuratorItem-accordion-wrapper > .configuratorItem-accordion-header:not(#CART)", interstitialTabsWrapper: ".stepsItem-wrapper", itemSummary: ".configuratorItem-summary", mainSummary: "#configure-summary", optionList: ".configuratorItem-optionList", optionInput: ".configuratorItem-optionList-option input, .configuratorItem-optionList-option select, .stackableWarranty-optionList-option input", pricingSummary: "#configure-summary", productListing: ".tabbedBrowse-productListing", productListingsWrapper: ".tabbedBrowse-productListings-wrapper", recommendedAccessories: ".recommmendAccessory-wrapper", skipToSummary: ".configuratorItem-summary .configuratorItem-summary-action-subtle > a, .configurator-skip-to-summary", standardOn: "#standard-on", startOverWrapper: ".tabbedBrowse-productListings-controls-startOver", tabContainerId: "#tab-customize", tabContainerMessage: ".tabbedBrowse-message", tabContainers: ".tabbedBrowse-module", tabItem: ".tab-item", tabTriggers: ".tab-item > a", tabTriggersOld: ".tabs-item", tabWrapper: ".tabbed-browse-wrapper", wrapper: ".tabbedBrowse-configurator-wrapper", singlesku: "#longscroll-singlesku", singleskuSummary: ".longscroll-singlesku-float .standard-on", subTabTitle: ".js-subTabTitle", mastheadWrapper: ".tabbed-nav-wrapper", singleSkuViewAll: ".longscroll-view-all-models a", modelsSection: "#tab-li-currentmodels", footerOptions: ".footer-paymentOptions", longscrollWrapper: "#longscroll-subseries", singleskuCta: "#singlesku-cta:not(.bundle-button)", tabbedBrowseScroller: ".tabbedBrowse-productListings-scroller" }; NOTEBOOK_PAGE2_SOFTWARE_PARTS = ["SANB", "SANB_PROD_SOFTWARE", "SANB_PROD_SOFTWARE_OFFICE", "SANB_PROD_SOFTWARE_ADDITIONAL", "SANB_SOFTWARE", "SANB_SOFTWARE_BUSINESS", "SANB_SOFTWARE_EDUCATION", "SANB_SOFTWARE_GAMES", "SANB_SOFTWARE_GRAPHICS", "SANB_SOFTWARE_ADOBE", "SANB_SOFTWARE_UTILITIES", "SANB_SOFTWARE_SECURITY"]; DESKTOP_PAGE2_SOFTWARE_PARTS = ["SADT", "SADT_PROD_SOFTWARE", "SADT_PROD_SOFTWARE_OFFICE", "SADT_PROD_SOFTWARE_ADDITIONAL", "SADT_SOFTWARE", "SADT_SOFTWARE_BUSINESS", "SADT_SOFTWARE_EDUCATION", "SADT_SOFTWARE_GAMES", "SADT_SOFTWARE_GRAPHICS", "SADT_SOFTWARE_ADOBE", "SADT_SOFTWARE_UTILITIES", "SADT_SOFTWARE_SECURITY", "SADT_SOFTWARE_PRODUCTIVITY"]; PREMIUM_SUPPORT_PARTS = []; NOTEBOOK_PAGE2_WARRANTY_PARTS = []; DESKTOP_PAGE2_WARRANTY_PARTS = []; COMBINEDPARTS = {}; //moved to resource bundle COMBINEDPARTS_DEFAULTS = { "fp2162" : {"WARRANTY": { "PAGE2_NB_WARR_SERV": ["PAGE2_NB_WARR_SERV_BASE", "PAGE2_NB_WARR_SERV_1YR", "PAGE2_NB_WARR_SERV_2YR", "PAGE2_NB_WARR_SERV_3YR", "PAGE2_NB_WARR_SERV_4YR", "PAGE2_NB_WARR_SERV_5YR"], "PAGE2_NB_WARR_ADP": ["PAGE2_NB_WARR_ADP_BASE", "PAGE2_NB_WARR_ADP_1YR", "PAGE2_NB_WARR_ADP_2YR", "PAGE2_NB_WARR_ADP_3YR", "PAGE2_NB_WARR_ADP_4YR"], "PAGE2_DT_WARR_SERV": ["PAGE2_DT_WARR_SERV_BASE", "PAGE2_DT_WARR_SERV_1YR", "PAGE2_DT_WARR_SERV_2YR", "PAGE2_DT_WARR_SERV_3YR", "PAGE2_DT_WARR_SERV_4YR", "PAGE2_DT_WARR_SERV_5YR"], "PAGE2_DT_WARR_ADP": ["PAGE2_DT_WARR_ADP_BASE", "PAGE2_DT_WARR_ADP_1YR", "PAGE2_DT_WARR_ADP_2YR", "PAGE2_DT_WARR_ADP_3YR", "PAGE2_DT_WARR_ADP_4YR", "PAGE2_DT_WARR_ADP_5YR"], "PAGE2_NB_WARR_STACKABLE": ["PAGE2_NB_WARR_STACKABLE_WARRANTIES"], "PAGE2_DT_WARR_STACKABLE": ["PAGE2_DT_WARR_STACKABLE_WARRANTIES"] } }, "default": {"WARRANTY": { "WARR_ROOT_NB": ["WARR_SERV_NB_BASE", "WARR_SERV_NB_1YR", "WARR_SERV_NB_2YR", "WARR_SERV_NB_3YR", "WARR_SERV_NB_4YR", "WARR_SERV_NB_5YR"], "WARR_ROOT_ADP_NB": ["WARR_ADP_NB", "WARR_ADP_NB_1YR", "WARR_ADP_NB_2YR", "WARR_ADP_NB_3YR", "WARR_ADP_NB_4YR"], "WARR_ROOT_DT": ["WARR_SERV_DT_BASE", "WARR_SERV_DT_1YR", "WARR_SERV_DT_2YR", "WARR_SERV_DT_3YR", "WARR_SERV_DT_4YR", "WARR_SERV_DT_5YR"], "WARR_ROOT_ADP_DT": ["WARR_ADP_DT", "WARR_ADP_DT_1YR", "WARR_ADP_DT_2YR", "WARR_ADP_DT_1YR", "WARR_ADP_DT_4YR"] } } }; var STACKABLE_BASE_WARR_TYPE = { "en": {"D":"Depot or Carry-in", "O":"Onsite", "M":"Mail In"}, "fr": {"D":"D\u00E9p\u00F4t ou Retour atelier", "O":"Sur site", "M":"Courrier"}, "de": {"D": "Depot or Carry-in", "O": "Vor Ort", "M": "Mail In"}, "es": {"D": "Dep\u00F3sito o Con transporte", "O": "In situ", "M": "Correo"}, "jp": {"D": "Depot or Carry-in", "O": "\u30AA\u30F3\u30B5\u30A4\u30C8\u30FB\u30B5\u30FC\u30D3\u30B9", "M": "Mail In"}, "zh": {"D":"\u5230\u5E9C\u53D6\u4EF6\u6216\u81EA\u884C\u9001\u4FEE", "O":"\u5230\u5E9C\u670D\u52D9", "M":"\u90F5\u5BC4\u670D\u52D9"}, }; var STACKABLE_MAP = { //START NOTEBOOK BASE WARRANTIES "N01": "D1Y", //1 Year Depot or Carry-in "N02": "D2Y", //2 Year Depot or Carry-in "N03": "D3Y", //3 Year Depot or Carry-in "N04": "O1Y", //1 Year On-site "N05": "O2Y", //2 Year On-site "N06": "O3Y", //3 Year On-site "N07": "O3Y", //3 Year On-site International Delivery "N10": "C1Y", //1 Year Customer Replaceable "N11": "C2Y", //2 Year Customer Replaceable "N12": "C3Y", //3 Year Customer Replaceable "N13": "M1Y", //1 Year Mail-in "N14": "M2Y", //2 Year Mail-in "N15": "M3Y", //3 Year Mail-in "N16": "E1Y", //1 Year Exchange "N17": "E2Y", //2 Year Exchange "N18": "E3Y", //3 Year Exchange "N19": "O4Y", //4 Year On-site International Delivery "N20": "D4Y", //4 Year Depot or Carry-in "N21": "O4Y", //4 Year On-site "N22": "", //1 YrDepot/Carry-in, 2 Yr Plnr "N23": "", //1 Yr On-site W/2 Yr Planar "N25": "D1Y", //START DESKTOP BASE WARRANTIES "D01": "D1Y", //1 Year Depot or Carry-in "D02": "D2Y", //2 Year Depot or Carry-in "D03": "D3Y", //3 Year Depot or Carry-in "D04": "O1Y", //1 Year On-site "D05": "O2Y", //2 Year On-site "D06": "O3Y", //3 Year On-site "D07": "O3Y", //3 Year On-site Intl. Delivery "D13": "M1Y", //1 Year Mail In "D19": "O4Y", //4 Year On-site Intl. Delivery "D08": "", //2 Year Split On-site "D09": "", //3 Year Split On-site "D22": "", //1 Year Depot or Carry-in w/ 2Year Planar "D23": "", //1 Year On-site W/ 2 Year Planar "D25": "D1Y", //START SERVER BASE WARRANTIES "S04" : "O1Y", //1 Year On-site "S05" : "O2Y", //2 Year On-site "S06" : "O3Y", //3 Year On-site "S07" : "O3Y", //3 Year On-site Intl. Delivery "S19" : "O4Y", //4 Year On-site Intl. Delivery "S90" : "", //OS 90 day On-site //START NAS (STORAGE) BASE WARRANTIES "J04" : "O1Y", //1 Year On-site "J05" : "O2Y", //2 Year On-site "J06" : "O3Y", //3 Year On-site "J07" : "O3Y", //3 Year On-site Intl. Delivery "J10" : "C1Y", //1 Year Customer Replaceable "J11" : "C2Y", //2 Year Customer Replaceable "J12" : "C3Y", //3 Year Customer Replaceable "J13" : "M1Y", //1 Year Mail-in "J14" : "M2Y", //2 Year Mail-in "J15" : "M3Y", //3 Year Mail-in "J16" : "E1Y", //1 Year Exchange "J17" : "E2Y", //2 Year Exchange "J18" : "E3Y", //3 Year Exchange //START WORKSTATION BASE WARRANTIES "W04" : "O1Y", //1 Year On-site "W05" : "O2Y", //2 Year On-site "W06" : "O3Y", //3 Year On-site "W07" : "O3Y", //3 Year On-site Intl. Delivery "W19" : "O4Y", //4 Year On-site Intl. Delivery "G00" :"" //0/0 Warranty } $window = $(window); $document = $(document); $body = null; $addToCart = null; $configurator = null; $ctaPriceLabel = null; $ctaPriceValue = null; $tabtrigger = null; $tabcontainer = null; $interstitial = null; $itemsummary = null; $mainsummary = null; $productlistings = null; $wrapper = null; $stackableSection = null; $stackableHeader = null; $sectionContent = null; /* helpers */ __getNextTab = function(currTab) { var nextTab; switch (currTab) { case "SYSTEM": nextTab = "WARRANTY"; break; case "WARRANTY": nextTab = "SOFTWARE"; break; case "SOFTWARE": nextTab = "ACCESSORIES"; break; default: nextTab = "CART"; } return nextTab; }; __htmlDecode = function(input) { var e; e = document.createElement("div"); e.innerHTML = input; if (e.childNodes.length === 0) { return ""; } else { return e.childNodes[0].nodeValue; } }; __isUrl = function(str) { var rgx; rgx = /\(?(?:(http|https|ftp):\/\/)?(?:((?:[^\W\s]|\.|-|[:]{1})+)@{1})?((?:www.)?(?:[^\W\s]|\.|-)+[\.][^\W\s]{2,4}|localhost(?=\/)|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::(\d*))?([\/]?[^\s\?]*[\/]{1})*(?:\/?([^\s\n\?\[\]\{\}\#]*(?:(?=\.)){1}|[^\s\n\?\[\]\{\}\.\#]*)?([\.]{1}[^\s\?\#]*)?)?(?:\?{1}([^\s\n\#\[\]]*))?([\#][^\s\n]*)?\)?/g; return rgx.test(str); }; __progress = function(event) { var progress; if (event.lengthComputable) { progress = (event.loaded / event.total) * 100; if (_verbose) { console.info("LENOVO.CONFIGURATOR: Progress... " + progress); } } }; __scrollTo = function(element, speed) { var props; if (!(element instanceof $)) { element = $(element); } if (!speed) { speed = "fast"; } props = { scrollTop: element.offset().top }; $("html, body").stop(true).animate(props, speed); }; __scrub = function(text) { var json; if (typeof text === "string") { json = text.replace(/(\r\n|\n|\r)/gm, ""); try { json = $.parseJSON(json); } catch (_error) { if (_debug) { console.warn("LENOVO.CONFIGURATOR: Error parsing JSON"); if (_error.message != null) { console.error(_error.message); } } } return json; } else { return text; } }; __makeRel = function(url) { if ((url != null) && typeof url === "string") { return url.replace(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, '$5'); } else { return url; } }; /* private methods */ _getBuilderMode = function() { var activeIndex, breakPoints, builderMode, i, key, sizes, _i, _len; breakPoints = []; for (key in _breakPoints) { breakPoints.push(key); } sizes = []; for (_i = 0, _len = breakPoints.length; _i < _len; _i++) { i = breakPoints[_i]; sizes.push(app.MAIN.activeBreakPoints[i]); } activeIndex = $.inArray(true, sizes); builderMode = !_interstitial ? "ModeList" : breakPoints[activeIndex] || "ModeList"; if(_stackableWarranty){ builderMode = "ModeList"; } if (_verbose) { console.info("LENOVO.CONFIGURATOR: _getBuilderMode -> " + builderMode); } return builderMode; }; _getConfigParams = function(options) { var configParams, postDefaults, teleSD; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _getConfigParams"); } postDefaults = { open: false, cursor: true, tabs: "1,2,3", features: true, selections: true, pricedata: true, bom: true, recommended: true, rsb: false, mode: _buildermode, callback: "", category: _category }; if (options == null) { options = {}; } configParams = $.extend(true, {}, postDefaults, options); teleSD = window.teleSD; configParams.editUsingRefererURL = true; if ((teleSD != null) && (typeof teleSD === "string" && teleSD !== "")) { configParams.statedata_id_string = teleSD; } return configParams; }; _getJSON = function(url, params) { if (params == null) { params = {}; } if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _getJSON -> " + url); console.log(params); console.groupEnd(); } jQuery.ajaxSettings.traditional = true; return $.ajax(url, { data: params, dataType: "text", type: "POST", xhrFields: { onprogress: __progress } }); }; _getMandatoryParams = function(obj, item, params, unselect) { var mandatoryParams, postParams; if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _getMandatoryParams(obj, item, params)"); console.log(obj); console.log(item); console.log(params); console.groupEnd(); } mandatoryParams = { "template": _templateFilePath, "sb": _basedata.sb, "builderv2-mtm-item": _basedata.mtm, "builderv2-CODE": _basedata.code, "builderv2-sb": _basedata.sb, "JavaConfigurationObject": _builderdata.cursor.ConfigModeID, "xmlhttprequest": true, "editUsingRefererURL": true }; mandatoryParams[_basedata.sdid] = _basedata.sdva; var changes = new Array(); if(item != null && item instanceof Object) { if(!mandatoryParams["4GChangedBoxes"]) { mandatoryParams["4GChangedBoxes"] = changes; // this requires traditional setting in AJAX } for(var ii=0;ii 0) window.location.href = url[0]; }; _handleUndo = function(url) { var configParams, params, postOptions, undo; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _handleUndo(" + url + ")"); } $addToCart = $(self.settings.buttonAddToCart); $addToCart.filter("button").prop("disabled", "disabled"); if (url == null) { alert(_rsb.invalidconfig.alert); } else { undo = confirm("" + _rsb.invalidconfig.invalid + "\n\n" + _rsb.invalidconfig.dialog); if (undo === true) { _activityMessage = _rsb.loading.loading; app.MODAL.showActivity(_activityMessage); postOptions = {}; if (!_interstitial) { postOptions.tabs = "1"; } else { postOptions.tabs = "2,3"; } configParams = _getConfigParams(postOptions); params = _getMandatoryParams(null, null, configParams); _getJSON(url, params).then(_parseJSON, _handleAjaxError, _showProgress).then(_createBuilderUI, _handleParseError, _showProgress); } else { app.MODAL.hideActivity(); } } }; _handleDepleted = function(rsb) { var depletedmsg, goBack, gobackmsg; depletedmsg = rsb.inventory.depletedMessage; gobackmsg = rsb.inventory.depletedGoBack; goBack = confirm("" + (__htmlDecode(depletedmsg)) + "\r\n" + (__htmlDecode(gobackmsg))); if (goBack === true) { window.history.back(); } else { app.MODAL.hideActivity(); $tabcontainer.find(self.settings.tabContainerMessage).html(depletedmsg); self.startOver(); } }; _handleContinue = function(url) { if (__isUrl(url)) { window.location.href = url; } }; _showProgress = function(value) { if (value == null) { value = _postProgress + ((1 - _postProgress) * 0.5); } if (_verbose) { console.info("LENOVO.CONFIGURATOR: _showProgress: " + value); } _postProgress = value === 1 ? 0 : value; }; _initCustomize = function(event) { var $trigger, params, sb; $trigger = $(this); if ($trigger.data("sb") != null) { sb = $trigger.data("sb"); } else { sb = $trigger.attr("href").split("?").pop().replace("sb=", ""); } params = {}; params.sb = sb; /* check for preselections. Handling missing in base RWD builder. */ var qsparts = $trigger.attr("href").split("?").pop().split("&"); var haspssel = ""; for(var qp=0;qsparts != null && qp LENOVO.UTILS"); } } templates = settings.templateSources; _mode = settings.mode; _multibase = $(settings.productListing).length > 1; if (settings.category != null) { _category = settings.category; } params = {}; if (_urlParams.cc != null) { params.cc = _urlParams.cc; if (_urlParams.sb != null) { params.oid = _urlParams.sb; } } else { if (_urlParams.ps != null) { params.ps = _urlParams.ps; } if (_urlParams.sb != null) { params.sb = _urlParams.sb; } } if ((_urlParams.GroupID != null) && (_urlParams.Code != null)) { params.GroupID = _urlParams.GroupID; params.Code = _urlParams.Code; } if (params.cc != null) { _useCached = false; _task = "edit"; _interstitial = true; if (_mode === "MTM") { if (_urlParams.sb != null && _urlParams.sb != "create-bundle-wf") { params.editsb = _urlParams.sb; } params.sb = "create-bundle-wf"; } if (params.ps != null) { delete params.ps; } _activeTab.name = _mode !== "CTO" ? "WARRANTY" : "SYSTEM"; _buildermode = "ModeList"; app.TEMPLATES.precompile(templates, true).fail(_handleAjaxError).done(function() { self.openConfigurator(params); }); } else if ((params.sb != null) || ((params.GroupID != null) && (params.Code != null))) { if (params.ps != null) { _useCached = false; } if (params.task != null) { _task = params.task; } app.TEMPLATES.precompile(templates, true).fail(_handleAjaxError).done(function() { var ssku = $(self.settings.singlesku); if(ssku.length == 0 || $(self.settings.longscrollWrapper).length == 0 || window._directSku == 'true') { if($(self.settings.longscrollWrapper).length > 0) { $(self.settings.singlesku).hide(); } self.openConfigurator(params); } else { window.LNV_CONFIGPARAMS = params; params.selfReference = self; openSingleSku(window.LNV_CONFIGPARAMS); } }); } else { app.TEMPLATES.precompile(templates, false); } } }; openSingleSku = function(params) { //$(self.settings.subTabTitle).hide(); $(self.settings.singlesku).find(".ssku-dd").removeAttr("style").css("height", "auto"); $(self.settings.singleskuCta).on("click", function() { $(self.settings.singlesku).hide(); $(self.settings.configuratorControls).removeClass("single-sku-visible"); $(self.settings.tabbedBrowseScroller).removeClass("single-sku-visible"); if(window.longscrollInit) { $("#reset-columns").click(); longscrollInit(true); } }); $(self.settings.singleSkuViewAll).on("click", function() { $(self.settings.singlesku).find(" .comparecheckbox").remove(); $(self.settings.singlesku).hide(); $(self.settings.subTabTitle).show(); $(self.settings.configuratorControls).removeClass("single-sku-visible"); $(self.settings.tabbedBrowseScroller).removeClass("single-sku-visible"); var sskuCbx = $("#singlesku-checkbox").attr("data-cbx"); $("#singlesku-checkbox").remove(); checkCompareCheckBox(sskuCbx.replace(/:/g, "\:")); //$(self.settings.modelsSection).height($(self.settings.productListingsWrapper).height()); if(window.longscrollInit) { $("#reset-columns").click(); longscrollInit(true); } __scrollTo(self.settings.modelsSection); }); }; /* * Opens a new configuration for customization. * * @param {Object} params Parameters to use to configure */ _openConfigurator = function(params) { var configParams, postOptions, presels, querystring, url; if (params == null) { params = {}; } if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _openConfigurator"); console.log($.extend(true, {}, params)); console.groupEnd(); } _firstRun = true; _basedata = null; _baseurl = null; _postAttempts = 0; _postProgress = 0; if (params.task != null) { _task = params.task; } _subtitles = {}; _hiddenTabs.length = 0; _buildermode = _interstitial && (_urlParams.cc == null) ? _getBuilderMode() : "ModeList"; _activityMessage = self.settings.loadingMessage; app.MODAL.showActivity(_activityMessage); $wrapper.find(self.settings.expandableMenu).empty(); _templateFilePath = _urls.builder.templates.configData; params.page = _templateFilePath; querystring = ""; if (params.ps != null) { _task = "configure"; if (typeof params.ps === "string") { presels = params.ps.split(","); querystring = "?ps=" + (presels.length > 1 ? presels.join("&ps=") : presels[0]); } delete params.ps; } postOptions = { open: true, rsb: true }; configParams = _getConfigParams(postOptions); $.extend(true, params, configParams); if ((params.cc == null) && _useCached === true) { querystring = ""; if (params.sb != null) { querystring = "?sb=" + params.sb; delete params.sb; } else if ((params.GroupID != null) && (params.Code != null)) { querystring = "?GroupID=" + params.GroupID + "&Code=" + params.Code; delete params.GroupID; delete params.Code; } url = _urls.wci.workflow.load + querystring; } else { url = _urls.builder.workflow.loadBuilderTemplate + querystring; } _getJSON(url, params).then(_parseJSON, _handleAjaxError, _showProgress).then(_createBuilderUI, _handleParseError, _showProgress); }; /* * Parse JSON from successful AJAX call, and reformat to fit template needs. * Receives standard jQuery AJAX callback variables. * * @param {Object} data JSON data returned by AJAX * @param {Object} textStatus Status text returned by AJAX * @param {Object} jqXHR jQuery XHR object * @return {Object} Deferred object promise */ _parseJSON = function(data, textStatus, jqXHR) { var deferred, mapping, o, prop, status, statusinfo; if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _parseJSON -> " + _buildermode); } if (_timer != null) { clearInterval(_timer); } _postProgress = 0; deferred = $.Deferred(); _timer = setInterval(deferred.notify, 250); if ((_builderdata != null) && $.isPlainObject(_builderdata)) { for (prop in _builderdata) { delete _builderdata[prop]; } } else { _builderdata = {}; } o = __scrub(data); _builderdata.original = $.extend(true, {}, o); if (_firstRun && (_basedata == null) && (o.basedata != null)) { _basedata = $.extend(true, {}, o.basedata); if (_basedata.sb != null) { _basedata.builderpage = window.location.pathname + "?sb=" + _basedata.sb; } if ((_basedata.baseurl != null) && _basedata.baseurl !== "") { _baseurl = _basedata.baseurl; } } if (o.resources != null) { _rsb = $.extend(true, {}, o.resources); if ((_rsb.notebook_page2_software_parts != null) && _rsb.notebook_page2_software_parts !== "") { $.merge(NOTEBOOK_PAGE2_SOFTWARE_PARTS, _rsb.notebook_page2_software_parts.replace(/\s/g, "").split(",")); } if ((_rsb.notebook_page2_software_parts != null) && _rsb.notebook_page2_software_parts !== "") { $.merge(DESKTOP_PAGE2_SOFTWARE_PARTS, _rsb.desktop_page2_software_parts.replace(/\s/g, "").split(",")); } if ((_rsb.notebook_page2_software_parts != null) && _rsb.notebook_page2_software_parts !== "") { $.merge(PREMIUM_SUPPORT_PARTS, _rsb.premium_support_parts.replace(/\s/g, "").split(",")); } if ((_rsb.notebook_page2_warranty_parts != null) && _rsb.notebook_page2_warranty_parts !== "") { $.merge(NOTEBOOK_PAGE2_WARRANTY_PARTS, _rsb.notebook_page2_warranty_parts.replace(/\s/g, "").split(",")); } if ((_rsb.desktop_page2_warranty_parts != null) && _rsb.desktop_page2_warranty_parts !== "") { $.merge(DESKTOP_PAGE2_WARRANTY_PARTS, _rsb.desktop_page2_warranty_parts.replace(/\s/g, "").split(",")); } //get default combination if(_rsb.fp2162 == "true") { COMBINEDPARTS = COMBINEDPARTS_DEFAULTS["fp2162"] ; } else { COMBINEDPARTS = COMBINEDPARTS_DEFAULTS["default"] ; } if ((_rsb.combine_parts != null) && _rsb.combine_parts.length > 0) { $.merge(COMBINEDPARTS, _rsb.combine_parts); } if ((_rsb.open_categories.automatic != null) && _rsb.open_categories.automatic !== "") { _autoOpenCategories = _rsb.open_categories.automatic; } if ((_rsb.open_categories.manual != null) && _rsb.open_categories.manual !== "") { _openCategories = _rsb.open_categories.manual.split(","); } if (_verbose) { console.info("_autoOpenCategories = " + _rsb.open_categories.automatic); console.info("_openCategories = [" + _rsb.open_categories.manual + "]"); } } status = o.status != null ? o.status : "error"; if (status === "") { status = "success"; } statusinfo = o.status == null ? "Unknown error." : o.statusinfo; switch (status) { case "success": if (_basedata != null) { _builderdata.basedata = $.extend(true, {}, _basedata); } if (o.cursor != null) { _builderdata.cursor = $.extend(true, {}, o.cursor); if (_verbose) { console.log("ActiveTab = " + _builderdata.cursor.ActiveTab); console.log("ActiveFeature = " + _builderdata.cursor.ActiveFeature); } } if ((o.tabslist != null) && (o.tabslist.tabs != null)) { _builderdata.tabslist = $.merge([], o.tabslist.tabs); } if (o.bom != null) { _builderdata.bom = $.merge([], o.bom); } if (o.AddtoWishlist != null) { _builderdata.wishlist = $.extend(true, {}, o.AddtoWishlist); } if (o.recommended != null) { _builderdata.recommended = $.extend(true, {}, o.recommended); } if (o.summary != null) { _builderdata.summary = _createPriceMap(o.summary, o.custompricedata, o.leadtime); } _builderdata.productinfo = _createProductInfo(); if ((o.featurelist != null) && (o.selectionlist != null)) { if (_buildermode === "ModeList") { mapping = _tabMap(o.featurelist, o.selectionlist); } else if (_buildermode === "ModeWizard") { mapping = _partMap(o.featurelist, o.selectionlist); } if (!_usedefaults && ((mapping != null) && $.isArray(mapping) && mapping.length > 0)) { _builderdata.originalMapping = $.merge([], mapping); try { _builderdata.mapping = self.beforeRenderUI(mapping, o); } catch (_error) { if (_debug) { console.error(_error); } _builderdata.mapping = $.merge([], mapping); } } else { _builderdata.mapping = mapping; } } else { _builderdata.mapping = []; } if ((_builderdata.cursor.hasOwnProperty("IsComplete") && _builderdata.cursor.IsComplete !== true) && _builderdata.cursor.hasOwnProperty("IsUndoPossible")) { if (_builderdata.cursor.IsUndoPossible === true && _urls !== null) { _builderdata.status = "invalidconfig"; _builderdata.statusinfo = _urls.builder.workflow.undo; } else if (_builderdata.cursor.IsUndoPossible === false) { _builderdata.status = "invalidconfig"; _builderdata.statusinfo = null; } else { _builderdata.status = status; _builderdata.statusinfo = statusinfo; } deferred.reject(); } if (_builderdata.mapping == null) { deferred.reject(); } else if ((_builderdata.mapping != null) && $.isPlainObject(_builderdata.mapping)) { _builderdata.status = _builderdata.mapping.status; _builderdata.statusinfo = _builderdata.mapping.statusinfo; deferred.reject(); } else if ((_builderdata.mapping != null) && $.isArray(_builderdata.mapping) && _builderdata.mapping.length === 0) { _builderdata.status = "postToCart"; _builderdata.statusinfo = ""; deferred.reject(); } else { deferred.resolve(); } break; case "depleted": if ((_rsb != null) && (_rsb.inventory != null)) { statusinfo = _rsb.inventory.depletedInventory; } _builderdata.status = status; _builderdata.statusinfo = statusinfo; deferred.reject(); break; case "continue": _builderdata.status = status; _builderdata.statusinfo = statusinfo; deferred.progress(); break; case "invalidPrice": case "error": case "invalid": _builderdata.status = status; _builderdata.statusinfo = statusinfo; deferred.reject(); break; default: deferred.reject(); } if (_verbose) { console.log(deferred.state()); console.log($.extend(true, {}, _builderdata)); console.groupEnd(); } return deferred.promise(); }; /* * Create a product information object containing resource bundles, etc. * * @return {Object} Product information object */ _createProductInfo = function() { var productinfo; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _createProductInfo"); } productinfo = {}; if (_basedata != null) { productinfo.name = _basedata.name; productinfo.sb = _basedata.sb; } if (_rsb != null) { productinfo.addAccessoriesMulti = _rsb.addAccessoriesMulti; productinfo.addAccessoriesSingle = _rsb.addAccessoriesSingle; productinfo.image = _rsb.itemImage; productinfo.successfulAdd = _rsb.successfulAdd; productinfo.successfulAdd2 = _rsb.successfulAdd2; } return productinfo; }; /* * Loops through a selection array to look for valid items to render * * @param {Array} selections Array of selections to iterate * @return {Boolean} */ _hasSelections = function(selections) { var hasSelections; hasSelections = false; $.each(selections, function(index, sel) { if (sel.element !== "subtitle" || sel.element !== "note") { hasSelections = true; } }); if (_verbose) { console.log("hasSelections = " + hasSelections); } return hasSelections; }; /* * Create a mapping of features with selections to be used in Handlebar * template rendering. * * @param {Object} type Group by "item" or "part" * @param {Object} featitem Feature to group selections under * @param {Object} selectionlist Selectionlist with selections array * @return {Array} Merged array of features w/ selections */ _getHeaderSelections = function(type, featitem, selectionlist) { var selections; if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _getHeaderSelections -> " + type + ": " + featitem); } selections = []; if (selectionlist.selections != null) { $.each(selectionlist.selections, function(index, sel) { var parentitem; parentitem = ""; if (type === "item") { if (sel.parentitem != null) { parentitem = sel.parentitem; } else { if(sel.linetemplate == "optionheader") { parentitem = sel.data.item; } else if ((sel.subselections != null) && sel.subselections.length > 0) { parentitem = sel.subselections[0].data.parentitem; } } } else if (type === "part") { if (sel.parentpn != null) { parentitem = sel.parentpn; } else if ((sel.subselections != null) && sel.subselections.length > 0) { parentitem = sel.subselections[0].data.parentpn; } } else if (type === "mainfeature") { if (sel.data.item != null) { parentitem = sel.data.item; } } if (parentitem === featitem && sel.element !== "subtitle") { selections.push(sel); } }); } if (_verbose) { console.log($.merge([], selections)); console.groupEnd(); } if (selections.length > 0) { return selections; } else { return null; } }; /* * Get the title of the selected inputs/customizations. If more than 1 is found * then a localized "X items selected" (RSB) message is returned. * * @param {Object} subselections Selections object to iterate over * @return {String} Title of the selected item(s) */ _getSelectionsTitle = function(selections) { var count, title; if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _getSelectionsTitle"); } title = ""; count = 0; if (selections != null) { $.each(selections, function(index, selection) { var subselections; subselections = selection.subselections; if ((subselections != null) && subselections.length > 0) { $.each(subselections, function(index, choice) { if ((choice.data != null) && choice.data.originalValue === "checked") { count++; title = choice.data.title; } if (index + 1 === subselections.length && count > 1) { title = _rsb.itemsSelected || "{0} items selected"; title = title.replace("{0}", count.toString()); } if (((choice.data.originalValue != null) && choice.data.originalValue === "checked") && choice.data.parentpn === _currentSelect) { choice.current = true; choice.leadtime = _builderdata.summary.leadtime; choice.price = _builderdata.summary.msrp; selection.current = true; } else { choice.current = false; if (selection.current == null) { selection.current = false; } } }); } }); } if (title === "" && count > 1) { title = _rsb.itemsSelected || "{0} items selected"; title = title.replace("{0}", count.toString()); } if (_verbose) { console.log(title); console.groupEnd(); } return title; }; /* * Creates an array of features based on their current tab * * @param {Object} features Features object to set selections for * @param {Object} tabmap Object containing the mapping data for tabs * @return {Array} Array of features for specific tab */ _groupFeatures = function(features, activetab) { var anyOpenSections, begin, featuregroup, hideparts, hmdbundle; if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _groupFeatures"); } hideparts = self.settings.hideParts[_activeTab.name]; hmdbundle = self.settings.hmdBundle; begin = false; featuregroup = []; $.each(features, function(index, feat) { var item, pn; item = feat.item; pn = feat.pn; if (_interstitial && _autoOpenCategories === true && typeof _openSections[item] !== "boolean") { if ($.inArray(pn, _openCategories) !== -1) { _openSections[item] = true; } else if (_openCategories.length === 0) { if (_verbose) { console.group("_autoOpenCategories"); } if ((feat.selections != null) && $.isArray(feat.selections)) { $.each(feat.selections, function(index, sel) { if ((sel.element != null) && (sel.element === "group" || sel.element === "subgroup")) { if ((sel.subselections != null) && $.isArray(sel.subselections)) { $.each(sel.subselections, function(index, subsel) { if ((subsel.data.pricedata != null) && (typeof subsel.data.pricedata.delta === "string" && subsel.data.pricedata.delta.indexOf("") !== -1)) { _openSections[item] = true; if (_verbose) { console.info("_openSections[" + item + "]"); } } }); } } }); } if (_verbose) { console.groupEnd(); } } } if (!begin && pn === activetab.start) { begin = true; } if (pn === activetab.end) { begin = false; } if (begin && (feat.selections != null) && _hasSelections(feat.selections)) { if (!((hideparts != null) && ($.inArray(pn, hideparts) !== -1 || $.inArray(item, hideparts) !== -1))) { feat.hidden = false; feat.subtitle = _getSelectionsTitle(feat.selections); featuregroup.push(feat); } } }); if (featuregroup.length > 0) { anyOpenSections = false; $.each(featuregroup, function(index, feat) { var item, pn; item = feat.item; pn = feat.pn; if (_firstRun && _buildermode === "ModeList" && (_openSections[item] == null)) { if (!_interstitial && (index === 0 || index === 1)) { _openSections[item] = true; } else if (_interstitial && index === 0) { _openSections[item] = true; } } feat.current = _currentSelect === pn; if ((_openSections[item] != null) && _openSections[item] === true) { feat.expanded = true; anyOpenSections = true; } if (index === featuregroup.length - 1 && !anyOpenSections) { featuregroup[0].expanded = true; _openSections[featuregroup[0].item] = true; } }); } if (_verbose) { console.log(featuregroup); console.groupEnd(); } return featuregroup; }; /* * Creates an array of tabs with their parts and other data to use to render * the interstitial view. Used to ensure common format for all tabs. * * @param {String} tabname Internal tab name * @param {String} tablabel External (localized) tab label * @return {Object} Formatted object of tab data */ _createTabMap = function(tabname, tablabel) { var tabmap; if (_verbose) { console.log("LENOVO.CONFIGURATOR: _createTabMap -> " + tabname); } tabmap = { tabid: null, name: tabname, label: tablabel, start: null, startitem: null, end: null, enditem: null, active: false, visited: false, visible: false, features: null }; return tabmap; }; /* * Creates an array of tabs with their parts and other data to use to render * the interstitial view. * * Rules of WCI tab/feature/selection relationship logic: * - wciconfig:tabs returns ISS tab information for requested indices (1-4 steps) * - wciconfig:features shows items for all requested tabs indices * - wciconfig:selections shows selections for only the active tab (list mode) or feature (wizard mode) * * @param {Object} featurelist features JSON data response object * @param {Object} selectionlist selections JSON data response object * @return {Array} Array of builder tab objects */ _tabMap = function(featurelist, selectionlist) { var action, activeTabMap, allfeatures, allselections, begin, hideparts, hmdbundle, tab1item, tab2item, tabmap, tabs, noWarranties; if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _tabMap -> _interstitial=" + _interstitial + ", _firstRun=" + _firstRun); console.log($.extend(true, {}, _activeTab)); } if ((featurelist == null) || (selectionlist == null)) { console.groupEnd(); return { status: "addToCart", statusinfo: "" }; } if (self.isLongScroll() && _builderdata.basedata.mtm === ""){ _interstitial = true; } hideparts = self.settings.hideParts[_activeTab.name]; hmdbundle = self.settings.hmdBundle; begin = false; noWarranties = false; tab1item = ""; tab2item = ""; tabmap = {}; tabmap.SYSTEM = _createTabMap("SYSTEM", _rsb != null ? _rsb.interstitial_labels.configurationText : "Configuration"); tabmap.WARRANTY = _createTabMap("WARRANTY", _rsb != null ? _rsb.interstitial_labels.warrantyText : "Warranty"); tabmap.SOFTWARE = _createTabMap("SOFTWARE", _rsb != null ? _rsb.interstitial_labels.softwareText : "Software"); tabmap.ACCESSORIES = _createTabMap("ACCESSORIES", _rsb != null ? _rsb.interstitial_labels.accessoriesText : "Accessories"); tabmap.CART = _createTabMap("CART", _rsb != null ? _rsb.interstitial_labels.cartText : "Cart"); $.each(_builderdata.tabslist, function(index, tab) { var item; item = tab.item; switch (tab.pn) { case "DIALOG_1_START": tabmap.SYSTEM.tabid = item; break; case "DIALOG_2_START": tabmap.WARRANTY.tabid = "" + item + "_1"; tabmap.SOFTWARE.tabid = "" + item + "_2"; break; case "DIALOG_3_START": tabmap.ACCESSORIES.tabid = item; break; default: if (item === "summary") { tabmap.CART.tabid = "CART"; } } if ((_builderdata.cursor != null) && _builderdata.cursor.ActiveTab === item) { _activeTab.id = item; _activeTab.next = _builderdata.tabslist[index + 1].item; if ((_activeTab.prev == null) || _firstRun) { _activeTab.prev = item; } $.each(tabmap, function(tab, map) { if ((_activeTab.id === map.tabid || _activeTab.id.indexOf(map.tabid) === 0) && map.name !== _activeTab.name) { _activeTab.name = map.name; } }); } }); if (_verbose) { console.log($.extend(true, {}, _activeTab)); } if ((featurelist.features == null) || featurelist.features.length === 0) { if (_verbose) { console.warn("No features, so proceeding to cart."); console.groupEnd(); } return { status: "addToCart", statusinfo: "" }; } else if ((selectionlist.selections == null) || selectionlist.selections.length === 0) { if (_verbose) { console.warn("No selections present for current tab, so attempting to go to next."); console.groupEnd(); } if ($.inArray(_activeTab.id, _hiddenTabs) === -1) { _hiddenTabs.push(_activeTab.id); } return { status: "navigateTo", statusinfo: _activeTab.next }; } else { allfeatures = $.merge([], featurelist.features || []); allselections = $.merge([], selectionlist.selections || []); if (!_hasSelections(allselections)) { if (_verbose) { console.warn("No valid selections present for current tab, so attempting to go to next."); console.groupEnd(); } if ($.inArray(_activeTab.id, _hiddenTabs) === -1) { _hiddenTabs.push(_activeTab.id); } return { status: "navigateTo", statusinfo: _activeTab.next }; } else { $.each(allfeatures, function(index, feat) { var hmdbase, hmdfile, hmdlink, item, merge2me, mergemap, pitem, pn, selections, type; pn = feat.pn; item = feat.item; type = feat.type; pitem = type === "mainfeature" ? type : feat.parentitem; if (type === "mainfeature" && _task !== "express") { _mode = "MTM"; } if (index === 0) { if ((pitem != null) && _builderdata.tabslist[0].pn === "DIALOG_1_START") { tab1item = pitem; } if (_firstRun) { _currentSelect = pn; } } if ((tabmap.SYSTEM.start == null) && (tabmap.SYSTEM.end == null) && (pitem === tab1item || type === "mainfeature")) { tabmap.SYSTEM.start = pn; tabmap.SYSTEM.startitem = _task === "edit" ? _builderdata.tabslist[0].item : item; tabmap.SYSTEM.visible = true; } if ((tabmap.SYSTEM.start != null) && (tabmap.SYSTEM.end == null)) { if (pitem !== tab1item && type !== "mainfeature") { tabmap.SYSTEM.end = pn; tabmap.SYSTEM.enditem = item; } } if(NOTEBOOK_PAGE2_WARRANTY_PARTS.length > 0) { //FP2162 if (!begin && ($.inArray(pn, NOTEBOOK_PAGE2_WARRANTY_PARTS) !== -1 || $.inArray(pn, DESKTOP_PAGE2_WARRANTY_PARTS) !== -1)) { tabmap.WARRANTY.start = pn; tabmap.WARRANTY.startitem = item; tabmap.WARRANTY.visible = true; tab2item = pitem; begin = true; } else if (begin && ($.inArray(pn, PREMIUM_SUPPORT_PARTS) === -1 && $.inArray(pn, NOTEBOOK_PAGE2_WARRANTY_PARTS) === -1 && $.inArray(pn, DESKTOP_PAGE2_WARRANTY_PARTS) === -1)) { tabmap.WARRANTY.end = pn; tabmap.WARRANTY.enditem = item; begin = false; } else { noWarranties = true; // to check whether warranties exist or not } if ((noWarranties || tabmap.WARRANTY.end != null) && (tabmap.SOFTWARE.start == null) && (tabmap.ACCESSORIES.start == null)) { if ($.inArray(pn, NOTEBOOK_PAGE2_SOFTWARE_PARTS) !== -1 || $.inArray(pn, DESKTOP_PAGE2_SOFTWARE_PARTS) !== -1) { tabmap.SOFTWARE.start = pn; tabmap.SOFTWARE.startitem = item; tabmap.SOFTWARE.visible = true; } } if ((tabmap.SOFTWARE.start != null) && (tabmap.SOFTWARE.end == null) && $.inArray(pn, NOTEBOOK_PAGE2_SOFTWARE_PARTS) === -1 && $.inArray(pn, DESKTOP_PAGE2_SOFTWARE_PARTS) === -1) { tabmap.SOFTWARE.end = pn; tabmap.SOFTWARE.enditem = item; } if (pn != 'MAINFEATURES' && tabmap.SYSTEM.end != null && (tabmap.WARRANTY.tabid == null || tabmap.WARRANTY.end != null || tabmap.SOFTWARE.end != null) && $.inArray(pn, NOTEBOOK_PAGE2_SOFTWARE_PARTS) === -1 && $.inArray(pn, DESKTOP_PAGE2_SOFTWARE_PARTS) === -1) { if (tabmap.ACCESSORIES.start == null) { if (tabmap.SOFTWARE.start == null) { tabmap.SOFTWARE.end = null; tabmap.SOFTWARE.enditem = null; } else { tabmap.SOFTWARE.end = pn; tabmap.SOFTWARE.enditem = item; } tabmap.ACCESSORIES.start = pn; tabmap.ACCESSORIES.startitem = item; tabmap.ACCESSORIES.visible = true; } } tabmap.ACCESSORIES.end = "DIALOG_3_END"; if ((tabmap.ACCESSORIES.start != null) && index === allfeatures.length - 1) { tabmap.ACCESSORIES.enditem = item; } } else { //PRE-FP2162 if (!begin && (pn.indexOf("WARR_ROOT_NB") === 0 || pn.indexOf("WARR_ROOT_DT") === 0)) { tabmap.WARRANTY.start = pn; tabmap.WARRANTY.startitem = item; tabmap.WARRANTY.visible = true; tab2item = pitem; begin = true; } else if (begin && pn.indexOf("WARR") === -1 && $.inArray(pn, PREMIUM_SUPPORT_PARTS) === -1) { tabmap.WARRANTY.end = pn; tabmap.WARRANTY.enditem = item; begin = false; } else { noWarranties = true; // to check whether warranties exist or not } if ((noWarranties || tabmap.WARRANTY.end != null) && (tabmap.SOFTWARE.start == null) && (tabmap.ACCESSORIES.start == null)) { if ($.inArray(pn, NOTEBOOK_PAGE2_SOFTWARE_PARTS) !== -1 || $.inArray(pn, DESKTOP_PAGE2_SOFTWARE_PARTS) !== -1) { tabmap.SOFTWARE.start = pn; tabmap.SOFTWARE.startitem = item; tabmap.SOFTWARE.visible = true; } } if ((tabmap.SOFTWARE.start != null) && (tabmap.SOFTWARE.end == null) && $.inArray(pn, NOTEBOOK_PAGE2_SOFTWARE_PARTS) === -1 && $.inArray(pn, DESKTOP_PAGE2_SOFTWARE_PARTS) === -1) { tabmap.SOFTWARE.end = pn; tabmap.SOFTWARE.enditem = item; } if (pn != 'MAINFEATURES' && (tabmap.WARRANTY.tabid == null || tabmap.WARRANTY.end != null || tabmap.SOFTWARE.end != null) && $.inArray(pn, NOTEBOOK_PAGE2_SOFTWARE_PARTS) === -1 && $.inArray(pn, DESKTOP_PAGE2_SOFTWARE_PARTS) === -1) { if (tabmap.ACCESSORIES.start == null) { if (tabmap.SOFTWARE.start == null) { tabmap.SOFTWARE.end = null; tabmap.SOFTWARE.enditem = null; } else { tabmap.SOFTWARE.end = pn; tabmap.SOFTWARE.enditem = item; } tabmap.ACCESSORIES.start = pn; tabmap.ACCESSORIES.startitem = item; tabmap.ACCESSORIES.visible = true; } } tabmap.ACCESSORIES.end = "DIALOG_3_END"; if ((tabmap.ACCESSORIES.start != null) && index === allfeatures.length - 1) { tabmap.ACCESSORIES.enditem = item; } } selections = null; mergemap = COMBINEDPARTS[_activeTab.name]; merge2me = mergemap != null ? mergemap[pn] : []; if ((merge2me != null) && merge2me.length > 0) { selections = []; $.each(merge2me, function(index, part) { var tmp; tmp = _getHeaderSelections("part", part, selectionlist); if (tmp != null) { $.merge(selections, tmp); } }); } else if (type === "mainfeature" && index === 0) { selections = _getHeaderSelections("mainfeature", item, selectionlist); } else { selections = _getHeaderSelections("item", item, selectionlist); } if ((selections != null && typeof selections != "undefined") && selections.length > 0 && _hasSelections(selections)) { hmdbase = _urls.builder.workflow.hmd + "?page="; hmdlink = selections[0].data.hmdlink; hmdfile = hmdbundle[pn] != null ? hmdbundle[pn] : null; if ((hmdfile != null) && ((hmdlink != null) && hmdlink === "")) { selections[0].data.hmdlink = hmdbase + __makeRel(hmdfile); } else if ((hmdlink != null) && hmdlink !== "") { selections[0].data.hmdlink = hmdbase + __makeRel(hmdlink); } feat.selections = $.merge([], selections); } else { if (hideparts == null) { self.settings.hideParts[_activeTab.name] = []; hideparts = self.settings.hideParts[_activeTab.name]; } if ($.inArray(pn, hideparts) === -1) { hideparts.push(pn); } feat.hidden = true; } }); activeTabMap = tabmap[_activeTab.name]; activeTabMap.features = _groupFeatures(allfeatures, activeTabMap); if (_verbose) { console.log($.extend(true, {}, activeTabMap)); } if ((activeTabMap.features == null) || activeTabMap.features.length === 0) { if (_verbose) { console.warn("No features or no selections for features on current tab, so hiding tab and attempting to go to next step."); } action = null; if ($.inArray(activeTabMap.tabid, _hiddenTabs) === -1 && activeTabMap.name !== "SYSTEM" && activeTabMap.name !== "CART") { _hiddenTabs.push(activeTabMap.tabid); } $.each(tabmap, function(index, tab) { var curr, next; if (action != null) { return false; } else { curr = _activeTab.name; next = __getNextTab(curr); if (next === "CART" && (_urlParams.cc == null)) { _activeTab.name = next; action = { status: "addToCart", statusinfo: "" }; } else if (next === "CART" && (_urlParams.cc != null)) { _activeTab.name = "SYSTEM"; action = { status: "navigateTo", statusinfo: tabmap.SYSTEM.startitem }; } else if ($.inArray(next, _hiddenTabs) === -1 && tabmap[next].startitem !== null) { if ($.inArray(tabmap[curr].tabid, _hiddenTabs) === -1 && _activeTab.name !== "SYSTEM" || _activeTab.name !== "CART") { _hiddenTabs.push(tabmap[curr].tabid); } tabmap[curr].visible = false; _activeTab.name = next; action = { status: "navigateTo", statusinfo: tabmap[next].startitem }; } else if ($.inArray(next, _hiddenTabs) !== -1 || (tabmap[next].startitem == null)) { tabmap[curr].visible = false; _activeTab.name = next; } } }); if (action == null) { if (_verbose) { console.warn("Couldn't determine a tab/step to go to, so proceeding normally."); console.groupEnd(); } return { status: "addToCart", statusinfo: "" }; } else { if (_verbose) { console.info("Going to: " + _activeTab.name); console.log(action); console.groupEnd(); } return action; } } else { tabmap.CART.visible = _interstitial === true; if (self.isLongScroll()){ // tabmap.CART.visible = true; } tabs = []; $.each(tabmap, function(tab, map) { var name; name = map.name; if (_activeTab.name === name) { map.active = true; } if (_visitedSteps[name] === true) { map.visited = true; } if (map.visible && $.inArray(map.tabid, _hiddenTabs) === -1) { tabs.push(map); } }); if (tabs.length === 1 && tabs[0].name === "CART") { tabs = null; } if (tabs.length === 2 && tabs[0].name === "SYSTEM" && tabs[1].name === "CART" && (_urlParams.cc == null)) { if(_mode != "CTO") { tabs = null; } } if (_verbose) { if (tabs != null){ console.log($.merge([], tabs)); } console.log($.extend(true, {}, _activeTab)); console.log($.merge([], _hiddenTabs)); console.groupEnd(); } return tabs; } } } return null; }; /* * Create a mapping of features with selections to be used in Handlebar * template rendering. * * @param {Object} featurelist Features object to merge * @param {Object} selectionlist Selections object to merge * @return {Array} Merged array of features w/ selections */ _partMap = function(featurelist, selectionlist) { var activefeature, allfeatures, allselections, hideparts, hmdbundle, parts; if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _partMap"); } if ((featurelist == null) || (selectionlist == null)) { return null; } allfeatures = $.merge([], featurelist.features || []); allselections = $.merge([], selectionlist.selections || []); $.each(_builderdata.tabslist, function(index, tab) { var item; item = tab.item; if ((_builderdata.cursor != null) && _builderdata.cursor.ActiveTab === item) { _activeTab.id = item; switch (tab.pn) { case "DIALOG_1_START": _activeTab.name = "SYSTEM"; break; case "DIALOG_2_START": _activeTab.name = "WARRANTY"; break; case "DIALOG_3_START": _activeTab.name = "ACCESSORIES"; break; default: if (item === "summary") { _activeTab.name = "CART"; } } if ((_firstRun && (_activeTab.prev == null)) || ((_activeTab.prev != null) && _activeTab.prev !== _activeTab.id)) { _activeTab.prev = item; } } }); hideparts = self.settings.hideParts[_activeTab.name]; hmdbundle = self.settings.hmdBundle; if (_verbose) { console.log($.extend(true, {}, _activeTab)); console.log($.extend(true, {}, self.settings.hideParts)); console.log($.extend(true, {}, hmdbundle)); } if (_activeTab.name === "CART") { console.warn("Proceeding to cart."); console.groupEnd(); return { status: "addToCart", statusinfo: "" }; } else if ((allfeatures == null) || allfeatures.length === 0) { if (_urlParams.cc == null) { if (_verbose) { console.warn("No features present, so proceeding to cart."); console.groupEnd(); } return { status: "addToCart", statusinfo: "" }; } else { console.warn("LENOVO.CONFIGURATOR: Error retrieving configuration. No features present in JSON to render. Proceeding to cart."); return { status: "addToCart", statusinfo: "" }; } } else if ((allselections == null) || (allselections.length === 0 || !_hasSelections(allselections))) { activefeature = _builderdata.cursor.ActiveFeature; if (hideparts == null) { self.settings.hideParts[_activeTab.name] = []; hideparts = self.settings.hideParts[_activeTab.name]; } if ($.inArray(activefeature, hideparts) === -1) { hideparts.push(activefeature); } if (_verbose) { console.warn("No selections are present, so attempting to go to the next feature."); console.log(_activeTab); console.log(self.settings.hideParts); console.groupEnd(); } return { status: "navigateNext", statusinfo: "" }; } else { parts = null; $.each(allfeatures, function(index, feat) { var feature, hmdbase, hmdfile, hmdlink, item, merge2me, mergemap, pn, selections; feature = $.extend(true, {}, feat); item = feature.item; pn = feature.pn; if (feature.type === "mainfeature" && _task !== "express") { _mode = "MTM"; } if (_firstRun && index === 0) { _currentSelect = pn; } selections = []; mergemap = COMBINEDPARTS[_activeTab.name]; merge2me = mergemap != null ? mergemap[pn] : []; if ((merge2me != null) && merge2me.length > 0) { $.each(mergemap[pn], function(index, part) { var tmp; tmp = _getHeaderSelections("part", part, selectionlist); if ((tmp != null) && $.isArray(tmp)) { $.merge(selections, tmp); } }); } else { selections = _getHeaderSelections("item", item, selectionlist); } if ((selections != null) && selections.length > 0 && _hasSelections(selections)) { hmdbase = _urls.builder.workflow.hmd + "?page="; hmdlink = selections[0].data.hmdlink; hmdfile = hmdbundle[pn] != null ? hmdbundle[pn] : null; if ((hmdfile != null) && ((hmdlink != null) && hmdlink === "")) { selections[0].data.hmdlink = hmdbase + __makeRel(hmdfile); } else if ((hmdlink != null) && hmdlink !== "") { selections[0].data.hmdlink = hmdbase + __makeRel(hmdlink); } } if (selections != null) { feature.selections = selections; } feature.expanded = _currentSelect === pn; feature.current = _currentSelect === pn; if ((hideparts != null) && ($.inArray(pn, hideparts) !== -1 || $.inArray(item, hideparts) !== -1)) { feature.hidden = true; } else if (feature.type === "mainfeature") { feature.hidden = true; } else { feature.hidden = false; } if (_firstRun === true || ((selections != null) && selections.length > 0)) { _subtitles[item] = _getSelectionsTitle(selections); } feature.subtitle = _subtitles[item] || ""; if ((parts == null) || !$.isArray(parts)) { parts = []; } parts.push(feature); }); if (_verbose) { console.log($.isArray(parts) ? $.merge([], parts) : $.isPlainObject(parts) ? $.extend(true, {}, parts) : parts); console.groupEnd(); } return parts; } return null; }; /* * Modify the default summary data object to include custom price data with * meaningful names/logic * * @param {Object} summarydata Summary data object to iterate over * @param {Object} custompricedata Custom price data object to iterate over * @param {String} leadtime Leadtime * @return {Object} Modified summary data */ _createPriceMap = function(summarydata, custompricedata, leadtime) { var customprice, pricemap, storePrice; if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _createPriceMap"); } pricemap = {}; if (summarydata != null) { if (custompricedata == null) { custompricedata = {}; } if (leadtime == null) { leadtime = ""; } pricemap.leadtime = leadtime; pricemap.buildermode = _buildermode; pricemap.strikethrough = summarydata.strikeThrough || false; if (summarydata.lease != null) { pricemap.lease = $.extend(true, {}, summarydata.lease); } customprice = {}; $.each(custompricedata, function(index, value) { customprice[value.param.id] = value.PriceVariable; }); storePrice = function(pricevar) { var values; if (pricevar != null) { pricevar = pricevar.toLowerCase(); pricemap[pricevar] = null; values = $.makeArray(arguments).slice(1); $.each(values, function(index, value) { if ((value != null) && (pricemap[pricevar] == null)) { pricemap[pricevar] = value; } }); } }; storePrice("msrpbase", customprice.builderv2PriceValue, summarydata.price); storePrice("msrpdiscount", customprice.builderv2SavingsValue, summarydata.totalSavings); storePrice("msrpbeforeinstantsaving", customprice.builderv2BeforeInstantSavingsValue); storePrice("instantsavingdiscount", customprice.builderv2InstantSavingValue); storePrice("msrpbeforecoupon", customprice.builderv2SalePriceValueCoupon, customprice.builderv2SalePriceValue); storePrice("coupondiscount", customprice.builderv2CouponDiscountValue, customprice.builderv2CDValue); storePrice("couponcode", customprice.builderv2CouponCode); storePrice("msrp", customprice.builderv2AfterCouponPriceValue, customprice.builderv2TotalPriceValue, summarydata.yourPrice, summarydata.price); storePrice("savediscount", customprice.builderv2TotalSavingsValue); storePrice("rebate", summarydata.rebatePrice); storePrice("totalafterrebate", summarydata.totalAfterRebatePrice); storePrice("installmentinterval", summarydata.installmentInterval); storePrice("installmentprice", summarydata.installmentPrice); storePrice("installmenttext", summarydata.installmentText); storePrice("bestleaseinstallment", summarydata.bestLeaseInstallment); if (pricemap.couponcode != null) { pricemap.couponcode = $(pricemap.couponcode).children().length > 0 ? $(pricemap.couponcode).children().text() : $(pricemap.couponcode).text(); } if(_startingPrice == null) { _startingPrice = pricemap["msrp"]; } _currentPrice = pricemap["msrp"]; } if (_verbose) { console.log(pricemap); console.groupEnd(); } return pricemap; }; _createTelesalesForm = function() { var $teleForm; $teleForm = $("#telesales_swap"); if ($teleForm.length > 0) { if (_verbose) { console.info("LENOVO.CONFIGURATOR: _createTelesalesForm"); } $teleForm.append(_getTemplate(self.settings.templates.telesales, _builderdata)); } }; _createBuilderUI = function() { if (_verbose) { console.info("LENOVO.CONFIGURATOR: _createBuilderUI -> _firstRun = " + _firstRun); } if (_firstRun) { _createTelesalesForm(); } if (_timer != null) { clearInterval(_timer); } _postProgress = 0; if(self.isLongScroll()) { if(!_interstitial && _mode === "MTM" && (_urlParams.cc == null) && ((_urlParams.sb == null) && ((_urlParams.GroupID == null) && (_urlParams.Code == null)))) { if (_verbose) { console.warn("Attempting to open and display an MTM from column view, so proceed to interstitial."); } _activityMessage = _rsb.loading.interstitial; _interstitial = true; self.postToCart(_activityMessage); } else { var $summaryBox = $(self.settings.summaryBox); $summaryBox.removeClass("ls-hide-me"); if (_firstRun) { $addToCart = $(self.settings.buttonAddToCart); $configurator = $(self.settings.configurator); $mainsummary = $(self.settings.mainSummary); $itemsummary = $(self.settings.itemSummary); $productlistings = $(self.settings.productListingsWrapper); } _interstitial = true; _loadInterstitial(); } } if (!_interstitial) { _loadBuilder(); } else if (!self.isLongScroll()) { _loadInterstitial(); } if(_builderHistory.enabled){ if(!_builderHistory.trackHistory){ _builderHistory.trackHistory = true; var state = {'builder':true}; history.replaceState(state, document.title, window.location.pathname + window.location.search + window.location.hash); if(_mode != "MTM" || _urlParams.cc != null || _urlParams.sb != null){ if(_buildermode === "ModeList"){ _builderHistory.queue.push(_activeTab.name); } history.pushState(state, document.title, window.location.pathname + window.location.search + "#" + _activeTab.name); } else { history.pushState(state, document.title, window.location.pathname + window.location.search + "#WARRANTY"); } } else{ if(_interstitial){ _builderHistory.interstitial = true; } if(_builderHistory.queue[_builderHistory.queue.length -1] != _activeTab.name && _buildermode === "ModeList"){ var state = {'builder':true}; history.replaceState(state, document.title, window.location.pathname + window.location.search + "#" + _activeTab.name); _builderHistory.queue.push(_activeTab.name); } } if(_builderHistory.scrollTop){ __scrollTo($body); _builderHistory.scrollTop = false; } } }; _loadBuilder = function() { if (_verbose) { console.info("LENOVO.CONFIGURATOR: _loadBuilder"); } if ((_builderdata.mapping == null) || _builderdata.mapping.length === 0) { if (_verbose) { console.warn("No features/selections to show, so going to cart."); } if (_rsb != null) { _activityMessage = _rsb.loading.gotoCart; } self.addToCart(_activityMessage); } else if (_mode === "MTM" && (_urlParams.cc == null) && ((_urlParams.sb == null) && ((_urlParams.GroupID == null) && (_urlParams.Code == null)))) { if (_verbose) { console.warn("Attempting to open and display an MTM from column view, so proceed to interstitial."); } _activityMessage = _rsb.loading.interstitial; self.postToCart(_activityMessage); } else { if (_firstRun) { $wrapper.append(_getTemplate(self.settings.templates.configurator, _builderdata)); $addToCart = $(self.settings.buttonAddToCart); $configurator = $(self.settings.configurator); $mainsummary = $(self.settings.mainSummary); $itemsummary = $(self.settings.itemSummary); $productlistings = $(self.settings.productListingsWrapper); $mainsummary.slideUp(0); __scrollTo(self.settings.tabContainerId, "slow"); } if(_baseWarrKey == ""){ _baseWarrKey = _findApplicableKey(); } $body.off("click.postToCart").on("click.postToCart", self.settings.buttonAddToCart, function(event) { if (_rsb != null) { _activityMessage = _rsb.loading.interstitial; } self.postToCart(_activityMessage); if (event != null) { event.preventDefault(); } }); if(urlParams.skipStep1 != ''){ if(urlParams.skipStep1 == "true"){ $(self.settings.buttonAddToCart).trigger("click.postToCart"); } } if (_rsb != null) { _activityMessage = _rsb.loading.opening; } _renderBuilderUI(_activityMessage); } }; _renderBuilderUI = function(message) { var name, summary, summarydata, summaryinfo, template; if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _renderBuilderUI"); } if ((_builderdata.mapping != null) && $.isArray(_builderdata.mapping)) { if (message != null) { _activityMessage = message; } app.MODAL.showActivity(_activityMessage); summaryinfo = { interstitial: false, mainCTA: _rsb.addToCart, showSkip: false, buildermode: _buildermode, availability: (_builderdata.original && _builderdata.original.availablility)?_builderdata.original.availablility:"" }; summarydata = $.extend(true, {}, _builderdata.summary, summaryinfo); summary = _getTemplate(self.settings.templates.mainsummary, summarydata); $mainsummary.html(summary).slideDown("fast"); _updateAsConfiguredPrice(false); if ((_builderdata.mapping[0].features != null) && _builderdata.mapping[0].features.length === 1 && _builderdata.mapping[0].features[0].type === "mainfeature") { name = "mtm"; $(self.settings.expandAll).hide(); } else { name = _buildermode.toLowerCase(); $(self.settings.expandAll).show(); } template = _getTemplate(self.settings.templates[name], _builderdata); if ($(self.settings.configuratorForm).length){ $configurator.find(self.settings.configuratorForm).empty().html(template); } $(self.settings.startOverWrapper).toggle(_multibase); $productlistings.slideUp("fast"); $configurator.slideDown("fast"); app.MODAL.hideActivity(); _firstRun = false; if (_verbose) { console.groupEnd(); } if(window.parseForWin10) { parseForWin10(); } if(_initialEvent == true) { _triggerEvent("Configurator", {"type":"Configurator", "name":"configuration"}); _initialEvent = false; } } }; _loadInterstitial = function() { if (_verbose) { console.info("LENOVO.CONFIGURATOR: _loadInterstitial"); } if (_firstRun) { $wrapper.append(_getTemplate(self.settings.templates.interstitial, _builderdata)); $interstitial = $(self.settings.interstitial); $mainsummary = $(self.settings.mainSummary); $itemsummary = $(self.settings.itemSummary); $productlistings = $(self.settings.productListingsWrapper); } if ((_builderdata.mapping == null) || _builderdata.mapping.length === 0 && !_task !== "edit") { self.addToCart(); } else { if (_firstRun) { $body.off("click.postToCart").one("click.addToCart", self.settings.buttonAddToCart, self.addToCart); } if(_baseWarrKey == ""){ _baseWarrKey = _findApplicableKey(); } if (_rsb != null) { _activityMessage = _rsb.loading.interstitial; } _renderInterstitialUI(_activityMessage); } }; _renderInterstitialUI = function(message) { var lastTab, name, summarydata, summaryinfo, template; lastTab = $.merge([], _builderdata.mapping); if ((_builderdata.mapping == null) || _builderdata.mapping.length === 0) { self.addToCart(); } else { if (_verbose) { console.groupCollapsed("LENOVO.CONFIGURATOR: _renderInterstitialUI"); } if (message != null) { _activityMessage = message; } app.MODAL.showActivity(_activityMessage); console.log("b data", _builderdata); template = _getTemplate(self.settings.templates.tabs, _builderdata); $(self.settings.interstitialTabsWrapper).replaceWith(template); name = _buildermode.toLowerCase(); if(_activeTab.name == "WARRANTY"){ _scrubWarrantyParts(); if(_stackableWarranty){ _prepStackableData(); $(".tabbedBrowse-configurator-expandItems-wrapper").addClass("hidden"); } } else{ if(_stackableWarranty){ $(".tabbedBrowse-configurator-expandItems-wrapper").removeClass("hidden"); } } if ((_builderdata.mapping == null) || ((_builderdata.mapping != null) && _builderdata.mapping.length > 0 && (_builderdata.mapping[0].features != null) && _builderdata.mapping[0].features.length === 1 && _builderdata.mapping[0].features[0].type === "mainfeature")) { name = "mtm"; } template = _getTemplate(self.settings.templates[name], _builderdata); $interstitial.find(self.settings.interstitialForm).empty().html(template); if(_stackableWarranty){ _initStackableWarranty(); } _updateContentHeight(); if (_builderdata.bom) { $.each(_builderdata.bom, function(index, tab) { tab.open = _openSections["" + (self.settings.bomSummary.replace(/^(#|\.)/, "")) + "_" + index] || false; }); template = _getTemplate(self.settings.templates.bom, _builderdata.bom); $(self.settings.bomSummary).empty().html(template); } if ((_builderdata.recommended != null) && (_builderdata.recommended.selections != null) && _builderdata.recommended.selections.length > 0) { template = _getTemplate(self.settings.templates.recommendations, _builderdata.recommended); $(self.settings.recommendedAccessories).empty().html(template).removeClass(self.settings.itemHiddenClass); $(self.settings.interstitialForm).removeClass(self.settings.fullWidthClass); } else { $(self.settings.recommendedAccessories).empty().addClass(self.settings.itemHiddenClass); $(self.settings.interstitialForm).addClass(self.settings.fullWidthClass); } if (_firstRun) { if(self.isLongScroll()) { $interstitial.removeAttr("style"); $("#subtab-content, .tabbed-browse-content-wrapper.tabbed-browse-wrapper, #standard-on","#longscroll-subseries").add($interstitial).removeAttr("style"); // for v1 of longscroll pages if (!$(".subseries-minor.standard-on","#longscroll-subseries #tab-li-customize").length){ $("#configurator_mbox","#subtab-content").after($(".standard-on","#longscroll-subseries")); } else{ $(".tabbedBrowse-module.tab-content.responsiveShowContent","#longscroll-subseries").css("display", "table"); } $("#longscroll-subseries").addClass("interstitial-loaded"); if ( typeof $.fn.floatingSideBar != "undefined"){ $.fn.floatingSideBar(); //see longscroll-subseries } } else { $("#forInterstitial", "#configurator_mbox").hide(); } // _addInterstitialMbox(1); _focusInterstitialUI(); $productlistings.slideUp("fast"); if ($configurator != null) { $configurator.slideUp("fast", function() { $configurator.remove(); $interstitial.slideDown("fast"); }); } else { $interstitial.slideDown("fast"); } } if (lastTab.length > 0 && lastTab[lastTab.length - 1].name === "CART") { lastTab.pop(); lastTab = lastTab.pop().name; } if (typeof lastTab !== "string") { lastTab = "ACCESSORIES"; } summaryinfo = { interstitial: true, mainCTA: _activeTab.name !== lastTab && _buildermode === "ModeList" ? _rsb.continueCustomizing : _rsb.continueToCart, showSkip: _buildermode === "ModeWizard" ? false : _activeTab.name !== lastTab, buildermode: _buildermode, availability: (_builderdata.original && _builderdata.original.availablility)?_builderdata.original.availablility:"" }; summarydata = $.extend(true, {}, _builderdata.summary, summaryinfo); template = _getTemplate(self.settings.templates.mainsummary, summarydata); $mainsummary.html(template).slideDown("fast"); _updateAsConfiguredPrice(false); app.MODAL.hideActivity(); _firstRun = false; if (_verbose) { console.groupEnd(); } if(_initialEvent == true) { _triggerEvent("Configurator", {"type":"Configurator", "name":"configuration"}); _initialEvent = false; } if(window.parseForWin10) { parseForWin10(); } } }; _scrubWarrantyParts = function(){ for(var a=0; a<_builderdata.mapping.length; a++){ var map = _builderdata.mapping[a]; if(map.active){ for(var b=0; b 0){ feat.selections.length = 0; for(var x=0; x < warrSelections.length; x++){ feat.selections.push(selections[warrSelections[x]]); } if(feat.selections.length%2 !== 0){ feat.selections[0].data.fullWidth = true; } } } else{ if(!termPartsFound){ //we cant show the UI if no term parts exist in the data map.noOfferings = true; map.noTermParts = true; return; } if(feat.pn.indexOf("STACKABLE") != -1){ feat.stackableServices = true; } for(var c=0; c -1 && part.pn.toLowerCase().indexOf("warr_") == -1){ key = part.pn.match(/_(...)_\d/); if(key != null && key.length > 1){ baseWarr = STACKABLE_MAP[key[1]]; break; } } } } } return baseWarr; } _focusInterstitialUI = function() { var ui; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _focusInterstitialUI"); } $(self.settings.tabContainers).hide().filter(self.settings.tabContainerId).show(); if (_newTabs()) { $(self.settings.tabContainerId).closest(self.settings.tabItem).addClass(self.settings.currentTabClass).siblings(self.settings.tabItem).removeClass(self.settings.currentTabClass); } if (_firstRun) { __scrollTo($body, "slow"); } ui = _newTabs() ? self.settings.interstitialHideUI : self.settings.interstitialHideUIOld; $(ui).slideUp("fast", function() { $(this).addClass(self.settings.interstitialHideMeClass); $productlistings.slideUp(0); setTimeout(_updateContentHeight, 250); }); }; _unfocusInterstitialUI = function() { var ui; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _unfocusInterstitialUI"); } ui = _newTabs() ? self.settings.interstitialHideUI : self.settings.interstitialHideUIOld; $(self.settings.interstitialHideUI).removeClass(self.settings.interstitialHideMeClass).slideDown("fast", function() { if (_newTabs()) { app.SUBSERIESTABS.updateContent(); } }); }; _toggleSection = function(event) { var $content, $trigger, hiddenClass, item, opened, pn; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _toggleSection"); } $trigger = $(this); item = $trigger.data("item"); pn = $trigger.data("pn"); hiddenClass = self.settings.itemHiddenClass; if (_buildermode === "ModeList") { $content = $trigger.nextUntil(self.settings.expandableHeading).slice(1); if ($content.hasClass(hiddenClass)) { $content.slideUp(0).removeClass(hiddenClass); } $content.slideToggle(200, app.MENUS.afterExpandableMenuToggle); opened = $trigger.hasClass(self.settings.itemExpandedClass); _openSections[item] = !opened; } else { if ($trigger.hasClass(self.settings.itemExpandedClass)) { $content = $trigger.nextUntil(self.settings.expandableHeading).slice(1); if ($content.hasClass(hiddenClass)) { $content.slideUp(0).removeClass(hiddenClass); } $content.slideToggle(200, app.MENUS.afterExpandableMenuToggle); } else { $(self.settings.expandableHeading).filter("." + self.settings.itemExpandedClass).trigger("click"); if ((item != null) && item !== "") { _currentSelect = pn; self.navigateTo(null, _basedata.uribase + item, _buildermode); } else { console.error("LENOVO.CONFIGURATOR: Cannot navigate to selected feature."); } } } setTimeout(_updateContentHeight, 250); if (event != null) { event.preventDefault(); } }; _updateContentHeight = function() { var $tabWrapper, summaryBoxHeight, tabContainer, tabHeight, wrapperHeight, lsHeight; if (_newTabs() && !self.isLongScroll()) { $tabWrapper = $(self.settings.tabWrapper); if (_buildermode === "ModeList") { tabHeight = 35; summaryBoxHeight = $(self.settings.summaryBox).height(); tabContainer = $(self.settings.tabContainerId).height(); wrapperHeight = tabContainer > summaryBoxHeight ? tabContainer : summaryBoxHeight; $tabWrapper.height(wrapperHeight + tabHeight); if (self.isLongScroll()){ } } else { $tabWrapper.height(""); } } }; _triggerEvent = function(eventName, eventData) { if(window.debugAllowed) { console.warn("Builder Event: " + eventName + ", data: " + JSON.stringify(eventData)); } if (typeof window.lmd.event === "undefined" || typeof window.lmd.event.push !== "function") { window.lmd.event = []; } window.lmd.event.push(eventData); if (typeof _satellite !== "undefined" && typeof _satellite.track !== "undefined") { _satellite.track(eventName); } }; _trackEvents = function(obj, item, isNavEvent) { if(!window.lmd || !_builderdata || !_builderdata.original) { if (_verbose) { console.info("LENOVO.CONFIGURATOR: _trackEvents no lmd object"); } //implemented only for Adobe DTM (for now). return; } //find the selected item from data var eventData = null; var eventName = null; /* If found here we have tab navigation event */ if(_builderdata.original.tabslist) { for(var a=0; a < _builderdata.original.tabslist.tabs.length; a++) { var _id = _builderdata.original.tabslist.tabs[a].item; if(_id == item) { eventData = {}; eventData.type = "Configurator"; if(_builderdata.original.tabslist.tabs[a].pn == "DIALOG_1_START") { eventData.name = "Configurator"; } else if(_builderdata.original.tabslist.tabs[a].pn == "DIALOG_2_START") { eventData.name = "WARRANTY"; } else if(_builderdata.original.tabslist.tabs[a].pn == "DIALOG_3_START") { eventData.name = "ACCESSORIES"; } else { eventData.name = _builderdata.original.tabslist.tabs[a].name; } eventData.pn = _builderdata.original.tabslist.tabs[a].pn; eventName = "Configurator"; break; } } } /* if found here we have section event = navigation event */ if(eventData == null && _builderdata.original.featurelist) { for(var a=0; a < _builderdata.original.featurelist.features.length; a++) { var _id = _builderdata.original.featurelist.features[a].item; if(_id == item) { eventData = {}; eventName = "Configurator"; eventData.type = "Configurator"; if(isNavEvent) { eventData.name = _activeTab.name == "SYSTEM"?"Configurator":_activeTab.name; } else { eventData.name = _builderdata.original.featurelist.features[a].title; eventData.pn = _builderdata.original.featurelist.features[a].pn; } break; } } } /* if found here we have a selection event or navigation event (if tab was selected the first item of section is sent as item) */ if(eventData == null && _builderdata.original.selectionlist) { for(var a=0; a < _builderdata.original.selectionlist.selections.length; a++) { if(!_builderdata.original.selectionlist.selections[a].subselections) { continue; } var _subs = _builderdata.original.selectionlist.selections[a].subselections; for(var s=0; s < _subs.length; s++) { var _id = _subs[s].data.item; if(_id == item) { eventData = {}; eventName = "ConfiguratorOption"; if(isNavEvent) { eventName = "Configurator"; eventData.type = "Configurator"; if(_subs[s].data.parentpn == "DIALOG_1_START") { eventData.part = "Configurator"; } else if(_subs[s].data.parentpn == "DIALOG_2_START") { eventData.part = "WARRANTY"; } else if(_subs[s].data.parentpn == "DIALOG_3_START") { eventData.part = "ACCESSORIES"; } else { eventData.part = _activeTab.name; } eventData.pn = _subs[s].data.parentpn; } else { eventData.type = "Configurator option selected"; eventData.element = _subs[s].element; eventData.part = _subs[s].data.title; eventData.pn = _subs[s].data.pn; eventData.profit = Number((_subs[s].data.pricedata.msrp.replace(/[^0-9]+/g, "")) / 100).toFixed(2); eventData.delta = _subs[s].data.pricedata.delta; _userSelections[item] = item; } break; } } if(eventData != null) { break; } } } if(eventData != null) { _triggerEvent(eventName, eventData); } }; _configuratorInputUpdate = function(event) { var $configItem, $label, $optionList, $trigger, item, selectedClass; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _configuratorInputUpdate"); } $trigger = $(this); $label = $trigger.parent(); $optionList = $trigger.closest(self.settings.optionList); $configItem = $optionList.closest(self.settings.expandableMenuList); selectedClass = self.settings.selectedClass; _currentSelect = $trigger.data("ppn"); item = $trigger.data("configitem"); if(_stackableWarranty && $trigger.parent().hasClass(self.settings.stackableSelectedClass)){ return false; } _selectItem(this, item); _trackEvents(this, item); }; _postToCart = function(message) { var configParams, params, postOptions, url; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _postToCart"); } if ($addToCart != null) { $addToCart.prop("disabled", true); } __scrollTo($body, "fast"); _postAttempts++; if (_postAttempts > _postLimit) { if (_debug) { console.warn("LENOVO.CONFIGURATOR: Maximum number of post attempts reached. Going to cart."); } self.addToCart(); } else { $tabcontainer.find("." + self.settings.itemExpandedClass).click(); if (message != null) { _activityMessage = message; } app.MODAL.showActivity(_activityMessage); _templateFilePath = _urls.builder.templates.configData; postOptions = { BuilderExitCmd: "addToCartToWCI", tabs: "1,2,3" }; configParams = _getConfigParams(postOptions); params = _getMandatoryParams(null, null, configParams); url = _urls.builder.workflow.exit; _getJSON(url, params).then(_transition, _handleAjaxError, _showProgress); } }; _transition = function(data) { var taburl; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _transition"); } data = __scrub(data); if (_timer != null) { clearInterval(_timer); } _postProgress = 0; _postAttempts = 0; _firstRun = true; _interstitial = true; _activeTab.name = "WARRANTY"; _buildermode = _getBuilderMode(); taburl = _basedata.uribase + data.tabslist.tabs[1].item; self.navigateTo(null, taburl, _buildermode, false); }; _navigateTo = function(obj, item, mode, promise) { var configParams, params, postOptions, url; if (promise == null) { promise = false; } if(item != null) { _trackEvents(obj, item, true); } if (_verbose) { console.info("LENOVO.CONFIGURATOR: _navigateTo(" + obj + ", " + item + ", " + mode + ", " + promise + ")"); } _activityMessage = _rsb.loading.loading; app.MODAL.showActivity(_activityMessage); postOptions = {}; if (mode === "ModeWizard") { postOptions.tabs = "2,3"; } configParams = _getConfigParams(postOptions); params = _getMandatoryParams(obj, item, configParams); params.builderNavigateToNode = item; if (mode != null) { params.builderMode = mode; } url = _urls.builder.workflow.navigate; if (item === "summary") { if (promise !== true) { self.addToCart(); } else { return self.addToCart(); } } else if (promise === true) { return _getJSON(url, params); } else { _getJSON(url, params).then(_parseJSON, _handleAjaxError, _showProgress).then(_createBuilderUI, _handleParseError, _showProgress); } }; _navigateNext = function(promise) { var configParams, params, postOptions, url; if (promise == null) { promise = false; } if (_verbose) { console.info("LENOVO.CONFIGURATOR: _navigateNext(" + promise + ")"); } _activityMessage = _rsb.loading.loading; postOptions = {}; postOptions.builderNext = "true"; if (_buildermode === "ModeWizard") { postOptions.tabs = "2,3"; } configParams = _getConfigParams(postOptions); params = _getMandatoryParams(null, null, configParams); url = _urls.builder.workflow.navigate; if ((promise != null) && promise === true) { return _getJSON(url, params); } else { _getJSON(url, params).then(_parseJSON, _handleAjaxError, _showProgress).then(_createBuilderUI, _handleParseError, _showProgress); } }; _navigatePrevious = function(promise) { var configParams, params, postOptions, url; if (promise == null) { promise = false; } if (_verbose) { console.info("LENOVO.CONFIGURATOR: _navigatePrevious(" + promise + ")"); } _activityMessage = _rsb.loading.loading; postOptions = {}; postOptions.builderPrev = "true"; if (_buildermode === "ModeWizard") { postOptions.tabs = "2,3"; } configParams = _getConfigParams(postOptions); params = _getMandatoryParams(null, null, configParams); url = _urls.builder.workflow.navigate; if ((promise != null) && promise === true) { return _getJSON(url, params); } else { _getJSON(url, params).then(_parseJSON, _handleAjaxError, _showProgress).then(_createBuilderUI, _handleParseError, _showProgress); } }; _goToStep = function(event) { var $accordion, $trigger, startitem, taburl, $interstitialPageSubHeading; $interstitialPageSubHeading = $("#tab-customize .add-accessory-pageSubHeading"); if (_verbose) { console.info("LENOVO.CONFIGURATOR: _goToStep"); } $trigger = $(this); _visitedSteps[_activeTab.name] = true; _activeTab.name = $trigger.attr("id"); if (_activeTab.name !== "SYSTEM" && self.isLongScroll()) { $interstitialPageSubHeading.addClass("visibility"); } else { $interstitialPageSubHeading.removeClass("visibility"); } if (_activeTab.name !== "CART" && !($trigger.hasClass(self.settings.interstitialTabActiveClass) || $trigger.hasClass(self.settings.interstitialAccordionActiveClass))) { $accordion = $("." + self.settings.interstitialAccordionActiveClass); startitem = $trigger.data("start"); if ((startitem != null) && startitem !== "") { if ($accordion.is(":visible")) { $accordion.next(self.settings.accordionContent).slideUp("fast"); } _activityMessage = _rsb.loading.loading; _visitedSteps[_activeTab.name] = true; taburl = _basedata.uribase + startitem; self.navigateTo(null, taburl, _buildermode, false); } else { self.nextStep(); } } else if ($trigger.hasClass(self.settings.interstitialAccordionActiveClass)) { $trigger.toggleClass(self.settings.interstitialAccordionCollapsedClass).next(self.settings.accordionContent).slideToggle("fast"); } if (self.isLongScroll()) _hideExpandAllLink(_activeTab.name); if (event != null) { event.preventDefault(); } }; _nextStep = function(event) { var $trigger, at, nextTabId, quickmap, startitem, tabmap, taburl, $interstitialPageSubHeading; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _nextStep"); } $interstitialPageSubHeading = $("#tab-customize .add-accessory-pageSubHeading"); $trigger = $(this); quickmap = []; tabmap = _builderdata.mapping; $.each(tabmap, function(index, tab) { if (tab.visible) { quickmap.push(tab.name); } }); at = $.inArray(_activeTab.name, quickmap); if (at !== -1) { nextTabId = quickmap[at + 1]; if(nextTabId == undefined){ self.addToCart(); return false; }else{ startitem = $(self.settings.interstitialTabsWrapper).find("#" + nextTabId).data("start"); _visitedSteps[_activeTab.name] = true; _visitedSteps[nextTabId] = true; _activeTab.name = nextTabId; _activityMessage = _rsb.loading.loading; taburl = _basedata.uribase + startitem; self.navigateTo(null, taburl, _buildermode, false); } } if (_activeTab.name !== "SYSTEM" && self.isLongScroll()) { $interstitialPageSubHeading.addClass("visibility"); } else { $interstitialPageSubHeading.removeClass("visibility"); } if (self.isLongScroll()) _hideExpandAllLink(_activeTab.name); if (event != null) { event.preventDefault(); } }; _hideExpandAllLink = function(activeTab) { var $scope = $("#configurator_mbox", "#longscroll-subseries"); $( document ).ajaxComplete(function() { if (typeof activeTab != "undefined" && activeTab != null){ var $accordionLength = $("header#" + activeTab).next(".configuratorItem-accordion-content").find(".expandableHeading").length; if (_verbose) { console.log("len?", $accordionLength); console.log("matching header section:", ("header#" + activeTab)); } if($accordionLength > 1) { $("#forInterstitial", $scope).removeClass("hidden"); } else { $("#forInterstitial", $scope).addClass("hidden"); } } }); }; _handleStackableSelection = function($obj, item){ var stackableSelections = null; if($obj.type == "radio"){ //if a radio button was selected, all of the checkboxes need to be unselected var $selWarrServices = $("#warrServices input[checked]"); if($selWarrServices.length > 0){ stackableSelections = new Object(); stackableSelections.unselect = new Array(); stackableSelections.select = new Array(); stackableSelections.select.push( { "itemId": item, "type": "radio" } ); console.info("selected services: "); console.info($selWarrServices); $selWarrServices.each(function(){ console.info("removed item: " + $(this).data("configitem")) stackableSelections.unselect.push( { "itemId": $(this).data("configitem"), "type": "checkbox" } ); }); } } return stackableSelections; }; _selectItem = function(obj, item) { var configParams, params, postOptions, url; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _selectItem -> " + item); } var unselect = null; var $obj = $(obj)[0]; var stackableSelections; if(_stackableWarranty){ stackableSelections = _handleStackableSelection($obj, item); } if(stackableSelections != null){ unselect = stackableSelections.unselect; item = stackableSelections.select; } _activityMessage = _rsb != null ? _rsb.loading.updating : ""; app.MODAL.showActivity(_activityMessage); if ((obj != null) && obj.type === "select-one") { item = obj.options[obj.selectedIndex].value; } url = _urls.builder.workflow.update; postOptions = {}; if (_interstitial && _buildermode === "ModeWizard") { postOptions.tabs = "2,3"; } else if (!_interstitial) { postOptions.tabs = "1"; } configParams = _getConfigParams(postOptions); params = _getMandatoryParams(obj, item, configParams, unselect); _getJSON(url, params).then(_parseJSON, _handleAjaxError, _showProgress).then(_createBuilderUI, _handleParseError, _showProgress); }; _selectBoxItemByCode = function(item) { var configParams, params, postOptions, url; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _selectBoxItemByCode -> " + item); } _activityMessage = _rsb != null ? _rsb.loading.updating : ""; app.MODAL.showActivity(_activityMessage); url = _urls.builder.workflow.update; postOptions = {}; if (_interstitial && _buildermode === "ModeWizard") { postOptions.tabs = "2,3"; } else if (!_interstitial) { postOptions.tabs = "1"; } configParams = _getConfigParams(postOptions); params = _getMandatoryParams(null, item, configParams); params[item] = 1; _getJSON(url, params).then(_parseJSON, _handleAjaxError, _showProgress).then(_createBuilderUI, _handleParseError, _showProgress); }; _showItemDetailsPopup = function(group, code, name) { var options, pg, url; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _showItemDetailsPopup(" + group + ", " + code + ", " + name + ")"); } pg = _rsb.summary.itemDetailsPage.replace(/\\/g, "\/"); url = _baseurl + "/builder.workflow:ItemDetails?fCode="; url += pg.charAt(0) === "/" ? escape(pg) : escape("/" + pg); url += "&GroupID=" + group + "&Code=" + code + "&Name=" + name + "&from=builder&hide_menu_area=true&hide_ad_area=true"; url = url.replace(" ", "%20"); options = { contentType: "iframe" }; app.MODAL.openModal(url, options); }; _updateAsConfiguredPrice = function(reset) { var msrp, summary; if (_verbose) { console.log("LENOVO.CONFIGURATOR: _updateAsConfiguredPrice(" + reset + ")"); } $ctaPriceLabel = $ctaPriceLabel || $(_defaults.ctaPriceLabel); $ctaPriceValue = $ctaPriceValue || $(_defaults.ctaPriceValue); if (reset === true) { $ctaPriceLabel.html(_rsb.startingAt); $ctaPriceValue.html(_originalCtaPrice); } else { summary = _builderdata.summary || null; msrp = (summary != null) && ((summary.msrp != null) && summary.msrp !== "") ? summary.msrp : null; $ctaPriceLabel.html(_rsb.asConfigured); if (msrp != null) { $ctaPriceValue.html(_builderdata.summary.msrp); } } }; _addToCart = function(event) { var cmds, params; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _addToCart"); } if(_builderHistory.trackHistory){ history.replaceState(null, document.title, window.location.pathname + window.location.search) } __scrollTo($body, "fast"); $tabcontainer.find("." + self.settings.itemExpandedClass).click(); _activityMessage = _rsb != null ? _rsb.loading.gotoCart : ""; app.MODAL.showActivity(_activityMessage); cmds = {}; cmds.BuilderExitCmd = "addToCart"; cmds[_basedata.sdid] = _basedata.sdva; params = $.param(cmds, true); var selectionCount = Object.keys(_userSelections).length; _triggerEvent("Configurator", {"type":"Configurator", "name":"Add to Cart", "preConfigCost": Number((_startingPrice.replace(/[^0-9]+/g, "")) / 100).toFixed(2), "postConfigCost": Number((_currentPrice.replace(/[^0-9]+/g, "")) / 100).toFixed(2), "configNum":(selectionCount==0?"none":selectionCount)}); window.location.href = _urls.builder.workflow.exit + "?" + params; if (event != null) { event.preventDefault(); } }; _addToWishlist = function(event) { var cmds, params; if (_verbose) { console.info("LENOVO.CONFIGURATOR: _addToWishlist"); } __scrollTo(self.settings.tabContainerId); $tabcontainer.find("." + self.settings.itemExpandedClass).click(); _activityMessage = _rsb != null ? _rsb.loading.loading : ""; app.MODAL.showActivity(_activityMessage); cmds = {}; cmds.BuilderExitCmd = "addToWishList"; cmds[_basedata.sdid] = _basedata.sdva; params = $.param(cmds, true); window.location.href = _urls.builder.workflow.exit + "?" + params; if (event != null) { event.preventDefault(); } }; /* _addInterstitialMbox = function(_mboxLoop) { var error, geo, prod_name, prod_sb, _loop; if (_verbose) { // console.info("LENOVO.CONFIGURATOR: _addInterstitialMbox"); } _loop = typeof _mboxLoop === "number" ? _mboxLoop : 1; if (typeof mboxDefine === "function") { geo = "geo=" + ((_rsb != null) && (_rsb.properties != null) ? _rsb.properties.country : ""); prod_name = "productName=" + _basedata.name; prod_sb = "sb=" + _basedata.sb; try { mboxDefine("configurator_mbox", "configurator_interstitial"); mboxUpdate("configurator_interstitial", geo, prod_name, prod_sb); } catch (_error) { error = _error; if (_debug) { console.group("LENOVO.CONFIGURATOR: mboxDefine/mboxUpdate failed"); console.warn("Check mbox setup."); console.log("geo=" + geo); console.log("prod_name=" + prod_name); console.log("prod_sb=" + prod_sb); console.error(error.message != null ? error.message : error); console.groupEnd(); } } } else { if (_loop < 10) { setTimeout(_addInterstitialMbox, 300, _loop++); } } };*/ _loadStackableResources = function(){ //try to load stacakble resources from session storage _stackableWarrContent = $.parseJSON(sessionStorage.getItem("StackableContent")); if(typeof _stackableWarrContent === "undefined" || _stackableWarrContent === null){ //resources not loaded, load via AJAX call var url = _baseurl + "/wci.workflow:load?page=/WW/site/templates/configurator/owv2/stackableData.html"; _getJSON(url).then(_parseStackableJSON, _handleAjaxError, _showProgress); } }; _parseStackableJSON = function(data, textStatus, jqXHR){ _stackableWarrContent = __scrub(data); sessionStorage.setItem("StackableContent", JSON.stringify(_stackableWarrContent)); }; self = app[_M] = { shouldRun: function() { return $(_defaults.wrapper).length > 0 && !app.hasOwnProperty("BUILDER"); }, isLongScroll: function(){ return ($("#longscroll-subseries").length > 0); }, init: function(options) { var breakPointName, custom; if (!_initialized) { if (_debug) { console.info("LENOVO.CONFIGURATOR: init"); } $body = $("body"); if (app.UTILS != null) { _debug = app.UTILS.isDebug(); _verbose = app.UTILS.isVerbose(); _usedefaults = app.UTILS.useDefaults(); } if (app.ENV != null) { _urls = app.ENV.urls(_baseurl); } $.extend(true, app.MAIN.breakPoints, _breakPoints); for (breakPointName in _breakPoints) { if (_breakPoints.hasOwnProperty(breakPointName)) { mediaCheck({ media: app.MAIN.breakPoints[breakPointName], entry: app.MAIN.getBreakPointHandler(breakPointName, true), exit: app.MAIN.getBreakPointHandler(breakPointName, false) }); } } if (app.TEMPLATES != null) { /* FIXME: temporary script to remove some DOM elements covered by new handlebars template */ $(".tabbedBrowse-configurator-wrapper").find(".tabbedBrowse-configurator, .add-accessory-inner-wrapper").remove(); if(!self.isLongScroll()) { $(".tabbedBrowse-modulesWrapper").find("#configure-summary, #system-components").empty(); } if (_usedefaults === true) { custom = $.extend(true, {}, options); options = {}; if (custom.mode != null) { options.mode = custom.mode; } if (custom.loadingMessage != null) { options.loadingMessage = custom.loadingMessage; } options.custom = custom; } else if (options == null) { options = {}; } self.settings = $.extend(true, _defaults, options); $tabtrigger = $(self.settings.tabTriggers).find("a").filter("[href=" + self.settings.tabContainerId + "]"); $tabcontainer = $(self.settings.tabContainers).filter(self.settings.tabContainerId); $wrapper = $(self.settings.wrapper); $ctaPriceLabel = $(self.settings.ctaPriceLabel); $ctaPriceValue = $(self.settings.ctaPriceValue); _originalCtaPrice = $ctaPriceValue.data("originalprice") || $ctaPriceValue.html(); $(self.settings.standardOn).find(self.settings.calloutBox).addClass(self.settings.collapsibleCalloutBoxClass); $wrapper.on("change.configuratorInputUpdate", self.settings.optionInput, self.configuratorInputUpdate).on("click.closeItemSummary", self.settings.closeItemSummary, self.closeItemSummary).on("click.skipToSummary", self.settings.skipToSummary, self.skipToSummary).on("click.configuratorToggleAll", self.settings.expandAll, self.configuratorToggleAll).on("click.helpMeDecide", self.settings.helpMeDecide, self.helpMeDecide).on("click.startOver", self.settings.buttonStartOver, self.startOver).on("click.openDebug", self.settings.openDebug, self.openDebug).on("click.toggleSection", self.settings.expandableHeading, self.toggleSection).on("click.goToStep", self.settings.interstitialTab, self.goToStep); $body.on("click.openDebugBOM", self.settings.buttonDebug, self.openDebugBOM).on("click.openLegacyBuilder", self.settings.buttonLegacy, self.openLegacyBuilder).on("click.nextStep", self.settings.buttonNextStep, self.nextStep).on("click.addToCart", self.settings.buttonSkip, self.addToCart).on("click.calloutBox", self.settings.calloutBox, self.toggleCalloutBox); $tabcontainer.on("click.initCustomize", self.settings.buttonCTAs, self.initCustomize); $tabtrigger.on("click.tabShow", self.tabShow); self.tabShow(); _stackableWarranty = ($wrapper.data("stackable") == 1)? true : false; if(_stackableWarranty){ _loadStackableResources(); _lang = $("meta[name='Lenovo.Language']").attr("content"); } self.setupConfigurator(self.settings); _initialized = true; } else { console.error("LENOVO.CONFIGURATOR: Missing required dependency -> LENOVO.TEMPLATES"); } } }, toggleCalloutBox: function(event) { var $bom, $summary, $trigger, id, nHeight, oHeight, tabindex; if (_verbose) { console.info("LENOVO.CONFIGURATOR: toggleCalloutBox"); } $trigger = $(this); $bom = $trigger.closest(self.settings.bomSummary); $summary = $trigger.closest(self.settings.summaryBox); id = $summary.attr("id"); tabindex = $trigger.data("tabindex"); oHeight = $bom.height(); $trigger.toggleClass("closed"); nHeight = $bom.height(); if ((id != null) && (tabindex != null)) { _openSections["" + id + "_" + tabindex] = $trigger.hasClass("closed") === false; } if (event != null) { event.preventDefault(); } }, tabShow: function(event) { if (_debug) { console.info("LENOVO.CONFIGURATOR: tabShow"); } if (app.TABBEDBROWSE != null) { app.TABBEDBROWSE.matchHeights(); try { app.TABBEDBROWSE.updateProductListingHeights(self.settings.buttonContainer, self.settings.expressShip); } catch (_error) { if (_verbose) { console.error("Unable to match heights on Express Ship section."); } } } if (event != null) { self.setupConfigurator(self.settings); event.preventDefault(); } }, closeItemSummary: function(event) { if (_verbose) { console.info("LENOVO.CONFIGURATOR: closePricingSummary"); } $(self.settings.itemSummary).slideUp("fast", function() { $(this).remove(); }); if (event != null) { event.preventDefault(); } }, skipToSummary: function(event) { if (_verbose) { console.info("LENOVO.CONFIGURATOR: skipToSummary"); } $(self.settings.itemSummary).slideUp("fast", function() { $(this).remove(); __scrollTo(self.settings.pricingSummary); }); if (event != null) { event.preventDefault(); } }, configuratorToggleAll: function(event) { var $el, expandedClass, isExpanded, itemExpandedClass, selector; if (_verbose) { console.info("LENOVO.CONFIGURATOR: configuratorToggleAll"); } $el = $(this); expandedClass = self.settings.expandedClass; itemExpandedClass = self.settings.itemExpandedClass; isExpanded = $el.hasClass(expandedClass); $wrapper = $wrapper || $(_defaults.wrapper); $el.toggleClass(expandedClass); selector = self.settings.expandableHeading + (isExpanded ? "." + itemExpandedClass : ":not(." + itemExpandedClass + ")"); $wrapper.find(selector).trigger("click"); if (event != null) { event.preventDefault(); } }, helpMeDecide: function(event) { var $trigger, hiddenClass, href; if (_verbose) { console.info("LENOVO.CONFIGURATOR: helpMeDecide"); } $trigger = $(this); hiddenClass = self.settings.itemHiddenClass; href = decodeURIComponent($trigger.attr("href").replace(/\+/g, "").split("|")[0]); if (!$trigger.hasClass("hmdExpanded")) { $.get(href, function(data) { $trigger.children("strong").html("-").end().next(".extraContent").html(data).slideDown("fast").removeClass(hiddenClass).end().addClass("hmdExpanded"); }); _updateContentHeight(); } else { $trigger.children("strong").html("+").end().next(".extraContent").empty().slideUp("fast").addClass(hiddenClass).end().removeClass("hmdExpanded"); _updateContentHeight(); } if (event != null) { event.preventDefault(); } }, startOver: function(event) { if (_verbose) { console.info("LENOVO.CONFIGURATOR: startOver"); } $(self.settings.startOverWrapper).show(); $mainsummary.slideUp("fast"); _updateAsConfiguredPrice(true); $configurator.slideUp("fast", function() { $(this).remove(); }); $productlistings.slideDown("fast", function() { self.tabShow(); }); _currentSelect = null; _firstRun = true; _activityMessage = self.settings.loadingMessage; app.MODAL.showActivity(_activityMessage); history.replaceState(null, document.title, window.location.pathname + window.location.search); document.location.reload(); if (event != null) { event.preventDefault(); } }, openDebugBOM: function(event) { var href; if (_verbose) { console.info("LENOVO.CONFIGURATOR: openDebugBOM"); } href = _urls.seutil.workflow.debugBOM + "?ConfigurationObject=" + _builderdata.cursor.ConfigModeID; window.open(href, "debugConfigWindow", "toolbar=no,location=yes,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=300"); if (event != null) { event.preventDefault(); } }, openLegacyBuilder: function(event) { var href; if (_verbose) { console.info("LENOVO.CONFIGURATOR: openLegacyBuilder"); } href = _urls.builder.workflow.enter + "?sb=" + _basedata.sb; window.open(href, "legacyConfigWindow", "location=yes,scrollbars=yes,resizable=yes"); if (event != null) { event.preventDefault(); } }, beforeRenderUI: function(map) { return map; }, addToCart: _addToCart, addToWishlist: _addToWishlist, configuratorInputUpdate: _configuratorInputUpdate, initCustomize: _initCustomize, goToStep: _goToStep, navigateNext: _navigateNext, navigatePrevious: _navigatePrevious, navigateTo: _navigateTo, nextStep: _nextStep, openConfigurator: _openConfigurator, postToCart: _postToCart, selectItem: _selectItem, selectBoxItemByCode: _selectBoxItemByCode, setupConfigurator: _setupConfigurator, showItemDetailsPopup: _showItemDetailsPopup, toggleSection: _toggleSection, isStandAloneSingleSku: function() { return ($("#longscroll-singlesku").length > 0); } }; window.showItemDetailsPopup = function(group, code, name) { window.LENOVO.CONFIGURATOR.showItemDetailsPopup(group, code, name); }; window.selectBoxItemByCode = function(item) { window.LENOVO.CONFIGURATOR.selectBoxItemByCode(item); }; window.onpopstate = function(event){ if(_builderHistory.enabled){ if(_builderHistory.trackHistory && (event.state != null && event.state.builder)){ _builderHistory.queue.pop(); if(_builderHistory.queue.length >0){ var state = {'builder':true}; history.pushState(state, document.title, window.location.pathname + window.location.search + "#" + _builderHistory.queue[_builderHistory.queue.length-1]); _builderHistory.scrollTop = true; $("#" + _builderHistory.queue[_builderHistory.queue.length -1]).click(); } else { _activityMessage = self.settings.loadingMessage; app.MODAL.showActivity(_activityMessage); history.replaceState(null, document.title, window.location.pathname + window.location.search) if(_urlParams.cc == null && (_urlParams.sb == null || window.LENOVO.CONFIGURATOR.isStandAloneSingleSku())){ document.location.reload(); } else{ history.back(); } } } else if (_builderHistory.interstitial && event.state == null){ history.back(); } } }; })(window.LENOVO = window.LENOVO || {}, jQuery); //if we are loading the subseries page by navigating back to a state in the history from the configurator/interstitial, go back 1 more since this state essentially does nothing //if(history.state != null && history.state.builder){ // history.back(); //} //else if(location.hash == "#SYSTEM" || location.hash == "#WARRANTY" || location.hash == "#SOFTWARE" || location.hash=="#ACCESSORIES"){ history.replaceState("", document.title, window.location.pathname + window.location.search) } /* end: /ISS_Static/WW/site/scripts/owv2/configurator_v2.js(126339) */ /* start: /ISS_Static/WW/site/scripts/jquery/jquery.tools.min.js (cachekey: [])*/ /*! * jQuery Tools v1.2.7 - The missing UI library for the Web * * dateinput/dateinput.js * overlay/overlay.js * overlay/overlay.apple.js * rangeinput/rangeinput.js * scrollable/scrollable.js * scrollable/scrollable.autoscroll.js * scrollable/scrollable.navigator.js * tabs/tabs.js * tabs/tabs.slideshow.js * toolbox/toolbox.expose.js * toolbox/toolbox.flashembed.js * toolbox/toolbox.mousewheel.js * tooltip/tooltip.js * tooltip/tooltip.dynamic.js * tooltip/tooltip.slide.js * validator/validator.js * * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE. * * http://flowplayer.org/tools/ * * jquery.event.wheel.js - rev 1 * Copyright (c) 2008, Three Dub Media (http://threedubmedia.com) * Liscensed under the MIT License (MIT-LICENSE.txt) * http://www.opensource.org/licenses/mit-license.php * Created: 2008-07-01 | Updated: 2008-07-14 * * ----- * */ (function(a,b){a.tools=a.tools||{version:"v1.2.7"};var c=[],d={},e,f=[75,76,38,39,74,72,40,37],g={};e=a.tools.dateinput={conf:{format:"mm/dd/yy",formatter:"default",selectors:!1,yearRange:[-5,5],lang:"en",offset:[0,0],speed:0,firstDay:0,min:b,max:b,trigger:0,toggle:0,editable:0,css:{prefix:"cal",input:"date",root:0,head:0,title:0,prev:0,next:0,month:0,year:0,days:0,body:0,weeks:0,today:0,current:0,week:0,off:0,sunday:0,focus:0,disabled:0,trigger:0}},addFormatter:function(a,b){d[a]=b},localize:function(b,c){a.each(c,function(a,b){c[a]=b.split(",")}),g[b]=c}},e.localize("en",{months:"January,February,March,April,May,June,July,August,September,October,November,December",shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",days:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",shortDays:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"});function h(a,b){return(new Date(a,b+1,0)).getDate()}function i(a,b){a=""+a,b=b||2;while(a.length");function k(a,b,c,e){var f=b.getDate(),h=b.getDay(),k=b.getMonth(),l=b.getFullYear(),m={d:f,dd:i(f),ddd:g[e].shortDays[h],dddd:g[e].days[h],m:k+1,mm:i(k+1),mmm:g[e].shortMonths[k],mmmm:g[e].months[k],yy:String(l).slice(2),yyyy:l},n=d[a](c,b,m,e);return j.html(n).html()}e.addFormatter("default",function(a,b,c,d){return a.replace(/d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*'/g,function(a){return a in c?c[a]:a})}),e.addFormatter("prefixed",function(a,b,c,d){return a.replace(/%(d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*')/g,function(a,b){return b in c?c[b]:a})});function l(a){return parseInt(a,10)}function m(a,b){return a.getFullYear()===b.getFullYear()&&a.getMonth()==b.getMonth()&&a.getDate()==b.getDate()}function n(a){if(a!==b){if(a.constructor==Date)return a;if(typeof a=="string"){var c=a.split("-");if(c.length==3)return new Date(l(c[0]),l(c[1])-1,l(c[2]));if(!/^-?\d+$/.test(a))return;a=l(a)}var d=new Date;d.setDate(d.getDate()+a);return d}}function o(d,e){var i=this,j=new Date,o=j.getFullYear(),p=e.css,q=g[e.lang],r=a("#"+p.root),s=r.find("#"+p.title),t,u,v,w,x,y,z=d.attr("data-value")||e.value||d.val(),A=d.attr("min")||e.min,B=d.attr("max")||e.max,C,D;A===0&&(A="0"),z=n(z)||j,A=n(A||new Date(o+e.yearRange[0],1,1)),B=n(B||new Date(o+e.yearRange[1]+1,1,-1));if(!q)throw"Dateinput: invalid language: "+e.lang;if(d.attr("type")=="date"){var D=d.clone(),E=D.wrap("
").parent().html(),F=a(E.replace(/type/i,"type=text data-orig-type"));e.value&&F.val(e.value),d.replaceWith(F),d=F}d.addClass(p.input);var G=d.add(i);if(!r.length){r=a("
").hide().css({position:"absolute"}).attr("id",p.root),r.children().eq(0).attr("id",p.head).end().eq(1).attr("id",p.body).children().eq(0).attr("id",p.days).end().eq(1).attr("id",p.weeks).end().end().end().find("a").eq(0).attr("id",p.prev).end().eq(1).attr("id",p.next),s=r.find("#"+p.head).find("div").attr("id",p.title);if(e.selectors){var H=a("").attr("id",p.year);s.html(H.add(I))}var J=r.find("#"+p.days);for(var K=0;K<7;K++)J.append(a("").text(q.shortDays[(K+e.firstDay)%7]));a("body").append(r)}e.trigger&&(t=a("").attr("href","#").addClass(p.trigger).click(function(a){e.toggle?i.toggle():i.show();return a.preventDefault()}).insertAfter(d));var L=r.find("#"+p.weeks);I=r.find("#"+p.year),H=r.find("#"+p.month);function M(b,c,e){z=b,w=b.getFullYear(),x=b.getMonth(),y=b.getDate(),e||(e=a.Event("api")),e.type=="click"&&!a.browser.msie&&d.focus(),e.type="beforeChange",G.trigger(e,[b]);e.isDefaultPrevented()||(d.val(k(c.formatter,b,c.format,c.lang)),e.type="change",G.trigger(e),d.data("date",b),i.hide(e))}function N(b){b.type="onShow",G.trigger(b),a(document).on("keydown.d",function(b){if(b.ctrlKey)return!0;var c=b.keyCode;if(c==8||c==46){d.val("");return i.hide(b)}if(c==27||c==9)return i.hide(b);if(a(f).index(c)>=0){if(!C){i.show(b);return b.preventDefault()}var e=a("#"+p.weeks+" a"),g=a("."+p.focus),h=e.index(g);g.removeClass(p.focus);if(c==74||c==40)h+=7;else if(c==75||c==38)h-=7;else if(c==76||c==39)h+=1;else if(c==72||c==37)h-=1;h>41?(i.addMonth(),g=a("#"+p.weeks+" a:eq("+(h-42)+")")):h<0?(i.addMonth(-1),g=a("#"+p.weeks+" a:eq("+(h+42)+")")):g=e.eq(h),g.addClass(p.focus);return b.preventDefault()}if(c==34)return i.addMonth();if(c==33)return i.addMonth(-1);if(c==36)return i.today();c==13&&(a(b.target).is("select")||a("."+p.focus).click());return a([16,17,18,9]).index(c)>=0}),a(document).on("click.d",function(b){var c=b.target;!a(c).parents("#"+p.root).length&&c!=d[0]&&(!t||c!=t[0])&&i.hide(b)})}a.extend(i,{show:function(b){if(!(d.attr("readonly")||d.attr("disabled")||C)){b=b||a.Event(),b.type="onBeforeShow",G.trigger(b);if(b.isDefaultPrevented())return;a.each(c,function(){this.hide()}),C=!0,H.off("change").change(function(){i.setValue(l(I.val()),l(a(this).val()))}),I.off("change").change(function(){i.setValue(l(a(this).val()),l(H.val()))}),u=r.find("#"+p.prev).off("click").click(function(a){u.hasClass(p.disabled)||i.addMonth(-1);return!1}),v=r.find("#"+p.next).off("click").click(function(a){v.hasClass(p.disabled)||i.addMonth();return!1}),i.setValue(z);var f=d.offset();/iPad/i.test(navigator.userAgent)&&(f.top-=a(window).scrollTop()),r.css({top:f.top+d.outerHeight({margins:!0})+e.offset[0],left:f.left+e.offset[1]}),e.speed?r.show(e.speed,function(){N(b)}):(r.show(),N(b));return i}},setValue:function(c,d,f){var g=l(d)>=-1?new Date(l(c),l(d),l(f==b||isNaN(f)?1:f)):c||z;gB&&(g=B),typeof c=="string"&&(g=n(c)),c=g.getFullYear(),d=g.getMonth(),f=g.getDate(),d==-1?(d=11,c--):d==12&&(d=0,c++);if(!C){M(g,e);return i}x=d,w=c,y=f;var k=new Date(c,d,1-e.firstDay),o=k.getDay(),r=h(c,d),t=h(c,d-1),D;if(e.selectors){H.empty(),a.each(q.months,function(b,d){Anew Date(c,b,0)&&H.append(a(""),G%7===0&&(D=a("
").addClass(p.week),L.append(D)),GB&&J.add(v).addClass(p.disabled),J.attr("href","#"+K).text(K).data("date",g),D.append(J);L.find("a").click(function(b){var c=a(this);c.hasClass(p.disabled)||(a("#"+p.current).removeAttr("id"),c.attr("id",p.current),M(c.data("date"),e,b));return!1}),p.sunday&&L.find("."+p.week).each(function(){var b=e.firstDay?7-e.firstDay:0;a(this).children().slice(b,b+1).addClass(p.sunday)});return i},setMin:function(a,b){A=n(a),b&&zB&&i.setValue(B);return i},today:function(){return i.setValue(j)},addDay:function(a){return this.setValue(w,x,y+(a||1))},addMonth:function(a){var b=x+(a||1),c=h(w,b),d=y<=c?y:c;return this.setValue(w,b,d)},addYear:function(a){return this.setValue(w+(a||1),x,y)},destroy:function(){d.add(document).off("click.d keydown.d"),r.add(t).remove(),d.removeData("dateinput").removeClass(p.input),D&&d.replaceWith(D)},hide:function(b){if(C){b=a.Event(),b.type="onHide",G.trigger(b);if(b.isDefaultPrevented())return;a(document).off("click.d keydown.d"),r.hide(),C=!1}return i},toggle:function(){return i.isOpen()?i.hide():i.show()},getConf:function(){return e},getInput:function(){return d},getCalendar:function(){return r},getValue:function(a){return a?k(e.formatter,z,a,e.lang):z},isOpen:function(){return C}}),a.each(["onBeforeShow","onShow","change","onHide"],function(b,c){a.isFunction(e[c])&&a(i).on(c,e[c]),i[c]=function(b){b&&a(i).on(c,b);return i}}),e.editable||d.on("focus.d click.d",i.show).keydown(function(b){var c=b.keyCode;if(C||a(f).index(c)<0)(c==8||c==46)&&d.val("");else{i.show(b);return b.preventDefault()}return b.shiftKey||b.ctrlKey||b.altKey||c==9?!0:b.preventDefault()}),n(d.val())&&M(z,e)}a.expr[":"].date=function(b){var c=b.getAttribute("type");return c&&c=="date"||a(b).data("dateinput")},a.fn.dateinput=function(b){if(this.data("dateinput"))return this;b=a.extend(!0,{},e.conf,b),a.each(b.css,function(a,c){!c&&a!="prefix"&&(b.css[a]=(b.css.prefix||"")+(c||a))});var d;this.each(function(){var e=new o(a(this),b);c.push(e);var f=e.getInput().data("dateinput",e);d=d?d.add(f):f});return d?d:this}})(jQuery); (function(a){a.tools=a.tools||{version:"v1.2.7"},a.tools.overlay={addEffect:function(a,b,d){c[a]=[b,d]},conf:{close:null,closeOnClick:!0,closeOnEsc:!0,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:!1,mask:null,oneInstance:!0,speed:"normal",target:null,top:"10%"}};var b=[],c={};a.tools.overlay.addEffect("default",function(b,c){var d=this.getConf(),e=a(window);d.fixed||(b.top+=e.scrollTop(),b.left+=e.scrollLeft()),b.position=d.fixed?"fixed":"absolute",this.getOverlay().css(b).fadeIn(d.speed,c)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)});function d(d,e){var f=this,g=d.add(f),h=a(window),i,j,k,l=a.tools.expose&&(e.mask||e.expose),m=Math.random().toString().slice(10);l&&(typeof l=="string"&&(l={color:l}),l.closeOnClick=l.closeOnEsc=!1);var n=e.target||d.attr("rel");j=n?a(n):null||d;if(!j.length)throw"Could not find Overlay: "+n;d&&d.index(j)==-1&&d.click(function(a){f.load(a);return a.preventDefault()}),a.extend(f,{load:function(d){if(f.isOpened())return f;var i=c[e.effect];if(!i)throw"Overlay: cannot find effect : \""+e.effect+"\"";e.oneInstance&&a.each(b,function(){this.close(d)}),d=d||a.Event(),d.type="onBeforeLoad",g.trigger(d);if(d.isDefaultPrevented())return f;k=!0,l&&a(j).expose(l);var n=e.top,o=e.left,p=j.outerWidth({margin:!0}),q=j.outerHeight({margin:!0});typeof n=="string"&&(n=n=="center"?Math.max((h.height()-q)/2,0):parseInt(n,10)/100*h.height()),o=="center"&&(o=Math.max((h.width()-p)/2,0)),i[0].call(f,{top:n,left:o},function(){k&&(d.type="onLoad",g.trigger(d))}),l&&e.closeOnClick&&a.mask.getMask().one("click",f.close),e.closeOnClick&&a(document).on("click."+m,function(b){a(b.target).parents(j).length||f.close(b)}),e.closeOnEsc&&a(document).on("keydown."+m,function(a){a.keyCode==27&&f.close(a)});return f},close:function(b){if(!f.isOpened())return f;b=b||a.Event(),b.type="onBeforeClose",g.trigger(b);if(!b.isDefaultPrevented()){k=!1,c[e.effect][1].call(f,function(){b.type="onClose",g.trigger(b)}),a(document).off("click."+m+" keydown."+m),l&&a.mask.close();return f}},getOverlay:function(){return j},getTrigger:function(){return d},getClosers:function(){return i},isOpened:function(){return k},getConf:function(){return e}}),a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(b,c){a.isFunction(e[c])&&a(f).on(c,e[c]),f[c]=function(b){b&&a(f).on(c,b);return f}}),i=j.find(e.close||".close"),!i.length&&!e.close&&(i=a(""),j.prepend(i)),i.click(function(a){f.close(a)}),e.load&&f.load()}a.fn.overlay=function(c){var e=this.data("overlay");if(e)return e;a.isFunction(c)&&(c={onBeforeLoad:c}),c=a.extend(!0,{},a.tools.overlay.conf,c),this.each(function(){e=new d(a(this),c),b.push(e),a(this).data("overlay",e)});return c.api?e:this}})(jQuery); (function(a){var b=a.tools.overlay,c=a(window);a.extend(b.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});function d(a){var b=a.offset();return{top:b.top+a.height()/2,left:b.left+a.width()/2}}var e=function(b,e){var f=this.getOverlay(),g=this.getConf(),h=this.getTrigger(),i=this,j=f.outerWidth({margin:!0}),k=f.data("img"),l=g.fixed?"fixed":"absolute";if(!k){var m=f.css("backgroundImage");if(!m)throw"background-image CSS property not set for overlay";m=m.slice(m.indexOf("(")+1,m.indexOf(")")).replace(/\"/g,""),f.css("backgroundImage","none"),k=a(""),k.css({border:0,display:"none"}).width(j),a("body").append(k),f.data("img",k)}var n=g.start.top||Math.round(c.height()/2),o=g.start.left||Math.round(c.width()/2);if(h){var p=d(h);n=p.top,o=p.left}g.fixed?(n-=c.scrollTop(),o-=c.scrollLeft()):(b.top+=c.scrollTop(),b.left+=c.scrollLeft()),k.css({position:"absolute",top:n,left:o,width:0,zIndex:g.zIndex}).show(),b.position=l,f.css(b),k.animate({top:b.top,left:b.left,width:j},g.speed,function(){f.css("zIndex",g.zIndex+1).fadeIn(g.fadeInSpeed,function(){i.isOpened()&&!a(this).index(f)?e.call():f.hide()})}).css("position",l)},f=function(b){var e=this.getOverlay().hide(),f=this.getConf(),g=this.getTrigger(),h=e.data("img"),i={top:f.start.top,left:f.start.left,width:0};g&&a.extend(i,d(g)),f.fixed&&h.css({position:"absolute"}).animate({top:"+="+c.scrollTop(),left:"+="+c.scrollLeft()},0),h.animate(i,f.closeSpeed,b)};b.addEffect("apple",e,f)})(jQuery); (function(a){a.tools=a.tools||{version:"v1.2.7"};var b;b=a.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:undefined,vertical:0,keyboard:!0,progress:!1,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var c,d;a.fn.drag=function(b){document.ondragstart=function(){return!1},b=a.extend({x:!0,y:!0,drag:!0},b),c=c||a(document).on("mousedown mouseup",function(e){var f=a(e.target);if(e.type=="mousedown"&&f.data("drag")){var g=f.position(),h=e.pageX-g.left,i=e.pageY-g.top,j=!0;c.on("mousemove.drag",function(a){var c=a.pageX-h,e=a.pageY-i,g={};b.x&&(g.left=c),b.y&&(g.top=e),j&&(f.trigger("dragStart"),j=!1),b.drag&&f.css(g),f.trigger("drag",[e,c]),d=f}),e.preventDefault()}else try{d&&d.trigger("dragEnd")}finally{c.off("mousemove.drag"),d=null}});return this.data("drag",!0)};function e(a,b){var c=Math.pow(10,b);return Math.round(a*c)/c}function f(a,b){var c=parseInt(a.css(b),10);if(c)return c;var d=a[0].currentStyle;return d&&d.width&&parseInt(d.width,10)}function g(a){var b=a.data("events");return b&&b.onSlide}function h(b,c){var d=this,h=c.css,i=a("
").data("rangeinput",d),j,k,l,m,n;b.before(i);var o=i.addClass(h.slider).find("a").addClass(h.handle),p=i.find("div").addClass(h.progress);a.each("min,max,step,value".split(","),function(a,d){var e=b.attr(d);parseFloat(e)&&(c[d]=parseFloat(e,10))});var q=c.max-c.min,r=c.step=="any"?0:c.step,s=c.precision;s===undefined&&(s=r.toString().split("."),s=s.length===2?s[1].length:0);if(b.attr("type")=="range"){var t=b.clone().wrap("
").parent().html(),u=a(t.replace(/type/i,"type=text data-orig-type"));u.val(c.value),b.replaceWith(u),b=u}b.addClass(h.input);var v=a(d).add(b),w=!0;function x(a,f,g,h){g===undefined?g=f/m*q:h&&(g-=c.min),r&&(g=Math.round(g/r)*r);if(f===undefined||r)f=g*m/q;if(isNaN(g))return d;f=Math.max(0,Math.min(f,m)),g=f/m*q;if(h||!j)g+=c.min;j&&(h?f=m-f:g=c.max-g),g=e(g,s);var i=a.type=="click";if(w&&k!==undefined&&!i){a.type="onSlide",v.trigger(a,[g,f]);if(a.isDefaultPrevented())return d}var l=i?c.speed:0,t=i?function(){a.type="change",v.trigger(a,[g])}:null;j?(o.animate({top:f},l,t),c.progress&&p.animate({height:m-f+o.height()/2},l)):(o.animate({left:f},l,t),c.progress&&p.animate({width:f+o.width()/2},l)),k=g,n=f,b.val(g);return d}a.extend(d,{getValue:function(){return k},setValue:function(b,c){y();return x(c||a.Event("api"),undefined,b,!0)},getConf:function(){return c},getProgress:function(){return p},getHandle:function(){return o},getInput:function(){return b},step:function(b,e){e=e||a.Event();var f=c.step=="any"?1:c.step;d.setValue(k+f*(b||1),e)},stepUp:function(a){return d.step(a||1)},stepDown:function(a){return d.step(-a||-1)}}),a.each("onSlide,change".split(","),function(b,e){a.isFunction(c[e])&&a(d).on(e,c[e]),d[e]=function(b){b&&a(d).on(e,b);return d}}),o.drag({drag:!1}).on("dragStart",function(){y(),w=g(a(d))||g(b)}).on("drag",function(a,c,d){if(b.is(":disabled"))return!1;x(a,j?c:d)}).on("dragEnd",function(a){a.isDefaultPrevented()||(a.type="change",v.trigger(a,[k]))}).click(function(a){return a.preventDefault()}),i.click(function(a){if(b.is(":disabled")||a.target==o[0])return a.preventDefault();y();var c=j?o.height()/2:o.width()/2;x(a,j?m-l-c+a.pageY:a.pageX-l-c)}),c.keyboard&&b.keydown(function(c){if(!b.attr("readonly")){var e=c.keyCode,f=a([75,76,38,33,39]).index(e)!=-1,g=a([74,72,40,34,37]).index(e)!=-1;if((f||g)&&!(c.shiftKey||c.altKey||c.ctrlKey)){f?d.step(e==33?10:1,c):g&&d.step(e==34?-10:-1,c);return c.preventDefault()}}}),b.blur(function(b){var c=a(this).val();c!==k&&d.setValue(c,b)}),a.extend(b[0],{stepUp:d.stepUp,stepDown:d.stepDown});function y(){j=c.vertical||f(i,"height")>f(i,"width"),j?(m=f(i,"height")-f(o,"height"),l=i.offset().top+m):(m=f(i,"width")-f(o,"width"),l=i.offset().left)}function z(){y(),d.setValue(c.value!==undefined?c.value:c.min)}z(),m||a(window).load(z)}a.expr[":"].range=function(b){var c=b.getAttribute("type");return c&&c=="range"||a(b).filter("input").data("rangeinput")},a.fn.rangeinput=function(c){if(this.data("rangeinput"))return this;c=a.extend(!0,{},b.conf,c);var d;this.each(function(){var b=new h(a(this),a.extend(!0,{},c)),e=b.getInput().data("rangeinput",b);d=d?d.add(e):e});return d?d:this}})(jQuery); (function(a){a.tools=a.tools||{version:"v1.2.7"},a.tools.scrollable={conf:{activeClass:"active",circular:!1,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:"> *",items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",size:1,speed:400,vertical:!1,touch:!0,wheelSpeed:0}};function b(a,b){var c=parseInt(a.css(b),10);if(c)return c;var d=a[0].currentStyle;return d&&d.width&&parseInt(d.width,10)}function c(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}var d;function e(b,e){var f=this,g=b.add(f),h=b.children(),i=0,j=e.vertical;d||(d=f),h.length>1&&(h=a(e.items,b)),e.size>1&&(e.circular=!1),a.extend(f,{getConf:function(){return e},getIndex:function(){return i},getSize:function(){return f.getItems().size()},getNaviButtons:function(){return n.add(o)},getRoot:function(){return b},getItemWrap:function(){return h},getItems:function(){return h.find(e.item).not("."+e.clonedClass)},move:function(a,b){return f.seekTo(i+a,b)},next:function(a){return f.move(e.size,a)},prev:function(a){return f.move(-e.size,a)},begin:function(a){return f.seekTo(0,a)},end:function(a){return f.seekTo(f.getSize()-1,a)},focus:function(){d=f;return f},addItem:function(b){b=a(b),e.circular?(h.children().last().before(b),h.children().first().replaceWith(b.clone().addClass(e.clonedClass))):(h.append(b),o.removeClass("disabled")),g.trigger("onAddItem",[b]);return f},seekTo:function(b,c,k){b.jquery||(b*=1);if(e.circular&&b===0&&i==-1&&c!==0)return f;if(!e.circular&&b<0||b>f.getSize()||b<-1)return f;var l=b;b.jquery?b=f.getItems().index(b):l=f.getItems().eq(b);var m=a.Event("onBeforeSeek");if(!k){g.trigger(m,[b,c]);if(m.isDefaultPrevented()||!l.length)return f}var n=j?{top:-l.position().top}:{left:-l.position().left};i=b,d=f,c===undefined&&(c=e.speed),h.animate(n,c,e.easing,k||function(){g.trigger("onSeek",[b])});return f}}),a.each(["onBeforeSeek","onSeek","onAddItem"],function(b,c){a.isFunction(e[c])&&a(f).on(c,e[c]),f[c]=function(b){b&&a(f).on(c,b);return f}});if(e.circular){var k=f.getItems().slice(-1).clone().prependTo(h),l=f.getItems().eq(1).clone().appendTo(h);k.add(l).addClass(e.clonedClass),f.onBeforeSeek(function(a,b,c){if(!a.isDefaultPrevented()){if(b==-1){f.seekTo(k,c,function(){f.end(0)});return a.preventDefault()}b==f.getSize()&&f.seekTo(l,c,function(){f.begin(0)})}});var m=b.parents().add(b).filter(function(){if(a(this).css("display")==="none")return!0});m.length?(m.show(),f.seekTo(0,0,function(){}),m.hide()):f.seekTo(0,0,function(){})}var n=c(b,e.prev).click(function(a){a.stopPropagation(),f.prev()}),o=c(b,e.next).click(function(a){a.stopPropagation(),f.next()});e.circular||(f.onBeforeSeek(function(a,b){setTimeout(function(){a.isDefaultPrevented()||(n.toggleClass(e.disabledClass,b<=0),o.toggleClass(e.disabledClass,b>=f.getSize()-1))},1)}),e.initialIndex||n.addClass(e.disabledClass)),f.getSize()<2&&n.add(o).addClass(e.disabledClass),e.mousewheel&&a.fn.mousewheel&&b.mousewheel(function(a,b){if(e.mousewheel){f.move(b<0?1:-1,e.wheelSpeed||50);return!1}});if(e.touch){var p={};h[0].ontouchstart=function(a){var b=a.touches[0];p.x=b.clientX,p.y=b.clientY},h[0].ontouchmove=function(a){if(a.touches.length==1&&!h.is(":animated")){var b=a.touches[0],c=p.x-b.clientX,d=p.y-b.clientY;f[j&&d>0||!j&&c>0?"next":"prev"](),a.preventDefault()}}}e.keyboard&&a(document).on("keydown.scrollable",function(b){if(!(!e.keyboard||b.altKey||b.ctrlKey||b.metaKey||a(b.target).is(":input"))){if(e.keyboard!="static"&&d!=f)return;var c=b.keyCode;if(j&&(c==38||c==40)){f.move(c==38?-1:1);return b.preventDefault()}if(!j&&(c==37||c==39)){f.move(c==37?-1:1);return b.preventDefault()}}}),e.initialIndex&&f.seekTo(e.initialIndex,0,function(){})}a.fn.scrollable=function(b){var c=this.data("scrollable");if(c)return c;b=a.extend({},a.tools.scrollable.conf,b),this.each(function(){c=new e(a(this),b),a(this).data("scrollable",c)});return b.api?c:this}})(jQuery); (function(a){var b=a.tools.scrollable;b.autoscroll={conf:{autoplay:!0,interval:3e3,autopause:!0}},a.fn.autoscroll=function(c){typeof c=="number"&&(c={interval:c});var d=a.extend({},b.autoscroll.conf,c),e;this.each(function(){var b=a(this).data("scrollable"),c=b.getRoot(),f,g=!1;function h(){f&&clearTimeout(f),f=setTimeout(function(){b.next()},d.interval)}b&&(e=b),b.play=function(){f||(g=!1,c.on("onSeek",h),h())},b.pause=function(){f=clearTimeout(f),c.off("onSeek",h)},b.resume=function(){g||b.play()},b.stop=function(){g=!0,b.pause()},d.autopause&&c.add(b.getNaviButtons()).hover(b.pause,b.resume),d.autoplay&&b.play()});return d.api?e:this}})(jQuery); (function(a){var b=a.tools.scrollable;b.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,idPrefix:null,history:!1}};function c(b,c){var d=a(c);return d.length<2?d:b.parent().find(c)}a.fn.navigator=function(d){typeof d=="string"&&(d={navi:d}),d=a.extend({},b.navigator.conf,d);var e;this.each(function(){var b=a(this).data("scrollable"),f=d.navi.jquery?d.navi:c(b.getRoot(),d.navi),g=b.getNaviButtons(),h=d.activeClass,i=d.history&&history.pushState,j=b.getConf().size;b&&(e=b),b.getNaviButtons=function(){return g.add(f)},i&&(history.pushState({i:0},""),a(window).on("popstate",function(a){var c=a.originalEvent.state;c&&b.seekTo(c.i)}));function k(a,c,d){b.seekTo(c),d.preventDefault(),i&&history.pushState({i:c},"")}function l(){return f.find(d.naviItem||"> *")}function m(b){var c=a("<"+(d.naviItem||"a")+"/>").click(function(c){k(a(this),b,c)});b===0&&c.addClass(h),d.indexed&&c.text(b+1),d.idPrefix&&c.attr("id",d.idPrefix+b);return c.appendTo(f)}l().length?l().each(function(b){a(this).click(function(c){k(a(this),b,c)})}):a.each(b.getItems(),function(a){a%j==0&&m(a)}),b.onBeforeSeek(function(a,b){setTimeout(function(){if(!a.isDefaultPrevented()){var c=b/j,d=l().eq(c);d.length&&l().removeClass(h).eq(c).addClass(h)}},1)}),b.onAddItem(function(a,c){var d=b.getItems().index(c);d%j==0&&m(d)})});return d.api?e:this}})(jQuery); (function(a){a.tools=a.tools||{version:"v1.2.7"},a.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialEffect:!1,initialIndex:0,event:"click",rotate:!1,slideUpSpeed:400,slideDownSpeed:400,history:!1},addEffect:function(a,c){b[a]=c}};var b={"default":function(a,b){this.getPanes().hide().eq(a).show(),b.call()},fade:function(a,b){var c=this.getConf(),d=c.fadeOutSpeed,e=this.getPanes();d?e.fadeOut(d):e.hide(),e.eq(a).fadeIn(c.fadeInSpeed,b)},slide:function(a,b){var c=this.getConf();this.getPanes().slideUp(c.slideUpSpeed),this.getPanes().eq(a).slideDown(c.slideDownSpeed,b)},ajax:function(a,b){this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"),b)}},c,d;a.tools.tabs.addEffect("horizontal",function(b,e){if(!c){var f=this.getPanes().eq(b),g=this.getCurrentPane();d||(d=this.getPanes().eq(0).width()),c=!0,f.show(),g.animate({width:0},{step:function(a){f.css("width",d-a)},complete:function(){a(this).hide(),e.call(),c=!1}}),g.length||(e.call(),c=!1)}});function e(c,d,e){var f=this,g=c.add(this),h=c.find(e.tabs),i=d.jquery?d:c.children(d),j;h.length||(h=c.children()),i.length||(i=c.parent().find(d)),i.length||(i=a(d)),a.extend(this,{click:function(d,i){var k=h.eq(d),l=!c.data("tabs");typeof d=="string"&&d.replace("#","")&&(k=h.filter("[href*=\""+d.replace("#","")+"\"]"),d=Math.max(h.index(k),0));if(e.rotate){var m=h.length-1;if(d<0)return f.click(m,i);if(d>m)return f.click(0,i)}if(!k.length){if(j>=0)return f;d=e.initialIndex,k=h.eq(d)}if(d===j)return f;i=i||a.Event(),i.type="onBeforeClick",g.trigger(i,[d]);if(!i.isDefaultPrevented()){var n=l?e.initialEffect&&e.effect||"default":e.effect;b[n].call(f,d,function(){j=d,i.type="onClick",g.trigger(i,[d])}),h.removeClass(e.current),k.addClass(e.current);return f}},getConf:function(){return e},getTabs:function(){return h},getPanes:function(){return i},getCurrentPane:function(){return i.eq(j)},getCurrentTab:function(){return h.eq(j)},getIndex:function(){return j},next:function(){return f.click(j+1)},prev:function(){return f.click(j-1)},destroy:function(){h.off(e.event).removeClass(e.current),i.find("a[href^=\"#\"]").off("click.T");return f}}),a.each("onBeforeClick,onClick".split(","),function(b,c){a.isFunction(e[c])&&a(f).on(c,e[c]),f[c]=function(b){b&&a(f).on(c,b);return f}}),e.history&&a.fn.history&&(a.tools.history.init(h),e.event="history"),h.each(function(b){a(this).on(e.event,function(a){f.click(b,a);return a.preventDefault()})}),i.find("a[href^=\"#\"]").on("click.T",function(b){f.click(a(this).attr("href"),b)}),location.hash&&e.tabs=="a"&&c.find("[href=\""+location.hash+"\"]").length?f.click(location.hash):(e.initialIndex===0||e.initialIndex>0)&&f.click(e.initialIndex)}a.fn.tabs=function(b,c){var d=this.data("tabs");d&&(d.destroy(),this.removeData("tabs")),a.isFunction(c)&&(c={onBeforeClick:c}),c=a.extend({},a.tools.tabs.conf,c),this.each(function(){d=new e(a(this),b,c),a(this).data("tabs",d)});return c.api?d:this}})(jQuery); (function(a){var b;b=a.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:!1,autopause:!0,interval:3e3,clickable:!0,api:!1}};function c(b,c){var d=this,e=b.add(this),f=b.data("tabs"),g,h=!0;function i(c){var d=a(c);return d.length<2?d:b.parent().find(c)}var j=i(c.next).click(function(){f.next()}),k=i(c.prev).click(function(){f.prev()});function l(){g=setTimeout(function(){f.next()},c.interval)}a.extend(d,{getTabs:function(){return f},getConf:function(){return c},play:function(){if(g)return d;var b=a.Event("onBeforePlay");e.trigger(b);if(b.isDefaultPrevented())return d;h=!1,e.trigger("onPlay"),e.on("onClick",l),l();return d},pause:function(){if(!g)return d;var b=a.Event("onBeforePause");e.trigger(b);if(b.isDefaultPrevented())return d;g=clearTimeout(g),e.trigger("onPause"),e.off("onClick",l);return d},resume:function(){h||d.play()},stop:function(){d.pause(),h=!0}}),a.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","),function(b,e){a.isFunction(c[e])&&a(d).on(e,c[e]),d[e]=function(b){return a(d).on(e,b)}}),c.autopause&&f.getTabs().add(j).add(k).add(f.getPanes()).hover(d.pause,d.resume),c.autoplay&&d.play(),c.clickable&&f.getPanes().click(function(){f.next()});if(!f.getConf().rotate){var m=c.disabledClass;f.getIndex()||k.addClass(m),f.onBeforeClick(function(a,b){k.toggleClass(m,!b),j.toggleClass(m,b==f.getTabs().length-1)})}}a.fn.slideshow=function(d){var e=this.data("slideshow");if(e)return e;d=a.extend({},b.conf,d),this.each(function(){e=new c(a(this),d),a(this).data("slideshow",e)});return d.api?e:this}})(jQuery); (function(a){a.tools=a.tools||{version:"v1.2.7"};var b;b=a.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:!0,closeOnEsc:!0,zIndex:9998,opacity:.8,startOpacity:0,color:"#fff",onLoad:null,onClose:null}};function c(){if(a.browser.msie){var b=a(document).height(),c=a(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,b-c<20?c:b]}return[a(document).width(),a(document).height()]}function d(b){if(b)return b.call(a.mask)}var e,f,g,h,i;a.mask={load:function(j,k){if(g)return this;typeof j=="string"&&(j={color:j}),j=j||h,h=j=a.extend(a.extend({},b.conf),j),e=a("#"+j.maskId),e.length||(e=a("
").attr("id",j.maskId),a("body").append(e));var l=c();e.css({position:"absolute",top:0,left:0,width:l[0],height:l[1],display:"none",opacity:j.startOpacity,zIndex:j.zIndex}),j.color&&e.css("backgroundColor",j.color);if(d(j.onBeforeLoad)===!1)return this;j.closeOnEsc&&a(document).on("keydown.mask",function(b){b.keyCode==27&&a.mask.close(b)}),j.closeOnClick&&e.on("click.mask",function(b){a.mask.close(b)}),a(window).on("resize.mask",function(){a.mask.fit()}),k&&k.length&&(i=k.eq(0).css("zIndex"),a.each(k,function(){var b=a(this);/relative|absolute|fixed/i.test(b.css("position"))||b.css("position","relative")}),f=k.css({zIndex:Math.max(j.zIndex+1,i=="auto"?0:i)})),e.css({display:"block"}).fadeTo(j.loadSpeed,j.opacity,function(){a.mask.fit(),d(j.onLoad),g="full"}),g=!0;return this},close:function(){if(g){if(d(h.onBeforeClose)===!1)return this;e.fadeOut(h.closeSpeed,function(){d(h.onClose),f&&f.css({zIndex:i}),g=!1}),a(document).off("keydown.mask"),e.off("click.mask"),a(window).off("resize.mask")}return this},fit:function(){if(g){var a=c();e.css({width:a[0],height:a[1]})}},getMask:function(){return e},isLoaded:function(a){return a?g=="full":g},getConf:function(){return h},getExposed:function(){return f}},a.fn.mask=function(b){a.mask.load(b);return this},a.fn.expose=function(b){a.mask.load(b,this);return this}})(jQuery); (function(){var a=document.all,b="http://www.adobe.com/go/getflashplayer",c=typeof jQuery=="function",d=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,e={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:!0,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:!1,cachebusting:!1};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){},__flash_savedUnloadHandler=function(){}});function f(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function g(a,b){var c=[];for(var d in a)a.hasOwnProperty(d)&&(c[d]=b(a[d]));return c}window.flashembed=function(a,b,c){typeof a=="string"&&(a=document.getElementById(a.replace("#","")));if(a){typeof b=="string"&&(b={src:b});return new j(a,f(f({},e),b),c)}};var h=f(window.flashembed,{conf:e,getVersion:function(){var a,b;try{b=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(c){try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),b=a&&a.GetVariable("$version")}catch(e){try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),b=a&&a.GetVariable("$version")}catch(f){}}}b=d.exec(b);return b?[b[1],b[3]]:[0,0]},asString:function(a){if(a===null||a===undefined)return null;var b=typeof a;b=="object"&&a.push&&(b="array");switch(b){case"string":a=a.replace(new RegExp("([\"\\\\])","g"),"\\$1"),a=a.replace(/^\s?(\d+\.?\d*)%/,"$1pct");return"\""+a+"\"";case"array":return"["+g(a,function(a){return h.asString(a)}).join(",")+"]";case"function":return"\"function()\"";case"object":var c=[];for(var d in a)a.hasOwnProperty(d)&&c.push("\""+d+"\":"+h.asString(a[d]));return"{"+c.join(",")+"}"}return String(a).replace(/\s/g," ").replace(/\'/g,"\"")},getHTML:function(b,c){b=f({},b);var d="";if(b.w3c||a)d+="";b.width=b.height=b.id=b.w3c=b.src=null,b.onFail=b.version=b.expressInstall=null;for(var e in b)b[e]&&(d+="");var g="";if(c){for(var i in c)if(c[i]){var j=c[i];g+=i+"="+encodeURIComponent(/function|object/.test(typeof j)?h.asString(j):j)+"&"}g=g.slice(0,-1),d+=""}d+="";return d},isSupported:function(a){return i[0]>a[0]||i[0]==a[0]&&i[1]>=a[1]}}),i=h.getVersion();function j(c,d,e){if(h.isSupported(d.version))c.innerHTML=h.getHTML(d,e);else if(d.expressInstall&&h.isSupported([6,65]))c.innerHTML=h.getHTML(f(d,{src:d.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title});else{c.innerHTML.replace(/\s/g,"")||(c.innerHTML="

Flash version "+d.version+" or greater is required

"+(i[0]>0?"Your version is "+i:"You have no flash plugin installed")+"

"+(c.tagName=="A"?"

Click here to download latest version

":"

Download latest version from here

"),c.tagName=="A"&&(c.onclick=function(){location.href=b}));if(d.onFail){var g=d.onFail.call(this);typeof g=="string"&&(c.innerHTML=g)}}a&&(window[d.id]=document.getElementById(d.id)),f(this,{getRoot:function(){return c},getOptions:function(){return d},getConf:function(){return e},getApi:function(){return c.firstChild}})}c&&(jQuery.tools=jQuery.tools||{version:"v1.2.7"},jQuery.tools.flashembed={conf:e},jQuery.fn.flashembed=function(a,b){return this.each(function(){jQuery(this).data("flashembed",flashembed(this,a,b))})})})(); (function(a){a.fn.mousewheel=function(a){return this[a?"on":"trigger"]("wheel",a)},a.event.special.wheel={setup:function(){a.event.add(this,b,c,{})},teardown:function(){a.event.remove(this,b,c)}};var b=a.browser.mozilla?"DOMMouseScroll"+(a.browser.version<"1.9"?" mousemove":""):"mousewheel";function c(b){switch(b.type){case"mousemove":return a.extend(b.data,{clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY});case"DOMMouseScroll":a.extend(b,b.data),b.delta=-b.detail/3;break;case"mousewheel":b.delta=b.wheelDelta/120}b.type="wheel";return a.event.handle.call(this,b,b.delta)}})(jQuery); (function(a){a.tools=a.tools||{version:"v1.2.7"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"
",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getConf(),c=this.getTip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeTo(c.fadeInSpeed,c.opacity,b):(this.getTip().show(),b())},function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeOut(c.fadeOutSpeed,b):(this.getTip().hide(),b())}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var h=c.outerHeight()+b.outerHeight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerWidth()+b.outerWidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"Nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"Tooltip: bad events configuration for "+q;d.on(r[0],function(a){clearTimeout(i),e.predelay?j=setTimeout(function(){f.show(a)},e.predelay):f.show(a)}).on(r[1],function(a){clearTimeout(j),e.delay?i=setTimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"Cannot find tooltip for "+d}if(f.isShown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=a.Event(),b.type="onBeforeShow",g.trigger(b,[o]);if(b.isDefaultPrevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onShow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.off(p[0]).on(p[0],function(){clearTimeout(i),clearTimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.off(p[1]).on(p[1],function(a){a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),e.tip||h.data("__set",!0));return f},hide:function(c){if(!h||!f.isShown())return f;c=a.Event(),c.type="onBeforeHide",g.trigger(c);if(!c.isDefaultPrevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onHide",g.trigger(c)});return f}},isShown:function(a){return a?n=="full":n},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return d}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){a.isFunction(e[c])&&a(f).on(c,e[c]),f[c]=function(b){b&&a(f).on(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jQuery); (function(a){var b=a.tools.tooltip;b.dynamic={conf:{classNames:"top right bottom left"}};function c(b){var c=a(window),d=c.width()+c.scrollLeft(),e=c.height()+c.scrollTop();return[b.offset().top<=c.scrollTop(),d<=b.offset().left+b.width(),e<=b.offset().top+b.height(),c.scrollLeft()>=b.offset().left]}function d(a){var b=a.length;while(b--)if(a[b])return!1;return!0}a.fn.dynamic=function(e){typeof e=="number"&&(e={speed:e}),e=a.extend({},b.dynamic.conf,e);var f=a.extend(!0,{},e),g=e.classNames.split(/\s/),h;this.each(function(){var b=a(this).tooltip().onBeforeShow(function(b,e){var i=this.getTip(),j=this.getConf();h||(h=[j.position[0],j.position[1],j.offset[0],j.offset[1],a.extend({},j)]),a.extend(j,h[4]),j.position=[h[0],h[1]],j.offset=[h[2],h[3]],i.css({visibility:"hidden",position:"absolute",top:e.top,left:e.left}).show();var k=a.extend(!0,{},f),l=c(i);if(!d(l)){l[2]&&(a.extend(j,k.top),j.position[0]="top",i.addClass(g[0])),l[3]&&(a.extend(j,k.right),j.position[1]="right",i.addClass(g[1])),l[0]&&(a.extend(j,k.bottom),j.position[0]="bottom",i.addClass(g[2])),l[1]&&(a.extend(j,k.left),j.position[1]="left",i.addClass(g[3]));if(l[0]||l[2])j.offset[0]*=-1;if(l[1]||l[3])j.offset[1]*=-1}i.css({visibility:"visible"}).hide()});b.onBeforeShow(function(){var a=this.getConf(),b=this.getTip();setTimeout(function(){a.position=[h[0],h[1]],a.offset=[h[2],h[3]]},0)}),b.onHide(function(){var a=this.getTip();a.removeClass(e.classNames)}),ret=b});return e.api?ret:this}})(jQuery); (function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!a.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addEffect("slide",function(a){var b=this.getConf(),d=this.getTip(),e=b.slideFade?{opacity:b.opacity}:{},f=c[b.direction]||c.up;e[f[1]]=f[0]+"="+b.slideOffset,b.slideFade&&d.css({opacity:0}),d.show().animate(e,b.slideInSpeed,a)},function(b){var d=this.getConf(),e=d.slideOffset,f=d.slideFade?{opacity:0}:{},g=c[d.direction]||c.up,h=""+g[0];d.bounce&&(h=h=="+"?"-":"+"),f[g[1]]=h+"="+e,this.getTip().animate(f,d.slideOutSpeed,function(){a(this).hide(),b.call()})})})(jQuery); (function(a){a.tools=a.tools||{version:"v1.2.7"};var b=/\[type=([a-z]+)\]/,c=/^-?[0-9]*(\.[0-9]+)?$/,d=a.tools.dateinput,e=/^([a-z0-9_\.\-\+]+)@([\da-z\.\-]+)\.([a-z\.]{2,6})$/i,f=/^(https?:\/\/)?[\da-z\.\-]+\.[a-z\.]{2,6}[#&+_\?\/\w \.\-=]*$/i,g;g=a.tools.validator={conf:{grouped:!1,effect:"default",errorClass:"invalid",inputEvent:null,errorInputEvent:"keyup",formEvent:"submit",lang:"en",message:"
",messageAttr:"data-message",messageClass:"error",offset:[0,0],position:"center right",singleError:!1,speed:"normal"},messages:{"*":{en:"Please correct this value"}},localize:function(b,c){a.each(c,function(a,c){g.messages[a]=g.messages[a]||{},g.messages[a][b]=c})},localizeFn:function(b,c){g.messages[b]=g.messages[b]||{},a.extend(g.messages[b],c)},fn:function(c,d,e){a.isFunction(d)?e=d:(typeof d=="string"&&(d={en:d}),this.messages[c.key||c]=d);var f=b.exec(c);f&&(c=i(f[1])),j.push([c,e])},addEffect:function(a,b,c){k[a]=[b,c]}};function h(b,c,d){c=a(c).first()||c;var e=b.offset().top,f=b.offset().left,g=d.position.split(/,?\s+/),h=g[0],i=g[1];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var j=c.outerHeight()+b.outerHeight();h=="center"&&(e+=j/2),h=="bottom"&&(e+=j);var k=b.outerWidth();i=="center"&&(f-=(k+c.outerWidth())/2),i=="left"&&(f-=k);return{top:e,left:f}}function i(a){function b(){return this.getAttribute("type")==a}b.key="[type=\""+a+"\"]";return b}var j=[],k={"default":[function(b){var c=this.getConf();a.each(b,function(b,d){var e=d.input;e.addClass(c.errorClass);var f=e.data("msg.el");f||(f=a(c.message).addClass(c.messageClass).appendTo(document.body),e.data("msg.el",f)),f.css({visibility:"hidden"}).find("p").remove(),a.each(d.messages,function(b,c){a("

").html(c).appendTo(f)}),f.outerWidth()==f.parent().width()&&f.add(f.find("p")).css({display:"inline"});var g=h(e,f,c);f.css({visibility:"visible",position:"absolute",top:g.top,left:g.left}).fadeIn(c.speed)})},function(b){var c=this.getConf();b.removeClass(c.errorClass).each(function(){var b=a(this).data("msg.el");b&&b.css({visibility:"hidden"})})}]};a.each("email,url,number".split(","),function(b,c){a.expr[":"][c]=function(a){return a.getAttribute("type")===c}}),a.fn.oninvalid=function(a){return this[a?"on":"trigger"]("OI",a)},g.fn(":email","Please enter a valid email address",function(a,b){return!b||e.test(b)}),g.fn(":url","Please enter a valid URL",function(a,b){return!b||f.test(b)}),g.fn(":number","Please enter a numeric value.",function(a,b){return c.test(b)}),g.fn("[max]","Please enter a value no larger than $1",function(a,b){if(b===""||d&&a.is(":date"))return!0;var c=a.attr("max");return parseFloat(b)<=parseFloat(c)?!0:[c]}),g.fn("[min]","Please enter a value of at least $1",function(a,b){if(b===""||d&&a.is(":date"))return!0;var c=a.attr("min");return parseFloat(b)>=parseFloat(c)?!0:[c]}),g.fn("[required]","Please complete this mandatory field.",function(a,b){if(a.is(":checkbox"))return a.is(":checked");return b}),g.fn("[pattern]",function(a,b){return b===""||(new RegExp("^"+a.attr("pattern")+"$")).test(b)}),g.fn(":radio","Please select an option.",function(b){var c=!1,d=a("[name='"+b.attr("name")+"']").each(function(b,d){a(d).is(":checked")&&(c=!0)});return c?!0:!1});function l(b,c,e){var f=this,i=c.add(f);b=b.not(":button, :image, :reset, :submit"),c.attr("novalidate","novalidate");function l(b,c,d){if(e.grouped||!b.length){var f;if(d===!1||a.isArray(d)){f=g.messages[c.key||c]||g.messages["*"],f=f[e.lang]||g.messages["*"].en;var h=f.match(/\$\d/g);h&&a.isArray(d)&&a.each(h,function(a){f=f.replace(this,d[a])})}else f=d[e.lang]||d;b.push(f)}}a.extend(f,{getConf:function(){return e},getForm:function(){return c},getInputs:function(){return b},reflow:function(){b.each(function(){var b=a(this),c=b.data("msg.el");if(c){var d=h(b,c,e);c.css({top:d.top,left:d.left})}});return f},invalidate:function(c,d){if(!d){var g=[];a.each(c,function(a,c){var d=b.filter("[name='"+a+"']");d.length&&(d.trigger("OI",[c]),g.push({input:d,messages:[c]}))}),c=g,d=a.Event()}d.type="onFail",i.trigger(d,[c]),d.isDefaultPrevented()||k[e.effect][0].call(f,c,d);return f},reset:function(c){c=c||b,c.removeClass(e.errorClass).each(function(){var b=a(this).data("msg.el");b&&(b.remove(),a(this).data("msg.el",null))}).off(e.errorInputEvent+".v");return f},destroy:function(){c.off(e.formEvent+".V reset.V"),b.off(e.inputEvent+".V change.V");return f.reset()},checkValidity:function(c,g){c=c||b,c=c.not(":disabled");var h={};c=c.filter(function(){var b=a(this).attr("name");if(!h[b]){h[b]=!0;return a(this)}});if(!c.length)return!0;g=g||a.Event(),g.type="onBeforeValidate",i.trigger(g,[c]);if(g.isDefaultPrevented())return g.result;var m=[];c.each(function(){var b=[],c=a(this).data("messages",b),h=d&&c.is(":date")?"onHide.v":e.errorInputEvent+".v";c.off(h),a.each(j,function(){var a=this,d=a[0];if(c.filter(d).length){var h=a[1].call(f,c,c.val());if(h!==!0){g.type="onBeforeFail",i.trigger(g,[c,d]);if(g.isDefaultPrevented())return!1;var j=c.attr(e.messageAttr);if(j){b=[j];return!1}l(b,d,h)}}}),b.length&&(m.push({input:c,messages:b}),c.trigger("OI",[b]),e.errorInputEvent&&c.on(h,function(a){f.checkValidity(c,a)}));if(e.singleError&&m.length)return!1});var n=k[e.effect];if(!n)throw"Validator: cannot find effect \""+e.effect+"\"";if(m.length){f.invalidate(m,g);return!1}n[1].call(f,c,g),g.type="onSuccess",i.trigger(g,[c]),c.off(e.errorInputEvent+".v");return!0}}),a.each("onBeforeValidate,onBeforeFail,onFail,onSuccess".split(","),function(b,c){a.isFunction(e[c])&&a(f).on(c,e[c]),f[c]=function(b){b&&a(f).on(c,b);return f}}),e.formEvent&&c.on(e.formEvent+".V",function(a){if(!f.checkValidity(null,a))return a.preventDefault();a.target=c,a.type=e.formEvent}),c.on("reset.V",function(){f.reset()}),b[0]&&b[0].validity&&b.each(function(){this.oninvalid=function(){return!1}}),c[0]&&(c[0].checkValidity=f.checkValidity),e.inputEvent&&b.on(e.inputEvent+".V",function(b){f.checkValidity(a(this),b)}),b.filter(":checkbox, select").filter("[required]").on("change.V",function(b){var c=a(this);(this.checked||c.is("select")&&a(this).val())&&k[e.effect][1].call(f,c,b)}),b.filter(":radio[required]").on("change.V",function(b){var c=a("[name='"+a(b.srcElement).attr("name")+"']");c!=null&&c.length!=0&&f.checkValidity(c,b)}),a(window).resize(function(){f.reflow()})}a.fn.validator=function(b){var c=this.data("validator");c&&(c.destroy(),this.removeData("validator")),b=a.extend(!0,{},g.conf,b);if(this.is("form"))return this.each(function(){var d=a(this);c=new l(d.find(":input"),d,b),d.data("validator",c)});c=new l(this,this.eq(0).closest("form"),b);return this.data("validator",c)}})(jQuery); /* end: /ISS_Static/WW/site/scripts/jquery/jquery.tools.min.js(47220) */ /* start: /ISS_Static/WW/site/templates/bazaarvoice/owv2/bvloader2.js (cachekey: [])*/ function customAGBvOverlay(itemoid, bvproductid){ var _showInOverLay = true; if ($("#bv-results-wrapper").length == 0) { var results = $("

"); results.append("
"); var buttonWrapper = $("
"); var button = $(""); button.click( function (e) { var $_continer = $("div.contentContainer"); //If there are facet result items are there then no need to remove the browsing class if($(".facetedResults").length == 0){ $_continer.removeClass("browsing"); } $("#bv-results-wrapper").hide(); $('html, body').animate({scrollTop: $_continer.offset().top}, 500); e.preventDefault(); } ); buttonWrapper.append(button); results.append(buttonWrapper); if($("#results-area").length != 0) results.insertAfter("#results-area"); else{ //if there is no parent item to display the review then use overlay to show them _showInOverLay = true; } } if ($("a[href='#tab-reviews']").length != 0) { //if its Sub series then show the reviews in the tab $("a[href='#tab-reviews']").trigger('click'); return; } $.post(long_url + "/wci.workflow:load?page=/WW/site/templates/bazaarvoice/owv2/BVTemplate.html", { 'oid' : itemoid, 'bvoid' : bvproductid }, function (bvcontent) { if(!_showInOverLay){ $("#bvreviewsWrap").html(bvcontent); $("#bv-results-wrapper").show(); $("div.contentContainer").addClass("browsing"); }else{ var fbwidth = Math.ceil(($(window).width()*75)/100); var fbheight = Math.ceil(($(window).height()*75)/100); if($("#bvOverlay").length == 0) { $('').appendTo($("body")); } $("#bvOverlay").fancybox({ 'content': $("
").append(bvcontent), 'autoScale': true, 'transitionIn': 'fade', 'transitionOut': 'fade', 'speedIn': 500, 'speedOut': 300, 'autoDimensions': true, 'centerOnScroll': true, 'onStart': function() { $("#fancybox-content").addClass("customBVOverlay"); }, 'onClosed': function() { $("#fancybox-content").removeClass("customBVOverlay"); }, 'onComplete': function() { $("#fancybox-content > div:nth-child(1)").css("overflow-x", "hidden"); } }).click(); } }); if(!_showInOverLay){ var _r_wrapper = $("#bvreviewsWrap").offset(); $('html, body').animate({scrollTop: (typeof _r_wrapper != 'undefined') ? _r_wrapper.top: ''}, 500); } } $( document ).ready(function() { if(typeof(customBvOverlay) == "undefined") { bvOverlay = customAGBvOverlay; } }); /* end: /ISS_Static/WW/site/templates/bazaarvoice/owv2/bvloader2.js(2890) */ /* start: /ISS_Static/WW/site/templates/compare/compare.js (cachekey: [])*/ var specRows = 0, specColumns = 0, compareCookieUIDomain = "", compareCookieExpireDate = 1, compareOIDS = null, compareTemplate = "/WW/site/templates/compare/CompareTemplate.html", sliderTemplate = "/WW/site/templates/compare/SliderTemplate.html"; function Set_Cookie(n, v, d) { document.cookie = n + "=" + v + d + "; path=/"; } function Get_Cookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length,c.length); } return null; } function Delete_Cookie(name) { Set_Cookie(name, null, getCompareCookieExpireDate(-1)); } function getCheckBoxReference(oid) { return unescape(oid).replace(/:/g, '\\:') + '_cb'; } function getSkuCheckBoxReference(oid) { return "sku_" + unescape(oid).replace(/:/g, '\\:') + '_cb'; } function getMobCheckBoxReference(oid) { return "mob_" + unescape(oid).replace(/:/g, '\\:') + '_cb'; } function getCheckBoxObject(idString, label) { var cbx = document.getElementById(getCheckBoxReference(idString) + (label?label:"")); if(cbx == null) { cbx = document.getElementById(getSkuCheckBoxReference(idString) + (label?label:"")); } if(cbx == null) { cbx = document.getElementById(getMobCheckBoxReference(idString) + (label?label:"")); } return cbx; } function compareOverlay(itemOIDs) { if(typeof s != 'undefined') s_clt(s.pageName+'|Compare items|Button', 'event29', 'eVar23', s.pageName+'|Compare items|Button', 'prop25', 'D=v23'); $('#sliderTab').click(); // if no oids are given try to pull from cookies. if (!itemOIDs) itemOIDs = getOidsFromCookie(); openCompareOverlay(itemOIDs); return false; } function toggleCheckBox(oid) { var cbx = getCheckBoxObject(oid); if (cbx !== null) { if (cbx.checked) { cbx.checked = false; if (getCheckBoxObject(oid, "_label_checked") !== null) { getCheckBoxObject(oid, "_label_checked").className = "cbxhide"; } if (getCheckBoxObject(oid, "_label_unchecked") !== null) { getCheckBoxObject(oid, "_label_unchecked").className = "cbxshow"; } } } } function getCheckBoxReference(oid) { return unescape(oid).replace(/:/g, '\\:') + '_cb'; } function checkCompareCheckBox(oid) { if (isOnCookieList(oid)) { if (getCheckBoxObject(oid) !== null) { getCheckBoxObject(oid).checked = true; if (getCheckBoxObject(oid, "_label_checked") !== null) { getCheckBoxObject(oid, "_label_checked").className = "cbxshow"; } } } else if (getCheckBoxObject(oid, "_label_checked") !== null) { getCheckBoxObject(oid, "_label_unchecked").className = "cbxshow"; } } function getOidsFromCookie() { var currCookie = Get_Cookie("LnvCompare" + getCompareCookieUIDomain()); if (currCookie !== null && currCookie !== "") { //get and check double entries var cookieVals = currCookie.split(","); for (var c=0;c= 2) { $('#compareSlider').css("visibility", "visible"); try { _satellite.track('Compare_Products_Toggled'); } catch(cerrr) { console.error(cerrr); } } } clearAllCompareItems(); Set_Cookie("LnvCompare" + getCompareCookieUIDomain(), currCookie, getCompareCookieExpireDate()); } function removeCompareCookieValue(oid) { var currCookie = Get_Cookie("LnvCompare" + getCompareCookieUIDomain()); if (currCookie !== null && currCookie !== "") { //get and check double entries var cookieVals = currCookie.split(","); var cookieExists = false; for (var c=0;c= 2) { $('#compareSlider').css("visibility", "visible"); } else { $('#compareSlider').css("visibility", "hidden"); } } } function loadCookieSlider(templateFile) { var oids = getOidsFromCookie(); if (oids !== "") { $('#sliderContent').addClass('compareLoader').empty(); $.post(cmpr_opts.burl + "/wci.workflow:load?page=" + (!templateFile ? sliderTemplate : templateFile) + "&action=" + new Date().getTime(), { 'oids' : oids, 'cmd' : 'wci.workflow:friendlyload' }, function(compareContent) { $('#sliderContent').removeClass('compareLoader').html(compareContent); }); } } function toggleAllCompareItems() { var currCookie = getOidsFromCookie(); if (currCookie !== null && currCookie !== "") { //get and check double entries var cookieVals = currCookie.split(","); for (var c=0;c imgdiv", "#cmpoverlaytable .PriceBlock > dl" ]; $.each(els, function(i, v) { equalHeight($(v)); }); } if ($.type(window.getURLbyOID) === 'function') { $.each(compareOIDS.split(','), function(i, v) { var _url = getURLbyOID(v, cmpr_opts.burl, cmpr_opts.furl, cmpr_opts.file); if (_url !== false) { $('#row0_col' + (i + 1)) .add('td.topmostrow:eq(' + i + ')') .add('td.bottommostrow:eq(' + i + ')') .find('span.legacy').wrap('a.prodLink').attr('href', _url); } }); } $('#fancybox-content') .find('.compare').css('visibility', 'visible').end() .find('.add_more').click(function(e) { $.fancybox.close(); e.preventDefault(); }); $.fancybox.resize(); $('#fancybox-wrap').on('reposition.fancybox', function(e) { var _ww = $(window).width() - 60, // viewport width minus (paddingLeft + paddingRight + borderLeft + borderRight) _cw = $('#fancybox-content .compare #cmpoverlaytableheader').outerWidth(true), _wh = $(window).height() - 60, // viewport height minus (paddingTop + paddingBottom + borderTop + borderBottom) _ch = $('#fancybox-content .compare:first').height(), _sw = typeof(jQuery.scrollbarWidth) === 'function' ? $.scrollbarWidth() : 20; if (_cw > _ww) { $('#fancybox-wrap').width(_ww); $('#fancybox-content').css('width', 'auto').children('div').css('width', '100%'); } else { $('#fancybox-wrap').css('width', 'auto'); $('#fancybox-content').width(_cw + _sw).children('div').css('width', 'auto'); } if (_ch > _wh) { $('#fancybox-content').height(_wh).children('div').css('height', '100%'); } else { $('#fancybox-content').height(_ch).children('div').css('height', 'auto'); } }).trigger('reposition.fancybox'); $(window).on('resize.fancybox', function(e) { $('#fancybox-wrap').trigger('reposition'); }); if ($.support.leadingWhitespace === true) { $('#cmpoverlaytableheader, #cmpoverlaytable').css('position', 'relative'); $('#fancybox-content > div').scroll(function(e) { var a = $(this).scrollTop(), b = $('#fancybox-content .add_more').outerHeight(); if (a > b) { $('#cmpoverlaytableheader').css('top', a - b); } else { $('#cmpoverlaytableheader').css('top', 0); } }); } }, onCleanup: function() { var html = $('html'), scrollPosition = html.data('scroll-position'); html.css('overflow', html.data('previous-overflow')); window.scroll(scrollPosition[0], scrollPosition[1]); $('#fancybox-wrap').off('reposition.fancybox'); $(window).off('resize.fancybox'); }, onClosed: function() { $('#compareSlider').css('z-index', 9999999); } }); try { _satellite.track('Compare_Products_Clicked'); } catch(cerrr) { console.error(cerrr); } } function checkSliderVisible() { if (getOidsFromCookie() === "" || getOidsFromCookie().split(",").length < 1) { $('#compareSlider').css("visibility", "hidden"); } else { $('#compareSlider').css("visibility", "visible"); } } function leftPos(obj) { var $this = $(obj); $this.css('left', ($(window).width()/2)-($this.outerWidth(true)/2)); } function removeFromComparison(oid) { for (var c=0;c=0;c--) { $('#comp_' + compares[c].replace(/:/g, "_")).remove(); } toggleAllCompareItems(); clearAllCompareItems(); compares.length = 0; $("#sliderWrapper").empty(); $('#sliderTab').click(); $('#compareSlider').css("visibility", "hidden"); } /* end: /ISS_Static/WW/site/templates/compare/compare.js(13327) */ /* start: /ISS_Static/WW/site/scripts/jquery/jquery.misc.js (cachekey: [])*/ /* * jQuery scrollbarWidth - v0.2 - 2/11/2009 * http://benalman.com/projects/jquery-misc-plugins/ * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ (function($,b,a){$.scrollbarWidth=function(){var c,d;if(a===b){c=$('
').appendTo("body");d=c.children();a=d.innerWidth()-d.height(99).innerWidth();c.remove()}return a}})(jQuery); /* * jQuery postMessage - v0.5 - 9/11/2009 * http://benalman.com/projects/jquery-postmessage-plugin/ * * Copyright (c) 2009 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ (function($){var g,d,j=1,a,b=this,f=!1,h="postMessage",e="addEventListener",c,i=b[h]&&!$.browser.opera;$[h]=function(k,l,m){if(!l){return}k=typeof k==="string"?k:$.param(k);m=m||parent;if(i){m[h](k,l.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))}else{if(l){m.location=l.replace(/#.*$/,"")+"#"+(+new Date)+(j++)+"&"+k}}};$.receiveMessage=c=function(l,m,k){if(i){if(l){a&&c();a=function(n){if((typeof m==="string"&&n.origin!==m)||($.isFunction(m)&&m(n.origin)===f)){return f}l(n)}}if(b[e]){b[l?e:"removeEventListener"]("message",a,f)}else{b[l?"attachEvent":"detachEvent"]("onmessage",a)}}else{g&&clearInterval(g);g=null;if(l){k=typeof m==="number"?m:typeof k==="number"?k:100;g=setInterval(function(){var o=document.location.hash,n=/^#?\d+&/;if(o!==d&&n.test(o)){d=o;l({data:o.replace(n,"")})}},k)}}}})(jQuery); /* end: /ISS_Static/WW/site/scripts/jquery/jquery.misc.js(1518) */ /* start: /ISS_Static/site/compare/jquery.centerSlide.js (cachekey: [])*/ (function($) { $.fn.extend({ centerSlide : function(options) { var options = $.extend({ attach : window, // element to center within (window = viewport) position: 'right', // which side? ('right' or 'left') tab : '#sliderTab', // element used for tab control content : '#sliderContent', // element that contains content fixed : true, // boolean, should item scroll or stay in place? speedX : 'fast', // string or number, transition time of horizontal movement in milliseconds or standard jQuery keyword (ie- 'fast') speedY : 'fast', // string or number, transition time of vertical movement in milliseconds or standard jQuery keyword (ie- 'fast') top : 'center', // string or number, either a pixel, percentage, or 'center' resize : true, // boolean, reposition/recenter on window resize event comparetemplate: '/site/compare/CompareTemplate.html', //default template for loading comparison content slidertemplate: '/site/compare/SliderTemplate.html' //default template for loading cookie handler content }, options); if(typeof(setCompareTemplate) != "undefined") { setCompareTemplate(options.comparetemplate); //tell ISS which template to use for rendering compare content } // do once $('head').prepend(''); // do for each instance of selector return this.each(function() { var tab = $(options.tab), cw = $(options.content).outerWidth(), id = $(this).attr('id'), props = {} $(this).css({ position : (options.fixed)?'fixed':'absolute', display : '' // clear display property }); function calculatePos(_this, _attach, _tab, _top, _speed) { if (_top == 'center') { // center the box based on tab var pos = ($(_attach).height() - $('#'+_this).find(_tab).outerHeight()) / 2; $.extend(props, { top : pos + 'px' }); } else if (_top.indexOf('%') > 0) { // % offset $.extend(props, { top : _top }); } else { // px offset var px = parseInt(_top); $.extend(props, { top : px + 'px' }); } $('#'+_this).stop(true).animate(props, {queue:false, duration:_speed, complete:function(){ $(this).addClass('positioned'); }}); } calculatePos(id, options.attach, options.tab, options.top, options.speedY); $(options.tab).toggle(function() { if (options.position.toLowerCase() == 'left') { $(this).parent().removeClass('closed').animate({left:'0px'}, {queue:false, duration: options.speedX}); } else { //load content from cookie loadCookieSlider(options.slidertemplate); $(this).parent().removeClass('closed').animate({right:'0px'}, {queue:false, duration: options.speedX}); } }, function() { if (options.position.toLowerCase() == 'left') { $(this).parent().animate({left:'-'+cw+'px'}, {queue:false, duration: options.speedX, complete:function(){ $(this).addClass('closed'); }}); } else { $(this).parent().animate({right:'-'+cw+'px'}, {queue:false, duration: options.speedX, complete:function(){ $(this).addClass('closed'); }}); } }); if (options.resize) { $(window).resize(function() { calculatePos(id, options.attach, options.tab, options.top, options.speedY); }); } return $(this); }); } }); })(jQuery); /* end: /ISS_Static/site/compare/jquery.centerSlide.js(3422) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/perf.js (cachekey: [])*/ /* intentionally empty */ function startMeasure() { } function endMeasure() { } /* end: /ISS_Static/WW/ag/js/oneweb/subseries/perf.js(81) */ /* start: /ISS_Static/WW/ag/templates/bazaarvoice/owv2/bvloader2.js (cachekey: [])*/ function customAGBvOverlay(itemoid, bvproductid){ var _showInOverLay = true; if ($("#bv-results-wrapper").length == 0) { var results = $("
"); results.append("
"); var buttonWrapper = $("
"); var button = $(""); button.click( function (e) { var $_continer = $("div.contentContainer"); //If there are facet result items are there then no need to remove the browsing class if($(".facetedResults").length == 0){ $_continer.removeClass("browsing"); } $("#bv-results-wrapper").hide(); $('html, body').animate({scrollTop: $_continer.offset().top}, 500); e.preventDefault(); } ); buttonWrapper.append(button); results.append(buttonWrapper); if($("#results-area").length != 0) results.insertAfter("#results-area"); else{ //if there is no parent item to display the review then use overlay to show them _showInOverLay = true; } } if ($("a[href='#tab-reviews']").length != 0) { //if its Sub series then show the reviews in the tab $("a[href='#tab-reviews']").trigger('click'); return; } $.post(long_url + "/wci.workflow:load?page=/WW/ag/templates/bazaarvoice/owv2/BVTemplate.html", { 'oid' : itemoid, 'bvoid' : bvproductid }, function (bvcontent) { if(!_showInOverLay){ $("#bvreviewsWrap").html(bvcontent); $("#bv-results-wrapper").show(); $("div.contentContainer").addClass("browsing"); }else{ var fbwidth = Math.ceil(($(window).width()*75)/100); var fbheight = Math.ceil(($(window).height()*75)/100); if($("#bvOverlay").length == 0) { $('').appendTo($("body")); } $("#bvOverlay").fancybox({ 'content': $("
").append(bvcontent), 'autoScale': true, 'transitionIn': 'fade', 'transitionOut': 'fade', 'speedIn': 500, 'speedOut': 300, 'autoDimensions': true, 'centerOnScroll': true, 'onStart': function() { $("#fancybox-content").addClass("customBVOverlay"); }, 'onClosed': function() { $("#fancybox-content").removeClass("customBVOverlay"); }, 'onComplete': function() { $("#fancybox-content > div:nth-child(1)").css("overflow-x", "hidden"); } }).click(); } }); if(!_showInOverLay){ var _r_wrapper = $("#bvreviewsWrap").offset(); $('html, body').animate({scrollTop: (typeof _r_wrapper != 'undefined') ? _r_wrapper.top: ''}, 500); } } $( document ).ready(function() { if(typeof(customBvOverlay) == "undefined") { bvOverlay = customAGBvOverlay; } }); /* end: /ISS_Static/WW/ag/templates/bazaarvoice/owv2/bvloader2.js(2888) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/us/color_selector/control.js (cachekey: [])*/ $(document).ready(function(){ $(".tabbedBrowse-productListings").css('display','block'); var seen = {}; var titleTexts = {}; var bodyTexts = {}; var priHref = {}; var secHref = {}; $('.tabbedBrowse-productListing-container').each(function(i){ var prodTitle = $(this).find(".tabbedBrowse-productListing-title").text(); var prodText = $(this).find('.tabbedBrowse-productListing-featureList').text().replace(/ /g,''); var prodOID = $(this).find(".tabbedBrowse-productListing-footer-button-first").data('sb'); var productListingTitle = $(this).find('.tabbedBrowse-productListing-title').html(); var productListingBody = $(this).find('.tabbedBrowse-productListing-body').html(); var productListingButtonFirst = $(this).find('.tabbedBrowse-productListing-button-container').first().html(); var productListingButtonSecond = $(this).find('.tabbedBrowse-productListing-button-container').last().html(); var prodColorArray = prodTitle.split(' '); var prodColor = prodColorArray[prodColorArray.length - 1].trim(); titleTexts[prodOID] = productListingTitle; bodyTexts[prodOID] = productListingBody; priHref[prodOID] = productListingButtonFirst; secHref[prodOID] = productListingButtonSecond; if(prodTitle.indexOf('Ideapad 500 15') > -1){ switch (prodColor.toLowerCase()) { case 'white': prodImage = "//www.lenovo.com/shop/americas/content/img_lib/prod-launch/190x142/ideapad-500-15-white.png"; break; case 'black': prodImage = "//www.lenovo.com/shop/americas/content/img_lib/prod-launch/190x142/ideapad-500-15-black.png"; break; default: prodImage = "//www.lenovo.com/shop/americas/content/img_lib/prod-launch/190x142/ideapad-500-15-black.png"; break; } if(seen[prodText]){ $(".tabbedBrowse-productListing-featureList").each(function(index, element){ if($(element).text().replace(/ /g,'') == prodText){ $(element).parents('.tabbedBrowse-productListing').find('.colorSelector ul').append('
  • '); } }); $(this).remove(); } else{ seen[prodText]=true; $(this).find(".tabbedBrowse-productListing-header").append('
    Select your color
    '); } } }); $('.change-color').on( "click", function(){ var tabPrdListing = $(this).parents('.tabbedBrowse-productListing'); tabPrdListing.find('.change-color').removeClass("colorSelected"); $(this).addClass("colorSelected"); var mainImage = $(this).parents('.tabbedBrowse-productListing-image').find('.main-image'); if($(this).attr('src') != mainImage.attr('src')){ mainImage.attr('src',''+$(this).attr('src')+''); } tabPrdListing.find('.tabbedBrowse-productListing-title').html(titleTexts[$(this).data('oid')]); tabPrdListing.find('.tabbedBrowse-productListing-body').html(bodyTexts[$(this).data('oid')]); tabPrdListing.find('.tabbedBrowse-productListing-button-container').first().html(priHref[$(this).data('oid')]); tabPrdListing.find('.tabbedBrowse-productListing-button-container').last().html(secHref[$(this).data('oid')]); }); }); /* end: /ISS_Static/WW/ag/js/oneweb/subseries/us/color_selector/control.js(3595) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/queue.js (cachekey: [])*/ var renderEnablePage1ControlsModules = new Array() var renderInterModules = new Array() var renderInterstitialCallbacks = new Array(); var renderBeforeRenderUIModules = new Array(); var spiderDebugwindow = null; var spiderMods = null; function getSFName(sfname) { if(sfname == null) { sfname = ""; } else { if(sfname.indexOf("{") > 0) { sfname = sfname.substring(0, sfname.indexOf("{")); } } sfname = sfname.replace(/function /g, "").replace(/\(map\)/g, ""); return sfname; } function getCleanSFName(sfname) { if(sfname == null) { sfname = ""; } else { if(sfname.indexOf("{") > 0) { sfname = sfname.substring(0, sfname.indexOf("{")); } } var cleansfname = sfname.replace(/\W/g, ""); return cleansfname; } function toggleSpiderMode(cbx) { spiderMods[cbx.name] = cbx.checked; } function spiderDebug() { return (window.debugAllowed && location.href.indexOf("leni2.com") > 0); } function renderOverrideModules(queue, map, ojson) { if(map == null) { map = {}; } if(spiderDebug()) { printMapDebugWindow(map); } var spiderModules = "
      "; if(spiderDebug()) { if($("div.standard-on").length > 0 && $("#printSpiderMap").length == 0) { $('
      SpiderMan Toolbox
      ').appendTo($("div.standard-on .calloutBox")); } } var firstrun = false; for(var rm=0;rm" + sfname + " (" + Number(elapsed.toFixed(3)) + ")"; } //endMeasure(queue[rm].render.name, true, true); } catch(spiderError) { if(window.console) { if(spiderDebug()) { var sfname = getSFName(queue[rm].render.toString()); var cleansfname = getCleanSFName(sfname); spiderModules += "
    • " + sfname + "
    • "; console.error("builder module [" + sfname + "] error:\n" + (spiderError.stack?spiderError.stack:spiderError)); } else { console.error((spiderError.stack?spiderError.stack:spiderError)); } } } } } if(spiderDebug()) { $("#spiderModules").html(spiderModules + "
    "); } } function addToOverrideQueue(renderer, queue) { if(typeof(queue) != "undefined") { queue[queue.length] = renderer; } } /* helper to load external scripts and browser cache them */ if(!window.jQuery.cachedScriptWCB) { jQuery.cachedScriptWCB = function( url, options ) { options = $.extend( options || {}, { dataType: "script", cache: true, url: url, success: function(data){ if(options.cb) { options.cb(data); } } }); return jQuery.ajax( options ); }; } /* helper to set rwd builder data */ function defineRWDProperty(rwdprop, rwdvalue) { var LNV_options = window.LNV_options = window.LNV_options || {}; var o = LNV_options.configurator_options = LNV_options.configurator_options ||{}; o[rwdprop] = rwdvalue; } function openMapDebugWindow() { if(!window.debugAllowed || location.href.indexOf("leni2.com") == -1) { return false; } spiderDebugwindow = window.open("", "spider", "width=700,height=500"); } function printMapDebugWindow(map) { if(!spiderDebug()) { return false; } if(spiderDebugwindow != null && map != null) { $(spiderDebugwindow.document.body).html("
    " + JSON.stringify(map, null, 2) + "
    "); } } /* end: /ISS_Static/WW/ag/js/oneweb/subseries/queue.js(5869) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/spidercontrol.js (cachekey: [])*/ var showSpiderman = true; /* end: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/spidercontrol.js(26) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/utilities.js (cachekey: [])*/ /***************************************************************************************************** * reorderfeature: Method to reorder an array of features. * * @param features: Array of features that contain the item that should be reordered * @param movedfeatpn: The part number of the feature that will be removed once the 2 features are merged * @param beforepn: The part number of the feature that the moved feature will be placed before ******************************************************************************************************/ function reorderfeature(features, movedfeatpn, beforepn){ var beforeIndex; var movedfeat; var curFeatIndex; //remove the feature from the array for(x=0; x= 0){ movedfeat = features[x]; //features.splice(x,1); curFeatIndex = x; break; } } //find the index of the item we are moving the feature before for(var y=0; y= 0){ beforeIndex = y; break; } } //inset the feature in the correct index if(typeof beforeIndex != 'undefined' && beforeIndex != null && typeof movedfeat != 'undefined' && movedfeat != null && typeof curFeatIndex != 'undefined' && curFeatIndex != null){ features.splice(curFeatIndex,1); features.splice(beforeIndex,0,movedfeat); } } /***************************************************************************************************** * combineFeatures: Method to combine 2 features into 1. * * @param features: Array of features that contain the 2 items that should be merged. Once the method is complete, the array will be updated with the result of the merge. * @param featRemovedPn: The part number of the feature that will be removed once the 2 features are merged * @param featMergedIntoPn: The part number of the feature that will remain once the 2 features are merged ******************************************************************************************************/ function combineFeatures(features, featRemovedPn, featMergedIntoPn){ for(var x=0; x< features.length; x++){ var feature = features[x]; //if this is the education software, merge it with the business category if(feature.pn.indexOf(featRemovedPn) >= 0){ var remSubsels = []; //grab all of the subselections from each selction for(var y=0; y < feature.selections.length; y++){ remSubsels.push(feature.selections[y].subselections); } //find the business section and add the selections for(var z=0; z < features.length; z++){ var theFeat = features[z]; if(theFeat.pn.indexOf(featMergedIntoPn) >= 0){ theFeat.selections[0].subselections.push.apply(theFeat.selections[0].subselections, remSubsels[0]); break; } } features.splice(x,1); break; } } } /* end: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/utilities.js(2924) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/inventory/control.js (cachekey: [])*/ var origInventoryCB = null; (function(app) { var self = app.INVENTORY = (app.INVENTORY || {}); origInventoryCB = self.callback; self.callback = function(data) { try { if(data != null) { for(var d=0;data.Items && data.Items.Item && d= 1 && inv <= 5) { msg = "Hurry only " + inv + " in stock!"; } else if(inv >= 6 && inv <= 20) { msg = "Only " + inv + " In stock"; } else if(inv >= 21) { msg = ""; } iitem.InventoryMessage = msg; } } } catch(inverr) { if(window.console) { console.error(inverr); } } if(origInventoryCB != null) { origInventoryCB(data); } } })(window.LENOVO = window.LENOVO || {}); /* end: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/inventory/control.js(1116) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/onetwo/control.js (cachekey: [])*/ var g40WarrantyTitle = null; function renderOneTwo(map) { //mobile interstitial page does not have tab map!!! var tabsExist = false; for(var i=0;i 0)?thefeat[f].selections.length-1:-1; for(;ss>=0;ss--) { var subs = (thefeat[f].selections[ss].subselections)?thefeat[f].selections[ss].subselections.length-1:-1; for(;subs>=0;subs--) { if(thefeat[f].selections[ss].subselections[subs].data.pn == "BASE_WARRANTY_SERV_SAP_MTM_NB") { thefeat[f].selections[ss].subselections[subs].data.title = "Base warranty: One Year [included]"; thefeat[f].selections[ss].subselections[subs].data.subtitle = "Base warranty: One Year [included]"; thefeat[f].subtitle = "Base warranty: One Year [included]"; g40WarrantyTitle = thefeat[f].selections[ss].subselections[subs].data.title; break; } } } } } */ } function handleOneTwo() { if(showSpiderman) { this.render = renderOneTwo; addToOverrideQueue(this, window.renderBeforeRenderUIModules); } } new handleOneTwo(); /* end: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/onetwo/control.js(1700) */ /* start: /ISS_Static/ww/ag/js/oneweb/subseries/rwd/test/telesales/control.js (cachekey: [])*/ function renderTeleSalesData(map) { var token = (typeof(getCookie) != "undefined")?getCookie("iss-telesales-token"):null; if (token != null && $.trim(token) !== "") { for (var i = 0; i < map.length; i++) { if (map[i] && map[i].active) { var thefeat = map[i].features; for (var f = 0; f < thefeat.length; f++) { if(thefeat[f].selections && thefeat[f].selections.length > 0) { for(var sel = 0;sel= 0; subs--) { if (selblock.subselections[subs].data.pricedata && selblock.subselections[subs].data.pricedata.delta && selblock.subselections[subs].data.pricedata.delta.indexOf('= 0) { if(!doneonce) { selblock.subselections[subs].data.telesales = ""; doneonce = true; } else { selblock.subselections[subs].data.telesales = ""; } var tsindex = selblock.subselections[subs].data.pricedata.delta.indexOf('
    0) { selblock.subselections[subs].data.telesales += new String(selblock.subselections[subs].data.pricedata.delta.substring(tsindex)); selblock.subselections[subs].data.pricedata.delta = new String(selblock.subselections[subs].data.pricedata.delta.substring(0, tsindex)); } else { selblock.subselections[subs].data.telesales += new String(selblock.subselections[subs].data.pricedata.delta); selblock.subselections[subs].data.pricedata.delta = ""; } } } } } } } } } } function handleTeleSalesData() { if (showSpiderman) { this.render = renderTeleSalesData; addToOverrideQueue(this, window.renderBeforeRenderUIModules); } } new handleTeleSalesData(); /* end: /ISS_Static/ww/ag/js/oneweb/subseries/rwd/test/telesales/control.js(2633) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/builder/control.js (cachekey: [])*/ window.firstRun = true; function renderBuilderHandler(map, json) { for(var i=0;i 0) { return tmpKey[0]; } } return null; } function handleItemMouseOut(defSel, groupRef) { //if default value is given, use it. If not if(defSel) { var defData = defSel.split("|"); handleItem(defData[0], defData[1], defData[2], defData[3]); } else if(groupRef) { var firstInput = $("#" + groupRef + " input:first"); var firstSpan = $("#" + groupRef + " span:first"); if(firstInput.length == 1 && firstSpan.length == 1) { handleItem(firstInput.attr("data-pn"), firstSpan.text(), firstInput.attr("data-originalvalue"), firstInput.attr("data-ppn")); } }} function handleItem(partno, label, ischecked, ppn) { var defaultText; if(ppn.indexOf("PREMSUPPORT_SERV") >= 0){ defaultText = "Premium Support Services"; } else { if(baseWarrPN != ""){ defaultText = (baseWarrPN == "N13" || baseWarrPN == "D04")?"Base Mail In":"Base"; } else{ defaultText = "Base No Pn"; } } var defaultYear = "1YR"; var hoverKeys = ["Base", "Base Mail In", "In-Home . Accidental", "In-Home .* ADP", "In-Home", "Accidental", "ADP", "Depot", "defaultpss", "personalization", "secure", "premium"]; var res = label.match(/\dYR/g); if(res == null) { res = label.toLowerCase().match(/\dy in|\dy de/g); if(res != null){ var years = res.toString().substring(0,1); res[0] = years + "YR"; } else{ res = [defaultYear]; } } var arrayKey = resolveArrayKey(label, hoverKeys); console.info(arrayKey); if(typeof arrayKey != "undefined" && arrayKey != null && arrayKey.toLowerCase() == "base"){ if(baseWarrPN != ""){ arrayKey = (baseWarrPN == "N13" || baseWarrPN == "D04")?"Base Mail In":"Base"; } else{ arrayKey = "Base No Pn"; } } else if(arrayKey == null) { arrayKey = defaultText; res = [defaultYear]; } var upToYear = defaultYear; if(defaultYear != null && res != null && res.length > 0) { $(".warrtabbar." + ppn + " div").removeClass("wttabinactive, wttabactive").addClass("wttabinactive"); var yearTabs = warrActiveTabs[res[0]]; if(yearTabs == null) { yearTabs = ["1YR"]; } yearTabs = yearTabs.split(","); for(var y=0;y/g, "" + upToYear + " Year Total ")); } function renderWarrHandler(map, ojson) { var stackable = $(".tabbedBrowse-configurator-wrapper").data("stackable"); if(!stackable){ if(typeof window.baseWarrMatrix != "undefined" && ojson != "undefined"){ baseWarrPN = window.baseWarrMatrix[ojson.basedata.sb]; } buildRecommendedWarranty(map); //do stuff to manipulate the 'map' array //then return it to the main configurator app for(var i=0;i 0) { $("#warrantybanner").show(); } var thefeat = map[i].features; for(var f=0;f= 0) { var lastSelectionIndex = thefeat[f].selections.length - 1; thefeat[f].selections[0].data.warrantyHoverAreaBase = "true"; thefeat[f].selections[0].data.warrantyHoverBegin = "true"; thefeat[f].selections[lastSelectionIndex].data.warrantyHoverEnd = "true"; for(var ss=0;ss= 0) { thefeat[f].expanded = "true"; var lastSelectionIndex = thefeat[f].selections.length - 1; thefeat[f].selections[0].data.warrantyHoverAreaPremium = "true"; thefeat[f].selections[0].data.warrantyHoverBegin = "true"; thefeat[f].selections[lastSelectionIndex].data.warrantyHoverEnd = "true"; for(var ss=0;ss 0) { $("#warrantybanner").hide(); } } } } } function renderWarrHandlerThink(map) { var stackable = $(".tabbedBrowse-configurator-wrapper").data("stackable"); if(!stackable){ buildRecommendedWarranty(map); var site = (typeof $('meta[name="Site"]').attr('content') != 'undefined') ? $('meta[name="Site"]').attr('content').toLowerCase() : ''; if (site == "outlet_us") { for(var i=0;i= 0) { thefeat[f].expanded = "true"; } } } } } } function buildRecommendedWarranty(map) { var stackable = $(".tabbedBrowse-configurator-wrapper").data("stackable"); if(!stackable){ //get the part number & description of the recommended warranty var warrObj = GetRecWarrDetails(); //get the JSON for the recommended warranty item var warrJSON = GetRecWarrJSON(map, warrObj.PartNum); //build the recommended warranty JSON and add it to the map if(typeof warrJSON != 'undefined') { warrJSON.data.description = warrObj.PartDesc; warrJSON.data.ADP = warrObj.ADP; if(typeof map[0].tabid != 'undefined' && map[0].tabid != '') { for(var i=0;i=0 || prodName.indexOf('ideapad') >=0) { if(prodType.indexOf('tablet') >= 0) { //Consumer Tablets (All Others) - 04W818 2Yr Depot warrObj.PartNum = '04W8188'; warrObj.PartDesc = "Keep your device running like new. With an additional year of protection, your hardware issues are covered." warrObj.ADP = false; } else if (prodType.indexOf("desktop") >= 0){ if(modelName.indexOf("q series") >= 0){ //Consumer Desktop (LBG) - 78Y1552 2YR In-Home NBD warrObj.PartNum = '78Y1552'; warrObj.PartDesc = "We're here for you. If your technical issue can't be diagnosed by phone, we'll send someone to you. Pressed for time? With Next Business Day (NBD), get technical service within one business day." warrObj.ADP = false; } else{ //Consumer Desktop (LBG) - 78Y1553 3YR In-Home NBD warrObj.PartNum = '78Y1553'; warrObj.PartDesc = "We're here for you. If your technical issue can't be diagnosed by phone, we'll send someone to you. Pressed for time? With Next Business Day (NBD), get technical service within one business day." warrObj.ADP = false; } } else { if(modelName.indexOf("s series") >= 0 || modelName.indexOf("100 series") >= 0){ warrObj.PartNum = '78Y1534'; warrObj.PartDesc = "Keep your device running like new. With an additional year of protection, your hardware issues are covered." warrObj.ADP = false; } else{ //Consumer Laptop-78Y1541 3YR In-Home + ADP warrObj.PartNum = '78Y1541'; warrObj.PartDesc = "Make sure you're covered from unexpected drops, spills and other accidents with ADP coverage. Not an accident? If your technical issue can't be diagnosed by phone, we'll send someone to you." warrObj.ADP = true; } } } else if(prodName.indexOf('ideacentre') >=0){ if(modelName.indexOf('all-in-one') >=0) { //Consumer AIO (LBG) - 78Y1553 3YR In-Home NBD warrObj.PartNum = '78Y1553'; warrObj.PartDesc = "We're here for you. If your technical issue can't be diagnosed by phone, we'll send someone to you. Pressed for time? With Next Business Day (NBD), get technical service within one business day. " warrObj.ADP = false; } else { //Consumer Desktop (LBG) - 78Y1553 3YR In-Home NBD warrObj.PartNum = '78Y1553'; warrObj.PartDesc = "We're here for you. If your technical issue can't be diagnosed by phone, we'll send someone to you. Pressed for time? With Next Business Day (NBD), get technical service within one business day." warrObj.ADP = false; } } else if(prodName.indexOf('thinkpad') >=0) { if(prodType.indexOf('tablet') >=0) { //Commercial Tablet (Think) - 5PS0F86279 3YR Depot + ADP Protection warrObj.PartNum = '5PS0F86279'; warrObj.PartDesc = "Make sure you're safe from unexpected drops, spills and other accidents with ADP coverage. Not an accident? With 2 additional years of protection, your hardware issues are covered." warrObj.ADP = true; } else { if(modelNum.indexOf('carbon') >= 0 || modelNum.indexOf('yoga') >=0) { //Yoga and Carbons - 3YR Onsite NBD + Accidental Damage Protection 5PS0E97116 warrObj.PartNum = '5PS0E97116'; warrObj.PartDesc = "Make sure you're covered from unexpected drops, spills and other accidents with ADP coverage. Not an accident? If your technical issue can't be diagnosed by phone, we'll send someone to you within one business day. " warrObj.ADP = true; } else { //TP - L, T, W, E, and X250 - 3YR Onsite NBD + Accidental Damage Protection 5PS0A14099 warrObj.PartNum = '5PS0A14099'; warrObj.PartDesc = "Make sure you're covered from unexpected drops, spills and other accidents with ADP coverage. Not an accident? If your technical issue can't be diagnosed by phone, we'll send someone to you within one business day." warrObj.ADP = true; } } } else if(prodName.indexOf('thinkcentre') >=0){ if(modelName.indexOf('all-in-one') >=0) { //Commercial AIO- 5WS0D81102 4YR Onsite NBD warrObj.PartNum = '5WS0D81102'; warrObj.PartDesc = "We're here for you. If your technical issue can't be diagnosed by phone, we'll send someone to you. Pressed for time? With Next Business Day (NBD) coverage, get technical service within one business day." warrObj.ADP = false; } else { //Commercial Desktop (Think 3yr Base)- 5WS0D80948 4YR Onsite NBD warrObj.PartNum = '5WS0D80948'; warrObj.PartDesc = "We're here for you. If your technical issue can't be diagnosed by phone, we'll send someone to you. Pressed for time? With Next Business Day (NBD) coverage, get technical service within one business day." warrObj.ADP = false; } } return warrObj; } function GetRecWarrJSON(map, partNum) { var warrJSON; var thefeat; if(typeof map[0].tabid != 'undefined' && map[0].tabid != '') { for(var i=0;i= 0) { for(var s=0;s= 0) { for(var s=0;s= 0 || prodName.indexOf('ideapad') >= 0) && prodName.indexOf('desktop') == -1) { this.render = renderWarrHandler; addToOverrideQueue(this, window.renderBeforeRenderUIModules); } else if (showSpiderman) { this.render = renderWarrHandlerThink; addToOverrideQueue(this, window.renderBeforeRenderUIModules); } else { this.render = buildRecommendedWarranty; addToOverrideQueue(this, window.renderBeforeRenderUIModules); } } new warrHandler(); /////////////////////////////// messaging //////////////////////////// var warrActiveTabs = new Array(); warrActiveTabs["1YR"] = "1YR"; warrActiveTabs["2YR"] = "1YR,2YR"; warrActiveTabs["3YR"] = "1YR,2YR,3YR"; warrActiveTabs["4YR"] = "1YR,2YR,3YR,4YR"; var warrTexts = new Array(); warrTexts["in-home"] = "
    In-Home
    Get on-site repair from a certified technician if issue cannot be resolved by phone:
    • Free parts and labor
    • On-site service at your home or business
    • Drops
    • Spills
    • Electrical surges
    "; warrTexts["depot"] = "
    Depot
    Extend your base warranty coverage for all factory defects and common-use issues. Benefits include:
    • 24/7 phone support
    • Free parts & labor
    • Free shipping & returns
    • Drops
    • Spills
    • Electrical surges
    "; warrTexts["accidental"] = "
    Depot + Accidental Damage Protection
    Provides additional coverage beyond base warranty for damage resulting from accidents:
    • 24/7 phone support
    • Free parts & labor
    • Free shipping & returns
    • Drops
    • Spills
    • Electrical surges
    "; warrTexts["adp"] = "
    Depot + Accidental Damage Protection
    Provides additional coverage beyond base warranty for damage resulting from accidents:
    • 24/7 phone support
    • Free parts & labor
    • Free shipping & returns
    • Drops
    • Spills
    • Electrical surges
    "; warrTexts["in-home + accidental"] = "
    In-Home + Accidental Damage Protection
    Get on-site repair from a certified technician if issue cannot be resolved by phone. Also provides coverage for accidental forms of damage not covered by base warranty:
    • Free parts and labor
    • On-site service at your home or business
    • Drops
    • Spills
    • Electrical surges
    "; warrTexts["in-home nbd + adp"] = "
    In-Home + Accidental Damage Protection
    Get on-site repair from a certified technician if issue cannot be resolved by phone. Also provides coverage for accidental forms of damage not covered by base warranty:
    • Free parts and labor
    • On-site service at your home or business
    • Drops
    • Spills
    • Electrical surges
    "; warrTexts["base"] = "
    Depot
    Extend your base warranty coverage for all factory defects and common-use issues. Benefits include:
    • 24/7 phone support
    • Free parts & labor
    • Free shipping & returns
    • Drops
    • Spills
    • Electrical surges
    "; warrTexts["base mail in"] = "
    Mail In
    Extend your base warranty coverage for all factory defects and common-use issues. Benefits include:
    • 24/7 phone support
    • Free parts & labor
    • Drops
    • Spills
    • Electrical surges
    "; warrTexts["base no pn"] = "
    Extend your base warranty coverage for all factory defects and common-use issues. Benefits include:
    • 24/7 phone support
    • Free parts & labor
    • Drops
    • Spills
    • Electrical surges
    "; warrTexts["defaultpss"] = "
    Premium Support Services
    For problems with your computer, home network, software or technology in general, Lenovo Services Premium Support is here to help!
    "; warrTexts["personalization"] = "
    PC Personalization Setup Services
    Let a Lenovo Support Agent personalize and transfer your old PC settings. PC Personalization offers:
    • Backup your wallpaper, desktop icons, shortcuts, and screensavers from an old PC and restore them to a new PC
    • Transfer internet browser settings and favorites from an old PC to new PC
    • Set up basic display settings to user preference
    "; warrTexts["secure"] = "
    Windows PC - Secure, Connect and Configure Setup Service
    • Creation of up to two Windows user accounts
    • Connection to a home network
    • Setup of one printer or other peripheral
    • Setup and configure security software provided by you
    • Setup one email account
    • Configure Windows Updates
    "; warrTexts["premium"] = "
    Unlimited Premium Support - Annual Subscription
    • Unlimited software support for 1 year
    • Support four devices which may include PCs, desktops, tablets and phones
    • Support includes all Premium Support services. All basic, moderate, and complex services are included.
    • Click the link below for a list of all services included in the annual subscription
    "; var warrMessages = new Array(); //warrMessages["WARR_SERVNB"] = "Determine this system's eligibility for Lenovo's International Warranty Service and/or its service level."; //warrMessages["TMP189"] = "Visit Premium Support Site for a full list of services and issues supported."; /* end: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/warranty/control.js(21414) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/sort/control.js (cachekey: [])*/ var sfCss365 = ["", ".sortVendor { font-weight:bold; }", ""].join("\n"); head = head = document.head || document.getElementsByTagName('head')[0]; style = document.createElement("style"); style.type = "text/css"; if (style.styleSheet) { style.styleSheet.cssText = sfCss365; } else { style.appendChild(document.createTextNode(sfCss365)); } head.appendChild(style); function securitySortCore(map) { //do stuff to manipulate the 'map' array //then return it to the main configurator app for(var i=0;i= 0 || thefeat[f].pn == "NB_SW_APP") { thefeat[f].selections[0].subselections = sortEmOut(thefeat[f].selections[0].subselections); } else if(thefeat[f].pn == "DDS_ADOBE" || thefeat[f].pn.indexOf("SOFTWARE_ADOBE") >= 0) { thefeat[f].selections[0].subselections = sortAdobe(thefeat[f].selections[0].subselections); } } } } } function sortAdobe(elements) { var sortedArray = []; for(var index=0;index 0 || macfeevs.length > 0) { //$("
  • McAfee
  • ").appendTo(elementul); macfeeis[0].data['vendor'] = "McAfee"; for(var ee=0;eeInternet Security").appendTo(elementul); } sortedArray[sortedArray.length] = macfeeis[ee]; } for(var ee=0;eeVirusScan").appendTo(elementul); macfeevs[ee].data['vendorsubtitle'] = "VirusScan"; } sortedArray[sortedArray.length] = macfeevs[ee]; } } if(nortonav.length > 0 || nortonis.length > 0) { //$("
  • Norton
  • ").appendTo(elementul); nortonis[0].data['vendor'] = "Norton"; for(var ee=0;eeInternet Security").appendTo(elementul); nortonis[ee].data['vendorsubtitle'] = "Internet Security"; } sortedArray[sortedArray.length] = nortonis[ee]; } for(var ee=0;eeAntivirus").appendTo(elementul); nortonav[ee].data['vendorsubtitle'] = "Antivirus"; } sortedArray[sortedArray.length] = nortonav[ee]; } } if(computracest.length > 0 || computracepr.length > 0) { // $("
  • Computrace
  • ").appendTo(elementul); computracest[0].data['vendor'] = "Computrace"; for(var ee=0;eeLoJack Standard").appendTo(elementul); computracest[ee].data['vendorsubtitle'] = "LoJack Standard"; } sortedArray[sortedArray.length] = computracest[ee]; } for(var ee=0;eeLoJack Premium").appendTo(elementul); computracepr[ee].data['vendorsubtitle'] = "LoJack Premium"; } sortedArray[sortedArray.length] = computracepr[ee]; } } for(var ee=0;eeAdditional Security software of interest").appendTo(elementul); others[0].data['vendor'] = "Additional Security software of interest"; } sortedArray[sortedArray.length] = others[ee]; } return sortedArray; } function securitySort() { if(showSpiderman) { this.render = securitySortCore; addToOverrideQueue(this, window.renderBeforeRenderUIModules); } } new securitySort(); /* end: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/sort/control.js(5916) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/365/control.js (cachekey: [])*/ function resolutionHMDToggle(e, anchor, displaymodes) { var nowres = $(anchor).css("-webkit-animation-name"); if(nowres == "" || nowres == null) { nowres = $(anchor).css("animation-name"); } if(nowres == "" || nowres == null) { nowres = "mobile"; } var displaymode = displaymodes[nowres]; anchor.href = displaymode.hmd; anchor.id = "hmd365link"; if(displaymode.type == "overlay") { $.fancybox({ //width: 700, //height: 460, autoSize: true, href: anchor.href, type: 'ajax', onClosed: function() { //$("#hmd365link").removeClass("hmdExpanded"); //$("#hmd365link").next("div").addClass("is-visuallyhidden"); $("#hmd365link").click(); } }); if(e && e.cancelBubble) { e.cancelBubble = true; } return false; } } function officeHoverChange(partNum) { var imgUrl = ''; var imgAlt = ''; var prodType = (typeof $('meta[name="ProductType"]').attr('content') != 'undefined') ? $('meta[name="ProductType"]').attr('content').toLowerCase() : ''; var modelName = (typeof $('meta[name="ModelNumber"]').attr('content') != 'undefined') ? $('meta[name="ModelNumber"]').attr('content').toLowerCase() : ''; if(partNum == '') { if(location.href.indexOf('/laptops/thinkpad/') > 0 || location.href.indexOf('/desktops/thinkcentre/') > 0 || location.href.indexOf('/workstations/thinkstation/') > 0) { partNum = $(".officeContainer input:checked").attr("data-pn"); } else{ //get the last checked item and use it for the box content partNum = $(".officeContainer input:checked").last().attr("data-pn"); } } if(typeof partNum == 'undefined') { if((prodType.indexOf('tablet') > -1) && (modelName.indexOf('helix') == -1)) { imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/ms-config-box-generic.png'; imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-2016-none.png'; } else { imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/ms-config-box-none.png'; imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-2016-not-included.png'; } imgAlt = 'get the most out of your new pc by adding a Microsoft Office product.'; } else if(partNum == '0C47870' || partNum.indexOf('MSOF2013HS_') > -1 || partNum.indexOf('MSOF2013H_') > -1) { imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/ms-config-box-home-student.png'; //imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-2016-hs.png' imgAlt = 'microsoft office home and student is a permanant license for 1 pc and includes word, excel, power point, and one note.'; } else if(partNum == '0C47872' || partNum.indexOf('MSOF2013HB_') > -1 || partNum.indexOf('MSOF2013B_') > -1) { imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/ms-config-box-home-business.png'; imgAlt = 'microsoft office home and business is a permanant license for 1 pc and includes word, excel, power point, one note, and outlook.'; } else if(partNum == '0C47874' || partNum.indexOf('MSOF2013P_') > -1 || partNum.indexOf('MSOF2013PA_') > -1 ) { imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/ms-config-box-professional.png'; imgAlt = 'microsoft office professional is a permanant license for 1 pc and includes word, excel, power point, one note, outlook, publisher, and access.'; } else if (partNum == 'AAA-04258-LENOVO') { imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/ms-config-box-365-home.png'; imgAlt = 'microsoft office 365 home is an annual subscription for up to 5 pcs and 5 tablet. It includes word, excel, power point, one note, outlook, publisher, and access and 1 TB of free cloud storage.'; } else if (partNum == 'QQ2-00011-LENOVO') { imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/ms-config-box-365-personal.png'; imgAlt = 'microsoft office 365 personal is an annual subscription for 1 pc and 1 tablet. It includes word, excel, power point, one note, outlook, publisher, and access and 1 TB of free cloud storage.'; } //start Office 2016 parts else if (partNum == "4ZN0K14095" || partNum == "EPOFFICE_OFFICE 365 HOME_MM" || partNum== "NB_MSOF_LANG_OFFICE_365_PERSONAL_AFOLB_DM" || partNum =="5MS0N01352"){ //4ZN0K14095 #N/A Software Microsoft Office 365 Personal imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-2016-h365personal-update.png'; imgAlt = 'microsoft office 365 personal is an annual subscription for 1 pc and 1 tablet. It includes word, excel, power point, one note, outlook, publisher, and access and 1 TB of free cloud storage.'; } else if (partNum == "4ZN0J40225" || partNum == "EPOFFICE_OFFICE 365 PERS_MM" || partNum== "NB_MSOF_LANG_OFFICE_365_HOME_AFOLB_DM" || partNum =="5MS0N01354"){ //4ZN0J40225 #N/A Software Microsoft Office 365 Home imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-2016-h365-updated.png'; imgAlt = 'microsoft office 365 home is an annual subscription for up to 5 pcs and 5 tablet. It includes word, excel, power point, one note, outlook, publisher, and access and 1 TB of free cloud storage.'; } else if (partNum == "4L40K61649" || partNum== "NB_MSOF_LANG_OFFICE_H&S_2016_MM" || partNum == "DTOFFICE_SOFTWARE_OFFICE_H_S_2016_MM" || partNum=="EPOFFICE_OFFICE H_S 2016_MM" || partNum== "NB_MSOF_LANG_OFFICE_H&S_2016_AFOLB_DM" || partNum =="5MS0N01353"){ //4L40K61649 #N/A Software Microsoft® Office Home and Student 2016 imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-2016-hs-updated.png'; imgAlt = 'microsoft office home and student is a permanant license for 1 pc and includes word, excel, power point, and one note.'; } else if (partNum == "4L40K61653" || partNum == "SBB0K60440" || partNum== "NB_MSOF_LANG_OFFICE_H&B_2016_NON_EU" || partNum == "DTOFFICE_SOFTWARE_OFFICE_H_B_2016_NON-EU" || partNum == "EPOFFICE_OFFICE H_B 2016_NONEU" || partNum== "NB_MSOF_LANG_OFFICE_H&B_2016_AFOLB_NON_EU" || partNum =="5MS0N01356"){ //4L40K61653 #N/A Software Microsoft® Office Home and Business 2016 imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-2016-hb-updated.png'; imgAlt = 'microsoft office home and business is a permanant license for 1 pc and includes word, excel, power point, one note, and outlook.'; } else if (partNum == "4L40K61656" || partNum == "SBB0K60443" || partNum== "NB_MSOF_LANG_OFFICE_PRO_2016_NON_EU" || partNum == "DTOFFICE_SOFTWARE_OFFICE_PRO_2016_NON-EU" || partNum == "EPOFFICE_OFFICE PRO 2016_NONEU" || partNum == "NB_MSOF_LANG_OFFICE_PRO_2016_AFOLB_NON_EU" || partNum == "5MS0N01355"){ //4L40K61656 #N/A Software Microsoft® Office Professional 2016 imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-2016-pro-updated.png'; imgAlt = 'microsoft office professional is a permanant license for 1 pc and includes word, excel, power point, one note, outlook, publisher, and access.'; } else if (partNum == "NB_MSOF_LANG_ACROBAT_DC+H&B_2016_NON_EU" || partNum == "DTOFFICE_SOFTWARE_ACROBAT_DC+H_B_2016_NON-EU" || partNum == "EPOFFICE_MSOF2016B_ADOBEACROBATDC_NONEU" || partNum=="NB_MSOF_LANG_ACROBAT_DC+H&B_2016_AFO_NON_EU"){ //Software Microsoft Office Home & Business+Acrobat DC imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-HS-Adobe.png'; imgAlt = 'microsoft office 365 home is an annual subscription for up to 5 pcs and 5 tablet. It includes word, excel, power point, one note, outlook, publisher, and access and 1 TB of free cloud storage.'; } else if (partNum == "NB_MSOF_LANG_ACROBAT_DC+PRO_2016_NON_EU" || partNum == "DTOFFICE_SOFTWARE_ACROBAT_DC+PRO_2016_NON-EU" || partNum == "EPOFFICE_MSOF2016P_ADOBEACROBATDC_NONEU" || partNum=="NB_MSOF_LANG_ACROBAT_DC+PRO_2016_AFO_NON_EU"){ //Software Microsoft Office Home & Business+Acrobat DC imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-Pro-Adobe.png' imgAlt = 'microsoft office 365 home is an annual subscription for up to 5 pcs and 5 tablet. It includes word, excel, power point, one note, outlook, publisher, and access and 1 TB of free cloud storage.'; } else { if((prodType.indexOf('tablet') > -1) && (modelName.indexOf('helix') == -1)) { imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/ms-config-box-generic.png'; imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-2016-none.png'; } else { imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/ms-config-box-none.png'; imgUrl = 'http://www.lenovo.com/shop/americas/content/img_lib/microsoft/Office/mso-2016-not-included.png'; } imgAlt = 'get the most out of your new pc by adding a Microsoft Office product.'; } if(imgUrl != '') { $("#officeHoverImage").attr("src", imgUrl); $("#officeHoverImage").attr("alt", imgAlt); } } function renderOffice(map, json){ var model_type= "mtm"; //console.log("checking variables..."); //console.log(json); $.each( json, function( key, value ) { if(key == "basedata"){ var basedata = json["basedata"]; //console.log(basedata); $.each( basedata, function( i, n ) { //console.log( i + ": " + n ); if(basedata["mtm"] == ""){ model_type = "cto"; } else{ model_type = "mtm"; } }); } }); console.log("model :" + model_type); if((location.href.indexOf('/laptops/thinkpad/') > 0 || location.href.indexOf('/tablets/thinkpad/') > 0 || location.href.indexOf('/desktops/thinkcentre/') > 0 || location.href.indexOf('/workstations/thinkstation/') > 0 ) && model_type == "cto"){ renderMsSBB(map); } else{ renderMs365(map); } } function renderMsSBB(map){ //console.log("testing variables "); console.log("SBB PNs"); var offceSbb= null; var officeOption = null; var win7Selected = false; for(var i=0;i= 0) { features[f].expanded = true; for(var ss=0;ss 0){ console.log(features[f].selections[0].subselections[ss].data.pn); features[f].selections[0].subselections.splice(ss,1); ss--; } } //console.log(features[f].selections[0].subselections.length); //if(features[f].selections[0].subselections.length > 1 || features[f].selections[0].subselections.length == 0) if(features[f].selections[0].subselections.length > 1) { if(!win7Selected){ window.SbbsEnabled = true; } offceSbb = features[f]; offceSbb.selections[0].data.officetop = true; offceSbb.selections[0].data.officeHoverBegin = true; //offceSbb.selections[0].data.officeHoverEnd = "false"; offceSbb.expanded = true; features[f].expanded = true; //create 365 selection group var office35 = { "type": "feature", "parentitem": offceSbb.parentitem, "item": offceSbb.item, "image": offceSbb.image, "title": offceSbb.title, "visited": offceSbb.visited, "visible": offceSbb.visible, "pn": offceSbb.pn, "selections": [ { "element": "group", "data": { "item": offceSbb.item, "visible": offceSbb.visible, "image": offceSbb.image, "largeimage": "", "title": offceSbb.title, "infolink": "", "inventoryWarning": "", "officeHoverEnd": "true", "officebottom": true, }, "subselections": [], "current": false } ], "hidden": false, "subtitle": "", "current": false, "expanded": true }; //separate partnumbers that have 365 to form myoffice subselections for(var po=offceSbb.selections[0].subselections.length-1;po>=0;po--) { var officeSubSel = offceSbb.selections[0].subselections[po]; //var office2013 = (officeSubSel.data.pn == "0C47870" || officeSubSel.data.pn == "0C47872" || officeSubSel.data.pn == "0C47874" || officeSubSel.data.pn == "QQ2-00011-LENOVO" || officeSubSel.data.pn == "AAA-04258-LENOVO")? true : false; if(officeSubSel.data.title.indexOf("365") > 0) { officeSubSel.data.officeHover=true; office35.selections[0].subselections.unshift(officeSubSel); offceSbb.selections[0].subselections.splice(po, 1); } } if(office35.selections[0].subselections.length > 0) { office35.selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-365-logo.jpg"; office35.selections[0].data.officeHoverEnd = "true"; //office35.selections[0].data.officeHoverBegin = true; office35.selections[0].data.hmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; office35.selections[0].data.tablethmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; office35.selections[0].data.phonehmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; } else { offceSbb.selections[0].data.officeHoverBegin = true; offceSbb.selections[0].data.officeHover = "true"; offceSbb.selections[0].data.officeHoverBegin = "true"; offceSbb.selections[0].data.officeHoverEnd = "true"; offceSbb.selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-logo-orange.jpg"; for(var ss=0;ss 0){ for(var s=0;s= 0 || modelNum.indexOf("android") >= 0) { for(x=0;thefeat && x= 0) { thefeat[f].title = 'Antivirus, Internet Security and Theft Protection'; } else if(thefeat[f].pn.indexOf("SOFTWARE_GRAPHICS") >= 0) { thefeat[f].title = 'Video, Audio, and Creation Software'; } else if(thefeat[f].pn.indexOf("SOFTWARE_UTILITIES") >= 0) { thefeat[f].title = 'Tools and Utilities'; } else if(thefeat[f].pn.indexOf("SOFTWARE_ADOBE") >= 0) { for(var aa=0;aa=0;po--) { var officeSubSel = parentoffice.selections[0].subselections[po]; var office2013 = (officeSubSel.data.pn == "0C47870" || officeSubSel.data.pn == "0C47872" || officeSubSel.data.pn == "0C47874" || officeSubSel.data.pn == "QQ2-00011-LENOVO" || officeSubSel.data.pn == "AAA-04258-LENOVO")? true : false; if(officeSubSel.data.title.indexOf("365") > 0 || office2013) { if(site != "outlet_us" && officeSubSel.data.pn.indexOf("-LENOVO") == -1 && !office2013) { //myoffice.selections[0].subselections[myoffice.selections[0].subselections.length] = parentoffice.selections[0].subselections[po]; myoffice.selections[0].subselections.unshift(officeSubSel); } parentoffice.selections[0].subselections.splice(po, 1); } } if(myoffice.selections[0].subselections.length > 0) { myoffice.selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-365-logo.jpg"; myoffice.selections[0].data.officeHoverEnd = "true"; myoffice.selections[0].data.hmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; myoffice.selections[0].data.tablethmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; myoffice.selections[0].data.phonehmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; } else if(parentoffice.selections[0].subselections.length > 0) { parentoffice.selections[0].data.officeHoverBegin = true; parentoffice.selections[0].data.officeHover = "true"; parentoffice.selections[0].data.officeHoverBegin = "true"; parentoffice.selections[0].data.officeHoverEnd = "true"; for(var ss=0;ss 0) { parentoffice.selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-logo-orange.jpg"; parentoffice.selections[0].data.hmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; parentoffice.selections[0].data.tablethmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; parentoffice.selections[0].data.phonehmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; if(myoffice.selections[0].subselections.length > 0) { for(var s=0;s 0){ thefeat[f] = myoffice; } else if(site == "outlet_us") { thefeat[0].selections[0].data.officetop = false; thefeat[0].selections[0].data.officeHoverBegin = false; thefeat[0].selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-logo-orange.jpg"; var message = { "element" : "note", "current" : false, "data" : { "title" : "Microsoft Office Temporarily Unavailable", "visible" : true, } }; thefeat[0].selections[0].subselections.push(message); } } } } else { if(map[i].active) { window.softwareTab = false; } } } if(window.configuratorTab){ window.OfficeSelected = false; if(window.SbbsEnabled){ window.OfficeSelected = true; } } } function renderMs365(map) { //console.log("Checking variable..."); console.log("Option PNs"); //do stuff to manipulate the 'map' array //then return it to the main configurator app for(var i=0;i 0 || thefeat[f].pn == "EPOFFICE" || thefeat[f].pn == "DTOFFICE" || thefeat[f].pn == "DTOFFICE_SOFTWARE") { //TEMP: REMOVE THE OFFICE SECTION ON PAGE 1 //thefeat.splice(f,1); bundle = thefeat[f]; /*bundle.selections[0].data.officetop = false; bundle.selections[0].data.officeHoverBegin = false; bundle.expanded = false;*/ //parentoffice.selections[0].data.officetop = true; //expand the section thefeat[f].expanded = true; //remove the 2013 parts for(var ss=0; ss < thefeat[f].selections[0].subselections.length; ss++){ var subsel = thefeat[f].selections[0].subselections[ss]; if(subsel.data.pn.indexOf("2013") >= 0 || thefeat[f].pn == "EPOFFICE" || subsel.data.pn.indexOf("DTOFFICE_SOFTWARE_OFFICE") >= 0 || subsel.data.pn.indexOf("NB_MSOF_LANG_OFFICE") >= 0){ thefeat[f].selections[0].subselections.splice(ss,1); ss--; } } thefeat.splice(f,1); } if(thefeat[f].pn.indexOf("ADOBE") >= 0) { for(var aa=0;aa= 0) { thefeat[f].expanded = true; } } //console.log(parentoffice); if(parentoffice != null) { //create myoffice selection group var myoffice = { "type": "feature", "parentitem": parentoffice.parentitem, "item": parentoffice.item, "image": parentoffice.image, "title": parentoffice.title, "visited": parentoffice.visited, "visible": parentoffice.visible, "pn": parentoffice.pn, "selections": [ { "element": "group", "data": { "item": parentoffice.item, "visible": parentoffice.visible, "image": parentoffice.image, "largeimage": "", "title": parentoffice.title, "infolink": "", "inventoryWarning": "", "officeHoverEnd": "true", "officebottom": true, }, "subselections": [], "current": false } ], "hidden": false, "subtitle": "", "current": false, "expanded": true }; //create adobe/MS selection group var adobeMsBundleObj = { "type": "feature", "parentitem": parentoffice.parentitem, "item": parentoffice.item, "image": parentoffice.image, "title": parentoffice.title, "visited": parentoffice.visited, "visible": parentoffice.visible, "pn": parentoffice.pn, "selections": [ { "element": "group", "data": { "item": parentoffice.item, "visible": parentoffice.visible, "image": parentoffice.image, "largeimage": "", "title": parentoffice.title, "infolink": "", "inventoryWarning": "", "officeHoverEnd": "true", "officebottom": true, }, "subselections": [], "current": false } ], "hidden": false, "subtitle": "", "current": false, "expanded": true }; //console.log(parentoffice); //separate partnumbers that have 365 to form myoffice subselections for(var po=parentoffice.selections[0].subselections.length-1;po>=0;po--) { var officeSubSel = parentoffice.selections[0].subselections[po]; var office2013 = (officeSubSel.data.pn == "0C47870" || officeSubSel.data.pn == "0C47872" || officeSubSel.data.pn == "0C47874" || officeSubSel.data.pn == "QQ2-00011-LENOVO" || officeSubSel.data.pn == "AAA-04258-LENOVO")? true : false; //separate the OfficeAdobe bundle section to the top position var adobeMSbundle = (officeSubSel.data.pn == "NB_MSOF_LANG_ACROBAT_DC+PRO_2016_NON_EU" || officeSubSel.data.pn == "NB_MSOF_LANG_ACROBAT_DC+H&B_2016_NON_EU" || officeSubSel.data.pn == "NB_MSOF_LANG_NONE") || (officeSubSel.data.pn == "DTOFFICE_SOFTWARE_ACROBAT_DC+H_B_2016_NON-EU" || officeSubSel.data.pn == "DTOFFICE_SOFTWARE_ACROBAT_DC+PRO_2016_NON-EU" || officeSubSel.data.pn == "DTOFFICE_SOFTWARE_NONE" || officeSubSel.data.pn == 'NB_MSOF_LANG_ACROBAT_DC+H&B_2016_AFO_NON_EU' || officeSubSel.data.pn == 'NB_MSOF_LANG_ACROBAT_DC+PRO_2016_AFO_NON_EU')? true : false; if(officeSubSel.data.title.indexOf("365") > 0 || office2013) { if(site != "outlet_us" && officeSubSel.data.pn.indexOf("-LENOVO") == -1 && !office2013) { //myoffice.selections[0].subselections[myoffice.selections[0].subselections.length] = parentoffice.selections[0].subselections[po]; myoffice.selections[0].subselections.unshift(officeSubSel); } parentoffice.selections[0].subselections.splice(po, 1); } else if(adobeMSbundle){ officeSubSel.data.officeHover=false; adobeMsBundleObj.selections[0].subselections.unshift(officeSubSel); parentoffice.selections[0].subselections.splice(po, 1); } } if(adobeMsBundleObj.selections[0].subselections.length > 0) { adobeMsBundleObj.selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-365-logo.jpg"; adobeMsBundleObj.selections[0].data.officeHoverEnd = false; adobeMsBundleObj.selections[0].data.officebottom = false; adobeMsBundleObj.selections[0].data.bundleTop = true; adobeMsBundleObj.selections[0].data.adobeOfficebundle = true; adobeMsBundleObj.selections[0].data.hmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; adobeMsBundleObj.selections[0].data.tablethmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; adobeMsBundleObj.selections[0].data.phonehmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; } else { parentoffice.selections[0].data.officeHoverBegin = true; parentoffice.selections[0].data.officeHover = "true"; parentoffice.selections[0].data.officeHoverBegin = "true"; parentoffice.selections[0].data.officeHoverEnd = "true"; parentoffice.selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-logo-orange.jpg"; for(var ss=0;ss 0) { myoffice.selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-365-logo.jpg"; myoffice.selections[0].data.officeHoverEnd = "true"; myoffice.selections[0].data.hmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; myoffice.selections[0].data.tablethmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; myoffice.selections[0].data.phonehmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; } else { parentoffice.selections[0].data.officeHoverBegin = true; parentoffice.selections[0].data.officeHover = "true"; parentoffice.selections[0].data.officeHoverBegin = "true"; parentoffice.selections[0].data.officeHoverEnd = "true"; parentoffice.selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-logo-orange.jpg"; for(var ss=0;ss 0) { parentoffice.selections[0].data.officeHoverEnd = false; parentoffice.selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-logo-orange.jpg"; parentoffice.selections[0].data.hmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; parentoffice.selections[0].data.tablethmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; parentoffice.selections[0].data.phonehmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; if(myoffice.selections[0].subselections.length > 0) { for(var s=0;s 0){ for(var s=0;s= 0) // { // thefeat[x].title = "Tools and Utilities Software"; // break; // } //} if(window.OfficeSelected == true || modelNum.indexOf("100s") >= 0 || modelNum.indexOf("android") >= 0) { for(x=0;thefeat && x= 0) { thefeat[f].title = 'Antivirus, Internet Security and Theft Protection'; } else if(thefeat[f].pn.indexOf("SOFTWARE_GRAPHICS") >= 0) { thefeat[f].title = 'Video, Audio, and Creation Software'; } else if(thefeat[f].pn.indexOf("SOFTWARE_UTILITIES") >= 0) { thefeat[f].title = 'Tools and Utilities'; } else if(thefeat[f].pn.indexOf("SOFTWARE_ADOBE") >= 0) { for(var aa=0;aa=0;po--) { var officeSubSel = parentoffice.selections[0].subselections[po]; var office2013 = (officeSubSel.data.pn == "0C47870" || officeSubSel.data.pn == "0C47872" || officeSubSel.data.pn == "0C47874" || officeSubSel.data.pn == "QQ2-00011-LENOVO" || officeSubSel.data.pn == "AAA-04258-LENOVO")? true : false; if(officeSubSel.data.title.indexOf("365") > 0 || office2013) { if(site != "outlet_us" && officeSubSel.data.pn.indexOf("-LENOVO") == -1 && !office2013) { //myoffice.selections[0].subselections[myoffice.selections[0].subselections.length] = parentoffice.selections[0].subselections[po]; myoffice.selections[0].subselections.unshift(officeSubSel); } parentoffice.selections[0].subselections.splice(po, 1); } } if(myoffice.selections[0].subselections.length > 0) { myoffice.selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-365-logo.jpg"; myoffice.selections[0].data.officeHoverEnd = "true"; myoffice.selections[0].data.hmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; myoffice.selections[0].data.tablethmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; myoffice.selections[0].data.phonehmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; } else if(parentoffice.selections[0].subselections.length > 0) { parentoffice.selections[0].data.officeHoverBegin = true; parentoffice.selections[0].data.officeHover = "true"; parentoffice.selections[0].data.officeHoverBegin = "true"; parentoffice.selections[0].data.officeHoverEnd = "true"; for(var ss=0;ss 0) { parentoffice.selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-logo-orange.jpg"; parentoffice.selections[0].data.hmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; parentoffice.selections[0].data.tablethmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; parentoffice.selections[0].data.phonehmdlink = window.long_url + "/builder.workflow:HMD?page=/ISS_Static/ww/wci3/us/en/accessories/builder/office-2016-hmd-rwd.html"; if(myoffice.selections[0].subselections.length > 0) { for(var s=0;s 0){ thefeat[f] = myoffice; } else if(site == "outlet_us") { thefeat[0].selections[0].data.officetop = false; thefeat[0].selections[0].data.officeHoverBegin = false; thefeat[0].selections[0].data.image = "http://www.lenovo.com/shop/americas/content/img_lib/design_elements/lenovo-microsoft-logo-orange.jpg"; var message = { "element" : "note", "current" : false, "data" : { "title" : "Microsoft Office Temporarily Unavailable", "visible" : true, } }; thefeat[0].selections[0].subselections.push(message); } } } //console.log(map); } else { if(map[i].active) { window.softwareTab = false; } } }//for if(window.configuratorTab){ window.OfficeSelected = false; $("input").each(function(){ if(!window.softwareTab) { //check to see if this is the ms office none radio button var dataPn = $(this).attr('data-pn'); var isChecked = $(this).is(":checked"); //if any of the office part numbers are selcted, set the indicator to true //check laptop part numbers if((dataPn == '5MS0N01353' || dataPn == '5MS0N01356' || dataPn == '5MS0N01355'|| dataPn == 'SBB0K60440' || dataPn == 'SBB0K60443') && isChecked) { window.OfficeSelected = true } //check office 365 part numbers else if((dataPn == '5MS0N01352' || dataPn == '5MS0N01354') && isChecked) { window.OfficeSelected = true } } }); } } function ms365() { if(showSpiderman) { this.render = renderOffice; addToOverrideQueue(this, window.renderBeforeRenderUIModules); /*var model_type= $('meta[name="PartNumber"]').attr('content'); if((location.href.indexOf('/laptops/thinkpad/') > 0 || location.href.indexOf('/tablets/thinkpad/') > 0 || location.href.indexOf('/desktops/thinkcentre/') > 0 || location.href.indexOf('/workstations/thinkstation/') > 0 ) && model_type.indexOf("CTO") > 0) { console.log("sbb"); this.render = renderMsSBB; addToOverrideQueue(this, window.renderBeforeRenderUIModules); } else{ this.render = renderMs365; addToOverrideQueue(this, window.renderBeforeRenderUIModules); }*/ } } new ms365();// JavaScript Document /* end: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/365/control.js(51278) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/orientationreset.js (cachekey: [])*/ /* orientationreset : need to reset models list on viewport change*/ (function(app) { var self = app.SUBSERIESTABS = (app.SUBSERIESTABS || {}); self.onResize = function() { //if there is a previous button assume that models can be scrolled var butt = $("button.js-previous"); if(butt.length > 0) { var container = butt.closest(".tabbedBrowse-module"); self.focusProductListing(container.find(".tabbedBrowse-productListing-container"), 0, true); } //adjust row heights, as necessary self.matchHeights(); //update elements on window resize self.updateContent(); }; })(window.LENOVO = window.LENOVO || {}); /* end: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/orientationreset.js(718) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/layoutFixes/layoutFixes.js (cachekey: [])*/ //layoutFixes.js //used to fix layout issues on subseries pages $( document ).ready(function() { //determine if any items have an e-coupon if($("#tab-customize div.pricingSummary-coupon").length > 1) { //apply a style to all products missing an e-coupon $("#tab-customize div.pricingSummary-secondary-details .pricingSummary-shipping:first-child").before("
    "); } }); /* end: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/layoutFixes/layoutFixes.js(436) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/accessories/control.js (cachekey: [])*/ function renderAccHandler(map) { var accActive = false; for(var i=0;i 0){ $(".configuratorItem-accessories-wrapper").addClass("accessory-container"); $(".recommmendAccessory-wrapper").addClass("visibleIB"); } var removeCatPNs= ['PAGE3_NB_CCASE_BUSINESS', 'PAGE3_NB_CCASE_WOMEN', 'PAGE3_DT_PRINTER_DEV'] var gamingPNs = ['GXY0K07131', 'GX30J34225', 'GXD0J36354', 'GX30K04088', 'GX30K04088'] var selectionJSON = []; var thefeat = map[i].features; if(thefeat != null && typeof thefeat != 'undefined'){ for(var f=0;f= 0){ thefeat[f].title = "Docking Stations"; } else if (thefeat[f].pn.indexOf("ADDACC_MULTIMEDIA") >= 0){ thefeat[f].title = "Audio Accessories"; } else if (thefeat[f].pn.indexOf("EXPANSION_PD") >= 0){ thefeat[f].title = "Mice"; } var modelNum = (typeof $('meta[name="ModelNumber"]').attr('content') != 'undefined') ? $('meta[name="ModelNumber"]').attr('content').toLowerCase() : ''; var modelName = (typeof $('meta[name="ModelName"]').attr('content') != 'undefined') ? $('meta[name="ModelName"]').attr('content').toLowerCase() : ''; var site = (typeof $('meta[name="Site"]').attr('content') != 'undefined') ? $('meta[name="Site"]').attr('content').toLowerCase() : ''; //remove the womens cases, business cases, and printers for all products var removeFeat = (removeCatPNs.indexOf(thefeat[f].pn) >= 0 && (modelNum.indexOf('erazer') >= 0 || modelName.indexOf('y series') >= 0))?true:false; if(site == "outlet_us"){ //remove any out of stock items for(var s=0; s< thefeat[f].selections.length; s++){ var selection = thefeat[f].selections[s]; var hasParts = false; for(var ss=0; ss < selection.subselections.length; ss++){ var subsel = selection.subselections[ss]; if(subsel.element != "note" && subsel.data.messages.inventoryDepleted){ selection.subselections.splice(ss,1); ss--; } else if (subsel.element != "note"){ hasParts = true; } } if(!hasParts){ //if there are no in-stock parts for the feature, mark the feature for deletion removeFeat = true; } } } //if this is a y series or an erazer series, add the gaming section if(modelName.indexOf('y series') >= 0 || modelNum.indexOf('erazer') >= 0 || modelNum.indexOf('y700') >= 0){ for(var ss=0; ss = 0){ var subSel = thefeat[f].selections[0].subselections[ss]; selectionJSON.push(subSel); } } } //If the feature is marked for deletion, remove the feature from the JSON if(removeFeat){ thefeat.splice(f,1); f--; } } } if(selectionJSON.length > 0) { var gamingSection = { "type": "feature", "parentitem": "item://i2.config.box/1/1693", "item": "1328983730971060731", "image": "/ISS_Static/WW/AG/merchandising/US/popups/hmd/images/Accessories Icons/headphones_50.png", "title": "Gaming Accessories", "visited": "false", "visible": "true", "pn": "TMP999", "expanded": "true", "selections": [ { "element": "group", "data": { "item": "4051113867717857061", "visible": "false", "image": "/ISS_Static/WW/AG/merchandising/US/popups/hmd/images/Accessories Icons/keyboardmultifunction_50.png", "largeimage": "", "title": "Multifunction hand-held keyboard", "hmdlink": "", "infolink": "", "inventoryWarning": "" }, "subselections": selectionJSON } ] }; map[i].features.unshift(gamingSection); } //SLI - Recs if($('meta[name="Site"]').attr('content') == "web"){ var sliProd_oids = new Array(); var sliProd_skus = new Array(); var model_oid; if(window.NABUILDER.params.oid){ model_oid = window.NABUILDER.params.oid; }else { model_oid = window.NABUILDER.params.sb; } var prod_oids = $('meta[name="metaidentifier"]').attr('content').replace(/:/g,'_'); sliProd_oids = prod_oids.split(","); var prod_skus = $('meta[name="SKU"]').attr('content').replace(/:/g,'_'); sliProd_skus = prod_skus.split(","); model_oid = model_oid.replace(/:/g,'_') var index_modelID = sliProd_oids.indexOf(model_oid); $(".recommmendAccessory-wrapper").wrap('
    '); $(".configuratorItem-accessories-wrapper").addClass("accessory-container"); $.getScript("//lenovo.resultspage.com/recommendations/wrapper.js"); //popup message for recommended items $(document).ajaxSuccess(function (e, xhr, s) { if (s.url.indexOf("sli-r.com") > -1) { console.log("SLI"); $('body').before('
    Price will be reflected in Shopping Cart.
    '); $('#r-message').delay(3000).fadeOut(function() { $(this).remove(); }); } }); } } } if(!accActive){ $(".configuratorItem-accessories-wrapper").removeClass("accessory-container"); $(".recommmendAccessory-wrapper").removeClass("visibleIB"); } } function accHandler(){ if(showSpiderman){ this.render = renderAccHandler; addToOverrideQueue(this, window.renderBeforeRenderUIModules); } } new accHandler(); /* end: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/accessories/control.js(6446) */ /* start: /ISS_Static/WW/ag/js/oneweb/subseries/rwd/test/stagelight/control.js (cachekey: [])*/ function renderStagelight(map) { //do stuff to manipulate the 'map' array //then return it to the main configurator app for(var i=0;i'; dtemplate[dtemplate.length] = ' Add to cart'; dtemplate[dtemplate.length] = ' '; dtemplate[dtemplate.length] = ' '; dtemplate[dtemplate.length] = ' {{/items}}'; dtemplate[dtemplate.length] = '' $(dtemplate.join("")).appendTo($("head")); */ dtemplate[dtemplate.length] = '' $(dtemplate.join("")).appendTo($("head")); var dynRec = $("#dynamic-recommendation").html(); var dynRecTemplate = Handlebars.compile(dynRec); var dynRecHtml = ""; /* load promo item data */ if(!window.recOidsDone) { $(document).ready(function() { $.getScript(long_url + "/wci.workflow:load?page=/WW/wci3/us/en/rest/item/recs/index.html&oids=" + recOids.join(","), function() { dynRecHtml = dynRecTemplate(recJson); window.recOidsDone = true; }); }); } /* load recs */ function tabletPromoHandler(map, ojson) { if(recOids.length == 0) { return; } /* create tablet offers section */ //mobile interstitial page does not have tab map!!! var tabsExist = false; for(var i=0;i
    ' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '' + '
    ' + '
    ' + '' + '' + '' + '' + '' + '
    ' + '' + '
    '; */ // Enabling this pushes debug log to browser console var FLOATING_POPUP_DEBUG = false; var FLOATING_POPUP_DEBUG_PREFIX = 'floating_popup'; var FLOATING_POPUP_DEFAULT_WIDTH = 460; var FLOATING_POPUP_DEFAULT_HEIGHT = 300; var floatingPopupID = ""; var styleDimensionSuffix = "px"; var floatingPopupHorizontalScroll = false; var floatingPopupVerticalScroll = false; // Start floatingPopup with this function. function openFloatingPopup(popupContentHtml, popupId) { floatingPopupShowDimmer(popupContentHtml); /* logFloatingPopup("open"); floatingPopupID = popupId; floatingPopupDoBrowserCustomization(); if(popupContentHtml!=null) { // document.getElementById("floatingPopupContent").innerHTML = popupContentHtml; $('#floatingPopupContent').html( popupContentHtml ) ; } floatingPopupRunning = true; floatingPopupShowDimmer(); showFloatingPopup(); initializeFloatingPopup(); // Set initial position checkWindowSize(); // Bind position update to resize/scroll events $(window).bind('resize.floatingPopup', checkWindowSize); */ } var floatingPositiveResponse = "1"; var floatingNegativeResponse = "-1"; var floatingCancelResponse = "0"; var floatingPopupRunning = false; function disableFloatingPopupLinks() { /* document.getElementById("floatingPopupNegativeButtonLink1").style.cursor = 'wait'; document.getElementById("floatingPopupNegativeLabel").style.cursor = 'wait'; document.getElementById("floatingPopupNegativeButtonLink1").href = '#'; document.getElementById("floatingPopupNegativeLabel").href = '#'; document.getElementById("floatingPopupPositiveButtonLink1").style.cursor = 'wait'; document.getElementById("floatingPopupPositiveLabel").style.cursor = 'wait'; document.getElementById("floatingPopupPositiveButtonLink1").href = '#'; document.getElementById("floatingPopupPositiveLabel").href = '#'; */ } function enableFloatingPopupLinks() { /* document.getElementById("floatingPopupNegativeButtonLink1").href = 'javascript:closeFloatingPopup(floatingNegativeResponse)'; document.getElementById("floatingPopupNegativeLabel").href = 'javascript:closeFloatingPopup(floatingNegativeResponse)'; document.getElementById("floatingPopupNegativeButtonLink1").style.cursor = 'pointer'; document.getElementById("floatingPopupNegativeLabel").style.cursor = 'pointer'; document.getElementById("floatingPopupPositiveButtonLink1").href = 'javascript:closeFloatingPopup(floatingPositiveResponse)'; document.getElementById("floatingPopupPositiveLabel").href = 'javascript:closeFloatingPopup(floatingPositiveResponse)'; document.getElementById("floatingPopupPositiveButtonLink1").style.cursor = 'pointer'; document.getElementById("floatingPopupPositiveLabel").style.cursor = 'pointer'; */ } // Close with this function. function closeFloatingPopup(responseCode) { /* floatingPopupRunning = false; $('#floatingPopupWrapper').hide(); $('#floatingPopupDimmerLayer').hide(); // Unbind event listeners $(window).unbind('resize.floatingPopup') .unbind('scroll.floatingPopupWidth') .unbind('scroll.floatingPopupHeight'); // callback method if(window.floatingPopupResponse) { floatingPopupResponse(responseCode, floatingPopupID); } */ } // predefined buttons function floatingPopupShowPositiveButton(buttonText) { /* document.getElementById("floatingPopupPositiveLabel").innerHTML = ""+buttonText+""; document.getElementById("floatingPopupPositiveButton").style.display = "inline"; */ } function floatingPopupShowNegativeButton(buttonText) { /* document.getElementById("floatingPopupNegativeLabel").innerHTML = ""+buttonText+""; document.getElementById("floatingPopupNegativeButton").style.display = "inline"; */ } function floatingPopupShowCancelButton(buttonText) { /* if(buttonText==null) buttonText = 'Cancel'; document.getElementById("floatingPopupCancelLabel").innerHTML = ""+buttonText+""; document.getElementById("floatingPopupCancelButton").style.display = "inline"; floatingPopupShowUpperRightCloseButton(); */ } function floatingPopupShowUpperRightCloseButton(visibility) { /* if(visibility!=null && (visibility=='false' || visibility==false)) { document.getElementById("floatingPopupCancelUpperRight").style.display = "none"; } else { document.getElementById("floatingPopupCancelUpperRight").style.display = "inline"; } */ } function floatingPopupShowSubmitButton() { // floatingPopupShowPositiveButton('Submit'); } function floatingPopupShowContinueButton() { // floatingPopupShowPositiveButton('Continue'); } function floatingPopupShowOKButton() { // floatingPopupShowPositiveButton('OK'); } function floatingPopupShowYesButton() { // floatingPopupShowPositiveButton('Yes'); } function floatingPopupShowNoButton() { // floatingPopupShowNegativeButton('No'); } function floatingPopupShowCloseButton() { // floatingPopupShowCancelButton('Close'); } //function floatingPopupShowCancelButton() already above function floatingPopupResetButtons() { /* document.getElementById("floatingPopupPositiveButton").style.display = "none"; document.getElementById("floatingPopupNegativeButton").style.display = "none"; document.getElementById("floatingPopupCancelButton").style.display = "none"; document.getElementById("floatingPopupCancelUpperRight").style.display = "none"; */ } // Set initial position and dimensions function initializeFloatingPopup() { /* var floatingPopup = document.getElementById('floatingPopuplayer'), floatingPopupWidth = FLOATING_POPUP_DEFAULT_WIDTH, floatingPopupHeight = FLOATING_POPUP_DEFAULT_HEIGHT; if(document.getElementById("floatingPopupMain").offsetWidth) floatingPopupWidth = document.getElementById("floatingPopupMain").offsetWidth; if(document.getElementById("floatingPopupMain").offsetHeight) floatingPopupHeight = document.getElementById("floatingPopupMain").offsetHeight; floatingPopup.style.width = floatingPopupWidth + 'px'; floatingPopup.style.height = floatingPopupHeight + 'px'; setFloatingPopupVerticalPosition(); setFloatingPopupHorizontalPosition(); */ } function setFloatingPopupVerticalPosition() { /* var floatingPopupHeight = FLOATING_POPUP_DEFAULT_HEIGHT; if(document.getElementById("floatingPopupMain").offsetHeight) floatingPopupHeight = document.getElementById("floatingPopupMain").offsetHeight; var topMargin = -(floatingPopupHeight/2); $('#floatingPopuplayer').css({ 'top': '50%', 'margin-top': topMargin + 'px' }); */ } function setFloatingPopupHorizontalPosition() { /* var floatingPopupWidth = FLOATING_POPUP_DEFAULT_WIDTH; if(document.getElementById("floatingPopupMain").offsetWidth) floatingPopupWidth = document.getElementById("floatingPopupMain").offsetWidth; var leftMargin = -(floatingPopupWidth/2); $('#floatingPopuplayer').css({ 'left': '50%', 'margin-left': leftMargin + 'px' }); */ } function checkWindowSize() { /* logFloatingPopup("resize") var popupWidth = $('#floatingPopupMain').width(), popupHeight = $('#floatingPopupMain').height(), windowWidth = $(window).width(), windowHeight = $(window).height(); if(popupWidth > windowWidth && !floatingPopupHorizontalScroll) { $('#floatingPopuplayer').css({ 'margin-left': '0px', 'left': '0px' }); $(window).bind('scroll.floatingPopupWidth', fixFloatingPopupHorizontalPosition); // Mark current state floatingPopupHorizontalScroll = true; logFloatingPopup('horizontal scroll on') } else if(popupWidth < windowWidth && floatingPopupHorizontalScroll) { $(window).unbind('scroll.floatingPopupWidth'); setFloatingPopupHorizontalPosition(); // Mark current state floatingPopupHorizontalScroll = false; logFloatingPopup('horizontal scroll off') } if(popupHeight > windowHeight && !floatingPopupVerticalScroll) { $('#floatingPopuplayer').css({ 'margin-top': '0px', 'top': '0px' }); $(window).bind('scroll.floatingPopupHeight', fixFloatingPopupVerticalPosition); // Mark current state floatingPopupVerticalScroll = true; logFloatingPopup('vertical scroll on') } else if(popupHeight < windowHeight && floatingPopupVerticalScroll) { $(window).unbind('scroll.floatingPopupHeight'); setFloatingPopupVerticalPosition(); // Mark current state floatingPopupVerticalScroll = false; logFloatingPopup('vertical scroll off'); } */ } function fixFloatingPopupVerticalPosition() { // document.getElementById('floatingPopuplayer').style.top = -window.scrollTop() + 'px'; } function fixFloatingPopupHorizontalPosition() { // document.getElementById('floatingPopuplayer').style.left = -window.scrollLeft() + 'px'; } function showFloatingPopup() { $('#floatingPopupWrapper').show(); //document.getElementById("floatingPopuplayer").style.display="inline"; } function floatingPopupShowDimmer(popupContentHtml) { //remove hardcoded extra libraries var hackdiv = document.createElement("DIV"); hackdiv.innerHTML = popupContentHtml; $hackdiv = $(hackdiv) $hackdiv.find("link").remove(); $hackdiv.find("script[src*='jquery-1.8.2.min.js']").remove(); $hackdiv.find("script[src*='seutil.workflow:LoadCombinedResource']").remove(); popupContentHtml = $hackdiv.html(); if($("#fancybox-content").html() == "") { $.fancybox( popupContentHtml, { "closeClick" : false, "onStart" : function() { $("#fancybox-content").addClass("wishlistOverlay"); $("#fancybox-close").addClass("wishlistClose"); }, "onClosed" : function() { $("#fancybox-content").removeClass("wishlistOverlay"); $("#fancybox-close").removeClass("wishlistClose"); } }); $(document).on({ ajaxStart: function() { $.fancybox.showActivity(); }, ajaxStop: function() { $.fancybox.hideActivity(); } }); } else { $("#fancybox-content").html(popupContentHtml); } $("#fancybox-close").off("click").on("click", function(e) { $(document).off("ajaxStart"); $(document).off("ajaxStop"); $.fancybox.close(); }); /* $('#floatingPopupDimmerLayer').css({ left: '0px', top: '0px', width: '100%', height: '100%', position: 'fixed', display: 'block' }); */ } function logFloatingPopup(debug_text) { if(FLOATING_POPUP_DEBUG) console.log(FLOATING_POPUP_DEBUG_PREFIX + ': ' + debug_text); } function floatingPopupDoBrowserCustomization() { /* if(floatingPopupIsChrome()) { } else if(floatingPopupIsSafari()) { } else if(floatingPopupIsOpera()) { } */ } function floatingPopupIsChrome() { // return navigator.userAgent.indexOf("Chrome")!=-1; } function floatingPopupIsSafari() { // return navigator.userAgent.indexOf("Safari")!=-1 && !floatingPopupIsChrome(); } function floatingPopupIsOpera() { // return navigator.userAgent.indexOf("Opera")!=-1; } function getfloatingPopupCollapseIcon() { /* var floatingPopupCollapseIcon="/SEUILibrary/hightech-portal/images/icons/b_collapse.gif"; return floatingPopupCollapseIcon; */ } function getfloatingPopupExpandIcon() { /* var floatingPopupExpandIcon="/SEUILibrary/hightech-portal/images/icons/b_expand.gif"; return floatingPopupExpandIcon; */ } $(document).ready(function() { $(jdaHTML).appendTo($("body")); }); /* grab JDA style sheet inserts to head - they will break oneweb css */ /* var o_appendChild = document.getElementsByTagName("HEAD")[0].appendChild; document.getElementsByTagName("HEAD")[0].appendChild = function() { var srcMappings = {"/SEUILibrary/stylesheets/jda-styles.css":"true","/SEUILibrary/stylesheets/jda-ht-styles.css":"true","/SEUILibrary/lenovo-portal/css/main.css":"true","/SEUILibrary/lenovo-portal/css/screen.css":"true","/SEUILibrary/lenovo-portal/css/lenovo_custom.css":"true","/SEUILibrary/lenovo-portal/css/lenovo_custom_pub.css":"true"}; if(arguments[0] && arguments[0].getAttribute && arguments[0].getAttribute("src") != null && arguments[0].getAttribute("src") != "" && srcMappings[arguments[0].getAttribute("src")] != null) { console.log("skipped SRC:" + arguments[0].getAttribute("src")) } else if(arguments[0] && arguments[0].getAttribute && arguments[0].getAttribute("href") != null && arguments[0].getAttribute("href") != "" && srcMappings[arguments[0].getAttribute("href")] != null) { console.log("skipped HREF:" + arguments[0].getAttribute("href")) } else { console.log("applied: " + arguments[0].toString()); o_appendChild.apply(this, arguments); } }; */ /* end: /ISS_Static/WW/ag/js/oneweb/subseries/JDAPopup.js(17947) */ /* start: /ISS_Static/WW/site/scripts/jquery/jquery-ui-1.8.23.min.js (cachekey: [])*/ /*! jQuery UI - v1.8.23 - 2012-08-15 * https://github.com/jquery/jquery-ui * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.effects.core.js, jquery.effects.blind.js, jquery.effects.bounce.js, jquery.effects.clip.js, jquery.effects.drop.js, jquery.effects.explode.js, jquery.effects.fade.js, jquery.effects.fold.js, jquery.effects.highlight.js, jquery.effects.pulsate.js, jquery.effects.scale.js, jquery.effects.shake.js, jquery.effects.slide.js, jquery.effects.transfer.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.tabs.js * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ (function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;return!b.href||!g||f.nodeName.toLowerCase()!=="map"?!1:(h=a("img[usemap=#"+g+"]")[0],!!h&&d(h))}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(a.ui.version)return;a.extend(a.ui,{version:"1.8.23",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a("").outerWidth(1).jquery||a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.curCSS||(a.curCSS=a.css),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!d||!a.element[0].parentNode)return;for(var e=0;e0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},isOverAxis:function(a,b,c){return a>b&&a=9||!!b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})}(jQuery),function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(!this.element.data("draggable"))return;return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(b){var c=this.options;return this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(b),this.handle?(c.iframeFix&&a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),c.containment&&this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,b)),this.dropped&&(c=this.dropped,this.dropped=!1);var d=this.element[0],e=!1;while(d&&(d=d.parentNode))d==document&&(e=!0);if(!e&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",b)!==!1&&f._clear()})}else this._trigger("stop",b)!==!1&&this._clear();return!1},_mouseUp:function(b){return this.options.iframeFix===!0&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;return a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&&(c=!0)}),c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute"),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&b.containment.constructor!=Array){var c=a(b.containment),d=c[0];if(!d)return;var e=c.offset(),f=a(d).css("overflow")!="hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}else b.containment.constructor==Array&&(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.lefth[2]&&(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.toph[3]?j-this.offset.click.toph[2]?k-this.offset.click.left=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f=k&&g<=l||h>=k&&h<=l||gl)&&(e>=i&&e<=j||f>=i&&f<=j||ej);default:return!1}},a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],e=c?c.type:null,f=(b.currentItem||b.element).find(":data(droppable)").andSelf();g:for(var h=0;h
    ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=c.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var d=this.handles.split(",");this.handles={};for(var e=0;e
    ');h.css({zIndex:c.zIndex}),"se"==f&&h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[f]=".ui-resizable-"+f,this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){this.handles[c].constructor==String&&(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),e=0;e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();var f=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(f,e),this._proportionallyResize()}if(!a(this.handles[c]).length)continue}},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&&a[1]?a[1]:"se"}}),c.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").hover(function(){if(c.disabled)return;a(this).removeClass("ui-resizable-autohide"),b._handles.show()},function(){if(c.disabled)return;b.resizing||(a(this).addClass("ui-resizable-autohide"),b._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).remove()}return this.originalElement.css("resize",this.originalResizeStyle),b(this.originalElement),this},_mouseCapture:function(b){var c=!1;for(var d in this.handles)a(this.handles[d])[0]==b.target&&(c=!0);return!this.options.disabled&&c},_mouseStart:function(b){var d=this.options,e=this.element.position(),f=this.element;this.resizing=!0,this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()},(f.is(".ui-draggable")||/absolute/.test(f.css("position")))&&f.css({position:"absolute",top:e.top,left:e.left}),this._renderProxy();var g=c(this.helper.css("left")),h=c(this.helper.css("top"));d.containment&&(g+=a(d.containment).scrollLeft()||0,h+=a(d.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:g,top:h},this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalPosition={left:g,top:h},this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;var i=a(".ui-resizable-"+this.axis).css("cursor");return a("body").css("cursor",i=="auto"?this.axis+"-resize":i),f.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c=this.helper,d=this.options,e={},f=this,g=this.originalMousePosition,h=this.axis,i=b.pageX-g.left||0,j=b.pageY-g.top||0,k=this._change[h];if(!k)return!1;var l=k.apply(this,[b,i,j]),m=a.browser.msie&&a.browser.version<7,n=this.sizeDiff;this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)l=this._updateRatio(l,b);return l=this._respectSize(l,b),this._propagate("resize",b),c.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",b,this.ui()),!1},_mouseStop:function(b){this.resizing=!1;var c=this.options,d=this;if(this._helper){var e=this._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&a.ui.hasScroll(e[0],"left")?0:d.sizeDiff.height,h=f?0:d.sizeDiff.width,i={width:d.helper.width()-h,height:d.helper.height()-g},j=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,k=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;c.animate||this.element.css(a.extend(i,{top:k,left:j})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&&!c.animate&&this._proportionallyResize()}return a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(a){var b=this.options,c,e,f,g,h;h={minWidth:d(b.minWidth)?b.minWidth:0,maxWidth:d(b.maxWidth)?b.maxWidth:Infinity,minHeight:d(b.minHeight)?b.minHeight:0,maxHeight:d(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a)c=h.minHeight*this.aspectRatio,f=h.minWidth/this.aspectRatio,e=h.maxHeight*this.aspectRatio,g=h.maxWidth/this.aspectRatio,c>h.minWidth&&(h.minWidth=c),f>h.minHeight&&(h.minHeight=f),ea.width,k=d(a.height)&&e.minHeight&&e.minHeight>a.height;j&&(a.width=e.minWidth),k&&(a.height=e.minHeight),h&&(a.width=e.maxWidth),i&&(a.height=e.maxHeight);var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,n=/sw|nw|w/.test(g),o=/nw|ne|n/.test(g);j&&n&&(a.left=l-e.minWidth),h&&n&&(a.left=l-e.maxWidth),k&&o&&(a.top=m-e.minHeight),i&&o&&(a.top=m-e.maxHeight);var p=!a.width&&!a.height;return p&&!a.left&&a.top?a.top=null:p&&!a.top&&a.left&&(a.left=null),a},_proportionallyResize:function(){var b=this.options;if(!this._proportionallyResizeElements.length)return;var c=this.helper||this.element;for(var d=0;d
    ');var d=a.browser.msie&&a.browser.version<7,e=d?1:0,f=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{left:f.left+b,width:e.width-b}},n:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{top:f.top+c,height:e.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),b!="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.extend(a.ui.resizable,{version:"1.8.23"}),a.ui.plugin.add("resizable","alsoResize",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};typeof e.alsoResize=="object"&&!e.alsoResize.parentNode?e.alsoResize.length?(e.alsoResize=e.alsoResize[0],f(e.alsoResize)):a.each(e.alsoResize,function(a){f(a)}):f(e.alsoResize)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("resizable-alsoresize"),f={},g=d&&d.length?d:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&&c>=0&&(f[b]=c||null)}),b.css(f)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?a.each(e.alsoResize,function(a,b){i(a,b)}):i(e.alsoResize)},stop:function(b,c){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","animate",{stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d._proportionallyResizeElements,g=f.length&&/textarea/i.test(f[0].nodeName),h=g&&a.ui.hasScroll(f[0],"left")?0:d.sizeDiff.height,i=g?0:d.sizeDiff.width,j={width:d.size.width-i,height:d.size.height-h},k=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,l=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(j,l&&k?{top:l,left:k}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};f&&f.length&&a(f[0]).css({width:c.width,height:c.height}),d._updateCache(c),d._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(b,d){var e=a(this).data("resizable"),f=e.options,g=e.element,h=f.containment,i=h instanceof a?h.get(0):/parent/.test(h)?g.parent().get(0):h;if(!i)return;e.containerElement=a(i);if(/document/.test(h)||h==document)e.containerOffset={left:0,top:0},e.containerPosition={left:0,top:0},e.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var j=a(i),k=[];a(["Top","Right","Left","Bottom"]).each(function(a,b){k[a]=c(j.css("padding"+b))}),e.containerOffset=j.offset(),e.containerPosition=j.position(),e.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var l=e.containerOffset,m=e.containerSize.height,n=e.containerSize.width,o=a.ui.hasScroll(i,"left")?i.scrollWidth:n,p=a.ui.hasScroll(i)?i.scrollHeight:m;e.parentData={element:i,left:l.left,top:l.top,width:o,height:p}}},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.containerSize,g=d.containerOffset,h=d.size,i=d.position,j=d._aspectRatio||b.shiftKey,k={top:0,left:0},l=d.containerElement;l[0]!=document&&/static/.test(l.css("position"))&&(k=g),i.left<(d._helper?g.left:0)&&(d.size.width=d.size.width+(d._helper?d.position.left-g.left:d.position.left-k.left),j&&(d.size.height=d.size.width/d.aspectRatio),d.position.left=e.helper?g.left:0),i.top<(d._helper?g.top:0)&&(d.size.height=d.size.height+(d._helper?d.position.top-g.top:d.position.top),j&&(d.size.width=d.size.height*d.aspectRatio),d.position.top=d._helper?g.top:0),d.offset.left=d.parentData.left+d.position.left,d.offset.top=d.parentData.top+d.position.top;var m=Math.abs((d._helper?d.offset.left-k.left:d.offset.left-k.left)+d.sizeDiff.width),n=Math.abs((d._helper?d.offset.top-k.top:d.offset.top-g.top)+d.sizeDiff.height),o=d.containerElement.get(0)==d.element.parent().get(0),p=/relative|absolute/.test(d.containerElement.css("position"));o&&p&&(m-=d.parentData.left),m+d.size.width>=d.parentData.width&&(d.size.width=d.parentData.width-m,j&&(d.size.height=d.size.width/d.aspectRatio)),n+d.size.height>=d.parentData.height&&(d.size.height=d.parentData.height-n,j&&(d.size.width=d.size.height*d.aspectRatio))},stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.position,g=d.containerOffset,h=d.containerPosition,i=d.containerElement,j=a(d.helper),k=j.offset(),l=j.outerWidth()-d.sizeDiff.width,m=j.outerHeight()-d.sizeDiff.height;d._helper&&!e.animate&&/relative/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m}),d._helper&&!e.animate&&/static/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m})}}),a.ui.plugin.add("resizable","ghost",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone(),d.ghost.css({opacity:.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:""),d.ghost.appendTo(d.helper)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis,j=e._aspectRatio||b.shiftKey;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1),l=Math.round((f.height-g.height)/(e.grid[1]||1))*(e.grid[1]||1);/^(se|s|e)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l):/^(ne)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l):/^(sw)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.left=h.left-k):(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l,d.position.left=h.left-k)}});var c=function(a){return parseInt(a,10)||0},d=function(a){return!isNaN(parseInt(a,10))}}(jQuery),function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable"),this.dragged=!1;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]),c.addClass("ui-selectee"),c.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=c.addClass("ui-selectee"),this._mouseInit(),this.helper=a("
    ")},destroy:function(){return this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy(),this},_mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(this.options.disabled)return;var d=this.options;this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,!b.metaKey&&!b.ctrlKey&&(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey&&!b.ctrlKey||!d.$element.hasClass("ui-selected");return d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger("selecting",b,{selecting:d.element}):c._trigger("unselecting",b,{unselecting:d.element}),!1}})},_mouseDrag:function(b){var c=this;this.dragged=!0;if(this.options.disabled)return;var d=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e>g){var i=g;g=e,e=i}if(f>h){var i=h;h=f,f=i}return this.helper.css({left:e,top:f,width:g-e,height:h-f}),this.selectees.each(function(){var i=a.data(this,"selectable-item");if(!i||i.element==c.element[0])return;var j=!1;d.tolerance=="touch"?j=!(i.left>g||i.righth||i.bottome&&i.rightf&&i.bottom *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==f)return e=a(this),!1});a.data(b.target,d.widgetName+"-item")==f&&(e=a(b.target));if(!e)return!1;if(this.options.handle&&!c){var h=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(h=!0)});if(!h)return!1}return this.currentItem=e,this._removeCurrentsFromItems(),!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),e.containment&&this._setContainment(),e.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):!0)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(b,f);else break;this._trigger("change",b,this._uiHash());break}}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(!b)return;a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j>h&&d+jf&&b+ka[this.floating?"width":"height"]?l:f0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this,d=[],e=[],f=this._connectWith();if(f&&b)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g>=0;g--)e[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");for(var b=0;b=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&(e.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}}for(var g=e.length-1;g>=0;g--){var k=e[g][1],l=e[g][0];for(var i=0,m=l.length;i=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c>=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return e||(b.style.visibility="hidden"),b},update:function(a,b){if(e&&!d.forcePlaceholderSize)return;b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e>=0;e--){if(a.ui.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&&a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0)}if(!c)return;if(this.containers.length===1)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i>=0;i--){if(!a.ui.contains(this.containers[d].element[0],this.items[i].item[0]))continue;var j=this.containers[d].floating?this.items[i].item.offset().left:this.items[i].item.offset().top;Math.abs(j-h)0?"down":"up")}if(!g&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[d],g?this._rearrange(b,g,null,!0):this._rearrange(b,null,this.containers[d].element,!0),this._trigger("change",b,this._uiHash()),this.containers[d]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;return d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(d[0].style.width==""||c.forceHelperSize)&&d.width(this.currentItem.width()),(d[0].style.height==""||c.forceHelperSize)&&d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0],d=a(b.containment).offset(),e=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var f=b.pageX,g=b.pageY;if(this.originalPosition){this.containment&&(b.pageX-this.offset.click.leftthis.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top));if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.topthis.containment[3]?h-this.offset.click.topthis.containment[2]?i-this.offset.click.left=0;f--)a.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!c&&(d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.containers[f])),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(var f=this.containers.length-1;f>=0;f--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f
    ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;try{e.id}catch(f){e=document.body}return b.wrap(d),(b[0]===e||a.contains(b[0],e))&&a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;return b.parent().is(".ui-effects-wrapper")?(c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&&a(d).focus(),c):b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];return a.fx.off||!i?h?this[h](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)}):i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}});var m={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,b){m[b]=function(b){return Math.pow(b,a+2)}}),a.extend(m,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return a===0||a===1?a:-Math.pow(2,8*(a-1))*Math.sin(((a-1)*80-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){var b,c=4;while(a<((b=Math.pow(2,--c))-1)/11);return 1/Math.pow(4,3-c)-7.5625*Math.pow((b*3-2)/22-a,2)}}),a.each(m,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return a<.5?c(a*2)/2:c(a*-2+2)/-2+1}})}(jQuery),function(a,b){a.effects.blind=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=f=="vertical"?"height":"width",i=f=="vertical"?g.height():g.width();e=="show"&&g.css(h,0);var j={};j[h]=e=="show"?i:0,g.animate(j,b.duration,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}}(jQuery),function(a,b){a.effects.bounce=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"up",g=b.options.distance||20,h=b.options.times||5,i=b.duration||250;/show|hide/.test(e)&&d.push("opacity"),a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",g=b.options.distance||(j=="top"?c.outerHeight(!0)/3:c.outerWidth(!0)/3);e=="show"&&c.css("opacity",0).css(j,k=="pos"?-g:g),e=="hide"&&(g=g/(h*2)),e!="hide"&&h--;if(e=="show"){var l={opacity:1};l[j]=(k=="pos"?"+=":"-=")+g,c.animate(l,i/2,b.options.easing),g=g/2,h--}for(var m=0;m
    ").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/c,left:f.left+j*(g/d)+(b.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:f.top+i*(h/c)+(b.options.mode=="show"?(i-Math.floor(c/2))*(h/c):0),opacity:b.options.mode=="show"?0:1}).animate({left:f.left+j*(g/d)+(b.options.mode=="show"?0:(j-Math.floor(d/2))*(g/d)),top:f.top+i*(h/c)+(b.options.mode=="show"?0:(i-Math.floor(c/2))*(h/c)),opacity:b.options.mode=="show"?1:0},b.duration||500);setTimeout(function(){b.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide(),b.callback&&b.callback.apply(e[0]),e.dequeue(),a("div.ui-effects-explode").remove()},b.duration||500)})}}(jQuery),function(a,b){a.effects.fade=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide");c.animate({opacity:d},{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}}(jQuery),function(a,b){a.effects.fold=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.size||15,g=!!b.options.horizFirst,h=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(c,d),c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),j=e=="show"!=g,k=j?["width","height"]:["height","width"],l=j?[i.width(),i.height()]:[i.height(),i.width()],m=/([0-9]+)%/.exec(f);m&&(f=parseInt(m[1],10)/100*l[e=="hide"?0:1]),e=="show"&&i.css(g?{height:0,width:f}:{height:f,width:0});var n={},p={};n[k[0]]=e=="show"?l[0]:f,p[k[1]]=e=="show"?l[1]:0,i.animate(n,h,b.options.easing).animate(p,h,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}}(jQuery),function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};e=="hide"&&(f.opacity=0),a.effects.save(c,d),c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),e=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}}(jQuery),function(a,b){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"show"),e=(b.options.times||5)*2-1,f=b.duration?b.duration/2:a.fx.speeds._default/2,g=c.is(":visible"),h=0;g||(c.css("opacity",0).show(),h=1),(d=="hide"&&g||d=="show"&&!g)&&e--;for(var i=0;i
    ').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}}(jQuery),function(a,b){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var b=this,c=b.options;b.running=0,b.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"),b.headers=b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-focus")}),b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var d=b.element.find("a").filter(c.navigationFilter).eq(0);if(d.length){var e=d.closest(".ui-accordion-header");e.length?b.active=e:b.active=d.closest(".ui-accordion-content").prev()}}b.active=b._findActive(b.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),b.active.next().addClass("ui-accordion-content-active"),b._createIcons(),b.resize(),b.element.attr("role","tablist"),b.headers.attr("role","tab").bind("keydown.accordion",function(a){return b._keydown(a)}).next().attr("role","tabpanel"),b.headers.not(b.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),b.active.length?b.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):b.headers.eq(0).attr("tabIndex",0),a.browser.safari||b.headers.find("a").attr("tabIndex",-1),c.event&&b.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(a){b._clickHandler.call(b,a,this),a.preventDefault()})},_createIcons:function(){var b=this.options;b.icons&&(a("").addClass("ui-icon "+b.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove(),this.element.removeClass("ui-accordion-icons")},destroy:function(){var b=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"),this.headers.find("a").removeAttr("tabIndex"),this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");return(b.autoHeight||b.fillHeight)&&c.css("height",""),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b=="active"&&this.activate(c),b=="icons"&&(this._destroyIcons(),c&&this._createIcons()),b=="disabled"&&this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(b){if(this.options.disabled||b.altKey||b.ctrlKey)return;var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._clickHandler({target:b.target},b.target),b.preventDefault()}return f?(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),!1):!0},resize:function(){var b=this.options,c;if(b.fillSpace){if(a.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height(),a.browser.msie&&this.element.parent().css("overflow",d),this.headers.each(function(){c-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else b.autoHeight&&(c=0,this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c));return this},activate:function(a){this.options.active=a;var b=this._findActive(a)[0];return this._clickHandler({target:b},b),this},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===!1?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,c){var d=this.options;if(d.disabled)return;if(!b.target){if(!d.collapsible)return;this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),f={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:e},g=this.active=a([]);this._toggle(g,e,f);return}var h=a(b.currentTarget||c),i=h[0]===this.active[0];d.active=d.collapsible&&i?!1:this.headers.index(h);if(this.running||!d.collapsible&&i)return;var j=this.active,g=h.next(),e=this.active.next(),f={options:d,newHeader:i&&d.collapsible?a([]):h,oldHeader:this.active,newContent:i&&d.collapsible?a([]):g,oldContent:e},k=this.headers.index(this.active[0])>this.headers.index(h[0]);this.active=i?a([]):h,this._toggle(g,e,f,i,k),j.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),i||(h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected),h.next().addClass("ui-accordion-content-active"));return},_toggle:function(b,c,d,e,f){var g=this,h=g.options;g.toShow=b,g.toHide=c,g.data=d;var i=function(){if(!g)return;return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data),g.running=c.size()===0?b.size():c.size();if(h.animated){var j={};h.collapsible&&e?j={toShow:a([]),toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace}:j={toShow:b,toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace},h.proxied||(h.proxied=h.animated),h.proxiedDuration||(h.proxiedDuration=h.duration),h.animated=a.isFunction(h.proxied)?h.proxied(j):h.proxied,h.duration=a.isFunction(h.proxiedDuration)?h.proxiedDuration(j):h.proxiedDuration;var k=a.ui.accordion.animations,l=h.duration,m=h.animated;m&&!k[m]&&!a.easing[m]&&(m="slide"),k[m]||(k[m]=function(a){this.slide(a,{easing:m,duration:l||700})}),k[m](j)}else h.collapsible&&e?b.toggle():(c.hide(),b.show()),i(!0);c.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur(),b.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(this.running)return;this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&&(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data)}}),a.extend(a.ui.accordion,{version:"1.8.23",animations:{slide:function(b,c){b=a.extend({easing:"swing",duration:300},b,c);if(!b.toHide.size()){b.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},b);return}if(!b.toShow.size()){b.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},b);return}var d=b.toShow.css("overflow"),e=0,f={},g={},h=["height","paddingTop","paddingBottom"],i,j=b.toShow;i=j[0].style.width,j.width(j.parent().width()-parseFloat(j.css("paddingLeft"))-parseFloat(j.css("paddingRight"))-(parseFloat(j.css("borderLeftWidth"))||0)-(parseFloat(j.css("borderRightWidth"))||0)),a.each(h,function(c,d){g[d]="hide";var e=(""+a.css(b.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);f[d]={value:e[1],unit:e[2]||"px"}}),b.toShow.css({height:0,overflow:"hidden"}).show(),b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(g,{step:function(a,c){c.prop=="height"&&(e=c.end-c.start===0?0:(c.now-c.start)/(c.end-c.start)),b.toShow[0].style[c.prop]=e*f[c.prop].value+f[c.prop].unit},duration:b.duration,easing:b.easing,complete:function(){b.autoHeight||b.toShow.css("height",""),b.toShow.css({width:i,overflow:d}),b.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1e3:200})}}})}(jQuery),function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._keyEvent("previous",c);break;case e.DOWN:b._keyEvent("next",c);break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&&(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&&(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&&(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.menu=a("
      ").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&&b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&&b.element.val()!==b.term&&b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&&this._initSource(),b==="appendTo"&&this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,c,d;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,b.term))}):typeof this.options.source=="string"?(d=this.options.source,this.source=function(c,e){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a,b){e(a)},error:function(){e([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length").data("item.autocomplete",c).append(a("
      ").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})}(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c<0?this.element.scrollTop(d+c):c>=e&&this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:first")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend(""),d.secondary&&b.append(""),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",c))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c),a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var b=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),a.Widget.prototype.destroy.call(this)}})}(jQuery),function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('
      '))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.23"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('
      ')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$(''+c+""),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('').addClass(this._triggerClass).html(g==""?f:$("").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;db&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block")},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$(''),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&&b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(d){$.datepicker.log(d)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._curInst.dpDiv.stop(!0,!0),b&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a)),this._attachHandlers(a);var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+(c?0:$(document).scrollLeft()),i=document.documentElement.clientHeight+(c?0:$(document).scrollTop());return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b)};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1;var f=this._get(b,"onClose");f&&f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=c)&&$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+112?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(a){var b=this._get(a,"stepMonths"),c="#"+a.id.replace(/\\\\/g,"\\");a.dpDiv.find("[data-handler]").map(function(){var a={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,-b,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,+b,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(c)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(c,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),a[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&pp)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?''+q+"":e?"":''+q+"",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?''+s+"":e?"":''+s+"",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'",x=d?'
      '+(c?w:"")+(this._isInRange(a,v)?'":"")+(c?"":w)+"
      ":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='
      '+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'
      '+"";var R=z?'":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="=5?' class="ui-datepicker-week-end"':"")+">"+''+C[T]+""}Q+=R+"";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z";var _=z?'":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Ym;_+='",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+""}n++,n>11&&(n=0,o++),Q+="
      '+this._get(a,"weekHeader")+"
      '+this._get(a,"calculateWeek")(Y)+""+(bb&&!G?" ":bc?''+Y.getDate()+"":''+Y.getDate()+"")+"
      "+(j?"
      "+(g[0]>0&&N==g[1]-1?'
      ':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='
      ',m="";if(f||!i)m+=''+g[b]+"";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='"}k||(l+=m+(f||!i||!j?" ":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+=''+c+"";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?" ":"")+m),l+="
      ",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&bd?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.23",window["DP_jQuery_"+dpuuid]=$}(jQuery),function(a,b){var c="ui-dialog ui-widget ui-widget-content ui-corner-all ",d={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var b=this,d=b.options,e=d.title||" ",f=a.ui.dialog.getTitleId(b.element),g=(b.uiDialog=a("
      ")).appendTo(document.body).hide().addClass(c+d.dialogClass).css({zIndex:d.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(c){d.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE&&(b.close(c),c.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(a){b.moveToTop(!1,a)}),h=b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g),i=(b.uiDialogTitlebar=a("
      ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),j=a('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(a){return b.close(a),!1}).appendTo(i),k=(b.uiDialogTitlebarCloseText=a("")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(j),l=a("").addClass("ui-dialog-title").attr("id",f).html(e).prependTo(i);a.isFunction(d.beforeclose)&&!a.isFunction(d.beforeClose)&&(d.beforeClose=d.beforeclose),i.find("*").add(i).disableSelection(),d.draggable&&a.fn.draggable&&b._makeDraggable(),d.resizable&&a.fn.resizable&&b._makeResizable(),b._createButtons(d.buttons),b._isOpen=!1,a.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;return a.overlay&&a.overlay.destroy(),a.uiDialog.hide(),a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),a.uiDialog.remove(),a.originalTitle&&a.element.attr("title",a.originalTitle),a},widget:function(){return this.uiDialog},close:function(b){var c=this,d,e;if(!1===c._trigger("beforeClose",b))return;return c.overlay&&c.overlay.destroy(),c.uiDialog.unbind("keypress.ui-dialog"),c._isOpen=!1,c.options.hide?c.uiDialog.hide(c.options.hide,function(){c._trigger("close",b)}):(c.uiDialog.hide(),c._trigger("close",b)),a.ui.dialog.overlay.resize(),c.options.modal&&(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&&(e=a(this).css("z-index"),isNaN(e)||(d=Math.max(d,e)))}),a.ui.dialog.maxZ=d),c},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options,f;return e.modal&&!b||!e.stack&&!e.modal?d._trigger("focus",c):(e.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=e.zIndex),d.overlay&&(a.ui.dialog.maxZ+=1,d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)),f={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()},a.ui.dialog.maxZ+=1,d.uiDialog.css("z-index",a.ui.dialog.maxZ),d.element.attr(f),d._trigger("focus",c),d)},open:function(){if(this._isOpen)return;var b=this,c=b.options,d=b.uiDialog;return b.overlay=c.modal?new a.ui.dialog.overlay(b):null,b._size(),b._position(c.position),d.show(c.show),b.moveToTop(!0),c.modal&&d.bind("keydown.ui-dialog",function(b){if(b.keyCode!==a.ui.keyCode.TAB)return;var c=a(":tabbable",this),d=c.filter(":first"),e=c.filter(":last");if(b.target===e[0]&&!b.shiftKey)return d.focus(1),!1;if(b.target===d[0]&&b.shiftKey)return e.focus(1),!1}),a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(),b._isOpen=!0,b._trigger("open"),b},_createButtons:function(b){var c=this,d=!1,e=a("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),f=a("
      ").addClass("ui-dialog-buttonset").appendTo(e);c.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof b=="object"&&b!==null&&a.each(b,function(){return!(d=!0)}),d&&(a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var e=a('').click(function(){d.click.apply(c.element[0],arguments)}).appendTo(f);a.each(d,function(a,b){if(a==="click")return;a in e?e[a](b):e.attr(a,b)}),a.fn.button&&e.button()}),e.appendTo(c.uiDialog))},_makeDraggable:function(){function f(a){return{position:a.position,offset:a.offset}}var b=this,c=b.options,d=a(document),e;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,g){e=c.height==="auto"?"auto":a(this).height(),a(this).height(a(this).height()).addClass("ui-dialog-dragging"),b._trigger("dragStart",d,f(g))},drag:function(a,c){b._trigger("drag",a,f(c))},stop:function(g,h){c.position=[h.position.left-d.scrollLeft(),h.position.top-d.scrollTop()],a(this).removeClass("ui-dialog-dragging").height(e),b._trigger("dragStop",g,f(h)),a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function h(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===b?this.options.resizable:c;var d=this,e=d.options,f=d.uiDialog.css("position"),g=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:g,start:function(b,c){a(this).addClass("ui-dialog-resizing"),d._trigger("resizeStart",b,h(c))},resize:function(a,b){d._trigger("resize",a,h(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing"),e.height=a(this).height(),e.width=a(this).width(),d._trigger("resizeStop",b,h(c)),a.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(b){var c=[],d=[0,0],e;if(b){if(typeof b=="string"||typeof b=="object"&&"0"in b)c=b.split?b.split(" "):[b[0],b[1]],c.length===1&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)}),b={my:c.join(" "),at:c.join(" "),offset:d.join(" ")};b=a.extend({},a.ui.dialog.prototype.options.position,b)}else b=a.ui.dialog.prototype.options.position;e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},b)),e||this.uiDialog.hide()},_setOptions:function(b){var c=this,f={},g=!1;a.each(b,function(a,b){c._setOption(a,b),a in d&&(g=!0),a in e&&(f[a]=b)}),g&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",f)},_setOption:function(b,d){var e=this,f=e.uiDialog;switch(b){case"beforeclose":b="beforeClose";break;case"buttons":e._createButtons(d);break;case"closeText":e.uiDialogTitlebarCloseText.text(""+d);break;case"dialogClass":f.removeClass(e.options.dialogClass).addClass(c+d);break;case"disabled":d?f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case"draggable":var g=f.is(":data(draggable)");g&&!d&&f.draggable("destroy"),!g&&d&&e._makeDraggable();break;case"position":e._position(d);break;case"resizable":var h=f.is(":data(resizable)");h&&!d&&f.resizable("destroy"),h&&typeof d=="string"&&f.resizable("option","handles",d),!h&&d!==!1&&e._makeResizable(d);break;case"title":a(".ui-dialog-title",e.uiDialogTitlebar).html(""+(d||" "))}a.Widget.prototype._setOption.apply(e,arguments)},_size:function(){var b=this.options,c,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),b.minWidth>b.width&&(b.width=b.minWidth),c=this.uiDialog.css({height:"auto",width:b.width}).height(),d=Math.max(0,b.minHeight-c);if(b.height==="auto")if(a.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();var f=this.element.css("height","auto").height();e||this.uiDialog.hide(),this.element.height(Math.max(f,d))}else this.element.height(Math.max(b.height-c,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),a.extend(a.ui.dialog,{version:"1.8.23",uuid:0,maxZ:0,getTitleId:function(a){var b=a.attr("id");return b||(this.uuid+=1,b=this.uuid),"ui-dialog-title-"+b},overlay:function(b){this.$el=a.ui.dialog.overlay.create(b)}}),a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(b){this.instances.length===0&&(setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()
      ").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return a.fn.bgiframe&&c.bgiframe(),this.instances.push(c),c},destroy:function(b){var c=a.inArray(b,this.instances);c!=-1&&this.oldInstances.push(this.instances.splice(c,1)[0]),this.instances.length===0&&a([document,window]).unbind(".dialog-overlay"),b.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))}),this.maxZ=d},height:function(){var b,c;return a.browser.msie&&a.browser.version<7?(b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),b0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?a.isFunction(b)?this.each(function(c){a(this).offset(b.call(this,c,a(this).offset()))}):this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),a.curCSS||(a.curCSS=a.css),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i>21&&i<22}()}(jQuery),function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("
      ").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&&(this.options.value=c,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.23"})}(jQuery),function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="",g=d.values&&d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("
      ").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;ic&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i),j===!1?!1:(this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0,!0))},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c1){this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);return}if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return Math.abs(c)*2>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.23"})}(jQuery),function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
      ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
    • #{label}
    • "},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&&g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&&d._cookie(e.selected,e.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&&(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&&this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&&a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.23"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a