1/* Theme Name: The Project - Responsive Website Template 2 * Author:HtmlCoder 3 * Author URI:http://www.htmlcoder.me 4 * Author e-mail:[email protected] 5 * Version:1.0.0 6 * Created:March 2015 7 * License URI:http://support.wrapbootstrap.com/ 8 * File Description: Initializations of plugins 9 */ 10 11(function($){ 12 $(document).ready(function(){ 13 14 if ($('.boxed .fullscreen-bg').length>0) { 15 $("body").addClass("transparent-page-wrapper"); 16 }; 17 18 $(window).load(function() { 19 $("body").removeClass("no-trans"); 20 }); 21 // Enable Smooth Scroll only on Chrome and only on Win and Linux Systems 22 var platform = navigator.platform.toLowerCase(); 23 if ((platform.indexOf('win') == 0 || platform.indexOf('linux') == 0) && !Modernizr.touch) { 24 if ($.browser.webkit) { 25 $.webkitSmoothScroll(); 26 console.log("hello webkit"); 27 } 28 }; 29 //Show dropdown on hover only for desktop devices 30 //----------------------------------------------- 31 var delay=0, setTimeoutConst; 32 if ((Modernizr.mq('only all and (min-width: 768px)') && !Modernizr.touch) || $("html.ie8").length>0) { 33 $('.main-navigation:not(.onclick) .navbar-nav>li.dropdown, .main-navigation:not(.onclick) li.dropdown>ul>li.dropdown').hover( 34 function(){ 35 var $this = $(this); 36 setTimeoutConst = setTimeout(function(){ 37 $this.addClass('open').slideDown(); 38 $this.find('.dropdown-toggle').addClass('disabled'); 39 }, delay); 40 41 }, function(){ 42 clearTimeout(setTimeoutConst ); 43 $(this).removeClass('open'); 44 $(this).find('.dropdown-toggle').removeClass('disabled'); 45 }); 46 }; 47 48 //Show dropdown on click only for mobile devices 49 //----------------------------------------------- 50 if (Modernizr.mq('only all and (max-width: 767px)') || Modernizr.touch || $(".main-navigation.onclick").length>0 ) { 51 $('.main-navigation [data-toggle=dropdown], .header-top [data-toggle=dropdown]').on('click', function(event) { 52 // Avoid following the href location when clicking 53 event.preventDefault(); 54 // Avoid having the menu to close when clicking 55 event.stopPropagation(); 56 // close all the siblings 57 $(this).parent().siblings().removeClass('open'); 58 // close all the submenus of siblings 59 $(this).parent().siblings().find('[data-toggle=dropdown]').parent().removeClass('open'); 60 // opening the one you clicked on 61 $(this).parent().toggleClass('open'); 62 }); 63 }; 64 65 //Transparent Header Calculations 66 var timer_tr; 67 if ($(".transparent-header").length>0) { 68 $(window).load(function() { 69 trHeaderHeight = $("header.header").outerHeight(); 70 $(".transparent-header .tp-bannertimer").css("marginTop", (trHeaderHeight)+"px"); 71 }); 72 $(window).resize(function() { 73 if ($(this).scrollTop() < headerTopHeight + headerHeight -5) { 74 trHeaderHeight = $("header.header").outerHeight(); 75 $(".transparent-header .tp-bannertimer").css("marginTop", (trHeaderHeight)+"px"); 76 } 77 }); 78 $(window).scroll(function() { 79 if ($(this).scrollTop() == 0 ) { 80 if(timer_tr) { 81 window.clearTimeout(timer_tr); 82 }; 83 timer_tr = window.setTimeout(function() { 84 trHeaderHeight = $("header.header").outerHeight(); 85 $(".transparent-header .tp-bannertimer").css("marginTop", (trHeaderHeight)+"px"); 86 }, 300); 87 }; 88 }); 89 } 90 91 if ($(".transparent-header .slideshow").length>0) { 92 $(".header-container header.header").addClass("transparent-header-on"); 93 } else { 94 $(".header-container header.header").removeClass("transparent-header-on"); 95 } 96 97 //Full Width Slider with Transparent Header Calculations 98 if ($(".transparent-header .slider-banner-fullwidth-big-height").length>0) { 99 if (Modernizr.mq('only all and (max-width: 991px)')) { 100 $("body").removeClass("transparent-header"); 101 $(".header-container header.header").removeClass("transparent-header-on"); 102 $(".tp-bannertimer").css("marginTop", "0px"); 103 $("body").addClass("slider-banner-fullwidth-big-height-removed"); 104 } else { 105 $("body").addClass("transparent-header"); 106 $(".header-container header.header").addClass("transparent-header-on"); 107 $("body").removeClass("slider-banner-fullwidth-big-height-removed"); 108 } 109 }; 110 111 if ($(".transparent-header .slider-banner-fullwidth-big-height").length>0 || $(".slider-banner-fullwidth-big-height-removed").length>0) { 112 $(window).resize(function() { 113 if (Modernizr.mq('only all and (max-width: 991px)')) { 114 $("body").removeClass("transparent-header"); 115 $(".header-container header.header").removeClass("transparent-header-on"); 116 $(".tp-bannertimer").css("marginTop", "0px"); 117 } else { 118 $("body").addClass("transparent-header"); 119 $(".header-container header.header").addClass("transparent-header-on"); 120 } 121 }); 122 }; 123 124 //Revolution Slider 125 if ($(".slider-banner-container").length>0) { 126 127 $(".tp-bannertimer").show(); 128 129 $('body:not(.transparent-header) .slider-banner-container .slider-banner-fullscreen').show().revolution({ 130 delay:8000, 131 startwidth:1140, 132 startheight:520, 133 fullWidth:"off", 134 fullScreen:"on", 135 fullScreenOffsetContainer: ".header-container", 136 fullScreenOffset: "0", 137 138 navigationArrows:"solo", 139 140 navigationStyle: "preview2", 141 navigationHAlign:"center", 142 navigationVAlign:"bottom", 143 navigationHOffset:0, 144 navigationVOffset:20, 145 146 soloArrowLeftHalign:"left", 147 soloArrowLeftValign:"center", 148 soloArrowLeftHOffset:0, 149 soloArrowLeftVOffset:0, 150 151 soloArrowRightHalign:"right", 152 soloArrowRightValign:"center", 153 soloArrowRightHOffset:0, 154 soloArrowRightVOffset:0, 155 156 spinner:"spinner2", 157 158 stopLoop:"off", 159 stopAfterLoops:-1, 160 stopAtSlide:-1, 161 onHoverStop: "off", 162 163 shuffle:"off", 164 hideTimerBar:"off", 165 166 autoHeight:"off", 167 forceFullWidth:"off", 168 169 hideThumbsOnMobile:"off", 170 hideNavDelayOnMobile:1500, 171 hideBulletsOnMobile:"off", 172 hideArrowsOnMobile:"off", 173 hideThumbsUnderResolution:0, 174 175 hideSliderAtLimit:0, 176 hideCaptionAtLimit:0, 177 hideAllCaptionAtLilmit:0, 178 startWithSlide:0 179 }); 180 $('.transparent-header .slider-banner-container .slider-banner-fullscreen').show().revolution({ 181 delay:8000, 182 startwidth:1140, 183 startheight:520, 184 fullWidth:"off", 185 fullScreen:"on", 186 fullScreenOffsetContainer: ".header-top", 187 fullScreenOffset: "", 188 189 navigationArrows:"solo", 190 191 navigationStyle: "preview2", 192 navigationHAlign:"center", 193 navigationVAlign:"bottom", 194 navigationHOffset:0, 195 navigationVOffset:20, 196 197 soloArrowLeftHalign:"left", 198 soloArrowLeftValign:"center", 199 soloArrowLeftHOffset:0, 200 soloArrowLeftVOffset:0, 201 202 soloArrowRightHalign:"right", 203 soloArrowRightValign:"center", 204 soloArrowRightHOffset:0, 205 soloArrowRightVOffset:0, 206 207 spinner:"spinner2", 208 209 stopLoop:"off", 210 stopAfterLoops:-1, 211 stopAtSlide:-1, 212 onHoverStop: "off", 213 214 shuffle:"off", 215 hideTimerBar:"off", 216 217 autoHeight:"off", 218 forceFullWidth:"off", 219 220 hideThumbsOnMobile:"off", 221 hideNavDelayOnMobile:1500, 222 hideBulletsOnMobile:"off", 223 hideArrowsOnMobile:"off", 224 hideThumbsUnderResolution:0, 225 226 hideSliderAtLimit:0, 227 hideCaptionAtLimit:0, 228 hideAllCaptionAtLilmit:0, 229 startWithSlide:0 230 }); 231 232 $('.slider-banner-container .slider-banner-fullwidth').show().revolution({ 233 delay:8000, 234 startwidth:1140, 235 startheight:450, 236 237 navigationArrows:"solo", 238 239 navigationStyle: "preview2", 240 navigationHAlign:"center", 241 navigationVAlign:"bottom", 242 navigationHOffset:0, 243 navigationVOffset:20, 244 245 soloArrowLeftHalign:"left", 246 soloArrowLeftValign:"center", 247 soloArrowLeftHOffset:0, 248 soloArrowLeftVOffset:0, 249 250 soloArrowRightHalign:"right", 251 soloArrowRightValign:"center", 252 soloArrowRightHOffset:0, 253 soloArrowRightVOffset:0, 254 255 fullWidth:"on", 256 257 spinner:"spinner2", 258 259 stopLoop:"off", 260 stopAfterLoops:-1, 261 stopAtSlide:-1, 262 onHoverStop: "off", 263 264 shuffle:"off", 265 266 autoHeight:"off", 267 forceFullWidth:"off", 268 269 hideThumbsOnMobile:"off", 270 hideNavDelayOnMobile:1500, 271 hideBulletsOnMobile:"off", 272 hideArrowsOnMobile:"off", 273 hideThumbsUnderResolution:0, 274 275 hideSliderAtLimit:0, 276 hideCaptionAtLimit:0, 277 hideAllCaptionAtLilmit:0, 278 startWithSlide:0 279 }); 280 281 $('.slider-banner-container .slider-banner-fullwidth-big-height').show().revolution({ 282 delay:8000, 283 startwidth:1140, 284 startheight:650, 285 286 navigationArrows:"solo", 287 288 navigationStyle: "preview2", 289 navigationHAlign:"center", 290 navigationVAlign:"bottom", 291 navigationHOffset:0, 292 navigationVOffset:20, 293 294 soloArrowLeftHalign:"left", 295 soloArrowLeftValign:"center", 296 soloArrowLeftHOffset:0, 297 soloArrowLeftVOffset:0, 298 299 soloArrowRightHalign:"right", 300 soloArrowRightValign:"center", 301 soloArrowRightHOffset:0, 302 soloArrowRightVOffset:0, 303 304 fullWidth:"on", 305 306 spinner:"spinner2", 307 308 stopLoop:"off", 309 stopAfterLoops:-1, 310 stopAtSlide:-1, 311 onHoverStop: "off", 312 313 shuffle:"off", 314 315 autoHeight:"off", 316 forceFullWidth:"off", 317 318 hideThumbsOnMobile:"off", 319 hideNavDelayOnMobile:1500, 320 hideBulletsOnMobile:"off", 321 hideArrowsOnMobile:"off", 322 hideThumbsUnderResolution:0, 323 324 hideSliderAtLimit:0, 325 hideCaptionAtLimit:0, 326 hideAllCaptionAtLilmit:0, 327 startWithSlide:0 328 }); 329 330 $('.banner:not(.dark-bg) .slider-banner-container .slider-banner-boxedwidth').show().revolution({ 331 delay:8000, 332 startwidth:1140, 333 startheight:450, 334 335 navigationArrows:"solo", 336 337 navigationStyle: "preview2", 338 navigationHAlign:"center", 339 navigationVAlign:"bottom", 340 navigationHOffset:0, 341 navigationVOffset:20, 342 343 soloArrowLeftHalign:"left", 344 soloArrowLeftValign:"center", 345 soloArrowLeftHOffset:0, 346 soloArrowLeftVOffset:0, 347 348 soloArrowRightHalign:"right", 349 soloArrowRightValign:"center", 350 soloArrowRightHOffset:0, 351 soloArrowRightVOffset:0, 352 353 fullWidth:"off", 354 355 spinner:"spinner2", 356 shadow: 1, 357 358 stopLoop:"off", 359 stopAfterLoops:-1, 360 stopAtSlide:-1, 361 onHoverStop: "off", 362 363 shuffle:"off", 364 365 autoHeight:"off", 366 forceFullWidth:"off", 367 368 hideThumbsOnMobile:"off", 369 hideNavDelayOnMobile:1500, 370 hideBulletsOnMobile:"off", 371 hideArrowsOnMobile:"off", 372 hideThumbsUnderResolution:0, 373 374 hideSliderAtLimit:0, 375 hideCaptionAtLimit:0, 376 hideAllCaptionAtLilmit:0, 377 startWithSlide:0 378 }); 379 380 $('.banner.dark-bg .slider-banner-container .slider-banner-boxedwidth').show().revolution({ 381 delay:8000, 382 startwidth:1140, 383 startheight:450, 384 385 navigationArrows:"solo", 386 387 navigationStyle: "preview2", 388 navigationHAlign:"center", 389 navigationVAlign:"bottom", 390 navigationHOffset:0, 391 navigationVOffset:20, 392 393 soloArrowLeftHalign:"left", 394 soloArrowLeftValign:"center", 395 soloArrowLeftHOffset:0, 396 soloArrowLeftVOffset:0, 397 398 soloArrowRightHalign:"right", 399 soloArrowRightValign:"center", 400 soloArrowRightHOffset:0, 401 soloArrowRightVOffset:0, 402 403 fullWidth:"off", 404 405 spinner:"spinner2", 406 shadow: 3, 407 408 stopLoop:"off", 409 stopAfterLoops:-1, 410 stopAtSlide:-1, 411 onHoverStop: "off", 412 413 shuffle:"off", 414 415 autoHeight:"off", 416 forceFullWidth:"off", 417 418 hideThumbsOnMobile:"off", 419 hideNavDelayOnMobile:1500, 420 hideBulletsOnMobile:"off", 421 hideArrowsOnMobile:"off", 422 hideThumbsUnderResolution:0, 423 424 hideSliderAtLimit:0, 425 hideCaptionAtLimit:0, 426 hideAllCaptionAtLilmit:0, 427 startWithSlide:0 428 }); 429 430 $('.banner:not(.dark-bg) .slider-banner-container .slider-banner-boxedwidth-stopped').show().revolution({ 431 delay:8000, 432 startwidth:1140, 433 startheight:450, 434 435 navigationArrows:"solo", 436 437 navigationStyle: "preview2", 438 navigationHAlign:"center", 439 navigationVAlign:"bottom", 440 navigationHOffset:0, 441 navigationVOffset:20, 442 443 soloArrowLeftHalign:"left", 444 soloArrowLeftValign:"center", 445 soloArrowLeftHOffset:0, 446 soloArrowLeftVOffset:0, 447 448 soloArrowRightHalign:"right", 449 soloArrowRightValign:"center", 450 soloArrowRightHOffset:0, 451 soloArrowRightVOffset:0, 452 453 fullWidth:"off", 454 455 spinner:"spinner2", 456 shadow: 1, 457 458 stopLoop:"off", 459 stopAfterLoops:0, 460 stopAtSlide:1, 461 onHoverStop: "off", 462 463 shuffle:"off", 464 465 autoHeight:"off", 466 forceFullWidth:"off", 467 468 hideThumbsOnMobile:"off", 469 hideNavDelayOnMobile:1500, 470 hideBulletsOnMobile:"off", 471 hideArrowsOnMobile:"off", 472 hideThumbsUnderResolution:0, 473 474 hideSliderAtLimit:0, 475 hideCaptionAtLimit:0, 476 hideAllCaptionAtLilmit:0, 477 startWithSlide:0 478 }); 479 480 $('.banner.dark-bg .slider-banner-container .slider-banner-boxedwidth-stopped').show().revolution({ 481 delay:8000, 482 startwidth:1140, 483 startheight:450, 484 485 navigationArrows:"solo", 486 487 navigationStyle: "preview2", 488 navigationHAlign:"center", 489 navigationVAlign:"bottom", 490 navigationHOffset:0, 491 navigationVOffset:20, 492 493 soloArrowLeftHalign:"left", 494 soloArrowLeftValign:"center", 495 soloArrowLeftHOffset:0, 496 soloArrowLeftVOffset:0, 497 498 soloArrowRightHalign:"right", 499 soloArrowRightValign:"center", 500 soloArrowRightHOffset:0, 501 soloArrowRightVOffset:0, 502 503 fullWidth:"off", 504 505 spinner:"spinner2", 506 shadow: 3, 507 508 stopLoop:"off", 509 stopAfterLoops:0, 510 stopAtSlide:1, 511 onHoverStop: "off", 512 513 shuffle:"off", 514 515 autoHeight:"off", 516 forceFullWidth:"off", 517 518 hideThumbsOnMobile:"off", 519 hideNavDelayOnMobile:1500, 520 hideBulletsOnMobile:"off", 521 hideArrowsOnMobile:"off", 522 hideThumbsUnderResolution:0, 523 524 hideSliderAtLimit:0, 525 hideCaptionAtLimit:0, 526 hideAllCaptionAtLilmit:0, 527 startWithSlide:0 528 }); 529 530 }; 531 532 //Owl carousel 533 //----------------------------------------------- 534 if ($('.owl-carousel').length>0) { 535 $(".owl-carousel.carousel").owlCarousel({ 536 items: 4, 537 pagination: false, 538 navigation: true, 539 navigationText: false 540 }); 541 $(".owl-carousel.carousel-autoplay").owlCarousel({ 542 items: 4, 543 autoPlay: 5000, 544 pagination: false, 545 navigation: true, 546 navigationText: false 547 }); 548 $(".owl-carousel.clients").owlCarousel({ 549 items: 6, 550 autoPlay: true, 551 pagination: false, 552 itemsDesktopSmall: [992,4], 553 itemsTablet: [768,4], 554 itemsMobile: [479,3] 555 }); 556 $(".owl-carousel.content-slider").owlCarousel({ 557 singleItem: true, 558 autoPlay: 5000, 559 navigation: false, 560 navigationText: false, 561 pagination: false 562 }); 563 $(".owl-carousel.content-slider-with-controls").owlCarousel({ 564 singleItem: true,
565 autoPlay: false, 566 navigation: true, 567 pagination: true 568 }); 569 $(".owl-carousel.content-slider-with-large-controls").owlCarousel({ 570 singleItem: true, 571 autoPlay: false, 572 navigation: true, 573 pagination: true 574 }); 575 $(".owl-carousel.content-slider-with-controls-autoplay").owlCarousel({ 576 singleItem: true, 577 autoPlay: 5000, 578 navigation: true, 579 pagination: true 580 }); 581 $(".owl-carousel.content-slider-with-large-controls-autoplay").owlCarousel({ 582 singleItem: true, 583 autoPlay: 5000, 584 navigation: true, 585 pagination: true 586 }); 587 $(".owl-carousel.content-slider-with-controls-autoplay-hover-stop").owlCarousel({ 588 singleItem: true, 589 autoPlay: 5000, 590 navigation: true, 591 pagination: true, 592 stopOnHover: true 593 }); 594 }; 595 596 // Fixed header 597 //----------------------------------------------- 598 headerTopHeight = $(".header-top").outerHeight(), 599 headerHeight = $("header.header.fixed").outerHeight(); 600 $(window).resize(function() { 601 if(($(this).scrollTop() < headerTopHeight + headerHeight -5 ) && ($(window).width() > 767)) { 602 headerTopHeight = $(".header-top").outerHeight(), 603 headerHeight = $("header.header.fixed").outerHeight(); 604 } 605 }); 606 607 $(window).scroll(function() { 608 if (($(".header.fixed").length > 0) && !($(".transparent-header .slideshow").length>0)) { 609 if (($(this).scrollTop() > headerTopHeight + headerHeight) && ($(window).width() > 767)) { 610 $("body").addClass("fixed-header-on"); 611 $(".header.fixed").addClass('animated object-visible fadeInDown'); 612 $(".header-container").css("paddingBottom", (headerHeight)+"px"); 613 } else { 614 $("body").removeClass("fixed-header-on"); 615 $(".header-container").css("paddingBottom", (0)+"px"); 616 $(".header.fixed").removeClass('animated object-visible fadeInDown'); 617 } 618 } else if ($(".header.fixed").length > 0) { 619 if (($(this).scrollTop() > headerTopHeight + headerHeight) && ($(window).width() > 767)) { 620 $("body").addClass("fixed-header-on"); 621 $(".header.fixed").addClass('animated object-visible fadeInDown'); 622 } else { 623 $("body").removeClass("fixed-header-on"); 624 $(".header.fixed").removeClass('animated object-visible fadeInDown'); 625 } 626 }; 627 }); 628 629 // Charts 630 //----------------------------------------------- 631 if ($(".graph").length>0) { 632 // Creates random numbers you don't need this for real graphs 633 var randomScalingFactor = function(){ return Math.round(Math.random()*500)}; 634 635 if ($(".graph.line").length>0) { 636 // Data for line charts 637 var lineChartData = { 638 labels : ["January","February","March","April","May","June","July"], 639 datasets : [ 640 { 641 label: "First dataset", 642 fillColor : "rgba(188,188,188,0.2)", 643 strokeColor : "rgba(188,188,188,1)", 644 pointColor : "rgba(188,188,188,1)", 645 pointStrokeColor : "#fff", 646 pointHighlightFill : "#fff", 647 pointHighlightStroke : "rgba(188,188,188,1)", 648 data : [250,300,250,200,250,300,250] 649 }, 650 { 651 label: "Second dataset", 652 fillColor : "rgba(126,187,205,0.2)", 653 strokeColor : "rgba(126,187,205,1)", 654 pointColor : "rgba(126,187,205,1)", 655 pointStrokeColor : "#fff", 656 pointHighlightFill : "#fff", 657 pointHighlightStroke : "rgba(126,187,205,1)", 658 data : [300,250,200,250,300,250,200] 659 }, 660 { 661 label: "Third dataset", 662 fillColor : "rgba(98,187,205,0.2)", 663 strokeColor : "rgba(98,187,205,1)", 664 pointColor : "rgba(98,187,205,1)", 665 pointStrokeColor : "#fff", 666 pointHighlightFill : "#fff", 667 pointHighlightStroke : "rgba(98,187,205,1)", 668 data : [0,100,200,300,400,500,400] 669 } 670 ] 671 } 672 673 // Line Charts Initialization 674 $(window).load(function() { 675 var ctx = document.getElementById("lines-graph").getContext("2d"); 676 window.newLine = new Chart(ctx).Line(lineChartData, { 677 responsive: true, 678 bezierCurve : false 679 }); 680 }); 681 } 682 if ($(".graph.bar").length>0) { 683 // Data for bar charts 684 var barChartData = { 685 labels : ["January","February","March","April","May","June","July"], 686 datasets : [ 687 { 688 fillColor : "rgba(188,188,188,0.5)", 689 strokeColor : "rgba(188,188,188,0.8)", 690 highlightFill: "rgba(188,188,188,0.75)", 691 highlightStroke: "rgba(188,188,188,1)", 692 data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()] 693 }, 694 { 695 fillColor : "rgba(168,187,205,0.5)", 696 strokeColor : "rgba(168,187,205,0.8)", 697 highlightFill : "rgba(168,187,205,0.75)", 698 highlightStroke : "rgba(168,187,205,1)", 699 data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()] 700 } 701 ] 702 } 703 704 // Bar Charts Initialization 705 $(window).load(function() { 706 var ctx = document.getElementById("bars-graph").getContext("2d"); 707 window.myBar = new Chart(ctx).Bar(barChartData, { 708 responsive : true 709 });
710 }); 711 } 712 if ($(".graph.pie").length>0) { 713 // Data for pie chart 714 var pieData = [ 715 { 716 value: 120, 717 color:"#09afdf", 718 highlight: "#6BD5F4", 719 label: "Blue" 720 }, 721 { 722 value: 120, 723 color: "#FDB45C", 724 highlight: "#FFC870", 725 label: "Yellow" 726 }, 727 { 728 value: 120, 729 color: "#4D5360", 730 highlight: "#616774", 731 label: "Dark Grey" 732 } 733 ]; 734 735 // Pie Chart Initialization 736 $(window).load(function() { 737 var ctx = document.getElementById("pie-graph").getContext("2d"); 738 window.myPie = new Chart(ctx).Pie(pieData); 739 }); 740 } 741 if ($(".graph.doughnut").length>0) { 742 // Data for doughnut chart 743 var doughnutData = [ 744 { 745 value: 120, 746 color:"#09afdf", 747 highlight: "#6BD5F4", 748 label: "Blue" 749 }, 750 { 751 value: 120, 752 color: "#FDB45C", 753 highlight: "#FFC870", 754 label: "Yellow" 755 }, 756 { 757 value: 120, 758 color: "#4D5360", 759 highlight: "#616774", 760 label: "Dark Grey" 761 } 762 ]; 763 764 // Doughnut Chart Initialization 765 $(window).load(function() { 766 var ctx = document.getElementById("doughnut-graph").getContext("2d"); 767 window.myDoughnut = new Chart(ctx).Doughnut(doughnutData, {responsive : true}); 768 }); 769 } 770 }; 771 772 // Magnific popup 773 //----------------------------------------------- 774 if (($(".popup-img").length > 0) || ($(".popup-iframe").length > 0) || ($(".popup-img-single").length > 0)) { 775 $(".popup-img").magnificPopup({ 776 type:"image", 777 gallery: { 778 enabled: true, 779 } 780 }); 781 $(".popup-img-single").magnificPopup({ 782 type:"image", 783 gallery: { 784 enabled: false, 785 } 786 }); 787 $('.popup-iframe').magnificPopup({ 788 disableOn: 700, 789 type: 'iframe', 790 preloader: false, 791 fixedContentPos: false 792 }); 793 }; 794 795 // Animations 796 //----------------------------------------------- 797 if (($("[data-animation-effect]").length>0) && !Modernizr.touch) { 798 $("[data-animation-effect]").each(function() { 799 if(Modernizr.mq('only all and (min-width: 768px)') && Modernizr.csstransitions) { 800 var waypoints = $(this).waypoint(function(direction) { 801 var appearDelay = $(this.element).attr("data-effect-delay"), 802 animatedObject = $(this.element); 803 setTimeout(function() { 804 animatedObject.addClass('animated object-visible ' + animatedObject.attr("data-animation-effect")); 805 }, appearDelay); 806 this.destroy(); 807 },{ 808 offset: '90%' 809 }); 810 } else { 811 $(this).addClass('object-visible'); 812 } 813 }); 814 }; 815 816 // Text Rotators 817 //----------------------------------------------- 818 if ($(".text-rotator").length>0) { 819 $(".text-rotator").each(function() { 820 var tr_animationEffect = $(this).attr("data-rotator-animation-effect"); 821 $(this).Morphext({ 822 animation: ""+tr_animationEffect+"", // Overrides default "bounceIn" 823 separator: ",", // Overrides default "," 824 speed: 3000 // Overrides default 2000 825 }); 826 }); 827 }; 828 829 // Stats Count To 830 //----------------------------------------------- 831 if ($(".stats [data-to]").length>0) { 832 $(".stats [data-to]").each(function() { 833 var stat_item = $(this), 834 offset = stat_item.offset().top; 835 if($(window).scrollTop() > (offset - 800) && !(stat_item.hasClass('counting'))) { 836 stat_item.addClass('counting'); 837 stat_item.countTo(); 838 }; 839 $(window).scroll(function() { 840 if($(window).scrollTop() > (offset - 800) && !(stat_item.hasClass('counting'))) { 841 stat_item.addClass('counting'); 842 stat_item.countTo(); 843 } 844 }); 845 }); 846 }; 847 848 // Isotope filters 849 //----------------------------------------------- 850 if ($('.isotope-container').length>0 || $('.masonry-grid').length>0 || $('.masonry-grid-fitrows').length>0 || $('.isotope-container-fitrows').length>0) { 851 $(window).load(function() { 852 $('.masonry-grid').isotope({ 853 itemSelector: '.masonry-grid-item', 854 layoutMode: 'masonry' 855 }); 856 $('.masonry-grid-fitrows').isotope({ 857 itemSelector: '.masonry-grid-item', 858 layoutMode: 'fitRows' 859 }); 860 $('.isotope-container').fadeIn(); 861 var $container = $('.isotope-container').isotope({ 862 itemSelector: '.isotope-item', 863 layoutMode: 'masonry', 864 transitionDuration: '0.6s', 865 filter: "*" 866 }); 867 $('.isotope-container-fitrows').fadeIn(); 868 var $container_fitrows = $('.isotope-container-fitrows').isotope({ 869 itemSelector: '.isotope-item', 870 layoutMode: 'fitRows', 871 transitionDuration: '0.6s', 872 filter: "*" 873 }); 874 // filter items on button click 875 $('.filters').on( 'click', 'ul.nav li a', function() { 876 var filterValue = $(this).attr('data-filter'); 877 $(".filters").find("li.active").removeClass("active"); 878 $(this).parent().addClass("active"); 879 $container.isotope({ filter: filterValue });
880 $container_fitrows.isotope({ filter: filterValue }); 881 return false; 882 }); 883 }); 884 $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { 885 $('.tab-pane .masonry-grid-fitrows').isotope({ 886 itemSelector: '.masonry-grid-item', 887 layoutMode: 'fitRows' 888 }); 889 }); 890 }; 891 892 // Animated Progress Bars 893 //----------------------------------------------- 894 if ($("[data-animate-width]").length>0) { 895 $("[data-animate-width]").each(function() { 896 if (Modernizr.touch || !Modernizr.csstransitions) { 897 $(this).find("span").hide(); 898 }; 899 var waypoints = $(this).waypoint(function(direction) { 900 $(this.element).animate({width: $(this.element).attr("data-animate-width")}, 800 ); 901 this.destroy(); 902 if (Modernizr.touch || !Modernizr.csstransitions) { 903 $(this.element).find("span").show('slow'); 904 }; 905 },{ 906 offset: '90%' 907 }); 908 }); 909 }; 910 911 // Animated Circular Progress Bars 912 //----------------------------------------------- 913 if ($(".knob").length>0) { 914 915 $(".knob").knob(); 916 $(".knob").each(function() { 917 var animateVal = $(this).attr("data-animate-value"); 918 $(this).animate({animatedVal: animateVal}, { 919 duration: 2000, 920 step: function() { 921 $(this).val(Math.ceil(this.animatedVal)).trigger("change"); 922 } 923 }); 924 }); 925 } 926 927 //Video Background 928 //----------------------------------------------- 929 if($(".video-background").length>0) { 930 if (Modernizr.touch) { 931 $(".video-background").vide({ 932 mp4: "videos/background-video.mp4", 933 webm: "videos/background-video.webm", 934 poster: "videos/video-fallback.jpg" 935 }, { 936 volume: 1, 937 playbackRate: 1, 938 muted: true, 939 loop: true, 940 autoplay: true, 941 position: "50% 100%", // Similar to the CSS `background-position` property. 942 posterType: "jpg", // Poster image type. "detect" — auto-detection; "none" — no poster; "jpg", "png", "gif",... - extensions. 943 resizing: true 944 }); 945 } else { 946 $(".video-background").vide({ 947 mp4: "videos/background-video.mp4", 948 webm: "videos/background-video.webm", 949 poster: "videos/video-poster.jpg" 950 }, { 951 volume: 1, 952 playbackRate: 1, 953 muted: true, 954 loop: true, 955 autoplay: true, 956 position: "50% 100%", // Similar to the CSS `background-position` property. 957 posterType: "jpg", // Poster image type. "detect" — auto-detection; "none" — no poster; "jpg", "png", "gif",... - extensions. 958 resizing: true 959 }); 960 }; 961 962 }; 963 if($(".video-background-banner").length>0) { 964 if (Modernizr.touch) { 965 $(".video-background-banner").vide({ 966 mp4: "videos/background-video-banner.mp4", 967 webm: "videos/background-video-banner.webm", 968 poster: "videos/video-fallback.jpg" 969 }, { 970 volume: 1, 971 playbackRate: 1, 972 muted: true, 973 loop: true, 974 autoplay: true, 975 position: "50% 50%", // Similar to the CSS `background-position` property. 976 posterType: "jpg", // Poster image type. "detect" — auto-detection; "none" — no poster; "jpg", "png", "gif",... - extensions. 977 resizing: true 978 }); 979 } else { 980 $(".video-background-banner").vide({ 981 mp4: "videos/background-video-banner.mp4", 982 webm: "videos/background-video-banner.webm", 983 poster: "videos/video-banner-poster.jpg" 984 }, { 985 volume: 1, 986 playbackRate: 1, 987 muted: true, 988 loop: true, 989 autoplay: true, 990 position: "50% 50%", // Similar to the CSS `background-position` property. 991 posterType: "jpg", // Poster image type. "detect" — auto-detection; "none" — no poster; "jpg", "png", "gif",... - extensions. 992 resizing: true 993 }); 994 }; 995 }; 996 //Scroll totop 997 //----------------------------------------------- 998 $(window).scroll(function() { 999 if($(this).scrollTop() != 0) { 1000 $(".scrollToTop").fadeIn(); 1001 } else { 1002 $(".scrollToTop").fadeOut(); 1003 } 1004 }); 1005 1006 $(".scrollToTop").click(function() { 1007 $("body,html").animate({scrollTop:0},800); 1008 }); 1009 1010 //Modal 1011 //----------------------------------------------- 1012 if($(".modal").length>0) { 1013 $(".modal").each(function() { 1014 $(".modal").prependTo( "body" ); 1015 }); 1016 } 1017 1018 // Pricing tables popovers 1019 //----------------------------------------------- 1020 if ($(".pricing-tables").length>0) { 1021 $(".plan .pt-popover").popover({ 1022 trigger: 'hover', 1023 container: 'body' 1024 }); 1025 }; 1026 1027 // Contact forms validation 1028 //----------------------------------------------- 1029 if($("#contact-form").length>0) { 1030 $("#contact-form").validate({ 1031 submitHandler: function(form) { 1032 $('.submit-button').button("loading"); 1033 $.ajax({
1034 type: "POST", 1035 url: "php/email-sender.php", 1036 data: { 1037 "name": $("#contact-form #name").val(), 1038 "email": $("#contact-form #email").val(), 1039 "subject": $("#contact-form #subject").val(), 1040 "message": $("#contact-form #message").val() 1041 }, 1042 dataType: "json", 1043 success: function (data) { 1044 if (data.sent == "yes") { 1045 $("#MessageSent").removeClass("hidden"); 1046 $("#MessageNotSent").addClass("hidden"); 1047 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1048 $("#contact-form .form-control").each(function() { 1049 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1050 }); 1051 } else { 1052 $("#MessageNotSent").removeClass("hidden"); 1053 $("#MessageSent").addClass("hidden"); 1054 } 1055 } 1056 }); 1057 }, 1058 // debug: true, 1059 errorPlacement: function(error, element) { 1060 error.insertBefore( element ); 1061 }, 1062 onkeyup: false, 1063 onclick: false, 1064 rules: { 1065 name: { 1066 required: true, 1067 minlength: 2 1068 }, 1069 email: { 1070 required: true, 1071 email: true 1072 }, 1073 subject: { 1074 required: true 1075 }, 1076 message: { 1077 required: true, 1078 minlength: 10 1079 } 1080 }, 1081 messages: { 1082 name: { 1083 required: "Please specify your name", 1084 minlength: "Your name must be longer than 2 characters" 1085 }, 1086 email: { 1087 required: "We need your email address to contact you", 1088 email: "Please enter a valid email address e.g. [email protected]" 1089 }, 1090 subject: { 1091 required: "Please enter a subject" 1092 }, 1093 message: { 1094 required: "Please enter a message", 1095 minlength: "Your message must be longer than 10 characters" 1096 } 1097 }, 1098 errorElement: "span", 1099 highlight: function (element) { 1100 $(element).parent().removeClass("has-success").addClass("has-error"); 1101 $(element).siblings("label").addClass("hide"); 1102 }, 1103 success: function (element) { 1104 $(element).parent().removeClass("has-error").addClass("has-success"); 1105 $(element).siblings("label").removeClass("hide"); 1106 } 1107 }); 1108 }; 1109 1110 if($("#footer-form").length>0) { 1111 $("#footer-form").validate({ 1112 submitHandler: function(form) { 1113 $('.submit-button').button("loading"); 1114 $.ajax({
1115 type: "POST", 1116 url: "php/email-sender.php", 1117 data: { 1118 "name": $("#footer-form #name2").val(), 1119 "email": $("#footer-form #email2").val(), 1120 "subject": "Message from contact form", 1121 "message": $("#footer-form #message2").val() 1122 }, 1123 dataType: "json", 1124 success: function (data) { 1125 if (data.sent == "yes") { 1126 $("#MessageSent2").removeClass("hidden"); 1127 $("#MessageNotSent2").addClass("hidden"); 1128 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1129 $("#footer-form .form-control").each(function() { 1130 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1131 }); 1132 } else { 1133 $("#MessageNotSent2").removeClass("hidden"); 1134 $("#MessageSent2").addClass("hidden"); 1135 } 1136 } 1137 }); 1138 }, 1139 // debug: true, 1140 errorPlacement: function(error, element) { 1141 error.insertAfter( element ); 1142 }, 1143 onkeyup: false, 1144 onclick: false, 1145 rules: { 1146 name2: { 1147 required: true, 1148 minlength: 2 1149 }, 1150 email2: { 1151 required: true, 1152 email: true 1153 }, 1154 message2: { 1155 required: true, 1156 minlength: 10 1157 } 1158 }, 1159 messages: { 1160 name2: { 1161 required: "Please specify your name", 1162 minlength: "Your name must be longer than 2 characters" 1163 }, 1164 email2: { 1165 required: "We need your email address to contact you", 1166 email: "Please enter a valid email address e.g. [email protected]" 1167 }, 1168 message2: { 1169 required: "Please enter a message", 1170 minlength: "Your message must be longer than 10 characters" 1171 } 1172 }, 1173 errorElement: "span", 1174 highlight: function (element) { 1175 $(element).parent().removeClass("has-success").addClass("has-error"); 1176 $(element).siblings("label").addClass("hide"); 1177 }, 1178 success: function (element) { 1179 $(element).parent().removeClass("has-error").addClass("has-success"); 1180 $(element).siblings("label").removeClass("hide"); 1181 } 1182 }); 1183 }; 1184 1185 if($("#sidebar-form").length>0) { 1186 1187 $("#sidebar-form").validate({ 1188 submitHandler: function(form) { 1189 $('.submit-button').button("loading"); 1190 $.ajax({
1191 type: "POST", 1192 url: "php/email-sender.php", 1193 data: { 1194 "name": $("#sidebar-form #name3").val(), 1195 "email": $("#sidebar-form #email3").val(), 1196 "subject": "Message from FAQ page", 1197 "category": $("#sidebar-form #category").val(), 1198 "message": $("#sidebar-form #message3").val() 1199 }, 1200 dataType: "json", 1201 success: function (data) { 1202 if (data.sent == "yes") { 1203 $("#MessageSent3").removeClass("hidden"); 1204 $("#MessageNotSent3").addClass("hidden"); 1205 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1206 $("#sidebar-form .form-control").each(function() { 1207 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1208 }); 1209 } else { 1210 $("#MessageNotSent3").removeClass("hidden"); 1211 $("#MessageSent3").addClass("hidden"); 1212 } 1213 } 1214 }); 1215 }, 1216 // debug: true, 1217 errorPlacement: function(error, element) { 1218 error.insertAfter( element ); 1219 }, 1220 onkeyup: false, 1221 onclick: false, 1222 rules: { 1223 name3: { 1224 required: true, 1225 minlength: 2 1226 }, 1227 email3: { 1228 required: true, 1229 email: true 1230 }, 1231 message3: { 1232 required: true, 1233 minlength: 10 1234 } 1235 }, 1236 messages: { 1237 name3: { 1238 required: "Please specify your name", 1239 minlength: "Your name must be longer than 2 characters" 1240 }, 1241 email3: { 1242 required: "We need your email address to contact you", 1243 email: "Please enter a valid email address e.g. [email protected]" 1244 }, 1245 message3: { 1246 required: "Please enter a message", 1247 minlength: "Your message must be longer than 10 characters" 1248 } 1249 }, 1250 errorElement: "span", 1251 highlight: function (element) { 1252 $(element).parent().removeClass("has-success").addClass("has-error"); 1253 }, 1254 success: function (element) { 1255 $(element).parent().removeClass("has-error").addClass("has-success"); 1256 } 1257 }); 1258 1259 }; 1260 1261 if($("#rsvp").length>0) { 1262 $("#rsvp").validate({ 1263 submitHandler: function(form) { 1264 $('.submit-button').button("loading"); 1265 $.ajax({
1266 type: "POST", 1267 url: "php/email-sender.php", 1268 data: { 1269 "name": $("#rsvp #name").val(), 1270 "email": $("#rsvp #email").val(), 1271 "guests": $("#rsvp #guests").val(), 1272 "subject": "RSVP", 1273 "events": $("#rsvp #events").val() 1274 }, 1275 dataType: "json", 1276 success: function (data) { 1277 if (data.sent == "yes") { 1278 $("#MessageSent").removeClass("hidden"); 1279 $("#MessageNotSent").addClass("hidden"); 1280 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1281 $("#rsvp .form-control").each(function() { 1282 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1283 }); 1284 } else { 1285 $("#MessageNotSent").removeClass("hidden"); 1286 $("#MessageSent").addClass("hidden"); 1287 } 1288 } 1289 }); 1290 }, 1291 // debug: true, 1292 errorPlacement: function(error, element) { 1293 error.insertAfter( element ); 1294 }, 1295 onkeyup: false, 1296 onclick: false, 1297 rules: { 1298 name: { 1299 required: true, 1300 minlength: 2 1301 }, 1302 email: { 1303 required: true, 1304 email: true 1305 }, 1306 guests: { 1307 required: true 1308 }, 1309 events: { 1310 required: true 1311 } 1312 }, 1313 messages: { 1314 name: { 1315 required: "Please specify your name", 1316 minlength: "Your name must be longer than 2 characters" 1317 }, 1318 email: { 1319 required: "We need your email address to contact you", 1320 email: "Please enter a valid email address e.g. [email protected]" 1321 } 1322 }, 1323 errorElement: "span", 1324 highlight: function (element) { 1325 $(element).parent().removeClass("has-success").addClass("has-error"); 1326 $(element).siblings("label").addClass("hide"); 1327 }, 1328 success: function (element) { 1329 $(element).parent().removeClass("has-error").addClass("has-success"); 1330 $(element).siblings("label").removeClass("hide"); 1331 } 1332 }); 1333 }; 1334 1335 1336 // Affix Menu 1337 //----------------------------------------------- 1338 if ($(".affix-menu").length>0) { 1339 setTimeout(function () { 1340 var $sideBar = $('.sidebar') 1341 1342 $sideBar.affix({ 1343 offset: { 1344 top: function () { 1345 var offsetTop = $sideBar.offset().top 1346 return (this.top = offsetTop - 65) 1347 }, 1348 bottom: function () { 1349 var affixBottom = $(".footer").outerHeight(true) + $(".subfooter").outerHeight(true) 1350 if ($(".footer-top").length>0) { 1351 affixBottom = affixBottom + $(".footer-top").outerHeight(true) 1352 } 1353 return (this.bottom = affixBottom+50) 1354 } 1355 } 1356 }) 1357 }, 100) 1358 } 1359 1360 //Scroll Spy 1361 //----------------------------------------------- 1362 if($(".scrollspy").length>0) { 1363 $("body").addClass("scroll-spy"); 1364 if($(".fixed.header").length>0) { 1365 $('body').scrollspy({ 1366 target: '.scrollspy', 1367 offset: 85 1368 }); 1369 } else { 1370 $('body').scrollspy({ 1371 target: '.scrollspy', 1372 offset: 20 1373 }); 1374 } 1375 } 1376 1377 //Smooth Scroll 1378 //----------------------------------------------- 1379 if ($(".smooth-scroll").length>0) { 1380 if(($(".header.fixed").length>0) && (Modernizr.mq('only all and (min-width: 768px)'))) { 1381 $('.smooth-scroll a[href*=#]:not([href=#]), a[href*=#]:not([href=#]).smooth-scroll').click(function() { 1382 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 1383 var target = $(this.hash); 1384 target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 1385 if (target.length) { 1386 $('html,body').animate({ 1387 scrollTop: target.offset().top-64 1388 }, 1000); 1389 return false; 1390 } 1391 } 1392 }); 1393 } else { 1394 $('.smooth-scroll a[href*=#]:not([href=#]), a[href*=#]:not([href=#]).smooth-scroll').click(function() { 1395 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 1396 var target = $(this.hash); 1397 target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 1398 if (target.length) { 1399 $('html,body').animate({ 1400 scrollTop: target.offset().top 1401 }, 1000); 1402 return false; 1403 } 1404 } 1405 }); 1406 } 1407 } 1408 1409 // Offcanvas side navbar 1410 //----------------------------------------------- 1411 if ($("#offcanvas").length>0) { 1412 $('#offcanvas').offcanvas({ 1413 canvas: "body", 1414 disableScrolling: false, 1415 toggle: false 1416 }); 1417 }; 1418 1419 if ($("#offcanvas").length>0) { 1420 $('#offcanvas [data-toggle=dropdown]').on('click', function(event) { 1421 // Avoid following the href location when clicking 1422 event.preventDefault(); 1423 // Avoid having the menu to close when clicking 1424 event.stopPropagation(); 1425 // close all the siblings 1426 $(this).parent().siblings().removeClass('open'); 1427 // close all the submenus of siblings 1428 $(this).parent().siblings().find('[data-toggle=dropdown]').parent().removeClass('open'); 1429 // opening the one you clicked on 1430 $(this).parent().toggleClass('open'); 1431 }); 1432 }; 1433 1434 // Parallax section 1435 //----------------------------------------------- 1436 if (($(".parallax").length>0) && !Modernizr.touch ){ 1437 $(".parallax").parallax("50%", 0.2); 1438 }; 1439 if (($(".parallax-2").length>0) && !Modernizr.touch ){ 1440 $(".parallax-2").parallax("50%", 0.3); 1441 }; 1442 if (($(".parallax-3").length>0) && !Modernizr.touch ){ 1443 $(".parallax-3").parallax("50%", 0.4); 1444 }; 1445 1446 // Notify Plugin 1447 //----------------------------------------------- 1448 if (($(".main-navigation.onclick").length>0) && !Modernizr.touch ){ 1449 $.notify({ 1450 // options 1451 message: 'The Dropdowns of the Main Menu, are now open with click on Parent Items. Click "Home" to checkout this behavior.' 1452 },{ 1453 // settings 1454 type: 'info', 1455 delay: 10000, 1456 offset : { 1457 y: 150, 1458 x: 20 1459 } 1460 }); 1461 }; 1462 if (!($(".main-navigation.animated").length>0) && !Modernizr.touch && $(".main-navigation").length>0){ 1463 $.notify({ 1464 // options 1465 message: 'The animations of main menu are disabled.' 1466 },{ 1467 // settings 1468 type: 'info', 1469 delay: 10000, 1470 offset : { 1471 y: 150, 1472 x: 20 1473 } 1474 }); 1475 }; 1476 if ($(".btn-alert").length>0){ 1477 $(".btn-alert").on('click', function(event) { 1478 $.notify({ 1479 // options 1480 message: 'Great! you have just created this message :-) you can configure this into the template.js file' 1481 },{ 1482 // settings 1483 type: 'info', 1484 delay: 4000, 1485 offset : { 1486 y: 100, 1487 x: 20 1488 } 1489 }); 1490 return false; 1491 }); 1492 }; 1493 1494 // Remove Button 1495 //----------------------------------------------- 1496 $(".btn-remove").click(function() { 1497 $(this).closest(".remove-data").remove(); 1498 }); 1499 1500 // Shipping Checkbox 1501 //----------------------------------------------- 1502 if ($("#shipping-info-check").is(':checked')) { 1503 $("#shipping-information").hide(); 1504 } 1505 $("#shipping-info-check").change(function(){ 1506 if ($(this).is(':checked')) { 1507 $("#shipping-information").slideToggle(); 1508 } else { 1509 $("#shipping-information").slideToggle(); 1510 } 1511 }); 1512 1513 // Full Width Image Overlay 1514 //----------------------------------------------- 1515 if ($(".full-image-overlay").length>0) { 1516 overlayHeight = $(".full-image-overlay").outerHeight(); 1517 $(".full-image-overlay").css("marginTop",-overlayHeight/2); 1518 }; 1519 1520 //This will prevent the event from bubbling up and close the dropdown when you type/click on text boxes (Header Top). 1521 //----------------------------------------------- 1522 $('.header-top .dropdown-menu input').click(function(e) { 1523 e.stopPropagation(); 1524 }); 1525 1526 }); // End document ready 1527 1528})(this.jQuery); 1529 1530if (jQuery(".btn-print").length>0) { 1531 function print_window() { 1532 var mywindow = window; 1533 mywindow.document.close(); 1534 mywindow.focus(); 1535 mywindow.print(); 1536 mywindow.close(); 1537 } 1538}
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.