1/* 2 3Template: Webster - Responsive Multi-purpose HTML5 Template 4Author: potenzaglobalsolutions.com 5Design and Developed by: potenzaglobalsolutions.com 6 7NOTE: This file contains all scripts for the actual Template. 8 9*/ 10 11/*================================================ 12[ Table of contents ] 13================================================ 14 15:: Predefined Variables 16:: Tooltip 17:: Preloader 18:: Mega menu 19:: Owl carousel 20:: Raindrops 21:: Php Contact Form 22:: Counter 23:: Isotope 24:: Masonry 25:: Magnific Popup 26:: Back to top 27:: Accordion 28:: Audio video 29:: Progressbar 30:: Countdown 31:: placeholder 32:: Mobile slider 33:: One page nav 34:: NiceScroll 35:: Mailchimp 36:: PieChart 37:: Datetimepicker 38:: DataTable 39:: Wow animation on scroll 40:: Google.maps 41:: Select 42:: typer 43:: Search 44:: Cart 45:: Menu left-header 46:: Sidepanel 47:: Slickslider 48:: Javascript 49 50====================================== 51[ End table content ] 52======================================*/ 53//POTENZA var 54 55 (function($){ 56 "use strict"; 57 var POTENZA = {}; 58 59 /************************* 60 Predefined Variables 61*************************/ 62var $window = $(window), 63 $document = $(document), 64 $body = $('body'), 65 $countdownTimer = $('.countdown'), 66 $bar = $('.bar'), 67 $pieChart = $('.round-chart'), 68 $progressBar = $('.skill-bar'), 69 $counter = $('.counter'), 70 $datetp = $('.datetimepicker'); 71 //Check if function exists 72 $.fn.exists = function () { 73 return this.length > 0; 74 }; 75 76 77/************************* 78 tooltip 79*************************/ 80 $('[data-toggle="tooltip"]').tooltip(); 81 $('[data-toggle="popover"]').popover() 82 83/************************* 84 Preloader 85*************************/ 86 POTENZA.preloader = function () { 87 $("#load").fadeOut(); 88 $('#pre-loader').delay(2000).fadeOut('slow'); 89 }; 90 91/************************* 92 Mega menu 93*************************/ 94 POTENZA.megaMenu = function () { 95 loadScript(plugin_path + 'mega-menu/mega_menu.js', function() { 96 var nav = $('#menu'); 97 var l = nav.attr('data-pos'); 98 var pos = 'horizontal'; 99 if(l) pos = l; 100 nav.megaMenu({ 101 // DESKTOP MODE SETTINGS 102 logo_align : 'left', // align the logo left or right. options (left) or (right) 103 links_align : 'left', // align the links left or right. options (left) or (right) 104 socialBar_align : 'left', // align the socialBar left or right. options (left) or (right) 105 searchBar_align : 'right', // align the search bar left or right. options (left) or (right) 106 trigger : 'hover', // show drop down using click or hover. options (hover) or (click) 107 effect : 'expand-top', // drop down effects. options (fade), (scale), (expand-top), (expand-bottom), (expand-left), (expand-right) 108 effect_speed : 400, // drop down show speed in milliseconds 109 sibling : true, // hide the others showing drop downs if this option true. this option works on if the trigger option is "click". options (true) or (false) 110 outside_click_close : true, // hide the showing drop downs when user click outside the menu. this option works if the trigger option is "click". options (true) or (false) 111 top_fixed : false, // fixed the menu top of the screen. options (true) or (false) 112 sticky_header : true, // menu fixed on top when scroll down down. options (true) or (false) 113 sticky_header_height: 250, // sticky header height top of the screen. activate sticky header when meet the height. option change the height in px value. 114 menu_position : pos, // change the menu position. options (horizontal), (vertical-left) or (vertical-right) 115 full_width : false, // make menu full width. options (true) or (false) 116 // MOBILE MODE SETTINGS 117 mobile_settings : { 118 collapse : true, // collapse the menu on click. options (true) or (false) 119 sibling : true, // hide the others showing drop downs when click on current drop down. options (true) or (false) 120 scrollBar : true, // enable the scroll bar. options (true) or (false) 121 scrollBar_height : 400, // scroll bar height in px value. this option works if the scrollBar option true. 122 top_fixed : false, // fixed menu top of the screen. options (true) or (false) 123 sticky_header : false, // menu fixed on top when scroll down down. options (true) or (false) 124 sticky_header_height: 200 // sticky header height top of the screen. activate sticky header when meet the height. option change the height in px value. 125 } 126 }); 127 // Dynamic active menu 128 var path = window.location.pathname.split("/").pop(); 129 var target = $('header .mega-menu a[href="'+path+'"]'); 130 target.parent().addClass('active'); 131 $('header .mega-menu li.active').parents('li').addClass('active'); 132 133 }); 134 } 135 136/************************* 137 owl carousel 138*************************/ 139 POTENZA.carousel = function () { 140 var owlslider = jQuery("div.owl-carousel"); 141 if(owlslider.length > 0) { 142 loadScript(plugin_path + 'owl-carousel/owl-carousel.min.js', function() { 143 owlslider.each(function () { 144 var $this = $(this), 145 $items = ($this.data('items')) ? $this.data('items') : 1, 146 $loop = ($this.attr('data-loop')) ? $this.data('loop') : true, 147 $navdots = ($this.data('nav-dots')) ? $this.data('nav-dots') : false, 148 $navarrow = ($this.data('nav-arrow')) ? $this.data('nav-arrow') : false, 149 $autoplay = ($this.attr('data-autoplay')) ? $this.data('autoplay') : true, 150 $autospeed = ($this.attr('data-autospeed')) ? $this.data('autospeed') : 5000, 151 $smartspeed = ($this.attr('data-smartspeed')) ? $this.data('smartspeed') : 1000, 152 $autohgt = ($this.data('autoheight')) ? $this.data('autoheight') : false, 153 $space = ($this.attr('data-space')) ? $this.data('space') : 30; 154 155 $(this).owlCarousel({ 156 loop: $loop, 157 items: $items, 158 responsive: { 159 0:{items: $this.data('xx-items') ? $this.data('xx-items') : 1}, 160 480:{items: $this.data('xs-items') ? $this.data('xs-items') : 1}, 161 768:{items: $this.data('sm-items') ? $this.data('sm-items') : 2}, 162 980:{items: $this.data('md-items') ? $this.data('md-items') : 3}, 163 1200:{items: $items} 164 }, 165 dots: $navdots,
166 autoplayTimeout:$autospeed, 167 smartSpeed: $smartspeed, 168 autoHeight:$autohgt, 169 margin:$space, 170 nav: $navarrow, 171 navText:["<i class='fa fa-angle-left fa-2x'></i>","<i class='fa fa-angle-right fa-2x'></i>"], 172 autoplay: $autoplay, 173 autoplayHoverPause: true 174 }); 175 }); 176 }); 177 } 178 } 179 180/************************* 181 raindrops 182*************************/ 183POTENZA.raindrops = function () { 184 if ($('.raindrops').exists()) { 185 loadScript(plugin_path + 'raindrops/raindrops.js', function() { 186 $('#raindrops').raindrops({color:'#84ba3f', 187 canvasHeight:50}); 188 }); 189 } 190}; 191 192/************************* 193 PHP Contact Form 194*************************/ 195 POTENZA.contactform = function () { 196 $( "#contactform" ).submit(function( event ) { 197 $("#ajaxloader").show(); 198 $("#contactform").hide(); 199 $.ajax({ 200 url:'php/contact-form.php', 201 data:$(this).serialize(), 202 type:'post', 203 success:function(response){ 204 $("#ajaxloader").hide(); 205 $("#contactform").show(); 206 207 $("#formmessage").html(response).show().delay(20000).fadeOut('slow'); 208 } 209 }); 210 event.preventDefault(); 211 }); 212 } 213 214 /************************* 215 counter 216*************************/ 217 POTENZA.counters = function () { 218 var counter = jQuery(".counter"); 219 if(counter.length > 0) { 220 loadScript(plugin_path + 'counter/jquery.countTo.js', function() { 221 $counter.each(function () { 222 var $elem = $(this);
223 $elem.appear(function () { 224 $elem.find('.timer').countTo(); 225 }); 226 }); 227 }); 228 } 229 }; 230 231/************************* 232 Isotope 233*************************/ 234POTENZA.Isotope = function () { 235 loadScript(plugin_path + 'isotope/isotope.pkgd.min.js', function() { 236 var $isotope = $(".isotope"), 237 $itemElement = '.grid-item', 238 $filters = $('.isotope-filters'); 239 if ($isotope.exists()) { 240 $isotope.isotope({ 241 resizable: true, 242 itemSelector: $itemElement, 243 masonry: { 244 gutterWidth: 10 245 } 246 }); 247 $filters.on( 'click', 'button', function() { 248 var $val = $(this).attr('data-filter'); 249 $isotope.isotope({ filter: $val }); 250 $filters.find('.active').removeClass('active'); 251 $(this).addClass('active'); 252 }); 253 } 254 }); 255} 256 257/************************* 258 masonry 259*************************/ 260POTENZA.masonry = function () { 261 loadScript(plugin_path + 'isotope/isotope.pkgd.min.js', function() { 262 setTimeout(function() { 263 var $masonry = $('.masonry-main .masonry'), 264 $itemElement = '.masonry-main .masonry-item', 265 $filters = $('.masonry-main .isotope-filters'); 266 if ($masonry.exists()) { 267 $masonry.isotope({ 268 resizable: true, 269 percentPosition: true, 270 itemSelector: $itemElement, 271 masonry: { 272 gutterWidth: 0 273 } 274 }); 275 // bind filter button click 276 $filters.on( 'click', 'button', function() { 277 var filterValue = $(this).attr('data-filter'); 278 $masonry.isotope({ filter: filterValue }); 279 }); 280 281 $filters.each( function( i, buttonGroup ) { 282 var $buttonGroup = $( buttonGroup ); 283 $buttonGroup.on( 'click', 'button', function() { 284 $buttonGroup.find('.active').removeClass('active'); 285 $(this).addClass('active'); 286 }); 287 }); 288 } 289 }, 100); 290 }); 291 } 292 293/************************* 294 Magnific Popup 295*************************/ 296 POTENZA.mediaPopups = function () { 297 if ($(".popup-single").exists() || $(".popup-gallery").exists() || $('.modal-onload').exists() || $(".popup-youtube, .popup-vimeo, .popup-gmaps").exists()) { 298 loadScript(plugin_path + 'magnific-popup/jquery.magnific-popup.min.js', function() { 299 if ($(".popup-single").exists()) { 300 $('.popup-single').magnificPopup({type:'image'}); 301 } 302 if ($(".popup-gallery").exists()) { 303 $('.popup-gallery').magnificPopup({ 304 delegate: 'a.portfolio-img', 305 type: 'image', 306 tLoading: 'Loading image #%curr%...', 307 mainClass: 'mfp-img-mobile', 308 gallery: { 309 enabled: true, 310 navigateByImgClick: true, 311 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 312 }, 313 image: { 314 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 315 titleSrc: function(item) { 316 return item.el.attr('title') + '<small>by Marsel Van Oosten</small>'; 317 } 318 } 319 }); 320 } 321 if ($(".popup-youtube, .popup-vimeo, .popup-gmaps").exists()) { 322 $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ 323 disableOn: 700, 324 type: 'iframe', 325 mainClass: 'mfp-fade', 326 removalDelay: 160, 327 preloader: false, 328 fixedContentPos: false 329 }); 330 } 331 var $modal = $('.modal-onload'); 332 if( $modal.length > 0 ) { 333 $('.popup-modal').magnificPopup({ 334 type: 'inline' 335 }); 336 $(document).on('click', '.popup-modal-dismiss', function (e) { 337 e.preventDefault(); 338 $.magnificPopup.close(); 339 }); 340 var elementTarget = $modal.attr('data-target'); 341 setTimeout(function() { 342 $.magnificPopup.open({ 343 items: { src: elementTarget }, 344 type: "inline", 345 mainClass: "mfp-no-margins mfp-fade", 346 closeBtnInside: !0, 347 fixedContentPos: !0, 348 removalDelay: 500 349 }, 0) 350 }, 1500); 351 } 352 }); 353 } 354 } 355 356/************************* 357 Back to top 358*************************/ 359 POTENZA.goToTop = function () { 360 var $goToTop = $('#back-to-top'); 361 $goToTop.hide(); 362 $window.scroll(function(){ 363 if ($window.scrollTop()>100) $goToTop.fadeIn(); 364 else $goToTop.fadeOut(); 365 }); 366 $goToTop.on("click", function () { 367 $('body,html').animate({scrollTop:0},1000); 368 return false;
369 }); 370 } 371 372 /************************* 373 Accordion 374*************************/ 375 POTENZA.accordion = function () { 376 377 $('.accordion').each(function (i, elem) { 378 var $elem = $(this), 379 $acpanel = $elem.find(".acd-group > .acd-des"), 380 $acsnav = $elem.find(".acd-group > .acd-heading"); 381 $acpanel.hide().first().slideDown("easeOutExpo"); 382 $acsnav.first().parent().addClass("acd-active"); 383 $acsnav.on('click', function () { 384 if(!$(this).parent().hasClass("acd-active")){ 385 var $this = $(this).next(".acd-des"); 386 $acsnav.parent().removeClass("acd-active"); 387 $(this).parent().addClass("acd-active"); 388 $acpanel.not($this).slideUp("easeInExpo"); 389 $(this).next().slideDown("easeOutExpo"); 390 }else{ 391 $(this).parent().removeClass("acd-active"); 392 $(this).next().slideUp("easeInExpo"); 393 } 394 return false; 395 }); 396 }); 397 } 398 399/************************* 400 audio video 401*************************/ 402 POTENZA.mediav = function () { 403 if ($(".audio-video").exists()) { 404 loadScript(plugin_path + 'mediaelement-and-player/mediaelement-and-player.js', function() { 405 $('audio,video').mediaelementplayer(); 406 }); 407 } 408 } 409 410 /************************* 411 Progressbar 412*************************/ 413 POTENZA.progressBar = function () { 414 if ($progressBar.exists()) { 415 $progressBar.each(function (i, elem) { 416 var $elem = $(this), 417 percent = $elem.attr('data-percent') || "100", 418 delay = $elem.attr('data-delay') || "100", 419 type = $elem.attr('data-type') || "%"; 420 421 if (!$elem.hasClass('progress-animated')) { 422 $elem.css({ 423 'width': '0%' 424 }); 425 } 426 var progressBarRun = function () { 427 $elem.animate({ 428 'width': percent + '%' 429 }, 'easeInOutCirc').addClass('progress-animated'); 430 431 $elem.delay(delay).append('<span class="progress-type animated fadeIn">' + type + '</span><span class="progress-number animated fadeIn">' + percent + '</span>'); 432 }; 433 434 $(elem).appear(function () { 435 setTimeout(function () { 436 progressBarRun(); 437 }, delay); 438 }); 439 }); 440 } 441 }; 442 443/************************* 444 Countdown 445*************************/ 446 POTENZA.countdownTimer = function () { 447 if ($countdownTimer.exists()) { 448 loadScript(plugin_path + 'countdown/jquery.downCount.js', function() { 449 $countdownTimer.downCount({ 450 date: '12/25/2018 12:00:00', // Month/Date/Year HH:MM:SS 451 offset: -4 452 }); 453 }); 454 } 455 } 456 457/********************************* 458 Mobile slider 459*********************************/ 460 POTENZA.mobileslider = function () { 461 var mobileslider = jQuery("#mobile-slider"); 462 if(mobileslider.length > 0) { 463 loadScript(plugin_path + 'mobile-slider/zenith.min.js', function() { 464 $('#mobile-slider').zenith({ 465 layout: 'mobile-slider' , 466 slideSpeed: 450, 467 autoplaySpeed: 2000 468 }); 469 }); 470 } 471 } 472 473/************************* 474 One page 475*************************/ 476 POTENZA.onepagenav = function () { 477 478 // Cache selectors 479 var lastId, 480 topMenu = $("#onepagenav"), 481 topMenuHeight = topMenu.outerHeight()-30, 482 // All list items 483 menuItems = topMenu.find("a"), 484 // Anchors corresponding to menu items 485 scrollItems = menuItems.map(function(){ 486 var item = $($(this).attr("href")); 487 if (item.length) { return item; } 488 }); 489 490 // Bind click handler to menu items 491 // so we can get a fancy scroll animation 492 menuItems.on('click', function(e) { 493 var href = $(this).attr("href"), 494 offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight+1; 495 $('html, body').stop().animate({ 496 scrollTop: offsetTop 497 }, 1200); 498 if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { 499 if($window.width() < 991){ 500 $('#onepagenav .menu-mobile-collapse-trigger,.vertical-header a.but').click(); 501 } 502 } 503 e.preventDefault(); 504 }); 505 506 // Bind to scroll 507 $window.scroll(function(){ 508 // Get container scroll position 509 var fromTop = $(this).scrollTop()+topMenuHeight; 510 511 // Get id of current scroll item 512 var cur = scrollItems.map(function(){ 513 if ($(this).offset().top < fromTop) 514 return this; 515 }); 516 // Get the id of the current element 517 cur = cur[cur.length-1]; 518 var id = cur && cur.length ? cur[0].id : ""; 519 520 if (lastId !== id) { 521 lastId = id; 522 // Set/remove active class 523 menuItems 524 .parent().removeClass("active") 525 .end().filter("[href='#"+id+"']").parent().addClass("active"); 526 } 527 }); 528 529 $("#myNavbar a,.move").on('click', function(event) { 530 if (this.hash !== "") { 531 event.preventDefault(); 532 var hash = this.hash; 533 var offsetheight = 0; 534 if($('nav').hasClass('affix-top')){ 535 offsetheight = 100; 536 } 537 $('html, body').animate({
538 scrollTop: $(hash).offset().top - offsetheight 539 }, 800, function(){ 540 window.location.hash = hash; 541 }); 542 } // End if 543 if($('.navbar-toggle').css('display') != 'none'){ 544 $(".navbar-toggle").trigger( "click" ); 545 } 546 }); 547 } 548 549 /************************* 550 NiceScroll 551*************************/ 552 POTENZA.pniceScroll = function () { 553 loadScript(plugin_path + 'nicescroll/jquery.nicescroll.js', function() { 554 $(".scrollbar").niceScroll({ 555 scrollspeed: 150, 556 mousescrollstep: 38, 557 cursorwidth: 5, 558 cursorborder: 0, 559 cursorcolor: 'rgba(0,0,0,0.1)', 560 autohidemode: true, 561 zindex: 9, 562 horizrailenabled: false, 563 cursorborderradius: 0, 564 }); 565 $(".scrollbar-x").niceScroll({ 566 scrollspeed: 150, 567 mousescrollstep: 38, 568 cursorwidth: 5, 569 cursorborder: 0, 570 cursorcolor: 'rgba(0,0,0,0.1)', 571 autohidemode: true, 572 zindex: 9, 573 verticalenabled: false, 574 cursorborderradius: 0, 575 }); 576 }); 577 } 578 579/************************* 580 mailchimp 581*************************/ 582 POTENZA.mailchimp = function () { 583 $(document).on('click','#mc-embedded-subscribe',function(event){ 584 event.preventDefault(); 585 var email_id = $('#mce-EMAIL').val(); 586 var val_email_id = validateEmail(email_id); 587 if (email_id != "" && val_email_id === true) { 588 var failure_message = 'Whoops, looks like there was a problem. Please try again later.'; 589 var memberid=email_id.toLowerCase(); 590 var url = memberid; 591 592 $.ajax({ 593 type: 'POST', 594 url: 'php/mailchimp-action.php', 595 data: {url:url}, 596 dataType: 'json', 597 success: function(data){ 598 $('#msg').html(data); 599 }, 600 }); 601 } else { 602 $('#msg').html('<p style="color: #EA4335">Enter the E-mail id</p>'); 603 return false; 604 } 605 return false; 606 }); 607 function validateEmail(email) { 608 var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; 609 return re.test(email); 610 } 611 } 612 613/**************************************************** 614 pieChart 615****************************************************/ 616 POTENZA.pieChart = function () { 617 if ($pieChart.exists()) { 618 loadScript(plugin_path + 'easy-pie-chart/easy-pie-chart.js', function() { 619 $pieChart.each(function () { 620 var $elem = $(this), 621 pieChartSize = $elem.attr('data-size') || "160", 622 pieChartAnimate = $elem.attr('data-animate') || "2000", 623 pieChartWidth = $elem.attr('data-width') || "6", 624 pieChartColor = $elem.attr('data-color') || "#84ba3f", 625 pieChartTrackColor = $elem.attr('data-trackcolor') || "rgba(0,0,0,0.10)"; 626 $elem.find('span, i').css({ 627 'width': pieChartSize + 'px', 628 'height': pieChartSize + 'px', 629 'line-height': pieChartSize + 'px' 630 });
631 $elem.appear(function () { 632 $elem.easyPieChart({ 633 size: Number(pieChartSize), 634 animate: Number(pieChartAnimate), 635 trackColor: pieChartTrackColor, 636 lineWidth: Number(pieChartWidth), 637 barColor: pieChartColor, 638 scaleColor: false, 639 lineCap: 'square', 640 onStep: function (from, to, percent) { 641 $elem.find('span.percent').text(Math.round(percent)); 642 } 643 }); 644 }); 645 }); 646 }); 647 } 648 } 649 650/************************* 651 datetimepicker 652*************************/ 653POTENZA.datetimepick = function () { 654 if ($datetp.exists()) { 655 loadScript(plugin_path + 'bootstrap-datetimepicker/moment-datepicker.js', function() { 656 loadScript(plugin_path + 'bootstrap-datetimepicker/bootstrap-datetimepicker.min.js', function() { 657 $datetp.each(function(){ 658 var frmt = 'DD/MM/YYYY'; 659 if($(this).attr('data-format')) frmt = $(this).attr('data-format'); 660 $(this).datetimepicker({ format: frmt}); 661 }); 662 }); 663 }); 664 } 665 } 666 667/************************* 668 DataTable 669*************************/ 670POTENZA.datatables = function () { 671 if ($('#datatable').exists()) { 672 loadScript(plugin_path + 'bootstrap-datatables/jquery.dataTables.min.js', function() { 673 loadScript(plugin_path + 'bootstrap-datatables/dataTables.bootstrap4.min.js', function() { 674 $('#datatable').DataTable(); 675 }); 676 }); 677 } 678 }; 679 680/********************************* 681 Wow animation on scroll 682*********************************/ 683POTENZA.wowanimation = function () { 684 if ($('.wow').exists()) { 685 var wow = new WOW({ 686 animateClass: 'animated', 687 offset: 100, 688 mobile: false 689 }); 690 wow.init(); 691 } 692 } 693 694/************************* 695 Google.maps 696*************************/ 697POTENZA.googlemaps = function () { 698 if ($('.g-map').exists()) { 699 loadScript('https://maps.googleapis.com/maps/api/js?key=AIzaSyCpcX5bk-aXK_in9b0He0Wd4yOVWSgHimc', function() { 700 $('.g-map').each(function(){ 701 var id = $(this).attr('id'); 702 var color = $(this).attr('data-type'); 703 var clr = [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]}]; 704 if(color === 'green') clr = [{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#84ba3f"},{"visibility":"on"}]}]; 705 else if(color === 'midnight') clr = [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"color":"#000000"},{"lightness":13}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#144b53"},{"lightness":14},{"weight":1.4}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#08304b"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#0c4152"},{"lightness":5}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#0b434f"},{"lightness":25}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"color":"#0b3d51"},{"lightness":16}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"}]},{"featureType":"transit","elementType":"all","stylers":[{"color":"#146474"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#021019"}]}]; 706 else if(color === 'light') clr = [{"featureType":"administrative.locality","elementType":"all","stylers":[{"hue":"#2c2e33"},{"saturation":7},{"lightness":19},{"visibility":"on"}]},{"featureType":"landscape","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"simplified"}]},{"featureType":"poi","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"off"}]},{"featureType":"road","elementType":"geometry","stylers":[{"hue":"#bbc0c4"},{"saturation":-93},{"lightness":31},{"visibility":"simplified"}]},{"featureType":"road","elementType":"labels","stylers":[{"hue":"#bbc0c4"},{"saturation":-93},{"lightness":31},{"visibility":"on"}]},{"featureType":"road.arterial","elementType":"labels","stylers":[{"hue":"#bbc0c4"},{"saturation":-93},{"lightness":-2},{"visibility":"simplified"}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"hue":"#e9ebed"},{"saturation":-90},{"lightness":-8},{"visibility":"simplified"}]},{"featureType":"transit","elementType":"all","stylers":[{"hue":"#e9ebed"},{"saturation":10},{"lightness":69},{"visibility":"on"}]},{"featureType":"water","elementType":"all","stylers":[{"hue":"#e9ebed"},{"saturation":-78},{"lightness":67},{"visibility":"simplified"}]}] 707 else if(color === 'grey') clr = [{"featureType":"landscape","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"stylers":[{"hue":"#00aaff"},{"saturation":-100},{"gamma":2.15},{"lightness":12}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"visibility":"on"},{"lightness":24}]},{"featureType":"road","elementType":"geometry","stylers":[{"lightness":57}]}] 708 else if(color ==='blackandwhite') clr = [{"featureType":"water","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"on"}]},{"featureType":"landscape","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"on"}]},{"featureType":"road","elementType":"geometry","stylers":[{"hue":"#000000"},{"saturation":-100},{"lightness":-100},{"visibility":"simplified"}]},{"featureType":"road","elementType":"labels","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"off"}]},{"featureType":"poi","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"off"}]},{"featureType":"administrative","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":0},{"lightness":100},{"visibility":"off"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"hue":"#000000"},{"saturation":0},{"lightness":-100},{"visibility":"on"}]},{"featureType":"transit","elementType":"labels","stylers":[{"hue":"#ffffff"},{"saturation":0},{"lightness":100},{"visibility":"off"}]}] 709 google.maps.event.addDomListener(window, 'load', init(id,clr)); 710 }); 711 712 }); 713 } 714} 715 716/************************* 717 select 718*************************/ 719POTENZA.fancyselect = function () { 720 if ($('.fancyselect').exists()) { 721 loadScript(plugin_path + 'jquery-nice-select/jquery-nice-select.js', function() { 722 $('select.fancyselect:not(.ignore)').niceSelect(); 723 }); 724 } 725}; 726 727/************************* 728 typer 729*************************/ 730POTENZA.typer = function () { 731 if ($('.typer').exists()) { 732 loadScript(plugin_path + 'typer/jquery.typer.js', function() { 733 }); 734 } 735}; 736 737/************************* 738 Search 739*************************/ 740POTENZA.searchbox = function () { 741 if (jQuery('.search').exists()) { 742 jQuery('.search-btn').on("click", function () { 743 jQuery('.search').toggleClass("search-open"); 744 return false;
745 }); 746 jQuery("html, body").on('click', function (e) { 747 if (!jQuery(e.target).hasClass("not-click")) { 748 749 jQuery('.search').removeClass("search-open"); 750 } 751 }); 752 } 753} 754 755/************************* 756 cart 757*************************/ 758POTENZA.cartbox = function () { 759 $(".cart-btn").on("click", function (e) { 760 $(".shpping-cart .cart").toggleClass('cart-open'); 761 e.stopPropagation(); 762 }); 763 $(document).on("click", function (e) { 764 if (!$(e.target).is('.shpping-cart .cart, .shpping-cart .cart *')) { 765 $(".shpping-cart .cart").removeClass('cart-open'); 766 } 767 }); 768} 769 770 /************************* 771 menu left-header 772*************************/ 773POTENZA.mobileview = function () { 774 $('a.but').on("click", function (e) { 775 if(!$(this).hasClass('active')){ 776 $(this).addClass('active'); 777 $('#left-header').animate({'margin-left':230},300); 778 } else { 779 $(this).removeClass('active'); 780 $('#left-header').animate({'margin-left':0},300); 781 } 782 return false; 783 }); 784}; 785POTENZA.googlemapopen = function () { 786 $(".map-icon").on("click", function (e) { 787 jQuery('.google-map').toggleClass("google-map-open"); 788 }); 789}; 790 791/************************* 792 sidepanel 793*************************/ 794POTENZA.sidepanel = function () { 795 $(".st-pusher").on("click", function (e) { 796 if($(e.target).closest(".st-menu").length === 0) 797 if($body.hasClass('st-menu-open')) { 798 $body.toggleClass("st-menu-open"); 799 return false; 800 } 801 }); 802 $(".side-panel-trigger" ).on("click", function () { 803 $body.toggleClass("st-menu-open"); 804 return false; 805 }); 806 $(".admin-sidebar-toggler" ).on("click", function () { 807 $body.toggleClass("sidebar-icon-only"); 808 return false; 809 }); 810}; 811 812 /************************* 813 slickslider 814*************************/ 815POTENZA.slickslider = function () { 816 if ($('.slider-for').exists()) { 817 loadScript(plugin_path + 'slick/slick.min.js', function() { 818 $('.slider-for').slick({ 819 slidesToShow: 1, 820 slidesToScroll: 1, 821 arrows: true, 822 asNavFor: '.slider-nav' 823 }); 824 $('.slider-nav').slick({ 825 slidesToShow: 3, 826 slidesToScroll: 1, 827 asNavFor: '.slider-for', 828 dots: false, 829 centerMode: true, 830 focusOnSelect: true 831 }); 832 }); 833 } 834}; 835 836 /************************* 837 stickyFooter 838*************************/ 839POTENZA.stickyFooter = function () { 840 var $footerfixed = $("#footer-fixed"); 841 if ($footerfixed.exists()) { 842 var footerheight = $('#footer-fixed').height(); 843 $('.wrapper').css('margin-bottom',(footerheight + "px")) 844 } 845 }; 846 847 848 /************************* 849 leftbarsticky 850*************************/ 851POTENZA.leftbarsticky = function () { 852 var $leftfixed = $(".sticky-top"); 853 if ($leftfixed.exists()) { 854 var p = !1; 855 $window.on("scroll", function() { 856 var t = $(".mega-menu.desktopTopFixed").is(":visible"); 857 if (p != t) 858 if (p = t, $(".mega-menu.desktopTopFixed").is(":visible")) { 859 var a = $(".mega-menu.desktopTopFixed").outerHeight(); 860 var i = a ; 861 $leftfixed.css("top", i) 862 } else $leftfixed.css("top", "") 863 }) 864 } 865 }; 866 867 /************************* 868 calendar 869*************************/ 870POTENZA.calendarlist = function () { 871 if ($('#calendar').exists()) { 872 loadScript(plugin_path + 'fullcalendar/fullcalendar.min.js', function() { 873 $('#calendar').fullCalendar({ 874 defaultDate: '2018-05-12', 875 editable: true, 876 eventLimit: true, // allow "more" link when too many events 877 events: [ 878 { 879 title: 'All Day Event', 880 start: '2018-05-01' 881 }, 882 { 883 title: 'Long Event', 884 start: '2018-05-07', 885 end: '2018-05-10' 886 }, 887 { 888 id: 999, 889 title: 'Repeating Event', 890 start: '2018-05-09T16:00:00' 891 }, 892 { 893 id: 999, 894 title: 'Repeating Event', 895 start: '2018-05-16T16:00:00' 896 }, 897 { 898 title: 'Conference', 899 start: '2018-05-11', 900 end: '2018-05-13' 901 }, 902 { 903 title: 'Meeting', 904 start: '2018-05-12T10:30:00', 905 end: '2018-05-12T12:30:00' 906 }, 907 { 908 title: 'Lunch', 909 start: '2018-05-12T12:00:00' 910 }, 911 { 912 title: 'Meeting', 913 start: '2018-05-12T14:30:00' 914 }, 915 { 916 title: 'Happy Hour', 917 start: '2018-05-12T17:30:00' 918 }, 919 { 920 title: 'Dinner', 921 start: '2018-05-12T20:00:00' 922 }, 923 { 924 title: 'Birthday Party', 925 start: '2018-05-13T07:00:00' 926 }, 927 { 928 title: 'Click for Google', 929 url: 'http://google.com/', 930 start: '2018-05-28' 931 } 932 ] 933 }); 934 }); 935 } 936 }; 937 938/************************* 939 instagram 940*************************/ 941POTENZA.instagramfeed = function () { 942 if ($('.userFeed').exists()) { 943 loadScript(plugin_path + 'instagram/spectragram.min.js', function() { 944 jQuery.fn.spectragram.accessData = { 945 accessToken: 'your-instagram-access-token' 946 } 947 $('.userFeed').spectragram('getUserFeed', { 948 size: 'small', // Options: big, medium ,small // 949 max: 12}); // between 1 to 20 // 950 }); 951 } 952 }; 953 954/************************* 955 flickr 956*************************/ 957POTENZA.flickrfeed = function () { 958 if ($('.flickr-feed').exists()) { 959 loadScript(plugin_path + 'flickr/flickr.js', function() { 960 $('.flickr-feed').socialstream({ 961 socialnetwork: 'flickr', 962 limit: 12, 963 username: 'envato' 964 }) 965 }); 966 } 967 }; 968 969
970/**************************************************** 971 javascript 972****************************************************/ 973var _arr = {}; 974 function loadScript(scriptName, callback) { 975 if (!_arr[scriptName]) { 976 _arr[scriptName] = true; 977 var body = document.getElementsByTagName('body')[0]; 978 var script = document.createElement('script'); 979 script.type = 'text/javascript'; 980 script.src = scriptName; 981 // then bind the event to the callback function 982 // there are several events for cross browser compatibility 983 // script.onreadystatechange = callback; 984 script.onload = callback; 985 // fire the loading 986 body.appendChild(script); 987 } else if (callback) { 988 callback(); 989 } 990 }; 991 992/**************************************************** 993 POTENZA Window load and functions 994****************************************************/ 995 //Window load functions 996 $window.on("load",function(){ 997 POTENZA.preloader(), 998 POTENZA.Isotope(), 999 POTENZA.masonry(), 1000 POTENZA.pieChart(), 1001 POTENZA.progressBar(); 1002 }); 1003 //Document ready functions 1004 $document.ready(function () { 1005 POTENZA.megaMenu(), 1006 POTENZA.counters(), 1007 POTENZA.accordion(), 1008 POTENZA.carousel(), 1009 POTENZA.mailchimp(), 1010 POTENZA.contactform(), 1011 POTENZA.countdownTimer(), 1012 POTENZA.goToTop(), 1013 POTENZA.mediav(), 1014 POTENZA.googlemapopen(), 1015 POTENZA.mobileslider(), 1016 POTENZA.onepagenav(), 1017 POTENZA.mediaPopups(), 1018 POTENZA.pniceScroll(), 1019 POTENZA.datetimepick(), 1020 POTENZA.datatables(), 1021 POTENZA.wowanimation(), 1022 POTENZA.googlemaps(), 1023 POTENZA.fancyselect(), 1024 POTENZA.searchbox(), 1025 POTENZA.cartbox(), 1026 POTENZA.raindrops(), 1027 POTENZA.sidepanel(), 1028 POTENZA.slickslider(), 1029 POTENZA.typer(), 1030 POTENZA.stickyFooter(), 1031 POTENZA.masonry(), 1032 POTENZA.leftbarsticky(), 1033 POTENZA.calendarlist(), 1034 POTENZA.instagramfeed(), 1035 POTENZA.flickrfeed(), 1036 POTENZA.mobileview(); 1037 }); 1038})(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.