1/* 2- cms/js_lib/modernizr/modernizr-2.5.3.js (7.68 Kb) 3- class/js/highslide/highslide-full.js (87.6 Kb) 4- class/js/highslide/highslide-full.js (conf #0) (0.19 Kb) 5- cms/js_lib/jquery/jquery-1.8.3.min.js (91.44 Kb) 6- cms/js_lib/jquery/jquery-1.8.3.min.js (conf #0) (0.24 Kb) 7- cms/js_lib/jquery/effects/jquery.easing.1.3.js (5.66 Kb) 8- cms/js_lib/jquery/effects/carouFredSel-6.1.0/jquery.carouFredSel-6.1.0-packed.js (35.56 Kb) 9- cms/js_lib/jquery/effects/carouFredSel-6.1.0/jquery.carouFredSel-6.1.0-packed.js (conf #0) (0 Kb) 10- cms/js_lib/jquery/effects/carouFredSel-6.1.0/jquery.carouFredSel-6.1.0-packed.js (conf #1) (0 Kb) 11- cms/js_lib/jquery/effects/carouFredSel-6.1.0/jquery.carouFredSel-6.1.0-packed.js (conf #2) (0 Kb) 12- cms/js_lib/jquery/effects/carouFredSel-6.1.0/helper-plugins/jquery.ba-throttle-debounce.min.js (0.71 Kb) 13- cms/js_lib/jquery/effects/carouFredSel-6.1.0/helper-plugins/jquery.mousewheel.min.js (1.36 Kb) 14- cms/js_lib/jquery/effects/carouFredSel-6.1.0/helper-plugins/jquery.touchSwipe.min.js (4.21 Kb) 15- cms/js_lib/jquery/effects/fancybox/2.1.5/jquery.fancybox.js (47.65 Kb) 16- cms/js_lib/jquery/effects/fancybox/2.1.5/jquery.fancybox.js (conf #0) (0.66 Kb) 17- www.mondainoeventi.it/functions.js (5.16 Kb) 18- Tot. 288.12 Kb 19*/ 20 21/* -- JSLIB 1/16: cms/js_lib/modernizr/modernizr-2.5.3.js ------------------------------- */ 22/* Modernizr 2.5.3 (Custom Build) | MIT & BSD 23 * Build: http://www.modernizr.com/download/#-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load 24 */ 25;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j);return f=["­","<style>",a,"</style>"].join(""),k.id=h,m.innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(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=u.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(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e});for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return z(""),i=k=null,function(a,b){function g(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{dis
25play:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={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,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?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)){a!="img"&&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={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?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),a!="img"&&(r||y[c]===2?(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(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&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&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},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;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};; 26 27/* -- JSLIB 2/16: class/js/highslide/highslide-full.js ------------------------------- */ 28/******************************************************************************
29Name: Highslide JS 30Version: 4.0.10 (November 25 2008) 31Config: default +events +unobtrusive +imagemap +slideshow +positioning +transitions +inline +ajax +iframe +flash 32Author: Torstein Hønsi 33Support: http://highslide.com/support 34 35Licence: 36Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 37License (http://creativecommons.org/licenses/by-nc/2.5/). 38 39You are free: 40 * to copy, distribute, display, and perform the work 41 * to make derivative works 42 43Under the following conditions: 44 * Attribution. You must attribute the work in the manner specified by the 45 author or licensor. 46 * Noncommercial. You may not use this work for commercial purposes. 47 48* For any reuse or distribution, you must make clear to others the license 49 terms of this work. 50* Any of these conditions can be waived if you get permission from the 51 copyright holder. 52 53Your fair use and other rights are in no way affected by the above. 54******************************************************************************/ 55 56var hs = { 57// Language strings 58lang : { 59 cssDirection: 'ltr', 60 loadingText : 'Loading...', 61 loadingTitle : 'Click to cancel', 62 focusTitle : 'Click to bring to front', 63 fullExpandTitle : 'Expand to actual size (f)', 64 creditsText : 'Powered by <i>Highslide JS</i>', 65 creditsTitle : 'Go to the Highslide JS homepage', 66 previousText : 'Precedente', 67 nextText : 'Prossimo', 68 moveText : 'Sposta', 69 closeText : 'Chiudi', 70 closeTitle : 'Chiudi (esc)', 71 resizeTitle : 'Ridimensiona', 72 playText : 'Play', 73 playTitle : 'Play slideshow (spacebar)', 74 pauseText : 'Pausa', 75 pauseTitle : 'Pausa slideshow (spacebar)', 76 previousTitle : 'Precedente (arrow left)', 77 nextTitle : 'Prossimo (arrow right)', 78 moveTitle : 'Sposta', 79 fullExpandText : 'Full size', 80 number: 'Image %1 of %2', 81 restoreTitle : 'Clicca per chiudere l\'immagine, clicca e trascina per spostare. Usa le frecce per scorrere le immagini.' 82}, 83// See http://highslide.com/ref for examples of settings 84graphicsDir : '/ATClass/js/highslide/graphics/', 85expandCursor : 'zoomin.cur', // null disables 86restoreCursor : 'zoomout.cur', // null disables 87expandDuration : 250, // milliseconds 88restoreDuration : 250, 89marginLeft : 15, 90marginRight : 15, 91marginTop : 15, 92marginBottom : 15, 93zIndexCounter : 1001, // adjust to other absolutely positioned elements 94loadingOpacity : 0.75, 95allowMultipleInstances: true, 96numberOfImagesToPreload : 5, 97outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only 98outlineStartOffset : 3, // ends at 10 99fullExpandPosition : 'bottom right', 100fullExpandOpacity : 1, 101padToMinWidth : false, // pad the popup width to make room for wide caption 102showCredits : false, // you can set this to false if you want 103creditsHref : 'http://highslide.com', 104enableKeyListener : true, 105transitions : [], 106transitionDuration: 500, 107dimmingOpacity: 0.80, // Lightbox style dimming background 108dimmingDuration: 50, // 0 for instant dimming 109 110allowWidthReduction : false, 111allowHeightReduction : true, 112preserveContent : true, // Preserve changes made to the content and position of HTML popups. 113objectLoadTime : 'before', // Load iframes 'before' or 'after' expansion. 114cacheAjax : true, // Cache ajax popups for instant display. Can be overridden for each popup. 115anchor : 'auto', // where the image expands from 116align : 'center', // position in the client (overrides anchor) 117targetX: null, // the id of a target element 118targetY: null, 119dragByHeading: true, 120minWidth: 200, 121minHeight: 200, 122allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight 123outlineType : 'rounded-white', // set null to disable outlines 124wrapperClassName : 'highslide-wrapper', // for enhanced css-control 125skin : { 126 controls: 127 '<div class="highslide-controls"><ul>'+ 128 '<li class="highslide-previous">'+ 129 '<a href="#" title="{hs.lang.previousTitle}">'+ 130 '<span>{hs.lang.previousText}</span></a>'+ 131 '</li>'+ 132 '<li class="highslide-play">'+
133 '<a href="#" title="{hs.lang.playTitle}">'+ 134 '<span>{hs.lang.playText}</span></a>'+ 135 '</li>'+ 136 '<li class="highslide-pause">'+ 137 '<a href="#" title="{hs.lang.pauseTitle}">'+ 138 '<span>{hs.lang.pauseText}</span></a>'+ 139 '</li>'+ 140 '<li class="highslide-next">'+ 141 '<a href="#" title="{hs.lang.nextTitle}">'+ 142 '<span>{hs.lang.nextText}</span></a>'+ 143 '</li>'+ 144 '<li class="highslide-move">'+ 145 '<a href="#" title="{hs.lang.moveTitle}">'+ 146 '<span>{hs.lang.moveText}</span></a>'+ 147 '</li>'+ 148 '<li class="highslide-full-expand">'+ 149 '<a href="#" title="{hs.lang.fullExpandTitle}">'+ 150 '<span>{hs.lang.fullExpandText}</span></a>'+ 151 '</li>'+ 152 '<li class="highslide-close">'+ 153 '<a href="#" title="{hs.lang.closeTitle}" >'+ 154 '<span>{hs.lang.closeText}</span></a>'+ 155 '</li>'+ 156 '</ul></div>' 157 , 158 contentWrapper: 159 '<div class="highslide-header"><ul>'+ 160 '<li class="highslide-previous">'+ 161 '<a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)">'+ 162 '<span>{hs.lang.previousText}</span></a>'+ 163 '</li>'+ 164 '<li class="highslide-next">'+ 165 '<a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)">'+ 166 '<span>{hs.lang.nextText}</span></a>'+ 167 '</li>'+ 168 '<li class="highslide-move">'+ 169 '<a href="#" title="{hs.lang.moveTitle}" onclick="return false">'+ 170 '<span>{hs.lang.moveText}</span></a>'+ 171 '</li>'+ 172 '<li class="highslide-close">'+ 173 '<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">'+ 174 '<span>{hs.lang.closeText}</span></a>'+ 175 '</li>'+ 176 '</ul></div>'+ 177 '<div class="highslide-body"></div>'+ 178 '<div class="highslide-footer"><div>'+ 179 '<span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span>'+ 180 '</div></div>' 181}, 182// END OF YOUR SETTINGS 183 184 185// declare internal properties 186preloadTheseImages : [], 187continuePreloading: true, 188expanders : [], 189overrides : [ 190 'allowSizeReduction', 191 'anchor', 192 'align', 193 'targetX', 194 'targetY', 195 'outlineType', 196 'outlineWhileAnimating', 197 'captionId', 198 'captionText', 199 'captionEval', 200 'captionOverlay', 201 'headingId', 202 'headingText', 203 'headingEval', 204 'headingOverlay', 205 'dragByHeading', 206 'autoplay', 207 'numberPosition', 208 'transitions', 209 'dimmingOpacity', 210 211 'contentId', 212 'width', 213 'height', 214 'allowWidthReduction', 215 'allowHeightReduction', 216 'preserveContent', 217 'maincontentId', 218 'maincontentText', 219 'maincontentEval', 220 'objectType', 221 'cacheAjax', 222 'objectWidth', 223 'objectHeight', 224 'objectLoadTime', 225 'swfOptions', 226 'wrapperClassName', 227 'minWidth', 228 'minHeight', 229 'maxWidth', 230 'maxHeight', 231 'slideshowGroup', 232 'easing', 233 'easingClose', 234 'fadeInOut', 235 'src' 236], 237overlays : [], 238idCounter : 0, 239oPos : { 240 x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'], 241 y: ['above', 'top', 'middle', 'bottom', 'below'] 242}, 243mouse: {}, 244headingOverlay: {}, 245captionOverlay: {}, 246swfOptions: { flashvars: {}, params: {}, attributes: {} }, 247faders : [], 248 249slideshows : [], 250 251pendingOutlines : {}, 252sleeping : [], 253preloadTheseAjax : [], 254cacheBindings : [], 255cachedGets : {}, 256clones : {}, 257ie : (document.all && !window.opera), 258safari : /Safari/.test(navigator.userAgent), 259geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent), 260 261$ : function (id) { 262 return document.getElementById(id); 263}, 264 265push : function (arr, val) { 266 arr[arr.length] = val; 267}, 268 269createElement : function (tag, attribs, styles, parent, nopad) { 270 var el = document.createElement(tag); 271 if (attribs) hs.setAttribs(el, attribs); 272 if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0}); 273 if (styles) hs.setStyles(el, styles); 274 if (parent) parent.appendChild(el); 275 return el; 276}, 277 278setAttribs : function (el, attribs) { 279 for (var x in attribs) el[x] = attribs[x]; 280}, 281 282setStyles : function (el, styles) { 283 for (var x in styles) { 284 if (hs.ie && x == 'opacity') { 285 if (styles[x] > 0.99) el.style.removeAttribute('filter'); 286 else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')'; 287 } 288 else el.style[x] = styles[x]; 289 } 290}, 291 292ieVersion : function () { 293 var arr = navigator.appVersion.split("MSIE"); 294 return arr[1] ? parseFloat(arr[1]) : null; 295}, 296 297getPageSize : function () { 298 var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat' 299 ? d.documentElement : d.body; 300 301 302 var b = d.body; 303 var xScroll = (w.innerWidth && w.scrollMaxX) 304 ? w.innerWidth + w.scrollMaxX : Math.max(b.scrollWidth, b.offsetWidth), 305 yScroll = (w.innerHeight && window.scrollMaxY) 306 ? w.innerHeight + w.scrollMaxY : Math.max(b.scrollHeight, b.offsetHeight), 307 pageWidth = hs.ie ? iebody.scrollWidth : 308 (d.documentElement.clientWidth || self.innerWidth), 309 pageHeight = hs.ie ? Math.max(iebody.scrollHeight, iebody.clientHeight) :
310 (d.documentElement.clientHeight || self.innerHeight); 311 312 var width = hs.ie ? iebody.clientWidth : 313 (d.documentElement.clientWidth || self.innerWidth), 314 height = hs.ie ? iebody.clientHeight : self.innerHeight; 315 316 return { 317 pageWidth: Math.max(pageWidth, xScroll), 318 pageHeight: Math.max(pageHeight, yScroll), 319 width: width, 320 height: height, 321 scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset, 322 scrollTop: hs.ie ? iebody.scrollTop : pageYOffset 323 } 324}, 325 326getPosition : function(el) { 327 if (/area/i.test(el.tagName)) { 328 var imgs = document.getElementsByTagName('img'); 329 for (var i = 0; i < imgs.length; i++) { 330 var u = imgs[i].useMap; 331 if (u && u.replace(/^.*?#/, '') == el.parentNode.name) { 332 el = imgs[i]; 333 break; 334 } 335 } 336 } 337 var p = { x: el.offsetLeft, y: el.offsetTop }; 338 while (el.offsetParent) { 339 el = el.offsetParent; 340 p.x += el.offsetLeft; 341 p.y += el.offsetTop; 342 if (el != document.body && el != document.documentElement) { 343 p.x -= el.scrollLeft; 344 p.y -= el.scrollTop; 345 } 346 } 347 return p; 348}, 349expand : function(a, params, custom, type) { 350 if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container); 351 if (typeof a.getParams == 'function') return params; 352 if (type == 'html') { 353 for (var i = 0; i < hs.sleeping.length; i++) { 354 if (hs.sleeping[i] && hs.sleeping[i].a == a) { 355 hs.sleeping[i].awake(); 356 hs.sleeping[i] = null; 357 return false; 358 } 359 } 360 hs.hasHtmlExpanders = true; 361 } 362 try { 363 new hs.Expander(a, params, custom, type); 364 return false; 365 } catch (e) { return true; } 366}, 367 368htmlExpand : function(a, params, custom) { 369 return hs.expand(a, params, custom, 'html'); 370}, 371 372getSelfRendered : function() { 373 return hs.createElement('div', { 374 className: 'highslide-html-content', 375 innerHTML: hs.replaceLang(hs.skin.contentWrapper) 376 }); 377}, 378getElementByClass : function (el, tagName, className) { 379 var els = el.getElementsByTagName(tagName); 380 for (var i = 0; i < els.length; i++) { 381 if ((new RegExp(className)).test(els[i].className)) { 382 return els[i]; 383 } 384 } 385 return null; 386}, 387replaceLang : function(s) { 388 s = s.replace(/\s/g, ' '); 389 var re = /{hs\.lang\.([^}]+)\}/g, 390 matches = s.match(re), 391 lang; 392 if (matches) for (var i = 0; i < matches.length; i++) { 393 lang = matches[i].replace(re, "$1"); 394 if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]); 395 } 396 return s; 397}, 398 399 400setClickEvents : function () { 401 var els = document.getElementsByTagName('a'); 402 for (var i = 0; i < els.length; i++) { 403 var type = hs.isUnobtrusiveAnchor(els[i]); 404 if (type && !els[i].hsHasSetClick) { 405 (function(){ 406 var t = type; 407 if (hs.fireEvent(hs, 'onSetClickEvent', { element: els[i], type: t })) { 408 els[i].onclick =(type == 'image') ?function() { return hs.expand(this) }: 409 function() { return hs.htmlExpand(this, { objectType: t } );}; 410 } 411 })(); 412 els[i].hsHasSetClick = true; 413 } 414 } 415 if (!hs.pageLoaded) setTimeout( hs.setClickEvents, 50); 416 else hs.updateAnchors(); 417}, 418isUnobtrusiveAnchor: function(el) { 419 if (el.rel == 'highslide') return 'image'; 420 else if (el.rel == 'highslide-ajax') return 'ajax'; 421 else if (el.rel == 'highslide-iframe') return 'iframe'; 422 else if (el.rel == 'highslide-swf') return 'swf'; 423}, 424 425getCacheBinding : function (a) { 426 for (var i = 0; i < hs.cacheBindings.length; i++) { 427 if (hs.cacheBindings[i][0] == a) { 428 var c = hs.cacheBindings[i][1]; 429 hs.cacheBindings[i][1] = c.cloneNode(1); 430 return c; 431 } 432 } 433 return null; 434}, 435 436preloadAjax : function (e) { 437 var arr = hs.getAnchors(); 438 for (var i = 0; i < arr.htmls.length; i++) { 439 var a = arr.htmls[i]; 440 if (hs.getParam(a, 'objectType') == 'ajax' && hs.getParam(a, 'cacheAjax')) 441 hs.push(hs.preloadTheseAjax, a); 442 } 443 444 hs.preloadAjaxElement(0); 445}, 446 447preloadAjaxElement : function (i) { 448 if (!hs.preloadTheseAjax[i]) return; 449 var a = hs.preloadTheseAjax[i]; 450 var cache = hs.getNode(hs.getParam(a, 'contentId')); 451 if (!cache) cache = hs.getSelfRendered();
452 var ajax = new hs.Ajax(a, cache, 1); 453 ajax.onError = function () { }; 454 ajax.onLoad = function () { 455 hs.push(hs.cacheBindings, [a, cache]); 456 hs.preloadAjaxElement(i + 1); 457 }; 458 ajax.run(); 459}, 460 461focusTopmost : function() { 462 var topZ = 0, topmostKey = -1; 463 for (var i = 0; i < hs.expanders.length; i++) { 464 if (hs.expanders[i]) { 465 if (hs.expanders[i].wrapper.style.zIndex && hs.expanders[i].wrapper.style.zIndex > topZ) { 466 topZ = hs.expanders[i].wrapper.style.zIndex; 467 468 topmostKey = i; 469 } 470 } 471 } 472 if (topmostKey == -1) hs.focusKey = -1; 473 else hs.expanders[topmostKey].focus(); 474}, 475 476getParam : function (a, param) { 477 a.getParams = a.onclick; 478 var p = a.getParams ? a.getParams() : null; 479 a.getParams = null; 480 481 return (p && typeof p[param] != 'undefined') ? p[param] : 482 (typeof hs[param] != 'undefined' ? hs[param] : null); 483}, 484 485getSrc : function (a) { 486 var src = hs.getParam(a, 'src'); 487 if (src) return src; 488 return a.href; 489}, 490 491getNode : function (id) { 492 var node = hs.$(id), clone = hs.clones[id], a = {}; 493 if (!node && !clone) return null; 494 if (!clone) { 495 clone = node.cloneNode(true); 496 clone.id = ''; 497 hs.clones[id] = clone; 498 return node; 499 } else { 500 return clone.cloneNode(true); 501 } 502}, 503 504discardElement : function(d) { 505 hs.garbageBin.appendChild(d); 506 hs.garbageBin.innerHTML = ''; 507}, 508dim : function(exp) { 509 if (!hs.dimmer) { 510 hs.dimmer = hs.createElement ('div', 511 { 512 className: 'highslide-dimming', 513 owner: '', 514 onclick: function() { 515 if (hs.fireEvent(hs, 'onDimmerClick')) 516 517 hs.close(); 518 } 519 }, 520 { position: 'absolute', left: 0 }, hs.container, true); 521 hs.addEventListener(window, 'resize', hs.setDimmerSize); 522 } 523 hs.dimmer.style.display = ''; 524 hs.setDimmerSize(); 525 hs.dimmer.owner += '|'+ exp.key; 526 if (hs.geckoMac && hs.dimmingGeckoFix) 527 hs.dimmer.style.background = 'url('+ hs.graphicsDir + 'geckodimmer.png)'; 528 else 529 hs.fade(hs.dimmer, 0, exp.dimmingOpacity, hs.dimmingDuration); 530}, 531undim : function(key) { 532 if (!hs.dimmer) return; 533 if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|'+ key, ''); 534 535 if ( 536 (typeof key != 'undefined' && hs.dimmer.owner != '') 537 || (hs.upcoming && hs.getParam(hs.upcoming, 'dimmingOpacity')) 538 ) return; 539 if (hs.geckoMac && hs.dimmingGeckoFix) 540 hs.setStyles(hs.dimmer, { background: 'none', width: 0, height: 0 }); 541 else hs.fade(hs.dimmer, hs.dimmingOpacity, 0, hs.dimmingDuration, function() { 542 hs.setStyles(hs.dimmer, { display: 'none', width: 0, height: 0 }); 543 }); 544}, 545setDimmerSize : function(exp) { 546 if (!hs.dimmer) return; 547 var page = hs.getPageSize(); 548 var h = (hs.ie && exp && exp.wrapper) ? 549 parseInt(exp.wrapper.style.top) + parseInt(exp.wrapper.style.height)+ (exp.outline ? exp.outline.offset : 0) : 0; 550 hs.setStyles(hs.dimmer, { 551 width: page.pageWidth +'px', 552 height: Math.max(page.pageHeight, h) +'px' 553 }); 554}, 555 556previousOrNext : function (el, op) { 557 hs.updateAnchors(); 558 var exp = hs.last = hs.getExpander(el); 559 try { 560 var adj = hs.upcoming = exp.getAdjacentAnchor(op); 561 adj.onclick(); 562 } catch (e){ 563 hs.last = hs.upcoming = null; 564 } 565 try { exp.close(); } catch (e) {} 566 return false; 567}, 568 569previous : function (el) { 570 return hs.previousOrNext(el, -1); 571}, 572 573next : function (el) { 574 return hs.previousOrNext(el, 1); 575}, 576 577keyHandler : function(e) { 578 if (!e) e = window.event; 579 if (!e.target) e.target = e.srcElement; // ie 580 if (typeof e.target.form != 'undefined') return true; // form element has focus 581 if (!hs.fireEvent(hs, 'onKeyDown', e)) return true; 582 var exp = hs.getExpander(); 583 584 var op = null; 585 switch (e.keyCode) { 586 case 70: // f 587 if (exp) exp.doFullExpand(); 588 return true; 589 case 32: // Space 590 op = 2; 591 break; 592 case 34: // Page Down 593 case 39: // Arrow right 594 case 40: // Arrow down 595 op = 1; 596 break; 597 case 8: // Backspace 598 case 33: // Page Up 599 case 37: // Arrow left 600 case 38: // Arrow up 601 op = -1; 602 break; 603 case 27: // Escape 604 case 13: // Enter 605 op = 0; 606 } 607 if (op !== null) {if (op != 2)hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); 608 if (!hs.enableKeyListener) return true; 609 610 if (e.preventDefault) e.preventDefault(); 611 else e.returnValue = false; 612 613 if (exp) { 614 if (op == 0) { 615 exp.close(); 616 } else if (op == 2) { 617 if (exp.slideshow) exp.slideshow.hitSpace(); 618 } else { 619 if (exp.slideshow) exp.slideshow.pause(); 620 hs.previousOrNext(exp.key, op); 621 } 622 return false; 623 } 624 } 625 return true; 626}, 627 628 629registerOverlay : function (overlay) { 630 hs.push(hs.overlays, overlay); 631}, 632 633 634addSlideshow : function (options) { 635 var sg = options.slideshowGroup; 636 if (typeof sg == 'object') { 637 for (var i = 0; i < sg.length; i++) { 638 var o = {}; 639 for (var x in options) o[x] = options[x]; 640 o.slideshowGroup = sg[i]; 641 hs.push(hs.slideshows, o); 642 } 643 } else { 644 hs.push(hs.slideshows, options); 645 } 646}, 647 648getWrapperKey : function (element, expOnly) { 649 var el, re = /^highslide-wrapper-([0-9]+)$/; 650 // 1. look in open expanders 651 el = element; 652 while (el.parentNode) { 653 if (el.id && re.test(el.id)) return el.id.replace(re, "$1"); 654 el = el.parentNode; 655 } 656 // 2. look in thumbnail 657 if (!expOnly) { 658 el = element; 659 while (el.parentNode) { 660 if (el.tagName && hs.isHsAnchor(el)) { 661 for (var key = 0; key < hs.expanders.length; key++) { 662 var exp = hs.expanders[key]; 663 if (exp && exp.a == el) return key; 664 } 665 } 666 el = el.parentNode; 667 } 668 } 669 return null; 670}, 671 672getExpander : function (el, expOnly) { 673 if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null; 674 if (typeof el == 'number') return hs.expanders[el] || null; 675 if (typeof el == 'string') el = hs.$(el); 676 return hs.expanders[hs.getWrapperKey(el, expOnly)] || null; 677}, 678 679isHsAnchor : function (a) { 680 return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/)); 681}, 682 683reOrder : function () { 684 for (var i = 0; i < hs.expanders.length; i++)
685 if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost(); 686}, 687fireEvent : function (obj, evt, args) { 688 return obj && obj[evt] ? (obj[evt](obj, args) !== false) : true; 689}, 690 691mouseClickHandler : function(e) 692{ 693 if (!e) e = window.event; 694 if (e.button > 1) return true; 695 if (!e.target) e.target = e.srcElement; 696 697 var el = e.target; 698 while (el.parentNode 699 && !(/highslide-(image|move|html|resize)/.test(el.className))) 700 { 701 el = el.parentNode; 702 } 703 var exp = hs.getExpander(el); 704 if (exp && (exp.isClosing || !exp.isExpanded)) return true; 705 706 if (exp && e.type == 'mousedown') { 707 if (e.target.form) return true; 708 var match = el.className.match(/highslide-(image|move|resize)/); 709 if (match) { 710 hs.dragArgs = { exp: exp , type: match[1], left: exp.x.pos, width: exp.x.size, top: exp.y.pos, 711 height: exp.y.size, clickX: e.clientX, clickY: e.clientY }; 712 713 714 hs.addEventListener(document, 'mousemove', hs.dragHandler); 715 if (e.preventDefault) e.preventDefault(); // FF 716 717 if (/highslide-(image|html)-blur/.test(exp.content.className)) { 718 exp.focus(); 719 hs.hasFocused = true; 720 } 721 return false; 722 } 723 else if (/highslide-html/.test(el.className) && hs.focusKey != exp.key) { 724 exp.focus(); 725 exp.doShowHide('hidden'); 726 } 727 } else if (e.type == 'mouseup') { 728 729 hs.removeEventListener(document, 'mousemove', hs.dragHandler); 730 731 if (hs.dragArgs) { 732 if (hs.dragArgs.type == 'image') 733 hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor; 734 var hasDragged = hs.dragArgs.hasDragged; 735 736 if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) { 737 if (hs.fireEvent(exp, 'onImageClick')) 738 exp.close(); 739 } 740 else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) { 741 hs.dragArgs.exp.doShowHide('hidden'); 742 } 743 744 if (hs.dragArgs.exp.releaseMask) 745 hs.dragArgs.exp.releaseMask.style.display = 'none'; 746 747 if (hasDragged) hs.fireEvent(hs.dragArgs.exp, 'onDrop', hs.dragArgs); 748 if (hasDragged) hs.setDimmerSize(exp); 749 750 hs.hasFocused = false; 751 hs.dragArgs = null; 752 753 } else if (/highslide-image-blur/.test(el.className)) { 754 el.style.cursor = hs.styleRestoreCursor; 755 } 756 } 757 return false; 758}, 759 760dragHandler : function(e) 761{ 762 if (!hs.dragArgs) return true; 763 if (!e) e = window.event; 764 var a = hs.dragArgs, exp = a.exp; 765 if (exp.iframe) { 766 if (!exp.releaseMask) exp.releaseMask = hs.createElement('div', null, 767 { position: 'absolute', width: exp.x.size+'px', height: exp.y.size+'px', 768 left: exp.x.cb+'px', top: exp.y.cb+'px', zIndex: 4, background: (hs.ie ? 'white' : 'none'), 769 opacity: .01 }, 770 exp.wrapper, true); 771 if (exp.releaseMask.style.display == 'none') 772 exp.releaseMask.style.display = ''; 773 } 774 775 a.dX = e.clientX - a.clickX; 776 a.dY = e.clientY - a.clickY; 777 778 var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2)); 779 if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0) 780 || (distance > (hs.dragSensitivity || 5)); 781 782 if (a.hasDragged && e.clientX > 5 && e.clientY > 5) { 783 if (!hs.fireEvent(exp, 'onDrag', a)) return false; 784 785 if (a.type == 'resize') exp.resize(a); 786 else { 787 exp.moveTo(a.left + a.dX, a.top + a.dY); 788 if (a.type == 'image') exp.content.style.cursor = 'move'; 789 } 790 } 791 return false; 792}, 793 794wrapperMouseHandler : function (e) { 795 try { 796 if (!e) e = window.event; 797 var over = /mouseover/i.test(e.type); 798 if (!e.target) e.target = e.srcElement; // ie 799 if (hs.ie) e.relatedTarget = 800 over ? e.fromElement : e.toElement; // ie 801 var exp = hs.getExpander(e.target); 802 if (!exp.isExpanded) return; 803 if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp 804 || hs.dragArgs) return; 805 hs.fireEvent(exp, over ? 'onMouseOver' : 'onMouseOut', e); 806 for (var i = 0; i < exp.overlays.length; i++) { 807 var o = hs.$('hsId'+ exp.overlays[i]); 808 if (o && o.hideOnMouseOut) { 809 var from = over ? 0 : o.opacity, 810 to = over ? o.opacity : 0; 811 hs.fade(o, from, to); 812 } 813 } 814 } catch (e) {} 815}, 816 817addEventListener : function (el, event, func) { 818 try { 819 el.addEventListener(event, func, false); 820 } catch (e) { 821 try { 822 el.detachEvent('on'+ event, func); 823 el.attachEvent('on'+ event, func); 824 } catch (e) { 825 el['on'+ event] = func; 826 } 827 } 828}, 829 830removeEventListener : function (el, event, func) { 831 try { 832 el.removeEventListener(event, func, false); 833 } catch (e) { 834 try { 835 el.detachEvent('on'+ event, func); 836 } catch (e) { 837 el['on'+ event] = null; 838 } 839 } 840}, 841 842preloadFullImage : function (i) { 843 if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') { 844 var img = document.createElement('img'); 845 img.onload = function() { 846 img = null; 847 hs.preloadFullImage(i + 1); 848 }; 849 img.src = hs.preloadTheseImages[i]; 850 } 851}, 852preloadImages : function (number) { 853 if (number && typeof number != 'object') hs.numberOfImagesToPreload = number; 854 855 var arr = hs.getAnchors();
856 for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) { 857 hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i])); 858 } 859 860 // preload outlines 861 if (hs.outlineType) new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} ); 862 else 863 864 hs.preloadFullImage(0); 865 866 // preload cursor 867 var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor }); 868}, 869 870 871init : function () { 872 if (!hs.container) { 873 hs.container = hs.createElement('div', { 874 className: 'highslide-container' 875 }, { 876 position: 'absolute', 877 left: 0, 878 top: 0, 879 width: '100%', 880 zIndex: hs.zIndexCounter, 881 direction: 'ltr' 882 }, 883 document.body, 884 true 885 ); 886 hs.loading = hs.createElement('a', { 887 className: 'highslide-loading', 888 title: hs.lang.loadingTitle, 889 innerHTML: hs.lang.loadingText, 890 href: 'javascript:;' 891 }, { 892 position: 'absolute', 893 top: '-9999px', 894 opacity: hs.loadingOpacity, 895 zIndex: 1 896 }, hs.container 897 ); 898 hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container); 899 hs.clearing = hs.createElement('div', null, 900 { clear: 'both', paddingTop: '1px' }, null, true); 901 902 // http://www.robertpenner.com/easing/ 903 Math.linearTween = function (t, b, c, d) { 904 return c*t/d + b; 905 }; 906 Math.easeInQuad = function (t, b, c, d) { 907 return c*(t/=d)*t + b; 908 }; 909 Math.easeInOutQuad = function (t, b, c, d) { 910 if ((t/=d/2) < 1) return c/2*t*t + b; 911 return -c/2 * ((--t)*(t-2) - 1) + b; 912 }; 913 for (var x in hs.langDefaults) { 914 if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x]; 915 else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined') 916 hs.lang[x] = hs.langDefaults[x]; 917 } 918 hs.ie6SSL = (hs.ie && hs.ieVersion() <= 6 && location.protocol == 'https:'); 919 920 hs.hideSelects = (hs.ie && hs.ieVersion() < 7); 921 hs.hideIframes = ((window.opera && navigator.appVersion < 9) || navigator.vendor == 'KDE' 922 || (hs.ie && hs.ieVersion() < 5.5)); 923 hs.fireEvent(this, 'onActivate'); 924 } 925}, 926domReady : function() { 927 hs.isDomReady = true; 928 if (hs.onDomReady) hs.onDomReady(); 929}, 930 931updateAnchors : function() { 932 var els = document.all || document.getElementsByTagName('*'), all = [], images = [], htmls = [],groups = {}, re; 933 934 for (var i = 0; i < els.length; i++) { 935 re = hs.isHsAnchor(els[i]); 936 if (re) { 937 hs.push(all, els[i]); 938 if (re[0] == 'hs.expand') hs.push(images, els[i]); 939 else if (re[0] == 'hs.htmlExpand') hs.push(htmls, els[i]); 940 var g = hs.getParam(els[i], 'slideshowGroup') || 'none'; 941 if (!groups[g]) groups[g] = []; 942 hs.push(groups[g], els[i]); 943 } 944 } 945 hs.anchors = { all: all, groups: groups, images: images, htmls: htmls }; 946 947 return hs.anchors; 948}, 949 950getAnchors : function() { 951 return hs.anchors || hs.updateAnchors(); 952}, 953 954 955fade : function (el, o, oFinal, dur, fn, i, dir) { 956 if (typeof i == 'undefined') { // new fader 957 if (typeof dur != 'number') dur = 250; 958 if (dur < 25) { // instant 959 hs.setStyles( el, { opacity: oFinal }); 960 if (fn) fn(); 961 return; 962 } 963 i = hs.faders.length; 964 dir = oFinal > o ? 1 : -1; 965 var step = (25 / (dur - dur % 25)) * Math.abs(o - oFinal); 966 } 967 o = parseFloat(o); 968 var skip = (el.fade === 0 || el.fade === false || (el.fade == 2 && hs.ie)); 969 el.style.visibility = ((skip ? oFinal : o) <= 0) ? 'hidden' : 'visible'; 970 if (skip || o < 0 || (dir == 1 && o > oFinal)) { 971 if (fn) fn(); 972 return; 973 } 974 if (el.fading && el.fading.i != i) { 975 clearTimeout(hs.faders[el.fading.i]); 976 o = el.fading.o; 977 } 978 el.fading = {i: i, o: o, step: (step || el.fading.step)}; 979 el.style.visibility = (o <= 0) ? 'hidden' : 'visible'; 980 hs.setStyles(el, { opacity: o }); 981 hs.faders[i] = setTimeout(function() { 982 hs.fade(el, o + el.fading.step * dir, oFinal, null, fn, i, dir); 983 }, 25); 984}, 985 986close : function(el) { 987 var exp = hs.getExpander(el); 988 if (exp) exp.close(); 989 return false; 990} 991}; // end hs object 992 993 994hs.Outline = function (outlineType, onLoad) { 995 this.onLoad = onLoad; 996 this.outlineType = outlineType; 997 var v = hs.ieVersion(), tr; 998 999 this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7; 1000 if (!outlineType) { 1001 if (onLoad) onLoad(); 1002 return; 1003 } 1004 1005 hs.init(); 1006 this.table = hs.createElement( 1007 'table', { 1008 cellSpacing: 0 1009 }, { 1010 visibility: 'hidden', 1011 position: 'absolute', 1012 borderCollapse: 'collapse', 1013 width: 0 1014 }, 1015 hs.container, 1016 true 1017 ); 1018 var tbody = hs.createElement('tbody', null, null, this.table, 1); 1019 1020 this.td = []; 1021 for (var i = 0; i <= 8; i++) { 1022 if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true); 1023 this.td[i] = hs.createElement('td', null, null, tr, true); 1024 var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' }; 1025 hs.setStyles(this.td[i], style); 1026 }
1027 this.td[4].className = outlineType +' highslide-outline'; 1028 1029 this.preloadGraphic(); 1030}; 1031 1032hs.Outline.prototype = { 1033preloadGraphic : function () { 1034 var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png"; 1035 1036 var appendTo = hs.safari ? hs.container : null; 1037 this.graphic = hs.createElement('img', {alt:'Elemento grafico'}, { position: 'absolute', 1038 top: '-9999px' }, appendTo, true); // for onload trigger 1039 1040 var pThis = this; 1041 this.graphic.onload = function() { pThis.onGraphicLoad(); }; 1042 1043 this.graphic.src = src; 1044}, 1045 1046onGraphicLoad : function () { 1047 1048 1049 var o = this.offset = (this.graphic?(this.graphic.width / 4):0), 1050 pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]], 1051 dim = { height: (2*o) +'px', width: (2*o) +'px' }; 1052 for (var i = 0; i <= 8; i++) { 1053 if (pos[i]) { 1054 if (this.hasAlphaImageLoader) { 1055 var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px'; 1056 var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true); 1057 hs.createElement ('div', null, { 1058 filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')", 1059 position: 'absolute', 1060 width: w, 1061 height: this.graphic.height +'px', 1062 left: (pos[i][0]*o)+'px', 1063 top: (pos[i][1]*o)+'px' 1064 }, 1065 div, 1066 true); 1067 } else { 1068 hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'}); 1069 } 1070 1071 if (window.opera && (i == 3 || i ==5)) 1072 hs.createElement('div', null, dim, this.td[i], true); 1073 1074 hs.setStyles (this.td[i], dim); 1075 } 1076 } 1077 this.graphic = null; 1078 if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy(); 1079 hs.pendingOutlines[this.outlineType] = this; 1080 if (this.onLoad) this.onLoad(); 1081}, 1082 1083setPosition : function (exp, pos, vis) { 1084 pos = pos || { 1085 x: exp.x.pos, 1086 y: exp.y.pos, 1087 w: exp.x.size + exp.x.p1 + exp.x.p2, 1088 h: exp.y.size + exp.y.p1 + exp.y.p2 1089 }; 1090 if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset) 1091 ? 'visible' : 'hidden'; 1092 hs.setStyles(this.table, { 1093 left: (pos.x - this.offset) +'px', 1094 top: (pos.y - this.offset) +'px', 1095 width: (pos.w + 2 * (exp.x.cb + this.offset)) +'px' 1096 }); 1097 1098 pos.w += 2 * (exp.x.cb - this.offset); 1099 pos.h += + 2 * (exp.y.cb - this.offset); 1100 hs.setStyles (this.td[4], { 1101 width: pos.w >= 0 ? pos.w +'px' : 0, 1102 height: pos.h >= 0 ? pos.h +'px' : 0 1103 }); 1104 if (this.hasAlphaImageLoader) this.td[3].style.height 1105 = this.td[5].style.height = this.td[4].style.height; 1106}, 1107 1108destroy : function(hide) { 1109 if (hide) this.table.style.visibility = 'hidden'; 1110 else hs.discardElement(this.table); 1111} 1112}; 1113 1114hs.Dimension = function(exp, dim) { 1115 this.exp = exp; 1116 this.dim = dim; 1117 this.ucwh = dim == 'x' ? 'Width' : 'Height'; 1118 this.wh = this.ucwh.toLowerCase(); 1119 this.uclt = dim == 'x' ? 'Left' : 'Top'; 1120 this.lt = this.uclt.toLowerCase(); 1121 this.ucrb = dim == 'x' ? 'Right' : 'Bottom'; 1122 this.rb = this.ucrb.toLowerCase(); 1123}; 1124hs.Dimension.prototype = { 1125get : function(key) { 1126 switch (key) { 1127 case 'loadingPos': 1128 return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2; 1129 case 'loadingPosXfade': 1130 return this.pos + this.cb+ this.p1 + (this.size - hs.loading['offset'+ this.ucwh]) / 2; 1131 case 'wsize': 1132 return this.size + 2 * this.cb + this.p1 + this.p2; 1133 case 'fitsize': 1134 return this.clientSize - this.marginMin - this.marginMax; 1135 case 'opos': 1136 return this.pos - (this.exp.outline ? this.exp.outline.offset : 0); 1137 case 'osize': 1138 return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0); 1139 case 'imgPad': 1140 return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0; 1141 1142 } 1143}, 1144calcBorders: function() { 1145 // correct for borders 1146 this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2; 1147 this.marginMax = hs['margin'+ this.ucrb] + 2 * this.cb; 1148}, 1149calcThumb: function() { 1150 this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) : 1151 this.exp.el['offset'+ this.ucwh]; 1152 this.tpos = this.exp.tpos[this.dim]; 1153 this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2; 1154 this.p1 = this.p2 = 0; 1155 if (this.tpos == 0) { 1156 this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt]; 1157 }; 1158}, 1159calcExpanded: function() { 1160 this.justify = 'auto'; 1161 1162 // get alignment 1163 if (this.exp.align == 'center') this.justify = 'center'; 1164 else if (new RegExp(this.lt).test(this.exp.anchor)) this.justify = null; 1165 else if (new RegExp(this.rb).test(this.exp.anchor)) this.justify = 'max'; 1166 1167 1168 // size and position 1169 this.pos = this.tpos - this.cb + this.tb; 1170 this.size = Math.min(this.full, this.exp['max'+ this.ucwh] || this.full); 1171 this.minSize = this.exp.allowSizeReduction ? 1172 Math.min(this.exp['min'+ this.ucwh], this.full) : this.full; 1173 if (hs.padToMinWidth && this.dim == 'x') this.minSize = this.exp.minWidth; 1174 this.target = this.exp['target'+ this.dim.toUpperCase()]; 1175 this.marginMin = hs['margin'+ this.uclt]; 1176 this.scroll = hs.page['scroll'+ this.uclt]; 1177 this.clientSize = hs.page[this.wh]; 1178}, 1179setSize: function(i) { 1180 this.size = i; 1181 this.exp.content.style[this.wh] = i +'px'; 1182 this.exp.wrapper.style[this.wh] = this.get('wsize') +'px'; 1183 if (this.exp.outline) this.exp.outline.setPosition(this.exp); 1184 if (this.exp.releaseMask) this.exp.releaseMask.style[this.wh] = i +'px'; 1185 if (this.exp.isHtml) { 1186 var d = this.exp.scrollerDiv; 1187 if (!this.sizeDiff) 1188 this.sizeDiff = this.exp.innerContent['offset'+ this.ucwh] - d['offset'+ this.ucwh]; 1189 d.style[this.wh] = (this.size - this.sizeDiff) +'px'; 1190 1191 if (this.dim == 'x') this.exp.mediumContent.style.width = 'auto'; 1192 if (this.exp.body) this.exp.body.style[this.wh] = 'auto'; 1193 1194 } 1195 if (this.dim == 'x' && this.exp.overlayBox) this.exp.sizeOverlayBox(true); 1196 if (this.dim == 'x' && this.exp.slideshow && this.exp.isImage) { 1197 if (i == this.full) this.exp.slideshow.disable('full-expand'); 1198 else this.exp.slideshow.enable('full-expand'); 1199 } 1200}, 1201setPos: function(i) { 1202 this.pos = i; 1203 this.exp.wrapper.style[this.lt] = i +'px'; 1204 1205 if (this.exp.outline) this.exp.outline.setPosition(this.exp); 1206 1207} 1208}; 1209 1210hs.Expander = function(a, params, custom, contentType) { 1211 if (document.readyState && hs.ie && !hs.isDomReady) { 1212 hs.onDomReady = function() { 1213 new hs.Expander(a, params, custom, contentType); 1214 }; 1215 return; 1216 } 1217 this.a = a; 1218 this.custom = custom; 1219 this.contentType = contentType || 'image'; 1220 this.isHtml = (contentType == 'html'); 1221 this.isImage = !this.isHtml; 1222 1223 hs.continuePreloading = false; 1224 this.overlays = []; 1225 this.last = hs.last; 1226 hs.last = null; 1227 hs.init(); 1228 var key = this.key = hs.expanders.length; 1229 // override inline parameters 1230 for (var i = 0; i < hs.overrides.length; i++) { 1231 var name = hs.overrides[i];
1232 this[name] = params && typeof params[name] != 'undefined' ? 1233 params[name] : hs[name]; 1234 } 1235 if (!this.src) this.src = a.href; 1236 // get thumb 1237 var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a; 1238 el = this.thumb = el.getElementsByTagName('img')[0] || el; 1239 this.thumbsUserSetId = el.id || a.id; 1240 if (!hs.fireEvent(this, 'onInit')) return true; 1241 1242 // check if already open 1243 for (var i = 0; i < hs.expanders.length; i++) { 1244 if (hs.expanders[i] && hs.expanders[i].a == a 1245 && !(this.last && this.transitions[1] == 'crossfade')) { 1246 hs.expanders[i].focus(); 1247 return false; 1248 } 1249 } 1250 // cancel other 1251 for (var i = 0; i < hs.expanders.length; i++) { 1252 if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) { 1253 hs.expanders[i].cancelLoading(); 1254 } 1255 } 1256 hs.expanders[this.key] = this; 1257 if (!hs.allowMultipleInstances) { 1258 if (hs.expanders[key-1]) hs.expanders[key-1].close(); 1259 if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey]) 1260 hs.expanders[hs.focusKey].close(); 1261 } 1262 1263 1264 // initiate metrics 1265 this.el = el; 1266 this.tpos = hs.getPosition(el); 1267 hs.page = hs.getPageSize(); 1268 var x = this.x = new hs.Dimension(this, 'x'); 1269 x.calcThumb(); 1270 var y = this.y = new hs.Dimension(this, 'y'); 1271 y.calcThumb(); 1272 if (/area/i.test(el.tagName)) this.getImageMapAreaCorrection(el); 1273 1274 // instanciate the wrapper 1275 this.wrapper = hs.createElement( 1276 'div', { 1277 id: 'highslide-wrapper-'+ this.key, 1278 className: this.wrapperClassName 1279 }, { 1280 visibility: 'hidden', 1281 position: 'absolute', 1282 zIndex: hs.zIndexCounter++ 1283 }, null, true ); 1284 1285 this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler; 1286 if (this.contentType == 'image' && this.outlineWhileAnimating == 2) 1287 this.outlineWhileAnimating = 0; 1288 1289 // get the outline 1290 if (!this.outlineType 1291 || (this.last && this.isImage && this.transitions[1] == 'crossfade')) { 1292 this[this.contentType +'Create'](); 1293 1294 } else if (hs.pendingOutlines[this.outlineType]) { 1295 this.connectOutline(); 1296 this[this.contentType +'Create'](); 1297 1298 } else { 1299 this.showLoading(); 1300 var exp = this; 1301 new hs.Outline(this.outlineType, 1302 function () { 1303 exp.connectOutline(); 1304 exp[exp.contentType +'Create'](); 1305 } 1306 ); 1307 } 1308 return true; 1309}; 1310 1311hs.Expander.prototype = { 1312 1313connectOutline : function() { 1314 var o = this.outline = hs.pendingOutlines[this.outlineType]; 1315 o.table.style.zIndex = this.wrapper.style.zIndex; 1316 hs.pendingOutlines[this.outlineType] = null; 1317}, 1318 1319showLoading : function() { 1320 if (this.onLoadStarted || this.loading) return; 1321 1322 this.loading = hs.loading; 1323 var exp = this; 1324 this.loading.onclick = function() { 1325 exp.cancelLoading(); 1326 }; 1327 1328 1329 if (!hs.fireEvent(this, 'onShowLoading')) return; 1330 var exp = this, 1331 l = this.x.get('loadingPos') +'px', 1332 t = this.y.get('loadingPos') +'px'; 1333 if (!tgt && this.last && this.transitions[1] == 'crossfade') 1334 var tgt = this.last; 1335 if (tgt) { 1336 l = tgt.x.get('loadingPosXfade') +'px'; 1337 t = tgt.y.get('loadingPosXfade') +'px'; 1338 this.loading.style.zIndex = hs.zIndexCounter++; 1339 } 1340 setTimeout(function () { 1341 if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })} 1342 , 100); 1343}, 1344 1345imageCreate : function() { 1346 var exp = this; 1347 1348 var img = document.createElement('img'); 1349 this.content = img; 1350 img.onload = function () { 1351 if (hs.expanders[exp.key]) exp.contentLoaded(); 1352 }; 1353 if (hs.blockRightClick) img.oncontextmenu = function() { return false; }; 1354 img.className = 'highslide-image'; 1355 hs.setStyles(img, { 1356 visibility: 'hidden', 1357 display: 'block', 1358 position: 'absolute', 1359 maxWidth: '9999px', 1360 zIndex: 3 1361 }); 1362 img.title = hs.lang.restoreTitle; 1363 if (hs.safari) hs.container.appendChild(img); 1364 if (hs.ie && hs.flushImgSize) img.src = null; 1365 img.src = this.src; 1366 1367 this.showLoading(); 1368}, 1369 1370htmlCreate : function () { 1371 if (!hs.fireEvent(this, 'onBeforeGetContent')) return; 1372 1373 this.content = hs.getCacheBinding(this.a); 1374 if (!this.content) 1375 this.content = hs.getNode(this.contentId); 1376 if (!this.content) 1377 this.content = hs.getSelfRendered(); 1378 this.getInline(['maincontent']); 1379 if (this.maincontent) { 1380 var body = hs.getElementByClass(this.content, 'div', 'highslide-body'); 1381 if (body) body.appendChild(this.maincontent); 1382 this.maincontent.style.display = 'block'; 1383 } 1384 hs.fireEvent(this, 'onAfterGetContent'); 1385 1386 this.innerContent = this.content; 1387 1388 if (/(swf|iframe)/.test(this.objectType)) this.setObjContainerSize(this.innerContent); 1389 1390 // the content tree 1391 hs.container.appendChild(this.wrapper); 1392 hs.setStyles( this.wrapper, { 1393 position: 'static', 1394 padding: '0 '+ hs.marginRight +'px 0 '+ hs.marginLeft +'px' 1395 }); 1396 this.content = hs.createElement( 1397 'div', { 1398 className: 'highslide-html' 1399 }, { 1400 position: 'relative', 1401 zIndex: 3, 1402 overflow: 'hidden' 1403 }, 1404 this.wrapper 1405 ); 1406 this.mediumContent = hs.createElement('div', null, null, this.content, 1); 1407 this.mediumContent.appendChild(this.innerContent); 1408 1409 hs.setStyles (this.innerContent, { 1410 position: 'relative', 1411 display: 'block', 1412 direction: hs.lang.cssDirection || '' 1413 }); 1414 if (this.width) this.innerContent.style.width = this.width+'px'; 1415 if (this.height) this.innerContent.style.height = this.height+'px'; 1416 if (this.innerContent.offsetWidth < this.minWidth) 1417 this.innerContent.style.width = this.minWidth +'px'; 1418 1419 1420 if (this.objectType == 'ajax' && !hs.getCacheBinding(this.a)) { 1421 this.showLoading(); 1422 var ajax = new hs.Ajax(this.a, this.innerContent); 1423 var exp = this;
1424 ajax.onLoad = function () { if (hs.expanders[exp.key]) exp.contentLoaded(); }; 1425 ajax.onError = function () { location.href = exp.src; }; 1426 ajax.run(); 1427 } 1428 else 1429 1430 if (this.objectType == 'iframe' && this.objectLoadTime == 'before') { 1431 this.writeExtendedContent(); 1432 } 1433 else 1434 this.contentLoaded(); 1435}, 1436 1437contentLoaded : function() { 1438 try { 1439 if (!this.content) return; 1440 this.content.onload = null; 1441 if (this.onLoadStarted) return; 1442 else this.onLoadStarted = true; 1443 1444 var x = this.x, y = this.y; 1445 1446 if (this.loading) { 1447 hs.setStyles(this.loading, { top: '-9999px' }); 1448 this.loading = null; 1449 hs.fireEvent(this, 'onHideLoading'); 1450 } 1451 //this.marginBottom = hs.marginBottom; 1452 if (this.isImage) { 1453 x.full = this.content.width; 1454 y.full = this.content.height; 1455 1456 hs.setStyles(this.content, { 1457 width: this.x.t +'px', 1458 height: this.y.t +'px' 1459 }); 1460 } else if (this.htmlGetSize) this.htmlGetSize(); 1461 1462 this.wrapper.appendChild(this.content); 1463 hs.setStyles (this.wrapper, { 1464 left: this.x.tpos +'px', 1465 top: this.y.tpos +'px' 1466 }); 1467 hs.container.appendChild(this.wrapper); 1468 1469 x.calcBorders(); 1470 y.calcBorders(); 1471 1472 1473 this.initSlideshow(); 1474 this.getOverlays(); 1475 1476 var ratio = x.full / y.full; 1477 1478 x.calcExpanded(); 1479 this.justify(x); 1480 1481 y.calcExpanded(); 1482 this.justify(y); 1483 if (this.isHtml) this.htmlSizeOperations(); 1484 if (this.overlayBox) this.sizeOverlayBox(0, 1); 1485 1486 if (this.allowSizeReduction) { 1487 if (this.isImage) 1488 this.correctRatio(ratio); 1489 else this.fitOverlayBox(); 1490 var ss = this.slideshow; 1491 if (ss && this.last && ss.controls && ss.fixedControls) { 1492 var pos = ss.overlayOptions.position || '', p; 1493 for (var dim in hs.oPos) for (var i = 0; i < 5; i++) { 1494 p = this[dim]; 1495 if (pos.match(hs.oPos[dim][i])) { 1496 p.pos = this.last[dim].pos 1497 + (this.last[dim].p1 - p.p1) 1498 + (this.last[dim].size - p.size) * [0, 0, .5, 1, 1][i]; 1499 if (ss.fixedControls == 'fit') { 1500 if (p.pos + p.size + p.p1 + p.p2 > p.scroll + p.clientSize - p.marginMax) 1501 p.pos = p.scroll + p.clientSize - p.size - p.marginMin - p.marginMax - p.p1 - p.p2; 1502 if (p.pos < p.scroll + p.marginMin) p.pos = p.scroll + p.marginMin; 1503 } 1504 } 1505 } 1506 } 1507 1508 if (this.isImage && this.x.full > this.x.size) { 1509 this.createFullExpand(); 1510 if (this.overlays.length == 1) this.sizeOverlayBox(); 1511 } 1512 } 1513 this.show(); 1514 1515 } catch (e) { 1516 window.location.href = this.src; 1517 } 1518}, 1519 1520 1521setObjContainerSize : function(parent, auto) { 1522 var c = hs.getElementByClass(parent, 'DIV', 'highslide-body'); 1523 if (/(iframe|swf)/.test(this.objectType)) { 1524 if (this.objectWidth) c.style.width = this.objectWidth +'px'; 1525 if (this.objectHeight) c.style.height = this.objectHeight +'px'; 1526 } 1527}, 1528 1529writeExtendedContent : function () { 1530 if (this.hasExtendedContent) return; 1531 var exp = this; 1532 this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body'); 1533 if (this.objectType == 'iframe') { 1534 this.showLoading(); 1535 var ruler = hs.clearing.cloneNode(1); 1536 this.body.appendChild(ruler); 1537 this.newWidth = this.innerContent.offsetWidth; 1538 if (!this.objectWidth) this.objectWidth = ruler.offsetWidth; 1539 var hDiff = this.innerContent.offsetHeight - this.body.offsetHeight, 1540 h = this.objectHeight || (hs.getPageSize()).height - hDiff - hs.marginTop - hs.marginBottom, 1541 onload = this.objectLoadTime == 'before' ? 1542 ' onload="if (hs.expanders['+ this.key +']) hs.expanders['+ this.key +'].contentLoaded()" ' : ''; 1543 1544 this.body.innerHTML += '<iframe name="hs'+ (new Date()).getTime() +'" frameborder="0" key="'+ this.key +'" ' 1545 +' allowtransparency="true" style="width:'+ this.objectWidth +'px; height:'+ h +'px" ' 1546 + onload +' src="'+ this.src +'"></iframe>'; 1547 this.ruler = this.body.getElementsByTagName('div')[0]; 1548 this.iframe = this.body.getElementsByTagName('iframe')[0]; 1549 1550 if (this.objectLoadTime == 'after') this.correctIframeSize(); 1551 1552 } 1553 if (this.objectType == 'swf') { 1554 this.body.id = this.body.id || 'hs-flash-id-' + this.key; 1555 var a = this.swfOptions; 1556 if (typeof a.params.wmode == 'undefined') a.params.wmode = 'transparent'; 1557 if (swfobject) swfobject.embedSWF(this.src, this.body.id, this.objectWidth, this.objectHeight, 1558 a.version || '7', a.expressInstallSwfurl, a.flashvars, a.params, a.attributes); 1559 } 1560 this.hasExtendedContent = true; 1561}, 1562htmlGetSize : function() { 1563 if (this.iframe && !this.objectHeight) { // loadtime before 1564 this.iframe.style.height = this.body.style.height = this.getIframePageHeight() +'px'; 1565 } 1566 this.innerContent.appendChild(hs.clearing); 1567 if (!this.x.full) this.x.full = this.innerContent.offsetWidth; 1568 this.y.full = this.innerContent.offsetHeight; 1569 this.innerContent.removeChild(hs.clearing); 1570 if (hs.ie && this.newHeight > parseInt(this.innerContent.currentStyle.height)) { // ie css bug 1571 this.newHeight = parseInt(this.innerContent.currentStyle.height); 1572 } 1573 hs.setStyles( this.wrapper, { position: 'absolute', padding: '0'}); 1574 hs.setStyles( this.content, { width: this.x.t +'px', height: this.y.t +'px'}); 1575}, 1576 1577getIframePageHeight : function() { 1578 var h; 1579 try { 1580 var doc = this.iframe.contentDocument || this.iframe.contentWindow.document; 1581 var clearing = doc.createElement('div'); 1582 clearing.style.clear = 'both'; 1583 doc.body.appendChild(clearing); 1584 h = clearing.offsetTop; 1585 if (hs.ie) h += parseInt(doc.body.currentStyle.marginTop) 1586 + parseInt(doc.body.currentStyle.marginBottom) - 1; 1587 } catch (e) { // other domain 1588 h = 300; 1589 } 1590 return h; 1591}, 1592correctIframeSize : function () { 1593 var wDiff = this.innerContent.offsetWidth - this.ruler.offsetWidth; 1594 if (wDiff < 0) wDiff = 0; 1595 1596 var hDiff = this.innerContent.offsetHeight - this.body.offsetHeight; 1597 1598 hs.setStyles(this.iframe, { width: (this.x.size - wDiff) +'px', 1599 height: (this.y.size - hDiff) +'px' }); 1600 hs.setStyles(this.body, { width: this.iframe.style.width, 1601 height: this.iframe.style.height });
1602 1603 this.scrollingContent = this.iframe; 1604 this.scrollerDiv = this.scrollingContent; 1605}, 1606htmlSizeOperations : function () { 1607 1608 this.setObjContainerSize(this.innerContent); 1609 1610 1611 if (this.objectType == 'swf' && this.objectLoadTime == 'before') this.writeExtendedContent(); 1612 1613 // handle minimum size 1614 if (this.x.size < this.x.full && !this.allowWidthReduction) this.x.size = this.x.full; 1615 if (this.y.size < this.y.full && !this.allowHeightReduction) this.y.size = this.y.full; 1616 this.scrollerDiv = this.innerContent; 1617 hs.setStyles(this.mediumContent, { 1618 width: this.x.size +'px', 1619 position: 'relative', 1620 left: (this.x.pos - this.x.tpos) +'px', 1621 top: (this.y.pos - this.y.tpos) +'px' 1622 }); 1623 hs.setStyles(this.innerContent, { 1624 border: 'none', 1625 width: 'auto', 1626 height: 'auto' 1627 }); 1628 var node = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body'); 1629 if (node && !/(iframe|swf)/.test(this.objectType)) { 1630 var cNode = node; // wrap to get true size 1631 node = hs.createElement(cNode.nodeName, null, {overflow: 'hidden'}, null, true); 1632 cNode.parentNode.insertBefore(node, cNode); 1633 node.appendChild(hs.clearing); // IE6 1634 node.appendChild(cNode); 1635 1636 var wDiff = this.innerContent.offsetWidth - node.offsetWidth; 1637 var hDiff = this.innerContent.offsetHeight - node.offsetHeight; 1638 node.removeChild(hs.clearing); 1639 1640 var kdeBugCorr = hs.safari || navigator.vendor == 'KDE' ? 1 : 0; // KDE repainting bug 1641 hs.setStyles(node, { 1642 width: (this.x.size - wDiff - kdeBugCorr) +'px', 1643 height: (this.y.size - hDiff) +'px', 1644 overflow: 'auto', 1645 position: 'relative' 1646 } 1647 ); 1648 if (kdeBugCorr && cNode.offsetHeight > node.offsetHeight) { 1649 node.style.width = (parseInt(node.style.width) + kdeBugCorr) + 'px'; 1650 } 1651 this.scrollingContent = node; 1652 this.scrollerDiv = this.scrollingContent; 1653 } 1654 if (this.iframe && this.objectLoadTime == 'before') this.correctIframeSize(); 1655 if (!this.scrollingContent && this.y.size < this.mediumContent.offsetHeight) this.scrollerDiv = this.content; 1656 1657 if (this.scrollerDiv == this.content && !this.allowWidthReduction && !/(iframe|swf)/.test(this.objectType)) { 1658 this.x.size += 17; // room for scrollbars 1659 } 1660 if (this.scrollerDiv && this.scrollerDiv.offsetHeight > this.scrollerDiv.parentNode.offsetHeight) { 1661 setTimeout("try { hs.expanders["+ this.key +"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}", 1662 hs.expandDuration); 1663 } 1664}, 1665 1666getImageMapAreaCorrection : function(area) { 1667 var c = area.coords.split(','); 1668 for (var i = 0; i < c.length; i++) c[i] = parseInt(c[i]); 1669 1670 if (area.shape.toLowerCase() == 'circle') { 1671 this.x.tpos += c[0] - c[2]; 1672 this.y.tpos += c[1] - c[2]; 1673 this.x.t = this.y.t = 2 * c[2]; 1674 } else { 1675 var maxX, maxY, minX = maxX = c[0], minY = maxY = c[1]; 1676 for (var i = 0; i < c.length; i++) { 1677 if (i % 2 == 0) { 1678 minX = Math.min(minX, c[i]); 1679 maxX = Math.max(maxX, c[i]); 1680 } else { 1681 minY = Math.min(minY, c[i]); 1682 maxY = Math.max(maxY, c[i]); 1683 } 1684 } 1685 this.x.tpos += minX; 1686 this.x.t = maxX - minX; 1687 this.y.tpos += minY; 1688 this.y.t = maxY - minY; 1689 } 1690}, 1691justify : function (p, moveOnly) { 1692 var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y'; 1693 1694 if (tgt && tgt.match(/ /)) { 1695 tgtArr = tgt.split(' '); 1696 tgt = tgtArr[0]; 1697 } 1698 if (tgt && hs.$(tgt)) { 1699 p.pos = hs.getPosition(hs.$(tgt))[dim]; 1700 if (tgtArr && tgtArr[1] && tgtArr[1].match(/^[-]?[0-9]+px$/)) 1701 p.pos += parseInt(tgtArr[1]); 1702 1703 } else if (p.justify == 'auto' || p.justify == 'center') { 1704 1705 var hasMovedMin = false; 1706 1707 var allowReduce = hs.allowSizeReduction; 1708 if (p.justify == 'center') p.pos = Math.round(p.scroll + (p.clientSize - p.marginMax - p.get('wsize')) / 2); 1709 else 1710 p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2)); 1711 if (p.pos < p.scroll + p.marginMin) { 1712 p.pos = p.scroll + p.marginMin; 1713 hasMovedMin = true; 1714 } 1715 if (!moveOnly && p.size < p.minSize) { 1716 p.size = p.minSize; 1717 allowReduce = false; 1718 } 1719 if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) { 1720 if (!moveOnly && hasMovedMin && allowReduce) { 1721 p.size = p.get('fitsize'); // can't expand more 1722 } else if (p.get('wsize') < p.get('fitsize')) { 1723 p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize'); 1724 } else { // image larger than viewport 1725 p.pos = p.scroll + p.marginMin; 1726 if (!moveOnly && allowReduce) p.size = p.get('fitsize'); 1727 } 1728 } 1729 1730 if (!moveOnly && p.size < p.minSize) { 1731 p.size = p.minSize; 1732 allowReduce = false; 1733 } 1734 1735 1736 } else if (p.justify == 'max') { 1737 p.pos = Math.floor(p.pos - p.size + p.t); 1738 } 1739 1740 1741 if (p.pos < p.marginMin) { 1742 var tmpMin = p.pos; 1743 p.pos = p.marginMin; 1744 1745 if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin); 1746 1747 } 1748}, 1749
1750correctRatio : function(ratio) { 1751 var x = this.x, y = this.y; 1752 var changed = false; 1753 if (x.size / y.size > ratio) { // width greater 1754 x.size = y.size * ratio; 1755 if (x.size < x.minSize) { // below minWidth 1756 if (hs.padToMinWidth) x.imgSize = x.size; 1757 x.size = x.minSize; 1758 if (!x.imgSize) 1759 y.size = x.size / ratio; 1760 } 1761 changed = true; 1762 1763 } else if (x.size / y.size < ratio) { // height greater 1764 var tmpHeight = y.size; 1765 y.size = x.size / ratio; 1766 changed = true; 1767 } 1768 this.fitOverlayBox(ratio); 1769 1770 if (changed) { 1771 x.pos = x.tpos - x.cb + x.tb; 1772 x.minSize = x.size; 1773 this.justify(x, true); 1774 1775 y.pos = y.tpos - y.cb + y.tb; 1776 y.minSize = y.size; 1777 this.justify(y, true); 1778 if (this.overlayBox) this.sizeOverlayBox(); 1779 } 1780}, 1781fitOverlayBox : function(ratio) { 1782 var x = this.x, y = this.y; 1783 if (this.overlayBox) { 1784 while (y.size > this.minHeight && x.size > this.minWidth 1785 && y.get('wsize') > y.get('fitsize')) { 1786 y.size -= 10; 1787 if (ratio) x.size = y.size * ratio; 1788 this.sizeOverlayBox(0, 1); 1789 } 1790 } 1791}, 1792 1793reflow : function () { 1794 var h = /iframe/i.test(this.scrollerDiv.tagName) ? this.getIframePageHeight() + 1 +'px' : 'auto'; 1795 if (this.body) this.body.style.height = h; 1796 this.scrollerDiv.style.height = h; 1797 this.y.setSize(this.innerContent.offsetHeight); 1798}, 1799 1800show : function () { 1801 this.doShowHide('hidden'); 1802 hs.fireEvent(this, 'onBeforeExpand'); 1803 // Apply size change 1804 this.changeSize( 1805 1, 1806 { 1807 xpos: this.x.tpos + this.x.tb - this.x.cb, 1808 ypos: this.y.tpos + this.y.tb - this.y.cb, 1809 xsize: this.x.t, 1810 ysize: this.y.t, 1811 xp1: 0, 1812 xp2: 0, 1813 yp1: 0, 1814 yp2: 0, 1815 ximgSize: this.x.t, 1816 ximgPad: 0, 1817 o: hs.outlineStartOffset 1818 }, 1819 { 1820 xpos: this.x.pos, 1821 ypos: this.y.pos, 1822 xsize: this.x.size, 1823 ysize: this.y.size, 1824 xp1: this.x.p1, 1825 yp1: this.y.p1, 1826 xp2: this.x.p2, 1827 yp2: this.y.p2, 1828 ximgSize: this.x.imgSize, 1829 ximgPad: this.x.get('imgPad'), 1830 o: this.outline ? this.outline.offset : 0 1831 }, 1832 hs.expandDuration 1833 ); 1834}, 1835 1836changeSize : function(up, from, to, dur) { 1837 // transition 1838 var trans = this.transitions, 1839 other = up ? (this.last ? this.last.a : null) : hs.upcoming, 1840 t = (trans[1] && other 1841 && hs.getParam(other, 'transitions')[1] == trans[1]) ? 1842 trans[1] : trans[0]; 1843 if (up && other && this.isHtml && trans[1] == 'crossfade') t = trans[1] = 'fade'; 1844 1845 if (this[t] && t != 'expand') { 1846 this[t](up, from, to); 1847 return; 1848 } 1849 if (up) hs.setStyles(this.wrapper, { opacity: 1 }); 1850 1851 if (this.outline && !this.outlineWhileAnimating) { 1852 if (up) this.outline.setPosition(this); 1853 else this.outline.destroy( 1854 (this.isHtml && this.preserveContent)); 1855 } 1856 1857 1858 if (!up && this.overlayBox) { 1859 if (this.slideshow) { 1860 var c = this.slideshow.controls; 1861 if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c); 1862 } 1863 if (this.isHtml && this.preserveContent) { 1864 this.overlayBox.style.top = '-9999px'; 1865 hs.container.appendChild(this.overlayBox); 1866 } else 1867 hs.discardElement(this.overlayBox); 1868 } 1869 if (this.fadeInOut) { 1870 from.op = up ? 0 : 1; 1871 to.op = up; 1872 } 1873 var t, 1874 exp = this, 1875 easing = Math[this.easing] || Math.easeInQuad, 1876 steps = (up ? hs.expandSteps : hs.restoreSteps) || parseInt(dur / 25) || 1; 1877 if (!up) easing = Math[this.easingClose] || easing; 1878 for (var i = 1; i <= steps ; i++) { 1879 t = Math.round(i * (dur / steps)); 1880 1881 (function(){ 1882 var pI = i, size = {}; 1883 1884 for (var x in from) { 1885 size[x] = easing(t, from[x], to[x] - from[x], dur); 1886 if (isNaN(size[x])) size[x] = to[x]; 1887 if (!/^op$/.test(x)) size[x] = Math.round(size[x]); 1888 } 1889 setTimeout ( function() { 1890 if (up && pI == 1) { 1891 exp.content.style.visibility = 'visible'; 1892 exp.a.className += ' highslide-active-anchor'; 1893 } 1894 exp.setSize(size); 1895 }, t); 1896 })(); 1897 } 1898 1899 if (up) { 1900 1901 setTimeout(function() { 1902 if (exp.outline) exp.outline.table.style.visibility = "visible"; 1903 }, t); 1904 setTimeout(function() { 1905 exp.afterExpand(); 1906 }, t + 50); 1907 } 1908 else setTimeout(function() { exp.afterClose(); }, t); 1909}, 1910 1911setSize : function (to) { 1912 try { 1913 if (to.op) hs.setStyles(this.wrapper, { opacity: to.op }); 1914 hs.setStyles ( this.wrapper, { 1915 width : (to.xsize +to.xp1 + to.xp2 + 1916 2 * this.x.cb) +'px', 1917 height : (to.ysize +to.yp1 + to.yp2 + 1918 2 * this.y.cb) +'px', 1919 left: to.xpos +'px', 1920 top: to.ypos +'px' 1921 }); 1922 hs.setStyles(this.content, { 1923 top: to.yp1 +'px', 1924 left: (to.xp1 + to.ximgPad) +'px', 1925 width: (to.ximgSize ||to.xsize) +'px', 1926 height: to.ysize +'px' 1927 }); 1928 if (this.isHtml) { 1929 hs.setStyles(this.mediumContent, { 1930 left: (this.x.pos - to.xpos 1931 + this.x.p1 - to.xp1) +'px', 1932 top: (this.y.pos - to.ypos 1933 + this.y.p1 - to.yp1) +'px' 1934 }); 1935 this.innerContent.style.visibility = 'visible'; 1936 } 1937 1938 if (this.outline && this.outlineWhileAnimating) { 1939 var o = this.outline.offset - to.o; 1940 this.outline.setPosition(this, { 1941 x: to.xpos + o, 1942 y: to.ypos + o, 1943 w: to.xsize + to.xp1 + to.xp2 + - 2 * o, 1944 h: to.ysize + to.yp1 + to.yp2 + - 2 * o 1945 }, 1); 1946 } 1947 1948 this.wrapper.style.visibility = 'visible'; 1949 1950 } catch (e) { 1951 window.location.href = this.src; 1952 } 1953}, 1954 1955fade : function(up, from, to) { 1956 this.outlineWhileAnimating = false; 1957 var exp = this, t = up ? 250 : 0; 1958 1959 if (up) { 1960 hs.setStyles(this.wrapper, { opacity: 0 }); 1961 this.setSize(to); 1962 this.content.style.visibility = 'visible'; 1963 1964 hs.fade (this.wrapper, 0, 1); 1965 } 1966 1967 if (this.outline) { 1968 this.outline.table.style.zIndex = this.wrapper.style.zIndex; 1969 var dir = up || -1; 1970 for (var i = from.o; dir * i <= dir * to.o; i += dir, t += 25) { 1971 (function() { 1972 var o = up ? to.o - i : from.o - i; 1973 setTimeout(function() { 1974 exp.outline.setPosition(exp, { 1975 x: (exp.x.pos + o),
1976 y: (exp.y.pos + o), 1977 w: (exp.x.size - 2 * o + exp.x.p1 + exp.x.p2), 1978 h: (exp.y.size - 2 * o + exp.y.p1 + exp.y.p2) 1979 }, 1); 1980 }, t); 1981 })(); 1982 } 1983 } 1984 1985 1986 if (up) setTimeout(function() { exp.afterExpand(); }, t+50); 1987 else { 1988 setTimeout( function() { 1989 if (exp.outline) exp.outline.destroy(exp.preserveContent); 1990 hs.fade (exp.wrapper, 1, 0); 1991 setTimeout( function() { 1992 exp.afterClose(); 1993 }, 250); 1994 }, t); 1995 } 1996}, 1997 1998crossfade : function (up, from, to) { 1999 if (!up) return; 2000 var exp = this, steps = parseInt(hs.transitionDuration / 25) || 1, last = this.last; 2001 hs.removeEventListener(document, 'mousemove', hs.dragHandler); 2002 2003 hs.setStyles(this.content, { 2004 width: (to.ximgSize || to.xsize) +'px', 2005 height: to.ysize +'px' 2006 }); 2007 this.outline = this.last.outline; 2008 this.last.outline = null; 2009 this.fadeBox = hs.createElement('div', { 2010 className: 'highslide-image' 2011 }, { 2012 position: 'absolute', 2013 zIndex: 4, 2014 overflow: 'hidden', 2015 display: 'none' 2016 } 2017 ); 2018 var names = { oldImg: last, newImg: this }; 2019 for (var x in names) { 2020 this[x] = names[x].content.cloneNode(1); 2021 hs.setStyles(this[x], { 2022 position: 'absolute', 2023 border: 0, 2024 visibility: 'visible' 2025 }); 2026 this.fadeBox.appendChild(this[x]); 2027 } 2028 this.wrapper.appendChild(this.fadeBox); 2029 from = { 2030 xpos: last.x.pos, 2031 xsize: last.x.size, 2032 xp1: last.x.p1, 2033 xp2: last.x.p2, 2034 ximgSize: last.x.imgSize || last.x.size, 2035 ximgPad: last.x.get('imgPad'), 2036 ypos: last.y.pos, 2037 ysize: last.y.size, 2038 yp1: last.y.p1, 2039 yp2: last.y.p2, 2040 o: 1 / steps 2041 }; 2042 to.ysize = this.y.size; 2043 to.o = 1; 2044 if (!to.ximgSize) to.ximgSize = to.xsize; 2045 var t, easing = Math.easeInOutQuad; 2046 2047 if (steps > 1) this.crossfadeStep(from); 2048 function prep() { 2049 if (exp.overlayBox) { 2050 exp.overlayBox.className = ''; 2051 exp.wrapper.appendChild(exp.overlayBox); 2052 2053 for (var i = 0; i < exp.last.overlays.length; i++) { 2054 var oDiv = hs.$('hsId'+ exp.last.overlays[i]);
2055 if (oDiv.reuse === exp.key) exp.overlayBox.appendChild(oDiv); 2056 else hs.fade(oDiv, oDiv.opacity, 0); 2057 } 2058 } 2059 exp.fadeBox.style.display = ''; 2060 exp.last.content.style.display = 'none'; 2061 }; 2062 if (/rv:1\.[0-8].+Gecko/.test(navigator.userAgent)) setTimeout(prep, 0); 2063 else prep(); 2064 if (hs.safari) { 2065 var match = navigator.userAgent.match(/Safari\/([0-9]{3})/); 2066 if (match && parseInt(match[1]) < 525) this.wrapper.style.visibility = 'visible'; 2067 } 2068 2069 for (var i = 1; i <= steps; i++) { 2070 t = Math.round(i * (hs.transitionDuration / steps)); 2071 2072 (function(){ 2073 var size = {}, pI = i; 2074 for (var x in from) { 2075 var val = easing(t, from[x], to[x] - from[x], hs.transitionDuration); 2076 if (isNaN(val)) val = to[x]; 2077 size[x] = (x != 'o') ? Math.round(val) : val; 2078 } 2079 2080 setTimeout ( function() { 2081 exp.crossfadeStep(size); 2082 }, t); 2083 })(); 2084 } 2085 setTimeout ( function () { 2086 exp.crossfadeEnd(); 2087 }, t + 100); 2088 2089}, 2090 2091crossfadeStep : function (size) { 2092 try { 2093 if (this.outline) this.outline.setPosition(this, { 2094 x: size.xpos, 2095 y: size.ypos, 2096 w: size.xsize + size.xp1 + size.xp2, 2097 h: size.ysize + size.yp1 + size.yp2 2098 }, 1); 2099 this.last.wrapper.style.clip = 'rect(' 2100 + (size.ypos - this.last.y.pos)+'px, ' 2101 + (size.xsize + size.xp1 + size.xp2 + size.xpos + 2 * this.last.x.cb - this.last.x.pos) +'px, ' 2102 + (size.ysize + size.yp1 + size.yp2 + size.ypos + 2 * this.last.y.cb - this.last.y.pos) +'px, ' 2103 + (size.xpos - this.last.x.pos)+'px)'; 2104 2105 hs.setStyles(this.content, { 2106 top: size.yp1 +'px', 2107 left: (size.xp1 + this.x.get('imgPad')) +'px', 2108 marginTop: (this.y.pos - size.ypos) +'px', 2109 marginLeft: (this.x.pos - size.xpos) +'px' 2110 }); 2111 2112 hs.setStyles(this.wrapper, { 2113 top: size.ypos +'px', 2114 left: size.xpos +'px', 2115 width: (size.xp1 + size.xp2 + size.xsize + 2 * this.x.cb)+ 'px', 2116 height: (size.yp1 + size.yp2 + size.ysize + 2 * this.y.cb) + 'px' 2117 }); 2118 hs.setStyles(this.fadeBox, { 2119 width: (size.ximgSize || size.xsize) + 'px', 2120 height: size.ysize +'px', 2121 left: (size.xp1 + size.ximgPad) +'px', 2122 top: size.yp1 +'px', 2123 visibility: 'visible' 2124 }); 2125 2126 hs.setStyles(this.oldImg, { 2127 top: (this.last.y.pos - size.ypos + this.last.y.p1 - size.yp1)+'px', 2128 left: (this.last.x.pos - size.xpos + this.last.x.p1 - size.xp1 + this.last.x.get('imgPad') - size.ximgPad)+'px' 2129 }); 2130 2131 hs.setStyles(this.newImg, { 2132 opacity: size.o, 2133 top: (this.y.pos - size.ypos + this.y.p1 - size.yp1) +'px', 2134 left: (this.x.pos - size.xpos + this.x.p1 - size.xp1 + this.x.get('imgPad') - size.ximgPad) +'px' 2135 }); 2136 hs.setStyles(this.overlayBox, { 2137 width: size.xsize + 'px', 2138 height: size.ysize +'px', 2139 left: (size.xp1 + this.x.cb) +'px', 2140 top: (size.yp1 + this.y.cb) +'px' 2141 }); 2142 } catch (e) {} 2143}, 2144crossfadeEnd : function() { 2145 this.wrapper.style.background = this.wrapperBG || ''; 2146 2147 this.wrapper.style.visibility = this.content.style.visibility = 'visible'; 2148 this.fadeBox.style.display = 'none'; 2149 this.a.className += ' highslide-active-anchor'; 2150 this.afterExpand(); 2151 this.last.afterClose(); 2152}, 2153reuseOverlay : function(o, el) { 2154 if (!this.last) return false; 2155 for (var i = 0; i < this.last.overlays.length; i++) { 2156 var oDiv = hs.$('hsId'+ this.last.overlays[i]); 2157 if (oDiv && oDiv.hsId == o.hsId) { 2158 this.genOverlayBox(); 2159 oDiv.reuse = this.key; 2160 hs.push(this.overlays, this.last.overlays[i]); 2161 return true; 2162 } 2163 } 2164 return false; 2165}, 2166 2167 2168afterExpand : function() { 2169 this.isExpanded = true; 2170 this.focus(); 2171 2172 if (this.isHtml && this.objectLoadTime == 'after') this.writeExtendedContent(); 2173 2174 if (this.isHtml) { 2175 if (this.iframe) { 2176 try { 2177 var exp = this, 2178 doc = this.iframe.contentDocument || this.iframe.contentWindow.document; 2179 hs.addEventListener(doc, 'mousedown', function () { 2180 if (hs.focusKey != exp.key) exp.focus(); 2181 }); 2182 } catch(e) {} 2183 if (hs.ie && typeof this.isClosing != 'boolean') // first open 2184 this.iframe.style.width = (this.objectWidth - 1) +'px'; // hasLayout 2185 } 2186 } 2187 2188 if (this.dimmingOpacity) hs.dim(this); 2189 if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null; 2190 this.prepareNextOutline(); 2191 2192
2193 var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop; 2194 this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize') 2195 && this.y.pos < mY && mY < this.y.pos + this.y.get('wsize'); 2196 2197 if (this.overlayBox) this.showOverlays(); 2198 hs.fireEvent(this, 'onAfterExpand'); 2199 2200}, 2201 2202 2203prepareNextOutline : function() { 2204 var key = this.key; 2205 var outlineType = this.outlineType; 2206 new hs.Outline(outlineType, 2207 function () { try { hs.expanders[key].preloadNext(); } catch (e) {} }); 2208}, 2209 2210 2211preloadNext : function() { 2212 var next = this.getAdjacentAnchor(1); 2213 if (next && next.onclick.toString().match(/hs\.expand/)) 2214 var img = hs.createElement('img', { src: hs.getSrc(next) }); 2215}, 2216 2217 2218getAdjacentAnchor : function(op) { 2219 var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none']; 2220 2221 /*< ? if ($cfg->slideshow) : ?>s*/ 2222 if (!as[current + op] && this.slideshow && this.slideshow.repeat) { 2223 if (op == 1) return as[0]; 2224 else if (op == -1) return as[as.length-1]; 2225 } 2226 /*< ? endif ?>s*/ 2227 return as[current + op] || null; 2228}, 2229 2230getAnchorIndex : function() { 2231 var arr = hs.anchors.groups[this.slideshowGroup || 'none']; 2232 for (var i = 0; i < arr.length; i++) { 2233 if (arr[i] == this.a) return i; 2234 } 2235 return null; 2236}, 2237 2238 2239getNumber : function() { 2240 if (this[this.numberPosition]) { 2241 var arr = hs.anchors.groups[this.slideshowGroup || 'none']; 2242 var s = hs.lang.number.replace('%1', this.getAnchorIndex() + 1).replace('%2', arr.length); 2243 this[this.numberPosition].innerHTML = 2244 '<div class="highslide-number">'+ s +'</div>'+ this[this.numberPosition].innerHTML; 2245 } 2246}, 2247initSlideshow : function() { 2248 if (this.slideshow) return; 2249 2250 if (!this.last) { 2251 for (var i = 0; i < hs.slideshows.length; i++) { 2252 var ss = hs.slideshows[i], sg = ss.slideshowGroup; 2253 if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup) 2254 this.slideshow = new hs.Slideshow(ss); 2255 } 2256 } else { 2257 this.slideshow = this.last.slideshow; 2258 } 2259 var ss = this.slideshow; 2260 if (!ss) return; 2261 var exp = ss.exp = this; 2262 2263 ss.checkFirstAndLast(); 2264 ss.disable('full-expand'); 2265 if (ss.controls) { 2266 var o = ss.overlayOptions || {}; 2267 o.overlayId = ss.controls; 2268 o.hsId = 'controls'; 2269 this.createOverlay(o); 2270 } 2271 if (!this.last && this.autoplay) ss.play(true); 2272 if (ss.autoplay) { 2273 ss.autoplay = setTimeout(function() { 2274 hs.next(exp.key); 2275 }, (ss.interval || 500)); 2276 } 2277}, 2278 2279cancelLoading : function() { 2280 hs.expanders[this.key] = null; 2281 if (hs.upcoming == this.a) hs.upcoming = null; 2282 hs.undim(this.key); 2283 if (this.loading) hs.loading.style.left = '-9999px'; 2284 hs.fireEvent(this, 'onHideLoading'); 2285}, 2286 2287writeCredits : function () { 2288 if (this.credits) return; 2289 this.credits = hs.createElement('a', { 2290 href: hs.creditsHref, 2291 className: 'highslide-credits', 2292 innerHTML: hs.lang.creditsText, 2293 title: hs.lang.creditsTitle 2294 }); 2295 this.createOverlay({ 2296 overlayId: this.credits, 2297 position: 'top left', 2298 hsId: 'credits' 2299 }); 2300}, 2301 2302getInline : function(types, addOverlay) { 2303 for (var i = 0; i < types.length; i++) { 2304 var type = types[i], s = null; 2305 if (type == 'caption' && !hs.fireEvent(this, 'onBeforeGetCaption')) return; 2306 else if (type == 'heading' && !hs.fireEvent(this, 'onBeforeGetHeading')) return; 2307 if (!this[type +'Id'] && this.thumbsUserSetId) 2308 this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId; 2309 if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']); 2310 if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try { 2311 s = eval(this[type +'Eval']); 2312 } catch (e) {} 2313 if (!this[type] && this[type +'Text']) { 2314 s = this[type +'Text']; 2315 } 2316 if (!this[type] && !s) { 2317 var next = this.a.nextSibling; 2318 while (next && !hs.isHsAnchor(next)) { 2319 if ((new RegExp('highslide-'+ type)).test(next.className || null)) { 2320 this[type] = next.cloneNode(1); 2321 break; 2322 } 2323 next = next.nextSibling; 2324 } 2325 } 2326 if (!this[type] && !s && this.numberPosition == type) s = '\n'; 2327 2328 if (!this[type] && s) this[type] = hs.createElement('div', 2329 { className: 'highslide-'+ type, innerHTML: s } ); 2330 2331 if (addOverlay && this[type]) { 2332 var o = { position: (type == 'heading') ? 'above' : 'below' }; 2333 for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x]; 2334 o.overlayId = this[type]; 2335 this.createOverlay(o); 2336 } 2337 } 2338}, 2339 2340 2341// on end move and resize 2342doShowHide : function(visibility) { 2343 if (hs.hideSelects) this.showHideElements('SELECT', visibility); 2344 if (hs.hideIframes) this.showHideElements('IFRAME', visibility); 2345 if (hs.geckoMac) this.showHideElements('*', visibility); 2346}, 2347showHideElements : function (tagName, visibility) { 2348 var els = document.getElementsByTagName(tagName); 2349 var prop = tagName == '*' ? 'overflow' : 'visibility'; 2350 for (var i = 0; i < els.length; i++) { 2351 if (prop == 'visibility' || (document.defaultView.getComputedStyle( 2352 els[i], "").getPropertyValue('overflow') == 'auto' 2353 || els[i].getAttribute('hidden-by') != null)) { 2354 var hiddenBy = els[i].getAttribute('hidden-by'); 2355 if (visibility == 'visible' && hiddenBy) { 2356 hiddenBy = hiddenBy.replace('['+ this.key +']', ''); 2357 els[i].setAttribute('hidden-by', hiddenBy); 2358 if (!hiddenBy) els[i].style[prop] = els[i].origProp; 2359 } else if (visibility == 'hidden') { // hide if behind 2360 var elPos = hs.getPosition(els[i]); 2361 elPos.w = els[i].offsetWidth; 2362 elPos.h = els[i].offsetHeight; 2363 if (!this.dimmingOpacity) { // hide all if dimming 2364 2365 var clearsX = (elPos.x + elPos.w < this.x.get('opos') 2366 || elPos.x > this.x.get('opos') + this.x.get('osize'));
2367 var clearsY = (elPos.y + elPos.h < this.y.get('opos') 2368 || elPos.y > this.y.get('opos') + this.y.get('osize')); 2369 } 2370 var wrapperKey = hs.getWrapperKey(els[i]); 2371 if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image 2372 if (!hiddenBy) { 2373 els[i].setAttribute('hidden-by', '['+ this.key +']'); 2374 els[i].origProp = els[i].style[prop]; 2375 els[i].style[prop] = 'hidden'; 2376 } else if (!hiddenBy.match('['+ this.key +']')) { 2377 els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']'); 2378 } 2379 } else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey) 2380 && wrapperKey != this.key) { // on move 2381 els[i].setAttribute('hidden-by', ''); 2382 els[i].style[prop] = els[i].origProp || ''; 2383 } else if (hiddenBy && hiddenBy.match('['+ this.key +']')) { 2384 els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', '')); 2385 } 2386 2387 } 2388 } 2389 } 2390}, 2391 2392focus : function() { 2393 this.wrapper.style.zIndex = hs.zIndexCounter++; 2394 // blur others 2395 for (var i = 0; i < hs.expanders.length; i++) { 2396 if (hs.expanders[i] && i == hs.focusKey) { 2397 var blurExp = hs.expanders[i]; 2398 blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur'; 2399 if (blurExp.isImage) { 2400 blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer'; 2401 blurExp.content.title = hs.lang.focusTitle; 2402 } 2403 hs.fireEvent(this, 'onBlur'); 2404 } 2405 } 2406 2407 // focus this 2408 if (this.outline) this.outline.table.style.zIndex 2409 = this.wrapper.style.zIndex; 2410 this.content.className = 'highslide-'+ this.contentType; 2411 if (this.isImage) { 2412 this.content.title = hs.lang.restoreTitle; 2413 2414 if (hs.restoreCursor) { 2415 hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer'; 2416 if (hs.ie && hs.ieVersion() < 6) hs.styleRestoreCursor = 'hand'; 2417 this.content.style.cursor = hs.styleRestoreCursor; 2418 } 2419 } 2420 hs.focusKey = this.key; 2421 hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); 2422 hs.fireEvent(this, 'onFocus'); 2423}, 2424 2425moveTo: function(x, y) { 2426 this.x.setPos(x); 2427 this.y.setPos(y); 2428}, 2429resize : function (e) { 2430 var w, h, r = e.width / e.height; 2431 w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full)); 2432 if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full; 2433 h = this.isHtml ? e.height + e.dY : w / r; 2434 if (h < Math.min(this.minHeight, this.y.full)) { 2435 h = Math.min(this.minHeight, this.y.full); 2436 if (this.isImage) w = h * r; 2437 } 2438 this.resizeTo(w, h); 2439}, 2440resizeTo: function(w, h) { 2441 this.y.setSize(h); 2442 this.x.setSize(w); 2443}, 2444 2445close : function() { 2446 if (this.isClosing || !this.isExpanded 2447 || (hs.upcoming && this.transitions[1] == 'crossfade') 2448 ) return; 2449 if (!hs.fireEvent(this, 'onBeforeClose')) return; 2450 this.isClosing = true; 2451 if (this.slideshow && !hs.upcoming) this.slideshow.pause(); 2452 2453 hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler); 2454 2455 try { 2456 if (this.isHtml) this.htmlPrepareClose(); 2457 this.content.style.cursor = 'default'; 2458 this.changeSize( 2459 0, { 2460 xpos: this.x.pos, 2461 ypos: this.y.pos, 2462 xsize: this.x.size, 2463 ysize: this.y.size, 2464 xp1: this.x.p1, 2465 yp1: this.y.p1, 2466 xp2: this.x.p2, 2467 yp2: this.y.p2, 2468 ximgSize: this.x.imgSize, 2469 ximgPad: this.x.get('imgPad'), 2470 o: this.outline ? this.outline.offset : 0 2471 }, { 2472 xpos: this.x.tpos - this.x.cb + this.x.tb, 2473 ypos: this.y.tpos - this.y.cb + this.y.tb, 2474 xsize: this.x.t, 2475 ysize: this.y.t, 2476 xp1: 0, 2477 yp1: 0, 2478 xp2: 0, 2479 yp2: 0, 2480 ximgSize: this.x.imgSize ? this.x.t : null, 2481 ximgPad: 0, 2482 o: hs.outlineStartOffset 2483 }, 2484 hs.restoreDuration 2485 ); 2486 2487 } catch (e) { this.afterClose(); } 2488}, 2489 2490htmlPrepareClose : function() { 2491 if (hs.geckoMac) { // bad redraws 2492 if (!hs.mask) hs.mask = hs.createElement('div', null, 2493 { position: 'absolute' }, hs.container); 2494 hs.setStyles(hs.mask, { width: this.x.size +'px', height: this.y.size +'px', 2495 left: this.x.pos +'px', top: this.y.pos +'px', display: 'block' }); 2496 } 2497 if (this.objectType == 'swf') try { hs.$(this.body.id).StopPlay(); } catch (e) {} 2498 2499 if (this.objectLoadTime == 'after' && !this.preserveContent) this.destroyObject(); 2500 if (this.scrollerDiv && this.scrollerDiv != this.scrollingContent) 2501 this.scrollerDiv.style.overflow = 'hidden'; 2502}, 2503 2504destroyObject : function () { 2505 if (hs.ie && this.iframe) 2506 try { this.iframe.contentWindow.document.body.innerHTML = ''; } catch (e) {} 2507 if (this.objectType == 'swf') swfobject.removeSWF(this.body.id); 2508 this.body.innerHTML = ''; 2509}, 2510 2511sleep : function() { 2512 if (this.outline) this.outline.table.style.display = 'none'; 2513 this.releaseMask = null; 2514 this.wrapper.style.display = 'none'; 2515 hs.push(hs.sleeping, this); 2516}, 2517 2518awake : function() { 2519 hs.expanders[this.key] = this; 2520 2521 if (!hs.allowMultipleInstances &&hs.focusKey != this.key) { 2522 try { hs.expanders[hs.focusKey].close(); } catch (e){} 2523 } 2524 2525 var z = hs.zIndexCounter++, stl = { display: '', zIndex: z }; 2526 hs.setStyles (this.wrapper, stl); 2527 this.isClosing = false; 2528 2529 var o = this.outline || 0; 2530 if (o) { 2531 if (!this.outlineWhileAnimating) stl.visibility = 'hidden'; 2532 hs.setStyles (o.table, stl); 2533 } 2534 this.show(); 2535}, 2536 2537createOverlay : function (o) { 2538 var el = o.overlayId; 2539 if (typeof el == 'string') el = hs.getNode(el); 2540 if (!el || typeof el == 'string') return; 2541 if (!hs.fireEvent(this, 'onCreateOverlay', { overlay: el })) return; 2542 el.style.display = 'block'; 2543 o.hsId = o.hsId || o.overlayId; 2544 if (this.transitions[1] == 'crossfade' && this.reuseOverlay(o, el)) return; 2545 this.genOverlayBox(); 2546 var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto'; 2547 if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px'; 2548
2549 var overlay = hs.createElement( 2550 'div', { 2551 id: 'hsId'+ hs.idCounter++, hsId: o.hsId 2552 }, { 2553 position: 'absolute', 2554 visibility: 'hidden', 2555 width: width, 2556 direction: hs.lang.cssDirection || '' 2557 }, 2558 this.overlayBox, 2559 true 2560 ); 2561 2562 overlay.appendChild(el); 2563 hs.setAttribs(overlay, { 2564 hideOnMouseOut: o.hideOnMouseOut, 2565 opacity: o.opacity || 1, 2566 hsPos: o.position, 2567 fade: o.fade 2568 }); 2569 2570 if (this.gotOverlays) { 2571 this.positionOverlay(overlay); 2572 if (!overlay.hideOnMouseOut || this.mouseIsOver) hs.fade(overlay, 0, overlay.opacity); 2573 } 2574 hs.push(this.overlays, hs.idCounter - 1); 2575}, 2576positionOverlay : function(overlay) { 2577 var p = overlay.hsPos || 'middle center'; 2578 if (/left$/.test(p)) overlay.style.left = 0; 2579 if (/center$/.test(p)) hs.setStyles (overlay, { 2580 left: '50%', 2581 marginLeft: '-'+ Math.round(overlay.offsetWidth / 2) +'px' 2582 }); 2583 if (/right$/.test(p)) overlay.style.right = 0; 2584 2585 if (/^leftpanel$/.test(p)) { 2586 hs.setStyles(overlay, { 2587 right: '100%', 2588 marginRight: this.x.cb +'px', 2589 top: - this.y.cb +'px', 2590 bottom: - this.y.cb +'px', 2591 overflow: 'auto' 2592 }); 2593 this.x.p1 = overlay.offsetWidth; 2594 2595 } else if (/^rightpanel$/.test(p)) { 2596 hs.setStyles(overlay, { 2597 left: '100%', 2598 marginLeft: this.x.cb +'px', 2599 top: - this.y.cb +'px', 2600 bottom: - this.y.cb +'px', 2601 overflow: 'auto' 2602 }); 2603 this.x.p2 = overlay.offsetWidth; 2604 } 2605 if (/^top/.test(p)) overlay.style.top = 0; 2606 if (/^middle/.test(p)) hs.setStyles (overlay, { 2607 top: '50%', 2608 marginTop: '-'+ Math.round(overlay.offsetHeight / 2) +'px' 2609 }); 2610 if (/^bottom/.test(p)) overlay.style.bottom = 0; 2611 if (/^above$/.test(p)) { 2612 hs.setStyles(overlay, { 2613 left: (- this.x.p1 - this.x.cb) +'px', 2614 right: (- this.x.p2 - this.x.cb) +'px', 2615 bottom: '100%', 2616 marginBottom: this.y.cb +'px', 2617 width: 'auto' 2618 }); 2619 this.y.p1 = overlay.offsetHeight; 2620 2621 } else if (/^below$/.test(p)) { 2622 hs.setStyles(overlay, { 2623 position: 'relative', 2624 left: (- this.x.p1 - this.x.cb) +'px', 2625 right: (- this.x.p2 - this.x.cb) +'px', 2626 top: '100%', 2627 marginTop: this.y.cb +'px', 2628 width: 'auto' 2629 }); 2630 this.y.p2 = overlay.offsetHeight; 2631 overlay.style.position = 'absolute'; 2632 } 2633}, 2634 2635getOverlays : function() { 2636 this.getInline(['heading', 'caption'], true); 2637 this.getNumber(); 2638 if (this.caption) hs.fireEvent(this, 'onAfterGetCaption'); 2639 if (this.heading) hs.fireEvent(this, 'onAfterGetHeading'); 2640 if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move'; 2641 if (hs.showCredits) this.writeCredits(); 2642 for (var i = 0; i < hs.overlays.length; i++) { 2643 var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup; 2644 if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId) 2645 || (sg && sg === this.slideshowGroup)) { 2646 if (this.isImage || (this.isHtml && o.useOnHtml)) 2647 this.createOverlay(o); 2648 } 2649 } 2650 var os = []; 2651 for (var i = 0; i < this.overlays.length; i++) { 2652 var o = hs.$('hsId'+ this.overlays[i]); 2653 if (/panel$/.test(o.hsPos)) this.positionOverlay(o); 2654 else hs.push(os, o); 2655 } 2656 /* 2657 var curW = this.x.p1 + this.x.full + this.x.p2; 2658 if (hs.padToMinWidth && curW < hs.minWidth) { 2659 this.x.p1 += (hs.minWidth - curW) / 2; 2660 this.x.p2 += (hs.minWidth - curW) / 2; 2661 } 2662 */ 2663 for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]); 2664 this.gotOverlays = true; 2665}, 2666genOverlayBox : function() { 2667 if (!this.overlayBox) this.overlayBox = hs.createElement ( 2668 'div', { 2669 className: this.wrapperClassName 2670 }, { 2671 position : 'absolute', 2672 width: this.x.size ? this.x.size +'px' : this.x.full +'px', 2673 height: 0, 2674 visibility : 'hidden', 2675 overflow : 'hidden', 2676 zIndex : hs.ie ? 4 : null 2677 }, 2678 hs.container, 2679 true 2680 ); 2681}, 2682sizeOverlayBox : function(doWrapper, doPanels) { 2683 hs.setStyles( this.overlayBox, { 2684 width: this.x.size +'px', 2685 height: this.y.size +'px' 2686 }); 2687 if (doWrapper || doPanels) { 2688 for (var i = 0; i < this.overlays.length; i++) { 2689 var o = hs.$('hsId'+ this.overlays[i]); 2690 if (o && /^(above|below)$/.test(o.hsPos)) { 2691 if (hs.ie && (hs.ieVersion() <= 6 || document.compatMode == 'BackCompat')) { 2692 o.style.width = (this.overlayBox.offsetWidth + 2 * this.x.cb 2693 + this.x.p1 + this.x.p2) +'px'; 2694 } 2695 this.y[o.hsPos == 'above' ? 'p1' : 'p2'] = o.offsetHeight; 2696 } 2697 } 2698 } 2699 if (doWrapper) { 2700 hs.setStyles(this.content, { 2701 top: this.y.p1 +'px' 2702 }); 2703 hs.setStyles(this.overlayBox, { 2704 top: (this.y.p1 + this.y.cb) +'px' 2705 }); 2706 } 2707}, 2708 2709showOverlays : function() { 2710 var b = this.overlayBox; 2711 b.className = ''; 2712 hs.setStyles(b, { 2713 top: (this.y.p1 + this.y.cb) +'px', 2714 left: (this.x.p1 + this.x.cb) +'px', 2715 overflow : 'visible' 2716 }); 2717 if (hs.safari) b.style.visibility = 'visible'; 2718 this.wrapper.appendChild (b); 2719 for (var i = 0; i < this.overlays.length; i++) { 2720 var o = hs.$('hsId'+ this.overlays[i]); 2721 o.style.zIndex = o.hsId == 'controls' ? 5 : 4; 2722 if (!o.hideOnMouseOut || this.mouseIsOver) hs.fade(o, 0, o.opacity); 2723 } 2724}, 2725 2726 2727 2728createFullExpand : function () { 2729 if (this.slideshow && this.slideshow.controls) { 2730 this.slideshow.enable('full-expand'); 2731 return; 2732 } 2733 this.fullExpandLabel = hs.createElement( 2734 'a', { 2735 href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();', 2736 title: hs.lang.fullExpandTitle, 2737 className: 'highslide-full-expand' 2738 } 2739 ); 2740 if (!hs.fireEvent(this, 'onCreateFullExpand')) return; 2741 2742 this.createOverlay({ 2743 overlayId: this.fullExpandLabel, 2744 position: hs.fullExpandPosition, 2745 hideOnMouseOut: true, 2746 opacity: hs.fullExpandOpacity 2747 }); 2748}, 2749 2750doFullExpand : function () { 2751 try { 2752 if (!hs.fireEvent(this, 'onDoFullExpand')) return; 2753 if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel); 2754 2755 this.focus(); 2756 2757 var xpos = this.x.pos - (this.x.full - this.x.size) / 2; 2758 if (xpos < hs.marginLeft) xpos = hs.marginLeft; 2759 2760 this.moveTo(xpos, this.y.pos); 2761 this.resizeTo(this.x.full, this.y.full); 2762 this.doShowHide('hidden'); 2763 hs.setDimmerSize(this); 2764 2765 } catch (e) { 2766 window.location.href = this.content.src; 2767 } 2768}, 2769 2770 2771afterClose : function () {
2772 this.a.className = this.a.className.replace('highslide-active-anchor', ''); 2773 2774 this.doShowHide('visible'); 2775 2776 if (this.isHtml && this.preserveContent) this.sleep(); 2777 else { 2778 if (this.outline && this.outlineWhileAnimating) this.outline.destroy(); 2779 2780 hs.discardElement(this.wrapper); 2781 } 2782 if (hs.mask) hs.mask.style.display = 'none'; 2783 if (this.dimmingOpacity) hs.undim(this.key); 2784 hs.fireEvent(this, 'onAfterClose'); 2785 hs.expanders[this.key] = null; 2786 hs.reOrder(); 2787} 2788 2789}; 2790 2791 2792// hs.Ajax object prototype 2793hs.Ajax = function (a, content, pre) { 2794 this.a = a; 2795 this.content = content; 2796 this.pre = pre; 2797}; 2798 2799hs.Ajax.prototype = { 2800run : function () { 2801 if (!this.src) this.src = hs.getSrc(this.a); 2802 if (this.src.match('#')) { 2803 var arr = this.src.split('#'); 2804 this.src = arr[0]; 2805 this.id = arr[1]; 2806 } 2807 if (hs.cachedGets[this.src]) { 2808 this.cachedGet = hs.cachedGets[this.src]; 2809 if (this.id) this.getElementContent(); 2810 else this.loadHTML(); 2811 return; 2812 } 2813 try { this.xmlHttp = new XMLHttpRequest(); } 2814 catch (e) { 2815 try { this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } 2816 catch (e) { 2817 try { this.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } 2818 catch (e) { this.onError(); } 2819 } 2820 } 2821 var pThis = this; 2822 this.xmlHttp.onreadystatechange = function() { 2823 if(pThis.xmlHttp.readyState == 4) { 2824 if (pThis.id) pThis.getElementContent(); 2825 else pThis.loadHTML(); 2826 } 2827 }; 2828 this.xmlHttp.open("GET", this.src, true); 2829 this.xmlHttp.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); 2830 this.xmlHttp.send(null); 2831}, 2832 2833getElementContent : function() { 2834 hs.init(); 2835 var attribs = window.opera || hs.ie6SSL ? { src: 'about:blank' } : null; 2836 2837 this.iframe = hs.createElement('iframe', attribs, 2838 { position: 'absolute', top: '-9999px' }, hs.container); 2839 2840 this.loadHTML(); 2841}, 2842 2843loadHTML : function() { 2844 var s = this.cachedGet || this.xmlHttp.responseText; 2845 if (this.pre) hs.cachedGets[this.src] = s; 2846 if (!hs.ie || hs.ieVersion() >= 5.5) { 2847 s = s.replace(/\s/g, ' ').replace( 2848 new RegExp('<link[^>]*>', 'gi'), '').replace( 2849 new RegExp('<script[^>]*>.*?</script>', 'gi'), ''); 2850 2851 if (this.iframe) { 2852 var doc = this.iframe.contentDocument; 2853 if (!doc && this.iframe.contentWindow) doc = this.iframe.contentWindow.document; 2854 if (!doc) { // Opera 2855 var pThis = this; 2856 setTimeout(function() { pThis.loadHTML(); }, 25); 2857 return; 2858 } 2859 doc.open(); 2860 doc.write(s); 2861 doc.close(); 2862 try { s = doc.getElementById(this.id).innerHTML; } catch (e) { 2863 try { s = this.iframe.document.getElementById(this.id).innerHTML; } catch (e) {} // opera 2864 } 2865 } else { 2866 s = s.replace(new RegExp('^.*?<body[^>]*>(.*?)</body>.*?$', 'i'), '$1'); 2867 } 2868 } 2869 hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s; 2870 this.onLoad(); 2871 for (var x in this) this[x] = null; 2872} 2873}; 2874 2875 2876hs.Slideshow = function (options) { 2877 hs.updateAnchors(); 2878 for (var x in options) this[x] = options[x]; 2879 if (this.useControls) this.getControls(); 2880}; 2881hs.Slideshow.prototype = { 2882getControls: function() { 2883 this.controls = hs.createElement('div', { innerHTML: hs.replaceLang(hs.skin.controls) }, 2884 null, hs.container); 2885 2886 var buttons = ['play', 'pause', 'previous', 'next', 'move', 'full-expand', 'close']; 2887 this.btn = {}; 2888 var pThis = this; 2889 for (var i = 0; i < buttons.length; i++) { 2890 this.btn[buttons[i]] = hs.getElementByClass(this.controls, 'li', 'highslide-'+ buttons[i]); 2891 this.enable(buttons[i]); 2892 } 2893 this.btn.pause.style.display = 'none'; 2894 //this.disable('full-expand'); 2895}, 2896checkFirstAndLast: function() { 2897 if (this.repeat || !this.controls) return; 2898 var cur = this.exp.getAnchorIndex(), re = /disabled$/; 2899 if (cur == 0) 2900 this.disable('previous'); 2901 else if (re.test(this.btn.previous.getElementsByTagName('a')[0].className)) 2902 this.enable('previous'); 2903 if (cur + 1 == hs.anchors.groups[this.exp.slideshowGroup || 'none'].length) { 2904 this.disable('next'); 2905 this.disable('play'); 2906 } else if (re.test(this.btn.next.getElementsByTagName('a')[0].className)) { 2907 this.enable('next'); 2908 this.enable('play'); 2909 } 2910},
2911enable: function(btn) { 2912 if (!this.btn) return; 2913 var sls = this, a = this.btn[btn].getElementsByTagName('a')[0], re = /disabled$/; 2914 a.onclick = function() { 2915 sls[btn](); 2916 return false; 2917 }; 2918 if (re.test(a.className)) a.className = a.className.replace(re, ''); 2919}, 2920disable: function(btn) { 2921 if (!this.btn) return; 2922 var a = this.btn[btn].getElementsByTagName('a')[0]; 2923 a.onclick = function() { return false; }; 2924 if (!/disabled$/.test(a.className)) a.className += ' disabled'; 2925}, 2926hitSpace: function() { 2927 if (this.autoplay) this.pause(); 2928 else this.play(); 2929}, 2930play: function(wait) { 2931 if (this.btn) { 2932 this.btn.play.style.display = 'none'; 2933 this.btn.pause.style.display = ''; 2934 } 2935 2936 this.autoplay = true; 2937 if (!wait) hs.next(this.exp.key); 2938}, 2939pause: function() { 2940 if (this.btn) { 2941 this.btn.pause.style.display = 'none'; 2942 this.btn.play.style.display = ''; 2943 } 2944 2945 clearTimeout(this.autoplay); 2946 this.autoplay = null; 2947}, 2948previous: function() { 2949 this.pause(); 2950 hs.previous(this.btn.previous); 2951}, 2952next: function() { 2953 this.pause(); 2954 hs.next(this.btn.next); 2955}, 2956move: function() {}, 2957'full-expand': function() { 2958 hs.getExpander().doFullExpand(); 2959}, 2960close: function() { 2961 hs.close(this.btn.close); 2962} 2963 2964}; 2965if (document.readyState && hs.ie) { 2966 (function () { 2967 try { 2968 document.documentElement.doScroll('left'); 2969 } catch (e) { 2970 setTimeout(arguments.callee, 50); 2971 return; 2972 } 2973 hs.domReady(); 2974 })(); 2975} 2976hs.langDefaults = hs.lang; 2977// history 2978var HsExpander = hs.Expander; 2979 2980// set handlers 2981hs.addEventListener(window, 'load', function() { 2982 var sel = '.highslide img', 2983 dec = 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'; 2984 2985 var style = hs.createElement('style', { type: 'text/css' }, null, 2986 document.getElementsByTagName('HEAD')[0]); 2987 2988 if (!hs.ie) { 2989 style.appendChild(document.createTextNode(sel + " {" + dec + "}")); 2990 } else { 2991 var last = document.styleSheets[document.styleSheets.length - 1]; 2992 if (typeof(last.addRule) == "object") last.addRule(sel, dec); 2993 } 2994}); 2995hs.addEventListener(document, 'mousemove', function(e) { 2996 hs.mouse = { x: e.clientX, y: e.clientY }; 2997}); 2998hs.addEventListener(document, 'mousedown', hs.mouseClickHandler); 2999hs.addEventListener(document, 'mouseup', hs.mouseClickHandler); 3000hs.addEventListener(window, 'load', hs.preloadImages); 3001hs.addEventListener(window, 'load', hs.preloadAjax); 3002hs.addEventListener(window, 'load', function() { hs.pageLoaded = true; }); 3003hs.setClickEvents();; 3004 3005/* -- JSLIB 3/16: class/js/highslide/highslide-full.js (conf #0) ------------------------------- */ 3006 3007 hs.showCredits = false; 3008 hs.graphicsDir = '/ATClass/js/highslide/graphics/'; 3009 hs.outlineType = 'rounded-white'; 3010 hs.align = 'center'; 3011 hs.dimmingOpacity = 0.80; 3012; 3013 3014/* -- JSLIB 4/16: cms/js_lib/jquery/jquery-1.8.3.min.js ------------------------------- */ 3015/*! jQuery v1.8.3 jquery.com | jquery.org/license */�
vendor: 93,525 bytes, lines 3015-3016
3015 3016(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.
vendor: 7,346 bytes, lines 3016-3199
3016jQuery&&define("jquery",[],function(){return v})})(window);; 3017 3018/* -- JSLIB 5/16: cms/js_lib/jquery/jquery-1.8.3.min.js (conf #0) ------------------------------- */ 3019 3020 function startNoConflictWhenJQueryIsLoaded() { 3021 if (typeof jQuery != 'undefined'){ 3022 3023 jQuery.noConflict(); 3024 } else { 3025 setTimeout(startNoConflictWhenJQueryIsLoaded, 50); 3026 } 3027 } 3028 startNoConflictWhenJQueryIsLoaded(); 3029; 3030 3031/* -- JSLIB 6/16: cms/js_lib/jquery/effects/jquery.easing.1.3.js ------------------------------- */ 3032/* 3033 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 3034 * 3035 * Uses the built In easIng capabilities added In jQuery 1.1 3036 * to offer multiple easIng options 3037 * 3038 * Copyright (c) 2007 George Smith 3039 * Licensed under the MIT License: 3040 * http://www.opensource.org/licenses/mit-license.php 3041 */ 3042 3043// t: current time, b: begInnIng value, c: change In value, d: duration 3044 3045 3046 3047jQuery.easing['jswing'] = jQuery.easing['swing']; 3048 3049jQuery.extend( jQuery.easing, 3050{ 3051 //def: 'easeOutQuad', 3052 def: 'swing', 3053 swing: function (x, t, b, c, d) { 3054 return this.easeOutQuad(x, t, b, c, d); // Mirco Slepko 19 Aprile 2016 3055 //return jQuery.easing[this.def](x, t, b, c, d); // Mirco Slepko 19 Aprile 2016 3056 //return jQuery.easing[jQuery.easing.def](x, t, b, c, d); // originale 3057 }, 3058 easeInQuad: function (x, t, b, c, d) { 3059 return c*(t/=d)*t + b; 3060 }, 3061 easeOutQuad: function (x, t, b, c, d) { 3062 return -c *(t/=d)*(t-2) + b; 3063 }, 3064 easeInOutQuad: function (x, t, b, c, d) { 3065 if ((t/=d/2) < 1) return c/2*t*t + b; 3066 return -c/2 * ((--t)*(t-2) - 1) + b; 3067 }, 3068 easeInCubic: function (x, t, b, c, d) { 3069 return c*(t/=d)*t*t + b; 3070 }, 3071 easeOutCubic: function (x, t, b, c, d) { 3072 return c*((t=t/d-1)*t*t + 1) + b; 3073 }, 3074 easeInOutCubic: function (x, t, b, c, d) { 3075 if ((t/=d/2) < 1) return c/2*t*t*t + b; 3076 return c/2*((t-=2)*t*t + 2) + b; 3077 }, 3078 easeInQuart: function (x, t, b, c, d) { 3079 return c*(t/=d)*t*t*t + b; 3080 }, 3081 easeOutQuart: function (x, t, b, c, d) { 3082 return -c * ((t=t/d-1)*t*t*t - 1) + b; 3083 }, 3084 easeInOutQuart: function (x, t, b, c, d) { 3085 if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 3086 return -c/2 * ((t-=2)*t*t*t - 2) + b; 3087 }, 3088 easeInQuint: function (x, t, b, c, d) { 3089 return c*(t/=d)*t*t*t*t + b; 3090 }, 3091 easeOutQuint: function (x, t, b, c, d) { 3092 return c*((t=t/d-1)*t*t*t*t + 1) + b; 3093 }, 3094 easeInOutQuint: function (x, t, b, c, d) { 3095 if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 3096 return c/2*((t-=2)*t*t*t*t + 2) + b; 3097 }, 3098 easeInSine: function (x, t, b, c, d) { 3099 return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 3100 }, 3101 easeOutSine: function (x, t, b, c, d) { 3102 return c * Math.sin(t/d * (Math.PI/2)) + b; 3103 }, 3104 easeInOutSine: function (x, t, b, c, d) { 3105 return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 3106 }, 3107 easeInExpo: function (x, t, b, c, d) { 3108 return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 3109 }, 3110 easeOutExpo: function (x, t, b, c, d) { 3111 return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 3112 }, 3113 easeInOutExpo: function (x, t, b, c, d) { 3114 if (t==0) return b; 3115 if (t==d) return b+c; 3116 if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 3117 return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 3118 }, 3119 easeInCirc: function (x, t, b, c, d) { 3120 return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 3121 }, 3122 easeOutCirc: function (x, t, b, c, d) { 3123 return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 3124 }, 3125 easeInOutCirc: function (x, t, b, c, d) { 3126 if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 3127 return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 3128 }, 3129 easeInElastic: function (x, t, b, c, d) { 3130 var s=1.70158;var p=0;var a=c; 3131 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 3132 if (a < Math.abs(c)) { a=c; var s=p/4; } 3133 else var s = p/(2*Math.PI) * Math.asin (c/a); 3134 return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 3135 }, 3136 easeOutElastic: function (x, t, b, c, d) { 3137 var s=1.70158;var p=0;var a=c; 3138 if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 3139 if (a < Math.abs(c)) { a=c; var s=p/4; } 3140 else var s = p/(2*Math.PI) * Math.asin (c/a); 3141 return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 3142 }, 3143 easeInOutElastic: function (x, t, b, c, d) { 3144 var s=1.70158;var p=0;var a=c; 3145 if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 3146 if (a < Math.abs(c)) { a=c; var s=p/4; } 3147 else var s = p/(2*Math.PI) * Math.asin (c/a); 3148 if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 3149 return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 3150 }, 3151 easeInBack: function (x, t, b, c, d, s) { 3152 if (s == undefined) s = 1.70158; 3153 return c*(t/=d)*t*((s+1)*t - s) + b; 3154 }, 3155 easeOutBack: function (x, t, b, c, d, s) { 3156 if (s == undefined) s = 1.70158; 3157 return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 3158 }, 3159 easeInOutBack: function (x, t, b, c, d, s) { 3160 if (s == undefined) s = 1.70158; 3161 if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 3162 return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 3163 }, 3164 easeInBounce: function (x, t, b, c, d) { 3165 return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 3166 }, 3167 easeOutBounce: function (x, t, b, c, d) { 3168 if ((t/=d) < (1/2.75)) { 3169 return c*(7.5625*t*t) + b; 3170 } else if (t < (2/2.75)) { 3171 return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 3172 } else if (t < (2.5/2.75)) { 3173 return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 3174 } else { 3175 return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 3176 } 3177 }, 3178 easeInOutBounce: function (x, t, b, c, d) { 3179 if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 3180 return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 3181 } 3182});; 3183 3184/* -- JSLIB 7/16: cms/js_lib/jquery/effects/carouFredSel-6.1.0/jquery.carouFredSel-6.1.0-packed.js ------------------------------- */ 3185/* 3186 * jQuery carouFredSel 6.1.0 3187 * Demo's and documentation: 3188 * caroufredsel.frebsite.nl 3189 * 3190 * Copyright (c) 2012 Fred Heusschen 3191 * www.frebsite.nl 3192 * 3193 * Dual licensed under the MIT and GPL licenses. 3194 * http://en.wikipedia.org/wiki/MIT_License 3195 * http://en.wikipedia.org/wiki/GNU_General_Public_License 3196 */ 3197 3198 3199eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?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}('(C($){8($.1r.1v){G}$.1r.6s=$.1r.1v=C(u,w){8(1k.R==0){17(I,\'6t 57 6u 1j "\'+1k.4p+\'".\');G 1k}8(1k.R>1){G 1k.1W(C(){$(1k).1v(u,w)})}E y=1k,$13=1k[0],59=K;8(y.1m(\'5a\')){59=y.1Q(\'3p\',\'4q\');y.S(\'3p\',[\'4r\',I])}y.5b=C(o,a,b){o=3T($13,o);o.D=6v($13,o.D);
3199o.1M=6w($13,o.1M);o.M=6x($13,o.M);o.V=5c($13,o.V);o.Z=5c($13,o.Z);o.1a=6y($13,o.1a);o.1q=6z($13,o.1q);o.1h=6A($13,o.1h);8(a){34=$.1N(I,{},$.1r.1v.5d,o)}7=$.1N(I,{},$.1r.1v.5d,o);7.d=6B(7);z.2b=(7.2b==\'4s\'||7.2b==\'1n\')?\'Z\':\'V\';E c=y.14(),2n=5e($1s,7,\'N\');8(3q(7.23)){7.23=\'7T\'+F.3U}7.3V=5f(7,2n);7.D=6C(7.D,7,c,b);7[7.d[\'N\']]=6D(7[7.d[\'N\']],7,c);7[7.d[\'1d\']]=6E(7[7.d[\'1d\']],7,c);8(7.2o){8(!3W(7[7.d[\'N\']])){7[7.d[\'N\']]=\'2J%\'}}8(3W(7[7.d[\'N\']])){z.6F=I;z.4t=7[7.d[\'N\']];7[7.d[\'N\']]=4u(2n,z.4t);8(!7.D.L){7.D.T.1c=I}}8(7.2o){7.1R=K;7.1i=[0,0,0,0];7.1A=K;7.D.T.1c=K}O{8(!7.D.L){7=6G(7,2n)}8(!7[7.d[\'N\']]){8(!7.D.T.1c&&11(7.D[7.d[\'N\']])&&7.D.1t==\'*\'){7[7.d[\'N\']]=7.D.L*7.D[7.d[\'N\']];7.1A=K}O{7[7.d[\'N\']]=\'1c\'}}8(1E(7.1A)){7.1A=(11(7[7.d[\'N\']]))?\'5g\':K}8(7.D.T.1c){7.D.L=35(c,7,0)}}8(7.D.1t!=\'*\'&&!7.D.T.1c){7.D.T.4v=7.D.L;7.D.L=3X(c,7,0)}7.D.L=2z(7.D.L,7,7.D.T.2c,$13);7.D.T.1Z=7.D.L;8(7.2o){8(!7.D.T.36){7.D.T.36=7.D.L}8(!7.D.T.1X){7.D.T.1X=7.D.L}7=5h(7,c,2n)}O{7.1i=6H(7.1i);8(7.1A==\'3r\'){7.1A=\'1n\'}O 8(7.1A==\'5i\'){7.1A=\'3a\'}1B(7.1A){Q\'5g\':Q\'1n\':Q\'3a\':8(7[7.d[\'N\']]!=\'1c\'){7=5j(7,c);7.1R=I}16;2A:7.1A=K;7.1R=(7.1i[0]==0&&7.1i[1]==0&&7.1i[2]==0&&7.1i[3]==0)?K:I;16}}8(!11(7.1M.1F)){7.1M.1F=6I}8(1E(7.1M.D)){7.1M.D=(7.2o||7.D.T.1c||7.D.1t!=\'*\')?\'L\':7.D.L}7.M=$.1N(I,{},7.1M,7.M);7.V=$.1N(I,{},7.1M,7.V);7.Z=$.1N(I,{},7.1M,7.Z);7.1a=$.1N(I,{},7.1M,7.1a);7.M=6J($13,7.M);7.V=5k($13,7.V);7.Z=5k($13,7.Z);7.1a=6K($13,7.1a);7.1q=6L($13,7.1q);7.1h=6M($13,7.1h);8(7.2p){7.2p=5l(7.2p)}8(7.M.5m){7.M.4w=7.M.5m;2K(\'M.5m\',\'M.4w\')}8(7.M.5n){7.M.4x=7.M.5n;2K(\'M.5n\',\'M.4x\')}8(7.M.5o){7.M.4y=7.M.5o;2K(\'M.5o\',\'M.4y\')}8(7.M.5p){7.M.2L=7.M.5p;2K(\'M.5p\',\'M.2L\')}};y.6N=C(){y.1m(\'5a\',I);E a=y.14(),3Y=5q(y,[\'6O\',\'6P\',\'3s\',\'3r\',\'3a\',\'5i\',\'1n\',\'3Z\',\'N\',\'1d\',\'6Q\',\'1S\',\'5r\',\'6R\']),5s=\'7U\';1B(3Y.3s){Q\'6S\':Q\'7V\':5s=3Y.3s;16}$1s.X(3Y).X({\'7W\':\'3t\',\'3s\':5s});y.1m(\'5t\',3Y).X({\'6O\':\'1n\',\'6P\':\'41\',\'3s\':\'6S\',\'3r\':0,\'3a\':\'M\',\'5i\':\'M\',\'1n\':0,\'6Q\':0,\'1S\':0,\'5r\':0,\'6R\':0});4z(a,7);5u(a,7);8(7.2o){5v(7,a)}};y.6T=C(){y.5w();y.12(H(\'5x\',F),C(e,a){e.1f();8(!z.2d){8(7.M.W){7.M.W.3b(2B(\'4A\',F))}}z.2d=I;8(7.M.1G){7.M.1G=K;y.S(H(\'3c\',F),a)}G I});y.12(H(\'5y\',F),C(e){e.1f();8(z.25){42(U)}G I});y.12(H(\'3c\',F),C(e,a,b){e.1f();1u=3u(1u);8(a&&z.25){U.2d=I;E c=2q()-U.2M;U.1F-=c;8(U.3v){U.3v.1F-=c}8(U.3w){U.3w.1F-=c}42(U,K)}8(!z.26&&!z.25){8(b){1u.3x+=2q()-1u.2M}}8(!z.26){8(7.M.W){7.M.W.3b(2B(\'6U\',F))}}z.26=I;8(7.M.4x){E d=7.M.2L-1u.3x,3d=2J-1H.2C(d*2J/7.M.2L);7.M.4x.1g($13,3d,d)}G I});y.12(H(\'1G\',F),C(e,b,c,d){e.1f();1u=3u(1u);E v=[b,c,d],t=[\'2N\',\'27\',\'3e\'],a=3f(v,t);b=a[0];c=a[1];d=a[2];8(b!=\'V\'&&b!=\'Z\'){b=z.2b}8(!11(c)){c=0}8(!1l(d)){d=K}8(d){z.2d=K;7.M.1G=I}8(!7.M.1G){e.2e();G 17(F,\'3y 4A: 2r 3g.\')}8(z.26){8(7.M.W){7.M.W.2O(2B(\'4A\',F));7.M.W.2O(2B(\'6U\',F))}}z.26=K;1u.2M=2q();E f=7.M.2L+c;43=f-1u.3x;3d=2J-1H.2C(43*2J/f);8(7.M.1e){1u.1e=7X(C(){E a=2q()-1u.2M+1u.3x,3d=1H.2C(a*2J/f);7.M.1e.4B.1g(7.M.1e.2s[0],3d)},7.M.1e.5z)}1u.M=7Y(C(){8(7.M.1e){7.M.1e.4B.1g(7.M.1e.2s[0],2J)}8(7.M.4y){7.M.4y.1g($13,3d,43)}8(z.25){y.S(H(\'1G\',F),b)}O{y.S(H(b,F),7.M)}},43);8(7.M.4w){7.M.4w.1g($13,3d,43)}G I});y.12(H(\'3h\',F),C(e){e.1f();8(U.2d){U.2d=K;z.26=K;z.25=I;U.2M=2q();2P(U)}O{y.S(H(\'1G\',F))}G I});y.12(H(\'V\',F)+\' \'+H(\'Z\',F),C(e,b,f,g,h){e.1f();8(z.2d||y.2f(\':3t\')){e.2e();G 17(F,\'3y 4A 7Z 3t: 2r 3g.\')}E i=(11(7.D.4C))?7.D.4C:7.D.L+1;8(i>J.P){e.2e();G 17(F,\'2r 6V D (\'+J.P+\' P, \'+i+\' 6W): 2r 3g.\')}E v=[b,f,g,h],t=[\'2g\',\'27/2N\',\'C\',\'3e\'],a=3f(v,t);b=a[0];f=a[1];g=a[2];h=a[3];E k=e.5A.18(F.3z.44.R);8(!1I(b)){b={}}8(1o(g)){b.3i=g}8(1l(h)){b.2Q=h}b=$.1N(I,{},7[k],b);8(b.5B&&!b.5B.1g($13,k)){e.2e();G 17(F,\'80 "5B" 81 K.\')}8(!11(f)){8(7.D.1t!=\'*\'){f=\'L\'}O{E m=[f,b.D,7[k].D];1j(E a=0,l=m.R;a<l;a++){8(11(m[a])||m[a]==\'6X\'||m[a]==\'L\'){f=m[a];16}}}1B(f){Q\'6X\':e.2e();G y.1Q(H(k+\'82\',F),[b,g]);16;Q\'L\':8(!7.D.T.1c&&7.D.1t==\'*\'){f=7.D.L}16}}8(U.2d){y.S(H(\'3h\',F));y.S(H(\'2Q\',F),[k,[b,f,g]]);e.2e();G 17(F,\'3y 83 3g.\')}8(b.1F>0){8(z.25){8(b.2Q){8(b.2Q==\'2R\'){2h=[]}8(b.2Q!=\'Y\'||2h.R==0){y.S(H(\'2Q\',F),[k,[b,f,g]])}}e.2e();G 17(F,\'3y 84 3g.\')}}1u.3x=0;y.S(H(\'6Y\'+k,F),[b,f]);8(7.2p){E s=7.2p,c=[b,f];1j(E j=0,l=s.R;j<l;j++){E d=k;8(!s[j][2]){d=(d==\'V\')?\'Z\':\'V\'}8(!s[j][1]){c[0]=s[j][0].1Q(\'3p\',[\'4D\',d])}c[1]=f+s[j][3];s[j][0].S(\'3p\',[\'6Y\'+d,c])}}G I});y.12(H(\'85\',F),C(e,b,c){e.1f();E d=y.14();8(!7.1T){8(J.Y==0){8(7.3A){y.S(H(\'Z\',F),J.P-1)}G e.2e()}}1U(d,7);8(!11(c)){8(7.D.T.1c){c=4E(d,7,J.P-1)}O 8(7.D.1t!=\'*\'){E f=(11(b.D))?b.D:5C(y,7);c=6Z(d,7,J.P-1,f)}O{c=7.D.L}c=4F(c,7,b.D,$13)}8(!7.1T){8(J.P-c<J.Y){c=J.P-J.Y}}7.D.T.1Z=7.D.L;8(7.D.T.1c){E g=2z(35(d,7,J.P-c),7,7.D.T.2c,$13);8(7.D.L+c<=g&&c<J.P){c++;g=2z(35(d,7,J.P-c),7,7.D.T.2c,$13)}7.D.L=g}O 8(7.D.1t!=\'*\'){E g=3X(d,7,J.P-c);7.D.L=2z(g,7,7.D.T.2c,$13)}1U(d,7,I);8(c==0){e.2e();G 17(F,\'0 D 45 1M: 2r 3g.\')}17(F,\'70 \'+c+\' D 5D.\');J.Y+=c;2i(J.Y>=J.P){J.Y-=J.P}8(!7.1T){8(J.Y==0&&b.4G){b.4G.1g($13,\'V\')}8(!7.3A){3B(7,J.Y,F)}}y.14().18(J.P-c,J.P).86(y);8(J.P<7.D.L+c){y.14().18(0,(7.D.L+c)-J.P).4H(I).46(y)}E d=y.14(),3j=71(d,7,c),2j=72(d,7),1Y=d.1O(c-1),20=3j.2R(),2t=2j.2R();1U(d,7);E h=0,2D=0;8(7.1A){E p=4I(2j,7);h=p[0];2D=p[1]}E i=(h<0)?7.1i[7.d[3]]:0;E j=K,2S=$();8(7.D.L<c){2S=d.18(7.D.T.1Z,c);8(b.1V==\'73\'){E k=7.D[7.d[\'N\']];j=2S;1Y=2t;5E(j);7.D[7.d[\'N\']]=\'1c\'}}E l=K,3C=2T(d.18(0,c),7,\'N\'),2k=4J(4K(2j,7,I),7,!7.1R),3D=0,28={},4L={},2u={},2U={},4M={},2V={},5F={},2W=5G(b,7,c,3C);1B(b.1V){Q\'1J\':Q\'1J-1w\':3D=2T(d.18(0,7.D.L),7,\'N\');16}8(j){7.D[7.d[\'N\']]=k}1U(d,7,I);8(2D>=0){1U(20,7,7.1i[7.d[1]])}8(h>=0){1U(1Y,7,7.1i[7.d[3]])}8(7.1A){7.1i[7.d[1]]=2D;7.1i[7.d[3]]=h}2V[7.d[\'1n\']]=-(3C-i);5F[7.d[\'1n\']]=-(3D-i);4L[7.d[\'1n\']]=2k[7.d[\'N\']];E m=C(){}
3199,1P=C(){},1C=C(){},3E=C(){},2E=C(){},5H=C(){},1D=C(){},3F=C(){},1x=C(){},1y=C(){},1K=C(){};1B(b.1V){Q\'3k\':Q\'1J\':Q\'1J-1w\':Q\'21\':Q\'21-1w\':l=y.4H(I).46($1s);16}1B(b.1V){Q\'3k\':Q\'21\':Q\'21-1w\':l.14().18(0,c).2v();l.14().18(7.D.T.1Z).2v();16;Q\'1J\':Q\'1J-1w\':l.14().18(7.D.L).2v();l.X(5F);16}y.X(2V);U=47(2W,b.2l);28[7.d[\'1n\']]=(7.1R)?7.1i[7.d[3]]:0;8(7[7.d[\'N\']]==\'1c\'||7[7.d[\'1d\']]==\'1c\'){m=C(){$1s.X(2k)};1P=C(){U.19.1b([$1s,2k])}}8(7.1R){8(2t.4N(1Y).R){2u[7.d[\'1S\']]=1Y.1m(\'29\');8(h<0){1Y.X(2u)}O{1D=C(){1Y.X(2u)};3F=C(){U.19.1b([1Y,2u])}}}1B(b.1V){Q\'1J\':Q\'1J-1w\':l.14().1O(c-1).X(2u);16}8(2t.4N(20).R){2U[7.d[\'1S\']]=20.1m(\'29\');1C=C(){20.X(2U)};3E=C(){U.19.1b([20,2U])}}8(2D>=0){4M[7.d[\'1S\']]=2t.1m(\'29\')+7.1i[7.d[1]];2E=C(){2t.X(4M)};5H=C(){U.19.1b([2t,4M])}}}1K=C(){y.X(28)};E n=7.D.L+c-J.P;1y=C(){8(n>0){y.14().18(J.P).2v();3j=$(y.14().18(J.P-(7.D.L-n)).3G().74(y.14().18(0,n).3G()))}5I(j);8(7.1R){E a=y.14().1O(7.D.L+c-1);a.X(7.d[\'1S\'],a.1m(\'29\'))}};E o=5J(3j,2S,2j,c,\'V\',2W,2k);1x=C(){5K(y,l,b);z.25=K;2a.3i=48($13,b,\'3i\',o,2a);2h=5L(y,2h,F);8(!z.26){y.S(H(\'1G\',F))}};z.25=I;1u=3u(1u);2a.3H=48($13,b,\'3H\',o,2a);1B(b.1V){Q\'41\':y.X(28);m();1C();2E();1D();1K();1y();1x();16;Q\'1w\':U.19.1b([y,{\'1L\':0},C(){m();1C();2E();1D();1K();1y();U=47(2W,b.2l);U.19.1b([y,{\'1L\':1},1x]);2P(U)}]);16;Q\'3k\':y.X({\'1L\':0});U.19.1b([l,{\'1L\':0}]);U.19.1b([y,{\'1L\':1},1x]);1P();1C();2E();1D();1K();1y();16;Q\'1J\':U.19.1b([l,28,C(){1C();2E();1D();1K();1y();1x()}]);1P();16;Q\'1J-1w\':U.19.1b([y,{\'1L\':0}]);U.19.1b([l,28,C(){y.X({\'1L\':1});1C();2E();1D();1K();1y();1x()}]);1P();16;Q\'21\':U.19.1b([l,4L,1x]);1P();1C();2E();1D();1K();1y();16;Q\'21-1w\':y.X({\'1L\':0});U.19.1b([y,{\'1L\':1}]);U.19.1b([l,4L,1x]);1P();1C();2E();1D();1K();1y();16;2A:U.19.1b([y,28,C(){1y();1x()}]);1P();3E();5H();3F();16}2P(U);5M(7.23,y,F);y.S(H(\'3I\',F),[K,2k]);G I});y.12(H(\'87\',F),C(e,c,d){e.1f();E f=y.14();8(!7.1T){8(J.Y==7.D.L){8(7.3A){y.S(H(\'V\',F),J.P-1)}G e.2e()}}1U(f,7);8(!11(d)){8(7.D.1t!=\'*\'){E g=(11(c.D))?c.D:5C(y,7);d=75(f,7,0,g)}O{d=7.D.L}d=4F(d,7,c.D,$13)}E h=(J.Y==0)?J.P:J.Y;8(!7.1T){8(7.D.T.1c){E i=35(f,7,d),g=4E(f,7,h-1)}O{E i=7.D.L,g=7.D.L}8(d+i>h){d=h-g}}7.D.T.1Z=7.D.L;8(7.D.T.1c){E i=2z(5N(f,7,d,h),7,7.D.T.2c,$13);2i(7.D.L-d>=i&&d<J.P){d++;i=2z(5N(f,7,d,h),7,7.D.T.2c,$13)}7.D.L=i}O 8(7.D.1t!=\'*\'){E i=3X(f,7,d);7.D.L=2z(i,7,7.D.T.2c,$13)}1U(f,7,I);8(d==0){e.2e();G 17(F,\'0 D 45 1M: 2r 3g.\')}17(F,\'70 \'+d+\' D 76.\');J.Y-=d;2i(J.Y<0){J.Y+=J.P}8(!7.1T){8(J.Y==7.D.L&&c.4G){c.4G.1g($13,\'Z\')}8(!7.3A){3B(7,J.Y,F)}}8(J.P<7.D.L+d){y.14().18(0,(7.D.L+d)-J.P).4H(I).46(y)}E f=y.14(),3j=77(f,7),2j=78(f,7,d),1Y=f.1O(d-1),20=3j.2R(),2t=2j.2R();1U(f,7);E j=0,2D=0;8(7.1A){E p=4I(2j,7);j=p[0];2D=p[1]}E k=K,2S=$();8(7.D.T.1Z<d){2S=f.18(7.D.T.1Z,d);8(c.1V==\'73\'){E l=7.D[7.d[\'N\']];k=2S;1Y=20;5E(k);7.D[7.d[\'N\']]=\'1c\'}}E m=K,3C=2T(f.18(0,d),7,\'N\'),2k=4J(4K(2j,7,I),7,!7.1R),3D=0,28={},4O={},2u={},2U={},2V={},2W=5G(c,7,d,3C);1B(c.1V){Q\'21\':Q\'21-1w\':3D=2T(f.18(0,7.D.T.1Z),7,\'N\');16}8(k){7.D[7.d[\'N\']]=l}8(7.1A){8(7.1i[7.d[1]]<0){7.1i[7.d[1]]=0}}1U(f,7,I);1U(20,7,7.1i[7.d[1]]);8(7.1A){7.1i[7.d[1]]=2D;7.1i[7.d[3]]=j}2V[7.d[\'1n\']]=(7.1R)?7.1i[7.d[3]]:0;E n=C(){},1P=C(){},1C=C(){},3E=C(){},1D=C(){},3F=C(){},1x=C(){},1y=C(){},1K=C(){};1B(c.1V){Q\'3k\':Q\'1J\':Q\'1J-1w\':Q\'21\':Q\'21-1w\':m=y.4H(I).46($1s);m.14().18(7.D.T.1Z).2v();16}1B(c.1V){Q\'3k\':Q\'1J\':Q\'1J-1w\':y.X(\'3Z\',1);m.X(\'3Z\',0);16}U=47(2W,c.2l);28[7.d[\'1n\']]=-3C;4O[7.d[\'1n\']]=-3D;8(j<0){28[7.d[\'1n\']]+=j}8(7[7.d[\'N\']]==\'1c\'||7[7.d[\'1d\']]==\'1c\'){n=C(){$1s.X(2k)};1P=C(){U.19.1b([$1s,2k])}}8(7.1R){E o=2t.1m(\'29\');8(2D>=0){o+=7.1i[7.d[1]]}2t.X(7.d[\'1S\'],o);8(1Y.4N(20).R){2U[7.d[\'1S\']]=20.1m(\'29\')}1C=C(){20.X(2U)};3E=C(){U.19.1b([20,2U])};E q=1Y.1m(\'29\');8(j>0){q+=7.1i[7.d[3]]}2u[7.d[\'1S\']]=q;1D=C(){1Y.X(2u)};3F=C(){U.19.1b([1Y,2u])}}1K=C(){y.X(2V)};E r=7.D.L+d-J.P;1y=C(){8(r>0){y.14().18(J.P).2v()}E a=y.14().18(0,d).46(y).2R();8(r>0){2j=3J(f,7)}5I(k);8(7.1R){8(J.P<7.D.L+d){E b=y.14().1O(7.D.L-1);b.X(7.d[\'1S\'],b.1m(\'29\')+7.1i[7.d[3]])}a.X(7.d[\'1S\'],a.1m(\'29\'))}};E s=5J(3j,2S,2j,d,\'Z\',2W,2k);1x=C(){y.X(\'3Z\',y.1m(\'5t\').3Z);5K(y,m,c);z.25=K;2a.3i=48($13,c,\'3i\',s,2a);2h=5L(y,2h,F);8(!z.26){y.S(H(\'1G\',F))}};z.25=I;1u=3u(1u);2a.3H=48($13,c,\'3H\',s,2a);1B(c.1V){Q\'41\':y.X(28);n();1C();1D();1K();1y();1x();16;Q\'1w\':U.19.1b([y,{\'1L\':0},C(){n();1C();1D();1K();1y();U=47(2W,c.2l);U.19.1b([y,{\'1L\':1},1x]);2P(U)}]);16;Q\'3k\':y.X({\'1L\':0});U.19.1b([m,{\'1L\':0}]);U.19.1b([y,{\'1L\':1},1x]);1P();1C();1D();1K();1y();16;Q\'1J\':y.X(7.d[\'1n\'],$1s[7.d[\'N\']]());U.19.1b([y,2V,1x]);1P();1C();1D();1y();16;Q\'1J-1w\':y.X(7.d[\'1n\'],$1s[7.d[\'N\']]());U.19.1b([m,{\'1L\':0}]);U.19.1b([y,2V,1x]);1P();1C();1D();1y();16;Q\'21\':U.19.1b([m,4O,1x]);
31991P();1C();1D();1K();1y();16;Q\'21-1w\':y.X({\'1L\':0});U.19.1b([y,{\'1L\':1}]);U.19.1b([m,4O,1x]);1P();1C();1D();1K();1y();16;2A:U.19.1b([y,28,C(){1K();1y();1x()}]);1P();3E();3F();16}2P(U);5M(7.23,y,F);y.S(H(\'3I\',F),[K,2k]);G I});y.12(H(\'3l\',F),C(e,b,c,d,f,g,h){e.1f();E v=[b,c,d,f,g,h],t=[\'2N/27/2g\',\'27\',\'3e\',\'2g\',\'2N\',\'C\'],a=3f(v,t);f=a[3];g=a[4];h=a[5];b=3K(a[0],a[1],a[2],J,y);8(b==0){G K}8(!1I(f)){f=K}8(g!=\'V\'&&g!=\'Z\'){8(7.1T){g=(b<=J.P/2)?\'Z\':\'V\'}O{g=(J.Y==0||J.Y>b)?\'Z\':\'V\'}}8(g==\'V\'){b=J.P-b}y.S(H(g,F),[f,b,h]);G I});y.12(H(\'88\',F),C(e,a,b){e.1f();E c=y.1Q(H(\'4a\',F));G y.1Q(H(\'5O\',F),[c-1,a,\'V\',b])});y.12(H(\'89\',F),C(e,a,b){e.1f();E c=y.1Q(H(\'4a\',F));G y.1Q(H(\'5O\',F),[c+1,a,\'Z\',b])});y.12(H(\'5O\',F),C(e,a,b,c,d){e.1f();8(!11(a)){a=y.1Q(H(\'4a\',F))}E f=7.1a.D||7.D.L,1X=1H.2C(J.P/f)-1;8(a<0){a=1X}8(a>1X){a=0}G y.1Q(H(\'3l\',F),[a*f,0,I,b,c,d])});y.12(H(\'79\',F),C(e,s){e.1f();8(s){s=3K(s,0,I,J,y)}O{s=0}s+=J.Y;8(s!=0){8(J.P>0){2i(s>J.P){s-=J.P}}y.8a(y.14().18(s,J.P))}G I});y.12(H(\'2p\',F),C(e,s){e.1f();8(s){s=5l(s)}O 8(7.2p){s=7.2p}O{G 17(F,\'6t 8b 45 2p.\')}E n=y.1Q(H(\'4q\',F)),x=I;1j(E j=0,l=s.R;j<l;j++){8(!s[j][0].1Q(H(\'3l\',F),[n,s[j][3],I])){x=K}}G x});y.12(H(\'2Q\',F),C(e,a,b){e.1f();8(1o(a)){a.1g($13,2h)}O 8(2X(a)){2h=a}O 8(!1E(a)){2h.1b([a,b])}G 2h});y.12(H(\'8c\',F),C(e,b,c,d,f){e.1f();E v=[b,c,d,f],t=[\'2N/2g\',\'2N/27/2g\',\'3e\',\'27\'],a=3f(v,t);b=a[0];c=a[1];d=a[2];f=a[3];8(1I(b)&&!2w(b)){b=$(b)}O 8(1p(b)){b=$(b)}8(!2w(b)||b.R==0){G 17(F,\'2r a 5P 2g.\')}8(1E(c)){c=\'4b\'}4z(b,7);5u(b,7);E g=c,4c=\'4c\';8(c==\'4b\'){8(d){8(J.Y==0){c=J.P-1;4c=\'7a\'}O{c=J.Y;J.Y+=b.R}8(c<0){c=0}}O{c=J.P-1;4c=\'7a\'}}O{c=3K(c,f,d,J,y)}E h=y.14().1O(c);8(h.R){h[4c](b)}O{17(F,\'8d 8e-3s 4N 6u! 8f 8g 45 3L 4b.\');y.7b(b)}8(g!=\'4b\'&&!d){8(c<J.Y){J.Y+=b.R}}J.P=y.14().R;8(J.Y>=J.P){J.Y-=J.P}y.S(H(\'4P\',F));y.S(H(\'5Q\',F));G I});y.12(H(\'7c\',F),C(e,c,d,f){e.1f();E v=[c,d,f],t=[\'2N/27/2g\',\'3e\',\'27\'],a=3f(v,t);c=a[0];d=a[1];f=a[2];E g=K;8(c 2Y $&&c.R>1){h=$();c.1W(C(i,a){E b=y.S(H(\'7c\',F),[$(1k),d,f]);8(b)h=h.8h(b)});G h}8(1E(c)||c==\'4b\'){h=y.14().2R()}O{c=3K(c,f,d,J,y);E h=y.14().1O(c);8(h.R){8(c<J.Y)J.Y-=h.R}}8(h&&h.R){h.8i();J.P=y.14().R;y.S(H(\'4P\',F))}G h});y.12(H(\'3H\',F)+\' \'+H(\'3i\',F),C(e,a){e.1f();E b=e.5A.18(F.3z.44.R);8(2X(a)){2a[b]=a}8(1o(a)){2a[b].1b(a)}G 2a[b]});y.12(H(\'4q\',F),C(e,a){e.1f();8(J.Y==0){E b=0}O{E b=J.P-J.Y}8(1o(a)){a.1g($13,b)}G b});y.12(H(\'4a\',F),C(e,a){e.1f();E b=7.1a.D||7.D.L,1X=1H.2C(J.P/b-1),2m;8(J.Y==0){2m=0}O 8(J.Y<J.P%b){2m=0}O 8(J.Y==b&&!7.1T){2m=1X}O{2m=1H.7d((J.P-J.Y)/b)}8(2m<0){2m=0}8(2m>1X){2m=1X}8(1o(a)){a.1g($13,2m)}G 2m});y.12(H(\'8j\',F),C(e,a){e.1f();E b=3J(y.14(),7);8(1o(a)){a.1g($13,b)}G b});y.12(H(\'18\',F),C(e,f,l,b){e.1f();8(J.P==0){G K}E v=[f,l,b],t=[\'27\',\'27\',\'C\'],a=3f(v,t);f=(11(a[0]))?a[0]:0;l=(11(a[1]))?a[1]:J.P;b=a[2];f+=J.Y;l+=J.Y;8(D.P>0){2i(f>J.P){f-=J.P}2i(l>J.P){l-=J.P}2i(f<0){f+=J.P}2i(l<0){l+=J.P}}E c=y.14(),$i;8(l>f){$i=c.18(f,l)}O{$i=$(c.18(f,J.P).3G().74(c.18(0,l).3G()))}8(1o(b)){b.1g($13,$i)}G $i});y.12(H(\'26\',F)+\' \'+H(\'2d\',F)+\' \'+H(\'25\',F),C(e,a){e.1f();E b=e.5A.18(F.3z.44.R),5R=z[b];8(1o(a)){a.1g($13,5R)}G 5R});y.12(H(\'4D\',F),C(e,a,b,c){e.1f();E d=K;8(1o(a)){a.1g($13,7)}O 8(1I(a)){34=$.1N(I,{},34,a);8(b!==K)d=I;O 7=$.1N(I,{},7,a)}O 8(!1E(a)){8(1o(b)){E f=4Q(\'7.\'+a);8(1E(f)){f=\'\'}b.1g($13,f)}O 8(!1E(b)){8(2Z c!==\'3e\')c=I;4Q(\'34.\'+a+\' = b\');8(c!==K)d=I;O 4Q(\'7.\'+a+\' = b\')}O{G 4Q(\'7.\'+a)}}8(d){1U(y.14(),7);y.5b(34);y.5S();E g=4R(y,7);y.S(H(\'3I\',F),[I,g])}G 7});y.12(H(\'5Q\',F),C(e,a,b){e.1f();8(1E(a)){a=$(\'8k\')}O 8(1p(a)){a=$(a)}8(!2w(a)||a.R==0){G 17(F,\'2r a 5P 2g.\')}8(!1p(b)){b=\'a.6s\'}a.8l(b).1W(C(){E h=1k.7e||\'\';8(h.R>0&&y.14().7f($(h))!=-1){$(1k).22(\'5T\').5T(C(e){e.2F();y.S(H(\'3l\',F),h)})}});G I});y.12(H(\'3I\',F),C(e,b,c){e.1f();8(!7.1a.1z){G}E d=7.1a.D||7.D.L,4S=1H.2C(J.P/d);8(b){8(7.1a.3M){7.1a.1z.14().2v();7.1a.1z.1W(C(){1j(E a=0;a<4S;a++){E i=y.14().1O(3K(a*d,0,I,J,y));$(1k).7b(7.1a.3M.1g(i[0],a+1))}})}7.1a.1z.1W(C(){$(1k).14().22(7.1a.3N).1W(C(a){$(1k).12(7.1a.3N,C(e){e.2F();y.S(H(\'3l\',F),[a*d,-7.1a.4T,I,7.1a])})})})}E f=y.1Q(H(\'4a\',F))+7.1a.4T;8(f>=4S){f=0}8(f<0){f=4S-1}7.1a.1z.1W(C(){$(1k).14().2O(2B(\'7g\',F)).1O(f).3b(2B(\'7g\',F))});G I});y.12(H(\'4P\',F),C(e){E a=7.D.L,2G=y.14(),2n=5e($1s,7,\'N\');J.P=2G.R;8(z.4t){7.3V=2n;7[7.d[\'N\']]=4u(2n,z.4t)}
3199O{7.3V=5f(7,2n)}8(7.2o){7.D.N=7.D.3O.N;7.D.1d=7.D.3O.1d;7=5h(7,2G,2n);a=7.D.L;5v(7,2G)}O 8(7.D.T.1c){a=35(2G,7,0)}O 8(7.D.1t!=\'*\'){a=3X(2G,7,0)}8(!7.1T&&J.Y!=0&&a>J.Y){8(7.D.T.1c){E b=4E(2G,7,J.Y)-J.Y}O 8(7.D.1t!=\'*\'){E b=7h(2G,7,J.Y)-J.Y}O{E b=7.D.L-J.Y}17(F,\'8m 8n-1T: 8o \'+b+\' D 5D.\');y.S(H(\'V\',F),b)}7.D.L=2z(a,7,7.D.T.2c,$13);7.D.T.1Z=7.D.L;7=5j(7,2G);E c=4R(y,7);y.S(H(\'3I\',F),[I,c]);4U(7,J.P,F);3B(7,J.Y,F);G c});y.12(H(\'4r\',F),C(e,a){e.1f();1u=3u(1u);y.1m(\'5a\',K);y.S(H(\'5y\',F));8(a){y.S(H(\'79\',F))}1U(y.14(),7);8(7.2o){y.14().1W(C(){$(1k).X($(1k).1m(\'7i\'))})}y.X(y.1m(\'5t\'));y.5w();y.5U();$1s.8p(y);G I});y.12(H(\'17\',F),C(e){17(F,\'3y N: \'+7.N);17(F,\'3y 1d: \'+7.1d);17(F,\'7j 8q: \'+7.D.N);17(F,\'7j 8r: \'+7.D.1d);17(F,\'4d 4e D L: \'+7.D.L);8(7.M.1G){17(F,\'4d 4e D 5V 8s: \'+7.M.D)}8(7.V.W){17(F,\'4d 4e D 5V 5D: \'+7.V.D)}8(7.Z.W){17(F,\'4d 4e D 5V 76: \'+7.Z.D)}G F.17});y.12(\'3p\',C(e,n,o){e.1f();G y.1Q(H(n,F),o)})};y.5w=C(){y.22(H(\'\',F));y.22(H(\'\',F,K));y.22(\'3p\')};y.5S=C(){y.5U();4U(7,J.P,F);3B(7,J.Y,F);8(7.M.2H){E b=3P(7.M.2H);$1s.12(H(\'4V\',F,K),C(){y.S(H(\'3c\',F),b)}).12(H(\'4W\',F,K),C(){y.S(H(\'3h\',F))})}8(7.M.W){7.M.W.12(H(7.M.3N,F,K),C(e){e.2F();E a=K,b=2x;8(z.26){a=\'1G\'}O 8(7.M.4X){a=\'3c\';b=3P(7.M.4X)}8(a){y.S(H(a,F),b)}})}8(7.V.W){7.V.W.12(H(7.V.3N,F,K),C(e){e.2F();y.S(H(\'V\',F))});8(7.V.2H){E b=3P(7.V.2H);7.V.W.12(H(\'4V\',F,K),C(){y.S(H(\'3c\',F),b)}).12(H(\'4W\',F,K),C(){y.S(H(\'3h\',F))})}}8(7.Z.W){7.Z.W.12(H(7.Z.3N,F,K),C(e){e.2F();y.S(H(\'Z\',F))});8(7.Z.2H){E b=3P(7.Z.2H);7.Z.W.12(H(\'4V\',F,K),C(){y.S(H(\'3c\',F),b)}).12(H(\'4W\',F,K),C(){y.S(H(\'3h\',F))})}}8(7.1a.1z){8(7.1a.2H){E b=3P(7.1a.2H);7.1a.1z.12(H(\'4V\',F,K),C(){y.S(H(\'3c\',F),b)}).12(H(\'4W\',F,K),C(){y.S(H(\'3h\',F))})}}8(7.V.31||7.Z.31){$(4f).12(H(\'7k\',F,K,I,I),C(e){E k=e.7l;8(k==7.Z.31){e.2F();y.S(H(\'Z\',F))}8(k==7.V.31){e.2F();y.S(H(\'V\',F))}})}8(7.1a.4Y){$(4f).12(H(\'7k\',F,K,I,I),C(e){E k=e.7l;8(k>=49&&k<58){k=(k-49)*7.D.L;8(k<=J.P){e.2F();y.S(H(\'3l\',F),[k,0,I,7.1a])}}})}8(7.V.4Z||7.Z.4Z){2K(\'3L 4g-7m\',\'3L 8t-7m\');8($.1r.4g){E c=(7.V.4Z)?C(){y.S(H(\'V\',F))}:2x,4h=(7.Z.4Z)?C(){y.S(H(\'Z\',F))}:2x;8(4h||4h){8(!z.4g){z.4g=I;E d={\'8u\':30,\'8v\':30,\'8w\':I};1B(7.2b){Q\'4s\':Q\'5W\':d.8x=c;d.8y=4h;16;2A:d.8z=4h;d.8A=c}$1s.4g(d)}}}}8($.1r.1q){E f=\'8B\'8C 3m;8((f&&7.1q.4i)||(!f&&7.1q.5X)){E g=$.1N(I,{},7.V,7.1q),7n=$.1N(I,{},7.Z,7.1q),5Y=C(){y.S(H(\'V\',F),[g])},5Z=C(){y.S(H(\'Z\',F),[7n])};1B(7.2b){Q\'4s\':Q\'5W\':7.1q.2I.8D=5Z;7.1q.2I.8E=5Y;16;2A:7.1q.2I.8F=5Z;7.1q.2I.8G=5Y}8(z.1q){y.1q(\'4r\')}$1s.1q(7.1q.2I);$1s.X(\'7o\',\'8H\');z.1q=I}}8($.1r.1h){8(7.V.1h){2K(\'7p V.1h 7q\',\'3L 1h 4D 2g\');7.V.1h=2x;7.1h={D:61(7.V.1h)}}8(7.Z.1h){2K(\'7p Z.1h 7q\',\'3L 1h 4D 2g\');7.Z.1h=2x;7.1h={D:61(7.Z.1h)}}8(7.1h){E h=$.1N(I,{},7.V,7.1h),7r=$.1N(I,{},7.Z,7.1h);8(z.1h){$1s.22(H(\'1h\',F,K))}$1s.12(H(\'1h\',F,K),C(e,a){e.2F();8(a>0){y.S(H(\'V\',F),[h])}O{y.S(H(\'Z\',F),[7r])}});z.1h=I}}8(7.M.1G){y.S(H(\'1G\',F),7.M.62)}8(z.6F){E i=C(e){y.S(H(\'5y\',F));8(7.M.63&&!z.26){y.S(H(\'1G\',F))}1U(y.14(),7);y.S(H(\'4P\',F))};E j=$(3m),4j=2x;8($.64&&F.65==\'64\'){4j=$.64(8I,i)}O 8($.51&&F.65==\'51\'){4j=$.51(8J,i)}O{E l=0,66=0;4j=C(){E a=j.N(),68=j.1d();8(a!=l||68!=66){i();l=a;66=68}}}j.12(H(\'8K\',F,K,I,I),4j)}};y.5U=C(){E a=H(\'\',F),3Q=H(\'\',F,K);69=H(\'\',F,K,I,I);$(4f).22(69);$(3m).22(69);$1s.22(3Q);8(7.M.W){7.M.W.22(3Q)}8(7.V.W){7.V.W.22(3Q)}8(7.Z.W){7.Z.W.22(3Q)}8(7.1a.1z){7.1a.1z.22(3Q);8(7.1a.3M){7.1a.1z.14().2v()}}8(z.1q){y.1q(\'4r\');$1s.X(\'7o\',\'2A\');z.1q=K}8(z.1h){z.1h=K}4U(7,\'4k\',F);3B(7,\'2O\',F)};8(1l(w)){w={\'17\':w}}E z={\'2b\':\'Z\',\'26\':I,\'25\':K,\'2d\':K,\'1h\':K,\'1q\':K},J={\'P\':y.14().R,\'Y\':0},1u={\'M\':2x,\'1e\':2x,\'2M\':2q(),\'3x\':0},U={\'2d\':K,\'1F\':0,\'2M\':0,\'2l\':\'\',\'19\':[]},2a={\'3H\':[],\'3i\':[]},2h=[],F=$.1N(I,{},$.1r.1v.7s,w),7={},34=$.1N(I,{},u),$1s=y.8L(\'<\'+F.6a.57+\' 8M="\'+F.6a.7t+\'" />\').6b();F.4p=y.4p;F.3U=$.1r.1v.3U++;y.5b(34,I,59);y.6N();y.6T();y.5S();8(2X(7.D.3n)){E A=7.D.3n}O{E A=[];8(7.D.3n!=0){A.1b(7.D.3n)}}8(7.23){A.8N(4l(7u(7.23),10))}8(A.R>0){1j(E a=0,l=A.R;a<l;a++){E s=A[a];8(s==0){6c}8(s===I){s=3m.8O.7e;8(s.R<1){6c}}O 8(s===\'7v\'){s=1H.4m(1H.7v()*J.P)}8(y.1Q(H(\'3l\',F),[s,0,I,{1V:\'41\'}])){16}}}E B=4R(y,7),7w=3J(y.14(),7);8(7.7x){7.7x.1g($13,{\'N\':B.N,\'1d\':B.1d,\'D\':7w})}y.S(H(\'3I\',F),[I,B]);y.S(H(\'5Q\',F));8(F.17){y.S(H(\'17\',F))}G y};$.1r.1v.3U=1;$.1r.1v.5d={\'2p\':K,\'3A\':I,\'1T\':I,\'2o\':K,\'2b\':\'1n\',\'D\':{\'3n\':0},\'1M\':{\'2l\':\'8P\',\'1F\':6I,\'2H\':K,\'3N\':\'5T\',\'2Q\':K}};$.1r.1v.7s={\'17\':K,\'65\':\'51\',\'3z\':{\'44\':\'\',\'7y\':\'8Q\'},\'6a\':{\'57\':\'8R\',\'7t\':\'8S\'},\'6d\':{}};$.1r.1v.7z=C(a){G\'<a 8T="#"><7A>\'+a+\'</7A></a>\'};$.1r.1v.7B=C(a){$(1k).X(\'N\',a+\'%\')};$.1r.1v.23={3G:C(n){n+=\'=\';E b=4f.23.3R(\';\');1j(E a=0,l=b.R;a<l;a++){E c=b[a];2i(c.8U(0)==\' \'){c=c.18(1)}8(c.3S(n)==0){G c.18(n.R)}}G 0},6e:C(n,v,d){E e="";8(d){E a=6f 7C();a.8V(a.2q()+(d*24*60*60*8W));e="; 8X="+a.8Y()}4f.23=n+\'=\'+v+e+\'; 8Z=/\'},2v:C(n){$.1r.1v.23.6e(n,"",-1)}};C 47(d,e){G{19:[],1F:d,90:d,2l:e,2M:2q()}}C 2P(s){8(1I(s.3v)){2P(s.3v)}1j(E a=0,l=s.19.R;a<l;a++){E b=s.19[a];8(!b){6c}8(b[3]){b[0].5x()}b[0].91(b[1],{92:b[2],1F:s.1F,2l:s.2l})}8(1I(s.3w)){2P(s.3w)}}C 42(s,c){8(!1l(c)){c=I}8(1I(s.3v)){42(s.3v,c)}1j(E a=0,l=s.19.R;a<l;a++){E b=s.19[a];b[0].5x(I);8(c){b[0].X(b[1]);8(1o(b[2])){b[2]()}}}8(1I(s.3w)){42(s.3w,c)}}C 5K(a,b,o){8(b){b.2v()}1B(o.1V){Q\'1w\':Q\'3k\':Q\'1J-1w\':Q\'21-1w\':a.X(\'1t\',\'\');16}}C 48(d,o,b,a,c){8(o[b]){o[b].1g(d,a)}8(c[b].R){1j(E i=0,l=c[b].R;i<l;i++){c[b][i].1g(d,a)}}G[]}C 5L(a,q,c){8(q.R){a.S(H(q[0][0],c),q[0][1]);q.93()}G q}C 5E(b){b.1W(C(){E a=$(1k);a.1m(\'7D\',a.2f(\':3t\')).4k()})}C 5I(b){8(b){b.1W(C(){E a=$(1k);8(!a.1m(\'7D\')){a.4n()}})}}C 3u(t){8(t.M){94(t.M)}8(t.1e){95(t.1e)}G t}C 5J(a,b,c,d,e,f,g){G{\'N\':g.N,\'1d\':g.1d,\'D\':{\'1Z\':a,\'96\':b,\'L\':c,\'6f\':c},\'1M\':{\'D\':d,\'2b\':e,\'1F\':f}}}C 5G(a,o,b,c){E d=a.1F;8(a.1V==\'41\'){G 0}8(d==\'M\'){d=o.1M.1F/o.1M.D*b}O 8(d<10){d=c/d}8(d<1){G 0}8(a.1V==\'1w\'){d=d/2}G 1H.7d(d)}C 4U(o,t,c){E a=(11(o.D.4C))?o.D.4C:o.D.L+1;8(t==\'4n\'||t==\'4k\'){E f=t}O 8(a>t){17(c,\'2r 6V D (\'+t+\' P, \'+a+\' 6W): 97 98.\');E f=\'4k\'}O{E f=\'4n\'}E s=(f==\'4n\')?\'2O\':\'3b\',h=2B(\'3t\',c);8(o.M.W){o.M.W[f]()[s](h)}8(o.V.W){o.V.W[f]()[s](h)}8(o.Z.W){o.Z.W[f]()[s](h)}8(o.1a.1z){o.1a.1z[f]()[s](h)}}C 3B(o,f,c){8(o.1T||o.3A)G;E a=(f==\'2O\'||f==\'3b\')?f:K,52=2B(\'99\',c);8(o.M.W&&a){o.M.W[a](52)}8(o.V.W){E b=a||(f==0)?\'3b\':\'2O\';o.V.W[b](52)}8(o.Z.W){E b=a||(f==o.D.L)?\'3b\':\'2O\';o.Z.W[b](52)}}C 3T(a,b){8(1o(b)){b=b.1g(a)}O 8(1E(b)){b={}}G b}C 6v(a,b){b=3T(a,b);8(11(b)){b={\'L\':b}}O 8(b==\'1c\'){b={\'L\':b,\'N\':b,\'1d\':b}}O 8(!1I(b)){b={}}G b}C 6w(a,b){b=3T(a,b);8(11(b)){8(b<=50){b={\'D\':b}}O{b={\'1F\':b}}}
3199O 8(1p(b)){b={\'2l\':b}}O 8(!1I(b)){b={}}G b}C 53(a,b){b=3T(a,b);8(1p(b)){E c=6g(b);8(c==-1){b=$(b)}O{b=c}}G b}C 6x(a,b){b=53(a,b);8(2w(b)){b={\'W\':b}}O 8(1l(b)){b={\'1G\':b}}O 8(11(b)){b={\'2L\':b}}8(b.1e){8(1p(b.1e)||2w(b.1e)){b.1e={\'2s\':b.1e}}}G b}C 6J(a,b){8(1o(b.W)){b.W=b.W.1g(a)}8(1p(b.W)){b.W=$(b.W)}8(!1l(b.1G)){b.1G=I}8(!11(b.62)){b.62=0}8(1E(b.4X)){b.4X=I}8(!1l(b.63)){b.63=I}8(!11(b.2L)){b.2L=(b.1F<10)?9a:b.1F*5}8(b.1e){8(1o(b.1e.2s)){b.1e.2s=b.1e.2s.1g(a)}8(1p(b.1e.2s)){b.1e.2s=$(b.1e.2s)}8(b.1e.2s){8(!1o(b.1e.4B)){b.1e.4B=$.1r.1v.7B}8(!11(b.1e.5z)){b.1e.5z=50}}O{b.1e=K}}G b}C 5c(a,b){b=53(a,b);8(2w(b)){b={\'W\':b}}O 8(11(b)){b={\'31\':b}}G b}C 5k(a,b){8(1o(b.W)){b.W=b.W.1g(a)}8(1p(b.W)){b.W=$(b.W)}8(1p(b.31)){b.31=6g(b.31)}G b}C 6y(a,b){b=53(a,b);8(2w(b)){b={\'1z\':b}}O 8(1l(b)){b={\'4Y\':b}}G b}C 6K(a,b){8(1o(b.1z)){b.1z=b.1z.1g(a)}8(1p(b.1z)){b.1z=$(b.1z)}8(!11(b.D)){b.D=K}8(!1l(b.4Y)){b.4Y=K}8(!1o(b.3M)&&!54(b.3M)){b.3M=$.1r.1v.7z}8(!11(b.4T)){b.4T=0}G b}C 6z(a,b){8(1o(b)){b=b.1g(a)}8(1E(b)){b={\'4i\':K}}8(3q(b)){b={\'4i\':b}}O 8(11(b)){b={\'D\':b}}G b}C 6L(a,b){8(!1l(b.4i)){b.4i=I}8(!1l(b.5X)){b.5X=K}8(!1I(b.2I)){b.2I={}}8(!1l(b.2I.7E)){b.2I.7E=K}G b}C 6A(a,b){8(1o(b)){b=b.1g(a)}8(3q(b)){b={}}O 8(11(b)){b={\'D\':b}}O 8(1E(b)){b=K}G b}C 6M(a,b){G b}C 3K(a,b,c,d,e){8(1p(a)){a=$(a,e)}8(1I(a)){a=$(a,e)}8(2w(a)){a=e.14().7f(a);8(!1l(c)){c=K}}O{8(!1l(c)){c=I}}8(!11(a)){a=0}8(!11(b)){b=0}8(c){a+=d.Y}a+=b;8(d.P>0){2i(a>=d.P){a-=d.P}2i(a<0){a+=d.P}}G a}C 4E(i,o,s){E t=0,x=0;1j(E a=s;a>=0;a--){E j=i.1O(a);t+=(j.2f(\':L\'))?j[o.d[\'2y\']](I):0;8(t>o.3V){G x}8(a==0){a=i.R}x++}}C 7h(i,o,s){G 6h(i,o.D.1t,o.D.T.4v,s)}C 6Z(i,o,s,m){G 6h(i,o.D.1t,m,s)}C 6h(i,f,m,s){E t=0,x=0;1j(E a=s,l=i.R;a>=0;a--){x++;8(x==l){G x}E j=i.1O(a);8(j.2f(f)){t++;8(t==m){G x}}8(a==0){a=l}}}C 5C(a,o){G o.D.T.4v||a.14().18(0,o.D.L).1t(o.D.1t).R}C 35(i,o,s){E t=0,x=0;1j(E a=s,l=i.R-1;a<=l;a++){E j=i.1O(a);t+=(j.2f(\':L\'))?j[o.d[\'2y\']](I):0;8(t>o.3V){G x}x++;8(x==l+1){G x}8(a==l){a=-1}}}C 5N(i,o,s,l){E v=35(i,o,s);8(!o.1T){8(s+v>l){v=l-s}}G v}C 3X(i,o,s){G 6i(i,o.D.1t,o.D.T.4v,s,o.1T)}C 75(i,o,s,m){G 6i(i,o.D.1t,m+1,s,o.1T)-1}C 6i(i,f,m,s,c){E t=0,x=0;1j(E a=s,l=i.R-1;a<=l;a++){x++;8(x>=l){G x}E j=i.1O(a);8(j.2f(f)){t++;8(t==m){G x}}8(a==l){a=-1}}}C 3J(i,o){G i.18(0,o.D.L)}C 71(i,o,n){G i.18(n,o.D.T.1Z+n)}C 72(i,o){G i.18(0,o.D.L)}C 77(i,o){G i.18(0,o.D.T.1Z)}C 78(i,o,n){G i.18(n,o.D.L+n)}C 4z(i,o,d){8(o.1R){8(!1p(d)){d=\'29\'}i.1W(C(){E j=$(1k),m=4l(j.X(o.d[\'1S\']),10);8(!11(m)){m=0}j.1m(d,m)})}}C 1U(i,o,m){8(o.1R){E x=(1l(m))?m:K;8(!11(m)){m=0}4z(i,o,\'7F\');i.1W(C(){E j=$(1k);j.X(o.d[\'1S\'],((x)?j.1m(\'7F\'):m+j.1m(\'29\')))})}}C 5u(i,o){8(o.2o){i.1W(C(){E j=$(1k),s=5q(j,[\'N\',\'1d\']);j.1m(\'7i\',s)})}}C 5v(o,b){E c=o.D.L,7G=o.D[o.d[\'N\']],6j=o[o.d[\'1d\']],7H=3W(6j);b.1W(C(){E a=$(1k),6k=7G-7I(a,o,\'9b\');a[o.d[\'N\']](6k);8(7H){a[o.d[\'1d\']](4u(6k,6j))}})}C 4R(a,o){E b=a.6b(),$i=a.14(),$v=3J($i,o),55=4J(4K($v,o,I),o,K);b.X(55);8(o.1R){E p=o.1i,r=p[o.d[1]];8(o.1A&&r<0){r=0}E c=$v.2R();c.X(o.d[\'1S\'],c.1m(\'29\')+r);a.X(o.d[\'3r\'],p[o.d[0]]);a.X(o.d[\'1n\'],p[o.d[3]])}a.X(o.d[\'N\'],55[o.d[\'N\']]+(2T($i,o,\'N\')*2));a.X(o.d[\'1d\'],6l($i,o,\'1d\'));G 55}C 4K(i,o,a){G[2T(i,o,\'N\',a),6l(i,o,\'1d\',a)]}C 6l(i,o,a,b){8(!1l(b)){b=K}8(11(o[o.d[a]])&&b){G o[o.d[a]]}8(11(o.D[o.d[a]])){G o.D[o.d[a]]}a=(a.6m().3S(\'N\')>-1)?\'2y\':\'3o\';G 4o(i,o,a)}C 4o(i,o,b){E s=0;1j(E a=0,l=i.R;a<l;a++){E j=i.1O(a);E m=(j.2f(\':L\'))?j[o.d[b]](I):0;8(s<m){s=m}}G s}C 2T(i,o,b,c){8(!1l(c)){c=K}8(11(o[o.d[b]])&&c){G o[o.d[b]]}8(11(o.D[o.d[b]])){G o.D[o.d[b]]*i.R}E d=(b.6m().3S(\'N\')>-1)?\'2y\':\'3o\',s=0;1j(E a=0,l=i.R;a<l;a++){E j=i.1O(a);s+=(j.2f(\':L\'))?j[o.d[d]](I):0}G s}C 5e(a,o,d){E b=a.2f(\':L\');8(b){a.4k()}E s=a.6b()[o.d[d]]();8(b){a.4n()}G s}C 5f(o,a){G(11(o[o.d[\'N\']]))?o[o.d[\'N\']]:a}C 6n(i,o,b){E s=K,v=K;1j(E a=0,l=i.R;a<l;a++){E j=i.1O(a);E c=(j.2f(\':L\'))?j[o.d[b]](I):0;8(s===K){s=c}O 8(s!=c){v=I}8(s==0){v=I}}G v}C 7I(i,o,d){G i[o.d[\'9c\'+d]](I)-i[o.d[d.6m()]]()}C 4u(s,o){8(3W(o)){o=4l(o.18(0,-1),10);8(!11(o)){G s}s*=o/2J}G s}C H(n,c,a,b,d){8(!1l(a)){a=I}8(!1l(b)){b=I}8(!1l(d)){d=K}8(a){n=c.3z.44+n}8(b){n=n+\'.\'+c.3z.7y}8(b&&d){n+=c.3U}G n}C 2B(n,c){G(1p(c.6d[n]))?c.6d[n]:n}C 4J(a,o,p){8(!1l(p)){p=I}E b=(o.1R&&p)?o.1i:[0,0,0,0];E c={};c[o.d[\'N\']]=a[0]+b[1]+b[3];c[o.d[\'1d\']]=a[1]+b[0]+b[2];G c}C 3f(c,d){E e=[];1j(E a=0,7J=c.R;a<7J;a++){1j(E b=0,7K=d.R;b<7K;b++){8(d[b].3S(2Z c[a])>-1&&1E(e[b])){e[b]=c[a];16}}}G e}C 6H(p){8(1E(p)){G[0,0,0,0]}8(11(p)){G[p,p,p,p]}8(1p(p)){p=p.3R(\'9d\').7L(\'\').3R(\'9e\').7L(\'\').3R(\' \')}8(!2X(p)){G[0,0,0,0]}1j(E i=0;i<4;i++){p[i]=4l(p[i],10)}1B(p.R){Q 0:G[0,0,0,0];Q 1:G[p[0],p[0],p[0],p[0]];Q 2:G[p[0],p[1],p[0],p[1]];Q 3:G[p[0],p[1],p[2],p[1]];2A:G[p[0],p[1],p[2],p[3]]}}C 4I(a,o){E x=(11(o[o.d[\'N\']]))?1H.2C(o[o.d[\'N\']]-2T(a,o,\'N\')):0;1B(o.1A){Q\'1n\':G[0,x];Q\'3a\':G[x,0];Q\'5g\':2A:G[1H.2C(x/2),1H.4m(x/2)]}}C 6B(o){E a=[[\'N\',\'7M\',\'2y\',\'1d\',\'7N\',\'3o\',\'1n\',\'3r\',\'1S\',0,1,2,3],[\'1d\',\'7N\',\'3o\',\'N\',\'7M\',\'2y\',\'3r\',\'1n\',\'5r\',3,2,1,0]];E b=a[0].R,7O=(o.2b==\'3a\'||o.2b==\'1n\')?0:1;E c={};1j(E d=0;d<b;d++){c[a[0][d]]=a[7O][d]}G c}C 4F(x,o,a,b){E v=x;8(1o(a)){v=a.1g(b,v)}O 8(1p(a)){E p=a.3R(\'+\'),m=a.3R(\'-\');8(m.R>
3199p.R){E c=I,6o=m[0],32=m[1]}O{E c=K,6o=p[0],32=p[1]}1B(6o){Q\'9f\':v=(x%2==1)?x-1:x;16;Q\'9g\':v=(x%2==0)?x-1:x;16;2A:v=x;16}32=4l(32,10);8(11(32)){8(c){32=-32}v+=32}}8(!11(v)||v<1){v=1}G v}C 2z(x,o,a,b){G 6p(4F(x,o,a,b),o.D.T)}C 6p(v,i){8(11(i.36)&&v<i.36){v=i.36}8(11(i.1X)&&v>i.1X){v=i.1X}8(v<1){v=1}G v}C 5l(s){8(!2X(s)){s=[[s]]}8(!2X(s[0])){s=[s]}1j(E j=0,l=s.R;j<l;j++){8(1p(s[j][0])){s[j][0]=$(s[j][0])}8(!1l(s[j][1])){s[j][1]=I}8(!1l(s[j][2])){s[j][2]=I}8(!11(s[j][3])){s[j][3]=0}}G s}C 6g(k){8(k==\'3a\'){G 39}8(k==\'1n\'){G 37}8(k==\'4s\'){G 38}8(k==\'5W\'){G 40}G-1}C 5M(n,a,c){8(n){E v=a.1Q(H(\'4q\',c));$.1r.1v.23.6e(n,v)}}C 7u(n){E c=$.1r.1v.23.3G(n);G(c==\'\')?0:c}C 5q(a,b){E c={},56;1j(E p=0,l=b.R;p<l;p++){56=b[p];c[56]=a.X(56)}G c}C 6C(a,b,c,d){8(!1I(a.T)){a.T={}}8(!1I(a.3O)){a.3O={}}8(a.3n==0&&11(d)){a.3n=d}8(1I(a.L)){a.T.36=a.L.36;a.T.1X=a.L.1X;a.L=K}O 8(1p(a.L)){8(a.L==\'1c\'){a.T.1c=I}O{a.T.2c=a.L}a.L=K}O 8(1o(a.L)){a.T.2c=a.L;a.L=K}8(!1p(a.1t)){a.1t=(c.1t(\':3t\').R>0)?\':L\':\'*\'}8(!a[b.d[\'N\']]){8(b.2o){17(I,\'7P a \'+b.d[\'N\']+\' 1j 3L D!\');a[b.d[\'N\']]=4o(c,b,\'2y\')}O{a[b.d[\'N\']]=(6n(c,b,\'2y\'))?\'1c\':c[b.d[\'2y\']](I)}}8(!a[b.d[\'1d\']]){a[b.d[\'1d\']]=(6n(c,b,\'3o\'))?\'1c\':c[b.d[\'3o\']](I)}a.3O.N=a.N;a.3O.1d=a.1d;G a}C 6G(a,b){8(a.D[a.d[\'N\']]==\'1c\'){a.D.T.1c=I}8(!a.D.T.1c){8(11(a[a.d[\'N\']])){a.D.L=1H.4m(a[a.d[\'N\']]/a.D[a.d[\'N\']])}O{a.D.L=1H.4m(b/a.D[a.d[\'N\']]);a[a.d[\'N\']]=a.D.L*a.D[a.d[\'N\']];8(!a.D.T.2c){a.1A=K}}8(a.D.L==\'9h\'||a.D.L<1){17(I,\'2r a 5P 27 4e L D: 7P 45 "1c".\');a.D.T.1c=I}}G a}C 6D(a,b,c){8(a==\'M\'){a=4o(c,b,\'2y\')}G a}C 6E(a,b,c){8(a==\'M\'){a=4o(c,b,\'3o\')}8(!a){a=b.D[b.d[\'1d\']]}G a}C 5j(o,a){E p=4I(3J(a,o),o);o.1i[o.d[1]]=p[1];o.1i[o.d[3]]=p[0];G o}C 5h(o,a,b){E c=6p(1H.2C(o[o.d[\'N\']]/o.D[o.d[\'N\']]),o.D.T);8(c>a.R){c=a.R}E d=1H.4m(o[o.d[\'N\']]/c);o.D.L=c;o.D[o.d[\'N\']]=d;o[o.d[\'N\']]=c*d;G o}C 3P(p){8(1p(p)){E i=(p.3S(\'9i\')>-1)?I:K,r=(p.3S(\'3h\')>-1)?I:K}O{E i=r=K}G[i,r]}C 61(a){G(11(a))?a:2x}C 6q(a){G(a===2x)}C 1E(a){G(6q(a)||2Z a==\'7Q\'||a===\'\'||a===\'7Q\')}C 2X(a){G(a 2Y 9j)}C 2w(a){G(a 2Y 7R)}C 1I(a){G((a 2Y 9k||2Z a==\'2g\')&&!6q(a)&&!2w(a)&&!2X(a))}C 11(a){G((a 2Y 4d||2Z a==\'27\')&&!9l(a))}C 1p(a){G((a 2Y 9m||2Z a==\'2N\')&&!1E(a)&&!3q(a)&&!54(a))}C 1o(a){G(a 2Y 9n||2Z a==\'C\')}C 1l(a){G(a 2Y 9o||2Z a==\'3e\'||3q(a)||54(a))}C 3q(a){G(a===I||a===\'I\')}C 54(a){G(a===K||a===\'K\')}C 3W(x){G(1p(x)&&x.18(-1)==\'%\')}C 2q(){G 6f 7C().2q()}C 2K(o,n){17(I,o+\' 2f 9p, 9q 1j 9r 9s 9t 9u. 9v \'+n+\' 9w.\')}C 17(d,m){8(1I(d)){E s=\' (\'+d.4p+\')\';d=d.17}O{E s=\'\'}8(!d){G K}8(1p(m)){m=\'1v\'+s+\': \'+m}O{m=[\'1v\'+s+\':\',m]}8(3m.6r&&3m.6r.7S){3m.6r.7S(m)}G K}$.1N($.2l,{\'9x\':C(t){E a=t*t;G t*(-a*t+4*a-6*t+4)},\'9y\':C(t){G t*(4*t*t-9*t+6)},\'9z\':C(t){E a=t*t;G t*(33*a*a-9A*a*t+9B*a-67*t+15)}})})(7R);',62,596,'|||||||opts|if||||||||||||||||||||||||||||||function|items|var|conf|return|cf_e|true|itms|false|visible|auto|width|else|total|case|length|trigger|visibleConf|scrl|prev|button|css|first|next||is_number|bind|tt0|children||break|debug|slice|anims|pagination|push|variable|height|progress|stopPropagation|call|mousewheel|padding|for|this|is_boolean|data|left|is_function|is_string|swipe|fn|wrp|filter|tmrs|carouFredSel|fade|_onafter|_moveitems|container|align|switch|_s_paddingold|_s_paddingcur|is_undefined|duration|play|Math|is_object|cover|_position|opacity|scroll|extend|eq|_a_wrapper|triggerHandler|usePadding|marginRight|circular|sz_resetMargin|fx|each|max|i_cur_l|old|i_old_l|uncover|unbind|cookie||isScrolling|isPaused|number|a_cfs|_cfs_origCssMargin|clbk|direction|adjust|isStopped|stopImmediatePropagation|is|object|queu|while|i_new|w_siz|easing|nr|avail_primary|responsive|synchronise|getTime|Not|bar|i_new_l|a_cur|remove|is_jquery|null|outerWidth|cf_getItemsAdjust|default|cf_c|ceil|pR|_s_paddingnew|preventDefault|a_itm|pauseOnHover|options|100|deprecated|timeoutDuration|startTime|string|removeClass|sc_startScroll|queue|last|i_skp|ms_getTotalSize|a_old|a_lef|a_dur|is_array|instanceof|typeof||key|adj||opts_orig|gn_getVisibleItemsNext|min||||right|addClass|pause|perc|boolean|cf_sortParams|scrolling|resume|onAfter|i_old|crossfade|slideTo|window|start|outerHeight|_cfs_triggerEvent|is_true|top|position|hidden|sc_clearTimers|pre|post|timePassed|Carousel|events|infinite|nv_enableNavi|i_siz|i_siz_vis|_a_paddingold|_a_paddingcur|get|onBefore|updatePageStatus|gi_getCurrentItems|gn_getItemIndex|the|anchorBuilder|event|sizesConf|bt_pauseOnHoverConfig|ns2|split|indexOf|go_getObject|serialNumber|maxDimension|is_percentage|gn_getVisibleItemsNextFilter|orgCSS|zIndex||none|sc_stopScroll|dur2|prefix|to|appendTo|sc_setScroll|sc_fireCallbacks||currentPage|end|before|Number|of|document|touchwipe|wN|onTouch|onResize|hide|parseInt|floor|show|ms_getTrueLargestSize|selector|currentPosition|destroy|up|primarySizePercentage|ms_getPercentage|org|onTimeoutStart|onTimeoutPause|onTimeoutEnd|sz_storeMargin|stopped|updater|minimum|configuration|gn_getVisibleItemsPrev|cf_getAdjust|onEnd|clone|cf_getAlignPadding|cf_mapWrapperSizes|ms_getSizes|a_wsz|a_new|n
3199ot|a_cfs_vis|updateSizes|eval|sz_setSizes|pgs|deviation|nv_showNavi|mouseenter|mouseleave|pauseOnEvent|keys|wipe||throttle|di|go_getNaviObject|is_false|sz|prop|element||starting_position|_cfs_isCarousel|_cfs_init|go_getPrevNextObject|defaults|ms_getParentSize|ms_getMaxDimension|center|in_getResponsiveValues|bottom|in_getAlignPadding|go_complementPrevNextObject|cf_getSynchArr|onPauseStart|onPausePause|onPauseEnd|pauseDuration|in_mapCss|marginBottom|newPosition|_cfs_origCss|sz_storeSizes|sz_setResponsiveSizes|_cfs_unbind_events|stop|finish|interval|type|conditions|gn_getVisibleOrg|backward|sc_hideHiddenItems|a_lef_vis|sc_getDuration|_a_paddingnew|sc_showHiddenItems|sc_mapCallbackArguments|sc_afterScroll|sc_fireQueue|cf_setCookie|gn_getVisibleItemsNextTestCircular|slideToPage|valid|linkAnchors|value|_cfs_bind_buttons|click|_cfs_unbind_buttons|scrolled|down|onMouse|swP|swN||bt_mousesheelNumber|delay|pauseOnResize|debounce|onWindowResize|_windowHeight||nh|ns3|wrapper|parent|continue|classnames|set|new|cf_getKeyCode|gn_getItemsPrevFilter|gn_getItemsNextFilter|seco|nw|ms_getLargestSize|toLowerCase|ms_hasVariableSizes|sta|cf_getItemAdjustMinMax|is_null|console|caroufredsel|No|found|go_getItemsObject|go_getScrollObject|go_getAutoObject|go_getPaginationObject|go_getSwipeObject|go_getMousewheelObject|cf_getDimensions|in_complementItems|in_complementPrimarySize|in_complementSecondarySize|upDateOnWindowResize|in_complementVisibleItems|cf_getPadding|500|go_complementAutoObject|go_complementPaginationObject|go_complementSwipeObject|go_complementMousewheelObject|_cfs_build|textAlign|float|marginTop|marginLeft|absolute|_cfs_bind_events|paused|enough|needed|page|slide_|gn_getScrollItemsPrevFilter|Scrolling|gi_getOldItemsPrev|gi_getNewItemsPrev|directscroll|concat|gn_getScrollItemsNextFilter|forward|gi_getOldItemsNext|gi_getNewItemsNext|jumpToStart|after|append|removeItem|round|hash|index|selected|gn_getVisibleItemsPrevFilter|_cfs_origCssSizes|Item|keyup|keyCode|plugin|scN|cursor|The|option|mcN|configs|classname|cf_getCookie|random|itm|onCreate|namespace|pageAnchorBuilder|span|progressbarUpdater|Date|_cfs_isHidden|triggerOnTouchEnd|_cfs_tempCssMargin|newS|secp|ms_getPaddingBorderMargin|l1|l2|join|innerWidth|innerHeight|dx|Set|undefined|jQuery|log|caroufredsel_cookie_|relative|fixed|overflow|setInterval|setTimeout|or|Callback|returned|Page|resumed|currently|slide_prev|prependTo|slide_next|prevPage|nextPage|prepend|carousel|insertItem|Correct|insert|Appending|item|add|detach|currentVisible|body|find|Preventing|non|sliding|replaceWith|widths|heights|automatically|touchSwipe|min_move_x|min_move_y|preventDefaultEvents|wipeUp|wipeDown|wipeLeft|wipeRight|ontouchstart|in|swipeUp|swipeDown|swipeLeft|swipeRight|move|200|300|resize|wrap|class|unshift|location|swing|cfs|div|caroufredsel_wrapper|href|charAt|setTime|1000|expires|toGMTString|path|orgDuration|animate|complete|shift|clearTimeout|clearInterval|skipped|Hiding|navigation|disabled|2500|Width|outer|px|em|even|odd|Infinity|immediate|Array|Object|isNaN|String|Function|Boolean|DEPRECATED|support|it|will|be|removed|Use|instead|quadratic|cubic|elastic|106|126'.split('|'),0,{})); 3200 3201/* -- JSLIB 8/16: cms/js_lib/jquery/effects/carouFredSel-6.1.0/jquery.carouFredSel-6.1.0-packed.js (conf #0) ------------------------------- */ 3202; 3203 3204/* -- JSLIB 9/16: cms/js_lib/jquery/effects/carouFredSel-6.1.0/jquery.carouFredSel-6.1.0-packed.js (conf #1) ------------------------------- */ 3205; 3206 3207/* -- JSLIB 10/16: cms/js_lib/jquery/effects/carouFredSel-6.1.0/jquery.carouFredSel-6.1.0-packed.js (conf #2) ------------------------------- */ 3208; 3209 3210/* -- JSLIB 11/16: cms/js_lib/jquery/effects/carouFredSel-6.1.0/helper-plugins/jquery.ba-throttle-debounce.min.js ------------------------------- */ 3211/* 3212 * jQuery throttle / debounce - v1.1 - 3/7/2010 3213 * http://benalman.com/projects/jquery-throttle-debounce-plugin/ 3214 * 3215 * Copyright (c) 2010 "Cowboy" Ben Alman 3216 * Dual licensed under the MIT and GPL licenses. 3217 * http://benalman.com/about/license/ 3218 */ 3219(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);; 3220 3221/* -- JSLIB 12/16: cms/js_lib/jquery/effects/carouFredSel-6.1.0/helper-plugins/jquery.mousewheel.min.js ------------------------------- */ 3222/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 3223 * Licensed under the MIT License (LICENSE.txt). 3224 * 3225 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 3226 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 3227 * Thanks to: Seamus Leahy for adding deltaX and deltaY 3228 * 3229 * Version: 3.0.6 3230 * 3231 * Requires: 1.2.2+ 3232 */ 3233(function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1
3233),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS&&(h=0,g=-1*e),c.wheelDeltaY!==undefined&&(h=c.wheelDeltaY/120),c.wheelDeltaX!==undefined&&(g=-1*c.wheelDeltaX/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery) 3234; 3235 3236/* -- JSLIB 13/16: cms/js_lib/jquery/effects/carouFredSel-6.1.0/helper-plugins/jquery.touchSwipe.min.js ------------------------------- */ 3237/* 3238* touchSwipe - jQuery Plugin 3239* https://github.com/mattbryson/TouchSwipe-Jquery-Plugin 3240* http://labs.skinkers.com/touchSwipe/ 3241* http://plugins.jquery.com/project/touchSwipe 3242* 3243* Copyright (c) 2010 Matt Bryson (www.skinkers.com) 3244* Dual licensed under the MIT or GPL Version 2 licenses. 3245* 3246* $version: 1.3.3 3247*/ 3248 3249(function(g){function P(c){if(c&&void 0===c.allowPageScroll&&(void 0!==c.swipe||void 0!==c.swipeStatus))c.allowPageScroll=G;c||(c={});c=g.extend({},g.fn.swipe.defaults,c);return this.each(function(){var b=g(this),f=b.data(w);f||(f=new W(this,c),b.data(w,f))})}function W(c,b){var f,p,r,s;function H(a){var a=a.originalEvent,c,Q=n?a.touches[0]:a;d=R;n?h=a.touches.length:a.preventDefault();i=0;j=null;k=0;!n||h===b.fingers||b.fingers===x?(r=f=Q.pageX,s=p=Q.pageY,y=(new Date).getTime(),b.swipeStatus&&(c= l(a,d))):t(a);if(!1===c)return d=m,l(a,d),c;e.bind(I,J);e.bind(K,L)}function J(a){a=a.originalEvent;if(!(d===q||d===m)){var c,e=n?a.touches[0]:a;f=e.pageX;p=e.pageY;u=(new Date).getTime();j=S();n&&(h=a.touches.length);d=z;var e=a,g=j;if(b.allowPageScroll===G)e.preventDefault();else{var o=b.allowPageScroll===T;switch(g){case v:(b.swipeLeft&&o||!o&&b.allowPageScroll!=M)&&e.preventDefault();break;case A:(b.swipeRight&&o||!o&&b.allowPageScroll!=M)&&e.preventDefault();break;case B:(b.swipeUp&&o||!o&&b.allowPageScroll!= N)&&e.preventDefault();break;case C:(b.swipeDown&&o||!o&&b.allowPageScroll!=N)&&e.preventDefault()}}h===b.fingers||b.fingers===x||!n?(i=U(),k=u-y,b.swipeStatus&&(c=l(a,d,j,i,k)),b.triggerOnTouchEnd||(e=!(b.maxTimeThreshold?!(k>=b.maxTimeThreshold):1),!0===D()?(d=q,c=l(a,d)):e&&(d=m,l(a,d)))):(d=m,l(a,d));!1===c&&(d=m,l(a,d))}}function L(a){a=a.originalEvent;a.preventDefault();u=(new Date).getTime();i=U();j=S();k=u-y;if(b.triggerOnTouchEnd||!1===b.triggerOnTouchEnd&&d===z)if(d=q,(h===b.fingers||b.fingers=== x||!n)&&0!==f){var c=!(b.maxTimeThreshold?!(k>=b.maxTimeThreshold):1);if((!0===D()||null===D())&&!c)l(a,d);else if(c||!1===D())d=m,l(a,d)}else d=m,l(a,d);else d===z&&(d=m,l(a,d));e.unbind(I,J,!1);e.unbind(K,L,!1)}function t(){y=u=p=f=s=r=h=0}function l(a,c){var d=void 0;b.swipeStatus&&(d=b.swipeStatus.call(e,a,c,j||null,i||0,k||0,h));if(c===m&&b.click&&(1===h||!n)&&(isNaN(i)||0===i))d=b.click.call(e,a,a.target);if(c==q)switch(b.swipe&&(d=b.swipe.call(e,a,j,i,k,h)),j){case v:b.swipeLeft&&(d=b.swipeLeft.call(e, a,j,i,k,h));break;case A:b.swipeRight&&(d=b.swipeRight.call(e,a,j,i,k,h));break;case B:b.swipeUp&&(d=b.swipeUp.call(e,a,j,i,k,h));break;case C:b.swipeDown&&(d=b.swipeDown.call(e,a,j,i,k,h))}(c===m||c===q)&&t(a);return d}function D(){return null!==b.threshold?i>=b.threshold:null}function U(){return Math.round(Math.sqrt(Math.pow(f-r,2)+Math.pow(p-s,2)))}function S(){var a;a=Math.atan2(p-s,r-f);a=Math.round(180*a/Math.PI);0>a&&(a=360-Math.abs(a));return 45>=a&&0<=a?v:360>=a&&315<=a?v:135<=a&&225>=a? A:45<a&&135>a?C:B}function V(){e.unbind(E,H);e.unbind(F,t);e.unbind(I,J);e.unbind(K,L)}var O=n||!b.fallbackToMouseEvents,E=O?"touchstart":"mousedown",I=O?"touchmove":"mousemove",K=O?"touchend":"mou
3249seup",F="touchcancel",i=0,j=null,k=0,e=g(c),d="start",h=0,y=p=f=s=r=0,u=0;try{e.bind(E,H),e.bind(F,t)}catch(P){g.error("events not supported "+E+","+F+" on jQuery.swipe")}this.enable=function(){e.bind(E,H);e.bind(F,t);return e};this.disable=function(){V();return e};this.destroy=function(){V();e.data(w,null); return e}}var v="left",A="right",B="up",C="down",G="none",T="auto",M="horizontal",N="vertical",x="all",R="start",z="move",q="end",m="cancel",n="ontouchstart"in window,w="TouchSwipe";g.fn.swipe=function(c){var b=g(this),f=b.data(w);if(f&&"string"===typeof c){if(f[c])return f[c].apply(this,Array.prototype.slice.call(arguments,1));g.error("Method "+c+" does not exist on jQuery.swipe")}else if(!f&&("object"===typeof c||!c))return P.apply(this,arguments);return b};g.fn.swipe.defaults={fingers:1,threshold:75, maxTimeThreshold:null,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,click:null,triggerOnTouchEnd:!0,allowPageScroll:"auto",fallbackToMouseEvents:!0};g.fn.swipe.phases={PHASE_START:R,PHASE_MOVE:z,PHASE_END:q,PHASE_CANCEL:m};g.fn.swipe.directions={LEFT:v,RIGHT:A,UP:B,DOWN:C};g.fn.swipe.pageScroll={NONE:G,HORIZONTAL:M,VERTICAL:N,AUTO:T};g.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:x}})(jQuery);; 3250 3251/* -- JSLIB 14/16: cms/js_lib/jquery/effects/fancybox/2.1.5/jquery.fancybox.js ------------------------------- */
vendor: 44,287 bytes, lines 3252-5083
3252/*! 3253 * fancyBox - jQuery Plugin 3254 * version: 2.1.5 (Fri, 14 Jun 2013) 3255 * requires jQuery v1.6 or later 3256 * 3257 * Examples at http://fancyapps.com/fancybox/ 3258 * License: www.fancyapps.com/fancybox/#license 3259 * 3260 * Copyright 2012 Janis Skarnelis - [email protected] 3261 * 3262 */ 3263 3264;(function (window, document, $, undefined) { 3265 "use strict"; 3266 3267 var H = $("html"), 3268 W = $(window), 3269 D = $(document), 3270 F = $.fancybox = function () { 3271 F.open.apply( this, arguments ); 3272 }, 3273 IE = navigator.userAgent.match(/msie/i), 3274 didUpdate = null, 3275 isTouch = document.createTouch !== undefined, 3276 3277 isQuery = function(obj) { 3278 return obj && obj.hasOwnProperty && obj instanceof $; 3279 }, 3280 isString = function(str) { 3281 return str && $.type(str) === "string"; 3282 }, 3283 isPercentage = function(str) { 3284 return isString(str) && str.indexOf('%') > 0; 3285 }, 3286 isScrollable = function(el) { 3287 return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight))); 3288 }, 3289 getScalar = function(orig, dim) { 3290 var value = parseInt(orig, 10) || 0; 3291 3292 if (dim && isPercentage(orig)) { 3293 value = F.getViewport()[ dim ] / 100 * value; 3294 } 3295 3296 return Math.ceil(value); 3297 }, 3298 getValue = function(value, dim) { 3299 return getScalar(value, dim) + 'px'; 3300 }; 3301 3302 $.extend(F, { 3303 // The current version of fancyBox 3304 version: '2.1.5', 3305 3306 defaults: { 3307 padding : 15, 3308 margin : 20, 3309 3310 width : 800, 3311 height : 600, 3312 minWidth : 100, 3313 minHeight : 100, 3314 maxWidth : 9999, 3315 maxHeight : 9999, 3316 pixelRatio: 1, // Set to 2 for retina display support 3317 3318 autoSize : true, 3319 autoHeight : false, 3320 autoWidth : false, 3321 3322 autoResize : true, 3323 autoCenter : !isTouch, 3324 fitToView : true, 3325 aspectRatio : false, 3326 topRatio : 0.5, 3327 leftRatio : 0.5, 3328 3329 scrolling : 'auto', // 'auto', 'yes' or 'no' 3330 wrapCSS : '', 3331 3332 arrows : true, 3333 closeBtn : true, 3334 closeClick : false, 3335 nextClick : false, 3336 mouseWheel : true, 3337 autoPlay : false, 3338 playSpeed : 3000, 3339 preload : 3, 3340 modal : false, 3341 loop : true, 3342 3343 ajax : { 3344 dataType : 'html', 3345 headers : { 'X-fancyBox': true } 3346 }, 3347 iframe : { 3348 scrolling : 'auto', 3349 preload : true 3350 }, 3351 swf : { 3352 wmode: 'transparent', 3353 allowfullscreen : 'true', 3354 allowscriptaccess : 'always' 3355 }, 3356 3357 keys : { 3358 next : { 3359 13 : 'left', // enter 3360 34 : 'up', // page down 3361 39 : 'left', // right arrow 3362 40 : 'up' // down arrow 3363 }, 3364 prev : { 3365 8 : 'right', // backspace 3366 33 : 'down', // page up 3367 37 : 'right', // left arrow 3368 38 : 'down' // up arrow 3369 }, 3370 close : [27], // escape key 3371 play : [32], // space - start/stop slideshow 3372 toggle : [70] // letter "f" - toggle fullscreen 3373 }, 3374 3375 direction : { 3376 next : 'left', 3377 prev : 'right' 3378 }, 3379 3380 scrollOutside : true, 3381 3382 // Override some properties 3383 index : 0, 3384 type : null, 3385 href : null, 3386 content : null, 3387 title : null, 3388 3389 // HTML templates 3390 tpl: { 3391 wrap : '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>', 3392 image : '<img class="fancybox-image" src="{href}" alt="" />', 3393 iframe : '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>', 3394 error : '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>', 3395 closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>', 3396 next : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>', 3397 prev : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>', 3398 loading : '<div id="fancybox-loading"><div></div></div>' 3399 }, 3400 3401 // Properties for each animation type 3402 // Opening fancyBox 3403 openEffect : 'fade', // 'elastic', 'fade' or 'none' 3404 openSpeed : 250, 3405 openEasing : 'swing', 3406 openOpacity : true, 3407 openMethod : 'zoomIn', 3408 3409 // Closing fancyBox 3410 closeEffect : 'fade', // 'elastic', 'fade' or 'none' 3411 closeSpeed : 250, 3412 closeEasing : 'swing', 3413 closeOpacity : true, 3414 closeMethod : 'zoomOut', 3415 3416 // Changing next gallery item 3417 nextEffect : 'elastic', // 'elastic', 'fade' or 'none' 3418 nextSpeed : 250, 3419 nextEasing : 'swing', 3420 nextMethod : 'changeIn', 3421 3422 // Changing previous gallery item 3423 prevEffect : 'elastic', // 'elastic', 'fade' or 'none' 3424 prevSpeed : 250, 3425 prevEasing : 'swing', 3426 prevMethod : 'changeOut', 3427 3428 // Enable default helpers 3429 helpers : { 3430 overlay : true, 3431 title : true 3432 }, 3433 3434 // Callbacks 3435 onCancel : $.noop, // If canceling 3436 beforeLoad : $.noop, // Before loading 3437 afterLoad : $.noop, // After loading 3438 beforeShow : $.noop, // Before changing in current item 3439 afterShow : $.noop, // After opening 3440 beforeChange : $.noop, // Before changing gallery item 3441 beforeClose : $.noop, // Before closing 3442 afterClose : $.noop // After closing 3443 }, 3444 3445 //Current state 3446 group : {}, // Selected group 3447 opts : {}, // Group options 3448 previous : null, // Previous element 3449 coming : null, // Element being loaded 3450 current : null, // Currently loaded element 3451 isActive : false, // Is activated 3452 isOpen : false, // Is currently open 3453 isOpened : false, // Have been fully opened at least once 3454 3455 wrap : null, 3456 skin : null, 3457 outer : null, 3458 inner : null, 3459 3460 player : { 3461 timer : null, 3462 isActive : false 3463 }, 3464 3465 // Loaders 3466 ajaxLoad : null, 3467 imgPreload : null, 3468 3469 // Some collections 3470 transitions : {}, 3471 helpers : {}, 3472 3473 /* 3474 * Static methods 3475 */ 3476 3477 open: function (group, opts) { 3478 if (!group) { 3479 return; 3480 } 3481 3482 if (!$.isPlainObject(opts)) { 3483 opts = {}; 3484 } 3485 3486 // Close if already active 3487 if (false === F.close(true)) { 3488 return; 3489 } 3490 3491 // Normalize group 3492 if (!$.isArray(group)) { 3493 group = isQuery(group) ? $(group).get() : [group]; 3494 } 3495 3496 // Recheck if the type of each element is `object` and set content type (image, ajax, etc) 3497 $.each(group, function(i, element) { 3498 var obj = {}, 3499 href, 3500 title, 3501 content, 3502 type, 3503 rez, 3504 hrefParts, 3505 selector; 3506 3507 if ($.type(element) === "object") { 3508 // Check if is DOM element 3509 if (element.nodeType) { 3510 element = $(element); 3511 } 3512 3513 if (isQuery(element)) { 3514 obj = { 3515 href : element.data('fancybox-href') || element.attr('href'), 3516 title : $('<div/>').text( element.data('fancybox-title') || element.attr('title') || '' ).html(), 3517 isDom : true, 3518 element : element 3519 }; 3520 3521 if ($.metadata) { 3522 $.extend(true, obj, element.metadata()); 3523 } 3524 3525 } else { 3526 obj = element; 3527 } 3528 } 3529 3530 href = opts.href || obj.href || (isString(element) ? element : null); 3531 title = opts.title !== undefined ? opts.title : obj.title || ''; 3532 3533 content = opts.content || obj.content; 3534 type = content ? 'html' : (opts.type || obj.type); 3535 3536 if (!type && obj.isDom) { 3537 type = element.data('fancybox-type'); 3538 3539 if (!type) { 3540 rez = element.prop('class').match(/fancybox\.(\w+)/); 3541 type = rez ? rez[1] : null; 3542 } 3543 } 3544 3545 if (isString(href)) { 3546 // Try to guess the content type 3547 if (!type) { 3548 if (F.isImage(href)) { 3549 type = 'image'; 3550 3551 } else if (F.isSWF(href)) { 3552 type = 'swf'; 3553 3554 } else if (href.charAt(0) === '#') { 3555 type = 'inline'; 3556 3557 } else if (isString(element)) { 3558 type = 'html'; 3559 content = element; 3560 } 3561 } 3562 3563 // Split url into two pieces with source url and content selector, e.g, 3564 // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" 3565 if (type === 'ajax') { 3566 hrefParts = href.split(/\s+/, 2); 3567 href = hrefParts.shift(); 3568 selector = hrefParts.shift(); 3569 } 3570 } 3571 3572 if (!content) { 3573 if (type === 'inline') { 3574 if (href) { 3575 content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 3576 3577 } else if (obj.isDom) { 3578 content = element; 3579 } 3580 3581 } else if (type === 'html') { 3582 content = href; 3583 3584 } else if (!type && !href && obj.isDom) { 3585 type = 'inline'; 3586 content = element; 3587 } 3588 } 3589 3590 $.extend(obj, { 3591 href : href, 3592 type : type, 3593 content : content, 3594 title : title, 3595 selector : selector 3596 }); 3597 3598 group[ i ] = obj; 3599 }); 3600 3601 // Extend the defaults 3602 F.opts = $.extend(true, {}, F.defaults, opts); 3603 3604 // All options are merged recursive except keys 3605 if (opts.keys !== undefined) { 3606 F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; 3607 } 3608 3609 F.group = group; 3610 3611 return F._start(F.opts.index); 3612 }, 3613 3614 // Cancel image loading or abort ajax request 3615 cancel: function () { 3616 var coming = F.coming; 3617 3618 if (coming && false === F.trigger('onCancel')) { 3619 return; 3620 } 3621 3622 F.hideLoading(); 3623 3624 if (!coming) { 3625 return; 3626 } 3627 3628 if (F.ajaxLoad) { 3629 F.ajaxLoad.abort(); 3630 } 3631 3632 F.ajaxLoad = null; 3633 3634 if (F.imgPreload) { 3635 F.imgPreload.onload = F.imgPreload.onerror = null; 3636 } 3637 3638 if (coming.wrap) { 3639 coming.wrap.stop(true, true).trigger('onReset').remove(); 3640 } 3641 3642 F.coming = null; 3643 3644 // If the first item has been canceled, then clear everything 3645 if (!F.current) { 3646 F._afterZoomOut( coming ); 3647 } 3648 }, 3649 3650 // Start closing animation if is open; remove immediately if opening/closing 3651 close: function (event) { 3652 F.cancel(); 3653 3654 if (false === F.trigger('beforeClose')) { 3655 return; 3656 } 3657 3658 F.unbindEvents(); 3659 3660 if (!F.isActive) { 3661 return; 3662 } 3663 3664 if (!F.isOpen || event === true) { 3665 $('.fancybox-wrap').stop(true).trigger('onReset').remove(); 3666 3667 F._afterZoomOut(); 3668 3669 } else { 3670 F.isOpen = F.isOpened = false; 3671 F.isClosing = true; 3672 3673 $('.fancybox-item, .fancybox-nav').remove(); 3674 3675 F.wrap.stop(true, true).removeClass('fancybox-opened'); 3676 3677 F.transitions[ F.current.closeMethod ](); 3678 } 3679 }, 3680 3681 // Manage slideshow: 3682 // $.fancybox.play(); - toggle slideshow 3683 // $.fancybox.play( true ); - start 3684 // $.fancybox.play( false ); - stop 3685 play: function ( action ) { 3686 var clear = function () { 3687 clearTimeout(F.player.timer); 3688 }, 3689 set = function () { 3690 clear(); 3691 3692 if (F.current && F.player.isActive) { 3693 F.player.timer = setTimeout(F.next, F.current.playSpeed); 3694 } 3695 }, 3696 stop = function () { 3697 clear(); 3698 3699 D.unbind('.player'); 3700 3701 F.player.isActive = false; 3702 3703 F.trigger('onPlayEnd'); 3704 }, 3705 start = function () { 3706 if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { 3707 F.player.isActive = true; 3708 3709 D.bind({ 3710 'onCancel.player beforeClose.player' : stop, 3711 'onUpdate.player' : set, 3712 'beforeLoad.player' : clear 3713 }); 3714 3715 set(); 3716 3717 F.trigger('onPlayStart'); 3718 } 3719 }; 3720 3721 if (action === true || (!F.player.isActive && action !== false)) { 3722 start(); 3723 } else { 3724 stop(); 3725 } 3726 }, 3727 3728 // Navigate to next gallery item 3729 next: function ( direction ) { 3730 var current = F.current; 3731 3732 if (current) { 3733 if (!isString(direction)) { 3734 direction = current.direction.next; 3735 } 3736 3737 F.jumpto(current.index + 1, direction, 'next'); 3738 } 3739 }, 3740 3741 // Navigate to previous gallery item 3742 prev: function ( direction ) { 3743 var current = F.current; 3744 3745 if (current) { 3746 if (!isString(direction)) { 3747 direction = current.direction.prev; 3748 } 3749 3750 F.jumpto(current.index - 1, direction, 'prev'); 3751 } 3752 }, 3753 3754 // Navigate to gallery item by index 3755 jumpto: function ( index, direction, router ) { 3756 var current = F.current; 3757 3758 if (!current) { 3759 return; 3760 } 3761 3762 index = getScalar(index); 3763 3764 F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; 3765 F.router = router || 'jumpto'; 3766 3767 if (current.loop) { 3768 if (index < 0) { 3769 index = current.group.length + (index % current.group.length); 3770 } 3771 3772 index = index % current.group.length; 3773 } 3774 3775 if (current.group[ index ] !== undefined) { 3776 F.cancel(); 3777 3778 F._start(index); 3779 } 3780 }, 3781 3782 // Center inside viewport and toggle position type to fixed or absolute if needed 3783 reposition: function (e, onlyAbsolute) { 3784 var current = F.current, 3785 wrap = current ? current.wrap : null, 3786 pos; 3787 3788 if (wrap) { 3789 pos = F._getPosition(onlyAbsolute); 3790 3791 if (e && e.type === 'scroll') { 3792 delete pos.position; 3793 3794 wrap.stop(true, true).animate(pos, 200); 3795 3796 } else { 3797 wrap.css(pos); 3798 3799 current.pos = $.extend({}, current.dim, pos); 3800 } 3801 } 3802 }, 3803 3804 update: function (e) { 3805 var type = (e && e.originalEvent && e.originalEvent.type), 3806 anyway = !type || type === 'orientationchange'; 3807 3808 if (anyway) { 3809 clearTimeout(didUpdate); 3810 3811 didUpdate = null; 3812 } 3813 3814 if (!F.isOpen || didUpdate) { 3815 return; 3816 } 3817 3818 didUpdate = setTimeout(function() { 3819 var current = F.current; 3820 3821 if (!current || F.isClosing) { 3822 return; 3823 } 3824 3825 F.wrap.removeClass('fancybox-tmp'); 3826 3827 if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) { 3828 F._setDimension(); 3829 } 3830 3831 if (!(type === 'scroll' && current.canShrink)) { 3832 F.reposition(e); 3833 } 3834 3835 F.trigger('onUpdate'); 3836 3837 didUpdate = null; 3838 3839 }, (anyway && !isTouch ? 0 : 300)); 3840 }, 3841 3842 // Shrink content to fit inside viewport or restore if resized 3843 toggle: function ( action ) { 3844 if (F.isOpen) { 3845 F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; 3846 3847 // Help browser to restore document dimensions 3848 if (isTouch) { 3849 F.wrap.removeAttr('style').addClass('fancybox-tmp'); 3850 3851 F.trigger('onUpdate'); 3852 } 3853 3854 F.update(); 3855 } 3856 }, 3857 3858 hideLoading: function () { 3859 D.unbind('.loading'); 3860 3861 $('#fancybox-loading').remove(); 3862 }, 3863 3864 showLoading: function () { 3865 var el, viewport; 3866 3867 F.hideLoading(); 3868 3869 el = $(F.opts.tpl.loading).click(F.cancel).appendTo('body'); 3870 3871 // If user will press the escape-button, the request will be canceled 3872 D.bind('keydown.loading', function(e) { 3873 if ((e.which || e.keyCode) === 27) { 3874 e.preventDefault(); 3875 3876 F.cancel(); 3877 } 3878 }); 3879 3880 if (!F.defaults.fixed) { 3881 viewport = F.getViewport(); 3882 3883 el.css({ 3884 position : 'absolute', 3885 top : (viewport.h * 0.5) + viewport.y, 3886 left : (viewport.w * 0.5) + viewport.x 3887 }); 3888 } 3889 3890 F.trigger('onLoading'); 3891 }, 3892 3893 getViewport: function () { 3894 var locked = (F.current && F.current.locked) || false, 3895 rez = { 3896 x: W.scrollLeft(), 3897 y: W.scrollTop() 3898 }; 3899 3900 if (locked && locked.length) { 3901 rez.w = locked[0].clientWidth; 3902 rez.h = locked[0].clientHeight; 3903 3904 } else { 3905 // See http://bugs.jquery.com/ticket/6724 3906 rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width(); 3907 rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height(); 3908 } 3909 3910 return rez; 3911 }, 3912 3913 // Unbind the keyboard / clicking actions 3914 unbindEvents: function () { 3915 if (F.wrap && isQuery(F.wrap)) { 3916 F.wrap.unbind('.fb'); 3917 } 3918 3919 D.unbind('.fb'); 3920 W.unbind('.fb'); 3921 }, 3922 3923 bindEvents: function () { 3924 var current = F.current, 3925 keys; 3926 3927 if (!current) { 3928 return; 3929 } 3930 3931 // Changing document height on iOS devices triggers a 'resize' event, 3932 // that can change document height... repeating infinitely 3933 W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); 3934 3935 keys = current.keys; 3936 3937 if (keys) { 3938 D.bind('keydown.fb', function (e) { 3939 var code = e.which || e.keyCode, 3940 target = e.target || e.srcElement; 3941 3942 // Skip esc key if loading, because showLoading will cancel preloading 3943 if (code === 27 && F.coming) { 3944 return false; 3945 } 3946 3947 // Ignore key combinations and key events within form elements 3948 if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { 3949 $.each(keys, function(i, val) { 3950 if (current.group.length > 1 && val[ code ] !== undefined) { 3951 F[ i ]( val[ code ] ); 3952 3953 e.preventDefault(); 3954 return false; 3955 } 3956 3957 if ($.inArray(code, val) > -1) { 3958 F[ i ] (); 3959 3960 e.preventDefault(); 3961 return false; 3962 } 3963 }); 3964 } 3965 }); 3966 } 3967 3968 if ($.fn.mousewheel && current.mouseWheel) { 3969 F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) { 3970 var target = e.target || null, 3971 parent = $(target), 3972 canScroll = false; 3973 3974 while (parent.length) { 3975 if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { 3976 break; 3977 } 3978 3979 canScroll = isScrollable( parent[0] ); 3980 parent = $(parent).parent(); 3981 } 3982 3983 if (delta !== 0 && !canScroll) { 3984 if (F.group.length > 1 && !current.canShrink) { 3985 if (deltaY > 0 || deltaX > 0) { 3986 F.prev( deltaY > 0 ? 'down' : 'left' ); 3987 3988 } else if (deltaY < 0 || deltaX < 0) { 3989 F.next( deltaY < 0 ? 'up' : 'right' ); 3990 } 3991 3992 e.preventDefault(); 3993 } 3994 } 3995 }); 3996 } 3997 }, 3998 3999 trigger: function (event, o) { 4000 var ret, obj = o || F.coming || F.current; 4001 4002 if (obj) { 4003 if ($.isFunction( obj[event] )) { 4004 ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); 4005 } 4006 4007 if (ret === false) { 4008 return false; 4009 } 4010 4011 if (obj.helpers) { 4012 $.each(obj.helpers, function (helper, opts) { 4013 if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { 4014 F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); 4015 } 4016 }); 4017 } 4018 } 4019 4020 D.trigger(event); 4021 }, 4022 4023 isImage: function (str) { 4024 return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); 4025 }, 4026 4027 isSWF: function (str) { 4028 return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i); 4029 }, 4030 4031 _start: function (index) { 4032 var coming = {}, 4033 obj, 4034 href, 4035 type, 4036 margin, 4037 padding; 4038 4039 index = getScalar( index ); 4040 obj = F.group[ index ] || null; 4041 4042 if (!obj) { 4043 return false; 4044 } 4045 4046 coming = $.extend(true, {}, F.opts, obj); 4047 4048 // Convert margin and padding properties to array - top, right, bottom, left 4049 margin = coming.margin; 4050 padding = coming.padding; 4051 4052 if ($.type(margin) === 'number') { 4053 coming.margin = [margin, margin, margin, margin]; 4054 } 4055 4056 if ($.type(padding) === 'number') { 4057 coming.padding = [padding, padding, padding, padding]; 4058 } 4059 4060 // 'modal' propery is just a shortcut 4061 if (coming.modal) { 4062 $.extend(true, coming, { 4063 closeBtn : false, 4064 closeClick : false, 4065 nextClick : false, 4066 arrows : false, 4067 mouseWheel : false, 4068 keys : null, 4069 helpers: { 4070 overlay : { 4071 closeClick : false 4072 } 4073 } 4074 }); 4075 } 4076 4077 // 'autoSize' property is a shortcut, too 4078 if (coming.autoSize) { 4079 coming.autoWidth = coming.autoHeight = true; 4080 } 4081 4082 if (coming.width === 'auto') { 4083 coming.autoWidth = true; 4084 } 4085 4086 if (coming.height === 'auto') { 4087 coming.autoHeight = true; 4088 } 4089 4090 /* 4091 * Add reference to the group, so it`s possible to access from callbacks, example: 4092 * afterLoad : function() { 4093 * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); 4094 * } 4095 */ 4096 4097 coming.group = F.group; 4098 coming.index = index; 4099 4100 // Give a chance for callback or helpers to update coming item (type, title, etc) 4101 F.coming = coming; 4102 4103 if (false === F.trigger('beforeLoad')) { 4104 F.coming = null; 4105 4106 return; 4107 } 4108 4109 type = coming.type; 4110 href = coming.href; 4111 4112 if (!type) { 4113 F.coming = null; 4114 4115 //If we can not determine content type then drop silently or display next/prev item if looping through gallery 4116 if (F.current && F.router && F.router !== 'jumpto') { 4117 F.current.index = index; 4118 4119 return F[ F.router ]( F.direction ); 4120 } 4121 4122 return false; 4123 } 4124 4125 F.isActive = true; 4126 4127 if (type === 'image' || type === 'swf') { 4128 coming.autoHeight = coming.autoWidth = false; 4129 coming.scrolling = 'visible'; 4130 } 4131 4132 if (type === 'image') { 4133 coming.aspectRatio = true; 4134 } 4135 4136 if (type === 'iframe' && isTouch) { 4137 coming.scrolling = 'scroll'; 4138 } 4139 4140 // Build the neccessary markup 4141 coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' ); 4142 4143 $.extend(coming, { 4144 skin : $('.fancybox-skin', coming.wrap), 4145 outer : $('.fancybox-outer', coming.wrap), 4146 inner : $('.fancybox-inner', coming.wrap) 4147 }); 4148 4149 $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { 4150 coming.skin.css('padding' + v, getValue(coming.padding[ i ])); 4151 }); 4152 4153 F.trigger('onReady'); 4154 4155 // Check before try to load; 'inline' and 'html' types need content, others - href 4156 if (type === 'inline' || type === 'html') { 4157 if (!coming.content || !coming.content.length) { 4158 return F._error( 'content' ); 4159 } 4160 4161 } else if (!href) { 4162 return F._error( 'href' ); 4163 } 4164 4165 if (type === 'image') { 4166 F._loadImage(); 4167 4168 } else if (type === 'ajax') { 4169 F._loadAjax(); 4170 4171 } else if (type === 'iframe') { 4172 F._loadIframe(); 4173 4174 } else { 4175 F._afterLoad(); 4176 } 4177 }, 4178 4179 _error: function ( type ) { 4180 $.extend(F.coming, { 4181 type : 'html', 4182 autoWidth : true, 4183 autoHeight : true, 4184 minWidth : 0, 4185 minHeight : 0, 4186 scrolling : 'no', 4187 hasError : type, 4188 content : F.coming.tpl.error 4189 }); 4190 4191 F._afterLoad(); 4192 }, 4193 4194 _loadImage: function () { 4195 // Reset preload image so it is later possible to check "complete" property 4196 var img = F.imgPreload = new Image(); 4197 4198 img.onload = function () { 4199 this.onload = this.onerror = null; 4200 4201 F.coming.width = this.width / F.opts.pixelRatio; 4202 F.coming.height = this.height / F.opts.pixelRatio; 4203 4204 F._afterLoad(); 4205 }; 4206 4207 img.onerror = function () { 4208 this.onload = this.onerror = null; 4209 4210 F._error( 'image' ); 4211 }; 4212 4213 img.src = F.coming.href; 4214 4215 if (img.complete !== true) { 4216 F.showLoading(); 4217 } 4218 }, 4219 4220 _loadAjax: function () { 4221 var coming = F.coming; 4222 4223 F.showLoading(); 4224 4225 F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { 4226 url: coming.href, 4227 error: function (jqXHR, textStatus) { 4228 if (F.coming && textStatus !== 'abort') { 4229 F._error( 'ajax', jqXHR ); 4230 4231 } else { 4232 F.hideLoading(); 4233 } 4234 }, 4235 success: function (data, textStatus) { 4236 if (textStatus === 'success') { 4237 coming.content = data; 4238 4239 F._afterLoad(); 4240 } 4241 } 4242 })); 4243 }, 4244 4245 _loadIframe: function() { 4246 var coming = F.coming, 4247 iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) 4248 .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling) 4249 .attr('src', coming.href); 4250 4251 // This helps IE 4252 $(coming.wrap).bind('onReset', function () { 4253 try { 4254 $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); 4255 } catch (e) {} 4256 }); 4257 4258 if (coming.iframe.preload) { 4259 F.showLoading(); 4260 4261 iframe.one('load', function() { 4262 $(this).data('ready', 1); 4263 4264 // iOS will lose scrolling if we resize 4265 if (!isTouch) { 4266 $(this).bind('load.fb', F.update); 4267 } 4268 4269 // Without this trick: 4270 // - iframe won't scroll on iOS devices 4271 // - IE7 sometimes displays empty iframe 4272 $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); 4273 4274 F._afterLoad(); 4275 }); 4276 } 4277 4278 coming.content = iframe.appendTo( coming.inner ); 4279 4280 if (!coming.iframe.preload) { 4281 F._afterLoad(); 4282 } 4283 }, 4284 4285 _preloadImages: function() { 4286 var group = F.group, 4287 current = F.current, 4288 len = group.length, 4289 cnt = current.preload ? Math.min(current.preload, len - 1) : 0, 4290 item, 4291 i; 4292 4293 for (i = 1; i <= cnt; i += 1) { 4294 item = group[ (current.index + i ) % len ]; 4295 4296 if (item.type === 'image' && item.href) { 4297 new Image().src = item.href; 4298 } 4299 } 4300 }, 4301 4302 _afterLoad: function () { 4303 var coming = F.coming, 4304 previous = F.current, 4305 placeholder = 'fancybox-placeholder', 4306 current, 4307 content, 4308 type, 4309 scrolling, 4310 href, 4311 embed; 4312 4313 F.hideLoading(); 4314 4315 if (!coming || F.isActive === false) { 4316 return; 4317 } 4318 4319 if (false === F.trigger('afterLoad', coming, previous)) { 4320 coming.wrap.stop(true).trigger('onReset').remove(); 4321 4322 F.coming = null; 4323 4324 return; 4325 } 4326 4327 if (previous) { 4328 F.trigger('beforeChange', previous); 4329 4330 previous.wrap.stop(true).removeClass('fancybox-opened') 4331 .find('.fancybox-item, .fancybox-nav') 4332 .remove(); 4333 } 4334 4335 F.unbindEvents(); 4336 4337 current = coming; 4338 content = coming.content; 4339 type = coming.type; 4340 scrolling = coming.scrolling; 4341 4342 $.extend(F, { 4343 wrap : current.wrap, 4344 skin : current.skin, 4345 outer : current.outer, 4346 inner : current.inner, 4347 current : current, 4348 previous : previous 4349 }); 4350 4351 href = current.href; 4352 4353 switch (type) { 4354 case 'inline': 4355 case 'ajax': 4356 case 'html': 4357 if (current.selector) { 4358 content = $('<div>').html(content).find(current.selector); 4359 4360 } else if (isQuery(content)) { 4361 if (!content.data(placeholder)) { 4362 content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() ); 4363 } 4364 4365 content = content.show().detach(); 4366 4367 current.wrap.bind('onReset', function () { 4368 if ($(this).find(content).length) { 4369 content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false); 4370 } 4371 }); 4372 } 4373 break; 4374 4375 case 'image': 4376 content = current.tpl.image.replace(/\{href\}/g, href); 4377 break; 4378 4379 case 'swf': 4380 content = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>'; 4381 embed = ''; 4382 4383 $.each(current.swf, function(name, val) { 4384 content += '<param name="' + name + '" value="' + val + '"></param>'; 4385 embed += ' ' + name + '="' + val + '"'; 4386 }); 4387 4388 content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>'; 4389 break; 4390 } 4391 4392 if (!(isQuery(content) && content.parent().is(current.inner))) { 4393 current.inner.append( content ); 4394 } 4395 4396 // Give a chance for helpers or callbacks to update elements 4397 F.trigger('beforeShow'); 4398 4399 // Set scrolling before calculating dimensions 4400 current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); 4401 4402 // Set initial dimensions and start position 4403 F._setDimension(); 4404 4405 F.reposition(); 4406 4407 F.isOpen = false; 4408 F.coming = null; 4409 4410 F.bindEvents(); 4411 4412 if (!F.isOpened) { 4413 $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove(); 4414 4415 } else if (previous.prevMethod) { 4416 F.transitions[ previous.prevMethod ](); 4417 } 4418 4419 F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ](); 4420 4421 F._preloadImages(); 4422 }, 4423 4424 _setDimension: function () { 4425 var viewport = F.getViewport(), 4426 steps = 0, 4427 canShrink = false, 4428 canExpand = false, 4429 wrap = F.wrap, 4430 skin = F.skin, 4431 inner = F.inner, 4432 current = F.current, 4433 width = current.width, 4434 height = current.height, 4435 minWidth = current.minWidth, 4436 minHeight = current.minHeight, 4437 maxWidth = current.maxWidth, 4438 maxHeight = current.maxHeight, 4439 scrolling = current.scrolling, 4440 scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, 4441 margin = current.margin, 4442 wMargin = getScalar(margin[1] + margin[3]), 4443 hMargin = getScalar(margin[0] + margin[2]), 4444 wPadding, 4445 hPadding, 4446 wSpace, 4447 hSpace, 4448 origWidth, 4449 origHeight, 4450 origMaxWidth, 4451 origMaxHeight, 4452 ratio, 4453 width_, 4454 height_, 4455 maxWidth_, 4456 maxHeight_, 4457 iframe, 4458 body; 4459 4460 // Reset dimensions so we could re-check actual size 4461 wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); 4462 4463 wPadding = getScalar(skin.outerWidth(true) - skin.width()); 4464 hPadding = getScalar(skin.outerHeight(true) - skin.height()); 4465 4466 // Any space between content and viewport (margin, padding, border, title) 4467 wSpace = wMargin + wPadding; 4468 hSpace = hMargin + hPadding; 4469 4470 origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width; 4471 origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height; 4472 4473 if (current.type === 'iframe') { 4474 iframe = current.content; 4475 4476 if (current.autoHeight && iframe && iframe.data('ready') === 1) { 4477 try { 4478 if (iframe[0].contentWindow.document.location) { 4479 inner.width( origWidth ).height(9999); 4480 4481 body = iframe.contents().find('body'); 4482 4483 if (scrollOut) { 4484 body.css('overflow-x', 'hidden'); 4485 } 4486 4487 origHeight = body.outerHeight(true); 4488 } 4489 4490 } catch (e) {} 4491 } 4492 4493 } else if (current.autoWidth || current.autoHeight) { 4494 inner.addClass( 'fancybox-tmp' ); 4495 4496 // Set width or height in case we need to calculate only one dimension 4497 if (!current.autoWidth) { 4498 inner.width( origWidth ); 4499 } 4500 4501 if (!current.autoHeight) { 4502 inner.height( origHeight ); 4503 } 4504 4505 if (current.autoWidth) { 4506 origWidth = inner.width(); 4507 } 4508 4509 if (current.autoHeight) { 4510 origHeight = inner.height(); 4511 } 4512 4513 inner.removeClass( 'fancybox-tmp' ); 4514 } 4515 4516 width = getScalar( origWidth ); 4517 height = getScalar( origHeight ); 4518 4519 ratio = origWidth / origHeight; 4520 4521 // Calculations for the content 4522 minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth); 4523 maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth); 4524 4525 minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight); 4526 maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight); 4527 4528 // These will be used to determine if wrap can fit in the viewport 4529 origMaxWidth = maxWidth; 4530 origMaxHeight = maxHeight; 4531 4532 if (current.fitToView) { 4533 maxWidth = Math.min(viewport.w - wSpace, maxWidth); 4534 maxHeight = Math.min(viewport.h - hSpace, maxHeight); 4535 } 4536 4537 maxWidth_ = viewport.w - wMargin; 4538 maxHeight_ = viewport.h - hMargin; 4539 4540 if (current.aspectRatio) { 4541 if (width > maxWidth) { 4542 width = maxWidth; 4543 height = getScalar(width / ratio); 4544 } 4545 4546 if (height > maxHeight) { 4547 height = maxHeight; 4548 width = getScalar(height * ratio); 4549 } 4550 4551 if (width < minWidth) { 4552 width = minWidth; 4553 height = getScalar(width / ratio); 4554 } 4555 4556 if (height < minHeight) { 4557 height = minHeight; 4558 width = getScalar(height * ratio); 4559 } 4560 4561 } else { 4562 width = Math.max(minWidth, Math.min(width, maxWidth)); 4563 4564 if (current.autoHeight && current.type !== 'iframe') { 4565 inner.width( width ); 4566 4567 height = inner.height(); 4568 } 4569 4570 height = Math.max(minHeight, Math.min(height, maxHeight)); 4571 } 4572 4573 // Try to fit inside viewport (including the title) 4574 if (current.fitToView) { 4575 inner.width( width ).height( height ); 4576 4577 wrap.width( width + wPadding ); 4578 4579 // Real wrap dimensions 4580 width_ = wrap.width(); 4581 height_ = wrap.height(); 4582 4583 if (current.aspectRatio) { 4584 while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { 4585 if (steps++ > 19) { 4586 break; 4587 } 4588 4589 height = Math.max(minHeight, Math.min(maxHeight, height - 10)); 4590 width = getScalar(height * ratio); 4591 4592 if (width < minWidth) { 4593 width = minWidth; 4594 height = getScalar(width / ratio); 4595 } 4596 4597 if (width > maxWidth) { 4598 width = maxWidth; 4599 height = getScalar(width / ratio); 4600 } 4601 4602 inner.width( width ).height( height ); 4603 4604 wrap.width( width + wPadding ); 4605 4606 width_ = wrap.width(); 4607 height_ = wrap.height(); 4608 } 4609 4610 } else { 4611 width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); 4612 height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); 4613 } 4614 } 4615 4616 if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) { 4617 width += scrollOut; 4618 } 4619 4620 inner.width( width ).height( height ); 4621 4622 wrap.width( width + wPadding ); 4623 4624 width_ = wrap.width(); 4625 height_ = wrap.height(); 4626 4627 canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; 4628 canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight)); 4629 4630 $.extend(current, { 4631 dim : { 4632 width : getValue( width_ ), 4633 height : getValue( height_ ) 4634 }, 4635 origWidth : origWidth, 4636 origHeight : origHeight, 4637 canShrink : canShrink, 4638 canExpand : canExpand, 4639 wPadding : wPadding, 4640 hPadding : hPadding, 4641 wrapSpace : height_ - skin.outerHeight(true), 4642 skinSpace : skin.height() - height 4643 }); 4644 4645 if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { 4646 inner.height('auto'); 4647 } 4648 }, 4649 4650 _getPosition: function (onlyAbsolute) { 4651 var current = F.current, 4652 viewport = F.getViewport(), 4653 margin = current.margin, 4654 width = F.wrap.width() + margin[1] + margin[3], 4655 height = F.wrap.height() + margin[0] + margin[2], 4656 rez = { 4657 position: 'absolute', 4658 top : margin[0], 4659 left : margin[3] 4660 }; 4661 4662 if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) { 4663 rez.position = 'fixed'; 4664 4665 } else if (!current.locked) { 4666 rez.top += viewport.y; 4667 rez.left += viewport.x; 4668 } 4669 4670 rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); 4671 rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); 4672 4673 return rez; 4674 }, 4675 4676 _afterZoomIn: function () { 4677 var current = F.current; 4678 4679 if (!current) { 4680 return; 4681 } 4682 4683 F.isOpen = F.isOpened = true; 4684 4685 F.wrap.css('overflow', 'visible').addClass('fancybox-opened').hide().show(0); 4686 4687 F.update(); 4688 4689 // Assign a click event 4690 if ( current.closeClick || (current.nextClick && F.group.length > 1) ) { 4691 F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { 4692 if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { 4693 e.preventDefault(); 4694 4695 F[ current.closeClick ? 'close' : 'next' ](); 4696 } 4697 }); 4698 } 4699 4700 // Create a close button 4701 if (current.closeBtn) { 4702 $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) { 4703 e.preventDefault(); 4704 4705 F.close(); 4706 }); 4707 } 4708 4709 // Create navigation arrows 4710 if (current.arrows && F.group.length > 1) { 4711 if (current.loop || current.index > 0) { 4712 $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); 4713 } 4714 4715 if (current.loop || current.index < F.group.length - 1) { 4716 $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); 4717 } 4718 } 4719 4720 F.trigger('afterShow'); 4721 4722 // Stop the slideshow if this is the last item 4723 if (!current.loop && current.index === current.group.length - 1) { 4724 4725 F.play( false ); 4726 4727 } else if (F.opts.autoPlay && !F.player.isActive) { 4728 F.opts.autoPlay = false; 4729 4730 F.play(true); 4731 } 4732 }, 4733 4734 _afterZoomOut: function ( obj ) { 4735 obj = obj || F.current; 4736 4737 $('.fancybox-wrap').trigger('onReset').remove(); 4738 4739 $.extend(F, { 4740 group : {}, 4741 opts : {}, 4742 router : false, 4743 current : null, 4744 isActive : false, 4745 isOpened : false, 4746 isOpen : false, 4747 isClosing : false, 4748 wrap : null, 4749 skin : null, 4750 outer : null, 4751 inner : null 4752 }); 4753 4754 F.trigger('afterClose', obj); 4755 } 4756 }); 4757 4758 /* 4759 * Default transitions 4760 */ 4761 4762 F.transitions = { 4763 getOrigPosition: function () { 4764 var current = F.current, 4765 element = current.element, 4766 orig = current.orig, 4767 pos = {}, 4768 width = 50, 4769 height = 50, 4770 hPadding = current.hPadding, 4771 wPadding = current.wPadding, 4772 viewport = F.getViewport(); 4773 4774 if (!orig && current.isDom && element.is(':visible')) { 4775 orig = element.find('img:first'); 4776 4777 if (!orig.length) { 4778 orig = element; 4779 } 4780 } 4781 4782 if (isQuery(orig)) { 4783 pos = orig.offset(); 4784 4785 if (orig.is('img')) { 4786 width = orig.outerWidth(); 4787 height = orig.outerHeight(); 4788 } 4789 4790 } else { 4791 pos.top = viewport.y + (viewport.h - height) * current.topRatio; 4792 pos.left = viewport.x + (viewport.w - width) * current.leftRatio; 4793 } 4794 4795 if (F.wrap.css('position') === 'fixed' || current.locked) { 4796 pos.top -= viewport.y; 4797 pos.left -= viewport.x; 4798 } 4799 4800 pos = { 4801 top : getValue(pos.top - hPadding * current.topRatio), 4802 left : getValue(pos.left - wPadding * current.leftRatio), 4803 width : getValue(width + wPadding), 4804 height : getValue(height + hPadding) 4805 }; 4806 4807 return pos; 4808 }, 4809 4810 step: function (now, fx) { 4811 var ratio, 4812 padding, 4813 value, 4814 prop = fx.prop, 4815 current = F.current, 4816 wrapSpace = current.wrapSpace, 4817 skinSpace = current.skinSpace; 4818 4819 if (prop === 'width' || prop === 'height') { 4820 ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); 4821 4822 if (F.isClosing) { 4823 ratio = 1 - ratio; 4824 } 4825 4826 padding = prop === 'width' ? current.wPadding : current.hPadding; 4827 value = now - padding; 4828 4829 F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) ); 4830 F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) ); 4831 } 4832 }, 4833 4834 zoomIn: function () { 4835 var current = F.current, 4836 startPos = current.pos, 4837 effect = current.openEffect, 4838 elastic = effect === 'elastic', 4839 endPos = $.extend({opacity : 1}, startPos); 4840 4841 // Remove "position" property that breaks older IE 4842 delete endPos.position; 4843 4844 if (elastic) { 4845 startPos = this.getOrigPosition(); 4846 4847 if (current.openOpacity) { 4848 startPos.opacity = 0.1; 4849 } 4850 4851 } else if (effect === 'fade') { 4852 startPos.opacity = 0.1; 4853 } 4854 4855 F.wrap.css(startPos).animate(endPos, { 4856 duration : effect === 'none' ? 0 : current.openSpeed, 4857 easing : current.openEasing, 4858 step : elastic ? this.step : null, 4859 complete : F._afterZoomIn 4860 }); 4861 }, 4862 4863 zoomOut: function () { 4864 var current = F.current, 4865 effect = current.closeEffect, 4866 elastic = effect === 'elastic', 4867 endPos = {opacity : 0.1}; 4868 4869 if (elastic) { 4870 endPos = this.getOrigPosition(); 4871 4872 if (current.closeOpacity) { 4873 endPos.opacity = 0.1; 4874 } 4875 } 4876 4877 F.wrap.animate(endPos, { 4878 duration : effect === 'none' ? 0 : current.closeSpeed, 4879 easing : current.closeEasing, 4880 step : elastic ? this.step : null, 4881 complete : F._afterZoomOut 4882 }); 4883 }, 4884 4885 changeIn: function () { 4886 var current = F.current, 4887 effect = current.nextEffect, 4888 startPos = current.pos, 4889 endPos = { opacity : 1 }, 4890 direction = F.direction, 4891 distance = 200, 4892 field; 4893 4894 startPos.opacity = 0.1; 4895 4896 if (effect === 'elastic') { 4897 field = direction === 'down' || direction === 'up' ? 'top' : 'left'; 4898 4899 if (direction === 'down' || direction === 'right') { 4900 startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance); 4901 endPos[ field ] = '+=' + distance + 'px'; 4902 4903 } else { 4904 startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance); 4905 endPos[ field ] = '-=' + distance + 'px'; 4906 } 4907 } 4908 4909 // Workaround for http://bugs.jquery.com/ticket/12273 4910 if (effect === 'none') { 4911 F._afterZoomIn(); 4912 4913 } else { 4914 F.wrap.css(startPos).animate(endPos, { 4915 duration : current.nextSpeed, 4916 easing : current.nextEasing, 4917 complete : F._afterZoomIn 4918 }); 4919 } 4920 }, 4921 4922 changeOut: function () { 4923 var previous = F.previous, 4924 effect = previous.prevEffect, 4925 endPos = { opacity : 0.1 }, 4926 direction = F.direction, 4927 distance = 200; 4928 4929 if (effect === 'elastic') { 4930 endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; 4931 } 4932 4933 previous.wrap.animate(endPos, { 4934 duration : effect === 'none' ? 0 : previous.prevSpeed, 4935 easing : previous.prevEasing, 4936 complete : function () { 4937 $(this).trigger('onReset').remove(); 4938 } 4939 }); 4940 } 4941 }; 4942 4943 /* 4944 * Overlay helper 4945 */ 4946 4947 F.helpers.overlay = { 4948 defaults : { 4949 closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay 4950 speedOut : 200, // duration of fadeOut animation 4951 showEarly : true, // indicates if should be opened immediately or wait until the content is ready 4952 css : {}, // custom CSS properties 4953 locked : !isTouch, // if true, the content will be locked into overlay 4954 fixed : true // if false, the overlay CSS position property will not be set to "fixed" 4955 }, 4956 4957 overlay : null, // current handle 4958 fixed : false, // indicates if the overlay has position "fixed" 4959 el : $('html'), // element that contains "the lock" 4960 4961 // Public methods 4962 create : function(opts) { 4963 var parent; 4964 4965 opts = $.extend({}, this.defaults, opts); 4966 4967 if (this.overlay) { 4968 this.close(); 4969 } 4970 4971 parent = F.coming ? F.coming.parent : opts.parent; 4972 4973 this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( parent && parent.length ? parent : 'body' ); 4974 this.fixed = false; 4975 4976 if (opts.fixed && F.defaults.fixed) { 4977 this.overlay.addClass('fancybox-overlay-fixed'); 4978 4979 this.fixed = true; 4980 } 4981 }, 4982 4983 open : function(opts) { 4984 var that = this; 4985 4986 opts = $.extend({}, this.defaults, opts); 4987 4988 if (this.overlay) { 4989 this.overlay.unbind('.overlay').width('auto').height('auto'); 4990 4991 } else { 4992 this.create(opts); 4993 } 4994 4995 if (!this.fixed) { 4996 W.bind('resize.overlay', $.proxy( this.update, this) ); 4997 4998 this.update(); 4999 } 5000 5001 if (opts.closeClick) { 5002 this.overlay.bind('click.overlay', function(e) { 5003 if ($(e.target).hasClass('fancybox-overlay')) { 5004 if (F.isActive) { 5005 F.close(); 5006 } else { 5007 that.close(); 5008 } 5009 5010 return false; 5011 } 5012 }); 5013 } 5014 5015 this.overlay.css( opts.css ).show(); 5016 }, 5017 5018 close : function() { 5019 W.unbind('resize.overlay'); 5020 5021 if (this.el.hasClass('fancybox-lock')) { 5022 $('.fancybox-margin').removeClass('fancybox-margin'); 5023 5024 this.el.removeClass('fancybox-lock'); 5025 5026 W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); 5027 } 5028 5029 $('.fancybox-overlay').remove().hide(); 5030 5031 $.extend(this, { 5032 overlay : null, 5033 fixed : false 5034 }); 5035 }, 5036 5037 // Private, callbacks 5038 5039 update : function () { 5040 var width = '100%', offsetWidth; 5041 5042 // Reset width/height so it will not mess 5043 this.overlay.width(width).height('100%'); 5044 5045 // jQuery does not return reliable result for IE 5046 if (IE) { 5047 offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); 5048 5049 if (D.width() > offsetWidth) { 5050 width = D.width(); 5051 } 5052 5053 } else if (D.width() > W.width()) { 5054 width = D.width(); 5055 } 5056 5057 this.overlay.width(width).height(D.height()); 5058 }, 5059 5060 // This is where we can manipulate DOM, because later it would cause iframes to reload 5061 onReady : function (opts, obj) { 5062 var overlay = this.overlay; 5063 5064 $('.fancybox-overlay').stop(true, true); 5065 5066 if (!overlay) { 5067 this.create(opts); 5068 } 5069 5070 if (opts.locked && this.fixed && obj.fixed) { 5071 obj.locked = this.overlay.append( obj.wrap ); 5072 obj.fixed = false; 5073 } 5074 5075 if (opts.showEarly === true) { 5076 this.beforeShow.apply(this, arguments); 5077 } 5078 }, 5079 5080 beforeShow : function(opts, obj) { 5081 if (obj.locked && !this.el.hasClass('fancybox-lock')) { 5082 if (this.fixPosition !== false) { 5083 $('*
vendor: 1,346 bytes, lines 5083-5141
5083:not(object)').filter(function(){ 5084 return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); 5085 }).addClass('fancybox-margin'); 5086 } 5087 5088 this.el.addClass('fancybox-margin'); 5089 5090 this.scrollV = W.scrollTop(); 5091 this.scrollH = W.scrollLeft(); 5092 5093 this.el.addClass('fancybox-lock'); 5094 5095 W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); 5096 } 5097 5098 this.open(opts); 5099 }, 5100 5101 onUpdate : function() { 5102 if (!this.fixed) { 5103 this.update(); 5104 } 5105 }, 5106 5107 afterClose: function (opts) { 5108 // Remove overlay if exists and fancyBox is not opening 5109 // (e.g., it is not being open using afterClose callback) 5110 if (this.overlay && !F.coming) { 5111 this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); 5112 } 5113 } 5114 }; 5115 5116 /* 5117 * Title helper 5118 */ 5119 5120 F.helpers.title = { 5121 defaults : { 5122 type : 'float', // 'float', 'inside', 'outside' or 'over', 5123 position : 'bottom' // 'top' or 'bottom' 5124 }, 5125 5126 beforeShow: function (opts) { 5127 var current = F.current, 5128 text = current.title, 5129 type = opts.type, 5130 title, 5131 target; 5132 5133 if ($.isFunction(text)) { 5134 text = text.call(current.element, current); 5135 } 5136 5137 if (!isString(text) || $.trim(text) === '') { 5138 return; 5139 } 5140 5141 title = $('<div class="fancybox-title fancybox-title-' + type + '-wrap">
5141' + text + '</div>'); 5142 5143 switch (type) { 5144 case 'inside': 5145 target = F.skin; 5146 break; 5147 5148 case 'outside': 5149 target = F.wrap; 5150 break; 5151 5152 case 'over': 5153 target = F.inner; 5154 break; 5155 5156 default: // 'float' 5157 target = F.skin; 5158 5159 title.appendTo('body'); 5160 5161 if (IE) { 5162 title.width( title.width() ); 5163 } 5164 5165 title.wrapInner('<span class="child"></span>'); 5166 5167 //Increase bottom margin so this title will also fit into viewport 5168 F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) ); 5169 break; 5170 } 5171 5172 title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target); 5173 } 5174 }; 5175 5176 // jQuery plugin initialization 5177 $.fn.fancybox = function (options) { 5178 var index, 5179 that = $(this), 5180 selector = this.selector || '', 5181 run = function(e) { 5182 var what = $(this).blur(), idx = index, relType, relVal; 5183 5184 if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) { 5185 relType = options.groupAttr || 'data-fancybox-group'; 5186 relVal = what.attr(relType); 5187 5188 if (!relVal) { 5189 relType = 'rel'; 5190 relVal = what.get(0)[ relType ]; 5191 } 5192 5193 if (relVal && relVal !== '' && relVal !== 'nofollow') { 5194 what = selector.length ? $(selector) : that; 5195 what = what.filter('[' + relType + '="' + relVal + '"]'); 5196 idx = what.index(this); 5197 } 5198 5199 options.index = idx; 5200 5201 // Stop an event from bubbling if everything is fine 5202 if (F.open(what, options) !== false) { 5203 e.preventDefault(); 5204 } 5205 } 5206 }; 5207 5208 options = options || {}; 5209 index = options.index || 0; 5210 5211 if (!selector || options.live === false) { 5212 that.unbind('click.fb-start').bind('click.fb-start', run); 5213 5214 } else { 5215 D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); 5216 } 5217 5218 this.filter('[data-fancybox-start=1]').trigger('click'); 5219 5220 return this; 5221 }; 5222 5223 // Tests that need a body at doc ready 5224 D.ready(function() { 5225 var w1, w2; 5226 5227 if ( $.scrollbarWidth === undefined ) { 5228 // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth 5229 $.scrollbarWidth = function() { 5230 var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'), 5231 child = parent.children(), 5232 width = child.innerWidth() - child.height( 99 ).innerWidth(); 5233 5234 parent.remove(); 5235 5236 return width; 5237 }; 5238 } 5239 5240 if ( $.support.fixedPosition === undefined ) { 5241 $.support.fixedPosition = (function() { 5242 var elem = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'), 5243 fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 ); 5244 5245 elem.remove(); 5246 5247 return fixed; 5248 }()); 5249 } 5250 5251 $.extend(F.defaults, { 5252 scrollbarWidth : $.scrollbarWidth(), 5253 fixed : $.support.fixedPosition, 5254 parent : $('body') 5255 }); 5256 5257 //Get real width of page scroll-bar 5258 w1 = $(window).width(); 5259 5260 H.addClass('fancybox-lock-test'); 5261 5262 w2 = $(window).width(); 5263 5264 H.removeClass('fancybox-lock-test'); 5265 5266 $("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head"); 5267 }); 5268 5269}(window, document, jQuery)); 5270; 5271 5272/* -- JSLIB 15/16: cms/js_lib/jquery/effects/fancybox/2.1.5/jquery.fancybox.js (conf #0) ------------------------------- */ 5273 5274var cyclefnb = 1; 5275function startFancyBoxWhenJQueryIsLoaded() { 5276 cyclefnb ++; 5277 if(cyclefnb >100){ 5278 console.warn('fancybox: starting failed, jQuery or fancybox not loaded'); 5279 return false; 5280 } 5281 5282 if (typeof jQuery != 'undefined'){ 5283 5284 if (jQuery().fancybox){ 5285 5286 jQuery(".fancybox").fancybox({ 5287 type:'inline', 5288 width: 682, 5289 autoDimensions: false, 5290 'titlePosition' : 'inside', 5291 'transitionIn' : 'none', 5292 'transitionOut' : 'none' 5293 }); 5294 5295 } else { 5296 setTimeout(startFancyBoxWhenJQueryIsLoaded, 50); 5297 } 5298 5299 } else { 5300 setTimeout(startFancyBoxWhenJQueryIsLoaded, 50); 5301 } 5302} 5303startFancyBoxWhenJQueryIsLoaded(); 5304; 5305 5306/* -- JSLIB 16/16: www.mondainoeventi.it/functions.js ------------------------------- */ 5307jQuery(document).ready(function() { 5308 5309 var linksPDFnoCache = document.querySelectorAll('a[href*=".pdf"]'); 5310 if(linksPDFnoCache.length > 0){ 5311 linksPDFnoCache.forEach((link) => { 5312 if(link){ 5313 const timestamp = new Date().getTime(); 5314 link.href=link.href+"?v="+timestamp; 5315 } 5316 }); 5317 } 5318 5319 var linksGiostra = document.querySelectorAll("a[href^='https://www.mondainoeventi.it/source/giostra-teatrale']"); 5320 5321 if(linksGiostra){ 5322 5323 linksGiostra.forEach(linkGiostra => { 5324 5325 linkGiostra.addEventListener("click", () => { 5326 5327 console.log("click giostra"); 5328 cms.facebook.event.track('track', 'Submit Application'); 5329 5330 }); 5331 5332 }); 5333 5334 5335 } 5336 5337 5338 5339 jQuery(".cerca-btn").closest('form').on('submit', function(e) { e.preventDefault(); }); 5340 5341 jQuery(".cerca-btn").click(function(e) { 5342 var input = jQuery(".cerca-input").val().trim().toLowerCase(); 5343 5344 if(jQuery('article.video').length > 0) { 5345 searchInVideoGallery(input); 5346 }else { 5347 searchInFotoGallery(input); 5348 } 5349 5350 });
5351 jQuery(".reset-btn").click(function(e) { 5352 resetMasonryItems(); 5353 resetInput(); 5354 clearNotFoundMessage(); 5355 initialiseMasonry(); 5356 }); 5357 5358 jQuery(".cerca-input").keyup(function(event) { 5359 if (event.keyCode === 13) { 5360 jQuery(".cerca-btn").click(); 5361 } 5362 }); 5363 5364 function searchInFotoGallery(input) { 5365 5366 clearNotFoundMessage(); 5367 resetMasonryItems(); 5368 5369 if(input) { 5370 var found = false; 5371 jQuery(".masonry .masonry-brick").each(function( index, value ) { 5372 var description = value.children[1].textContent.toLowerCase(); 5373 if (!description.includes(input)) { 5374 jQuery(value).addClass("hide"); 5375 } else { 5376 found = true; 5377 } 5378 }); 5379 5380 if (!found) { 5381 jQuery(".noresult").removeClass("hide"); 5382 resetInput(); 5383 } 5384 } 5385 5386 initialiseMasonry(); 5387 } 5388 5389 function searchInVideoGallery(input) { 5390 5391 clearNotFoundMessage(); 5392 jQuery('article.video').removeClass('hide'); 5393 5394 if(input) { 5395 var found = false; 5396 jQuery('article.video').each(function( index, value ) { 5397 5398 var title = jQuery(value).find('.videoTitle').text().toLowerCase(); 5399 var description = jQuery(value).find('.videoDescription').text().toLowerCase(); 5400 5401 if (!title.includes(input) && !description.includes(input)) { 5402 jQuery(value).addClass("hide"); 5403 } else { 5404 found = true; 5405 } 5406 }); 5407 5408 if (!found) { 5409 jQuery(".noresult").removeClass("hide"); 5410 resetInput(); 5411 } 5412 } 5413 } 5414 5415 function initialiseMasonry() { 5416 var masonry = jQuery('.masonry').masonry({ 5417 itemSelector: '.masonry-brick' 5418 }); 5419 masonry.masonry('layout'); 5420 } 5421 function resetMasonryItems() { 5422 jQuery(".masonry .masonry-brick").each(function( index, value ) { 5423 if (jQuery(value).hasClass("hide")) { 5424 jQuery(value).removeClass("hide"); 5425 } 5426 }); 5427 } 5428 function resetInput() { 5429 jQuery(".cerca-input").val("").focus(); 5430 } 5431 function clearNotFoundMessage() { 5432 if (!jQuery(".noresult").hasClass("hide")) { 5433 jQuery(".noresult").addClass("hide"); 5434 } 5435 } 5436 5437 5438 5439 5440 // APertura menu secondo livello mobile // 5441/* function openSecondLevel(){ 5442 5443 console.log('ciao'); 5444 5445 jQuery('.voce_menu_30381 > a').click(function(e){ 5446 console.log('ciao-2'); 5447 e.preventDefault(); 5448 jQuery(this).parents('li').children('#level2').addClass('slide-menu'); 5449 5450 }) 5451 5452 jQuery('.level2 li:first-child a').click(function(e){ 5453 e.preventDefault(); 5454 jQuery(this).parents('li').parents('#level2').removeClass('slide-menu'); 5455 5456 }) 5457 } 5458 5459 5460 jQuery(".level1 > li:has('.level2')").addClass('submenu'); 5461 5462 jQuery("li.submenu > a").removeAttr("href"); 5463 5464 if (window.innerWidth < 992) { 5465 openSecondLevel(); 5466 } */ 5467 5468}); 5469 5470function add_slide_menu(item) { 5471 jQuery('li' + item + ' .level2').toggleClass('slide-menu'); 5472} 5473 5474function back_menu(item) { 5475 jQuery('li' + item + ' .level2').toggleClass('slide-menu'); 5476} 5477 5478function goToByScroll(param){ 5479 jQuery('html, body').animate({scrollTop: jQuery(param).offset().top-200}, 2000, "easeInOutQuad"); 5480} 5481 5482;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.