1var v65 = { 2 global : { 3 init : function(){ 4 v65.global.addButtonListener(); 5 v65.global.addToCartListener(); 6 v65.global.continueShopping(); 7 v65.global.mainMenuHover(); 8 v65.global.misc(); 9 v65.global.mobileMenu(); 10 v65.global.header(); 11 v65.global.pageBanners(); 12 }, 13 addButtonListener : function(){ 14 if(document.addEventListener){ 15 document.addEventListener("touchstart", function(){}, true); 16 } 17 }, 18 addToCartListener : function(){ 19 $("[v65js=addToCart]").on("submit",function(){ 20 v65.cookies.createCookie("continueShoppingURL", window.location.href); 21 }); 22 }, 23 continueShopping : function(){ 24 if(v65.cookies.readCookie("continueShoppingURL") !== null){ 25 $(".v65-cartCheckOutButtons a.linkAltBtn, #v65-checkCartSummaryMoreOptions a:contains('Continue shopping')").attr("href", v65.cookies.readCookie("continueShoppingURL")); 26 } 27 }, 28 mainMenuHover : function(){ 29 $(".mainMenu ul li ul li").hover(function(){ 30 $(this).parent().parent().children("a").toggleClass("hover"); 31 }); 32 }, 33 header : function(){ 34 // Add login icon 35 $('.v65-login a, .v65-editProfile a').prepend('<i class="icon-person"></i>'); 36 37 // Move cart position 38 if($(window).width() < 950){ 39 $('#user-tools.cartNav #v65-modalCart').prependTo($('.topUserTools')).removeClass('cartNav'); 40 } 41 42 $(window).resize(function(){ 43 if($('.cartNav').css('display') == 'none') { 44 $('#user-tools.cartNav #v65-modalCart').prependTo($('.topUserTools')).addClass('topCart'); 45 }else{ 46 $('.topUserTools #v65-modalCart').prependTo($('#user-tools.cartNav')).removeClass('topCart'); 47 } 48 }); 49 }, 50 misc : function(){ 51 // // Subscribe 52 $('#v65-subscribeWidget button span').prepend('<i class="icon-email"></i>'); 53 54 // Add class to product drilldown content 55 if($('.v65-productWrapper').length > 0){ 56 $('section.content').addClass('productDrilldownContent'); 57 } 58 }, 59 mobileMenu : function(){ 60 $(".icon-menu").click(function(){ 61 $('body').toggleClass('mobileBody'); 62 $('.mainMenu').toggleClass('menuOpen'); 63 return false; 64 }); 65 66 // Close cart when opening menu 67 $('.icon-mobile').click(function(){ 68 if(!$('.mainMenu').hasClass('menuOpen') && $('#v65-modalCartDropdown:visible')){ 69 vin65.cart.hideCart(); 70 } 71 }); 72 // Close menu when opening cart 73 $('body').click(function(e){ 74 if($(e.target).attr('id') === "v65-toggleModalCart"){ 75 if($('.mainMenu').hasClass('menuOpen')){ 76 $('body').toggleClass('mobileBody'); 77 $('.mainMenu').removeClass('menuOpen'); 78 } 79 } 80 }); 81 }, 82 pageBanners : function(){ 83 $(window).scroll(function () { 84 if($(window).width() > 900){ 85 $('.pageBanner').css({'background-position':'center calc(50% + '+(-$(this).scrollTop()*.3)+'px)'}); 86 } 87 }); 88 } 89 }, 90 cookies : { 91 createCookie : function(name,value,days) { 92 var expires = ""; 93 94 if (days) { 95 var date = new Date(); 96 date.setTime(date.getTime()+(days*24*60*60*1000)); 97 expires = "; expires="+date.toGMTString(); 98 } 99 100 document.cookie = name+"="+value+expires+"; path=/"; 101 }, 102 readCookie : function(name) { 103 var nameEQ = name + "="; 104 var ca = document.cookie.split(';'); 105 for(var i=0;i < ca.length;i++) { 106 var c = ca[i]; 107 while (c.charAt(0)==' ') c = c.substring(1,c.length); 108 if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length,c.length); 109 } 110 return null; 111 }, 112 eraseCookie : function(name) { 113 createCookie(name,"",-1); 114 } 115 }, 116 home : { 117 initPhotoGallery : function(){ 118 if($("#slider").length){ 119 $("#slider").v65PhotoGallery({ 120 galleryId : "BFE72025-D8D1-7BB3-41BB-5D3FF8BC9DC5", 121 controlNav : false 122 }); 123 } 124 }, 125 homepageGallery : function(){ 126 if($('.homepageGallery li').length > 1){ 127 $('.homepageGallery').bxSlider({ 128 auto: true, 129 pager: false, 130 controls: true, 131 mode: 'fade', 132 nextText: '<i class="icon-arrow-right"></i>', 133 prevText: '<i class="icon-arrow-left"></i>' 134 }); 135 } 136 } 137 }, 138 page : { 139 init : function(){ 140 v65.page.initPhotoGallery(); 141 v65.page.productGroupRowClear(); 142 v65.page.scrollToBottom(); 143 v65.page.scrollToTop(); 144 }, 145 initPhotoGallery : function(){ 146 if($("#pagePhotoGallery").length){ 147 $("#pagePhotoGallery").v65PhotoGallery({ 148 galleryHeight : null, // This value is translated to 420px and will change the photogallery height 149 galleryWidth : null // This value is translated to 630px and will change the photogallery width 150 /* 151 Uncomment the code below if you want to change how the photo gallery is displayed. 152 153 galleryHeight : 420, // This value is translated to 420px and will change the photogallery height 154 galleryWidth : 630, // This value is translated to 630px and will change the photogallery width 155 pauseTime : 5000, // Adjust how long the image is displayed for. Value is in milliseconds 156 animSpeed : 1000, // Adjust the transition speed between images. Value is in milliseconds 157 controlNav : false, // hide the 1,2,3 navigation 158 directionNav : false // hide the arrow navigation 159 */ 160 }); 161 } 162 }, 163 productGroupRowClear : function(){ 164 if($(".v65-productGroup").length){ 165 for(var i = 1;
165 i <= $(".v65-productGroup-product").length; i++){ 166 if(i % 2 === 0){ 167 $(".v65-productGroup-product").eq(i).before('<div class="v65-clear productGroup-2Up-rowClear"></div>'); 168 } else if (i % 3 === 0){ 169 $(".v65-productGroup-product").eq(i).before('<div class="v65-clear productGroup-3Up-rowClear"></div>'); 170 } 171 } 172 } 173 }, 174 scrollToBottom : function(){ 175 $('.downButton').click(function() { 176 $("html, body").animate({ scrollTop: ($("a[name='homeContent']").offset().top - 20) }, 1000); 177 return false; 178 }); 179 }, 180 scrollToTop : function(){ 181 $(window).scroll(function() { 182 if($(document).scrollTop() > 150 && $(window).width() < 767){ 183 $(".backToTop").css("display", "block"); 184 $('.v65-productAddToCart-drilldown').addClass('v65-productAddToCart-drilldownActivate'); 185 $("footer").css("margin-bottom", $('.v65-productAddToCart-drilldownActivate').outerHeight()) 186 187 } else{ 188 $(".backToTop").css("display", "none"); 189 $('.v65-productAddToCart-drilldown').removeClass('v65-productAddToCart-drilldownActivate'); 190 $("footer").removeAttr('style'); 191 } 192 }); 193 194 $('.backToTop').click(function() { 195 $("html, body").animate({ scrollTop: 0 }, 400); 196 return false; 197 }); 198 } 199 }, 200 documentReady : { 201 init : function(){ 202 v65.documentReady.equalizeHeight(); 203 v65.documentReady.homepageMisc(); 204 v65.documentReady.modals(); 205 v65.documentReady.eventsPages(); 206 v65.documentReady.productPage(); 207 v65.documentReady.recipesPage(); 208 v65.documentReady.misc(); 209 v65.documentReady.videoFormatting(); 210 }, 211 equalizeHeight : function(){ 212 $('.homepageSection').matchHeight(); 213 $('.v65-productGroup-product').matchHeight(); 214 $('.v65-product-title.v65-title').matchHeight(); 215 $('.v65-product-teaser').matchHeight(); 216 $('.v65-club').matchHeight(); 217 $('.footerSection').matchHeight(); 218 }, 219 homepageMisc : function(){ 220 $('.homepageEvents .v65-event-upcoming-event').each(function(){ 221 var date = $(this).find('.v65-event-upcoming-event-time'); 222 $(this).find('.v65-title').after(date); 223 224 $(this).append('<div class="event-arrow"><a href="#"><i class="icon-arrow-right"></i></a></div>'); 225 var eventLink = $(this).find('.v65-event-upcoming-event-title a').attr('href'); 226 $(this).find('.event-arrow a').attr('href', eventLink); 227 }); 228 229 if($('.subscribeContent .v65-pod').length === 0){ 230 $('div#v65-subscribeWidget').parent().parent().hide(); 231 } 232 233 if($(window).width() > 990){ 234 $('.homepageHeader').css('height', $('.galleryContent').innerHeight()); 235 }else{ 236 $('.homepageHeader').css('height', 'initial'); 237 } 238 239 $('.galleryContent').addClass('fadeIn').one('webkitAnimationEnd...', function(){$(this).removeClass('fadeIn')}); 240 241 // Firefox 242 $(window).load(function(){ 243 setTimeout(function(){ 244 $('.galleryContent').removeClass('fadeIn') 245 }, 2500); 246 }); 247 }, 248 modals : function(){ 249 if($(window).width() > 581){ 250 $('a.modalLinkAltBtn span').each(function(){ 251 if($(this).text().trim() == "Close"){ 252 $(this).text("").prepend('<i class="icon-cross"></i>').parent().addClass('modalClose'); 253 } 254 }) 255 } 256 257 $('.v65-quickView-close a').text("").prepend('<i class="icon-cross"></i>').parent().addClass('modalClose'); 258 259 }, 260 eventsPages : function(){ 261 $('#v65-CalendarWrapper a').each(function(){ 262 if($(this).text().trim() === "Next »"){ 263 $(this).text("").prepend('<icon class="icon-arrow-right"></i>'); 264 } 265 266 if($(this).text().trim() === "« Previous"){ 267 $(this).text("").prepend('<icon class="icon-arrow-left"></i>'); 268 } 269 }); 270 271 $('#v65-CalendarEventTable').wrap("<div class='eventDrilldownWrapper' />"); 272 $('.eventDrilldownWrapper').parent().addClass('eventWrapper v65-group'); 273 $('.eventDrilldownWrapper').before('<h5 class="eventTitle">Event Details</h5>'); 274 275 $('.eventWrapper').prepend('<a class="backLink" href="#"><i class="icon-arrow-left"></i><span class="eventsBackButton">Back</span></a>'); 276 277 $(".backLink").click(function(event) { 278 event.preventDefault(); 279 history.back(1); 280 }); 281 282 $(".eventDrilldownWrapper ~ *").wrapAll("<div class='event-description'></div>"); 283 }, 284 productPage : function(){ 285 // Add search icon to quickview 286 $('.v65-product-quickView').prepend('<i class="icon-search"></i>'); 287 288 $('.wineSpecs').prepend($('.wineSpecs .v65-title'));
289 $('.wineProfile').prepend($('.wineProfile .v65-title')); 290 291 $('.wineSpecs').click(function(){ 292 if($(this).hasClass('opened')){ 293 $(this).find('.v65-wine-specs').slideUp(); 294 $(this).removeClass('opened'); 295 }else{ 296 $(this).find('.v65-wine-specs').slideDown(); 297 $(this).addClass('opened'); 298 } 299 }); 300 301 if($('.wineSpecs').text().trim().length === 0){ 302 $('.wineSpecs').css({padding: 0, border: 0}); 303 } 304 305 $('.wineProfile').click(function(){ 306 if($(this).hasClass('opened')){ 307 $(this).find('.v65-wine-profile').slideUp(); 308 $(this).removeClass('opened'); 309 }else{ 310 $(this).find('.v65-wine-profile').slideDown(); 311 $(this).addClass('opened'); 312 } 313 }); 314 315 if($('.wineProfile').text().trim().length === 0){ 316 $('.wineProfile').css({padding: 0, border: 0}); 317 } 318 }, 319 recipesPage : function(){ 320 $('.v65-recipe').each(function(){ 321 // Rearrange title and date 322 $(this).find('.v65-recipe-date').after($(this).find($('.v65-recipe-title'))); 323 }); 324 }, 325 misc : function(){ 326 if($('.telephoneNumber a').text().trim() == ""){ 327 $('.telephoneNumber').css('display', 'none'); 328 } 329 330 if($('.subSubMenu ul li').length === 0){ 331 $('.subSubMenu').css('border-top', '0'); 332 }; 333 }, 334 videoFormatting : function(){ 335 $('iframe').each(function(){ 336 if($("iframe[src^='//player.vimeo.com'], iframe[src^='//www.youtube.com']")){ 337 $(this).wrap('<div class="videoWrapper"></div>'); 338 } 339 }); 340 } 341 } 342} 343 344;(function($,undefined){ 345 $.fn.v65PhotoGallery = function(options){ 346 var defaults = { 347 galleryId : $("#pagePhotoGallery").attr("v65jsphotogalleryid"), 348 galleryHeight : $("#pagePhotoGallery").attr("v65jsphotogalleryheight"), 349 galleryWidth : $("#pagePhotoGallery").attr("v65jsphotogallerywidth"), 350 timestamp : "×tamp="+ new Date().getTime(), 351 effect:'fade', // Specify sets like: 'fold,fade,sliceDown' 352 slices:15, // For slice animations 353 animSpeed:500, // Slide transition speed 354 pauseTime:5000, // How long each slide will show 355 startSlide:0, // Set starting Slide (0 index) 356 directionNav:true, // Next & Prev navigation 357 directionNavHide:true, // Only show on hover 358 controlNav:false // 1,2,3... navigation 359 }, 360 gallery = $(this), 361 settings = $.extend(defaults, options); 362 gallery.html("").css({ 363 "height":settings.galleryHeight, 364 "width":settings.galleryWidth, 365 "overflow":"hidden" 366 }); 367 $.ajax({ 368 type: "GET", 369 url: "/index.cfm?method=pages.showPhotoGalleryXML&photogalleryid="+settings.galleryId+defaults.timestamp, 370 dataType: "xml", 371 success: function(xml) { 372 var images = ""; 373 $(xml).find('img').each(function() { 374 var location = '/assets/images/photogallery/images/large/', 375 photo = $(this).attr('src'), 376 caption = $(this).attr('caption'), 377 url = $(this).attr('link'); 378 if (url === undefined) { 379 images += '<img src="'+location+photo+'" title="'+caption+'"/>'; 380 } else{ 381 images += '<a href="'+url+'"><img src="'+location+photo+'" title="'+caption+'"/></a>'; 382 } 383 }); 384 gallery.append(images); 385 }, 386 complete: function(){ 387 gallery.nivoSlider({ 388 effect:settings.effect, 389 slices:settings.slices, 390 animSpeed:settings.animSpeed, 391 pauseTime:settings.pauseTime, 392 startSlide:settings.startSlide, 393 directionNav:settings.directionNav, 394 directionNavHide:settings.directionNavHide, 395 controlNav:settings.controlNav 396 }); 397 } 398 }); 399 } 400})(jQuery); 401 402/** 403* jquery.matchHeight-min.js master 404* http://brm.io/jquery-match-height/ 405* License: MIT 406*/ 407(function(c){var n=-1,f=-1,g=function(a){return parseFloat(a)||0},r=function(a){var b=null,d=[];c(a).each(function(){var a=c(this),k=a.offset().top-g(a.css("margin-top")),l=0<d.length?d[d.length-1]:null;null===l?d.push(a):1>=Math.floor(Math.abs(b-k))?d[d.length-1]=l.add(a):d.push(a);b=k});return d},p=function(a){var b={byRow:!0,property:"height",target:null,remove:!1};if("object"===typeof a)return c.extend(b,a);"boolean"===typeof a?b.byRow=a:"remove"===a&&(b.remove=!0);return b},b=c.fn.matchHeight= 408function(a){a=p(a);if(a.remove){var e=this;this.css(a.property,"");c.each(b._groups,function(a,b){b.elements=b.elements.not(e)});return this}if(1>=this.length&&!a.target)return this;b._groups.push({elements:this,options:a});b._apply(this,a);return this};b._groups=[];b._throttle=80;b._maintainScroll=!1;b._beforeUpdate=null;b._afterUpdate=null;b._apply=function(a,e){var d=p(e),h=c(a),k=[h],l=c(window).scrollTop(),f=c("html").outerHeight(!0),m=h.parents().filter(":hidden");m.each(function(){var a=c(this); 409a.data("style-cache",a.attr("style"))});m.css("display","block");d.byRow&&!d.target&&(h.each(function(){var a=c(this),b=a.css("display");"inline-block"!==b&&"inline-flex"!==b&&(b="block");a.data("style-cache",a.attr("style"));a.css({display:b,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})}),k=r(h),h.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||"")}));c.each(k,function(a,b){var e=c(b), 410f=0;if(d.target)f=d.target.outerHeight(!1);else{if(d.byRow&&1>=e.length){e.css(d.property,"");return}e.each(function(){var a=c(this),b=a.css("display");"inline-block"!==b&&"inline-flex"!==b&&(b="block");b={display:b};b[d.property]="";a.css(b);a.outerHeight(!1)>f&&(f=a.outerHeight(!1));a.css("display","")})}e.each(function(){var a=c(this),b=0;d.target&&a.is(d.target)||("border-box"!==a.css("box-sizing")&&(b+=g(a.css("border-top-width"))+g(a.css("border-bottom-width")),b+=g(a.css("padding-top"))+g(a.css("padding-bottom"))), 411a.css(d.property,f-b+"px"))})});m.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||null)});b._maintainScroll&&c(window).scrollTop(l/f*c("html").outerHeight(!0));return this};b._applyDataApi=function(){var a={};c("[data-match-height], [data-mh]").each(function(){var b=c(this),d=b.attr("data-mh")||b.attr("data-match-height");a[d]=d in a?a[d].add(b):b});c.each(a,function(){this.matchHeight(!0)})};var q=function(a){b._beforeUpdate&&b._beforeUpdate(a,b._groups);c.each(b._groups,function(){b._apply(this.elements, 412this.options)});b._afterUpdate&&b._afterUpdate(a,b._groups)};b._update=function(a,e){if(e&&"resize"===e.type){var d=c(window).width();if(d===n)return;n=d}a?-1===f&&(f=setTimeout(function(){q(e);f=-1}
412,b._throttle)):q(e)};c(b._applyDataApi);c(window).bind("load",function(a){b._update(!1,a)});c(window).bind("resize orientationchange",function(a){b._update(!0,a)})})(jQuery); 413 414v65.global.init(); 415v65.page.init(); 416 417//Image PreLoader Plugin 418/*! 419 * imagesLoaded PACKAGED v3.1.8 420 * JavaScript is all like "You images are done yet or what?" 421 * MIT License 422 */ 423 424(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;
424if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s}); 425 426function galleryParallax(content) { 427 scrollPos = $(this).scrollTop(); 428 $(content).css({ 429 'margin-top': (scrollPos/20)+"px", 430 'opacity': 1-(scrollPos/250) 431 }); 432}; 433 434$('body').imagesLoaded().done(function( instance ) { 435 $('.imagePreloader').addClass('imageVisible'); 436}); 437 438$(window).load(function(){ 439 $('.imagePreloader').addClass('imageVisible'); 440 $('.mainMenu ul ul').addClass('transition'); 441}) 442 443$(document).ready(function(){ 444 v65.documentReady.init(); 445 v65.home.homepageGallery(); 446 447 if($(window).width() > 990){ 448 $(window).scroll(function() { 449 var headerHeight = $('header').height(); 450 var galleryPadding = parseFloat($('.galleryContent').css('padding-top')); 451 452 if(($('.galleryContent').innerHeight() - galleryPadding) + headerHeight > $(window).height()){ 453 $('.galleryContent').removeClass('galleryFixed'); 454 }else{ 455 $('.galleryContent').addClass('galleryFixed'); 456 galleryParallax('.galleryContent'); 457 } 458 }); 459 } 460}); 461 462$(document).ajaxComplete(function(){ 463 v65.documentReady.modals(); 464 v65.documentReady.eventsPages(); 465});
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.