1/* 2| ---------------------------------------------------------------------------------- 3| TABLE OF CONTENT 4| ---------------------------------------------------------------------------------- 5-SETTING 6-Preloader 7-Scroll Animation 8-Animated Entrances 9-ToTop 10-Video player 11-Loader blocks 12-Accordion 13-Tooltip 14-Switch catalog 15-Zoom Images 16-Select customization 17-Enumerator 18-Datepicker 19-Countdown 20-Main slider 21-Thumbnail sliders 22-OWL Sliders 23-Image animation 24*/ 25 26 27 28$(document).ready(function() { 29 30 "use strict"; 31 32 33///////////////////////////////////////////////////////////////// 34// SETTING 35///////////////////////////////////////////////////////////////// 36 37 38 $( '#dl-menu' ).dlmenu(); 39 40 41 42///////////////////////////////////////////////////////////////// 43// Preloader 44///////////////////////////////////////////////////////////////// 45 46 47 var $preloader = $('#page-preloader'), 48 $spinner = $preloader.find('.spinner-loader'); 49 $spinner.fadeOut(); 50 $preloader.delay(50).fadeOut('slow'); 51 52 53///////////////////////////////////// 54// Scroll Animation 55///////////////////////////////////// 56 57 58if ($('.scrollreveal').length > 0) { 59 window.sr = ScrollReveal({ 60 reset:true, 61 duration: 1000, 62 delay: 200 63 }); 64 65 sr.reveal('.scrollreveal'); 66 } 67 68 69 70////////////////////////////// 71// Parallax(Stellar) 72////////////////////////////// 73 74if ($('.stellar').length > 0) { 75 $.stellar({ 76 responsive: true 77 }); 78} 79 80 81 82////////////////////////////// 83// ToTop 84////////////////////////////// 85 86 $(document).on("click", "#toTop", function (event) { 87 event.preventDefault(); 88 89 $('html, body').animate({ 90 scrollTop: 0 91 }, 300); 92 }); 93 94///////////////////////////////////// 95// Video player 96///////////////////////////////////// 97 98 99if ($('.player').length > 0) { 100 $(".player").flowplayer(); 101} 102 103 104 105///////////////////////////////////// 106// Loader blocks 107///////////////////////////////////// 108 109 110 $( ".js-scroll-next" ).on( "click", function() { 111 112 var hiddenContent = $( ".js-scroll-next + .js-scroll-content") ; 113 114 $(".js-scroll-next").hide() ; 115 hiddenContent.show() ; 116 hiddenContent.addClass("animated"); 117 hiddenContent.addClass("animation-done"); 118 hiddenContent.addClass("bounceInUp"); 119 120 }); 121 122 123 124///////////////////////////////////////////////////////////////// 125// Accordion 126///////////////////////////////////////////////////////////////// 127 128 $(".btn-collapse").on('click', function () { 129 $(this).parents('.panel-group').children('.panel').removeClass('panel-default'); 130 $(this).parents('.panel').addClass('panel-default'); 131 if ($(this).is(".collapsed")) { 132 $('.panel-title').removeClass('panel-passive'); 133 } 134 else {$(this).next().toggleClass('panel-passive'); 135 }; 136 }); 137 138 139 140 141///////////////////////////////////// 142// Tooltip 143///////////////////////////////////// 144 145 146 $('.link-tooltip-1').tooltip({ 147 template: '<div class="tooltip tooltip-1" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', 148 }); 149 $('.link-tooltip-2').tooltip({ 150 template: '<div class="tooltip tooltip-2" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', 151 }); 152 153 154 155///////////////////////////////////// 156// Switch catalog 157///////////////////////////////////// 158 159 160if ($('.btns-switch').length > 0) { 161 $('.btns-switch__item').on( 'click', function() { 162 $('.btns-switch').find('.active').removeClass('active'); 163 $( this ).addClass('active'); 164 }); 165 166 $('.js-view-th').on( 'click', function() { 167 $('.list-goods').addClass('list-goods_list'); 168 }); 169 170 $('.js-view-list').on( 'click', function() { 171 $('.list-goods').removeClass('list-goods_list'); 172 }); 173} 174 175 176 177///////////////////////////////////// 178// Zoom Images 179///////////////////////////////////// 180 181 if ($('.js-zoom-gallery').length > 0) { 182 $('.js-zoom-gallery').each(function() { // the containers for all your galleries 183 $(this).magnificPopup({ 184 delegate: '.js-zoom-gallery__item', // the selector for gallery item 185 type: 'image', 186 gallery: { 187 enabled:true 188 }, 189 mainClass: 'mfp-with-zoom', // this class is for CSS animation below 190 191 zoom: { 192 enabled: true, // By default it's false, so don't forget to enable it 193 194 duration: 300, // duration of the effect, in milliseconds 195 easing: 'ease-in-out', // CSS transition easing function 196 197 // The "opener" function should return the element from which popup will be zoomed in 198 // and to which popup will be scaled down 199 // By defailt it looks for an image tag: 200 opener: function(openerElement) { 201 // openerElement is the element on which popup was initialized, in this case its <a> tag 202 // you don't need to add "opener" option if this code matches your needs, it's defailt one. 203 return openerElement.is('img') ? openerElement : openerElement.find('img'); 204 } 205 } 206 }); 207 }); 208 } 209 210 211 if ($('.js-zoom-images').length > 0) { 212 $('.js-zoom-images').magnificPopup({ 213 type: 'image', 214 mainClass: 'mfp-with-zoom', // this class is for CSS animation below 215 216 zoom: { 217 enabled: true, // By default it's false, so don't forget to enable it 218 219 duration: 300, // duration of the effect, in milliseconds 220 easing: 'ease-in-out', // CSS transition easing function 221 222 // The "opener" function should return the element from which popup will be zoomed in 223 // and to which popup will be scaled down 224 // By defailt it looks for an image tag: 225 opener: function(openerElement) { 226 // openerElement is the element on which popup was initialized, in this case its <a> tag 227 // you don't need to add "opener" option if this code matches your needs, it's defailt one. 228 return openerElement.is('img') ? openerElement : openerElement.find('img'); 229 } 230 } 231 }); 232 233 } 234 235 236 237 238///////////////////////////////////// 239// Select customization 240///////////////////////////////////// 241 242if ($('.selectpicker').length > 0) { 243 244 $('.selectpicker').selectpicker({ 245 style: 'ui-select', 246 styleBase: '' 247 }); 248} 249 250 251 252///////////////////////////////////// 253// Enumerator 254///////////////////////////////////// 255 256// if ($('.enumerator').length > 0) { 257// $(".js-minus_btn").on('click', function() { 258// var inputEl = jQuery(this).parent().children().next(); 259// var qty = inputEl.val(); 260
261// if (jQuery(this).parent().hasClass("js-minus_btn")) 262// qty++; 263// else 264// qty--; 265// if (qty < 1) 266// qty = 1; 267// inputEl.val(qty); 268// }); 269 270 271// $(".js-plus_btn").on('click', function() { 272// var inputEl = jQuery(this).parent().children().next(); 273// var qty = inputEl.val(); 274// if (jQuery(this).hasClass("js-plus_btn")) 275// qty++; 276// else 277// qty--; 278// if (qty < 1) 279// qty = 1; 280// inputEl.val(qty); 281// }); 282// } 283 284 285///////////////////////////////////////////////////////////////// 286//Datepicker 287///////////////////////////////////////////////////////////////// 288 289if ($('.js-pickmeup').length > 0) { 290 $('.js-pickmeup').pickmeup({ 291 flat : true 292 }); 293} 294 295 296 297 298 299//////////////////////////////////////////// 300// Main slider 301/////////////////////////////////////////// 302 303 304 if ($('#main-slider').length > 0) { 305 306 var sliderWidth = $("#main-slider").data("slider-width"); 307 var sliderHeigth = $("#main-slider").data("slider-height"); 308 var sliderArrows = $("#main-slider").data("slider-arrows"); 309 var sliderButtons = $("#main-slider").data("slider-buttons"); 310 311 $( '#main-slider' ).sliderPro({ 312 width: sliderWidth, 313 height: sliderHeigth, 314 arrows: sliderArrows, 315 buttons: sliderButtons, 316 fade: true, 317 fullScreen: true, 318 touchSwipe: false, 319 autoplay: true 320 }); 321 } 322 323 324 325//////////////////////////////////////////// 326// Thumbnail sliders 327/////////////////////////////////////////// 328 329 if ($('.slider-pro').length > 0) { 330 331 $('a[data-toggle="tab"]').on('shown.bs.tab', function(e) { 332 $(".slider-pro").sliderPro("resize"); 333 }); 334 335 $( '.slider-thumbnail' ).sliderPro({ 336 width: 540, 337 height: 540, 338 orientation: 'horizontal', 339 loop: false, 340 arrows: false,
341 buttons: false, 342 thumbnailsPosition: 'bottom', 343 thumbnailPointer: true, 344 thumbnailWidth: 80, 345 thumbnailHeight: 80, 346 thumbnailArrows: true, 347 autoplay: true, 348 breakpoints: { 349 1199: { 350 width: 300, 351 height: 300, 352 thumbnailWidth: 50, 353 thumbnailHeight: 50 354 } 355 } 356 }); 357 358 $( '.slider-thumbnail-2' ).sliderPro({ 359 width: 1780, 360 height: 800, 361 orientation: 'horizontal', 362 loop: false, 363 arrows: true, 364 buttons: false, 365 thumbnailsPosition: 'bottom', 366 thumbnailPointer: true, 367 thumbnailWidth: 100, 368 thumbnailHeight: 60, 369 thumbnailArrows: false, 370 autoplay: true, 371 breakpoints: { 372 767: { 373 thumbnailWidth: 50, 374 thumbnailHeight: 30 375 } 376 } 377 }); 378 379 $( '.slider-thumbnail-3' ).sliderPro({ 380 width: 660, 381 height: 580, 382 orientation: 'horizontal', 383 loop: false, 384 arrows: false, 385 buttons: false, 386 thumbnailsPosition: 'left', 387 thumbnailPointer: true, 388 thumbnailWidth: 80, 389 thumbnailHeight: 80, 390 thumbnailArrows: true, 391 autoplay: true, 392 breakpoints: { 393 767: { 394 thumbnailsPosition: 'bottom' 395 } 396 } 397 }); 398 } 399 400///////////////////////////////////////////////////////////////// 401// OWL Sliders 402///////////////////////////////////////////////////////////////// 403 404 var Core = { 405 406 initialized: false, 407 408 initialize: function() { 409 410 if (this.initialized) return; 411 this.initialized = true; 412 413 this.build(); 414 415 }, 416 417 build: function() { 418 419 // Owl Carousel 420 421 this.initOwlCarousel(); 422 }, 423 initOwlCarousel: function(options) { 424 425 $(".enable-owl-carousel").each(function(i) { 426 var $owl = $(this); 427 428 var itemsData = $owl.data('items'); 429 var centerData = $owl.data('center'); 430 var navigationData = $owl.data('navigation'); 431 var paginationData = $owl.data('pagination'); 432 var marginData = $owl.data('margin'); 433 var singleItemData = $owl.data('single-item'); 434 var autoPlayData = $owl.data('auto-play'); 435 var mainSliderData = $owl.data('main-text-animation'); 436 var afterInitDelay = $owl.data('after-init-delay'); 437 var stopOnHoverData = $owl.data('stop-on-hover'); 438 var min480 = $owl.data('min480'); 439 var min768 = $owl.data('min768'); 440 var min992 = $owl.data('min992'); 441 var min1200 = $owl.data('min1200'); 442 var loopData = $owl.data('loop'); 443 444 $owl.owlCarousel({ 445 responsiveClass:true, 446 nav : navigationData, 447 dots: paginationData, 448 margin : marginData, 449 autoplayTimeout : autoPlayData, 450 autoplayHoverPause: stopOnHoverData, 451 navText : ["<i></i>","<i></i>"], 452 items: itemsData, 453 loop: loopData, 454 autoplay: false, 455 center: centerData, 456 responsive: { 457 0: {items: 1}, 458 768: {items: min768}, 459 992: {items: min992}, 460 1200: {items: min1200} 461 }, 462 afterInit: function(elem){ 463 if(mainSliderData){ 464 setTimeout(function(){ 465 $('.main-slider_zoomIn').css('visibility','visible').removeClass('zoomIn').addClass('zoomIn'); 466 $('.main-slider_fadeInLeft').css('visibility','visible').removeClass('fadeInLeft').addClass('fadeInLeft'); 467 $('.main-slider_fadeInLeftBig').css('visibility','visible').removeClass('fadeInLeftBig').addClass('fadeInLeftBig'); 468 $('.main-slider_fadeInRightBig').css('visibility','visible').removeClass('fadeInRightBig').addClass('fadeInRightBig'); 469 }, afterInitDelay); 470 } 471 }, 472 beforeMove: function(elem){ 473 if(mainSliderData){ 474 $('.main-slider_zoomIn').css('visibility','hidden').removeClass('zoomIn'); 475 $('.main-slider_slideInUp').css('visibility','hidden').removeClass('slideInUp'); 476 $('.main-slider_fadeInLeft').css('visibility','hidden').removeClass('fadeInLeft'); 477 $('.main-slider_fadeInRight').css('visibility','hidden').removeClass('fadeInRight'); 478 $('.main-slider_fadeInLeftBig').css('visibility','hidden').removeClass('fadeInLeftBig'); 479 $('.main-slider_fadeInRightBig').css('visibility','hidden').removeClass('fadeInRightBig'); 480 } 481 }, 482 afterMove: sliderContentAnimate, 483 afterUpdate: sliderContentAnimate, 484 }); 485 }); 486 487 function sliderContentAnimate(elem){ 488 var $elem = elem;
489 var afterMoveDelay = $elem.data('after-move-delay'); 490 var mainSliderData = $elem.data('main-text-animation'); 491 if(mainSliderData){ 492 setTimeout(function(){ 493 $('.main-slider_zoomIn').css('visibility','visible').addClass('zoomIn'); 494 $('.main-slider_slideInUp').css('visibility','visible').addClass('slideInUp'); 495 $('.main-slider_fadeInLeft').css('visibility','visible').addClass('fadeInLeft'); 496 $('.main-slider_fadeInRight').css('visibility','visible').addClass('fadeInRight'); 497 $('.main-slider_fadeInLeftBig').css('visibility','visible').addClass('fadeInLeftBig'); 498 $('.main-slider_fadeInRightBig').css('visibility','visible').addClass('fadeInRightBig'); 499 }, afterMoveDelay); 500 } 501 } 502 }, 503 504 }; 505 506 Core.initialize(); 507 508//////////////////////////////////////////// 509// Image animation 510/////////////////////////////////////////// 511 512(function() { 513 var tiltSettings = [ 514 {}, 515 { 516 movement: { 517 imgWrapper : { 518 translation : {x: 10, y: 10, z: 30}, 519 rotation : {x: 0, y: -10, z: 0}, 520 reverseAnimation : {duration : 200, easing : 'easeOutQuad'} 521 }, 522 lines : { 523 translation : {x: 10, y: 10, z: [0,70]}, 524 rotation : {x: 0, y: 0, z: -2}, 525 reverseAnimation : {duration : 2000, easing : 'easeOutExpo'} 526 }, 527 caption : { 528 rotation : {x: 0, y: 0, z: 2}, 529 reverseAnimation : {duration : 200, easing : 'easeOutQuad'} 530 }, 531 overlay : { 532 translation : {x: 10, y: -10, z: 0}, 533 rotation : {x: 0, y: 0, z: 2}, 534 reverseAnimation : {duration : 2000, easing : 'easeOutExpo'} 535 }, 536 shine : { 537 translation : {x: 100, y: 100, z: 0}, 538 reverseAnimation : {duration : 200, easing : 'easeOutQuad'} 539 } 540 } 541 }, 542 { 543 movement: { 544 imgWrapper : { 545 rotation : {x: -5, y: 10, z: 0}, 546 reverseAnimation : {duration : 900, easing : 'easeOutCubic'} 547 }, 548 caption : { 549 translation : {x: 30, y: 30, z: [0,40]}, 550 rotation : {x: [0,15], y: 0, z: 0}, 551 reverseAnimation : {duration : 1200, easing : 'easeOutExpo'} 552 }, 553 overlay : { 554 translation : {x: 10, y: 10, z: [0,20]}, 555 reverseAnimation : {duration : 1000, easing : 'easeOutExpo'} 556 }, 557 shine : { 558 translation : {x: 100, y: 100, z: 0}, 559 reverseAnimation : {duration : 900, easing : 'easeOutCubic'} 560 } 561 } 562 }, 563 { 564 movement: { 565 imgWrapper : { 566 rotation : {x: -5, y: 10, z: 0}, 567 reverseAnimation : {duration : 50, easing : 'easeOutQuad'} 568 }, 569 caption : { 570 translation : {x: 20, y: 20, z: 0}, 571 reverseAnimation : {duration : 200, easing : 'easeOutQuad'} 572 }, 573 overlay : { 574 translation : {x: 5, y: -5, z: 0}, 575 rotation : {x: 0, y: 0, z: 6}, 576 reverseAnimation : {duration : 1000, easing : 'easeOutQuad'} 577 }, 578 shine : { 579 translation : {x: 50, y: 50, z: 0}, 580 reverseAnimation : {duration : 50, easing : 'easeOutQuad'} 581 } 582 } 583 }, 584 { 585 movement: { 586 imgWrapper : { 587 translation : {x: 0, y: -8, z: 0}, 588 rotation : {x: 3, y: 3, z: 0}, 589 reverseAnimation : {duration : 1200, easing : 'easeOutExpo'} 590 }, 591 lines : { 592 translation : {x: 15, y: 15, z: [0,15]}, 593 reverseAnimation : {duration : 1200, easing : 'easeOutExpo'} 594 }, 595 overlay : { 596 translation : {x: 0, y: 8, z: 0}, 597 reverseAnimation : {duration : 600, easing : 'easeOutExpo'} 598 }, 599 caption : { 600 translation : {x: 10, y: -15, z: 0}, 601 reverseAnimation : {duration : 900, easing : 'easeOutExpo'} 602 }, 603 shine : { 604 translation : {x: 50, y: 50, z: 0}, 605 reverseAnimation : {duration : 1200, easing : 'easeOutExpo'} 606 } 607 } 608 }, 609 { 610 movement: { 611 lines : { 612 translation : {x: -5, y: 5, z: 0}, 613 reverseAnimation : {duration : 1000, easing : 'easeOutExpo'} 614 }, 615 caption : { 616 translation : {x: 15, y: 15, z: 0}, 617 rotation : {x: 0, y: 0, z: 3}, 618 reverseAnimation : {duration : 1500, easing : 'easeOutElastic', elasticity : 700} 619 }, 620 overlay : { 621 translation : {x: 15, y: -15, z: 0}, 622 reverseAnimation : {duration : 500,easing : 'easeOutExpo'} 623 }, 624 shine : { 625 translation : {x: 50, y: 50, z: 0}, 626 reverseAnimation : {duration : 500, easing : 'easeOutExpo'} 627 } 628 } 629 }, 630 { 631 movement: { 632 imgWrapper : { 633 translation : {x: 5, y: 5, z: 0}, 634 reverseAnimation : {duration : 800, easing : 'easeOutQuart'} 635 }, 636 caption : { 637 translation : {x: 10, y: 10, z: [0,50]}, 638 reverseAnimation : {duration : 1000, easing : 'easeOutQuart'} 639 }, 640 shine : { 641 translation : {x: 50, y: 50, z: 0}, 642 reverseAnimation : {duration : 800, easing : 'easeOutQuart'} 643 } 644 } 645 }, 646 { 647 movement: { 648 lines : { 649 translation : {x: 40, y: 40, z: 0}, 650 reverseAnimation : {duration : 1500, easing : 'easeOutElastic'} 651 }, 652 caption : { 653 translation : {x: 20, y: 20, z: 0}, 654 rotation : {x: 0, y: 0, z: -5}, 655 reverseAnimation : {duration : 1000, easing : 'easeOutExpo'} 656 }, 657 overlay : { 658 translation : {x: -30, y: -30, z: 0}, 659 rotation : {x: 0, y: 0, z: 3}, 660 reverseAnimation : {duration : 750, easing : 'easeOutExpo'} 661 }, 662 shine : { 663 translation : {x: 100, y: 100, z: 0}, 664 reverseAnimation : {duration : 750, easing : 'easeOutExpo'} 665 } 666 } 667 }]; 668
669 function init() { 670 var idx = 0; 671 [].slice.call(document.querySelectorAll('.tilter')).forEach(function(el, pos) { 672 idx = pos%2 === 0 ? idx+1 : idx; 673 new TiltFx(el, tiltSettings[idx-1]); 674 }); 675 } 676 677 // Preload all images. 678 imagesLoaded(document.querySelector('body'), function() { 679 document.body.classList.remove('loading'); 680 init(); 681 }); 682 683})(); 684 685 686});
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.