1(function (jQuery, $) { 2var PREVIEW = false; 3 4window.isThemlerIframe = function() { 5 'use strict'; 6 try { 7 return "undefined" !== typeof parent.AppController; 8 } catch(e) { 9 return false; 10 } 11}; 12 13 14jQuery(function ($) { 15 'use strict'; 16 var panels = $('.bd-accordion .bd-container-43').parent(); 17 panels.on('show.bs.collapse', function () { 18 var actives = panels.filter('.in'); 19 20 $(this).prev().children('a').addClass('active'); 21 actives.prev().children('a').removeClass('active'); 22 23 if (actives && actives.length) { 24 var hasData = actives.data('bs.collapse'); 25 if (!hasData || !hasData.transitioning) { 26 actives.collapse('hide'); 27 if (!hasData) actives.data('bs.collapse', null); 28 } 29 } 30 }); 31 panels.on('hidden.bs.collapse', function () { 32 $(this).prev().children('a').removeClass('active'); 33 }); 34}); 35 36 37if (PREVIEW) { 38 jQuery(function ($) { 39 var scripts = $('head script[src*="bootstrap"]'), 40 //showMsg = null;//$.cookie('showbootstrapduplicatemessage'); 41 matches = document.cookie.match(new RegExp( 42 "(?:^|; )" + 'showbootstrapduplicatemessage'.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" 43 )), 44 showMsg = matches ? decodeURIComponent(matches[1]) : undefined, 45 count = 0; 46 47 scripts.each(function(key, script) { 48 var src = $(this).attr('src'); 49 if (src.search(/templates.*js\/jui/) != -1) 50 return true; 51 count++; 52 }); 53 54 if (count > 1 && !showMsg) { 55 $('body').prepend('<div class="alert alert-warning"><button type="button" class="close" data-dismiss="alert">×</button><span>' + 56 '<strong>Warning!</strong> <br /> You have several conflicting bootstrap.js files loaded on the site. Various unexpected issues in site functionality may arise.<br />' 57 + 'Please have a look to the following article <a href="http://answers.themler.io/articles/82654/bootstrap-conflicts" target="_blank">Bootstrap conflicts</a> on how to disable all additional bootstrap.js files.</span></div>'); 58 document.cookie = "showbootstrapduplicatemessage=true; path=/"; 59 } 60 }); 61} 62 63(function ($) { 64 window.themeVirtuemart = {}; 65 66 window.themeVirtuemart.addToCart = function (product) { 67 68 var buyButtons = $('.add_to_cart_button'); 69 if (product) { 70 buyButtons = product.find('.add_to_cart_button'); 71 } 72 buyButtons.filter(function() { 73 return '#' === $(this).attr('href'); 74 }).click(function (e) { 75 e.preventDefault(); 76 var link = $(this), 77 formClone = $(this).parent('.product').clone(), 78 vmsiteurl = link.attr('data-vmsiteurl'), 79 vmlang = link.attr('data-vmlang'), 80 success = link.attr('data-vmsuccessmsg'), 81 carts = $('div[data-cart-position]'), 82 cartCustomFields = $('.product-field[data-cart-attribute="1"] *[name]'), 83 cloneCartCustomFields = cartCustomFields.clone(), 84 cart, position, style, id, url, datas; 85 86 if (formClone.length) { 87 cartCustomFields.each(function(i) { 88 var element = this; 89 cloneCartCustomFields.eq(i).val($(element).val()); 90 }); 91 formClone.append(cloneCartCustomFields); 92 datas = formClone.serialize(); 93 url = vmsiteurl + 'index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json' + vmlang; 94 $.getJSON(url, datas, function(datas, textStatus) { 95 link.html(success); 96 if (carts.length > 0) { 97 carts.each(function () { 98 position = $(this).attr('data-cart-position') || ''; 99 style = $(this).attr('data-style') || ''; 100 id = $(this).attr('data-id') || ''; 101 currentTemplate = $(this).attr('data-template') || ''; 102 cart = $(this); 103 if ('' !== position) { 104 url = vmsiteurl + 'index.php'; 105 (function(url, style, cart ) { 106 $.ajax({ 107 url: url, 108 type : 'get', 109 data: { 110 tmpl : 'modrender', 111 template : currentTemplate, 112 modulename : 'mod_virtuemart_cart', 113 modulestyle : style, 114 moduleid : id, 115 is_preview : PREVIEW ? 'on' : 'off' 116 }, 117 dataType: 'html', 118 success: function (data) { 119 if (data) 120 cart.replaceWith(data); 121 }, 122 error: function (xhr, status) {} 123 }); 124 })(url, style, cart); 125 } 126 }); 127 } 128 }); 129 } 130 return false;
131 }); 132 } 133 134 window.themeVirtuemart.setProductTypeFacade = function(event) { 135 window.themeVirtuemart.setProductType(event.data.productItem); 136 } 137 138 window.themeVirtuemart.setProductType = function(product) { 139 'use strict'; 140 var prices = product.find('.product-prices'), 141 form = product.find('form.product'), 142 virtuemart_product_id = product.find('input[name="virtuemart_product_id[]"]'); 143 144 if (!prices.length) { 145 return false; 146 } 147 148 var formClone = form.clone(), 149 cartCustomFields = $('.product-field[data-cart-attribute="1"] *[name]', product), 150 cloneCartCustomFields = cartCustomFields.clone(); 151 152 cartCustomFields.each(function(i) { 153 var element = this; 154 cloneCartCustomFields.eq(i).val($(element).val()); 155 }); 156 formClone.append(cloneCartCustomFields); 157 var datas = formClone.serialize(); 158 datas = datas.replace("&view=cart", ""); 159 160 prices.fadeTo("fast", 0.75); 161 $.ajax({ 162 type: "POST", 163 cache: false, 164 dataType: "json", 165 url: window.vmSiteurl + "index.php?&option=com_virtuemart&view=productdetails&task=recalculate&format=json&nosef=1" + 166 window.vmLang + (virtuemart_product_id.length ? '&virtuemart_product_id=' + virtuemart_product_id.val() : ''), 167 data: datas 168 }).done( 169 function (data, textStatus) { 170 prices.fadeTo("fast", 1); 171 // refresh price 172 for (var key in data) { 173 var value = data[key]; 174 if (key !== 'messages' && value !== 0) { 175 prices.find("span."+key).show().html(value); 176 } 177 } 178 } 179 ); 180 181 return false; // prevent reload 182 }; 183 184 window.themeVirtuemart.product = function(items) { 185 'use strict'; 186 items.each(function() { 187 var productItem = $(this), 188 quantityForm = productItem.find('input[name="quantity[]"]'), 189 plus = productItem.find('.quantity-plus'), 190 minus = productItem.find('.quantity-minus'), 191 quantityInput = productItem.find('.quantity-input'), 192 form = productItem.find('form.product'); 193 194 productItem.children().eq(0).attr('data-updating-content', true); 195 196 var Ste = parseInt(quantityForm.val()); 197 if(isNaN(Ste)){ 198 Ste = 1; 199 } 200 201 plus.click(function(event) { 202 var Qtt = parseInt(quantityInput.val()); 203 if (!isNaN(Qtt)) { 204 quantityInput.val(Qtt + Ste); 205 quantityForm.val(Qtt + Ste); 206 window.themeVirtuemart.setProductType(productItem); 207 } 208 event.stopImmediatePropagation(); 209 210 }); 211 212 minus.click(function(event) { 213 var Qtt = parseInt(quantityInput.val()); 214 if (!isNaN(Qtt) && Qtt>Ste) { 215 quantityInput.val(Qtt - Ste); 216 quantityForm.val(Qtt - Ste); 217 } else { 218 quantityInput.val(Ste); 219 quantityForm.val(Ste); 220 } 221 window.themeVirtuemart.setProductType(productItem); 222 event.stopImmediatePropagation(); 223 }); 224 225 quantityInput.bind('click blur submit', function (e) { 226 var me = $(this); 227 e.preventDefault(); 228 if(me.is('input')) { 229 var remainder = this.value % me.attr("step"), 230 quantity = this.value; 231 232 if (remainder != 0) { 233 if(!isNaN(me.attr("step"))) alert(me.attr("data-errStr").replace("%s", me.attr("step"))); 234 if(quantity != remainder && quantity>remainder){ 235 this.value = quantity - remainder; 236 } else { 237 this.value = me.attr("step"); 238 } 239 quantityForm.val(this.value); 240 return false;
241 } 242 return true; 243 } 244 return true; 245 }); 246 247 quantityInput.keyup(function(event) { 248 quantityForm.val(parseInt(quantityInput.val())); 249 window.themeVirtuemart.setProductType(productItem); 250 event.stopImmediatePropagation(); 251 }); 252 253 form.each(function() { 254 var form = $(this), 255 select = form.find('select:not(.no-vm-bind)'), 256 selectOutForm = $('.product-field[data-cart-attribute="1"] select:not(.no-vm-bind)', productItem), 257 radio = form.find('input:radio:not(.no-vm-bind)'), 258 radioOutForm = $('.product-field[data-cart-attribute="1"] input:radio:not(.no-vm-bind)', productItem), 259 virtuemart_product_id = form.find('input[name="virtuemart_product_id[]"]').val(); 260 261 $(select).off('change', window.themeVirtuemart.setProductTypeFacade); 262 $(select).on('change', {productItem : productItem}, window.themeVirtuemart.setProductTypeFacade); 263 $(selectOutForm).off('change', window.themeVirtuemart.setProductTypeFacade); 264 $(selectOutForm).on('change', {productItem : productItem}, window.themeVirtuemart.setProductTypeFacade); 265 266 $(radio).off('change', window.themeVirtuemart.setProductTypeFacade); 267 $(radio).on('change', {productItem : productItem}, window.themeVirtuemart.setProductTypeFacade); 268 $(radioOutForm).off('change', window.themeVirtuemart.setProductTypeFacade); 269 $(radioOutForm).on('change', {productItem : productItem}, window.themeVirtuemart.setProductTypeFacade); 270 }); 271 272 }); 273 } 274})(jQuery); 275 276jQuery(function($) { 277 'use strict'; 278 window.themeVirtuemart.addToCart(); 279 var items = $('.vm-product-item'); 280 if (items.length) { 281 window.themeVirtuemart.product(items); 282 if (1 === items.length) { 283 setInterval(function() { 284 var item = items; 285 var attr = item.children().eq(0).attr('data-updating-content'); 286 if (typeof attr === 'undefined') { 287 window.themeVirtuemart.addToCart(item); 288 window.themeVirtuemart.product(item); 289 $(window).resize(); 290 } 291 }, 350); 292 } 293 } 294}); 295 296jQuery(function ($) { 297 'use strict'; 298 if (PREVIEW) { 299 var search = $('form[name*="search"]'); 300 search.submit(function() { 301 return false; 302 }); 303 304 $('#form-login').submit(function() { 305 return false; 306 }); 307 var logout = $('#form-login > input[type*="submit"]'); 308 logout.attr('link-disable', true); 309 310 $('#checkoutForm').submit(function() { 311 return false; 312 }); 313 var checkout = $('#checkoutFormSubmit'); 314 checkout.attr('link-disable', true); 315 316 var removeLinks = $('.removelink').filter(function () { 317 if((this.getAttribute('name') + '').indexOf('delete.') === 0) return true; 318 else return false; 319 }); 320 removeLinks.attr('link-disable', true); 321 322 var versions = $('.edit.item-page a[title=\'Versions\']'); 323 versions.attr('link-disable', true); 324 } 325}); 326 327jQuery(function ($) { 328 'use strict'; 329 var topHref = window.top.location.href, 330 frames = window.top.frames, 331 siteHref = '', 332 updateHref = function (uri, key, value) { 333 var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); 334 var separator = uri.indexOf('?') !== -1 ? "&" : "?"; 335 if (uri.match(re)) 336 return uri.replace(re, '$1' + key + "=" + value + '$2'); 337 return uri + separator + key + "=" + value; 338 }; 339 340 if (frames && frames.length && topHref.indexOf('editor=1') !== -1 && topHref.indexOf('_templates') !== -1) { 341 for(var i = 0; i < frames.length; i++) { 342 var frameLocation = frames[i].location; 343 try { 344 if (frameLocation.host && frameLocation.href.indexOf('editor=1') == -1 && frameLocation.href.indexOf('_templates') == -1) { 345 siteHref = frames[i].location.href; 346 break; 347 } 348 } catch(e) {} 349 } 350 if (siteHref && siteHref.indexOf('is_preview') == -1) { 351 siteHref = updateHref(siteHref, 'is_preview', 'on'); 352 var themeParts = topHref.match(/theme=([^&]+)/); 353 if (themeParts) 354 siteHref = updateHref(siteHref, 'template', themeParts[1]) 355 window.location.replace(siteHref); 356 } 357 } 358}); 359 360// Fixing conflict Mootools.fx slide with Bootstap Carousel
361if ('undefined' !== typeof jQuery && 'undefined' !== typeof MooTools) { 362 Element.implement({ 363 slide: function (how, mode) { 364 return this; 365 }, 366 hide: function () { 367 return this; 368 }, 369 show: function () { 370 return this; 371 } 372 }); 373} 374 375})(window._$, window._$); 376(function (jQuery, $) { 377(function ($) { 378 'use strict'; 379 380 window.initAffix = function initAffix(selector) { 381 $('.bd-affix-fake').prev(':not([data-fix-at-screen])').next().remove(); 382 383 $(selector).each(function () { 384 var element = $(this), 385 offset = {}, 386 cachedOffset = null; 387 388 element.off('.affix'); 389 element.removeAttr('style'); 390 element.removeClass($.fn.affix.Constructor.RESET); 391 element.removeData('bs.affix'); 392 393 offset.top = function () { 394 var hasAffix = element.hasClass('affix'); 395 396 if (cachedOffset === null && hasAffix) { 397 element.removeClass('affix'); 398 } 399 400 if (!hasAffix) { 401 var elTop = element.offset().top, 402 offset = parseInt(element.data('offset'), 10) || 0, 403 clipAtControl = element.data('clipAtControl'), 404 fixAtScreen = element.data('fixAtScreen'), 405 elHeight = element.outerHeight(); 406 407 var ev = $.Event('affix-calc.theme.affix'); 408 element.trigger(ev); 409 ev.offset = ev.offset || 0; 410 offset += ev.offset; 411 412 if (clipAtControl === 'bottom') { 413 elTop += elHeight; 414 } 415 416 if (fixAtScreen === 'bottom') { 417 elTop += offset; 418 elTop -= $(window).height(); 419 } 420 421 if (fixAtScreen === 'top') { 422 elTop -= offset; 423 } 424 425 cachedOffset = elTop; 426 } 427 428 if (cachedOffset === null && hasAffix) { 429 element.addClass('affix'); 430 } 431 432 return cachedOffset; 433 }; 434 435 element.on('affix.bs.affix', function (e) { 436 var el = $(this), 437 fake = el.next('.bd-affix-fake'); 438 439 if (!fake.is(':visible')) { 440 e.preventDefault(); 441 return; 442 } 443 444 if (['absolute', 'fixed'].indexOf(el.css('position')) === -1) { 445 fake.css('height', el.outerHeight(true)); 446 } 447 448 // fix affix position 449 var body = $('body'); 450 var bodyWidth = body.outerWidth() || 1; 451 var elWidth = el.outerWidth(); 452 var elLeft = el.offset().left; 453 el.css('width', (el.outerWidth() / bodyWidth * 100) + '%'); 454 el.css('left', (elLeft / bodyWidth * 100) + '%'); 455 el.css('right', ((bodyWidth - elLeft - elWidth) / bodyWidth * 100) + '%'); 456 457 var offset = parseInt(element.data('offset'), 10) || 0; 458 var ev = $.Event('affix-calc.theme.affix'); 459 el.trigger(ev); 460 ev.offset = ev.offset || 0; 461 offset += ev.offset; 462 463 if (element.data('fixAtScreen') === 'bottom') { 464 el.css('top', 'auto'); 465 el.css('bottom', offset + 'px'); 466 } else { 467 el.css('top', offset + 'px'); 468 el.css('bottom', 'auto'); 469 } 470 }); 471 472 element.on('affixed-top.bs.affix', function () { 473 $(this).next('.bd-affix-fake').removeAttr('style'); 474 $(this).removeAttr('style'); 475 }); 476 477 if (!element.next('.bd-affix-fake').length) { 478 element.after('<div class="bd-affix-fake bd-no-margins"></div>'); 479 } 480 481 $('body').trigger($.Event('affix-init.theme.affix'), [element]); 482 483 element.affix({ 484 'offset': offset 485 }); 486 487 element.affix('checkPosition'); 488 }); 489 }; 490 491 $(function ($) { 492 var affixTimeout; 493 494 $(window).on('resize', function (e, param) { 495 clearTimeout(affixTimeout); 496 if (param && param.force) { 497 window.initAffix('[data-affix]'); 498 } else { 499 affixTimeout = setTimeout(function () { 500 window.initAffix('[data-affix]'); 501 }, 100); 502 } 503 }); 504 505 window.initAffix('[data-affix]'); 506 }); 507})(jQuery); 508})(window._$, window._$); 509(function (jQuery, $) { 510(function($){ 511 'use strict'; 512 /*jshint -W004 */ 513 /** 514 * Copyright 2012, Digital Fusion 515 * Licensed under the MIT license. 516 * http://teamdf.com/jquery-plugins/license/ 517 * 518 * @author Sam Sehnert
519 * @desc A small plugin that checks whether elements are within 520 * the user visible viewport of a web browser. 521 * only accounts for vertical position, not horizontal. 522 */ 523 var $w = $(window); 524 $.fn.visible = function(partial,hidden,direction){ 525 526 if (this.length < 1) 527 return; 528 529 var $t = this.length > 1 ? this.eq(0) : this, 530 t = $t.get(0), 531 vpWidth = $w.width(), 532 vpHeight = $w.height(), 533 direction = (direction) ? direction : 'both', 534 clientSize = hidden === true ? t.offsetWidth * t.offsetHeight : true; 535 536 if (typeof t.getBoundingClientRect === 'function'){ 537 538 // Use this native browser method, if available. 539 var rec = t.getBoundingClientRect(), 540 tViz = rec.top >= 0 && rec.top < vpHeight, 541 bViz = rec.bottom > 0 && rec.bottom <= vpHeight, 542 lViz = rec.left >= 0 && rec.left < vpWidth, 543 rViz = rec.right > 0 && rec.right <= vpWidth, 544 vVisible = partial ? tViz || bViz : tViz && bViz, 545 hVisible = partial ? lViz || rViz : lViz && rViz; 546 547 if(direction === 'both') 548 return clientSize && vVisible && hVisible; 549 else if(direction === 'vertical') 550 return clientSize && vVisible; 551 else if(direction === 'horizontal') 552 return clientSize && hVisible; 553 } else { 554 555 var viewTop = $w.scrollTop(),
556 viewBottom = viewTop + vpHeight, 557 viewLeft = $w.scrollLeft(), 558 viewRight = viewLeft + vpWidth, 559 offset = $t.offset(), 560 _top = offset.top, 561 _bottom = _top + $t.height(), 562 _left = offset.left, 563 _right = _left + $t.width(), 564 compareTop = partial === true ? _bottom : _top, 565 compareBottom = partial === true ? _top : _bottom, 566 compareLeft = partial === true ? _right : _left, 567 compareRight = partial === true ? _left : _right; 568 569 if(direction === 'both') 570 return !!clientSize && ((compareBottom <= viewBottom) && (compareTop >= viewTop)) && ((compareRight <= viewRight) && (compareLeft >= viewLeft)); 571 else if(direction === 'vertical') 572 return !!clientSize && ((compareBottom <= viewBottom) && (compareTop >= viewTop)); 573 else if(direction === 'horizontal') 574 return !!clientSize && ((compareRight <= viewRight) && (compareLeft >= viewLeft)); 575 } 576 }; 577 //===================================================== 578 $(function() { 579 /** 580 * Fix for bootstrap v3.1.1 581 * Missing check for event target. 582 * Already fixed in newer versions 583 */ 584 if ($.support.transition && !$.event.special.bsTransitionEnd) { 585 $.event.special[$.support.transition.end] = { 586 handle: function (e) { 587 if ($(e.target).is(this)) { 588 return e.handleObj.handler.apply(this, arguments); 589 } 590 } 591 }; 592 } 593 }); 594 595 function getQueue(effect) { 596 if (effect.is('.animated[data-animation-event]') && !effect.data('animation-queue')) { 597 effect.data('animation-queue', new AsyncQueue(effect)); 598 } 599 return effect.data('animation-queue'); 600 } 601 function runAnimation(effect, eventName) { 602 var queue = getQueue(effect); 603 if (queue) { 604 queue.push(eventName); 605 } 606 } 607 function abortAnimation(effect) { 608 var queue = getQueue(effect); 609 if (queue) { 610 queue.abort(); 611 } 612 } 613 function visibilityImmediate(effect, value) { 614 effect.css('transition', value === 'hidden' ? 'none' : ''); 615 effect.css('visibility', value); 616 } 617 618 $(window).resize(function() { 619 // onloadinterval 620 $('.animated[data-animation-event*="onloadinterval"]').each(function() { 621 var effect = $(this); 622 runAnimation(effect, 'onloadinterval'); 623 }); 624 }); 625 $(function() { 626 // hover 627 $(document).on('mouseover', '.animated[data-animation-event*="hover"]', function() { 628 runAnimation($(this), 'hover'); 629 }); 630 // scroll 631 $('.animated[data-animation-event*="scroll"]').each(function() { 632 var effect = $(this); 633 if(!getMetaData(effect, 'scroll')) { 634 return; 635 } 636 if (needToHide(effect, 'scroll')) {//ÑкÑÑваÑÑ, даже еÑли изнаÑалÑно он в поле зÑÐµÐ½Ð¸Ñ 637 visibilityImmediate(effect, 'hidden'); 638 } 639 }); 640 $(document).on('scroll', function() { 641 $('.animated[data-animation-event*="scroll"]').each(function () { 642 var effect = $(this); 643 if(!getMetaData(effect, 'scroll')) { 644 return; 645 } 646 if(effect.visible(true)) { 647 runAnimation(effect, 'scroll'); 648 } 649 }); 650 }); 651 // scrollloop 652 $(document).on('scroll', function() { 653 $('.animated[data-animation-event*="scrollloop"]').each(function () { 654 var effect = $(this); 655 if(effect.visible(true)) { 656 if(!effect.data('scrollloop-animation-played')) { 657 effect.data('scrollloop-animation-played', true); 658 runAnimation(effect, 'scrollloop'); 659 } 660 } else { 661 effect.removeData('scrollloop-animation-played'); 662 } 663 }); 664 }); 665 // onload 666 $('.animated[data-animation-event*="onload"]').each(function() { 667 var effect = $(this); 668 if(!getMetaData(effect, 'onload')) { 669 return; 670 } 671 runAnimation(effect, 'onload'); 672 }); 673 // onloadinterval 674 $('.animated[data-animation-event*="onloadinterval"]').each(function() { 675 var effect = $(this); 676 runAnimation(effect, 'onloadinterval'); 677 }); 678 // slidein 679 var slideinEffects = $('.animated[data-animation-event*="slidein"]'); 680 slideinEffects.each(function() { 681 var effect = $(this); 682 if (needToHide(effect, 'slidein')) { 683 visibilityImmediate(effect, 'hidden'); 684 } 685 }); 686 var carouselsSlidein = slideinEffects.parents('.carousel'); 687 $(document).on('slid.bs.carousel', '.carousel', function() { 688 $(this) 689 .find('.item.active') 690 .find('.animated[data-animation-event*="slidein"]') 691 .each(function() { 692 runAnimation($(this), 'slidein'); 693 }); 694 $(this) 695 .find('.item:not(.active)') 696 .find('.animated[data-animation-event*="slideout"]').each(function() { 697 var effect = $(this); 698 visibilityImmediate(effect, ''); 699 }); 700 $(this) 701 .find('.item:not(.active)') 702 .find('.animated[data-animation-event*="slidein"]') 703 .each(function() { 704 var effect = $(this); 705 if (needToHide(effect, 'slidein')) { 706 visibilityImmediate(effect, 'hidden'); 707 } 708 }); 709 }); 710 carouselsSlidein.trigger('slid.bs.carousel'); 711 // slideout 712 var moveSlide = false;
713 $(document).on('slide.bs.carousel', '.carousel', function(event) { 714 var effects = $(this) 715 .find('.item.active .animated[data-animation-event*="slideout"]'); 716 if (effects.length && !moveSlide) { 717 event.isDefaultPrevented = function () { 718 return true; 719 }; 720 effects.each(function() { 721 var effect = $(this); 722 if (!effect.data('slideout-played')) { 723 effect.data('slideout-played', true); 724 abortAnimation(effect); 725 runAnimation(effect, 'slideout'); 726 } 727 setTimeout(function () { 728 if (needToHide(effect, 'slideout')) { 729 visibilityImmediate(effect, 'hidden'); 730 } 731 }.bind(effect), getAnimationTime(effect, 'slideout')); 732 }); 733 var eventDirection = event.direction === 'left' ? 'next' : 'prev'; 734 var maxDuration = getMaxDuration(effects, 'slideout'); 735 setTimeout(function () { 736 effects.each(function() { 737 var effect = $(this); 738 if (needToHide(effect, 'slideout')) { 739 visibilityImmediate(effect, 'hidden'); 740 } 741 if (effect.data('slideout-played')) { 742 effect.data('slideout-played', false); 743 } 744 }); 745 moveSlide = true; 746 $(this) 747 .find('.item.active .animated[data-animation-event*="slidein"]') 748 .each(function() { 749 abortAnimation($(this)); 750 }); 751 $(this).carousel(eventDirection); 752 }.bind(this), maxDuration); 753 } else { 754 moveSlide = false; 755 } 756 }); 757 758 }); 759 760 function AsyncQueue(dom) { 761 this.dom = dom; 762 this.queue = []; 763 this.current = null; 764 this.push = function(animation) { 765 if(this.queue.indexOf(animation) === -1 && (!this.current || this.current.type !== animation)) { 766 this.queue.push(animation); 767 } 768 this.tryStart(); 769 }; 770 this.tryStart = function() { 771 if(!this.current && this.queue.length) { 772 this.current = new animationEvents[this.queue.shift()](this.dom); 773 this.current.start(function() { 774 this.current = null; 775 this.tryStart(); 776 }.bind(this)); 777 } 778 }; 779 this.abort = function() { 780 if(this.queue.indexOf('onloadinterval') !== -1) { 781 setTimeout(function() { 782 this.push('onloadinterval'); 783 }.bind(this), 100); 784 } 785 this.queue = []; 786 if(this.current) { 787 this.current.abort(); 788 } 789 }; 790 } 791 var animationEvents = { 792 hover: AnimationHover, 793 scroll: AnimationScroll, 794 scrollloop: AnimationScrollLoop, 795 onload: AnimationOnload, 796 onloadinterval: AnimationOnloadInterval, 797 slidein: AnimationSlidein, 798 slideout: AnimationSlideout 799 }; 800 801 //======================================== 802 function BaseAnimation() {} 803 BaseAnimation.prototype.start = function(nextAnimation) { 804 visibilityImmediate(this.dom, ''); 805 this.nextAnimation = nextAnimation; 806 startAnimation(this.dom, this.type); 807 this.timer = waitEnd(this.dom, this.type, function() { 808 stopAnimation(this.dom, this.type); 809 this.nextAnimation(); 810 }.bind(this)); 811 }; 812 BaseAnimation.prototype.abort = function() { 813 clearTimeout(this.timer); 814 stopAnimation(this.dom, this.type); 815 this.nextAnimation(); 816 }; 817 //============================ 818 function AnimationHover(dom) { 819 this.dom = dom; 820 this.type = 'hover'; 821 } 822 AnimationHover.prototype = Object.create(BaseAnimation.prototype); 823 //============================ 824 function AnimationScroll(dom) { 825 this.dom = dom; 826 this.type = 'scroll'; 827 } 828 AnimationScroll.prototype = Object.create(BaseAnimation.prototype); 829 AnimationScroll.prototype.start = function(nextAnimation) { 830 if(this.dom.data('scroll-animation-done')) { 831 nextAnimation(); 832 return; 833 } 834 BaseAnimation.prototype.start.call(this, function() { 835 this.dom.data('scroll-animation-done', true); 836 nextAnimation(); 837 }.bind(this)); 838 }; 839 //============================ 840 function AnimationScrollLoop(dom) { 841 this.dom = dom; 842 this.type = 'scrollloop'; 843 } 844 AnimationScrollLoop.prototype = Object.create(BaseAnimation.prototype); 845 //============================ 846 function AnimationOnload(dom) { 847 this.dom = dom; 848 this.type = 'onload'; 849 } 850 AnimationOnload.prototype = Object.create(BaseAnimation.prototype); 851 //============================ 852 function AnimationOnloadInterval(dom) { 853 this.dom = dom; 854 this.type = 'onloadinterval'; 855 } 856 AnimationOnloadInterval.prototype = Object.create(BaseAnimation.prototype); 857 AnimationOnloadInterval.prototype.start = function(nextAnimation) { 858 BaseAnimation.prototype.start.call(this, function() { 859 setTimeout(function() { 860 runAnimation(this.dom, 'onloadinterval'); 861 }.bind(this), 50); 862 nextAnimation(); 863 }.bind(this)); 864 }; 865 //============================ 866 function AnimationSlidein(dom) { 867 this.dom = dom; 868 this.type = 'slidein'; 869 } 870 AnimationSlidein.prototype = Object.create(BaseAnimation.prototype); 871 //============================ 872 function AnimationSlideout(dom) { 873 this.dom = dom; 874 this.type = 'slideout'; 875 } 876 AnimationSlideout.prototype = Object.create(BaseAnimation.prototype); 877 878 //======================================== 879 function startAnimation(dom, eventName) { 880 var data = getMetaData(dom, eventName); 881 if(data) { 882 dom.addClass(data.name); 883 } 884 } 885 886 function stopAnimation(dom, eventName) { 887 var data = getMetaData(dom, eventName); 888 if(data) { 889 dom.removeClass(data.name); 890 } 891 } 892 893 function waitEnd(dom, eventName, cb) { 894 var data = getMetaData(dom, eventName); 895 if(!data) { 896 cb(); 897 return; 898 } 899 var duration = isNaN(parseFloat(data.duration)) ? 1000 : parseFloat(data.duration);
900 var delay = isNaN(parseFloat(data.delay)) ? 0 : parseFloat(data.delay); 901 if(data.infinited === 'true') { 902 return; 903 } 904 return setTimeout(function() { 905 cb(); 906 }, delay + duration); 907 } 908 909 //===================================================== 910 911 912 913 function getMetaData(dom, eventName) { 914 var result; 915 dom = $(dom); 916 var tmp = { 917 name: dom.data('animation-name'), 918 event: dom.data('animation-event'), 919 duration: dom.data('animation-duration'), 920 delay: dom.data('animation-delay'), 921 infinited: dom.data('animation-infinited'), 922 display: dom.data('animation-display') 923 }; 924 for(var i in tmp) {/*jshint -W089*/ 925 tmp[i] = String(tmp[i]).split(','); 926 } 927 for(var i = 0; i < tmp.name.length; i++) { 928 if(eventName === tmp.event[i]) { 929 result = { 930 name: tmp.name[i], 931 event: tmp.event[i], 932 duration: tmp.duration[i], 933 delay: tmp.delay[i], 934 infinited: tmp.infinited[i], 935 display: tmp.display[i] 936 }; 937 if(eventName === 'slideout') { 938 result.infinited = 'false'; 939 } 940 return result; 941 } 942 } 943 } 944 945 function needToHide(effect, eventName) { 946 var data = getMetaData(effect, eventName); 947 var visibleAnimations = ['bounce', 'flash', 'pulse', 'rubber', 'band','snake','swing','tada','wobble', 'slideindown' , 'slideinleft' , 'slideinright', 'slideinup', 948 'slideoutdown', 'slideoutleft', 'slideoutright', 'slideoutup']; 949 return visibleAnimations.indexOf(data.name.toLowerCase()) === -1; 950 } 951 952 function getMaxDuration(effects, eventName) { 953 var maxDuration = 0; 954 effects.each(function () { 955 var animationTime = getAnimationTime($(this), eventName); 956 maxDuration = maxDuration < animationTime ? animationTime : maxDuration; 957 }); 958 return maxDuration; 959 } 960 961 function getAnimationTime(effect, eventName) { 962 var data = getMetaData(effect, eventName); 963 if(!data) { 964 return 0; 965 } 966 var duration = isNaN(parseFloat(data.duration)) ? 0 : parseFloat(data.duration), 967 delay = isNaN(parseFloat(data.delay)) ? 0 : parseFloat(data.delay); 968 return duration + delay; 969 } 970 971})(jQuery); 972})(window._$, window._$); 973(function (jQuery, $) { 974(function SeparatedGrid($) { 975 'use strict'; 976 var row = [], 977 getOffset = function getOffset(el) { 978 var isInline = false; 979 el.css('position', 'relative'); 980 if (el.css('display') === 'inline') { 981 el.css('display', 'inline-block'); 982 isInline = true; 983 } 984 var offset = el.position().top; 985 if (isInline) { 986 el.css('display', 'inline'); 987 } 988 return offset; 989 }, 990 getCollapsedMargin = function getCollapsedMargin(el) { 991 if (el.css('display') === 'block') { 992 var m0 = parseFloat(el.css('margin-top')); 993 if (m0 > 0) { 994 var p = el.prev(); 995 var prop = 'margin-bottom'; 996 if (p.length < 1) { 997 p = el.parent(); 998 prop = 'margin-top'; 999 } 1000 if (p.length > 0 && p.css('display') === 'block') { 1001 var m = parseFloat(p.css(prop)); 1002 if (m > 0) { 1003 return Math.min(m0, m); 1004 } 1005 } 1006 } 1007 } 1008 return 0; 1009 }, 1010 classRE1 = new RegExp('^bd-.*-\\d+$'), 1011 classRE2 = new RegExp('^bd-.*$'), 1012 getClass = function getClass(el) { 1013 var i; 1014 for (i = 0; i < el.classList.length; i++) { 1015 if (classRE1.test(el.classList[i])) { 1016 return el.classList[i]; 1017 } 1018 } 1019 for (i = 0; i < el.classList.length; i++) { 1020 if (classRE2.test(el.classList[i])) { 1021 return el.classList[i]; 1022 } 1023 } 1024 }, 1025 childFilter = function childFilter() { 1026 return !!getClass(this); 1027 }, 1028 getDeeper = function (roots) { 1029 while (roots.length && roots.length === roots.children().length) { 1030 roots = roots.children(); 1031 } 1032 return roots; 1033 }, 1034 calcOrder = function calcOrder(items) { 1035 var roots = getDeeper(items); 1036 var childrenClasses = []; 1037 var childrenWeights = {}; 1038 var getNextWeight = function getNextWeight(children, i, l) { 1039 for (var j = i + 1; j < l; j++) { 1040 var cls = getClass(children[j]); 1041 if (childrenClasses.indexOf(cls) !== -1) { 1042 return childrenWeights[cls]; 1043 } 1044 } 1045 return 100; //% 1046 }; 1047 roots.each(function calcWeight(i, root) { 1048 var children = $(root).children().filter(childFilter); 1049 var previousWeight = 0; 1050 for (var c = 0, l = children.length; c < l; c++) { 1051 var cls = getClass(children[c]); 1052 if (!cls || cls.length < 1) { 1053 continue; 1054 } 1055 if (childrenClasses.indexOf(cls) === -1) { 1056 var nextWeight = getNextWeight(children, c, l); 1057 childrenWeights[cls] = previousWeight + (nextWeight - previousWeight) / 10; //~max unique child 1058 childrenClasses.push(cls); 1059 } 1060 previousWeight = childrenWeights[cls]; 1061 } 1062 }); 1063 childrenClasses.sort(function sortWeight(a, b) { 1064 return childrenWeights[a] > childrenWeights[b]; 1065 }); 1066 return childrenClasses; 1067 }; 1068 var calcRow = function calcRow(helpNodes, last, order) { 1069 1070 $(row).css({'overflow': 'visible', 'height': 'auto'}).toggleClass('last-row', last); 1071 1072 if (row.length > 0) { 1073 var roots = $(row); 1074 roots.removeClass('last-col').last().addClass('last-col'); 1075 roots = getDeeper(roots); 1076 1077 var createHelpNode = function createHelpNode(fix) { 1078 var helpNode = document.createElement('div');
1079 helpNode.setAttribute('style', 'height:' + fix + 'px'); 1080 helpNode.className = 'bd-empty-grid-item'; 1081 helpNodes.push(helpNode); 1082 return helpNode; 1083 }; 1084 var cls = ''; 1085 var maxOffset = 0; 1086 var calcMaxOffsets = function calcMaxOffsets(i, root) { 1087 var el = $(root).children('.' + cls + ':visible:first'); 1088 if (el.length < 1 || el.css('position') === 'absolute') { 1089 return; 1090 } 1091 var offset = getOffset(el); 1092 if (offset > maxOffset) { 1093 maxOffset = offset; 1094 } 1095 }; 1096 var setMaxOffsets = function setMaxOffsets(i, root) { 1097 var el = $(root).children('.' + cls + ':visible:first'); 1098 if (el.length < 1 || el.css('position') === 'absolute') { 1099 return; 1100 } 1101 var offset = getOffset(el); 1102 var fix = maxOffset - offset - getCollapsedMargin(el); 1103 if (fix > 0) { 1104 el.before(createHelpNode(fix)); 1105 } 1106 }; 1107 for (var c = 0; c < order.length; c++) { 1108 maxOffset = 0; 1109 cls = order[c]; 1110 roots.each(calcMaxOffsets); 1111 maxOffset = Math.ceil(maxOffset); 1112 roots.each(setMaxOffsets); 1113 } 1114 var hMax = 0; 1115 $.each(roots, function calcMaxHeight(i, e) { 1116 var h = $(e).outerHeight(); 1117 if (hMax < h) { 1118 hMax = h; 1119 } 1120 }); 1121 hMax = Math.ceil(hMax); 1122 $.each(roots, function setMaxHeight(i, e) { 1123 var el = $(e); 1124 var fix = hMax - el.outerHeight(); 1125 if (fix > 0) { 1126 el.append(createHelpNode(fix)); 1127 } 1128 }); 1129 1130 $(row).css('min-height', (hMax + 1) + 'px'); 1131 } 1132 row = []; 1133 }; 1134 var itemsRE = new RegExp('.*(separated-item[^\\s]+).*'), 1135 resize = function resize(force) { 1136 var grid = $('.separated-grid'); 1137 grid.each(function eachGrid(i, gridElement) { 1138 var g = $(gridElement); 1139 if (!g.is(':visible')) { 1140 return; 1141 } 1142 if (!gridElement._item || !gridElement._item.length || !gridElement._item.is(':visible')) { 1143 gridElement._item = g.find('div[class*=separated-item]:visible:first'); 1144 if (!gridElement._item.length) { 1145 return; 1146 } 1147 gridElement._items = g.find( 1148 'div.' + gridElement._item.attr('class').replace(itemsRE, '$1') 1149 ).filter(function () { 1150 return $(this).parents('.separated-grid')[0] === gridElement; 1151 }); 1152 } 1153 var items = gridElement._items; 1154 if (!items.length) { 1155 return; 1156 } 1157 var h = 0; 1158 for (var k = 0; k < items.length; k++) { 1159 var el = $(items[k]); 1160 var _h = el.height(); 1161 if (el.is('.first-col')) { 1162 h = _h; 1163 } 1164 if (h !== _h) { 1165 gridElement._height = 0; 1166 } 1167 } 1168 1169 // height of inner elements may change (because of height in vh) 1170 // in this case 'force' argument used 1171 if (!force && g.innerHeight() === gridElement._height && g.innerWidth() === gridElement._width) { 1172 return; 1173 } 1174 1175 var windowScrollTop = $(window).scrollTop(); 1176 items.css({'overflow': 'hidden', 'height': '10px', 'min-height': ''}).removeClass('last-row'); 1177 if (gridElement._helpNodes) { 1178 $(gridElement._helpNodes).remove(); 1179 } 1180 gridElement._helpNodes = []; 1181 var firstLeft = items.position().left; 1182 var order = calcOrder(items); 1183 var notDisplayed = []; 1184 var lastItem = null; 1185 items.each(function eachItems(i, gridItem) { 1186 var item = $(gridItem); 1187 var p = item; 1188 do { 1189 if (p.css('display') === 'none') { 1190 p.data('style', p.attr('style')).css('display', 'block'); 1191 notDisplayed.push(p[0]); 1192 } 1193 p = p.parent(); 1194 1195 } while (p.length > 0 && p[0] !== gridElement && !item.is(':visible')); 1196 var first = firstLeft >= item.position().left; 1197 if (first && row.length > 0) { 1198 calcRow(gridElement._helpNodes, lastItem && lastItem.parentNode !== gridItem.parentNode, order); 1199 } 1200 row.push(gridItem); 1201 item.toggleClass('first-col', first); 1202 if (i === items.length - 1) { 1203 calcRow(gridElement._helpNodes, true, order); 1204 } 1205 lastItem = gridItem; 1206 }); 1207 $(notDisplayed).each(function eachHidden(i, e) { 1208 var el = $(e); 1209 var css = el.data('style'); 1210 el.removeData('style'); 1211 if ('undefined' !== typeof css) { 1212 el.attr('style', css); 1213 } else { 1214 el.removeAttr('style'); 1215 } 1216 }); 1217 gridElement._width = g.innerWidth();
1218 gridElement._height = g.innerHeight(); 1219 $(window).scrollTop(windowScrollTop); 1220 $(window).off('resize', lazy); 1221 $(window).resize(); 1222 $(window).on('resize', lazy); 1223 }); 1224 }, 1225 timeoutLazy, 1226 lazy = function lazy(e, param) { 1227 clearTimeout(timeoutLazy); 1228 if (param && param.force) { 1229 resize(); 1230 } else { 1231 timeoutLazy = setTimeout(resize, 100, e && e.type === 'resize'); 1232 } 1233 }, 1234 interval = function interval() { 1235 lazy(); 1236 setTimeout(interval, 1000); 1237 }; 1238 $(window).resize(lazy); 1239 $(interval); 1240 $(document).bind('force-grids-update', resize); 1241 $(document).bind('force-grid-update', function (event, grid) { 1242 if (grid && grid.length) { 1243 grid.each(function (i, gridElement) { 1244 delete gridElement._height; 1245 delete gridElement._width; 1246 delete gridElement._helpNodes; 1247 }); 1248 grid.find('.bd-empty-grid-item').remove(); 1249 resize(); 1250 } 1251 }); 1252})(jQuery); 1253})(window._$, window._$); 1254(function (jQuery, $) { 1255(function ($) { 1256 'use strict'; 1257 $(onLoad); 1258 1259 var timeout; 1260 $(window).on('resize', function (event, param) { 1261 clearTimeout(timeout); 1262 if (param && param.force) { 1263 applyImageScalling(); 1264 } else { 1265 timeout = setTimeout(function () { 1266 applyImageScalling(); 1267 }, 100); 1268 } 1269 }); 1270 1271 function onLoad() { 1272 $(".bd-imagescaling").each(function () { 1273 var c = $(this); 1274 if (c.length) { 1275 var img = c.is('img') ? c : c.find('img'); 1276 scaling(img); 1277 img.on('load', function () { 1278 scaling(img); 1279 }); 1280 } 1281 }); 1282 } 1283 1284 function applyImageScalling() { 1285 $(".bd-imagescaling").each(function () { 1286 var c = $(this); 1287 if (c.length) { 1288 var img = c.is('img') ? c : c.find('img'); 1289 scaling(img); 1290 } 1291 }); 1292 } 1293 1294 function scaling(img) { 1295 var imgSrc = img.attr('src') || '', 1296 imgClass = img.attr('class') || ''; 1297 1298 var imgWrapper = img.parent('.bd-imagescaling-img'); 1299 1300 if (!imgWrapper.length || imgClass) { 1301 if (img.parent().is('.bd-imagescaling-img')) { 1302 img.unwrap(); 1303 } 1304 imgWrapper = img.wrap('<div class="' + imgClass + ' bd-imagescaling-img"></div>').parent(); 1305 img.removeAttr('class'); 1306 } 1307 1308 if (imgSrc.indexOf('.') === 0) { 1309 imgSrc = combineUrl(window.location.href, imgSrc); 1310 } 1311 1312 if (imgWrapper.siblings('.bd-parallax-image-wrapper').length === 0) { 1313 imgWrapper.css('background-image', 'url(' + imgSrc + ')'); 1314 } 1315 } 1316 1317 function combineUrl(base, relative) { 1318 if (!relative){ 1319 return base; 1320 } 1321 var stack = base.split("/"), 1322 parts = relative.split("/"); 1323 stack.pop(); 1324 1325 for (var i = 0; i < parts.length; i++) { 1326 if (parts[i] === ".") 1327 continue; 1328 if (parts[i] === "..") 1329 stack.pop(); 1330 else 1331 stack.push(parts[i]); 1332 } 1333 return stack.join("/"); 1334 } 1335})(jQuery); 1336 1337})(window._$, window._$); 1338(function (jQuery, $) { 1339 1340window.ThemeLightbox = (function ($) { 1341 'use strict'; 1342 return (function ThemeLightbox(selectors) { 1343 var selector = selectors; 1344 var images = $(selector); 1345 var current; 1346 var close = function () { 1347 $(".bd-lightbox").remove(); 1348 }; 1349 this.init = function () { 1350 1351 $(selector).mouseup(function (e) { 1352 if (e.which && e.which !== 1) { 1353 return; 1354 } 1355 current = images.index(this); 1356 var imgContainer = $('.bd-lightbox'); 1357 if (imgContainer.length === 0) {
1358 imgContainer = $('<div class="bd-lightbox">').css('line-height', $(window).height() + "px") 1359 .appendTo($("body")); 1360 var closeBtn = $('<div class="close"><div class="cw"> </div><div class="ccw"> </div><div class="close-alt">✗</div></div>'); 1361 closeBtn.appendTo(imgContainer); 1362 closeBtn.click(close); 1363 showArrows(); 1364 var scrollDelay = 100; 1365 var lastScroll = 0; 1366 imgContainer.bind('mousewheel DOMMouseScroll', function (e) { 1367 var date = new Date(); 1368 if (date.getTime() > lastScroll + scrollDelay) { 1369 lastScroll = date.getTime(); 1370 var orgEvent = window.event || e.originalEvent; 1371 var delta = (orgEvent.wheelDelta ? orgEvent.wheelDelta : orgEvent.detail * -1) > 0 ? 1 : -1; 1372 move(current + delta); 1373 } 1374 e.preventDefault(); 1375 }).mousedown(function (e) { 1376 // close on middle button click 1377 if (e.which === 2) { 1378 close(); 1379 } 1380 e.preventDefault(); 1381 }); 1382 } 1383 move(current); 1384 }); 1385 }; 1386 1387 function move(index) { 1388 1389 if (index < 0 || index >= images.length) { 1390 return; 1391 } 1392 1393 showError(false); 1394 1395 current = index; 1396 1397 $(".bd-lightbox .lightbox-image:not(.active)").remove(); 1398 1399 var active = $(".bd-lightbox .active"); 1400 var target = $('<img class="lightbox-image" alt="" src="' + getFullImgSrc($(images[current])) + '" />').click(function () { 1401 if ($(this).hasClass("active")) { 1402 move(current + 1); 1403 } 1404 }); 1405 1406 if (active.length > 0) { 1407 active.after(target); 1408 } else { 1409 $(".bd-lightbox").append(target); 1410 } 1411 1412 showArrows(); 1413 showLoader(true); 1414 1415 $(".bd-lightbox").add(target); 1416 1417 target.load(function () { 1418 showLoader(false); 1419 active.removeClass("active"); 1420 target.addClass("active"); 1421 }); 1422 1423 target.error(function () { 1424 showLoader(false); 1425 active.removeClass("active"); 1426 target.addClass("active"); 1427 target.attr("src", $(images[current]).attr("src")); 1428 target.unbind('error'); 1429 }); 1430 } 1431 1432 function showArrows() { 1433 if ($(".bd-lightbox .arrow").length === 0) { 1434 var topOffset = $(window).height() / 2 - 40; 1435 $(".bd-lightbox") 1436 .append( 1437 $('<div class="arrow left"><div class="arrow-t ccw"> </div><div class="arrow-b cw"> </div><div class="arrow-left-alt">←</div></div>') 1438 .css("top", topOffset) 1439 .click(function () { 1440 move(current - 1); 1441 }) 1442 ) 1443 .append( 1444 $('<div class="arrow right"><div class="arrow-t cw"> </div><div class="arrow-b ccw"> </div><div class="arrow-right-alt">→</div></div>') 1445 .css("top", topOffset) 1446 .click(function () { 1447 move(current + 1); 1448 }) 1449 ); 1450 } 1451 1452 if (current === 0) { 1453 $(".bd-lightbox .arrow.left").addClass("disabled"); 1454 } else { 1455 $(".bd-lightbox .arrow.left").removeClass("disabled"); 1456 } 1457 1458 if (current === images.length - 1) { 1459 $(".bd-lightbox .arrow.right").addClass("disabled"); 1460 } else { 1461 $(".bd-lightbox .arrow.right").removeClass("disabled"); 1462 } 1463 } 1464 1465 function showError(enable) { 1466 if (enable) { 1467 $(".bd-lightbox").append($('<div class="lightbox-error">The requested content cannot be loaded.<br/>Please try again later.</div>') 1468 .css({ "top": $(window).height() / 2 - 60, "left": $(window).width() / 2 - 170 })); 1469 } else { 1470 $(".bd-lightbox .lightbox-error").remove(); 1471 } 1472 } 1473 1474 function showLoader(enable) { 1475 if (!enable) { 1476 $(".bd-lightbox .loading").remove(); 1477 } else { 1478 $('<div class="loading"> </div>').css({ "top": $(window).height() / 2 - 16, "left": $(window).width() / 2 - 16 }).appendTo($(".bd-lightbox")); 1479 } 1480 } 1481 1482 function getFullImgSrc(image) { 1483 var largeImage = ''; 1484 var parentLink = image.parent('a'); 1485 if (parentLink.length) { 1486 parentLink.click(function (e) { 1487 e.preventDefault(); 1488 }); 1489 largeImage = parentLink.attr('href'); 1490 } else { 1491 var src = image.attr("src"); 1492 var fileName = src.substring(0, src.lastIndexOf('.')); 1493 var ext = src.substring(src.lastIndexOf('.')); 1494 largeImage = fileName + "-large" + ext; 1495 } 1496 return largeImage; 1497 } 1498 }); 1499})(jQuery); 1500 1501 1502jQuery(function () { 1503 'use strict'; 1504 new window.ThemeLightbox('.bd-lightbox, .lightbox').init(); 1505}); 1506})(window._$, window._$); 1507(function (jQuery, $) { 1508jQuery(function ($) { 1509 'use strict'; 1510 1511 $('.collapse-button').each(function () { 1512 var button = $(this); 1513 var collapse = button.siblings('.collapse'); 1514 1515 collapse.on('show.bs.collapse', function () { 1516 if (button.parent().css('position') === 'absolute') { 1517 var right = collapse.width() - button.width(); 1518 if (button.hasClass('bd-collapse-right')) { 1519 $(this).css({ 1520 'position': 'relative', 1521 'right': right 1522 }); 1523 } else { 1524 $(this).css({ 1525 'position': '', 1526 'right': '' 1527 }); 1528 } 1529 } 1530 }); 1531 }); 1532 1533 function parseTiming(str) { 1534 var ms = parseInt(str); 1535 if (str.indexOf('ms') === -1 && str.indexOf('s') !== -1) { 1536 ms *= 1000; 1537 } 1538 return ms; 1539 } 1540 1541 var emulateTransitionEnd = $.fn.emulateTransitionEnd; 1542 var dummyTransitionEnd = function (ms) { 1543 return function () { 1544 return emulateTransitionEnd.call(this, ms); 1545 }; 1546 }; 1547 1548 var $body = $('body'), 1549 $html = $('html'); 1550 1551 $body.on('click', '.bd-menu-overlay, .bd-menu-close-icon', function (e) { 1552 var menu = $(e.target).closest('nav'); 1553 if (menu.length) { 1554 menu.find('.navbar-collapse').collapse('hide'); 1555 } 1556 }); 1557 1558 $(document).keyup(function (e) { 1559 if (e.keyCode === 27) { // esc 1560 $('nav .navbar-collapse.collapse.in').collapse('hide'); 1561 } 1562 }); 1563 1564 var prevWidth = window.innerWidth, 1565 prevHeight = window.innerHeight; 1566 $(window).on('resize', function () { 1567 if (prevWidth === window.innerWidth && prevHeight === window.innerHeight) { 1568 return; 1569 } 1570 // close all offcanvas menus 1571 $('nav .navbar-collapse.collapse.width.in').collapse('hide'); 1572 prevWidth = window.innerWidth; 1573 prevHeight = window.innerHeight; 1574 }); 1575 1576 function disableScroll() { 1577 var overflow = $html[0].clientHeight < $html[0].scrollHeight; 1578 $body.css('top', '-' + window.scrollY + 'px'); 1579 if (overflow) { 1580 $html.css('overflow-y', 'scroll'); 1581 } 1582 $html.css('position', 'fixed').css('width', '100%'); 1583 } 1584 1585 function enableScroll() { 1586 if ($html.css('position') !== 'fixed') { // already enabled 1587 return; 1588 } 1589 $html.css('position', '').css('overflow-y', '').css('width', ''); 1590 var scrollY = -parseInt($body.css('top')); 1591 $body.css('top', ''); 1592 window.scrollTo(window.scrollX, scrollY); 1593 } 1594
1595 $body.on('show.bs.collapse', '.navbar-collapse.width', function (event) { 1596 var menu = $(event.target).closest('nav'), 1597 overlay = menu.find('.bd-menu-overlay'); 1598 1599 var offcanvasShift = menu.data('responsiveType') === 'offcanvas-shifted'; 1600 if (offcanvasShift) { 1601 $body 1602 .css('transition', ['left', menu.data('offcanvasDuration'), menu.data('offcanvasTimingFunction'), menu.data('offcanvasDelay')].join(' ')) 1603 .css('left', '0'); 1604 } 1605 1606 disableScroll(); 1607 overlay.addClass('show'); 1608 1609 $.fn.emulateTransitionEnd = dummyTransitionEnd(parseTiming(menu.data('offcanvasDuration')) + parseTiming(menu.data('offcanvasDelay'))); 1610 requestAnimationFrame(function () { 1611 var width = menu.find('.navbar-collapse')[0].style.width; 1612 1613 overlay 1614 .css('opacity', 1) 1615 .css('margin-left', width); 1616 1617 if (offcanvasShift) { 1618 $body.css('left', width); 1619 } 1620 $.fn.emulateTransitionEnd = emulateTransitionEnd; 1621 }); 1622 }); 1623 1624 $body.on('shown.bs.collapse', '.navbar-collapse.width', function (event) { 1625 $(event.target).css('width', ''); 1626 }); 1627 1628 $body.on('hide.bs.collapse', '.navbar-collapse.width', function (event) { 1629 var menu = $(event.target).closest('nav'), 1630 overlay = menu.find('.bd-menu-overlay'); 1631 var offcanvasShift = menu.data('responsiveType') === 'offcanvas-shifted'; 1632 overlay 1633 .css('opacity', '') 1634 .css('margin-left', ''); 1635 1636 if (offcanvasShift) { 1637 $body.css('left', '0'); 1638 } 1639 1640 $.fn.emulateTransitionEnd = dummyTransitionEnd(parseTiming(menu.data('offcanvasDuration')) + parseTiming(menu.data('offcanvasDelay'))); 1641 }); 1642 1643 $body.on('hidden.bs.collapse', '.navbar-collapse.width', function (event) { 1644 var collapse = $(event.target), 1645 overlay = collapse.siblings('.bd-menu-overlay'); 1646 $.fn.emulateTransitionEnd = emulateTransitionEnd; 1647 $body.css('transition', ''); 1648 enableScroll(); 1649 1650 overlay.removeClass('show'); 1651 collapse.css('width', ''); 1652 }); 1653 1654 function isResponsive(menu) {
1655 var tmpContainer = $('<div>').addClass('responsive-collapsed'); 1656 menu.append(tmpContainer); 1657 var visible = tmpContainer.is(':visible'); 1658 tmpContainer.remove(); 1659 return !visible; 1660 } 1661 1662 $(document).on('touchend click', '[data-responsive-menu] .nav a', function responsiveClick(e) { 1663 var itemLink = $(this), 1664 menu = itemLink.closest('[data-responsive-menu]'), 1665 responsiveLevels = menu.data('responsiveLevels'), 1666 levels = menu.data('levels'), 1667 responsive = isResponsive(menu); 1668 1669 if (responsive && responsiveLevels === 'expand on click' || 1670 !responsive && levels === 'expand on click' 1671 ) { 1672 var submenu = itemLink.siblings(); 1673 if (submenu.length > 0) { 1674 if (submenu.css('visibility') === 'visible') { 1675 submenu.removeClass('show'); 1676 submenu.find('.show').removeClass('show'); 1677 itemLink.removeClass('active'); 1678 } else { 1679 itemLink 1680 .closest('[class*=bd-menuitem]') 1681 .siblings() 1682 .find('ul').parent() 1683 .removeClass('show'); 1684 1685 itemLink.closest('[class*=bd-menuitem]') 1686 .siblings() 1687 .find('> div > a, > a') 1688 .removeClass('active'); 1689 1690 submenu.addClass('show'); 1691 itemLink.addClass('active'); 1692 } 1693 e.preventDefault(); 1694 return false; 1695 } 1696 } 1697 1698 if (e.type === 'click' && menu.attr('data-responsive-type') === 'offcanvas' && menu.find('.collapse.in').length > 0) { 1699 // make anchor-link works 1700 menu.find('.navbar-collapse').collapse('hide'); 1701 enableScroll(); 1702 e.preventDefault(); 1703 e.currentTarget.click(); 1704 return false; 1705 } 1706 return true; 1707 }); 1708 1709 $(document).on('mouseenter touchstart', 'ul.nav > li, .nav ul > li', function calcSubmenuDirection() { 1710 var leftClass = 'bd-popup-left'; 1711 var rightClass = 'bd-popup-right'; 1712 1713 var popup = $(this).children('[class$="-popup"], [class*="-popup "]'); 1714 1715 if (popup.length) { 1716 megaMenuOpen($(this), popup); 1717 popup.removeClass(leftClass + ' ' + rightClass); 1718 var dir = ''; 1719 if (popup.parents('.' + leftClass).length) { 1720 dir = leftClass; 1721 } else if (popup.parents('.' + rightClass).length) { 1722 dir = rightClass; 1723 } 1724 if (dir) { 1725 popup.addClass(dir); 1726 } else { 1727 var left = popup.offset().left; 1728 var width = popup.outerWidth(); 1729 if (left < 0) { 1730 popup.addClass(rightClass); 1731 } else if (left + width > $(window).width()) { 1732 popup.addClass(leftClass); 1733 } 1734 } 1735 } 1736 }); 1737 1738 function getTextWidth(element, pseudo) { 1739 var content = window.getComputedStyle(element[0], pseudo).getPropertyValue('content'); 1740 if (!content || content === 'none') { 1741 return element.children().outerWidth(); 1742 } 1743 1744 var clone = element.clone().css({display: 'inline', margin: 0, padding: 0}); 1745 element.after(clone); 1746 var width = clone.width(); 1747 clone.remove(); 1748 1749 return width; 1750 } 1751 1752 function getSheetInfo() { 1753 var tmpDiv = $('<div id="bd-tmp-container" class="bd-container-inner"></div>'); 1754 $('body').append(tmpDiv); 1755 var width = tmpDiv.width(); 1756 var offset = tmpDiv.offset(); 1757 tmpDiv.remove(); 1758 return { 1759 width: width, 1760 left: offset.left, 1761 right: offset.left + width 1762 }; 1763 } 1764 1765 function megaMenuOpen(item, popup) { 1766 var nav = popup.closest('nav'); 1767 1768 if (popup.parent().closest('[class*=-popup]').hasClass('bd-megamenu-popup')) { 1769 var aElement = popup.parent().children('a'); 1770 var textElement = aElement.children(); 1771 popup.css('left', textElement.position().left + getTextWidth(aElement, ':after')); 1772 } 1773 1774 var isMegaMenu = item.hasClass('bd-has-megamenu'); 1775 if (!isMegaMenu) { 1776 return; 1777 } 1778 var isResponsive = nav.find('.collapse-button').is(':visible'); 1779 if (isResponsive) { 1780 item.find('.row').removeClass('separated-grid') 1781 .children().removeAttr('style') // clear styles added by grid script 1782 .find('.bd-empty-grid-item').remove(); 1783 1784 item.removeClass('bd-megamenu'); 1785 } else { 1786 item.find('.row').addClass('separated-grid'); 1787 item.addClass('bd-megamenu'); 1788 } 1789 1790 if (!isResponsive) { 1791 var megaWidth = item.data('megaWidth') || item.children('a').data('megaWidth') || 'sheet', 1792 megaWidthValue = item.data('megaWidthValue') || item.children('a').data('megaWidthValue'), 1793 width, 1794 leftOffset, 1795 itemPos = item.offset().left, 1796 sheet = getSheetInfo(), 1797 navBar = popup.closest('.navbar-collapse'), 1798 menuLeft = navBar.offset().left, 1799 menuRight = menuLeft + navBar.outerWidth(); 1800 1801 if (menuLeft < sheet.left || menuRight > sheet.right) { 1802 megaWidth = 'custom'; 1803 megaWidthValue = sheet.width; 1804 } 1805 1806 switch (megaWidth) { 1807 // sheet, custom 1808 case 'custom': 1809 if (itemPos + megaWidthValue <= menuRight) { 1810 leftOffset = 0; 1811 } else if (menuLeft < $(window).width() - menuRight) { 1812 leftOffset = menuLeft - itemPos; 1813 } else { 1814 leftOffset = (menuRight - itemPos) - megaWidthValue; 1815 } 1816 width = megaWidthValue; 1817 break; 1818 default: 1819 leftOffset = sheet.left - itemPos; 1820 width = sheet.width; 1821 } 1822 1823 if (leftOffset) { 1824 popup.css({ 1825 'left': leftOffset, 1826 'right': 'auto' 1827 }); 1828 } 1829 if (width) { 1830 popup.outerWidth(width); 1831 } 1832 1833 $(document).trigger('force-grid-update', [item.find('.separated-grid')]); 1834 } else { 1835 popup.css({ 1836 'left': 'auto', 1837 'width': 'auto', 1838 'right': 'auto' 1839 }); 1840 } 1841 } 1842 1843}); 1844})(window._$, window._$); 1845(function (jQuery, $) { 1846(function ($) { 1847 'use strict'; 1848 1849 // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ 1850 // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating 1851 // requestAnimationFrame polyfill by Erik M?ller. fixes from Paul Irish and Tino Zijdel 1852 // MIT license 1853 1854 if (!/Android|BlackBerry|iPad|iPhone|iPod|Windows Phone/i.test(navigator.userAgent || navigator.vendor || window.opera)) { 1855 1856 (function () { 1857 var lastTime = 0; 1858 var vendors = ['ms', 'moz', 'webkit', 'o']; 1859 for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { 1860 window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; 1861 window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || 1862 window[vendors[x] + 'CancelRequestAnimationFrame']; 1863 } 1864 1865 if (!window.requestAnimationFrame) 1866 window.requestAnimationFrame = function (callback) { 1867 var currTime = new Date().getTime(); 1868 var timeToCall = Math.max(0, 16 - (currTime - lastTime)); 1869 var id = window.setTimeout(function () { 1870 callback(currTime + timeToCall); 1871 }, 1872 timeToCall); 1873 lastTime = currTime + timeToCall; 1874 return id; 1875 }; 1876 1877 if (!window.cancelAnimationFrame) 1878 window.cancelAnimationFrame = function (id) { 1879 clearTimeout(id); 1880 }; 1881 }()); 1882 1883 var transform = ['transform', 'msTransform', 'webkitTransform', 'mozTransform', 'oTransform']; 1884 1885 $(function () { 1886 onLoad(); 1887 }); 1888 1889 var timeout; 1890 $(window).on('resize', function (e, param) { 1891 clearTimeout(timeout); 1892 if (param && param.force) { 1893 onResize(); 1894 } else { 1895 timeout = setTimeout(onResize, 100); 1896 } 1897 }); 1898 1899 $(window).on('scroll', function () { 1900 window.requestAnimationFrame(function () { 1901 onScroll(); 1902 }); 1903 }); 1904 } else { 1905 $(function () { 1906 onLoadMobile(); 1907 }); 1908 } 1909 1910 function onLoad() { 1911 var elements = document.getElementsByClassName('bd-parallax-bg-effect'); 1912 if (elements.length && window._smoothWheelInstance) { 1913 window._smoothWheelInstance(); 1914 } 1915 1916 [].forEach.call(elements, function (element) { 1917 var that = element, 1918 controlClass = that.getAttribute('data-control-selector').replace(/\./g, ''), 1919 controls = document.getElementsByClassName(controlClass),
1920 isSlider = /bd-slider-\d+($|\s)/g.test(controlClass) || getClassName(controls[0]).indexOf('bd-slider') !== -1, 1921 isColumn = /bd-layoutcolumn-\d+($|\s)/g.test(controlClass); 1922 1923 var activeDoms = [], wrapperDiv; 1924 1925 if (isSlider) { 1926 controls = findByClass(controls[0], 'bd-slide'); 1927 if (controls.length) { 1928 [].forEach.call(controls, function (slide) { 1929 activeDoms = findTopLevelDoms(slide, 'bd-parallax-image-wrapper', controlClass); 1930 if (!activeDoms.length) { 1931 slide.style.backgroundImage = 'none'; 1932 slide.style.backgroundColor = 'transparent'; 1933 wrapperDiv = document.createElement('div'); 1934 wrapperDiv.className = 'bd-parallax-image-wrapper'; 1935 wrapperDiv.innerHTML = '<div class="bd-parallax-image"></div>'; 1936 slide.insertBefore(wrapperDiv, slide.firstChild); 1937 } 1938 }); 1939 } 1940 } 1941 else if (isColumn) { 1942 if (controls.length) { 1943 activeDoms = findTopLevelDoms(that, 'bd-parallax-image-wrapper', controlClass); 1944 if (!activeDoms.length) { 1945 var effectClone = that.cloneNode(true); 1946 effectClone.innerHTML = ''; 1947 1948 var columnNode = controls[0].parentNode; 1949 $(columnNode).unwrap(); 1950 columnNode.insertBefore(effectClone, columnNode.firstChild); 1951 1952 wrapperDiv = document.createElement('div'); 1953 wrapperDiv.className = 'bd-parallax-image-wrapper'; 1954 wrapperDiv.innerHTML = '<div class="bd-parallax-image"></div>'; 1955 1956 effectClone.insertBefore(wrapperDiv, effectClone.firstChild); 1957 } 1958 } 1959 } 1960 else { 1961 if (controls.length) { 1962 activeDoms = findTopLevelDoms(that, 'bd-parallax-image-wrapper', controlClass); 1963 if (!activeDoms.length) { 1964 wrapperDiv = document.createElement('div'); 1965 wrapperDiv.className = 'bd-parallax-image-wrapper'; 1966 wrapperDiv.innerHTML = '<div class="bd-parallax-image"></div>'; 1967 that.insertBefore(wrapperDiv, that.firstChild); 1968 } 1969 } 1970 } 1971 1972 if (controls.length) { 1973 [].forEach.call(controls, function (control) { 1974 var parallaxWrapper = isColumn ? findByClass(control.parentElement, 'bd-parallax-image-wrapper')[0] : findTopLevelDoms(control, 'bd-parallax-image-wrapper', controlClass)[0]; 1975 if (parallaxWrapper) { 1976 var parallaxImg = parallaxWrapper.getElementsByClassName('bd-parallax-image')[0], 1977 controlOffset = $(that).offset().top, 1978 controlHeight = that.clientHeight, 1979 viewPortHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); 1980 1981 if (control.style.backgroundImage === 'none') { 1982 control.style.backgroundImage = ''; 1983 } 1984 1985 if (control.style.backgroundColor === 'transparent') { 1986 control.style.backgroundColor = ''; 1987 } 1988 1989 var backgroundStyles = getComputedStyle(control); 1990 1991 if (backgroundStyles.position === 'static') { 1992 control.style.position = 'relative'; 1993 } 1994 1995 if (backgroundStyles.backgroundImage !== 'none' && parallaxImg.style.backgroundImage !== backgroundStyles.backgroundImage) { 1996 parallaxImg.style.backgroundImage = backgroundStyles.backgroundImage; 1997 } 1998 1999 if (backgroundStyles.backgroundColor !== 'transparent' && parallaxImg.style.backgroundColor !== backgroundStyles.backgroundColor) { 2000 parallaxImg.style.backgroundColor = backgroundStyles.backgroundColor; 2001 } 2002 2003 control.style.backgroundImage = 'none'; 2004 control.style.backgroundColor = 'transparent'; 2005 parallaxImg.style.backgroundRepeat = backgroundStyles.backgroundRepeat; 2006 parallaxImg.style.backgroundPosition = backgroundStyles.backgroundPosition; 2007 2008 if (isSlider) { 2009 parallaxWrapper.style.setProperty('z-index', '-2', 'important'); 2010 } 2011 2012 if (isColumn) { 2013 var containerStyles = getComputedStyle(parallaxWrapper); 2014 parallaxImg.style.setProperty('min-width', containerStyles.width, 'important'); 2015 //parallaxImg.style.setProperty('min-height', Math.min(viewPortHeight, 3 * parseInt(containerStyles.height)) + 'px', 'important'); 2016 } 2017 2018 var positionDifference, 2019 controlBottom = controlOffset + controlHeight; 2020 2021 if (controlOffset >= viewPortHeight / 2) { 2022 //var additionalSpace = controlOffset < viewPortHeight ? (viewPortHeight - controlOffset) / 2 : 0; 2023 positionDifference = -viewPortHeight / 2 /*+ additionalSpace*/ + (getCompatibleScrollTop() + viewPortHeight - controlOffset) / 2; 2024 } 2025 else { 2026 positionDifference = /*-controlOffset / 2*/ +(getCompatibleScrollTop() - controlOffset) / 2; 2027 } 2028 if (getCompatibleScrollTop() + viewPortHeight > controlOffset && getCompatibleScrollTop() < controlBottom) {
2029 var transformProperty = getSupportedPropertyName(transform); 2030 if (transformProperty) { 2031 parallaxImg.style[transformProperty] = 'translate3d(0, ' + positionDifference + 'px, 0)'; 2032 } 2033 } 2034 } 2035 }); 2036 } 2037 }); 2038 } 2039 2040 function onLoadMobile() { 2041 var elements = document.getElementsByClassName('bd-parallax-bg-effect'); 2042 2043 [].slice.call(elements).forEach(function (element) { 2044 var controlClass = element.getAttribute('data-control-selector').replace(/\./g, ''), 2045 controls = document.getElementsByClassName(controlClass), 2046 isSlider = /bd-slider-\d+($|\s)/g.test(controlClass) || getClassName(controls[0]).indexOf('bd-slider') !== -1, 2047 isColumn = /bd-layoutcolumn-\d+($|\s)/g.test(controlClass); 2048 2049 if (isColumn) { 2050 if (controls.length) { 2051 var columnNode = controls[0].parentNode; 2052 $(columnNode).unwrap(); 2053 } 2054 } 2055 }); 2056 } 2057 2058 function onResize() { 2059 var elements = document.getElementsByClassName('bd-parallax-bg-effect'); 2060 if (elements.length && window._smoothWheelInstance) { 2061 window._smoothWheelInstance(); 2062 } 2063 2064 [].forEach.call(elements, function (element) { 2065 var that = element, 2066 controlClass = that.getAttribute('data-control-selector').replace(/\./g, ''), 2067 controls = document.getElementsByClassName(controlClass), 2068 isSlider = /bd-slider-\d+($|\s)/g.test(controlClass) || getClassName(controls[0]).indexOf('bd-slider') !== -1, 2069 isColumn = /bd-layoutcolumn-\d+($|\s)/g.test(controlClass); 2070 2071 var activeDoms = [], wrapperDiv; 2072 2073 if (isSlider) { 2074 controls = findByClass(controls[0], 'bd-slide'); 2075 if (controls.length) { 2076 [].forEach.call(controls, function (slide) { 2077 activeDoms = findTopLevelDoms(slide, 'bd-parallax-image-wrapper', controlClass); 2078 if (!activeDoms.length) { 2079 slide.style.backgroundImage = 'none'; 2080 slide.style.backgroundColor = 'transparent'; 2081 wrapperDiv = document.createElement('div'); 2082 wrapperDiv.className = 'bd-parallax-image-wrapper'; 2083 wrapperDiv.innerHTML = '<div class="bd-parallax-image"></div>'; 2084 slide.insertBefore(wrapperDiv, slide.firstChild); 2085 } 2086 }); 2087 } 2088 } 2089 else if (isColumn) { 2090 if (controls.length) { 2091 activeDoms = findTopLevelDoms(that, 'bd-parallax-image-wrapper', controlClass); 2092 if (!activeDoms.length) { 2093 var effectClone = that.cloneNode(true); 2094 effectClone.innerHTML = ''; 2095 2096 var columnNode = controls[0].parentNode; 2097 $(columnNode).unwrap(); 2098 columnNode.insertBefore(effectClone, columnNode.firstChild); 2099 2100 wrapperDiv = document.createElement('div'); 2101 wrapperDiv.className = 'bd-parallax-image-wrapper'; 2102 wrapperDiv.innerHTML = '<div class="bd-parallax-image"></div>'; 2103 2104 effectClone.insertBefore(wrapperDiv, effectClone.firstChild); 2105 } 2106 } 2107 } 2108 else { 2109 if (controls.length) { 2110 activeDoms = findTopLevelDoms(that, 'bd-parallax-image-wrapper', controlClass); 2111 if (!activeDoms.length) { 2112 wrapperDiv = document.createElement('div'); 2113 wrapperDiv.className = 'bd-parallax-image-wrapper'; 2114 wrapperDiv.innerHTML = '<div class="bd-parallax-image"></div>'; 2115 that.insertBefore(wrapperDiv, that.firstChild); 2116 } 2117 } 2118 } 2119
2120 if (controls.length) { 2121 [].forEach.call(controls, function (control) { 2122 var parallaxWrapper = isColumn ? findByClass(control.parentElement, 'bd-parallax-image-wrapper')[0] : findTopLevelDoms(control, 'bd-parallax-image-wrapper', controlClass)[0]; 2123 if (parallaxWrapper) { 2124 var parallaxImg = parallaxWrapper.getElementsByClassName('bd-parallax-image')[0], 2125 controlOffset = $(that).offset().top, 2126 controlHeight = that.clientHeight, 2127 viewPortHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); 2128 2129 if (control.style.backgroundImage === 'none') { 2130 control.style.backgroundImage = ''; 2131 } 2132 2133 if (control.style.backgroundColor === 'transparent') { 2134 control.style.backgroundColor = ''; 2135 } 2136 2137 var backgroundStyles = getComputedStyle(control); 2138 2139 if (backgroundStyles.position === 'static') { 2140 control.style.position = 'relative'; 2141 } 2142 2143 if (backgroundStyles.backgroundImage !== 'none' && parallaxImg.style.backgroundImage !== backgroundStyles.backgroundImage) { 2144 parallaxImg.style.backgroundImage = backgroundStyles.backgroundImage; 2145 } 2146 2147 if (backgroundStyles.backgroundColor !== 'transparent' && parallaxImg.style.backgroundColor !== backgroundStyles.backgroundColor) { 2148 parallaxImg.style.backgroundColor = backgroundStyles.backgroundColor; 2149 } 2150 2151 control.style.backgroundImage = 'none'; 2152 control.style.backgroundColor = 'transparent'; 2153 parallaxImg.style.backgroundRepeat = backgroundStyles.backgroundRepeat; 2154 parallaxImg.style.backgroundPosition = backgroundStyles.backgroundPosition; 2155 2156 if (isSlider) { 2157 parallaxWrapper.style.setProperty('z-index', '-2', 'important'); 2158 } 2159 2160 if (isColumn) { 2161 var containerStyles = getComputedStyle(parallaxWrapper); 2162 parallaxImg.style.setProperty('min-width', containerStyles.width, 'important'); 2163 //parallaxImg.style.setProperty('min-height', Math.min(viewPortHeight, 3 * parseInt(containerStyles.height)) + 'px', 'important'); 2164 } 2165 2166 if (isSlider && control.className.indexOf('active') !== -1) { 2167 that.setAttribute('data-sliderTop', $(parallaxImg).offset().top); 2168 that.setAttribute('data-imageHeight', parallaxImg.clientHeight); 2169 } 2170 2171 var positionDifference, 2172 imageOffset = isSlider ? parseFloat(that.getAttribute('data-sliderTop')) : $(parallaxImg).offset().top, 2173 controlBottom = controlOffset + controlHeight, 2174 imageBottom = imageOffset + viewPortHeight, 2175 visibleBottom = imageBottom > controlBottom ? controlBottom : imageBottom, 2176 spaceArea = controlBottom - visibleBottom; 2177 2178 if (spaceArea > 0) { 2179 var scaledSize = ((viewPortHeight + spaceArea) / viewPortHeight) * 100; 2180 parallaxImg.style.height = scaledSize + 'vh'; 2181 } 2182 2183 var imageHeight = isSlider ? parseFloat(that.getAttribute('data-imageHeight')) : parallaxImg.clientHeight; 2184 if (controlOffset >= imageHeight / 2) { 2185 //var additionalSpace = controlOffset < viewPortHeight ? (viewPortHeight - controlOffset) / 2 : 0; 2186 positionDifference = -imageHeight / 2 /*+ additionalSpace*/ + (getCompatibleScrollTop() + viewPortHeight - controlOffset) / 2; 2187 } 2188 else { 2189 positionDifference = /*-controlOffset / 2*/ +(getCompatibleScrollTop() - controlOffset) / 2; 2190 } 2191 if (getCompatibleScrollTop() + viewPortHeight > controlOffset && getCompatibleScrollTop() < controlBottom) {
2192 var transformProperty = getSupportedPropertyName(transform); 2193 if (transformProperty) { 2194 parallaxImg.style[transformProperty] = 'translate3d(0, ' + positionDifference + 'px, 0)'; 2195 } 2196 } 2197 } 2198 }); 2199 } 2200 }); 2201 } 2202 2203 function onScroll() { 2204 [].forEach.call(document.getElementsByClassName('bd-parallax-bg-effect'), function (element) { 2205 var that = element, 2206 controlClass = that.getAttribute('data-control-selector').replace(/\./g, ''), 2207 controls = document.getElementsByClassName(controlClass), 2208 isSlider = /bd-slider-\d+($|\s)/g.test(controlClass) || getClassName(controls[0]).indexOf('bd-slider') !== -1, 2209 isColumn = /bd-layoutcolumn-\d+($|\s)/g.test(controlClass); 2210 2211 if (isSlider) { 2212 controls = findByClass(controls[0], 'bd-slide'); 2213 } 2214 2215 if (controls.length) { 2216 [].forEach.call(controls, function (control) { 2217 var viewPortHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0), 2218 controlOffset = $(that).offset().top, 2219 controlHeight = that.clientHeight, 2220 controlBottom = controlOffset + controlHeight; 2221 2222 if (getCompatibleScrollTop() + viewPortHeight > controlOffset && getCompatibleScrollTop() < controlBottom) { 2223 var parallaxWrapper = isColumn ? findByClass(control.parentElement, 'bd-parallax-image-wrapper')[0] : findTopLevelDoms(control, 'bd-parallax-image-wrapper', controlClass)[0]; 2224 if (parallaxWrapper) { 2225 var parallaxImg = parallaxWrapper.getElementsByClassName('bd-parallax-image')[0], 2226 positionDifference; 2227 2228 if (isSlider && control.className.indexOf('active') !== -1) { 2229 that.setAttribute('data-imageHeight', parallaxImg.clientHeight); 2230 } 2231 2232 var imageHeight = isSlider ? parseFloat(that.getAttribute('data-imageHeight')) : parallaxImg.clientHeight; 2233 if (controlOffset >= imageHeight / 2) { 2234 //var additionalSpace = controlOffset < viewPortHeight ? (viewPortHeight - controlOffset) / 2 : 0; 2235 positionDifference = -imageHeight / 2 /*+ additionalSpace*/ + (getCompatibleScrollTop() + viewPortHeight - controlOffset) / 2; 2236 } 2237 else { 2238 positionDifference = /*-controlOffset / 2*/ +(getCompatibleScrollTop() - controlOffset) / 2; 2239 } 2240 2241 var transformProperty = getSupportedPropertyName(transform); 2242 if (transformProperty) { 2243 parallaxImg.style[transformProperty] = 'translate3d(0, ' + positionDifference + 'px, 0)'; 2244 } 2245 } 2246 } 2247 }); 2248 } 2249 }); 2250 } 2251 2252 function getClassName(element) { 2253 var className = element ? element.className : null; 2254 if (className) { 2255 if (typeof className === 'string') { 2256 return className; 2257 } else if (typeof className === 'object' && 'baseVal' in className) { // for SVG elements 2258 return className.baseVal; 2259 } 2260 } 2261 return ''; 2262 } 2263 2264 function getSupportedPropertyName(properties) { 2265 for (var i = 0; i < properties.length; i++) { 2266 if (typeof document.body.style[properties[i]] !== 'undefined') { 2267 return properties[i]; 2268 } 2269 } 2270 return null; 2271 } 2272 2273 function getCompatibleScrollTop() { 2274 if ("undefined" !== typeof window.scrollY) { 2275 return window.scrollY; 2276 } 2277 else { 2278 return document.documentElement.scrollTop; 2279 } 2280 } 2281 2282 function findByClass(parentElement, searchClassName) { 2283 return [].slice.call(parentElement.getElementsByTagName('*')).filter(function (value) { 2284 var className = getClassName(value); 2285 return (' ' + className + ' ').indexOf(' ' + searchClassName + ' ') !== -1; 2286 }); 2287 } 2288 2289 function findTopLevelDoms(element, searchClassName, controlClassName) { 2290 var isEffectDom = function (domElement) {
2291 return getClassName(domElement).indexOf('bd-parallax-bg-effect') !== -1 && domElement.getAttribute('data-control-selector') === '.' + controlClassName; 2292 }, 2293 findDom = function (domElement) { 2294 return [].slice.call(domElement.getElementsByClassName(searchClassName)).filter(function (value) { 2295 return value.parentNode === domElement; 2296 }); 2297 }; 2298 2299 var foundDom = findDom(element); 2300 if (foundDom.length === 0) { 2301 while (!isEffectDom(element) && element) { 2302 element = element.parentElement; 2303 } 2304 } 2305 2306 return foundDom.length ? foundDom : findDom(element); 2307 } 2308})(jQuery); 2309})(window._$, window._$); 2310window.ProductOverview_Class = "bd-productoverview"; 2311(function (jQuery, $) { 2312jQuery(function($) { 2313 'use strict'; 2314 function makeCloudZoom1() { 2315 if ($('.bd-productimage-6 a').length > 0) { 2316 $('.bd-productimage-6 a').attr('id', 'cloud-zoom-effect-1').addClass('cloud-zoom'); 2317 $('.bd-productimage-6 a').attr('rel', "position:'right', adjustX:0, adjustY:0, tint:'#ffffff', softFocus:1, smoothMove:1, tintOpacity:0.5"); 2318 2319 if ('undefined' !== typeof window.ProductOverview_Class && 'undefined' !== typeof window.ImageThumbnails_Class) { 2320 var parent = $('.bd-productimage-6') 2321 .closest('[class*=" ' + window.ProductOverview_Class + '"], [class^="' + window.ProductOverview_Class + '"]'), 2322 thumbnails = $('[class*=" ' + window.ImageThumbnails_Class + '"], [class^="' + window.ImageThumbnails_Class + '"]', parent); 2323 2324 if (thumbnails.length > 0) { 2325 $('a', thumbnails).each(function () { 2326 var thumbnail = $(this), 2327 rel = thumbnail.attr('rel') === undefined ? '' : thumbnail.attr('rel'), 2328 relAttr = (rel.indexOf("cloud-zoom-effect-1") > 0 ? rel : (rel === '' ? '' : rel + ',') + "useZoom: 'cloud-zoom-effect-1'"); 2329 thumbnail.attr('rel', relAttr); 2330 if (!thumbnail.hasClass('with-lightbox')) { 2331 thumbnail.addClass('cloud-zoom-gallery'); 2332 } 2333 }); 2334 } 2335 } 2336 2337 var parent = $(".bd-productimage-6").parents().filter(function (key, value) { 2338 return parseInt($(value).css('z-index'), 10).toString() !== 'NaN'; 2339 }); 2340 2341 var minZIndex = 100; 2342 var zIndex = parent.length > 0 ? parseInt($(parent[0]).css('z-index'), 10) + 1 : 1; 2343 zIndex = zIndex < minZIndex ? minZIndex : zIndex; 2344 2345 $('<style type="text/css"> .bd-productimage-6 .mousetrap { z-index: ' + zIndex + '!important;} </style>').appendTo("head"); 2346 2347 $('#cloud-zoom-effect-1, .cloud-zoom-gallery').CloudZoom(); 2348 } 2349 } 2350 makeCloudZoom1(); 2351 var resizeTimeout; 2352 $(window).resize(function(){ 2353 clearTimeout(resizeTimeout); 2354 resizeTimeout = setTimeout(makeCloudZoom1, 25); 2355 }); 2356}); 2357})(window._$, window._$); 2358(function (jQuery, $) { 2359window.ImageThumbnails_Class = 'bd-imagethumbnails'; 2360jQuery(function () { 2361 'use strict'; 2362 /* 'active' must be always specified, otherwise slider would not be visible */ 2363 function makeImageThumbnailsCarousel1() 2364 { 2365 $('.bd-imagethumbnails-1.carousel.slide').each(function () { 2366 var slider = jQuery(this); 2367 if (!slider || !slider.length) { 2368 return; 2369 } 2370 2371 slider.data('resize', function () { 2372 jQuery('.carousel-inner', slider).equalImageHeight(); 2373 }); 2374 2375 slider.data('resize')(); 2376 2377 jQuery('.bd-left-button .bd-carousel-3', slider) 2378 .attr('href', '#') 2379 .click(function () { 2380 slider.carousel('prev'); 2381 return false; 2382 }); 2383 2384 jQuery('.bd-right-button .bd-carousel-3', slider) 2385 .attr('href', '#') 2386 .click(function () { 2387 slider.carousel('next'); 2388 return false;
2389 }); 2390 }); 2391 } 2392 makeImageThumbnailsCarousel1(); 2393 var resizeTimeoutThumbnails; 2394 $(window).resize(function(){ 2395 clearTimeout(resizeTimeoutThumbnails); 2396 resizeTimeoutThumbnails = setTimeout(makeImageThumbnailsCarousel1, 25); 2397 }); 2398}); 2399})(window._$, window._$); 2400(function (jQuery, $) { 2401jQuery(function ($) { 2402 'use strict'; 2403 2404 window.tabCollapseResize = function () { 2405 $('.tabbable').each(function () { 2406 var tabbable = $(this); 2407 // var tabMenu = tabbable.children('.nav-tabs'); 2408 var tabMenu = tabbable.find('.nav-tabs'); 2409 var tabs = tabMenu.children('li'); 2410 var tabContent = tabbable.find('.tab-content'); 2411 var panels = tabContent.find('.tab-pane'); 2412 2413 if (!tabs.filter('.active').length) { 2414 tabs.first().addClass('active'); 2415 panels.removeClass('active').first().addClass('active'); 2416 } 2417 2418 if (!tabbable.data('responsive')) { 2419 if (tabContent.children('.accordion').length) { 2420 tabContent.children('.accordion').children().first().unwrap(); 2421 } 2422 tabContent.find('.accordion-item').remove(); 2423 panels.each(function () { 2424 var wrapper = $(this).children('.accordion-wrap'); 2425 if (wrapper.children().length) { 2426 wrapper.children().first().unwrap(); 2427 } else { 2428 wrapper.remove(); 2429 } 2430 }); 2431 return; 2432 } 2433 2434 var cls = tabMenu.parent().siblings('.accordion').children('.accordion-content').attr('class'); 2435 var wrapper = tabContent.find('.accordion-wrap'); 2436 if (wrapper.length) { 2437 tabContent.find('.accordion-wrap').toggleClass(cls, tabContent.find('.accordion-item:visible').length > 0); 2438 return; 2439 } 2440 2441 var accordion = tabbable.find('.accordion'); 2442 2443 accordion.show(); 2444 var accordionTpl = accordion.clone(); 2445 accordion.hide(); 2446 2447 var itemTpl = accordion.find('.accordion-item').clone(); 2448 var contentTpl = accordion.find('.accordion-content').clone(); 2449 accordionTpl.empty(); 2450 2451 tabs.each(function () { 2452 var tab = $(this); 2453 var tablink = tab.find('[data-toggle="tab"]'); 2454 var currentId = tablink.attr('href'); 2455 var panel = panels.filter(currentId); 2456 2457 var collapseLink = $('<a></a>'); 2458 collapseLink.html(tablink.html()); 2459 collapseLink.attr('data-toggle', 'collapse'); 2460 collapseLink.attr('data-target', currentId); 2461 2462 panel.before(itemTpl.clone().append(collapseLink)); 2463 panel.wrapInner(contentTpl.clone().addClass('accordion-wrap').toggleClass(cls, collapseLink.is(':visible'))); 2464 2465 panel.addClass('collapse'); 2466 if (panel.is('.active')) { 2467 panel.addClass('in'); 2468 collapseLink.addClass('active'); 2469 } 2470 2471 /* Collapse */ 2472 2473 panel.on('show.bs.collapse', function () { 2474 var actives = panels.filter('.in'); 2475 panels.filter('.collapsing:not(.active)').addClass('bd-collapsing'); 2476 if (actives && actives.length) { 2477 var activesData = actives.data('bs.collapse'); 2478 if (!activesData || !activesData.transitioning) { 2479 actives.collapse('hide'); 2480 if (!activesData) actives.data('bs.collapse', null); 2481 } 2482 } 2483 panel.css('display', 'block'); 2484 2485 collapseLink.addClass('active'); 2486 }); 2487 2488 panel.on('shown.bs.collapse', function () { 2489 tab.addClass('active'); 2490 panel.addClass('active'); 2491 2492 panel.css('display', ''); 2493 panel.filter('.bd-collapsing').removeClass('bd-collapsing').collapse('hide'); 2494 }); 2495 2496 panel.on('hide.bs.collapse', function () { 2497 collapseLink.removeClass('active'); 2498 }); 2499 2500 panel.on('hidden.bs.collapse', function () { 2501 tab.removeClass('active'); 2502 panel.removeClass('active'); 2503 panel.css('height', ''); 2504 }); 2505 2506 /* Tabs */ 2507 2508 tablink.on('show.bs.tab', function () { 2509 panels.removeClass('in'); 2510 tabContent.find('.accordion > .accordion-item > a').removeClass('active'); 2511 2512 panel.css('height', ''); 2513 panel.addClass('in'); 2514 collapseLink.addClass('active'); 2515 }); 2516 }); 2517 2518 tabContent.wrapInner(accordionTpl); 2519 }); 2520 }; 2521 2522 $(window).on('resize', function (e, param) { 2523 window.tabCollapseResize(); 2524 }); 2525 2526 window.tabCollapseResize(); 2527}); 2528})(window._$, window._$); 2529(function (jQuery, $) { 2530jQuery(function ($) {
2531 $('.review-rating .bd-rating').mousemove( function(e){ 2532 var t = event.target || event.srcElement; 2533 if ('span' === t.tagName.toLowerCase()) { 2534 $(event.target).addClass('active'); 2535 $(event.target).prevAll().addClass('active'); 2536 $(event.target).nextAll().removeClass('active'); 2537 $('#vote').val($(event.target).prevAll().length + 1); 2538 } 2539 }); 2540}); 2541})(window._$, window._$); 2542(function (jQuery, $) { 2543 2544/*! 2545 * jQuery Cookie Plugin v1.4.0 2546 * https://github.com/carhartl/jquery-cookie 2547 * 2548 * Copyright 2013 Klaus Hartl 2549 * Released under the MIT license 2550 */ 2551(function (factory) { 2552 'use strict'; 2553 if (typeof define === 'function' && define.amd) { 2554 define(['jquery'], factory); 2555 } else { 2556 factory(jQuery); 2557 } 2558}(function ($) { 2559 'use strict'; 2560 var pluses = /\+/g; 2561 2562 function encode(s) { 2563 return config.raw ? s : encodeURIComponent(s); 2564 } 2565 2566 function decode(s) { 2567 return config.raw ? s : decodeURIComponent(s); 2568 } 2569 2570 function stringifyCookieValue(value) { 2571 return encode(config.json ? JSON.stringify(value) : String(value)); 2572 } 2573 2574 function parseCookieValue(s) { 2575 if (s.indexOf('"') === 0) { 2576 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 2577 } 2578 2579 try { 2580 s = decodeURIComponent(s.replace(pluses, ' ')); 2581 } catch(e) { 2582 return; 2583 } 2584 2585 try { 2586 return config.json ? JSON.parse(s) : s; 2587 } catch(e) {} 2588 } 2589 2590 function read(s, converter) { 2591 var value = config.raw ? s : parseCookieValue(s); 2592 return $.isFunction(converter) ? converter(value) : value; 2593 } 2594 2595 var config = $.cookie = function (key, value, options) { 2596 2597 // Write 2598 if (value !== undefined && !$.isFunction(value)) { 2599 options = $.extend({}, config.defaults, options); 2600 2601 if (typeof options.expires === 'number') { 2602 var days = options.expires, t = options.expires = new Date(); 2603 t.setDate(t.getDate() + days); 2604 } 2605 2606 return (document.cookie = [ 2607 encode(key), '=', stringifyCookieValue(value), 2608 options.expires ? '; expires=' + options.expires.toUTCString() : '', 2609 options.path ? '; path=' + options.path : '', 2610 options.domain ? '; domain=' + options.domain : '', 2611 options.secure ? '; secure' : '' 2612 ].join('')); 2613 } 2614 2615 var result = key ? undefined : {}; 2616 var cookies = document.cookie ? document.cookie.split('; ') : []; 2617 2618 for (var i = 0, l = cookies.length; i < l; i++) { 2619 var parts = cookies[i].split('='); 2620 var name = decode(parts.shift()); 2621 var cookie = parts.join('='); 2622 2623 if (key && key === name) { 2624 result = read(cookie, value); 2625 break; 2626 } 2627 2628 if (!key && (cookie = read(cookie)) !== undefined) { 2629 result[name] = cookie; 2630 } 2631 } 2632 2633 return result; 2634 }; 2635 2636 config.defaults = {}; 2637 2638 $.removeCookie = function (key, options) { 2639 if ($.cookie(key) !== undefined) { 2640 $.cookie(key, '', $.extend({}, options, { expires: -1 })); 2641 return true; 2642 } 2643 return false; 2644 }; 2645 2646})); 2647 2648jQuery(function($) { 2649 'use strict'; 2650 2651 var activeLayoutType = $.cookie('layoutType') || 'grid', 2652 activeLayoutTypeSelector = $.cookie('layoutSelector') || '.separated-item-5.grid'; 2653 2654 var layoutTypes = []; 2655 2656 layoutTypes.push({ 2657 name:'bd-griditemgrid', 2658 iconUrl: '', 2659 iconDataId: '3368', 2660 iconClassNames: 'bd-icon-64 bd-no-margins' 2661 }); 2662 layoutTypes.push({ 2663 name:'bd-griditemlist', 2664 iconUrl: '', 2665 iconDataId: '3383', 2666 iconClassNames: 'bd-icon-65' 2667 }); 2668 if (typeof window.buildTypeSelector === 'function') { 2669 window.buildTypeSelector(layoutTypes, $('.bd-productsgridbar-28')); 2670 } 2671 2672 2673 $(document).on('click', '.bd-products i[data-layout-name="bd-griditemgrid"]', function (e) { 2674 if (activeLayoutType !== 'grid') { 2675 var grid = $('.bd-grid-53'); 2676 grid.find('.separated-item-5.grid').css('display', 'block'); 2677 grid.find(activeLayoutTypeSelector).css('display', 'none'); 2678 activeLayoutType = 'grid'; 2679 activeLayoutTypeSelector = '.separated-item-5.grid'; 2680 2681 $.cookie('layoutType', activeLayoutType, { path: '/' }); 2682 $.cookie('layoutSelector', activeLayoutTypeSelector, { path: '/' }); 2683 } 2684 e.preventDefault(); 2685 e.stopPropagation(); 2686 return false;
2687 }); 2688 $(document).on('click', '.bd-products i[data-layout-name="bd-griditemlist"]', function (e) { 2689 if (activeLayoutType !== 'list') { 2690 var grid = $('.bd-grid-53'); 2691 grid.find('.separated-item-6.list').css('display', 'block'); 2692 grid.find(activeLayoutTypeSelector).css('display', 'none'); 2693 activeLayoutType = 'list'; 2694 activeLayoutTypeSelector = '.separated-item-6.list'; 2695 2696 $.cookie('layoutType', activeLayoutType, { path: '/' }); 2697 $.cookie('layoutSelector', activeLayoutTypeSelector, { path: '/' }); 2698 } 2699 e.preventDefault(); 2700 e.stopPropagation(); 2701 return false; 2702 }); 2703 2704}); 2705})(window._$, window._$); 2706(function (jQuery, $) { 2707buildTypeSelector = function(layouts, parent) { 2708 layouts.map(function(layout){ 2709 var a = document.createElement('a'), 2710 i = document.createElement('i'); 2711 jQuery(i).addClass(layout.iconClassNames).addClass('bd-icon data-control-id-'
2711+ layout.iconDataId); 2712 jQuery(i).attr('data-layout-name', layout.name); 2713 jQuery(a).attr('href', '##').append(i); 2714 jQuery(a).each(function() { this.style.textDecoration = 'none'; }); 2715 (parent || jQuery).find('.bd-typeselector-1').append(a); 2716 }); 2717} 2718})(window._$, window._$); 2719(function (jQuery, $) { 2720jQuery(function ($) { 2721 'use strict'; 2722 2723 function getFloat(value){ 2724 return parseFloat(value.replace('px', '')) ; 2725 } 2726 2727 $('.bd-productsslider-1').each(function () { 2728 var slider = $(this).find('.carousel.slide'); 2729 slider.carousel({ 2730 interval: 3000, 2731 pause: "", 2732 wrap: false 2733 }); 2734 2735 var leftButton = $('.bd-left-button', slider); 2736 var rightButton = $('.bd-right-button', slider); 2737 2738 2739 var blockSelector = '.bd-block', 2740 blockHeaderSelector = '.bd-block .bd-blockheader'; 2741 if ($(blockSelector, this).length > 0 && $(blockHeaderSelector, this).length > 0) 2742 { 2743 var block = $(blockSelector, this), 2744 blockHeader = block.find('*').filter(blockHeaderSelector), 2745 blockHeaderTitle = blockHeader.children('h4'); 2746 2747 blockHeader.css('min-height', '35px'); 2748 blockHeader.css('position', 'relative'); 2749 2750 var navigationWrapper = $('<div class="bd-top-navigation-wrapper"></div>'); 2751 blockHeaderTitle.addClass('bd-top-navigation'); 2752 blockHeaderTitle.append(navigationWrapper); 2753 2754 leftButton.appendTo(navigationWrapper); 2755 rightButton.appendTo(navigationWrapper); 2756 } 2757 2758 leftButton.find('.bd-carousel-5').click(function() { 2759 slider.carousel('prev'); 2760 return false; 2761 }).attr('href', '#'); 2762 2763 rightButton.find('.bd-carousel-5').click(function() { 2764 slider.carousel('next'); 2765 return false; 2766 }).attr('href', '#'); 2767 2768 2769 slider.carousel('pause'); 2770 }); 2771}); 2772})(window._$, window._$); 2773(function (jQuery, $) { 2774jQuery(function ($) { 2775 'use strict'; 2776 2777 var resizeHandler = function () { 2778 $('.carousel.adjust-slides').each(function () { 2779 var inner = $(this).find('.carousel-inner'), 2780 items = inner.children('.item').addClass('clearfix').css('width', '100%'); 2781 var maxH = 0; 2782 if (items.length > 1) { 2783 var windowScrollTop = $(window).scrollTop(); 2784 items.css('min-height', '0').each(function(){ 2785 maxH = Math.max(maxH, parseFloat(getComputedStyle(this).height)); 2786 }).css('min-height', maxH); 2787 inner.css('height', maxH); 2788 if ($(window).scrollTop() !== windowScrollTop){ 2789 $(window).scrollTop(windowScrollTop); 2790 } 2791 } 2792 }); 2793 setTimeout(resizeHandler, 100); 2794 }; 2795 resizeHandler(); 2796}); 2797 2798(function ($) { 2799 'use strict'; 2800 2801 $.fn.equalImageHeight = function () { 2802 return this.each(function() { 2803 var maxHeight = 0; 2804 2805 $(this).children('a').children('img').each(function(index, child) { 2806 var h = $(child).height(); 2807 maxHeight = h > maxHeight ? h : maxHeight; 2808 $(child).css('height', ''); // clears previous value 2809 }); 2810 2811 $(this).children('a').each(function(index, child) { 2812 $(child).height(maxHeight); 2813 }); 2814 2815 }); 2816 }; 2817})(jQuery); 2818})(window._$, window._$); 2819(function (jQuery, $) { 2820window.initSlider = function initSlider(selector, opt) { 2821 'use strict'; 2822 2823 opt = opt || {}; 2824 2825 jQuery(selector + '.carousel.slide .carousel-inner > .item:first-child').addClass('active'); 2826 2827 function setSliderInterval() { 2828 jQuery(selector + '.carousel.slide').carousel({ 2829 interval: opt.carouselInterval, 2830 pause: opt.carouselPause, 2831 wrap: opt.carouselWrap 2832 }); 2833 2834 if (!opt.carouselRideOnStart) { 2835 jQuery(selector + '.carousel.slide').carousel('pause'); 2836 } 2837 } 2838 2839 /* 'active' must be always specified, otherwise slider would not be visible */ 2840 var leftNav = selector + '.carousel.slide .' + opt.leftButtonSelector + ' a' + opt.navigatorSelector, 2841 rightNav = selector + '.carousel.slide .' + opt.rightButtonSelector + ' a' + opt.navigatorSelector; 2842 2843 jQuery(leftNav).attr('href', '#'); 2844 jQuery(leftNav).click(function() { 2845 setSliderInterval(); 2846 jQuery(selector + '.carousel.slide').carousel('prev'); 2847 return false;
2848 }); 2849 2850 jQuery(rightNav).attr('href', '#'); 2851 jQuery(rightNav).click(function() { 2852 setSliderInterval(); 2853 jQuery(selector + '.carousel.slide').carousel('next'); 2854 return false; 2855 }); 2856 2857 jQuery(selector + '.carousel.slide').on('slid.bs.carousel', function () { 2858 var indicators = jQuery(opt.indicatorsSelector, this); 2859 indicators.find('.active').removeClass('active'); 2860 2861 var activeSlide = jQuery(this).find('.item.active'), 2862 activeIndex = activeSlide.parent().children().index(activeSlide), 2863 activeItem = indicators.children()[activeIndex]; 2864 2865 jQuery(activeItem).children('a').addClass('active'); 2866 }); 2867 2868 setSliderInterval(); 2869}; 2870})(window._$, window._$); 2871(function (jQuery, $) { 2872jQuery(function ($) { 2873 'use strict'; 2874 2875 $(document) 2876 .on('click.themler', '.bd-overSlide[data-url] a, .bd-slide[data-url] a', function (e) { 2877 e.stopPropagation(); 2878 }) 2879 .on('click.themler', '.bd-overSlide[data-url], .bd-slide[data-url]', function () { 2880 var elem = $(this), 2881 url = elem.data('url'), 2882 target = elem.data('target'); 2883 window.open(url, target); 2884 }); 2885}); 2886 2887})(window._$, window._$); 2888(function (jQuery, $) { 2889jQuery(function ($) { 2890 'use strict'; 2891 2892 $('[data-smooth-scroll]').on('click', 'a[href^="#"]:not([data-toggle="collapse"])', function (e) { 2893 var animationTime = parseInt($(e.delegateTarget).data('animationTime'), 10) || 0; 2894 var target = this.hash; 2895 var link = $(this); 2896 e.preventDefault(); 2897 2898 $('body').data('scroll-animating', true); 2899 var targetElement = $(target || 'body'); 2900 2901 link.trigger($.Event('theme.smooth-scroll.before')); 2902 2903 if (!targetElement || !targetElement.length) 2904 return; 2905 2906 $('html, body').animate({ 2907 scrollTop: targetElement.offset().top 2908 }, animationTime, function() { 2909 $('body').data('scroll-animating', false); 2910 window.location.hash = target; 2911 if (targetElement.is(':not(body)') && $('body').data('bs.scrollspy')) { 2912 link.parent('li').siblings('li').children('a').removeClass('active'); 2913 link.addClass('active'); 2914 } 2915 link.trigger($.Event('theme.smooth-scroll.after')); 2916 }); 2917 }); 2918}); 2919})(window._$, window._$); 2920(function (jQuery, $) { 2921function SmoothWheel() { 2922 'use strict'; 2923 2924 this.options = { 2925 animtime: 500, 2926 stepsize: 150, 2927 pulseAlgorithm: false, 2928 pulseScale: 6, 2929 keyboardsupport: true, 2930 arrowscroll: 50, 2931 useOnWebKit: true, 2932 useOnMozilla: true, 2933 useOnIE: true 2934 }; 2935 2936 var that = this; 2937 2938 /*global Date */ 2939 function ssc_init() { 2940 2941 if (!document.body) return; 2942 var e = document.body; 2943 var t = document.documentElement; 2944 var n = window.innerHeight; 2945 var r = e.scrollHeight; 2946 ssc_root = document.compatMode.indexOf("CSS") >= 0 ? t : e; 2947 ssc_activeElement = e; 2948 ssc_initdone = true; 2949 if (top !== self) { 2950 ssc_frame = true; 2951 } else if (r >
2951 n && (e.offsetHeight <= n || t.offsetHeight <= n)) { 2952 ssc_root.style.height = "auto"; 2953 if (ssc_root.offsetHeight <= n) { 2954 var i = document.createElement("div"); 2955 i.style.clear = "both"; 2956 e.appendChild(i); 2957 } 2958 } 2959 if (!ssc_fixedback) { 2960 e.style.backgroundAttachment = "scroll"; 2961 t.style.backgroundAttachment = "scroll"; 2962 } 2963 if (that.options.keyboardsupport) { 2964 ssc_addEvent("keydown", ssc_keydown); 2965 } 2966 } 2967 2968 function ssc_scrollArray(e, t, n, r) { 2969 r || (r = 1e3); 2970 ssc_directionCheck(t, n); 2971 ssc_que.push({ 2972 x: t, 2973 y: n, 2974 lastX: t < 0 ? 0.99 : -0.99, 2975 lastY: n < 0 ? 0.99 : -0.99, 2976 start: +(new Date()) 2977 }); 2978 if (ssc_pending) { 2979 return; 2980 } 2981 var i = function() { 2982 var s = +(new Date()); 2983 var o = 0; 2984 var u = 0; 2985 for (var a = 0; a < ssc_que.length; a++) { 2986 var f = ssc_que[a]; 2987 var l = s - f.start; 2988 var c = l >= that.options.animtime; 2989 var h = c ? 1 : l / that.options.animtime; 2990 if (that.options.pulseAlgorithm) { 2991 h = ssc_pulse(h); 2992 } 2993 var p = f.x * h - f.lastX >> 0; 2994 var d = f.y * h - f.lastY >> 0; 2995 o += p; 2996 u += d; 2997 f.lastX += p; 2998 f.lastY += d; 2999 if (c) { 3000 ssc_que.splice(a, 1); 3001 a--; 3002 } 3003 } 3004 if (t) { 3005 var v = e.scrollLeft; 3006 e.scrollLeft += o; 3007 if (o && e.scrollLeft === v) { 3008 t = 0; 3009 } 3010 } 3011 if (n) { 3012 var m = e.scrollTop; 3013 e.scrollTop += u; 3014 if (u && e.scrollTop === m) { 3015 n = 0; 3016 } 3017 } 3018 if (!t && !n) { 3019 ssc_que = []; 3020 } 3021 if (ssc_que.length) { 3022 setTimeout(i, r / ssc_framerate + 1); 3023 } else { 3024 ssc_pending = false; 3025 } 3026 }; 3027 setTimeout(i, 0); 3028 ssc_pending = true; 3029 } 3030 3031 function ssc_wheel(e) { 3032 if (!ssc_initdone) { 3033 ssc_init(); 3034 } 3035 var t = e.target; 3036 var n = ssc_overflowingAncestor(t); 3037 if (!n || e.defaultPrevented || ssc_isNodeName(ssc_activeElement, "embed") || ssc_isNodeName(t, "embed") && /\.pdf/i.test(t.src)) { 3038 return true; 3039 } 3040 var r = e.wheelDeltaX || e.deltaX || 0; 3041 var i = e.wheelDeltaY || e.deltaY || 0; 3042 if (n.nodeName === 'BODY' && (currentBrowser === 'firefox' || currentBrowser === "msie" || currentBrowser === "netscape")) { 3043 n = document.documentElement; 3044 r = -r; 3045 i = -i; 3046 if (currentBrowser === 'firefox') { 3047 r *= 40; 3048 i *= 40; 3049 } 3050 } 3051 3052 if (!r && !i) { 3053 i = e.wheelDelta || 0; 3054 } 3055 if (Math.abs(r) > 1.2) { 3056 r *= that.options.stepsize / 120; 3057 } 3058 if (Math.abs(i) > 1.2) { 3059 i *= that.options.stepsize / 120; 3060 } 3061 ssc_scrollArray(n, -r, -i); 3062 } 3063 3064 function ssc_keydown(e) { 3065 var t = e.target; 3066 var n = e.ctrlKey || e.altKey || e.metaKey; 3067 if (/input|textarea|embed/i.test(t.nodeName) || t.isContentEditable || e.defaultPrevented || n) { 3068 return true; 3069 } 3070 if (ssc_isNodeName(t, "button") && e.keyCode === ssc_key.spacebar) { 3071 return true; 3072 } 3073 var r, i = 0, 3074 s = 0; 3075 var o = ssc_overflowingAncestor(ssc_activeElement); 3076 var u = o.clientHeight; 3077 if (o === document.body) { 3078 u = window.innerHeight; 3079 } 3080 switch (e.keyCode) { 3081 case ssc_key.up: 3082 s = -that.options.arrowscroll; 3083 break; 3084 case ssc_key.down: 3085 s = that.options.arrowscroll; 3086 break; 3087 case ssc_key.spacebar: 3088 r = e.shiftKey ? 1 : -1; 3089 s = -r * u * 0.9; 3090 break; 3091 case ssc_key.pageup: 3092 s = -u * 0.9; 3093 break; 3094 case ssc_key.pagedown: 3095 s = u * 0.9; 3096 break; 3097 case ssc_key.home: 3098 s = -o.scrollTop; 3099 break; 3100 case ssc_key.end: 3101 var a = o.scrollHeight - o.scrollTop - u; 3102 s = a > 0 ? a + 10 : 0; 3103 break; 3104 case ssc_key.left: 3105 i = -that.options.arrowscroll; 3106 break; 3107 case ssc_key.right: 3108 i = that.options.arrowscroll; 3109 break; 3110 default: 3111 return true; 3112 } 3113 ssc_scrollArray(o, i, s); 3114 e.preventDefault(); 3115 } 3116 3117 function ssc_mousedown(e) { 3118 ssc_activeElement = e.target; 3119 } 3120
3121 function ssc_setCache(e, t) { 3122 for (var n = e.length; n--;) ssc_cache[ssc_uniqueID(e[n])] = t; 3123 return t; 3124 } 3125 3126 function ssc_overflowingAncestor(e) { 3127 var t = []; 3128 var n = ssc_root.scrollHeight; 3129 do { 3130 var r = ssc_cache[ssc_uniqueID(e)]; 3131 if (r) { 3132 return ssc_setCache(t, r); 3133 } 3134 t.push(e); 3135 if (n === e.scrollHeight) { 3136 if (!ssc_frame || ssc_root.clientHeight + 10 < n) { 3137 return ssc_setCache(t, currentScrollingElement); 3138 } 3139 } else if (e.clientHeight + 10 < e.scrollHeight) { 3140 overflow = getComputedStyle(e, "").getPropertyValue("overflow"); 3141 if (overflow === "scroll" || overflow === "auto") { 3142 return ssc_setCache(t, e); 3143 } 3144 } 3145 } while ((e = e.parentNode)); 3146 } 3147 3148 function ssc_addEvent(e, t, n) { 3149 window.addEventListener(e, t, n || false); 3150 } 3151 3152 function ssc_removeEvent(e, t, n) { 3153 window.removeEventListener(e, t, n || false); 3154 } 3155 3156 function ssc_isNodeName(e, t) { 3157 return e.nodeName.toLowerCase() === t.toLowerCase(); 3158 } 3159 3160 function ssc_directionCheck(e, t) { 3161 e = e > 0 ? 1 : -1; 3162 t = t > 0 ? 1 : -1; 3163 if (ssc_direction.x !== e || ssc_direction.y !== t) { 3164 ssc_direction.x = e; 3165 ssc_direction.y = t; 3166 ssc_que = []; 3167 } 3168 } 3169 3170 function ssc_pulse_(e) { 3171 var t, n, r; 3172 e = e * that.options.pulseScale; 3173 if (e < 1) { 3174 t = e - (1 - Math.exp(-e)); 3175 } else { 3176 n = Math.exp(-1); 3177 e -= 1; 3178 r = 1 - Math.exp(-e); 3179 t = n + r * (1 - n); 3180 } 3181 return t * ssc_pulseNormalize; 3182 } 3183 3184 function ssc_pulse(e) { 3185 if (e >= 1) return 1; 3186 if (e <= 0) return 0; 3187 if (ssc_pulseNormalize === 1) { 3188 ssc_pulseNormalize /= ssc_pulse_(1); 3189 } 3190 return ssc_pulse_(e); 3191 } 3192 var overflow = ''; 3193 var ssc_framerate = 150; 3194 var ssc_pulseNormalize = 1; 3195 var ssc_frame = false; 3196 var ssc_direction = { 3197 x: 0, 3198 y: 0 3199 }; 3200 var ssc_initdone = false; 3201 var ssc_fixedback = true; 3202 var ssc_root = document.documentElement; 3203 var ssc_activeElement; 3204 var ssc_key = { 3205 left: 37, 3206 up: 38, 3207 right: 39, 3208 down: 40, 3209 spacebar: 32, 3210 pageup: 33, 3211 pagedown: 34, 3212 end: 35, 3213 home: 36 3214 }; 3215 var ssc_que = []; 3216 var ssc_pending = false; 3217 var ssc_cache = {}; 3218 var currentBrowser = ''; 3219 var versionBrowser = ''; 3220 var currentScrollingElement = document.body; 3221 3222 setInterval(function() { 3223 ssc_cache = {}; 3224 }, 10 * 1e3); 3225 3226 var ssc_uniqueID = function() { 3227 var e = 0; 3228 return function(t) { 3229 return t.ssc_uniqueID || (t.ssc_uniqueID = e++); 3230 }; 3231 }(); 3232 3233 jQuery(document).ready(function() { 3234 function t() { 3235 var ua = navigator.userAgent, tem, 3236 M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; 3237 if(/trident/i.test(M[1])){ 3238 tem = /\brv[ :]+(\d+)/g.exec(ua) || []; 3239 return 'IE '+(tem[1] || ''); 3240 } 3241 if(M[1] === 'Chrome'){ 3242 tem = ua.match(/\b(OPR|Edge)\/(\d+)/); 3243 if(tem != null) return tem.slice(1).join(' ').replace('OPR', 'Opera'); 3244 } 3245 M = M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?']; 3246 if((tem = ua.match(/version\/(\d+)/i))!= null) M.splice(1, 1, tem[1]); 3247 return M; 3248 } 3249 3250 currentBrowser = t()[0].toLowerCase(); 3251 versionBrowser = t()[1]; 3252 3253 var webKit = 'safari;chrome'; 3254 var IE = 'netscape;msie'; 3255 var mozilla = 'firefox'; 3256 3257 var browserName = [ 3258 (that.options.useOnMozilla ? mozilla : ''), 3259 (that.options.useOnWebKit ? webKit : ''), 3260 (that.options.useOnIE ? IE : '') 3261 ].join(';'); 3262 3263 var neededBrowser = browserName.indexOf(currentBrowser) !== -1; 3264 3265 if (neededBrowser) { 3266 ssc_addEvent("mousedown", ssc_mousedown); 3267 if (currentBrowser === 'firefox' || currentBrowser === "msie" || currentBrowser === "netscape") { 3268 ssc_addEvent("wheel", ssc_wheel); 3269 } else { 3270 if (currentBrowser === 'chrome' && parseInt(versionBrowser) >= 61) { 3271 // Use scrollingElement for smooth scrolling using keyboard 3272 currentScrollingElement = document.scrollingElement; 3273 // Here is used native chrome smooth scrolling for wheel. 3274 } else { 3275 ssc_addEvent("mousewheel", ssc_wheel); 3276 } 3277 } 3278 ssc_addEvent("load", ssc_init); 3279 } 3280 }); 3281 3282 this.update = function update(newOptions) { 3283 if (!that.options.keyboardsupport) { 3284 ssc_removeEvent("keydown", ssc_keydown); 3285 } 3286 $.extend(this.options, newOptions); 3287 }; 3288 3289} 3290 3291(function () { 3292 'use strict'; 3293 3294 var _instance; 3295 3296 window._smoothWheelInstance = function () { 3297 if (!_instance) { 3298 _instance = new SmoothWheel(); 3299 } 3300 3301 return _instance; 3302 }; 3303})(); 3304})(window._$, window._$); 3305(function (jQuery, $) { 3306(function ($) { 3307 'use strict'; 3308 3309 var timeout; 3310 $(window).on('resize', function (e, param) { 3311 clearTimeout(timeout); 3312 if (param && param.force) { 3313 stretchToBottom(); 3314 } else { 3315 timeout = setTimeout(stretchToBottom, 25); 3316 } 3317 }); 3318 3319 $(stretchToBottom); 3320 3321 function stretchToBottom() { 3322 var html = document.documentElement, 3323 prevHeight = html.style.height, 3324 body = $('body'); 3325 3326 html.style.height = '100%'; 3327 3328 $('.bd-stretch-to-bottom').each(function() { 3329 var c = $(this), 3330 bh, 3331 mh = 0, 3332 parent; 3333 3334 var target = c.find(c.data('controlSelector')) 3335 .add(c.find(c.data('controlSelector') + ' .bd-stretch-inner').first()); 3336 3337 if (target.length === 0) { 3338 return; 3339 } 3340 3341 target.removeAttr('style'); 3342 bh = body.height(); 3343 3344 var prevMargin = 0; 3345 body.children().each(function() { 3346 var $node = $(this); 3347 if ($node.is(':visible') && $node.css('float') !== 'left' && $node.css('float') !== 'right' && 3348 $node.css('position') !== 'absolute' && $node.css('position') !== 'fixed') { 3349 3350 if (!prevMargin) { 3351 mh += parseFloat($node.css('margin-top')); 3352 } else { 3353 mh += Math.max(parseFloat($node.css('margin-bottom')), prevMargin); 3354 } 3355 3356 mh += $node.outerHeight(); 3357 3358 prevMargin = parseFloat($node.css('margin-bottom')); 3359 3360 if ($.contains(this, target[0]) || this === target[0]) { 3361 parent = $node; 3362 } 3363 } 3364 }); 3365 3366 if (mh < bh && parent) { 3367 var r = bh - mh; 3368 target.css('min-height', (target.outerHeight(true) + r) + 'px'); 3369 } 3370 }); 3371 3372 html.style.height = prevHeight; 3373 } 3374 3375})(jQuery); 3376})(window._$, window._$); 3377(function (jQuery, $) { 3378(function ($) { 3379 'use strict'; 3380 3381 if (!window.isThemlerIframe || !window.isThemlerIframe()) { 3382 $(document).ready(function () { 3383 var controls = $('[data-autoplay=true]');
3384 $(controls).each(function (index, item) { 3385 if (item.src) 3386 item.src = item.src + (item.src.indexOf("?") === -1 ? "?" : "&") + "autoplay=1"; 3387 }); 3388 }); 3389 } 3390})(jQuery); 3391})(window._$, window._$); 3392(function (jQuery, $) { 3393 3394jQuery(function ($) { 3395 'use strict'; 3396 // hide #back-top first 3397 $(".bd-backtotop-1").hide(); 3398 // fade in #back-top 3399 $(function () { 3400 $(window).scroll(function () { 3401 if ($(this).scrollTop() > 100) { 3402 $('.bd-backtotop-1').fadeIn().css('display', 'block'); 3403 } else { 3404 $('.bd-backtotop-1').fadeOut(); 3405 } 3406 }); 3407 }); 3408}); 3409 3410})(window._$, window._$); 3411(function (jQuery, $) { 3412 3413 3414 3415jQuery(function () { 3416 'use strict'; 3417 new window.ThemeLightbox('.bd-postcontent-7 img:not(.no-lightbox)').init(); 3418}); 3419})(window._$, window._$); 3420(function (jQuery, $) { 3421 3422 3423 3424jQuery(function () { 3425 'use strict'; 3426 new window.ThemeLightbox('.bd-postcontent-1 img:not(.no-lightbox)').init(); 3427}); 3428})(window._$, window._$); 3429(function (jQuery, $) { 3430 3431 3432 3433jQuery(function () { 3434 'use strict'; 3435 new window.ThemeLightbox('.bd-postcontent-4 img:not(.no-lightbox)').init(); 3436}); 3437})(window._$, window._$); 3438(function (jQuery, $) { 3439 3440 3441 3442jQuery(function () { 3443 'use strict'; 3444 new window.ThemeLightbox('.bd-postcontent-5 img:not(.no-lightbox)').init(); 3445}); 3446})(window._$, window._$); 3447(function (jQuery, $) { 3448 3449 3450 3451jQuery(function () { 3452 'use strict'; 3453 new window.ThemeLightbox('.bd-postcontent-6 img:not(.no-lightbox)').init(); 3454}); 3455})(window._$, window._$);
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.