1var $ = jQuery.noConflict(); 2 3$.fn.inlineStyle = function (prop) { 4 return this.prop("style")[$.camelCase(prop)]; 5}; 6 7$.fn.doOnce = function (func) { 8 this.length && func.apply(this); 9 return this; 10} 11 12if ($().infinitescroll) { 13 14 $.extend($.infinitescroll.prototype, { 15 _setup_portfolioinfiniteitemsloader: function infscr_setup_portfolioinfiniteitemsloader() { 16 var opts = this.options, 17 instance = this; 18 // Bind nextSelector link to retrieve 19 $(opts.nextSelector).click(function (e) { 20 if (e.which == 1 && !e.metaKey && !e.shiftKey) { 21 e.preventDefault(); 22 instance.retrieve(); 23 } 24 }); 25 // Define loadingStart to never hide pager 26 instance.options.loading.start = function (opts) { 27 opts.loading.msg 28 .appendTo(opts.loading.selector) 29 .show(opts.loading.speed, function () { 30 instance.beginAjax(opts); 31 }); 32 } 33 }, 34 _showdonemsg_portfolioinfiniteitemsloader: function infscr_showdonemsg_portfolioinfiniteitemsloader() { 35 var opts = this.options, 36 instance = this; 37 //Do all the usual stuff 38 opts.loading.msg 39 .find('img') 40 .hide() 41 .parent() 42 .find('div').html(opts.loading.finishedMsg).animate({opacity: 1}, 2000, function () { 43 $(this).parent().fadeOut('normal'); 44 }); 45 //And also hide the navSelector 46 $(opts.navSelector).fadeOut('normal'); 47 // user provided callback when done 48 opts.errorCallback.call($(opts.contentSelector)[0], 'done'); 49 } 50 }); 51 52} else { 53 console.log('Infinite Scroll not defined.'); 54} 55 56(function () { 57 var lastTime = 0; 58 var vendors = ['ms', 'moz', 'webkit', 'o']; 59 for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { 60 window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; 61 window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] 62 || window[vendors[x] + 'CancelRequestAnimationFrame']; 63 } 64 65 if (!window.requestAnimationFrame) 66 window.requestAnimationFrame = function (callback, element) { 67 var currTime = new Date().getTime(); 68 var timeToCall = Math.max(0, 16 - (currTime - lastTime)); 69 var id = window.setTimeout(function () { 70 callback(currTime + timeToCall); 71 }, 72 timeToCall); 73 lastTime = currTime + timeToCall; 74 return id; 75 }; 76 77 if (!window.cancelAnimationFrame) 78 window.cancelAnimationFrame = function (id) { 79 clearTimeout(id); 80 }; 81}()); 82 83 84 85function debounce(func, wait, immediate) { 86 var timeout, args, context, timestamp, result; 87 return function () { 88 context = this; 89 args = arguments; 90 timestamp = new Date(); 91 var later = function () { 92 var last = (new Date()) - timestamp; 93 if (last < wait) { 94 timeout = setTimeout(later, wait - last); 95 } else { 96 timeout = null; 97 if (!immediate) 98 result = func.apply(context, args); 99 } 100 }; 101 var callNow = immediate && !timeout; 102 if (!timeout) { 103 timeout = setTimeout(later, wait); 104 } 105 if (callNow) 106 result = func.apply(context, args); 107 return result; 108 }; 109} 110 111 112var requesting = false; 113 114var killRequesting = debounce(function () { 115 requesting = false; 116}, 100); 117 118function onScrollSliderParallax() { 119 if (!requesting) { 120 requesting = true; 121 requestAnimationFrame(function () { 122 SEMICOLON.slider.sliderParallax();
123 SEMICOLON.slider.sliderElementsFade(); 124 }); 125 } 126 killRequesting(); 127} 128 129 130 131var SEMICOLON = SEMICOLON || {}; 132 133(function ($) { 134 135 // USE STRICT 136 "use strict"; 137 138 SEMICOLON.initialize = { 139 init: function () { 140 141 SEMICOLON.initialize.responsiveClasses(); 142 SEMICOLON.initialize.imagePreload('.portfolio-item:not(:has(.fslider)) img'); 143 SEMICOLON.initialize.stickyElements(); 144 SEMICOLON.initialize.goToTop(); 145 SEMICOLON.initialize.lazyLoad(); 146 SEMICOLON.initialize.fullScreen(); 147 SEMICOLON.initialize.verticalMiddle(); 148 SEMICOLON.initialize.lightbox(); 149 SEMICOLON.initialize.resizeVideos(); 150 SEMICOLON.initialize.imageFade(); 151 SEMICOLON.initialize.pageTransition(); 152 SEMICOLON.initialize.dataResponsiveClasses(); 153 SEMICOLON.initialize.dataResponsiveHeights(); 154 155 $('.fslider').addClass('preloader2'); 156 157 }, 158 responsiveClasses: function () { 159 160 if (typeof jRespond === 'undefined') { 161 console.log('responsiveClasses: jRespond not Defined.'); 162 return true; 163 } 164 165 var jRes = jRespond([ 166 { 167 label: 'smallest', 168 enter: 0, 169 exit: 479 170 }, { 171 label: 'handheld', 172 enter: 480, 173 exit: 767 174 }, { 175 label: 'tablet', 176 enter: 768, 177 exit: 991 178 }, { 179 label: 'laptop', 180 enter: 992, 181 exit: 1199 182 }, { 183 label: 'desktop', 184 enter: 1200, 185 exit: 10000 186 } 187 ]); 188 jRes.addFunc([ 189 { 190 breakpoint: 'desktop', 191 enter: function () { 192 $body.addClass('device-lg'); 193 }, 194 exit: function () { 195 $body.removeClass('device-lg'); 196 } 197 }, { 198 breakpoint: 'laptop', 199 enter: function () { 200 $body.addClass('device-md'); 201 }, 202 exit: function () { 203 $body.removeClass('device-md'); 204 } 205 }, { 206 breakpoint: 'tablet', 207 enter: function () { 208 $body.addClass('device-sm'); 209 }, 210 exit: function () { 211 $body.removeClass('device-sm'); 212 } 213 }, { 214 breakpoint: 'handheld', 215 enter: function () { 216 $body.addClass('device-xs'); 217 }, 218 exit: function () { 219 $body.removeClass('device-xs'); 220 } 221 }, { 222 breakpoint: 'smallest', 223 enter: function () { 224 $body.addClass('device-xxs'); 225 }, 226 exit: function () { 227 $body.removeClass('device-xxs'); 228 } 229 } 230 ]); 231 }, 232 imagePreload: function (selector, parameters) { 233 var params = { 234 delay: 250, 235 transition: 400, 236 easing: 'linear' 237 }; 238 $.extend(params, parameters); 239 240 $(selector).each(function () { 241 var image = $(this); 242 image.css({visibility: 'hidden', opacity: 0, display: 'block'}); 243 image.wrap('<span class="preloader" />'); 244 image.one("load", function (evt) { 245 $(this).delay(params.delay).css({visibility: 'visible'}).animate({opacity: 1}, params.transition, params.easing, function () { 246 $(this).unwrap('<span class="preloader" />'); 247 }); 248 }).each(function () { 249 if (this.complete) 250 $(this).trigger("load"); 251 }); 252 }); 253 }, 254 verticalMiddle: function () { 255 if ($verticalMiddleEl.length > 0) { 256 $verticalMiddleEl.each(function () { 257 var element = $(this), 258 verticalMiddleH = element.outerHeight(), 259 headerHeight = $header.outerHeight(); 260 261 if (element.parents('#slider').length > 0 && !element.hasClass('ignore-header')) { 262 if ($header.hasClass('transparent-header') && ($body.hasClass('device-lg') || $body.hasClass('device-md'))) { 263 verticalMiddleH = verticalMiddleH - 70; 264 if ($slider.next('#header').length > 0) { 265 verticalMiddleH = verticalMiddleH + headerHeight; 266 } 267 } 268 } 269 270 if ($body.hasClass('device-xs') || $body.hasClass('device-xxs')) { 271 if (element.parents('.full-screen').length && !element.parents('.force-full-screen').length) { 272 if (element.children('.col-padding').length > 0) { 273 element.css({position: 'relative', top: '0', width: 'auto', marginTop: '0'}).addClass('clearfix'); 274 } else { 275 element.css({position: 'relative', top: '0', width: 'auto', marginTop: '0', paddingTop: '60px', paddingBottom: '60px'}).addClass('clearfix'); 276 } 277 } else { 278 element.css({position: 'absolute', top: '50%', width: '100%', paddingTop: '0', paddingBottom: '0', marginTop: -(verticalMiddleH / 2) + 'px'}); 279 } 280 } else { 281 element.css({position: 'absolute', top: '50%', width: '100%', paddingTop: '0', paddingBottom: '0', marginTop: -(verticalMiddleH / 2) + 'px'}); 282 } 283 }); 284 } 285 }, 286 stickyElements: function () { 287 if ($siStickyEl.length > 0) { 288 var siStickyH = $siStickyEl.outerHeight(); 289 $siStickyEl.css({marginTop: -(siStickyH / 2) + 'px'}); 290 } 291 292 if ($dotsMenuEl.length > 0) { 293 var opmdStickyH = $dotsMenuEl.outerHeight(); 294 $dotsMenuEl.css({marginTop: -(opmdStickyH / 2) + 'px'}); 295 } 296 }, 297 goToTop: function () { 298 var elementScrollSpeed = $goToTopEl.attr('data-speed'), 299 elementScrollEasing = $goToTopEl.attr('data-easing'); 300 301 if (!elementScrollSpeed) { 302 elementScrollSpeed = 700; 303 } 304 if (!elementScrollEasing) { 305 elementScrollEasing = 'easeOutQuad'; 306 } 307 308 $goToTopEl.click(function () { 309 $('body,html').stop(true).animate({ 310 'scrollTop': 0 311 }, Number(elementScrollSpeed), elementScrollEasing); 312 return false; 313 }); 314 }, 315 goToTopScroll: function () { 316 var elementMobile = $goToTopEl.attr('data-mobile'), 317 elementOffset = $goToTopEl.attr('data-offset'); 318 319 if (!elementOffset) { 320 elementOffset = 450; 321 } 322 323 if (elementMobile != 'true' && ($body.hasClass('device-xs') || $body.hasClass('device-xxs'))) { 324 return true; 325 } 326 327 if ($window.scrollTop() > Number(elementOffset)) { 328 $goToTopEl.fadeIn(); 329 } else { 330 $goToTopEl.fadeOut(); 331 } 332 }, 333 fullScreen: function () { 334 if ($fullScreenEl.length > 0) { 335 $fullScreenEl.each(function () { 336 var element = $(this), 337 scrHeight = window.innerHeight ? window.innerHeight : $window.height(), 338 negativeHeight = element.attr('data-negative-height'); 339 340 if (element.attr('id') == 'slider') { 341 var sliderHeightOff = $slider.offset().top; 342 scrHeight = scrHeight - sliderHeightOff; 343 if (element.find('.slider-parallax-inner').length > 0) { 344 var transformVal = element.find('.slider-parallax-inner').css('transform'), 345 transformX = transformVal.match(/-?[\d\.]+/g); 346 if (!transformX) { 347 var transformXvalue = 0; 348 } else { 349 var transformXvalue = transformX[5]; 350 } 351 scrHeight = ((window.innerHeight ? window.innerHeight : $window.height()) + Number(transformXvalue)) - sliderHeightOff; 352 } 353 if ($('#slider.with-header').next('#header:not(.transparent-header)').length > 0 && ($body.hasClass('device-lg') || $body.hasClass('device-md'))) { 354 var headerHeightOff = $header.outerHeight(); 355 scrHeight = scrHeight - headerHeightOff; 356 } 357 } 358 if (element.parents('.full-screen').length > 0) { 359 scrHeight = element.parents('.full-screen').height(); 360 } 361 362 if ($body.hasClass('device-xs') || $body.hasClass('device-xxs')) { 363 if (!element.hasClass('force-full-screen')) { 364 scrHeight = 'auto'; 365 } 366 } 367 368 if (negativeHeight) { 369 scrHeight = scrHeight - Number(negativeHeight); 370 } 371 372 element.css('height', scrHeight); 373 if (element.attr('id') == 'slider' && !element.hasClass('canvas-slider-grid')) { 374 if (element.has('.swiper-slide')) { 375 element.find('.swiper-slide').css('height', scrHeight); 376 } 377 } 378 }); 379 } 380 }, 381 maxHeight: function () { 382 if ($commonHeightEl.length > 0) { 383 if ($commonHeightEl.hasClass('customjs')) { 384 return true; 385 } 386 $commonHeightEl.each(function () { 387 var element = $(this); 388 if (element.find('.common-height').length > 0) { 389 SEMICOLON.initialize.commonHeight(element.find('.common-height:not(.customjs)')); 390 } 391 392 SEMICOLON.initialize.commonHeight(element); 393 }); 394 } 395 }, 396 commonHeight: function (element) { 397 var maxHeight = 0; 398 element.children('[class*=col-]').each(function () { 399 var element = $(this).children();
400 if (element.hasClass('max-height')) { 401 maxHeight = element.outerHeight(); 402 } else { 403 if (element.outerHeight() > maxHeight) 404 maxHeight = element.outerHeight(); 405 } 406 }); 407 408 element.children('[class*=col-]').each(function () { 409 $(this).height(maxHeight); 410 }); 411 }, 412 testimonialsGrid: function () { 413 if ($testimonialsGridEl.length > 0) { 414 if ($body.hasClass('device-sm') || $body.hasClass('device-md') || $body.hasClass('device-lg')) { 415 var maxHeight = 0; 416 $testimonialsGridEl.each(function () { 417 $(this).find("li > .testimonial").each(function () { 418 if ($(this).height() > maxHeight) { 419 maxHeight = $(this).height(); 420 } 421 }); 422 $(this).find("li").height(maxHeight); 423 maxHeight = 0; 424 }); 425 } else { 426 $testimonialsGridEl.find("li").css({'height': 'auto'}); 427 } 428 } 429 }, 430 lightbox: function () { 431 432 if (!$().magnificPopup) { 433 console.log('lightbox: Magnific Popup not Defined.'); 434 return true; 435 } 436 437 var $lightboxImageEl = $('[data-lightbox="image"]'), 438 $lightboxGalleryEl = $('[data-lightbox="gallery"]'), 439 $lightboxIframeEl = $('[data-lightbox="iframe"]'), 440 $lightboxInlineEl = $('[data-lightbox="inline"]'), 441 $lightboxAjaxEl = $('[data-lightbox="ajax"]'), 442 $lightboxAjaxGalleryEl = $('[data-lightbox="ajax-gallery"]'); 443 444 if ($lightboxImageEl.length > 0) { 445 $lightboxImageEl.magnificPopup({ 446 type: 'image', 447 closeOnContentClick: true, 448 closeBtnInside: false, 449 fixedContentPos: true, 450 mainClass: 'mfp-no-margins mfp-fade', // class to remove default margin from left and right side 451 image: { 452 verticalFit: true 453 } 454 }); 455 } 456 457 if ($lightboxGalleryEl.length > 0) { 458 $lightboxGalleryEl.each(function () { 459 var element = $(this); 460 461 if (element.find('a[data-lightbox="gallery-item"]').parent('.clone').hasClass('clone')) { 462 element.find('a[data-lightbox="gallery-item"]').parent('.clone').find('a[data-lightbox="gallery-item"]').attr('data-lightbox', ''); 463 } 464 465 element.magnificPopup({ 466 delegate: 'a[data-lightbox="gallery-item"]', 467 type: 'image', 468 closeOnContentClick: true, 469 closeBtnInside: false, 470 fixedContentPos: true, 471 mainClass: 'mfp-no-margins mfp-fade', // class to remove default margin from left and right side 472 image: { 473 verticalFit: true 474 }, 475 gallery: { 476 enabled: true, 477 navigateByImgClick: true, 478 preload: [0, 1] // Will preload 0 - before current, and 1 after the current image 479 } 480 }); 481 }); 482 } 483 484 if ($lightboxIframeEl.length > 0) { 485 $lightboxIframeEl.magnificPopup({ 486 disableOn: 600, 487 type: 'iframe', 488 removalDelay: 160, 489 preloader: false, 490 fixedContentPos: false 491 }); 492 } 493
494 if ($lightboxInlineEl.length > 0) { 495 $lightboxInlineEl.magnificPopup({ 496 type: 'inline', 497 mainClass: 'mfp-no-margins mfp-fade', 498 closeBtnInside: false, 499 fixedContentPos: true 500 }); 501 } 502 503 if ($lightboxAjaxEl.length > 0) { 504 $lightboxAjaxEl.magnificPopup({ 505 type: 'ajax', 506 closeBtnInside: false, 507 callbacks: { 508 ajaxContentAdded: function (mfpResponse) { 509 SEMICOLON.widget.loadFlexSlider(); 510 SEMICOLON.initialize.resizeVideos(); 511 SEMICOLON.widget.masonryThumbs(); 512 }, 513 open: function () { 514 $body.addClass('ohidden'); 515 }, 516 close: function () { 517 $body.removeClass('ohidden'); 518 } 519 } 520 }); 521 } 522 523 if ($lightboxAjaxGalleryEl.length > 0) { 524 $lightboxAjaxGalleryEl.magnificPopup({ 525 delegate: 'a[data-lightbox="ajax-gallery-item"]', 526 type: 'ajax', 527 closeBtnInside: false, 528 gallery: { 529 enabled: true, 530 preload: 0, 531 navigateByImgClick: false 532 }, 533 callbacks: { 534 ajaxContentAdded: function (mfpResponse) { 535 SEMICOLON.widget.loadFlexSlider(); 536 SEMICOLON.initialize.resizeVideos(); 537 SEMICOLON.widget.masonryThumbs(); 538 }, 539 open: function () { 540 $body.addClass('ohidden'); 541 }, 542 close: function () { 543 $body.removeClass('ohidden'); 544 } 545 } 546 }); 547 } 548 }, 549 modal: function () { 550 551 if (!$().magnificPopup) { 552 console.log('modal: Magnific Popup not Defined.'); 553 return true; 554 } 555 556 var $modal = $('.modal-on-load:not(.customjs)'); 557 if ($modal.length > 0) { 558 $modal.each(function () { 559 var element = $(this), 560 elementTarget = element.attr('data-target'), 561 elementTargetValue = elementTarget.split('#')[1], 562 elementDelay = element.attr('data-delay'), 563 elementTimeout = element.attr('data-timeout'), 564 elementAnimateIn = element.attr('data-animate-in'), 565 elementAnimateOut = element.attr('data-animate-out'); 566 567 if (!element.hasClass('enable-cookie')) { 568 $.removeCookie(elementTargetValue); 569 } 570 571 if (element.hasClass('enable-cookie')) { 572 var elementCookie = $.cookie(elementTargetValue); 573 574 if (typeof elementCookie !== 'undefined' && elementCookie == '0') { 575 return true; 576 } 577 } 578 579 if (!elementDelay) { 580 elementDelay = 1500; 581 } else { 582 elementDelay = Number(elementDelay) + 1500; 583 } 584 585 var t = setTimeout(function () { 586 $.magnificPopup.open({ 587 items: {src: elementTarget}, 588 type: 'inline', 589 mainClass: 'mfp-no-margins mfp-fade', 590 closeBtnInside: false, 591 fixedContentPos: true, 592 removalDelay: 500, 593 callbacks: { 594 open: function () { 595 if (elementAnimateIn != '') { 596 $(elementTarget).addClass(elementAnimateIn + ' animated'); 597 } 598 }, 599 beforeClose: function () { 600 if (elementAnimateOut != '') { 601 $(elementTarget).removeClass(elementAnimateIn).addClass(elementAnimateOut); 602 } 603 }, 604 afterClose: function () { 605 if (elementAnimateIn != '' || elementAnimateOut != '') { 606 $(elementTarget).removeClass(elementAnimateIn + ' ' + elementAnimateOut + ' animated'); 607 } 608 if (element.hasClass('enable-cookie')) { 609 $.cookie(elementTargetValue, '0'); 610 } 611 } 612 } 613 }, 0); 614 }, Number(elementDelay)); 615 616 if (elementTimeout != '') { 617 var to = setTimeout(function () { 618 $.magnificPopup.close(); 619 }, Number(elementDelay) + Number(elementTimeout)); 620 } 621 }); 622 } 623 }, 624 resizeVideos: function () { 625 626 if (!$().fitVids) { 627 console.log('resizeVideos: FitVids not Defined.'); 628 return true; 629 } 630 631 $("#content,#footer,#slider:not(.revslider-wrap),.landing-offer-media,.portfolio-ajax-modal,.mega-menu-column").fitVids({ 632 customSelector: "iframe[src^='http://www.dailymotion.com/embed'], iframe[src*='maps.google.com'], iframe[src*='google.com/maps']", 633 ignore: '.no-fv' 634 }); 635 }, 636 imageFade: function () { 637 $('.image_fade').hover(function () { 638 $(this).filter(':not(:animated)').animate({opacity: 0.8}, 400); 639 }, function () { 640 $(this).animate({opacity: 1}, 400); 641 }); 642 }, 643 blogTimelineEntries: function () { 644 $('.post-timeline.grid-2').find('.entry').each(function () { 645 var position = $(this).inlineStyle('left'); 646 if (position == '0px') { 647 $(this).removeClass('alt'); 648 } else { 649 $(this).addClass('alt'); 650 } 651 $(this).find('.entry-timeline').fadeIn(); 652 }); 653 }, 654 pageTransition: function () { 655 if ($body.hasClass('no-transition')) { 656 return true; 657 } 658 659 if (!$().animsition) { 660 $body.addClass('no-transition'); 661 console.log('pageTransition: Animsition not Defined.'); 662 return true; 663 } 664 665 window.onpageshow = function (event) { 666 if (event.persisted) { 667 window.location.reload(); 668 } 669 }; 670 671 var animationIn = $body.attr('data-animation-in'), 672 animationOut = $body.attr('data-animation-out'), 673 durationIn = $body.attr('data-speed-in'), 674 durationOut = $body.attr('data-speed-out'), 675 loaderTimeOut = $body.attr('data-loader-timeout'), 676 loaderStyle = $body.attr('data-loader'), 677 loaderColor = $body.attr('data-loader-color'), 678 loaderStyleHtml = $body.attr('data-loader-html'), 679 loaderBgStyle = '', 680 loaderBorderStyle = '', 681 loaderBgClass = '', 682 loaderBorderClass = '', 683 loaderBgClass2 = '', 684 loaderBorderClass2 = ''; 685 686 if (!animationIn) { 687 animationIn = 'fadeIn'; 688 } 689 if (!animationOut) { 690 animationOut = 'fadeOut'; 691 } 692 if (!durationIn) { 693 durationIn = 1500; 694 } 695 if (!durationOut) { 696 durationOut = 800; 697 } 698 if (!loaderStyleHtml) { 699 loaderStyleHtml = '<div class="css3-spinner-bounce1"></div><div class="css3-spinner-bounce2"></div><div class="css3-spinner-bounce3"></div>'; 700 } 701 702 if (!loaderTimeOut) { 703 loaderTimeOut = false; 704 } else { 705 loaderTimeOut = Number(loaderTimeOut); 706 } 707 708 if (loaderColor) { 709 if (loaderColor == 'theme') { 710 loaderBgClass = ' bgcolor'; 711 loaderBorderClass = ' border-color'; 712 loaderBgClass2 = ' class="bgcolor"'; 713 loaderBorderClass2 = ' class="border-color"'; 714 } else { 715 loaderBgStyle = ' style="background-color:' + loaderColor + ';"'; 716 loaderBorderStyle = ' style="border-color:' + loaderColor + ';"'; 717 } 718 loaderStyleHtml = '<div class="css3-spinner-bounce1' + loaderBgClass + '"' + loaderBgStyle + '></div><div class="css3-spinner-bounce2' + loaderBgClass + '"' + loaderBgStyle + '></div><div class="css3-spinner-bounce3' + loaderBgClass + '"' + loaderBgStyle + '></div>' 719 } 720 721 if (loaderStyle == '2') { 722 loaderStyleHtml = '<div class="css3-spinner-flipper' + loaderBgClass + '"' + loaderBgStyle + '></div>'; 723 } else if (loaderStyle == '3') { 724 loaderStyleHtml = '<div class="css3-spinner-double-bounce1' + loaderBgClass + '"' + loaderBgStyle + '></div><div class="css3-spinner-double-bounce2' + loaderBgClass + '"' + loaderBgStyle + '></div>'; 725 } else if (loaderStyle == '4') { 726 loaderStyleHtml = '<div class="css3-spinner-rect1' + loaderBgClass + '"' + loaderBgStyle + '></div><div class="css3-spinner-rect2' + loaderBgClass + '"' + loaderBgStyle + '></div><div class="css3-spinner-rect3' + loaderBgClass + '"' + loaderBgStyle + '></div><div class="css3-spinner-rect4' + loaderBgClass + '"' + loaderBgStyle + '></div><div class="css3-spinner-rect5' + loaderBgClass + '"' + loaderBgStyle + '></div>'; 727 } else if (loaderStyle == '5') { 728 loaderStyleHtml = '<div class="css3-spinner-cube1' + loaderBgClass + '"' + loaderBgStyle + '></div><div class="css3-spinner-cube2' + loaderBgClass + '"' + loaderBgStyle + '></div>'; 729 } else if (loaderStyle == '6') { 730 loaderStyleHtml = '<div class="css3-spinner-scaler' + loaderBgClass + '"' + loaderBgStyle + '></div>'; 731 } else if (loaderStyle == '7') { 732 loaderStyleHtml = '<div class="css3-spinner-grid-pulse"><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div></div>'; 733 } else if (loaderStyle == '8') { 734 loaderStyleHtml = '<div class="css3-spinner-clip-rotate"><div' + loaderBorderClass2 + loaderBorderStyle + '></div></div>'; 735 } else if (loaderStyle == '9') { 736 loaderStyleHtml = '<div class="css3-spinner-ball-rotate"><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div></div>'; 737 } else if (loaderStyle == '10') { 738 loaderStyleHtml = '<div class="css3-spinner-zig-zag"><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div></div>'; 739 } else if (loaderStyle == '11') { 740 loaderStyleHtml = '<div class="css3-spinner-triangle-path"><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div></div>'; 741 } else if (loaderStyle == '12') { 742 loaderStyleHtml = '<div class="css3-spinner-ball-scale-multiple"><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div></div>'; 743 } else if (loaderStyle == '13') { 744 loaderStyleHtml = '<div class="css3-spinner-ball-pulse-sync"><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div><div' + loaderBgClass2 + loaderBgStyle + '></div></div>'; 745 } else if (loaderStyle == '14') { 746 loaderStyleHtml = '<div class="css3-spinner-scale-ripple"><div' + loaderBorderClass2 + loaderBorderStyle + '></div><div' + loaderBorderClass2 + loaderBorderStyle + '></div><div' + loaderBorderClass2 + loaderBorderStyle + '></div></div>'; 747 } 748 749 $wrapper.animsition({ 750 inClass: animationIn, 751 outClass: animationOut, 752 inDuration: Number(durationIn), 753 outDuration: Number(durationOut), 754 linkElement: '#primary-menu ul li a:not([target="_blank"]):not([href*=#]):not([data-lightbox])', 755 loading: true, 756 loadingParentElement: 'body', 757 loadingClass: 'css3-spinner', 758 loadingHtml: loaderStyleHtml, 759 unSupportCss: [ 760 'animation-duration',
761 '-webkit-animation-duration', 762 '-o-animation-duration' 763 ], 764 overlay: false, 765 overlayClass: 'animsition-overlay-slide', 766 overlayParentElement: 'body', 767 timeOut: loaderTimeOut 768 }); 769 }, 770 lazyLoad: function () { 771 var lazyLoadEl = $('[data-lazyload]'); 772 if (lazyLoadEl.length > 0) { 773 lazyLoadEl.each(function () { 774 var element = $(this), 775 elementImg = element.attr('data-lazyload'); 776 777 element.attr('src', 'images/blank.svg').css({'background': 'url(images/preloader.gif) no-repeat center center #FFF'}); 778 779 element.appear(function () { 780 element.css({'background': 'none'}).removeAttr('width').removeAttr('height').attr('src', elementImg); 781 }, {accX: 0, accY: 120}, 'easeInCubic'); 782 }); 783 } 784 }, 785 topScrollOffset: function () { 786 var topOffsetScroll = 0; 787 788 if (($body.hasClass('device-lg') || $body.hasClass('device-md')) && !SEMICOLON.isMobile.any()) { 789 if ($header.hasClass('sticky-header')) { 790 if ($pagemenu.hasClass('dots-menu')) { 791 topOffsetScroll = 100; 792 } else { 793 topOffsetScroll = 144; 794 } 795 } else { 796 if ($pagemenu.hasClass('dots-menu')) { 797 topOffsetScroll = 140; 798 } else { 799 topOffsetScroll = 184; 800 } 801 } 802 803 if (!$pagemenu.length) { 804 if ($header.hasClass('sticky-header')) { 805 topOffsetScroll = 100; 806 } else { 807 topOffsetScroll = 140; 808 } 809 } 810 } else { 811 topOffsetScroll = 40; 812 } 813 814 return topOffsetScroll; 815 }, 816 defineColumns: function (element) { 817 var column = 4; 818 819 if (element.hasClass('portfolio-full')) { 820 if (element.hasClass('portfolio-3')) 821 column = 3; 822 else if (element.hasClass('portfolio-5')) 823 column = 5; 824 else if (element.hasClass('portfolio-6')) 825 column = 6; 826 else 827 column = 4; 828 829 if ($body.hasClass('device-sm') && (column == 4 || column == 5 || column == 6)) { 830 column = 3; 831 } else if ($body.hasClass('device-xs') && (column == 3 || column == 4 || column == 5 || column == 6)) { 832 column = 2; 833 } else if ($body.hasClass('device-xxs')) { 834 column = 1; 835 } 836 } else if (element.hasClass('masonry-thumbs')) { 837 838 var lgCol = element.attr('data-lg-col'), 839 mdCol = element.attr('data-md-col'), 840 smCol = element.attr('data-sm-col'), 841 xsCol = element.attr('data-xs-col'), 842 xxsCol = element.attr('data-xxs-col'); 843 844 if (element.hasClass('col-2')) 845 column = 2; 846 else if (element.hasClass('col-3')) 847 column = 3; 848 else if (element.hasClass('col-5')) 849 column = 5; 850 else if (element.hasClass('col-6')) 851 column = 6; 852 else 853 column = 4; 854 855 if ($body.hasClass('device-lg')) { 856 if (lgCol) { 857 column = Number(lgCol); 858 } 859 } else if ($body.hasClass('device-md')) { 860 if (mdCol) { 861 column = Number(mdCol); 862 } 863 } else if ($body.hasClass('device-sm')) { 864 if (smCol) { 865 column = Number(smCol); 866 } 867 } else if ($body.hasClass('device-xs')) { 868 if (xsCol) { 869 column = Number(xsCol); 870 } 871 } else if ($body.hasClass('device-xxs')) { 872 if (xxsCol) { 873 column = Number(xxsCol); 874 } 875 } 876 877 } 878 879 return column; 880 }, 881 setFullColumnWidth: function (element) { 882 883 if (!$().isotope) { 884 console.log('setFullColumnWidth: Isotope not Defined.'); 885 return true; 886 } 887 888 element.css({'width': ''}); 889 890 if (element.hasClass('portfolio-full')) { 891 var columns = SEMICOLON.initialize.defineColumns(element); 892 var containerWidth = element.width(); 893 if (containerWidth == (Math.floor(containerWidth / columns) * columns)) { 894 containerWidth = containerWidth - 1; 895 } 896 var postWidth = Math.floor(containerWidth / columns); 897 if ($body.hasClass('device-xxs')) { 898 var deviceSmallest = 1; 899 } else { 900 var deviceSmallest = 0; 901 } 902 element.find(".portfolio-item").each(function (index) { 903 if (deviceSmallest == 0 && $(this).hasClass('wide')) { 904 var elementSize = (postWidth * 2); 905 } else { 906 var elementSize = postWidth; 907 } 908 $(this).css({"width": elementSize + "px"}); 909 }); 910 } else if (element.hasClass('masonry-thumbs')) { 911 var columns = SEMICOLON.initialize.defineColumns(element), 912 containerWidth = element.innerWidth(); 913 914 if (containerWidth == windowWidth) { 915 containerWidth = windowWidth * 1.004; 916 element.css({'width': containerWidth + 'px'}); 917 } 918 919 var postWidth = (containerWidth / columns); 920 921 postWidth = Math.floor(postWidth);
922 923 if ((postWidth * columns) >= containerWidth) { 924 element.css({'margin-right': '-1px'}); 925 } 926 927 element.children('a').css({"width": postWidth + "px"}); 928 929 var firstElementWidth = element.find('a:eq(0)').outerWidth(); 930 931 element.isotope({ 932 masonry: { 933 columnWidth: firstElementWidth 934 } 935 }); 936 937 var bigImageNumbers = element.attr('data-big'); 938 if (bigImageNumbers) { 939 bigImageNumbers = bigImageNumbers.split(","); 940 var bigImageNumber = '', 941 bigi = ''; 942 for (bigi = 0; bigi < bigImageNumbers.length; bigi++) { 943 bigImageNumber = Number(bigImageNumbers[bigi]) - 1; 944 element.find('a:eq(' + bigImageNumber + ')').css({width: firstElementWidth * 2 + 'px'}); 945 } 946 var t = setTimeout(function () { 947 element.isotope('layout'); 948 }, 1000); 949 } 950 } 951 952 }, 953 aspectResizer: function () { 954 var $aspectResizerEl = $('.aspect-resizer'); 955 if ($aspectResizerEl.length > 0) { 956 $aspectResizerEl.each(function () { 957 var element = $(this), 958 elementW = element.inlineStyle('width'), 959 elementH = element.inlineStyle('height'), 960 elementPW = element.parent().innerWidth(); 961 }); 962 } 963 }, 964 dataResponsiveClasses: function () { 965 var $dataClassXxs = $('[data-class-xxs]'), 966 $dataClassXs = $('[data-class-xs]'), 967 $dataClassSm = $('[data-class-sm]'), 968 $dataClassMd = $('[data-class-md]'), 969 $dataClassLg = $('[data-class-lg]'); 970 971 if ($dataClassXxs.length > 0) { 972 $dataClassXxs.each(function () { 973 var element = $(this), 974 elementClass = element.attr('data-class-xxs'), 975 elementClassDelete = element.attr('data-class-xs') + ' ' + element.attr('data-class-sm') + ' ' + element.attr('data-class-md') + ' ' + element.attr('data-class-lg'); 976 977 if ($body.hasClass('device-xxs')) { 978 element.removeClass(elementClassDelete); 979 element.addClass(elementClass); 980 } 981 }); 982 } 983 984 if ($dataClassXs.length > 0) { 985 $dataClassXs.each(function () { 986 var element = $(this), 987 elementClass = element.attr('data-class-xs'), 988 elementClassDelete = element.attr('data-class-xxs') + ' ' + element.attr('data-class-sm') + ' ' + element.attr('data-class-md') + ' ' + element.attr('data-class-lg'); 989 990 if ($body.hasClass('device-xs')) { 991 element.removeClass(elementClassDelete); 992 element.addClass(elementClass); 993 } 994 }); 995 } 996 997 if ($dataClassSm.length > 0) { 998 $dataClassSm.each(function () { 999 var element = $(this), 1000 elementClass = element.attr('data-class-sm'), 1001 elementClassDelete = element.attr('data-class-xxs') + ' ' + element.attr('data-class-xs') + ' ' + element.attr('data-class-md') + ' ' + element.attr('data-class-lg'); 1002 1003 if ($body.hasClass('device-sm')) { 1004 element.removeClass(elementClassDelete); 1005 element.addClass(elementClass); 1006 } 1007 }); 1008 } 1009 1010 if ($dataClassMd.length > 0) { 1011 $dataClassMd.each(function () { 1012 var element = $(this), 1013 elementClass = element.attr('data-class-md'), 1014 elementClassDelete = element.attr('data-class-xxs') + ' ' + element.attr('data-class-xs') + ' ' + element.attr('data-class-sm') + ' ' + element.attr('data-class-lg'); 1015 1016 if ($body.hasClass('device-md')) { 1017 element.removeClass(elementClassDelete); 1018 element.addClass(elementClass); 1019 } 1020 }); 1021 } 1022 1023 if ($dataClassLg.length > 0) { 1024 $dataClassLg.each(function () { 1025 var element = $(this), 1026 elementClass = element.attr('data-class-lg'), 1027 elementClassDelete = element.attr('data-class-xxs') + ' ' + element.attr('data-class-xs') + ' ' + element.attr('data-class-sm') + ' ' + element.attr('data-class-md'); 1028 1029 if ($body.hasClass('device-lg')) { 1030 element.removeClass(elementClassDelete); 1031 element.addClass(elementClass); 1032 } 1033 }); 1034 } 1035 }, 1036 dataResponsiveHeights: function () { 1037 var $dataHeightXxs = $('[data-height-xxs]'), 1038 $dataHeightXs = $('[data-height-xs]'), 1039 $dataHeightSm = $('[data-height-sm]'), 1040 $dataHeightMd = $('[data-height-md]'), 1041 $dataHeightLg = $('[data-height-lg]'); 1042 1043 if ($dataHeightXxs.length > 0) { 1044 $dataHeightXxs.each(function () { 1045 var element = $(this), 1046 elementHeight = element.attr('data-height-xxs'); 1047 1048 if ($body.hasClass('device-xxs')) { 1049 if (elementHeight != '') { 1050 element.css('height', elementHeight); 1051 } 1052 } 1053 }); 1054 } 1055 1056 if ($dataHeightXs.length > 0) { 1057 $dataHeightXs.each(function () { 1058 var element = $(this), 1059 elementHeight = element.attr('data-height-xs'); 1060 1061 if ($body.hasClass('device-xs')) { 1062 if (elementHeight != '') { 1063 element.css('height', elementHeight); 1064 } 1065 } 1066 }); 1067 } 1068 1069 if ($dataHeightSm.length > 0) { 1070 $dataHeightSm.each(function () { 1071 var element = $(this), 1072 elementHeight = element.attr('data-height-sm'); 1073 1074 if ($body.hasClass('device-sm')) { 1075 if (elementHeight != '') { 1076 element.css('height', elementHeight); 1077 } 1078 } 1079 }); 1080 } 1081 1082 if ($dataHeightMd.length > 0) { 1083 $dataHeightMd.each(function () { 1084 var element = $(this), 1085 elementHeight = element.attr('data-height-md'); 1086 1087 if ($body.hasClass('device-md')) { 1088 if (elementHeight != '') { 1089 element.css('height', elementHeight); 1090 } 1091 } 1092 }); 1093 } 1094 1095 if ($dataHeightLg.length > 0) { 1096 $dataHeightLg.each(function () { 1097 var element = $(this), 1098 elementHeight = element.attr('data-height-lg'); 1099 1100 if ($body.hasClass('device-lg')) { 1101 if (elementHeight != '') { 1102 element.css('height', elementHeight); 1103 } 1104 } 1105 }); 1106 } 1107 }, 1108 stickFooterOnSmall: function () { 1109 var windowH = $window.height(), 1110 wrapperH = $wrapper.height(); 1111 1112 if (!$body.hasClass('sticky-footer') && $footer.length > 0 && $wrapper.has('#footer')) { 1113 if (windowH > wrapperH) { 1114 $footer.css({'margin-top': (windowH - wrapperH)}); 1115 } 1116 } 1117 }, 1118 stickyFooter: function () { 1119 if ($body.hasClass('sticky-footer') && $footer.length > 0 && ($body.hasClass('device-lg') || $body.hasClass('device-md'))) { 1120 var stickyFooter = $footer.outerHeight(); 1121 $content.css({'margin-bottom': stickyFooter}); 1122 } else { 1123 $content.css({'margin-bottom': 0}); 1124 } 1125 } 1126 1127 }; 1128 1129 SEMICOLON.header = { 1130 init: function () { 1131 1132 SEMICOLON.header.superfish(); 1133 SEMICOLON.header.menufunctions(); 1134 SEMICOLON.header.fullWidthMenu(); 1135 SEMICOLON.header.overlayMenu(); 1136 SEMICOLON.header.stickyMenu(); 1137 SEMICOLON.header.stickyPageMenu(); 1138 SEMICOLON.header.sideHeader(); 1139 SEMICOLON.header.sidePanel(); 1140 SEMICOLON.header.onePageScroll(); 1141 SEMICOLON.header.onepageScroller(); 1142 SEMICOLON.header.logo(); 1143 SEMICOLON.header.topsearch(); 1144 SEMICOLON.header.topcart(); 1145 1146 }, 1147 superfish: function () { 1148 1149 if ($body.hasClass('device-lg') || $body.hasClass('device-md')) { 1150 $('#primary-menu ul ul, #primary-menu ul .mega-menu-content').css('display', 'block'); 1151 SEMICOLON.header.menuInvert(); 1152 $('#primary-menu ul ul, #primary-menu ul .mega-menu-content').css('display', ''); 1153 } 1154 1155 if (!$().superfish) { 1156 $body.addClass('no-superfish'); 1157 console.log('superfish: Superfish not Defined.'); 1158 return true; 1159 } 1160 1161 $('body:not(.side-header) #primary-menu > ul, body:not(.side-header) #primary-menu > div > ul, .top-links > ul').superfish({ 1162 popUpSelector: 'ul,.mega-menu-content,.top-link-section', 1163 delay: 250, 1164 speed: 350, 1165 animation: {opacity: 'show'}, 1166 animationOut: {opacity: 'hide'},
1167 cssArrows: false, 1168 onShow: function () { 1169 var megaMenuContent = $(this); 1170 if (megaMenuContent.find('.owl-carousel.customjs').length > 0) { 1171 megaMenuContent.find('.owl-carousel').removeClass('customjs'); 1172 SEMICOLON.widget.carousel(); 1173 } 1174 1175 if (megaMenuContent.hasClass('mega-menu-content') && megaMenuContent.find('.widget').length > 0) { 1176 if ($body.hasClass('device-lg') || $body.hasClass('device-md')) { 1177 setTimeout(function () { 1178 SEMICOLON.initialize.commonHeight(megaMenuContent); 1179 }, 200); 1180 } else { 1181 megaMenuContent.children().height(''); 1182 } 1183 } 1184 } 1185 }); 1186 1187 $('body.side-header #primary-menu > ul').superfish({ 1188 popUpSelector: 'ul', 1189 delay: 250, 1190 speed: 350, 1191 animation: {opacity: 'show', height: 'show'}, 1192 animationOut: {opacity: 'hide', height: 'hide'},
1193 cssArrows: false 1194 }); 1195 1196 }, 1197 menuInvert: function () { 1198 1199 $('#primary-menu .mega-menu-content, #primary-menu ul ul').each(function (index, element) { 1200 var $menuChildElement = $(element), 1201 menuChildOffset = $menuChildElement.offset(), 1202 menuChildWidth = $menuChildElement.width(), 1203 menuChildLeft = menuChildOffset.left; 1204 1205 if (windowWidth - (menuChildWidth + menuChildLeft) < 0) { 1206 $menuChildElement.addClass('menu-pos-invert'); 1207 } 1208 }); 1209 1210 }, 1211 menufunctions: function () { 1212 1213 $('#primary-menu ul li:has(ul)').addClass('sub-menu'); 1214 $('.top-links ul li:has(ul) > a, #primary-menu.with-arrows > ul > li:has(ul) > a > div, #primary-menu.with-arrows > div > ul > li:has(ul) > a > div, #page-menu nav ul li:has(ul) > a > div').append('<i class="icon-angle-down"></i>'); 1215 $('.top-links > ul').addClass('clearfix'); 1216 1217 if ($body.hasClass('device-lg') || $body.hasClass('device-md')) { 1218 $('#primary-menu.sub-title > ul > li').hover(function () { 1219 $(this).prev().css({backgroundImage: 'none'}); 1220 }, function () { 1221 $(this).prev().css({backgroundImage: 'url("images/icons/menu-divider.png")'}); 1222 }); 1223 1224 $('#primary-menu.sub-title').children('ul').children('.current').prev().css({backgroundImage: 'none'}); 1225 } 1226 1227 // var responsiveThreshold = $header.attr('data-responsive-under'); 1228 // if( !responsiveThreshold ) { responsiveThreshold = 992; } 1229 1230 // if( windowWidth < Number( responsiveThreshold ) ) { 1231 // $body.addClass('mobile-header-active'); 1232 // } else { 1233 // $body.removeClass('mobile-header-active'); 1234 // } 1235 1236 if (SEMICOLON.isMobile.Android()) { 1237 $('#primary-menu ul li.sub-menu').children('a').on('touchstart', function (e) { 1238 if (!$(this).parent('li.sub-menu').hasClass('sfHover')) { 1239 e.preventDefault(); 1240 } 1241 }); 1242 } 1243 1244 if (SEMICOLON.isMobile.Windows()) { 1245 if ($().superfish) { 1246 $('#primary-menu > ul, #primary-menu > div > ul,.top-links > ul').superfish('destroy').addClass('windows-mobile-menu'); 1247 } else { 1248 $('#primary-menu > ul, #primary-menu > div > ul,.top-links > ul').addClass('windows-mobile-menu'); 1249 console.log('menufunctions: Superfish not defined.'); 1250 } 1251 1252 $('#primary-menu ul li:has(ul)').append('<a href="#" class="wn-submenu-trigger"><i class="icon-angle-down"></i></a>'); 1253 1254 $('#primary-menu ul li.sub-menu').children('a.wn-submenu-trigger').click(function (e) { 1255 $(this).parent().toggleClass('open'); 1256 $(this).parent().find('> ul, > .mega-menu-content').stop(true, true).toggle(); 1257 return false; 1258 }); 1259 } 1260 1261 }, 1262 fullWidthMenu: function () { 1263 if ($body.hasClass('stretched')) { 1264 if ($header.find('.container-fullwidth').length > 0) { 1265 $('.mega-menu .mega-menu-content').css({'width': $wrapper.width() - 120}); 1266 } 1267 if ($header.hasClass('full-header')) { 1268 $('.mega-menu .mega-menu-content').css({'width': $wrapper.width() - 60}); 1269 } 1270 } else { 1271 if ($header.find('.container-fullwidth').length > 0) { 1272 $('.mega-menu .mega-menu-content').css({'width': $wrapper.width() - 120}); 1273 } 1274 if ($header.hasClass('full-header')) { 1275 $('.mega-menu .mega-menu-content').css({'width': $wrapper.width() - 80}); 1276 } 1277 } 1278 }, 1279 overlayMenu: function () { 1280 if ($body.hasClass('overlay-menu')) { 1281 var overlayMenuItem = $('#primary-menu').children('ul').children('li'), 1282 overlayMenuItemHeight = overlayMenuItem.outerHeight(), 1283 overlayMenuItemTHeight = overlayMenuItem.length * overlayMenuItemHeight, 1284 firstItemOffset = ($window.height() - overlayMenuItemTHeight) / 2; 1285 1286 $('#primary-menu').children('ul').children('li:first-child').css({'margin-top': firstItemOffset + 'px'}); 1287 } 1288 }, 1289 stickyMenu: function (headerOffset) { 1290 if ($window.scrollTop() > headerOffset) { 1291 if ($body.hasClass('device-lg') || $body.hasClass('device-md')) { 1292 $('body:not(.side-header) #header:not(.no-sticky)').addClass('sticky-header'); 1293 if (!$headerWrap.hasClass('force-not-dark')) { 1294 $headerWrap.removeClass('not-dark'); 1295 } 1296 SEMICOLON.header.stickyMenuClass(); 1297 } else if ($body.hasClass('device-xs') || $body.hasClass('device-xxs') || $body.hasClass('device-sm')) { 1298 if ($body.hasClass('sticky-responsive-menu')) { 1299 $('#header:not(.no-sticky)').addClass('responsive-sticky-header'); 1300 SEMICOLON.header.stickyMenuClass(); 1301 } 1302 } 1303 } else { 1304 SEMICOLON.header.removeStickyness(); 1305 } 1306 }, 1307 stickyPageMenu: function (pageMenuOffset) { 1308 if ($window.scrollTop() > pageMenuOffset) { 1309 if ($body.hasClass('device-lg') || $body.hasClass('device-md')) { 1310 $('#page-menu:not(.dots-menu,.no-sticky)').addClass('sticky-page-menu'); 1311 } else if ($body.hasClass('device-xs') || $body.hasClass('device-xxs') || $body.hasClass('device-sm')) { 1312 if ($body.hasClass('sticky-responsive-pagemenu')) { 1313 $('#page-menu:not(.dots-menu,.no-sticky)').addClass('sticky-page-menu'); 1314 } 1315 } 1316 } else { 1317 $('#page-menu:not(.dots-menu,.no-sticky)').removeClass('sticky-page-menu'); 1318 } 1319 }, 1320 removeStickyness: function () { 1321 if ($header.hasClass('sticky-header')) { 1322 $('body:not(.side-header) #header:not(.no-sticky)').removeClass('sticky-header'); 1323 $header.removeClass().addClass(oldHeaderClasses); 1324 $headerWrap.removeClass().addClass(oldHeaderWrapClasses); 1325 if (!$headerWrap.hasClass('force-not-dark')) { 1326 $headerWrap.removeClass('not-dark'); 1327 } 1328 SEMICOLON.slider.swiperSliderMenu(); 1329 SEMICOLON.slider.revolutionSliderMenu(); 1330 } 1331 if ($header.hasClass('responsive-sticky-header')) { 1332 $('body.sticky-responsive-menu #header').removeClass('responsive-sticky-header'); 1333 } 1334 if (($body.hasClass('device-xs') || $body.hasClass('device-xxs') || $body.hasClass('device-sm')) && (typeof responsiveMenuClasses === 'undefined')) { 1335 $header.removeClass().addClass(oldHeaderClasses); 1336 $headerWrap.removeClass().addClass(oldHeaderWrapClasses); 1337 if (!$headerWrap.hasClass('force-not-dark')) { 1338 $headerWrap.removeClass('not-dark'); 1339 } 1340 } 1341 }, 1342 sideHeader: function () { 1343 $("#header-trigger").click(function () { 1344 $('body.open-header').toggleClass("side-header-open"); 1345 return false; 1346 }); 1347 }, 1348 sidePanel: function () {
1349 $(".side-panel-trigger").click(function () { 1350 $body.toggleClass("side-panel-open"); 1351 if ($body.hasClass('device-touch')) { 1352 $body.toggleClass("ohidden"); 1353 } 1354 return false; 1355 }); 1356 }, 1357 onePageScroll: function () { 1358 if ($onePageMenuEl.length > 0) { 1359 var onePageSpeed = $onePageMenuEl.attr('data-speed'), 1360 onePageOffset = $onePageMenuEl.attr('data-offset'), 1361 onePageEasing = $onePageMenuEl.attr('data-easing'); 1362 1363 if (!onePageSpeed) { 1364 onePageSpeed = 1000; 1365 } 1366 if (!onePageEasing) { 1367 onePageEasing = 'easeOutQuad'; 1368 } 1369 1370 $onePageMenuEl.find('a[data-href]').click(function () { 1371 var element = $(this), 1372 divScrollToAnchor = element.attr('data-href'), 1373 divScrollSpeed = element.attr('data-speed'), 1374 divScrollOffset = element.attr('data-offset'), 1375 divScrollEasing = element.attr('data-easing'); 1376 1377 if ($(divScrollToAnchor).length > 0) { 1378 1379 if (!onePageOffset) { 1380 var onePageOffsetG = SEMICOLON.initialize.topScrollOffset(); 1381 } else { 1382 var onePageOffsetG = onePageOffset; 1383 } 1384 1385 if (!divScrollSpeed) { 1386 divScrollSpeed = onePageSpeed; 1387 } 1388 if (!divScrollOffset) { 1389 divScrollOffset = onePageOffsetG; 1390 } 1391 if (!divScrollEasing) { 1392 divScrollEasing = onePageEasing; 1393 } 1394 1395 if ($onePageMenuEl.hasClass('no-offset')) { 1396 divScrollOffset = 0; 1397 } 1398 1399 onePageGlobalOffset = Number(divScrollOffset); 1400 1401 $onePageMenuEl.find('li').removeClass('current'); 1402 $onePageMenuEl.find('a[data-href="' + divScrollToAnchor + '"]').parent('li').addClass('current'); 1403 1404 if (windowWidth < 768 || $body.hasClass('overlay-menu')) { 1405 if ($('#primary-menu').find('ul.mobile-primary-menu').length > 0) { 1406 $('#primary-menu > ul.mobile-primary-menu, #primary-menu > div > ul.mobile-primary-menu').toggleClass('show', function () { 1407 $('html,body').stop(true).animate({ 1408 'scrollTop': $(divScrollToAnchor).offset().top - Number(divScrollOffset) 1409 }, Number(divScrollSpeed), divScrollEasing); 1410 }, false); 1411 } else { 1412 $('#primary-menu > ul, #primary-menu > div > ul').toggleClass('show', function () { 1413 $('html,body').stop(true).animate({ 1414 'scrollTop': $(divScrollToAnchor).offset().top - Number(divScrollOffset) 1415 }, Number(divScrollSpeed), divScrollEasing); 1416 }, false); 1417 } 1418 } else { 1419 $('html,body').stop(true).animate({ 1420 'scrollTop': $(divScrollToAnchor).offset().top - Number(divScrollOffset) 1421 }, Number(divScrollSpeed), divScrollEasing); 1422 } 1423 1424 onePageGlobalOffset = Number(divScrollOffset); 1425 } 1426 1427 return false; 1428 }); 1429 } 1430 }, 1431 onepageScroller: function () { 1432 $onePageMenuEl.find('li').removeClass('current'); 1433 $onePageMenuEl.find('a[data-href="#' + SEMICOLON.header.onePageCurrentSection() + '"]').parent('li').addClass('current'); 1434 }, 1435 onePageCurrentSection: function () { 1436 var currentOnePageSection = 'home', 1437 headerHeight = $headerWrap.outerHeight(); 1438 1439 if ($body.hasClass('side-header')) { 1440 headerHeight = 0; 1441 } 1442 1443 $pageSectionEl.each(function (index) { 1444 var h = $(this).offset().top; 1445 var y = $window.scrollTop(); 1446 1447 var offsetScroll = headerHeight + onePageGlobalOffset; 1448 1449 if (y + offsetScroll >= h && y < h + $(this).height() && $(this).attr('id') != currentOnePageSection) { 1450 currentOnePageSection = $(this).attr('id'); 1451 } 1452 }); 1453 1454 return currentOnePageSection; 1455 }, 1456 logo: function () { 1457 if (($header.hasClass('dark') || $body.hasClass('dark')) && !$headerWrap.hasClass('not-dark')) {
1458 if (defaultDarkLogo) { 1459 defaultLogo.find('img').attr('src', defaultDarkLogo); 1460 } 1461 if (retinaDarkLogo) { 1462 retinaLogo.find('img').attr('src', retinaDarkLogo); 1463 } 1464 } else { 1465 if (defaultLogoImg) { 1466 defaultLogo.find('img').attr('src', defaultLogoImg); 1467 } 1468 if (retinaLogoImg) { 1469 retinaLogo.find('img').attr('src', retinaLogoImg); 1470 } 1471 } 1472 if ($header.hasClass('sticky-header')) { 1473 if (defaultStickyLogo) { 1474 defaultLogo.find('img').attr('src', defaultStickyLogo); 1475 } 1476 if (retinaStickyLogo) { 1477 retinaLogo.find('img').attr('src', retinaStickyLogo); 1478 } 1479 } 1480 if ($body.hasClass('device-xs') || $body.hasClass('device-xxs')) { 1481 if (defaultMobileLogo) { 1482 defaultLogo.find('img').attr('src', defaultMobileLogo); 1483 } 1484 if (retinaMobileLogo) { 1485 retinaLogo.find('img').attr('src', retinaMobileLogo); 1486 } 1487 } 1488 }, 1489 stickyMenuClass: function () { 1490 if (stickyMenuClasses) { 1491 var newClassesArray = stickyMenuClasses.split(/ +/); 1492 } else { 1493 var newClassesArray = ''; 1494 } 1495 var noOfNewClasses = newClassesArray.length; 1496 1497 if (noOfNewClasses > 0) { 1498 var i = 0; 1499 for (i = 0; i < noOfNewClasses; i++) { 1500 if (newClassesArray[i] == 'not-dark') { 1501 $header.removeClass('dark'); 1502 $headerWrap.addClass('not-dark'); 1503 } else if (newClassesArray[i] == 'dark') { 1504 $headerWrap.removeClass('not-dark force-not-dark'); 1505 if (!$header.hasClass(newClassesArray[i])) { 1506 $header.addClass(newClassesArray[i]); 1507 } 1508 } else if (!$header.hasClass(newClassesArray[i])) { 1509 $header.addClass(newClassesArray[i]); 1510 } 1511 } 1512 } 1513 }, 1514 responsiveMenuClass: function () { 1515 if ($body.hasClass('device-xs') || $body.hasClass('device-xxs') || $body.hasClass('device-sm')) { 1516 if (responsiveMenuClasses) { 1517 var newClassesArray = responsiveMenuClasses.split(/ +/); 1518 } else { 1519 var newClassesArray = ''; 1520 } 1521 var noOfNewClasses = newClassesArray.length; 1522 1523 if (noOfNewClasses > 0) { 1524 var i = 0; 1525 for (i = 0; i < noOfNewClasses; i++) { 1526 if (newClassesArray[i] == 'not-dark') { 1527 $header.removeClass('dark'); 1528 $headerWrap.addClass('not-dark'); 1529 } else if (newClassesArray[i] == 'dark') { 1530 $headerWrap.removeClass('not-dark force-not-dark'); 1531 if (!$header.hasClass(newClassesArray[i])) { 1532 $header.addClass(newClassesArray[i]); 1533 } 1534 } else if (!$header.hasClass(newClassesArray[i])) { 1535 $header.addClass(newClassesArray[i]); 1536 } 1537 } 1538 } 1539 SEMICOLON.header.logo(); 1540 } 1541 }, 1542 topsocial: function () { 1543 if ($topSocialEl.length > 0) { 1544 if ($body.hasClass('device-md') || $body.hasClass('device-lg')) { 1545 $topSocialEl.show(); 1546 $topSocialEl.find('a').css({width: 40}); 1547 1548 $topSocialEl.find('.ts-text').each(function () { 1549 var $clone = $(this).clone().css({'visibility': 'hidden', 'display': 'inline-block', 'font-size': '13px', 'font-weight': 'bold'}).appendTo($body), 1550 cloneWidth = $clone.innerWidth() + 52; 1551 $(this).parent('a').attr('data-hover-width', cloneWidth);
1552 $clone.remove(); 1553 }); 1554 1555 $topSocialEl.find('a').hover(function () { 1556 if ($(this).find('.ts-text').length > 0) { 1557 $(this).css({width: $(this).attr('data-hover-width')}); 1558 } 1559 }, function () { 1560 $(this).css({width: 40}); 1561 }); 1562 } else { 1563 $topSocialEl.show(); 1564 $topSocialEl.find('a').css({width: 40}); 1565 1566 $topSocialEl.find('a').each(function () { 1567 var topIconTitle = $(this).find('.ts-text').text(); 1568 $(this).attr('title', topIconTitle); 1569 }); 1570 1571 $topSocialEl.find('a').hover(function () { 1572 $(this).css({width: 40}); 1573 }, function () { 1574 $(this).css({width: 40}); 1575 }); 1576 1577 if ($body.hasClass('device-xxs')) { 1578 $topSocialEl.hide(); 1579 $topSocialEl.slice(0, 8).show(); 1580 } 1581 } 1582 } 1583 }, 1584 topsearch: function () { 1585 1586 $(document).on('click', function (event) { 1587 if (!$(event.target).closest('#top-search').length) { 1588 $body.toggleClass('top-search-open', false); 1589 } 1590 if (!$(event.target).closest('#top-cart').length) { 1591 $topCart.toggleClass('top-cart-open', false); 1592 } 1593 if (!$(event.target).closest('#page-menu').length) { 1594 $pagemenu.toggleClass('pagemenu-active', false); 1595 } 1596 if (!$(event.target).closest('#side-panel').length) { 1597 $body.toggleClass('side-panel-open', false); 1598 } 1599 }); 1600 1601 $("#top-search-trigger").click(function (e) { 1602 $body.toggleClass('top-search-open'); 1603 $topCart.toggleClass('top-cart-open', false); 1604 $('#primary-menu > ul, #primary-menu > div > ul').toggleClass("show", false); 1605 $pagemenu.toggleClass('pagemenu-active', false); 1606 if ($body.hasClass('top-search-open')) { 1607 $topSearch.find('input').focus(); 1608 } 1609 e.stopPropagation(); 1610 e.preventDefault(); 1611 }); 1612 1613 }, 1614 topcart: function () { 1615 1616 $("#top-cart-trigger").click(function (e) { 1617 $pagemenu.toggleClass('pagemenu-active', false); 1618 $topCart.toggleClass('top-cart-open'); 1619 e.stopPropagation(); 1620 e.preventDefault(); 1621 }); 1622 1623 } 1624 1625 }; 1626 1627 SEMICOLON.slider = { 1628 init: function () { 1629 1630 SEMICOLON.slider.sliderParallaxDimensions(); 1631 SEMICOLON.slider.sliderRun(); 1632 SEMICOLON.slider.sliderParallax(); 1633 SEMICOLON.slider.sliderElementsFade(); 1634 SEMICOLON.slider.captionPosition(); 1635 1636 }, 1637 sliderParallaxDimensions: function () { 1638 if ($sliderParallaxEl.find('.slider-parallax-inner').length < 1) { 1639 return true; 1640 } 1641 1642 var parallaxElHeight = $sliderParallaxEl.outerHeight(), 1643 parallaxElWidth = $sliderParallaxEl.outerWidth(); 1644 1645 if ($sliderParallaxEl.hasClass('revslider-wrap') || $sliderParallaxEl.find('.carousel-widget').length > 0) { 1646 parallaxElHeight = $sliderParallaxEl.find('.slider-parallax-inner').children().first().outerHeight(); 1647 $sliderParallaxEl.height(parallaxElHeight); 1648 } 1649 1650 $sliderParallaxEl.find('.slider-parallax-inner').height(parallaxElHeight); 1651 1652 if ($body.hasClass('side-header')) { 1653 $sliderParallaxEl.find('.slider-parallax-inner').width(parallaxElWidth); 1654 } 1655 1656 if (!$body.hasClass('stretched')) { 1657 parallaxElWidth = $wrapper.outerWidth(); 1658 $sliderParallaxEl.find('.slider-parallax-inner').width(parallaxElWidth);
1659 } 1660 1661 if (swiperSlider != '') { 1662 swiperSlider.update(true); 1663 } 1664 }, 1665 sliderRun: function () { 1666 1667 if (typeof Swiper === 'undefined') { 1668 console.log('sliderRun: Swiper not Defined.'); 1669 return true; 1670 } 1671 1672 if ($slider.hasClass('customjs')) { 1673 return true; 1674 } 1675 1676 if ($slider.hasClass('swiper_wrapper')) { 1677 1678 var element = $slider.filter('.swiper_wrapper'), 1679 elementDirection = element.attr('data-direction'), 1680 elementSpeed = element.attr('data-speed'), 1681 elementAutoPlay = element.attr('data-autoplay'), 1682 elementLoop = element.attr('data-loop'), 1683 elementEffect = element.attr('data-effect'), 1684 elementGrabCursor = element.attr('data-grab'), 1685 slideNumberTotal = element.find('#slide-number-total'), 1686 slideNumberCurrent = element.find('#slide-number-current'), 1687 sliderVideoAutoPlay = element.attr('data-video-autoplay'); 1688 1689 if (!elementSpeed) { 1690 elementSpeed = 300; 1691 } 1692 if (!elementDirection) { 1693 elementDirection = 'horizontal'; 1694 } 1695 if (elementAutoPlay) { 1696 elementAutoPlay = Number(elementAutoPlay); 1697 } 1698 if (elementLoop == 'true') { 1699 elementLoop = true; 1700 } else { 1701 elementLoop = false; 1702 } 1703 if (!elementEffect) { 1704 elementEffect = 'slide'; 1705 } 1706 if (elementGrabCursor == 'false') { 1707 elementGrabCursor = false; 1708 } else { 1709 elementGrabCursor = true; 1710 } 1711 if (sliderVideoAutoPlay == 'false') { 1712 sliderVideoAutoPlay = false; 1713 } else { 1714 sliderVideoAutoPlay = true; 1715 } 1716 1717 if (element.find('.swiper-pagination').length > 0) { 1718 var elementPagination = '.swiper-pagination', 1719 elementPaginationClickable = true; 1720 } else { 1721 var elementPagination = '', 1722 elementPaginationClickable = false; 1723 } 1724 1725 var elementNavNext = '#slider-arrow-right', 1726 elementNavPrev = '#slider-arrow-left'; 1727 1728 swiperSlider = new Swiper(element.find('.swiper-parent'), { 1729 direction: elementDirection, 1730 speed: Number(elementSpeed), 1731 autoplay: elementAutoPlay, 1732 loop: elementLoop, 1733 effect: elementEffect, 1734 slidesPerView: 1, 1735 grabCursor: elementGrabCursor, 1736 pagination: elementPagination, 1737 paginationClickable: elementPaginationClickable, 1738 prevButton: elementNavPrev, 1739 nextButton: elementNavNext, 1740 onInit: function (swiper) { 1741 SEMICOLON.slider.sliderParallaxDimensions(); 1742 element.find('.yt-bg-player').removeClass('customjs'); 1743 SEMICOLON.widget.youtubeBgVideo(); 1744 $('.swiper-slide-active [data-caption-animate]').each(function () { 1745 var $toAnimateElement = $(this), 1746 toAnimateDelay = $toAnimateElement.attr('data-caption-delay'), 1747 toAnimateDelayTime = 0; 1748 if (toAnimateDelay) { 1749 toAnimateDelayTime = Number(toAnimateDelay) + 750; 1750 } else { 1751 toAnimateDelayTime = 750; 1752 } 1753 if (!$toAnimateElement.hasClass('animated')) { 1754 $toAnimateElement.addClass('not-animated'); 1755 var elementAnimation = $toAnimateElement.attr('data-caption-animate'); 1756 setTimeout(function () { 1757 $toAnimateElement.removeClass('not-animated').addClass(elementAnimation + ' animated'); 1758 }, toAnimateDelayTime); 1759 } 1760 }); 1761 $('[data-caption-animate]').each(function () { 1762 var $toAnimateElement = $(this), 1763 elementAnimation = $toAnimateElement.attr('data-caption-animate'); 1764 if ($toAnimateElement.parents('.swiper-slide').hasClass('swiper-slide-active')) { 1765 return true; 1766 } 1767 $toAnimateElement.removeClass('animated').removeClass(elementAnimation).addClass('not-animated'); 1768 }); 1769 SEMICOLON.slider.swiperSliderMenu(); 1770 }, 1771 onSlideChangeStart: function (swiper) { 1772 if (slideNumberCurrent.length > 0) { 1773 if (elementLoop == true) { 1774 slideNumberCurrent.html(Number(element.find('.swiper-slide.swiper-slide-active').attr('data-swiper-slide-index')) + 1); 1775 } else { 1776 slideNumberCurrent.html(swiperSlider.activeIndex + 1); 1777 } 1778 } 1779 $('[data-caption-animate]').each(function () { 1780 var $toAnimateElement = $(this), 1781 elementAnimation = $toAnimateElement.attr('data-caption-animate'); 1782 if ($toAnimateElement.parents('.swiper-slide').hasClass('swiper-slide-active')) { 1783 return true; 1784 } 1785 $toAnimateElement.removeClass('animated').removeClass(elementAnimation).addClass('not-animated'); 1786 }); 1787 SEMICOLON.slider.swiperSliderMenu(); 1788 }, 1789 onSlideChangeEnd: function (swiper) { 1790 element.find('.swiper-slide').each(function () { 1791 if (element.find('video').length > 0 && sliderVideoAutoPlay == true) { 1792 element.find('video').get(0).pause(); 1793 } 1794 if (element.find('.yt-bg-player:not(.customjs)').length > 0) { 1795 element.find('.yt-bg-player:not(.customjs)').YTPPause(); 1796 } 1797 }); 1798 element.find('.swiper-slide:not(".swiper-slide-active")').each(function () { 1799 if (element.find('video').length > 0) { 1800 if (element.find('video').get(0).currentTime != 0) { 1801 element.find('video').get(0).currentTime = 0; 1802 } 1803 } 1804 if (element.find('.yt-bg-player:not(.customjs)').length > 0) { 1805 element.find('.yt-bg-player:not(.customjs)').getPlayer().seekTo(element.find('.yt-bg-player:not(.customjs)').attr('data-start')); 1806 } 1807 }); 1808 if (element.find('.swiper-slide.swiper-slide-active').find('video').length > 0 && sliderVideoAutoPlay == true) { 1809 element.find('.swiper-slide.swiper-slide-active').find('video').get(0).play(); 1810 } 1811 if (element.find('.swiper-slide.swiper-slide-active').find('.yt-bg-player:not(.customjs)').length > 0) { 1812 element.find('.swiper-slide.swiper-slide-active').find('.yt-bg-player:not(.customjs)').YTPPlay(); 1813 } 1814 1815 element.find('.swiper-slide.swiper-slide-active [data-caption-animate]').each(function () { 1816 var $toAnimateElement = $(this), 1817 toAnimateDelay = $toAnimateElement.attr('data-caption-delay'), 1818 toAnimateDelayTime = 0; 1819 if (toAnimateDelay) { 1820 toAnimateDelayTime = Number(toAnimateDelay) + 300; 1821 } else { 1822 toAnimateDelayTime = 300; 1823 } 1824 if (!$toAnimateElement.hasClass('animated')) { 1825 $toAnimateElement.addClass('not-animated'); 1826 var elementAnimation = $toAnimateElement.attr('data-caption-animate'); 1827 setTimeout(function () { 1828 $toAnimateElement.removeClass('not-animated').addClass(elementAnimation + ' animated'); 1829 }, toAnimateDelayTime); 1830 } 1831 }); 1832 } 1833 }); 1834 1835 if (slideNumberCurrent.length > 0) { 1836 if (elementLoop == true) { 1837 slideNumberCurrent.html(Number(element.find('.swiper-slide.swiper-slide-active').attr('data-swiper-slide-index')) + 1); 1838 } else { 1839 slideNumberCurrent.html(swiperSlider.activeIndex + 1); 1840 } 1841 } 1842 if (slideNumberTotal.length > 0) { 1843 slideNumberTotal.html(element.find('.swiper-slide:not(.swiper-slide-duplicate)').length); 1844 } 1845 1846 } 1847 }, 1848 sliderParallaxOffset: function () { 1849 var sliderParallaxOffsetTop = 0; 1850 var headerHeight = $header.outerHeight(); 1851 if ($body.hasClass('side-header') || $header.hasClass('transparent-header')) { 1852 headerHeight = 0; 1853 } 1854 if ($pageTitle.length > 0) { 1855 var pageTitleHeight = $pageTitle.outerHeight(); 1856 sliderParallaxOffsetTop = pageTitleHeight + headerHeight; 1857 } else { 1858 sliderParallaxOffsetTop = headerHeight; 1859 } 1860 1861 if ($slider.next('#header').length > 0) { 1862 sliderParallaxOffsetTop = 0; 1863 } 1864 1865 return sliderParallaxOffsetTop; 1866 }, 1867 sliderParallax: function () { 1868 1869 if ($sliderParallaxEl.length < 1) { 1870 return true; 1871 } 1872 1873 var parallaxOffsetTop = SEMICOLON.slider.sliderParallaxOffset(), 1874 parallaxElHeight = $sliderParallaxEl.outerHeight(); 1875 1876 if (($body.hasClass('device-lg') || $body.hasClass('device-md')) && !SEMICOLON.isMobile.any()) { 1877 if ((parallaxElHeight + parallaxOffsetTop + 50) > $window.scrollTop()) { 1878 $sliderParallaxEl.addClass('slider-parallax-visible').removeClass('slider-parallax-invisible'); 1879 if ($window.scrollTop() > parallaxOffsetTop) { 1880 if ($sliderParallaxEl.find('.slider-parallax-inner').length > 0) { 1881 var tranformAmount = (($window.scrollTop() - parallaxOffsetTop) * -.4).toFixed(0), 1882 tranformAmount2 = (($window.scrollTop() - parallaxOffsetTop) * -.15).toFixed(0); 1883 $sliderParallaxEl.find('.slider-parallax-inner').css({'transform': 'translateY(' + tranformAmount + 'px)'}); 1884 $('.slider-parallax .slider-caption,.ei-title').css({'transform': 'translateY(' + tranformAmount2 + 'px)'}); 1885 } else { 1886 var tranformAmount = (($window.scrollTop() - parallaxOffsetTop) / 1.5).toFixed(0), 1887 tranformAmount2 = (($window.scrollTop() - parallaxOffsetTop) / 7).toFixed(0); 1888 $sliderParallaxEl.css({'transform': 'translateY(' + tranformAmount + 'px)'}); 1889 $('.slider-parallax .slider-caption,.ei-title').css({'transform': 'translateY(' + -tranformAmount2 + 'px)'}); 1890 } 1891 } else { 1892 if ($sliderParallaxEl.find('.slider-parallax-inner').length > 0) { 1893 $('.slider-parallax-inner,.slider-parallax .slider-caption,.ei-title').css({'transform': 'translateY(0px)'}); 1894 } else { 1895 $('.slider-parallax,.slider-parallax .slider-caption,.ei-title').css({'transform': 'translateY(0px)'}); 1896 } 1897 } 1898 } else { 1899 $sliderParallaxEl.addClass('slider-parallax-invisible').removeClass('slider-parallax-visible'); 1900 } 1901 if (requesting) { 1902 requestAnimationFrame(function () { 1903 SEMICOLON.slider.sliderParallax();
1904 SEMICOLON.slider.sliderElementsFade(); 1905 }); 1906 } 1907 } else { 1908 if ($sliderParallaxEl.find('.slider-parallax-inner').length > 0) { 1909 $('.slider-parallax-inner,.slider-parallax .slider-caption,.ei-title').css({'transform': 'translateY(0px)'}); 1910 } else { 1911 $('.slider-parallax,.slider-parallax .slider-caption,.ei-title').css({'transform': 'translateY(0px)'}); 1912 } 1913 } 1914 }, 1915 sliderElementsFade: function () { 1916 1917 if ($sliderParallaxEl.length > 0) { 1918 if (($body.hasClass('device-lg') || $body.hasClass('device-md')) && !SEMICOLON.isMobile.any()) { 1919 var parallaxOffsetTop = SEMICOLON.slider.sliderParallaxOffset(), 1920 parallaxElHeight = $sliderParallaxEl.outerHeight(); 1921 if ($slider.length > 0) { 1922 if ($header.hasClass('transparent-header') || $('body').hasClass('side-header')) { 1923 var tHeaderOffset = 100; 1924 } else { 1925 var tHeaderOffset = 0; 1926 } 1927 $sliderParallaxEl.find('#slider-arrow-left,#slider-arrow-right,.vertical-middle:not(.no-fade),.slider-caption,.ei-title,.camera_prev,.camera_next').css({'opacity': 1 - ((($window.scrollTop() - tHeaderOffset) * 1.85) / parallaxElHeight)}); 1928 } 1929 } else { 1930 $sliderParallaxEl.find('#slider-arrow-left,#slider-arrow-right,.vertical-middle:not(.no-fade),.slider-caption,.ei-title,.camera_prev,.camera_next').css({'opacity': 1}); 1931 } 1932 } 1933 }, 1934 captionPosition: function () { 1935 $slider.find('.slider-caption:not(.custom-caption-pos)').each(function () { 1936 var scapHeight = $(this).outerHeight(); 1937 var scapSliderHeight = $slider.outerHeight(); 1938 if ($(this).parents('#slider').prev('#header').hasClass('transparent-header') && ($body.hasClass('device-lg') || $body.hasClass('device-md'))) { 1939 if ($(this).parents('#slider').prev('#header').hasClass('floating-header')) { 1940 $(this).css({top: (scapSliderHeight + 160 - scapHeight) / 2 + 'px'}); 1941 } else { 1942 $(this).css({top: (scapSliderHeight + 100 - scapHeight) / 2 + 'px'}); 1943 } 1944 } else { 1945 $(this).css({top: (scapSliderHeight - scapHeight) / 2 + 'px'}); 1946 } 1947 }); 1948 }, 1949 swiperSliderMenu: function (onWinLoad) { 1950 onWinLoad = typeof onWinLoad !== 'undefined' ? onWinLoad : false; 1951 if ($body.hasClass('device-lg') || $body.hasClass('device-md')) { 1952 var activeSlide = $slider.find('.swiper-slide.swiper-slide-active'); 1953 SEMICOLON.slider.headerSchemeChanger(activeSlide, onWinLoad); 1954 } 1955 }, 1956 revolutionSliderMenu: function (onWinLoad) { 1957 onWinLoad = typeof onWinLoad !== 'undefined' ? onWinLoad : false; 1958 if ($body.hasClass('device-lg') || $body.hasClass('device-md')) { 1959 var activeSlide = $slider.find('.active-revslide'); 1960 SEMICOLON.slider.headerSchemeChanger(activeSlide, onWinLoad); 1961 } 1962 }, 1963 headerSchemeChanger: function (activeSlide, onWinLoad) { 1964 if (activeSlide.length > 0) { 1965 var darkExists = false; 1966 if (activeSlide.hasClass('dark')) { 1967 if (oldHeaderClasses) { 1968 var oldClassesArray = oldHeaderClasses.split(/ +/); 1969 } else { 1970 var oldClassesArray = ''; 1971 } 1972 var noOfOldClasses = oldClassesArray.length; 1973 1974 if (noOfOldClasses > 0) { 1975 var i = 0; 1976 for (i = 0; i < noOfOldClasses; i++) {
1977 if (oldClassesArray[i] == 'dark' && onWinLoad == true) { 1978 darkExists = true; 1979 break; 1980 } 1981 } 1982 } 1983 $('#header.transparent-header:not(.sticky-header,.semi-transparent,.floating-header)').addClass('dark'); 1984 if (!darkExists) { 1985 $('#header.transparent-header.sticky-header,#header.transparent-header.semi-transparent.sticky-header,#header.transparent-header.floating-header.sticky-header').removeClass('dark'); 1986 } 1987 $headerWrap.removeClass('not-dark'); 1988 } else { 1989 if ($body.hasClass('dark')) { 1990 activeSlide.addClass('not-dark'); 1991 $('#header.transparent-header:not(.semi-transparent,.floating-header)').removeClass('dark'); 1992 $('#header.transparent-header:not(.sticky-header,.semi-transparent,.floating-header)').find('#header-wrap').addClass('not-dark'); 1993 } else { 1994 $('#header.transparent-header:not(.semi-transparent,.floating-header)').removeClass('dark'); 1995 $headerWrap.removeClass('not-dark'); 1996 } 1997 } 1998 SEMICOLON.header.logo(); 1999 } 2000 }, 2001 owlCaptionInit: function () { 2002 if ($owlCarouselEl.length > 0) { 2003 $owlCarouselEl.each(function () { 2004 var element = $(this); 2005 if (element.find('.owl-dot').length > 0) { 2006 element.addClass('with-carousel-dots'); 2007 } 2008 }); 2009 } 2010 } 2011 2012 }; 2013 2014 SEMICOLON.portfolio = { 2015 init: function () { 2016 2017 SEMICOLON.portfolio.ajaxload(); 2018 2019 }, 2020 gridInit: function ($container) { 2021 2022 if (!$().isotope) { 2023 console.log('gridInit: Isotope not Defined.'); 2024 return true; 2025 } 2026 2027 if ($container.length < 1) { 2028 return true; 2029 } 2030 if ($container.hasClass('customjs')) { 2031 return true; 2032 } 2033 2034 $container.each(function () { 2035 var element = $(this), 2036 elementTransition = element.attr('data-transition'), 2037 elementLayoutMode = element.attr('data-layout'); 2038 2039 if (!elementTransition) { 2040 elementTransition = '0.65s'; 2041 } 2042 2043 if (!elementLayoutMode) { 2044 elementLayoutMode = 'masonry'; 2045 } 2046 2047 setTimeout(function () { 2048 if (element.hasClass('portfolio')) { 2049 element.isotope({ 2050 layoutMode: elementLayoutMode, 2051 transitionDuration: elementTransition, 2052 masonry: { 2053 columnWidth: element.find('.portfolio-item:not(.wide)')[0] 2054 } 2055 }); 2056 } else { 2057 element.isotope({ 2058 layoutMode: elementLayoutMode, 2059 transitionDuration: elementTransition 2060 }); 2061 } 2062 }, 300); 2063 }); 2064 }, 2065 filterInit: function () { 2066 2067 if (!$().isotope) { 2068 console.log('filterInit: Isotope not Defined.'); 2069 return true; 2070 } 2071 2072 if ($portfolioFilter.length < 1) { 2073 return true; 2074 } 2075 if ($portfolioFilter.hasClass('customjs')) { 2076 return true; 2077 } 2078 2079 $portfolioFilter.each(function () { 2080 var element = $(this), 2081 elementContainer = element.attr('data-container'), 2082 elementActiveClass = element.attr('data-active-class'); 2083 2084 if (!elementActiveClass) { 2085 elementActiveClass = 'activeFilter'; 2086 } 2087 2088 element.find('a').click(function () { 2089 element.find('li').removeClass(elementActiveClass); 2090 $(this).parent('li').addClass(elementActiveClass); 2091 var selector = $(this).attr('data-filter'); 2092 $(elementContainer).isotope({filter: selector}); 2093 return false; 2094 }); 2095 }); 2096 }, 2097 shuffleInit: function () { 2098 2099 if (!$().isotope) { 2100 console.log('shuffleInit: Isotope not Defined.'); 2101 return true; 2102 } 2103 2104 if ($('.portfolio-shuffle').length < 1) { 2105 return true; 2106 } 2107 2108 $('.portfolio-shuffle').click(function () { 2109 var element = $(this), 2110 elementContainer = element.attr('data-container'); 2111 2112 $(elementContainer).isotope('shuffle'); 2113 }); 2114 }, 2115 portfolioDescMargin: function () { 2116 var $portfolioOverlayEl = $('.portfolio-overlay'); 2117 if ($portfolioOverlayEl.length > 0) { 2118 $portfolioOverlayEl.each(function () { 2119 var element = $(this); 2120 if (element.find('.portfolio-desc').length > 0) { 2121 var portfolioOverlayHeight = element.outerHeight(); 2122 var portfolioOverlayDescHeight = element.find('.portfolio-desc').outerHeight(); 2123 if (element.find('a.left-icon').length > 0 || element.find('a.right-icon').length > 0 || element.find('a.center-icon').length > 0) { 2124 var portfolioOverlayIconHeight = 40 + 20; 2125 } else { 2126 var portfolioOverlayIconHeight = 0; 2127 } 2128 var portfolioOverlayMiddleAlign = (portfolioOverlayHeight - portfolioOverlayDescHeight - portfolioOverlayIconHeight) / 2 2129 element.find('.portfolio-desc').css({'margin-top': portfolioOverlayMiddleAlign}); 2130 } 2131 }); 2132 } 2133 }, 2134 arrange: function () { 2135 if ($portfolio.length > 0) { 2136 $portfolio.each(function () { 2137 var element = $(this); 2138 SEMICOLON.initialize.setFullColumnWidth(element); 2139 }); 2140 } 2141 }, 2142 ajaxload: function () { 2143 $('.portfolio-ajax .portfolio-item a.center-icon').click(function (e) { 2144 var portPostId = $(this).parents('.portfolio-item').attr('id'); 2145 if (!$(this).parents('.portfolio-item').hasClass('portfolio-active')) { 2146 SEMICOLON.portfolio.loadItem(portPostId, prevPostPortId); 2147 } 2148 e.preventDefault(); 2149 }); 2150 }, 2151 newNextPrev: function (portPostId) { 2152 var portNext = SEMICOLON.portfolio.getNextItem(portPostId);
2153 var portPrev = SEMICOLON.portfolio.getPrevItem(portPostId); 2154 $('#next-portfolio').attr('data-id', portNext); 2155 $('#prev-portfolio').attr('data-id', portPrev); 2156 }, 2157 loadItem: function (portPostId, prevPostPortId, getIt) { 2158 if (!getIt) { 2159 getIt = false; 2160 } 2161 var portNext = SEMICOLON.portfolio.getNextItem(portPostId); 2162 var portPrev = SEMICOLON.portfolio.getPrevItem(portPostId); 2163 if (getIt == false) { 2164 SEMICOLON.portfolio.closeItem(); 2165 $portfolioAjaxLoader.fadeIn(); 2166 var portfolioDataLoader = $('#' + portPostId).attr('data-loader'); 2167 $portfolioDetailsContainer.load(portfolioDataLoader, {portid: portPostId, portnext: portNext, portprev: portPrev}, 2168 function () { 2169 SEMICOLON.portfolio.initializeAjax(portPostId); 2170 SEMICOLON.portfolio.openItem(); 2171 $portfolioItems.removeClass('portfolio-active'); 2172 $('#' + portPostId).addClass('portfolio-active'); 2173 }); 2174 } 2175 }, 2176 closeItem: function () { 2177 if ($portfolioDetails && $portfolioDetails.height() > 32) { 2178 $portfolioAjaxLoader.fadeIn(); 2179 $portfolioDetails.find('#portfolio-ajax-single').fadeOut('600', function () { 2180 $(this).remove(); 2181 }); 2182 $portfolioDetails.removeClass('portfolio-ajax-opened'); 2183 } 2184 }, 2185 openItem: function () { 2186 var noOfImages = $portfolioDetails.find('img').length; 2187 var noLoaded = 0; 2188 2189 if (noOfImages > 0) { 2190 $portfolioDetails.find('img').on('load', function () { 2191 noLoaded++; 2192 var topOffsetScroll = SEMICOLON.initialize.topScrollOffset(); 2193 if (noOfImages === noLoaded) { 2194 $portfolioDetailsContainer.css({'display': 'block'}); 2195 $portfolioDetails.addClass('portfolio-ajax-opened'); 2196 $portfolioAjaxLoader.fadeOut(); 2197 var t = setTimeout(function () { 2198 SEMICOLON.widget.loadFlexSlider(); 2199 SEMICOLON.initialize.lightbox(); 2200 SEMICOLON.initialize.resizeVideos(); 2201 SEMICOLON.widget.masonryThumbs(); 2202 $('html,body').stop(true).animate({ 2203 'scrollTop': $portfolioDetails.offset().top - topOffsetScroll 2204 }, 900, 'easeOutQuad'); 2205 }, 500); 2206 } 2207 }); 2208 } else { 2209 var topOffsetScroll = SEMICOLON.initialize.topScrollOffset(); 2210 $portfolioDetailsContainer.css({'display': 'block'}); 2211 $portfolioDetails.addClass('portfolio-ajax-opened'); 2212 $portfolioAjaxLoader.fadeOut(); 2213 var t = setTimeout(function () { 2214 SEMICOLON.widget.loadFlexSlider(); 2215 SEMICOLON.initialize.lightbox(); 2216 SEMICOLON.initialize.resizeVideos(); 2217 SEMICOLON.widget.masonryThumbs(); 2218 $('html,body').stop(true).animate({ 2219 'scrollTop': $portfolioDetails.offset().top - topOffsetScroll 2220 }, 900, 'easeOutQuad'); 2221 }, 500); 2222 } 2223 }, 2224 getNextItem: function (portPostId) { 2225 var portNext = ''; 2226 var hasNext = $('#' + portPostId).next(); 2227 if (hasNext.length != 0) { 2228 portNext = hasNext.attr('id'); 2229 } 2230 return portNext; 2231 }, 2232 getPrevItem: function (portPostId) { 2233 var portPrev = ''; 2234 var hasPrev = $('#' + portPostId).prev(); 2235 if (hasPrev.length != 0) { 2236 portPrev = hasPrev.attr('id'); 2237 } 2238 return portPrev; 2239 }, 2240 initializeAjax: function (portPostId) { 2241 prevPostPortId = $('#' + portPostId); 2242 2243 $('#next-portfolio, #prev-portfolio').click(function () { 2244 var portPostId = $(this).attr('data-id'); 2245 $portfolioItems.removeClass('portfolio-active'); 2246 $('#' + portPostId).addClass('portfolio-active'); 2247 SEMICOLON.portfolio.loadItem(portPostId, prevPostPortId); 2248 return false; 2249 }); 2250 2251 $('#close-portfolio').click(function () { 2252 $portfolioDetailsContainer.fadeOut('600', function () { 2253 $portfolioDetails.find('#portfolio-ajax-single').remove(); 2254 }); 2255 $portfolioDetails.removeClass('portfolio-ajax-opened'); 2256 $portfolioItems.removeClass('portfolio-active'); 2257 return false; 2258 }); 2259 } 2260 2261 }; 2262 2263 SEMICOLON.widget = { 2264 init: function () { 2265 2266 SEMICOLON.widget.animations(); 2267 SEMICOLON.widget.youtubeBgVideo(); 2268 SEMICOLON.widget.tabs(); 2269 SEMICOLON.widget.tabsJustify(); 2270 SEMICOLON.widget.toggles();
2271 SEMICOLON.widget.accordions(); 2272 SEMICOLON.widget.counter(); 2273 SEMICOLON.widget.roundedSkill(); 2274 SEMICOLON.widget.progress(); 2275 SEMICOLON.widget.twitterFeed(); 2276 SEMICOLON.widget.flickrFeed(); 2277 SEMICOLON.widget.instagramPhotos('36286274.b9e559e.4824cbc1d0c94c23827dc4a2267a9f6b', 'b9e559ec7c284375bf41e9a9fb72ae01'); 2278 SEMICOLON.widget.dribbbleShots('01530280af335d298e756ed8ef786c8c4e92a50b88e53a185531b1a639e768b8'); 2279 SEMICOLON.widget.navTree(); 2280 SEMICOLON.widget.textRotater(); 2281 SEMICOLON.widget.carousel(); 2282 SEMICOLON.widget.linkScroll(); 2283 SEMICOLON.widget.contactForm(); 2284 SEMICOLON.widget.subscription(); 2285 SEMICOLON.widget.quickContact(); 2286 SEMICOLON.widget.cookieNotify(); 2287 SEMICOLON.widget.extras(); 2288 2289 }, 2290 parallax: function () { 2291 2292 if (!$.stellar) { 2293 console.log('parallax: Stellar not Defined.'); 2294 return true; 2295 } 2296 2297 if ($parallaxEl.length > 0 || $parallaxPageTitleEl.length > 0 || $parallaxPortfolioEl.length > 0) { 2298 if (!SEMICOLON.isMobile.any()) { 2299 $.stellar({ 2300 horizontalScrolling: false, 2301 verticalOffset: 150 2302 }); 2303 } else { 2304 $parallaxEl.addClass('mobile-parallax'); 2305 $parallaxPageTitleEl.addClass('mobile-parallax'); 2306 $parallaxPortfolioEl.addClass('mobile-parallax'); 2307 } 2308 } 2309 }, 2310 animations: function () { 2311 2312 if (!$().appear) { 2313 console.log('animations: Appear not Defined.'); 2314 return true; 2315 } 2316 2317 var $dataAnimateEl = $('[data-animate]'); 2318 if ($dataAnimateEl.length > 0) { 2319 if ($body.hasClass('device-lg') || $body.hasClass('device-md') || $body.hasClass('device-sm')) { 2320 $dataAnimateEl.each(function () { 2321 var element = $(this), 2322 animationOut = element.attr('data-animate-out'), 2323 animationDelay = element.attr('data-delay'), 2324 animationDelayOut = element.attr('data-delay-out'), 2325 animationDelayTime = 0, 2326 animationDelayOutTime = 3000; 2327 2328 if (element.parents('.fslider.no-thumbs-animate').length > 0) { 2329 return true; 2330 } 2331 2332 if (animationDelay) { 2333 animationDelayTime = Number(animationDelay) + 500; 2334 } else { 2335 animationDelayTime = 500; 2336 } 2337 if (animationOut && animationDelayOut) { 2338 animationDelayOutTime = Number(animationDelayOut) + animationDelayTime; 2339 } 2340 2341 if (!element.hasClass('animated')) { 2342 element.addClass('not-animated'); 2343 var elementAnimation = element.attr('data-animate'); 2344 element.appear(function () { 2345 setTimeout(function () { 2346 element.removeClass('not-animated').addClass(elementAnimation + ' animated'); 2347 }, animationDelayTime); 2348 2349 if (animationOut) { 2350 setTimeout(function () { 2351 element.removeClass(elementAnimation).addClass(animationOut); 2352 }, animationDelayOutTime); 2353 } 2354 }, {accX: 0, accY: -120}, 'easeInCubic'); 2355 } 2356 }); 2357 } 2358 } 2359 }, 2360 loadFlexSlider: function () { 2361 2362 if (!$().flexslider) { 2363 console.log('loadFlexSlider: FlexSlider not Defined.'); 2364 return true; 2365 } 2366 2367 var $flexSliderEl = $('.fslider:not(.customjs)').find('.flexslider'); 2368 if ($flexSliderEl.length > 0) { 2369 $flexSliderEl.each(function () { 2370 var $flexsSlider = $(this), 2371 flexsAnimation = $flexsSlider.parent('.fslider').attr('data-animation'), 2372 flexsEasing = $flexsSlider.parent('.fslider').attr('data-easing'), 2373 flexsDirection = $flexsSlider.parent('.fslider').attr('data-direction'), 2374 flexsSlideshow = $flexsSlider.parent('.fslider').attr('data-sli
2374deshow'), 2375 flexsPause = $flexsSlider.parent('.fslider').attr('data-pause'), 2376 flexsSpeed = $flexsSlider.parent('.fslider').attr('data-speed'), 2377 flexsVideo = $flexsSlider.parent('.fslider').attr('data-video'), 2378 flexsPagi = $flexsSlider.parent('.fslider').attr('data-pagi'), 2379 flexsArrows = $flexsSlider.parent('.fslider').attr('data-arrows'), 2380 flexsThumbs = $flexsSlider.parent('.fslider').attr('data-thumbs'), 2381 flexsHover = $flexsSlider.parent('.fslider').attr('data-hover'), 2382 flexsSheight = $flexsSlider.parent('.fslider').attr('data-smooth-height'), 2383 flexsUseCSS = false; 2384 2385 if (!flexsAnimation) { 2386 flexsAnimation = 'slide'; 2387 } 2388 if (!flexsEasing || flexsEasing == 'swing') { 2389 flexsEasing = 'swing'; 2390 flexsUseCSS = true; 2391 } 2392 if (!flexsDirection) { 2393 flexsDirection = 'horizontal'; 2394 } 2395 if (!flexsSlideshow) { 2396 flexsSlideshow = true; 2397 } else { 2398 flexsSlideshow = false; 2399 } 2400 if (!flexsPause) { 2401 flexsPause = 5000; 2402 } 2403 if (!flexsSpeed) { 2404 flexsSpeed = 600; 2405 } 2406 if (!flexsVideo) { 2407 flexsVideo = false; 2408 } 2409 if (flexsSheight == 'false') { 2410 flexsSheight = false; 2411 } else { 2412 flexsSheight = true; 2413 } 2414 if (flexsDirection == 'vertical') { 2415 flexsSheight = false; 2416 } 2417 if (flexsPagi == 'false') { 2418 flexsPagi = false; 2419 } else { 2420 flexsPagi = true; 2421 } 2422 if (flexsThumbs == 'true') { 2423 flexsPagi = 'thumbnails'; 2424 } else { 2425 flexsPagi = flexsPagi; 2426 } 2427 if (flexsArrows == 'false') { 2428 flexsArrows = false; 2429 } else { 2430 flexsArrows = true; 2431 } 2432 if (flexsHover == 'false') { 2433 flexsHover = false; 2434 } else { 2435 flexsHover = true; 2436 } 2437 2438 $flexsSlider.flexslider({ 2439 selector: ".slider-wrap > .slide", 2440 animation: flexsAnimation, 2441 easing: flexsEasing, 2442 direction: flexsDirection, 2443 slideshow: flexsSlideshow, 2444 slideshowSpeed: Number(flexsPause), 2445 animationSpeed: Number(flexsSpeed), 2446 pauseOnHover: flexsHover, 2447 video: flexsVideo, 2448 controlNav: flexsPagi, 2449 directionNav: flexsArrows, 2450 smoothHeight: flexsSheight, 2451 useCSS: flexsUseCSS, 2452 start: function (slider) { 2453 SEMICOLON.widget.animations(); 2454 SEMICOLON.initialize.verticalMiddle(); 2455 slider.parent().removeClass('preloader2'); 2456 var t = setTimeout(function () { 2457 $('.grid-container').isotope('layout'); 2458 }, 1200); 2459 SEMICOLON.initialize.lightbox(); 2460 $('.flex-prev').html('<i class="icon-angle-left"></i>'); 2461 $('.flex-next').html('<i class="icon-angle-right"></i>'); 2462 SEMICOLON.portfolio.portfolioDescMargin(); 2463 }, 2464 after: function () { 2465 if ($('.grid-container').hasClass('portfolio-full')) { 2466 $('.grid-container.portfolio-full').isotope('layout'); 2467 SEMICOLON.portfolio.portfolioDescMargin(); 2468 } 2469 } 2470 }); 2471 }); 2472 } 2473 }, 2474 html5Video: function () { 2475 var videoEl = $('.video-wrap:has(video)'); 2476 if (videoEl.length > 0) { 2477 videoEl.each(function () { 2478 var element = $(this), 2479 elementVideo = element.find('video'), 2480 outerContainerWidth = element.outerWidth(), 2481 outerContainerHeight = element.outerHeight(), 2482 innerVideoWidth = elementVideo.outerWidth(), 2483 innerVideoHeight = elementVideo.outerHeight(); 2484 2485 if (innerVideoHeight < outerContainerHeight) { 2486 var videoAspectRatio = innerVideoWidth / innerVideoHeight, 2487 newVideoWidth = outerContainerHeight * videoAspectRatio, 2488 innerVideoPosition = (newVideoWidth - outerContainerWidth) / 2; 2489 elementVideo.css({'width': newVideoWidth + 'px', 'height': outerContainerHeight + 'px', 'left': -innerVideoPosition + 'px'}); 2490 } else { 2491 var innerVideoPosition = (innerVideoHeight - outerContainerHeight) / 2; 2492 elementVideo.css({'width': innerVideoWidth + 'px', 'height': innerVideoHeight + 'px', 'top': -innerVideoPosition + 'px'}); 2493 } 2494 2495 if (SEMICOLON.isMobile.any()) { 2496 var placeholderImg = elementVideo.attr('poster'); 2497 2498 if (placeholderImg != '') { 2499 element.append('<div class="video-placeholder" style="background-image: url(' + placeholderImg + ');"></div>') 2500 } 2501 } 2502 }); 2503 } 2504 }, 2505 youtubeBgVideo: function () { 2506 2507 if (!$().mb_YTPlayer) { 2508 console.log('youtubeBgVideo: YoutubeBG Plugin not Defined.'); 2509 return true; 2510 } 2511 2512 if ($youtubeBgPlayerEl.hasClass('customjs')) { 2513 return true; 2514 } 2515 2516 if ($youtubeBgPlayerEl.length > 0) { 2517 $youtubeBgPlayerEl.each(function () { 2518 var element = $(this), 2519 ytbgVideo = element.attr('data-video'), 2520 ytbgMute = element.attr('data-mute'), 2521 ytbgRatio = element.attr('data-ratio'), 2522 ytbgQuality = element.attr('data-quality'), 2523 ytbgOpacity = element.attr('data-opacity'), 2524 ytbgContainer = element.attr('data-container'), 2525 ytbgOptimize = element.attr('data-optimize'), 2526 ytbgLoop = element.attr('data-loop'), 2527 ytbgVolume = element.attr('data-volume'), 2528 ytbgStart = element.attr('data-start'), 2529 ytbgStop = element.attr('data-stop'), 2530 ytbgAutoPlay = element.attr('data-autoplay'), 2531 ytbgFullScreen = element.attr('data-fullscreen'); 2532 2533 if (ytbgMute == 'false') { 2534 ytbgMute = false; 2535 } else { 2536 ytbgMute = true; 2537 } 2538 if (!ytbgRatio) { 2539 ytbgRatio = '16/9'; 2540 } 2541 if (!ytbgQuality) { 2542 ytbgQuality = 'hd720'; 2543 } 2544 if (!ytbgOpacity) { 2545 ytbgOpacity = 1; 2546 } 2547 if (!ytbgContainer) { 2548 ytbgContainer = 'self'; 2549 } 2550 if (ytbgOptimize == 'false') { 2551 ytbgOptimize = false; 2552 } else { 2553 ytbgOptimize = true; 2554 } 2555 if (ytbgLoop == 'false') { 2556 ytbgLoop = false; 2557 } else { 2558 ytbgLoop = true; 2559 } 2560 if (!ytbgVolume) { 2561 ytbgVolume = 1; 2562 } 2563 if (!ytbgStart) { 2564 ytbgStart = 0; 2565 } 2566 if (!ytbgStop) { 2567 ytbgStop = 0; 2568 } 2569 if (ytbgAutoPlay == 'false') { 2570 ytbgAutoPlay = false; 2571 } else { 2572 ytbgAutoPlay = true; 2573 } 2574 if (ytbgFullScreen == 'true') { 2575 ytbgFullScreen = true; 2576 } else { 2577 ytbgFullScreen = false; 2578 } 2579 2580 element.mb_YTPlayer({ 2581 videoURL: ytbgVideo, 2582 mute: ytbgMute, 2583 ratio: ytbgRatio, 2584 quality: ytbgQuality, 2585 opacity: Number(ytbgOpacity), 2586 containment: ytbgContainer, 2587 optimizeDisplay: ytbgOptimize, 2588 loop: ytbgLoop, 2589 vol: Number(ytbgVolume), 2590 startAt: Number(ytbgStart), 2591 stopAt: Number(ytbgStop), 2592 autoplay: ytbgAutoPlay, 2593 realfullscreen: ytbgFullScreen, 2594 showYTLogo: false, 2595 showControls: false 2596 }); 2597 }); 2598 } 2599 }, 2600 tabs: function () { 2601 2602 if (!$().tabs) { 2603 console.log('tabs: Tabs not Defined.'); 2604 return true; 2605 } 2606 2607 var $tabs = $('.tabs:not(.customjs)'); 2608 if ($tabs.length > 0) { 2609 $tabs.each(function () { 2610 var element = $(this), 2611 elementSpeed = element.attr('data-speed'), 2612 tabActive = element.attr('data-active'); 2613 2614 if (!elementSpeed) { 2615 elementSpeed = 400; 2616 } 2617 if (!tabActive) { 2618 tabActive = 0; 2619 } else { 2620 tabActive = tabActive - 1; 2621 } 2622 2623 element.tabs({ 2624 active: Number(tabActive), 2625 show: { 2626 effect: "fade", 2627 duration: Number(elementSpeed) 2628 } 2629 }); 2630 }); 2631 } 2632 }, 2633 tabsJustify: function () { 2634 if (!$('body').hasClass('device-xxs') && !$('body').hasClass('device-xs')) { 2635 var $tabsJustify = $('.tabs.tabs-justify'); 2636 if ($tabsJustify.length > 0) { 2637 $tabsJustify.each(function () { 2638 var element = $(this), 2639 elementTabs = element.find('.tab-nav > li'), 2640 elementTabsNo = elementTabs.length, 2641 elementContainer = 0, 2642 elementWidth = 0; 2643 2644 if (element.hasClass('tabs-bordered') || element.hasClass('tabs-bb')) { 2645 elementContainer = element.find('.tab-nav').outerWidth(); 2646 } else { 2647 if (element.find('tab-nav').hasClass('tab-nav2')) { 2648 elementContainer = element.find('.tab-nav').outerWidth() - (elementTabsNo * 10); 2649 } else { 2650 elementContainer = element.find('.tab-nav').outerWidth() - 30; 2651 } 2652 } 2653 2654 elementWidth = Math.floor(elementContainer / elementTabsNo); 2655 elementTabs.css({'width': elementWidth + 'px'}); 2656 2657 }); 2658 } 2659 } else { 2660 $('.tabs.tabs-justify').find('.tab-nav > li').css({'width': 'auto'}); 2661 } 2662 }, 2663 toggles: function () { 2664 var $toggle = $('.toggle'); 2665 if ($toggle.length > 0) { 2666 $toggle.each(function () { 2667 var element = $(this), 2668 elementState = element.attr('data-state'); 2669 2670 if (elementState != 'open') { 2671 element.children('.togglec').hide(); 2672 } else { 2673 element.children('.togglet').addClass("toggleta"); 2674 } 2675 2676 element.children('.togglet').click(function () { 2677 $(this).toggleClass('toggleta').next('.togglec').slideToggle(300); 2678 return true; 2679 }); 2680 }); 2681 } 2682 }, 2683 accordions: function () { 2684 var $accordionEl = $('.accordion'); 2685 if ($accordionEl.length > 0) { 2686 $accordionEl.each(function () { 2687 var element = $(this), 2688 elementState = element.attr('data-state'), 2689 accordionActive = element.attr('data-active'); 2690 2691 if (!accordionActive) { 2692 accordionActive = 0; 2693 } else { 2694 accordionActive = accordionActive - 1; 2695 } 2696 2697 element.find('.acc_content').hide(); 2698 2699 if (elementState != 'closed') { 2700 element.find('.acctitle:eq(' + Number(accordionActive) + ')').addClass('acctitlec').next().show(); 2701 } 2702 2703 element.find('.acctitle').click(function () { 2704 if ($(this).next().is(':hidden')) { 2705 element.find('.acctitle').removeClass('acctitlec').next().slideUp("normal"); 2706 $(this).toggleClass('acctitlec').next().slideDown("normal"); 2707 } 2708 return false; 2709 }); 2710 }); 2711 } 2712 }, 2713 counter: function () { 2714 2715 if (!$().appear) { 2716 console.log('counter: Appear not Defined.'); 2717 return true; 2718 } 2719 2720 if (!$().countTo) { 2721 console.log('counter: countTo not Defined.'); 2722 return true; 2723 } 2724 2725 var $counterEl = $('.counter:not(.counter-instant)'); 2726 if ($counterEl.length > 0) { 2727 $counterEl.each(function () { 2728 var element = $(this); 2729 var counterElementComma = $(this).find('span').attr('data-comma'); 2730 if (!counterElementComma) { 2731 counterElementComma = false; 2732 } else { 2733 counterElementComma = true; 2734 } 2735 if ($body.hasClass('device-lg') || $body.hasClass('device-md')) { 2736 element.appear(function () { 2737 SEMICOLON.widget.runCounter(element, counterElementComma); 2738 if (element.parents('.common-hei
2738ght')) { 2739 SEMICOLON.initialize.maxHeight(); 2740 } 2741 }, {accX: 0, accY: -120}, 'easeInCubic'); 2742 } else { 2743 SEMICOLON.widget.runCounter(element, counterElementComma); 2744 } 2745 }); 2746 } 2747 }, 2748 runCounter: function (counterElement, counterElementComma) { 2749 if (counterElementComma == true) { 2750 counterElement.find('span').countTo({ 2751 formatter: function (value, options) { 2752 value = value.toFixed(options.decimals); 2753 value = value.replace(/\B(?=(\d{3})+(?!\d))/g, ','); 2754 return value; 2755 } 2756 }); 2757 } else { 2758 counterElement.find('span').countTo(); 2759 } 2760 }, 2761 roundedSkill: function () { 2762 2763 if (!$().appear) { 2764 console.log('roundedSkill: Appear not Defined.'); 2765 return true; 2766 } 2767 2768 if (!$().easyPieChart) { 2769 console.log('roundedSkill: EasyPieChart not Defined.'); 2770 return true; 2771 } 2772 2773 var $roundedSkillEl = $('.rounded-skill'); 2774 if ($roundedSkillEl.length > 0) { 2775 $roundedSkillEl.each(function () { 2776 var element = $(this); 2777 2778 var roundSkillSize = element.attr('data-size'); 2779 var roundSkillSpeed = element.attr('data-speed'); 2780 var roundSkillWidth = element.attr('data-width'); 2781 var roundSkillColor = element.attr('data-color'); 2782 var roundSkillTrackColor = element.attr('data-trackcolor'); 2783 2784 if (!roundSkillSize) { 2785 roundSkillSize = 140; 2786 } 2787 if (!roundSkillSpeed) { 2788 roundSkillSpeed = 2000; 2789 } 2790 if (!roundSkillWidth) { 2791 roundSkillWidth = 8; 2792 } 2793 if (!roundSkillColor) { 2794 roundSkillColor = '#0093BF'; 2795 } 2796 if (!roundSkillTrackColor) { 2797 roundSkillTrackColor = 'rgba(0,0,0,0.04)'; 2798 } 2799 2800 var properties = {roundSkillSize: roundSkillSize, roundSkillSpeed: roundSkillSpeed, roundSkillWidth: roundSkillWidth, roundSkillColor: roundSkillColor, roundSkillTrackColor: roundSkillTrackColor}; 2801 2802 if ($body.hasClass('device-lg') || $body.hasClass('device-md')) { 2803 element.css({'width': roundSkillSize + 'px', 'height': roundSkillSize + 'px', 'line-height': roundSkillSize + 'px'}).animate({opacity: 0}, 10); 2804 element.appear(function () { 2805 if (!element.hasClass('skills-animated')) { 2806 var t = setTimeout(function () { 2807 element.css({opacity: 1}); 2808 }, 100); 2809 SEMICOLON.widget.runRoundedSkills(element, properties); 2810 element.addClass('skills-animated'); 2811 } 2812 }, {accX: 0, accY: -120}, 'easeInCubic'); 2813 } else { 2814 SEMICOLON.widget.runRoundedSkills(element, properties); 2815 } 2816 }); 2817 } 2818 }, 2819 runRoundedSkills: function (element, properties) { 2820 element.easyPieChart({ 2821 size: Number(properties.roundSkillSize), 2822 animate: Number(properties.roundSkillSpeed), 2823 scaleColor: false, 2824 trackColor: properties.roundSkillTrackColor, 2825 lineWidth: Number(properties.roundSkillWidth), 2826 lineCap: 'square', 2827 barColor: properties.roundSkillColor 2828 }); 2829 }, 2830 progress: function () { 2831 2832 if (!$().appear) { 2833 console.log('progress: Appear not Defined.'); 2834 return true; 2835 } 2836 2837 var $progressEl = $('.progress'); 2838 if ($progressEl.length > 0) { 2839 $progressEl.each(function () { 2840 var element = $(this), 2841 skillsBar = element.parent('li'), 2842 skillValue = skillsBar.attr('data-percent'); 2843 2844 if ($body.hasClass('device-lg') || $body.hasClass('device-md')) { 2845 element.appear(function () { 2846 if (!skillsBar.hasClass('skills-animated')) { 2847 element.find('.counter-instant span').countTo(); 2848 skillsBar.find('.progress').css({width: skillValue + "%"}).addClass('skills-animated'); 2849 } 2850 }
2850, {accX: 0, accY: -120}, 'easeInCubic'); 2851 } else { 2852 element.find('.counter-instant span').countTo(); 2853 skillsBar.find('.progress').css({width: skillValue + "%"}); 2854 } 2855 }); 2856 } 2857 }, 2858 twitterFeed: function () { 2859 2860 if (typeof sm_format_twitter === 'undefined') { 2861 console.log('twitterFeed: sm_format_twitter() not Defined.'); 2862 return true; 2863 } 2864 2865 if (typeof sm_format_twitter3 === 'undefined') { 2866 console.log('twitterFeed: sm_format_twitter3() not Defined.'); 2867 return true; 2868 } 2869 2870 var $twitterFeedEl = $('.twitter-feed'); 2871 if ($twitterFeedEl.length > 0) { 2872 $twitterFeedEl.each(function () { 2873 var element = $(this), 2874 twitterFeedUser = element.attr('data-username'), 2875 twitterFeedCount = element.attr('data-count'), 2876 twitterFeedLoader = element.attr('data-loader'); 2877 2878 if (!twitterFeedUser) { 2879 twitterFeedUser = 'twitter' 2880 } 2881 if (!twitterFeedCount) { 2882 twitterFeedCount = 3 2883 } 2884 if (!twitterFeedLoader) { 2885 twitterFeedLoader = 'include/twitter/tweets.php'; 2886 } 2887 2888 $.getJSON(twitterFeedLoader + '&username=' + twitterFeedUser + '&count=' + twitterFeedCount, function (tweets) { 2889 if (element.hasClass('fslider')) { 2890 element.find(".slider-wrap").html(sm_format_twitter3(tweets)).promise().done(function () { 2891 var timer = setInterval(function () { 2892 if (element.find('.slide').length > 1) { 2893 element.removeClass('customjs'); 2894 var t = setTimeout(function () { 2895 SEMICOLON.widget.loadFlexSlider(); 2896 }, 500); 2897 clearInterval(timer); 2898 } 2899 }, 500); 2900 }); 2901 } else { 2902 element.html(sm_format_twitter(tweets)); 2903 } 2904 }); 2905 }); 2906 } 2907 }, 2908 flickrFeed: function () { 2909 2910 if (!$().jflickrfeed) { 2911 console.log('flickrFeed: jflickrfeed not Defined.'); 2912 return true; 2913 } 2914 2915 var $flickrFeedEl = $('.flickr-feed'); 2916 if ($flickrFeedEl.length > 0) { 2917 $flickrFeedEl.each(function () { 2918 var element = $(this), 2919 flickrFeedID = element.attr('data-id'), 2920 flickrFeedCount = element.attr('data-count'), 2921 flickrFeedType = element.attr('data-type'), 2922 flickrFeedTypeGet = 'photos_public.gne'; 2923 2924 if (flickrFeedType == 'group') { 2925 flickrFeedTypeGet = 'groups_pool.gne'; 2926 } 2927 if (!flickrFeedCount) { 2928 flickrFeedCount = 9; 2929 } 2930 2931 element.jflickrfeed({ 2932 feedapi: flickrFeedTypeGet, 2933 limit: Number(flickrFeedCount), 2934 qstrings: { 2935 id: flickrFeedID 2936 }, 2937 itemTemplate: '<a href="{{image_b}}" title="{{title}}" data-lightbox="gallery-item">' + 2938 '<img src="{{image_s}}" alt="{{title}}" />' + 2939 '</a>' 2940 }, function (data) { 2941 SEMICOLON.initialize.lightbox(); 2942 }); 2943 }); 2944 } 2945 }, 2946 instagramPhotos: function (c_accessToken, c_clientID) { 2947 2948 if (typeof Instafeed === 'undefined') { 2949 console.log('Instafeed not Defined.'); 2950 return true; 2951 } 2952 2953 var $instagramPhotosEl = $('.instagram-photos'); 2954 if ($instagramPhotosEl.length > 0) { 2955 2956 $instagramPhotosEl.each(function () { 2957 var element = $(this), 2958 instaGramTarget = element.attr('id'), 2959 instaGramUserId = element.attr('data-user'), 2960 instaGramTag = element.attr('data-tag'), 2961 instaGramLocation = element.attr('data-location'), 2962 instaGramCount = element.attr('data-count'), 2963 instaGramType = element.attr('data-type'), 2964 instaGramSortBy = element.attr('data-sortBy'), 2965 instaGramRes = element.attr('data-resolution'); 2966 2967 if (!instaGramCount) { 2968 instaGramCount = 9; 2969 } 2970 if (!instaGramSortBy) { 2971 instaGramSortBy = 'none'; 2972 } 2973 if (!instaGramRes) { 2974 instaGramRes = 'thumbnail'; 2975 } 2976 2977 if (instaGramType == 'user') { 2978 2979 var feed = new Instafeed({ 2980 target: instaGramTarget, 2981 get: instaGramType, 2982 userId: Number(instaGramUserId), 2983 limit: Number(instaGramCount), 2984 sortBy: instaGramSortBy, 2985 resolution: instaGramRes, 2986 accessToken: c_accessToken, 2987 clientId: c_clientID 2988 }); 2989 2990 } else if (instaGramType == 'tagged') { 2991 2992 var feed = new Instafeed({ 2993 target: instaGramTarget, 2994 get: instaGramType, 2995 tagName: instaGramTag, 2996 limit: Number(instaGramCount), 2997 sortBy: instaGramSortBy, 2998 resolution: instaGramRes, 2999 clientId: c_clientID 3000 }); 3001 3002 } else if (instaGramType == 'location') { 3003 3004 var feed = new Instafeed({ 3005 target: instaGramTarget, 3006 get: instaGramType, 3007 locationId: Number(instaGramUserId), 3008 limit: Number(instaGramCount), 3009 sortBy: instaGramSortBy, 3010 resolution: instaGramRes, 3011 clientId: c_clientID 3012 }); 3013 3014 } else { 3015 3016 var feed = new Instafeed({ 3017 target: instaGramTarget, 3018 get: 'popular', 3019 limit: Number(instaGramCount), 3020 sortBy: instaGramSortBy, 3021 resolution: instaGramRes, 3022 clientId: c_clientID 3023 }); 3024 3025 } 3026 3027 feed.run(); 3028 }); 3029 } 3030 }, 3031 dribbbleShots: function (c_accessToken) { 3032 3033 if (!$.jribbble) { 3034 console.log('dribbbleShots: Jribbble not Defined.'); 3035 return true; 3036 } 3037 3038 if (!$().imagesLoaded) { 3039 console.log('dribbbleShots: imagesLoaded not Defined.'); 3040 return true; 3041 } 3042 3043 var $dribbbleShotsEl = $('.dribbble-shots'); 3044 if ($dribbbleShotsEl.length > 0) { 3045 3046 $.jribbble.setToken(c_accessToken); 3047 3048 $dribbbleShotsEl.each(function () { 3049 var element = $(this), 3050 dribbbleUsername = element.attr('data-user'), 3051 dribbbleCount = element.attr('data-count'), 3052 dribbbleList = element.attr('data-list'), 3053 dribbbleType = element.attr('data-type'); 3054 3055 element.addClass('customjs'); 3056 3057 if (!dribbbleCount) { 3058 dribbbleCount = 9; 3059 } 3060 3061 if (dribbbleType == 'user') { 3062 3063 $.jribbble.users(dribbbleUsername).shots({ 3064 'sort': 'recent', 3065 'page': 1, 3066 'per_page': Number(dribbbleCount) 3067 }).then(function (res) { 3068 var html = [];
3069 res.forEach(function (shot) { 3070 html.push('<a href="' + shot.html_url + '" target="_blank">'); 3071 html.push('<img src="' + shot.images.teaser + '" '); 3072 html.push('alt="' + shot.title + '"></a>'); 3073 }); 3074 element.html(html.join('')); 3075 3076 element.imagesLoaded().done(function () { 3077 element.removeClass('customjs'); 3078 SEMICOLON.widget.masonryThumbs(); 3079 }); 3080 }); 3081 3082 } else if (dribbbleType == 'list') { 3083 3084 $.jribbble.shots(dribbbleList, { 3085 'sort': 'recent', 3086 'page': 1, 3087 'per_page': Number(dribbbleCount) 3088 }).then(function (res) { 3089 var html = []; 3090 res.forEach(function (shot) { 3091 html.push('<a href="' + shot.html_url + '" target="_blank">'); 3092 html.push('<img src="' + shot.images.teaser + '" '); 3093 html.push('alt="' + shot.title + '"></a>'); 3094 }); 3095 element.html(html.join('')); 3096 3097 element.imagesLoaded().done(function () { 3098 element.removeClass('customjs'); 3099 SEMICOLON.widget.masonryThumbs(); 3100 }); 3101 }); 3102 } 3103 3104 }); 3105 } 3106 }, 3107 navTree: function () { 3108 var $navTreeEl = $('.nav-tree'); 3109 if ($navTreeEl.length > 0) { 3110 $navTreeEl.each(function () { 3111 var element = $(this), 3112 elementSpeed = element.attr('data-speed'), 3113 elementEasing = element.attr('data-easing'); 3114 3115 if (!elementSpeed) { 3116 elementSpeed = 250; 3117 } 3118 if (!elementEasing) { 3119 elementEasing = 'swing'; 3120 } 3121 3122 element.find('ul li:has(ul)').addClass('sub-menu'); 3123 element.find('ul li:has(ul) > a').append(' <i class="icon-angle-down"></i>'); 3124 3125 if (element.hasClass('on-hover')) { 3126 element.find('ul li:has(ul):not(.active)').hover(function (e) { 3127 $(this).children('ul').stop(true, true).slideDown(Number(elementSpeed), elementEasing); 3128 }, function () { 3129 $(this).children('ul').delay(250).slideUp(Number(elementSpeed), elementEasing); 3130 }); 3131 } else { 3132 element.find('ul li:has(ul) > a').click(function (e) { 3133 var childElement = $(this); 3134 element.find('ul li').not(childElement.parents()).removeClass('active'); 3135 childElement.parent().children('ul').slideToggle(Number(elementSpeed), elementEasing, function () { 3136 $(this).find('ul').hide(); 3137 $(this).find('li.active').removeClass('active'); 3138 }); 3139 element.find('ul li > ul').not(childElement.parent().children('ul')).not(childElement.parents('ul')).slideUp(Number(elementSpeed), elementEasing); 3140 childElement.parent('li:has(ul)').toggleClass('active'); 3141 e.preventDefault(); 3142 }); 3143 } 3144 }); 3145 } 3146 }, 3147 carousel: function () { 3148 3149 if (!$().owlCarousel) { 3150 console.log('carousel: Owl Carousel not Defined.'); 3151 return true; 3152 } 3153 3154 var $carousel = $('.carousel-widget:not(.customjs)'); 3155 if ($carousel.length < 1) { 3156 return true; 3157 } 3158 3159 $carousel.each(function () { 3160 var element = $(this), 3161 elementItems = element.attr('data-items'), 3162 elementItemsLg = element.attr('data-items-lg'), 3163 elementItemsMd = element.attr('data-items-md'), 3164 elementItemsSm = element.attr('data-items-sm'), 3165 elementItemsXs = element.attr('data-items-xs'), 3166 elementItemsXxs = element.attr('data-items-xxs'), 3167 elementLoop = element.attr('data-loop'), 3168 elementAutoPlay = element.attr('data-autoplay'), 3169 elementSpeed = element.attr('data-speed'), 3170 elementAnimateIn = element.attr('data-animate-in'), 3171 elementAnimateOut = element.attr('data-animate-out'), 3172 elementNav = element.attr('data-nav'), 3173 elementPagi = element.attr('data-pagi'), 3174 elementMargin = element.attr('data-margin'), 3175 elementStage = element.attr('data-stage-padding'), 3176 elementMerge = element.attr('data-merge'), 3177 elementStart = element.attr('data-start'), 3178 elementRewind = element.attr('data-rewind'),
3179 elementSlideBy = element.attr('data-slideby'), 3180 elementCenter = element.attr('data-center'), 3181 elementLazy = element.attr('data-lazyload'), 3182 elementVideo = element.attr('data-video'), 3183 elementRTL = element.attr('data-rtl'); 3184 3185 if (!elementItems) { 3186 elementItems = 4; 3187 } 3188 if (!elementItemsLg) { 3189 elementItemsLg = Number(elementItems); 3190 } 3191 if (!elementItemsMd) { 3192 elementItemsMd = Number(elementItemsLg); 3193 } 3194 if (!elementItemsSm) { 3195 elementItemsSm = Number(elementItemsMd); 3196 } 3197 if (!elementItemsXs) { 3198 elementItemsXs = Number(elementItemsSm); 3199 } 3200 if (!elementItemsXxs) { 3201 elementItemsXxs = Number(elementItemsXs); 3202 } 3203 if (!elementSpeed) { 3204 elementSpeed = 250; 3205 } 3206 if (!elementMargin) { 3207 elementMargin = 20; 3208 } 3209 if (!elementStage) { 3210 elementStage = 0; 3211 } 3212 if (!elementStart) { 3213 elementStart = 0; 3214 } 3215 3216 if (!elementSlideBy) { 3217 elementSlideBy = 1; 3218 } 3219 if (elementSlideBy == 'page') { 3220 elementSlideBy = 'page'; 3221 } else { 3222 elementSlideBy = Number(elementSlideBy); 3223 } 3224 3225 if (elementLoop == 'true') { 3226 elementLoop = true; 3227 } else { 3228 elementLoop = false; 3229 } 3230 if (!elementAutoPlay) { 3231 elementAutoPlay = false; 3232 var elementAutoPlayTime = 0; 3233 } else { 3234 var elementAutoPlayTime = Number(elementAutoPlay); 3235 elementAutoPlay = true; 3236 } 3237 if (!elementAnimateIn) { 3238 elementAnimateIn = false; 3239 } 3240 if (!elementAnimateOut) { 3241 elementAnimateOut = false; 3242 } 3243 if (elementNav == 'false') { 3244 elementNav = false; 3245 } else { 3246 elementNav = true; 3247 } 3248 if (elementPagi == 'false') { 3249 elementPagi = false; 3250 } else { 3251 elementPagi = true; 3252 } 3253 if (elementRewind == 'true') { 3254 elementRewind = true; 3255 } else { 3256 elementRewind = false; 3257 } 3258 if (elementMerge == 'true') { 3259 elementMerge = true; 3260 } else { 3261 elementMerge = false; 3262 } 3263 if (elementCenter == 'true') { 3264 elementCenter = true; 3265 } else { 3266 elementCenter = false; 3267 } 3268 if (elementLazy == 'true') { 3269 elementLazy = true; 3270 } else { 3271 elementLazy = false; 3272 } 3273 if (elementVideo == 'true') { 3274 elementVideo = true; 3275 } else { 3276 elementVideo = false; 3277 } 3278 if (elementRTL == 'true' || $body.hasClass('rtl')) { 3279 elementRTL = true; 3280 } else { 3281 elementRTL = false; 3282 } 3283 3284 element.owlCarousel({ 3285 margin: Number(elementMargin), 3286 loop: elementLoop, 3287 stagePadding: Number(elementStage), 3288 merge: elementMerge, 3289 startPosition: Number(elementStart), 3290 rewind: elementRewind, 3291 slideBy: elementSlideBy, 3292 center: elementCenter, 3293 lazyLoad: elementLazy, 3294 nav: elementNav, 3295 navText: ['<i class="icon-angle-left"></i>', '<i class="icon-angle-right"></i>'], 3296 autoplay: elementAutoPlay, 3297 autoplayTimeout: elementAutoPlayTime, 3298 autoplayHoverPause: true, 3299 dots: elementPagi, 3300 smartSpeed: Number(elementSpeed), 3301 fluidSpeed: Number(elementSpeed), 3302 video: elementVideo, 3303 animateIn: elementAnimateIn, 3304 animateOut: elementAnimateOut, 3305 rtl: elementRTL, 3306 responsive: { 3307 0: {items: Number(elementItemsXxs)}, 3308 480: {items: Number(elementItemsXs)}, 3309 768: {items: Number(elementItemsSm)}, 3310 992: {items: Number(elementItemsMd)}, 3311 1200: {items: Number(elementItemsLg)} 3312 }, 3313 onInitialized: function () { 3314 SEMICOLON.slider.owlCaptionInit(); 3315 SEMICOLON.slider.sliderParallaxDimensions(); 3316 } 3317 }); 3318 }); 3319 }, 3320 masonryThumbs: function () { 3321 var $masonryThumbsEl = $('.masonry-thumbs:not(.customjs)'); 3322 if ($masonryThumbsEl.length > 0) { 3323 $masonryThumbsEl.each(function () { 3324 var masonryItemContainer = $(this); 3325 SEMICOLON.widget.masonryThumbsArrange(masonryItemContainer); 3326 }); 3327 } 3328 }, 3329 masonryThumbsArrange: function (element) { 3330 3331 if (!$().isotope) { 3332 console.log('masonryThumbsArrange: Isotope not Defined.'); 3333 return true; 3334 } 3335 3336 SEMICOLON.initialize.setFullColumnWidth(element); 3337 element.isotope('layout'); 3338 }, 3339 notifications: function (element) { 3340 3341 if (typeof toastr === 'undefined') { 3342 console.log('notifications: Toastr not Defined.'); 3343 return true; 3344 } 3345 3346 toastr.remove(); 3347 var notifyElement = $(element), 3348 notifyPosition = notifyElement.attr('data-notify-position'), 3349 notifyType = notifyElement.attr('data-notify-type'), 3350 notifyMsg = notifyElement.attr('data-notify-msg'), 3351 notifyCloseButton = notifyElement.attr('data-notify-close'); 3352 3353 if (!notifyPosition) { 3354 notifyPosition = 'toast-top-right'; 3355 } else { 3356 notifyPosition = 'toast-' + notifyElement.attr('data-notify-position'); 3357 } 3358 if (!notifyMsg) { 3359 notifyMsg = 'Please set a message!'; 3360 } 3361 if (notifyCloseButton == 'true') { 3362 notifyCloseButton = true; 3363 } else { 3364 notifyCloseButton = false; 3365 } 3366 3367 toastr.options.positionClass = notifyPosition; 3368 toastr.options.closeButton = notifyCloseButton; 3369 toastr.options.closeHtml = '<button><i class="icon-remove"></i></button>'; 3370 3371 if (notifyType == 'warning') { 3372 toastr.warning(notifyMsg); 3373 } else if (notifyType == 'error') { 3374 toastr.error(notifyMsg); 3375 } else if (notifyType == 'success') { 3376 toastr.success(notifyMsg); 3377 } else { 3378 toastr.info(notifyMsg); 3379 } 3380 3381 return false; 3382 }, 3383 textRotater: function () { 3384 3385 if (!$().Morphext) { 3386 console.log('textRotater: Morphext not Defined.'); 3387 return true; 3388 } 3389 3390 if ($textRotaterEl.length > 0) { 3391 $textRotaterEl.each(function () { 3392 var element = $(this), 3393 trRotate = $(this).attr('data-rotate'), 3394 trSpeed = $(this).attr('data-speed'), 3395 trSeparator = $(this).attr('data-separator'); 3396 3397 if (!trRotate) { 3398 trRotate = "fade"; 3399 } 3400 if (!trSpeed) { 3401 trSpeed = 1200; 3402 } 3403 if (!trSeparator) { 3404 trSeparator = ","; 3405 } 3406 3407 var tRotater = $(this).find('.t-rotate'); 3408 3409 tRotater.Morphext({ 3410 animation: trRotate, 3411 separator: trSeparator, 3412 speed: Number(trSpeed) 3413 }); 3414 }); 3415 } 3416 }, 3417 linkScroll: function () { 3418 $("a[data-scrollto]").click(function () { 3419 var element = $(this), 3420 divScrollToAnchor = element.attr('data-scrollto'), 3421 divScrollSpeed = element.attr('data-speed'), 3422 divScrollOffset = element.attr('data-offset'), 3423 divScrollEasing = element.attr('data-easing'), 3424 divScrollHighlight = element.attr('data-highlight'); 3425 3426 if (!divScrollSpeed) { 3427 divScrollSpeed = 750; 3428 } 3429 if (!divScrollOffset) { 3430 divScrollOffset = SEMICOLON.initialize.topScrollOffset(); 3431 } 3432 if (!divScrollEasing) { 3433 divScrollEasing = 'easeOutQuad'; 3434 } 3435 3436 $('html,body').stop(true).animate({ 3437 'scrollTop': $(divScrollToAnchor).offset().top - Number(divScrollOffset) 3438 }, Number(divScrollSpeed), divScrollEasing, function () { 3439 if (divScrollHighlight) { 3440 if ($(divScrollToAnchor).find('.highlight-me').length > 0) { 3441 $(divScrollToAnchor).find('.highlight-me').animate({'backgroundColor': divScrollHighlight}, 300); 3442 var t = setTimeout(function () { 3443 $(divScrollToAnchor).find('.highlight-me').animate({'backgroundColor': 'transparent'}, 300); 3444 }, 500); 3445 } else { 3446 $(divScrollToAnchor).animate({'backgroundColor': divScrollHighlight}, 300); 3447 var t = setTimeout(function () { 3448 $(divScrollToAnchor).animate({'backgroundColor': 'transparent'}, 300); 3449 }, 500); 3450 } 3451 } 3452 }); 3453 3454 return false; 3455 }); 3456 }, 3457 contactForm: function () { 3458 3459 if (!$().validate) { 3460 console.log('contactForm: Form Validate not Defined.'); 3461 return true; 3462 } 3463 3464 if (!$().ajaxSubmit) { 3465 console.log('contactForm: jQuery Form not Defined.'); 3466 return true; 3467 } 3468 3469 var $contactForm = $('.contact-widget:not(.customjs)'); 3470 if ($contactForm.length < 1) { 3471 return true; 3472 } 3473 3474 $contactForm.each(function () { 3475 var element = $(this), 3476 elementAlert = element.attr('data-alert-type'), 3477 elementLoader = element.attr('data-loader'), 3478 elementResult = element.find('.contact-form-result'); 3479 3480 element.find('form').validate({ 3481 submitHandler: function (form) { 3482 3483 elementResult.hide().removeClass("alert-danger alert-success"); 3484 3485 if (elementLoader == 'button') { 3486 var defButton = $(form).find('button'), 3487 defButtonText = defButton.html(); 3488 3489 defButton.html('<i class="icon-line-loader icon-spin nomargin"></i>'); 3490 } else { 3491 $(form).find('.form-process').fadeIn(); 3492 } 3493
3494 $(form).ajaxSubmit({ 3495 target: elementResult, 3496 dataType: 'json', 3497 resetForm: true, 3498 success: function (data) { 3499 if (elementLoader == 'button') { 3500 defButton.html(defButtonText); 3501 } else { 3502 $(form).find('.form-process').fadeOut(); 3503 } 3504 if (elementAlert == 'inline') { 3505 if (data.alert == 'error') { 3506 var alertType = 'alert-danger'; 3507 } else { 3508 var alertType = 'alert-success'; 3509 } 3510 3511 elementResult.addClass('alert ' + alertType).html(data.message).slideDown(400); 3512 } else { 3513 elementResult.attr('data-notify-type', data.alert).attr('data-notify-msg', data.message).html(''); 3514 SEMICOLON.widget.notifications(elementResult); 3515 } 3516 if ($(form).find('.g-recaptcha').children('div').length > 0) { 3517 grecaptcha.reset(); 3518 } 3519 } 3520 }); 3521 } 3522 }); 3523 3524 }); 3525 }, 3526 subscription: function () { 3527 3528 if (!$().validate) { 3529 console.log('subscription: Form Validate not Defined.'); 3530 return true; 3531 } 3532 3533 if (!$().ajaxSubmit) { 3534 console.log('subscription: jQuery Form not Defined.'); 3535 return true; 3536 } 3537 3538 var $subscribeForm = $('.subscribe-widget:not(.customjs)'); 3539 if ($subscribeForm.length < 1) { 3540 return true; 3541 } 3542 3543 $subscribeForm.each(function () { 3544 var element = $(this), 3545 elementAlert = element.attr('data-alert-type'), 3546 elementLoader = element.attr('data-loader'), 3547 elementResult = element.find('.widget-subscribe-form-result'); 3548 3549 element.find('form').validate({ 3550 submitHandler: function (form) { 3551 3552 elementResult.hide(); 3553 3554 if (elementLoader == 'button') { 3555 var defButton = $(form).find('button'), 3556 defButtonText = defButton.html(); 3557 3558 defButton.html('<i class="icon-line-loader icon-spin nomargin"></i>'); 3559 } else { 3560 $(form).find('.input-group-addon').find('.icon-email2').removeClass('icon-email2').addClass('icon-line-loader icon-spin'); 3561 } 3562 3563 $(form).ajaxSubmit({ 3564 target: elementResult, 3565 dataType: 'json', 3566 resetForm: true, 3567 success: function (data) { 3568 if (elementLoader == 'button') { 3569 defButton.html(defButtonText); 3570 } else { 3571 $(form).find('.input-group-addon').find('.icon-line-loader').removeClass('icon-line-loader icon-spin').addClass('icon-email2'); 3572 } 3573 if (elementAlert == 'inline') { 3574 if (data.alert == 'error') { 3575 var alertType = 'alert-danger'; 3576 } else { 3577 var alertType = 'alert-success'; 3578 } 3579 3580 elementResult.addClass('alert ' + alertType).html(data.message).slideDown(400); 3581 } else { 3582 elementResult.attr('data-notify-type', data.alert).attr('data-notify-msg', data.message).html(''); 3583 SEMICOLON.widget.notifications(elementResult); 3584 } 3585 } 3586 }); 3587 } 3588 }); 3589 3590 }); 3591 }, 3592 quickContact: function () { 3593 3594 if (!$().validate) { 3595 console.log('quickContact: Form Validate not Defined.'); 3596 return true; 3597 } 3598 3599 if (!$().ajaxSubmit) { 3600 console.log('quickContact: jQuery Form not Defined.'); 3601 return true; 3602 } 3603 3604 var $quickContact = $('.quick-contact-widget:not(.customjs)'); 3605 if ($quickContact.length < 1) { 3606 return true; 3607 } 3608 3609 $quickContact.each(function () { 3610 var element = $(this), 3611 elementAlert = element.attr('data-alert-type'), 3612 elementLoader = element.attr('data-loader'), 3613 elementResult = element.find('.quick-contact-form-result'); 3614 3615 element.find('form').validate({ 3616 submitHandler: function (form) { 3617 3618 elementResult.hide(); 3619 $(form).animate({opacity: 0.4}); 3620 3621 if (elementLoader == 'button') { 3622 var defButton = $(form).find('button'), 3623 defButtonText = defButton.html(); 3624 3625 defButton.html('<i class="icon-line-loader icon-spin nomargin"></i>'); 3626 } else { 3627 $(form).find('.form-process').fadeIn(); 3628 } 3629
3630 $(form).ajaxSubmit({ 3631 target: elementResult, 3632 dataType: 'json', 3633 resetForm: true, 3634 success: function (data) { 3635 $(form).animate({opacity: 1}); 3636 if (elementLoader == 'button') { 3637 defButton.html(defButtonText); 3638 } else { 3639 $(form).find('.form-process').fadeOut(); 3640 } 3641 if (elementAlert == 'inline') { 3642 if (data.alert == 'error') { 3643 var alertType = 'alert-danger'; 3644 } else { 3645 var alertType = 'alert-success'; 3646 } 3647 3648 elementResult.addClass('alert ' + alertType).html(data.message).slideDown(400); 3649 } else { 3650 elementResult.attr('data-notify-type', data.alert).attr('data-notify-msg', data.message).html(''); 3651 SEMICOLON.widget.notifications(elementResult); 3652 } 3653 if ($(form).find('.g-recaptcha').children('div').length > 0) { 3654 grecaptcha.reset(); 3655 } 3656 } 3657 }); 3658 } 3659 }); 3660 3661 }); 3662 }, 3663 cookieNotify: function () { 3664 3665 if (!$.cookie) { 3666 console.log('cookieNotify: Cookie Function not defined.'); 3667 return true; 3668 } 3669 3670 if ($cookieNotification.length > 0) { 3671 var cookieNotificationHeight = $cookieNotification.outerHeight(); 3672 3673 $cookieNotification.css({bottom: -cookieNotificationHeight}); 3674 3675 if ($.cookie('websiteUsesCookies') != 'yesConfirmed') { 3676 $cookieNotification.css({bottom: 0}); 3677 } 3678 3679 $('.cookie-accept').click(function () { 3680 $cookieNotification.css({bottom: -cookieNotificationHeight}); 3681 $.cookie('websiteUsesCookies', 'yesConfirmed', {expires: 30}); 3682 return false; 3683 }); 3684 } 3685 }, 3686 extras: function () { 3687 3688 if ($().tooltip) { 3689 $('[data-toggle="tooltip"]').tooltip({container: 'body'}); 3690 } else { 3691 console.log('extras: Bootstrap Tooltip not defined.'); 3692 } 3693 3694 if ($().popover) { 3695 $('[data-toggle=popover]').popover(); 3696 } else { 3697 console.log('extras: Bootstrap Popover not defined.'); 3698 } 3699 3700 $('#primary-menu-trigger,#overlay-menu-close').click(function () { 3701 if ($('#primary-menu').find('ul.mobile-primary-menu').length > 0) { 3702 $('#primary-menu > ul.mobile-primary-menu, #primary-menu > div > ul.mobile-primary-menu').toggleClass("show"); 3703 } else { 3704 $('#primary-menu > ul, #primary-menu > div > ul').toggleClass("show"); 3705 } 3706 return false; 3707 }); 3708 $('#page-submenu-trigger').click(function () { 3709 $body.toggleClass('top-search-open', false); 3710 $pagemenu.toggleClass("pagemenu-active"); 3711 return false; 3712 }); 3713 $pagemenu.find('nav').click(function (e) { 3714 $body.toggleClass('top-search-open', false); 3715 $topCart.toggleClass('top-cart-open', false); 3716 }); 3717 if (SEMICOLON.isMobile.any()) { 3718 $body.addClass('device-touch'); 3719 } 3720 // var el = { 3721 // darkLogo : $("<img>
3721", {src: defaultDarkLogo}), 3722 // darkRetinaLogo : $("<img>", {src: retinaDarkLogo}) 3723 // }; 3724 // el.darkLogo.prependTo("body"); 3725 // el.darkRetinaLogo.prependTo("body"); 3726 // el.darkLogo.css({'position':'absolute','z-index':'-100'}); 3727 // el.darkRetinaLogo.css({'position':'absolute','z-index':'-100'}); 3728 } 3729 3730 }; 3731 3732 SEMICOLON.isMobile = { 3733 Android: function () { 3734 return navigator.userAgent.match(/Android/i); 3735 }, 3736 BlackBerry: function () { 3737 return navigator.userAgent.match(/BlackBerry/i); 3738 }, 3739 iOS: function () { 3740 return navigator.userAgent.match(/iPhone|iPad|iPod/i); 3741 }, 3742 Opera: function () { 3743 return navigator.userAgent.match(/Opera Mini/i); 3744 }, 3745 Windows: function () { 3746 return navigator.userAgent.match(/IEMobile/i); 3747 }, 3748 any: function () { 3749 return (SEMICOLON.isMobile.Android() || SEMICOLON.isMobile.BlackBerry() || SEMICOLON.isMobile.iOS() || SEMICOLON.isMobile.Opera() || SEMICOLON.isMobile.Windows()); 3750 } 3751 }; 3752 3753 SEMICOLON.documentOnResize = { 3754 init: function () { 3755 3756 var t = setTimeout(function () { 3757 SEMICOLON.header.topsocial(); 3758 SEMICOLON.header.fullWidthMenu(); 3759 SEMICOLON.header.overlayMenu(); 3760 SEMICOLON.initialize.fullScreen(); 3761 SEMICOLON.initialize.verticalMiddle(); 3762 SEMICOLON.initialize.maxHeight(); 3763 SEMICOLON.initialize.testimonialsGrid(); 3764 SEMICOLON.initialize.stickyFooter(); 3765 SEMICOLON.slider.sliderParallaxDimensions(); 3766 SEMICOLON.slider.captionPosition(); 3767 SEMICOLON.portfolio.arrange(); 3768 SEMICOLON.portfolio.portfolioDescMargin(); 3769 SEMICOLON.widget.tabsJustify(); 3770 SEMICOLON.widget.html5Video(); 3771 SEMICOLON.widget.masonryThumbs(); 3772 SEMICOLON.initialize.dataResponsiveClasses(); 3773 SEMICOLON.initialize.dataResponsiveHeights(); 3774 if ($gridContainer.length > 0) { 3775 if (!$gridContainer.hasClass('.customjs')) { 3776 if ($().isotope) { 3777 $gridContainer.isotope('layout'); 3778 } else { 3779 console.log('documentOnResize > init: Isotope not defined.'); 3780 } 3781 } 3782 } 3783 if ($body.hasClass('device-lg') || $body.hasClass('device-md')) { 3784 $('#primary-menu').find('ul.mobile-primary-menu').removeClass('show'); 3785 } 3786 }, 500); 3787 3788 windowWidth = $window.width(); 3789 3790 } 3791 3792 }; 3793 3794 SEMICOLON.documentOnReady = { 3795 init: function () { 3796 SEMICOLON.initialize.init(); 3797 SEMICOLON.header.init(); 3798 if ($slider.length > 0) { 3799 SEMICOLON.slider.init(); 3800 } 3801 if ($portfolio.length > 0) { 3802 SEMICOLON.portfolio.init(); 3803 } 3804 SEMICOLON.widget.init(); 3805 SEMICOLON.documentOnReady.windowscroll(); 3806 }, 3807 windowscroll: function () { 3808 3809 var headerOffset = 0, 3810 headerWrapOffset = 0, 3811 pageMenuOffset = 0; 3812 3813 if ($header.length > 0) { 3814 headerOffset = $header.offset().top; 3815 } 3816 if ($header.length > 0) { 3817 headerWrapOffset = $headerWrap.offset().top; 3818 } 3819 if ($pagemenu.length > 0) { 3820 if ($header.length > 0 && !$header.hasClass('no-sticky')) { 3821 if ($header.hasClass('sticky-style-2') || $header.hasClass('sticky-style-3')) { 3822 pageMenuOffset = $pagemenu.offset().top - $headerWrap.outerHeight(); 3823 } else { 3824 pageMenuOffset = $pagemenu.offset().top - $header.outerHeight(); 3825 } 3826 } else { 3827 pageMenuOffset = $pagemenu.offset().top; 3828 } 3829 } 3830 3831 var headerDefinedOffset = $header.attr('data-sticky-offset'); 3832 if (typeof headerDefinedOffset !== 'undefined') { 3833 if (headerDefinedOffset == 'full') { 3834 headerWrapOffset = $window.height(); 3835 var headerOffsetNegative = $header.attr('data-sticky-offset-negative'); 3836 if (typeof headerOffsetNegative !== 'undefined') { 3837 headerWrapOffset = headerWrapOffset - headerOffsetNegative - 1; 3838 } 3839 } else { 3840 headerWrapOffset = Number(headerDefinedOffset); 3841 } 3842 } 3843 3844 SEMICOLON.header.stickyMenu(headerWrapOffset); 3845 SEMICOLON.header.stickyPageMenu(pageMenuOffset); 3846 3847 $window.on('scroll', function () { 3848 3849 SEMICOLON.initialize.goToTopScroll(); 3850 $('body.open-header.close-header-on-scroll').removeClass("side-header-open"); 3851 SEMICOLON.header.stickyMenu(headerWrapOffset); 3852 SEMICOLON.header.stickyPageMenu(pageMenuOffset); 3853 SEMICOLON.header.logo(); 3854 3855 }); 3856 3857 window.addEventListener('scroll', onScrollSliderParallax, false); 3858 3859 if ($onePageMenuEl.length > 0) { 3860 if ($().scrolled) { 3861 $window.scrolled(function () { 3862 SEMICOLON.header.onepageScroller(); 3863 }); 3864 } else { 3865 console.log('windowscroll: Scrolled Function not defined.'); 3866 } 3867 } 3868 } 3869 3870 }; 3871 3872 SEMICOLON.documentOnLoad = { 3873 init: function () { 3874 SEMICOLON.slider.captionPosition(); 3875 SEMICOLON.slider.swiperSliderMenu(true); 3876 SEMICOLON.slider.revolutionSliderMenu(true); 3877 SEMICOLON.initialize.maxHeight(); 3878 SEMICOLON.initialize.testimonialsGrid(); 3879 SEMICOLON.initialize.verticalMiddle(); 3880 SEMICOLON.initialize.stickFooterOnSmall(); 3881 SEMICOLON.initialize.stickyFooter(); 3882 SEMICOLON.portfolio.gridInit($gridContainer); 3883 SEMICOLON.portfolio.filterInit(); 3884 SEMICOLON.portfolio.shuffleInit(); 3885 SEMICOLON.portfolio.arrange(); 3886 SEMICOLON.portfolio.portfolioDescMargin(); 3887 SEMICOLON.widget.parallax();
3888 SEMICOLON.widget.loadFlexSlider(); 3889 SEMICOLON.widget.html5Video(); 3890 SEMICOLON.widget.masonryThumbs(); 3891 SEMICOLON.header.topsocial(); 3892 SEMICOLON.header.responsiveMenuClass(); 3893 SEMICOLON.initialize.modal(); 3894 } 3895 3896 }; 3897 3898 var $window = $(window), 3899 $body = $('body'), 3900 $wrapper = $('#wrapper'), 3901 $header = $('#header'), 3902 $headerWrap = $('#header-wrap'), 3903 $content = $('#content'), 3904 $footer = $('#footer'), 3905 windowWidth = $window.width(), 3906 oldHeaderClasses = $header.attr('class'), 3907 oldHeaderWrapClasses = $headerWrap.attr('class'), 3908 stickyMenuClasses = $header.attr('data-sticky-class'), 3909 responsiveMenuClasses = $header.attr('data-responsive-class'), 3910 defaultLogo = $('#logo').find('.standard-logo'), 3911 defaultLogoWidth = defaultLogo.find('img').outerWidth(), 3912 retinaLogo = $('#logo').find('.retina-logo'), 3913 defaultLogoImg = defaultLogo.find('img').attr('src'), 3914 retinaLogoImg = retinaLogo.find('img').attr('src'), 3915 defaultDarkLogo = defaultLogo.attr('data-dark-logo'), 3916 retinaDarkLogo = retinaLogo.attr('data-dark-logo'), 3917 defaultStickyLogo = defaultLogo.attr('data-sticky-logo'), 3918 retinaStickyLogo = retinaLogo.attr('data-sticky-logo'), 3919 defaultMobileLogo = defaultLogo.attr('data-mobile-logo'), 3920 retinaMobileLogo = retinaLogo.attr('data-mobile-logo'), 3921 $pagemenu = $('#page-menu'), 3922 $onePageMenuEl = $('.one-page-menu'), 3923 onePageGlobalOffset = 0, 3924 $portfolio = $('.portfolio'), 3925 $shop = $('.shop'), 3926 $gridContainer = $('.grid-container'), 3927 $slider = $('#slider'), 3928 $sliderParallaxEl = $('.slider-parallax'), 3929 swiperSlider = '', 3930 $pageTitle = $('#page-title'), 3931 $portfolioItems = $('.portfolio-ajax').find('.portfolio-item'), 3932 $portfolioDetails = $('#portfolio-ajax-wrap'), 3933 $portfolioDetailsContainer = $('#portfolio-ajax-container'), 3934 $portfolioAjaxLoader = $('#portfolio-ajax-loader'), 3935 $portfolioFilter = $('.portfolio-filter,.custom-filter'), 3936 prevPostPortId = '', 3937 $topSearch = $('#top-search'), 3938 $topCart = $('#top-cart'), 3939 $verticalMiddleEl = $('.vertical-middle'), 3940 $topSocialEl = $('#top-social').find('li'), 3941 $siStickyEl = $('.si-sticky'), 3942 $dotsMenuEl = $('.dots-menu'), 3943 $goToTopEl = $('#gotoTop'), 3944 $fullScreenEl = $('.full-screen'), 3945 $commonHeightEl = $('.common-height'), 3946 $testimonialsGridEl = $('.testimonials-grid'), 3947 $pageSectionEl = $('.page-section'), 3948 $owlCarouselEl = $('.owl-carousel'), 3949 $parallaxEl = $('.parallax'), 3950 $parallaxPageTitleEl = $('.page-title-parallax'), 3951 $parallaxPortfolioEl = $('.portfolio-parallax').find('.portfolio-image'), 3952 $youtubeBgPlayerEl = $('.yt-bg-player'), 3953 $textRotaterEl = $('.text-rotater'), 3954 $cookieNotification = $('#cookie-notification'); 3955 3956 $(document).ready(SEMICOLON.documentOnReady.init); 3957 $window.load(SEMICOLON.documentOnLoad.init); 3958 $window.on('resize', SEMICOLON.documentOnResize.init); 3959 3960})(jQuery);
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.