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