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.2.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 30 if(typeof(SmoothScroll) == "function"){ 31 SmoothScroll( 32 { stepSize: 50 } 33 ); 34 } 35 //Show dropdown on hover only for desktop devices 36 //----------------------------------------------- 37 var delay=0, setTimeoutConst; 38 if ((Modernizr.mq('only all and (min-width: 768px)') && !Modernizr.touch) || $("html.ie8").length>0) { 39 $('.main-navigation:not(.onclick) .navbar-nav>li.dropdown, .main-navigation:not(.onclick) li.dropdown>ul>li.dropdown').hover( 40 function(){ 41 var $this = $(this); 42 setTimeoutConst = setTimeout(function(){ 43 $this.addClass('open').slideDown(); 44 $this.find('.dropdown-toggle').addClass('disabled'); 45 }, delay); 46 47 }, function(){ 48 clearTimeout(setTimeoutConst ); 49 $(this).removeClass('open'); 50 $(this).find('.dropdown-toggle').removeClass('disabled'); 51 }); 52 }; 53 54 //Show dropdown on click only for mobile devices 55 //----------------------------------------------- 56 if (Modernizr.mq('only all and (max-width: 767px)') || Modernizr.touch || $(".main-navigation.onclick").length>0 ) { 57 $('.main-navigation [data-toggle=dropdown], .header-top [data-toggle=dropdown]').on('click', function(event) { 58 // Avoid following the href location when clicking 59 event.preventDefault(); 60 // Avoid having the menu to close when clicking 61 event.stopPropagation(); 62 // close all the siblings 63 $(this).parent().siblings().removeClass('open'); 64 // close all the submenus of siblings 65 $(this).parent().siblings().find('[data-toggle=dropdown]').parent().removeClass('open'); 66 // opening the one you clicked on 67 $(this).parent().toggleClass('open'); 68 }); 69 }; 70 71 //Transparent Header Calculations 72 var timer_tr; 73 if ($(".transparent-header").length>0) { 74 $(window).load(function() { 75 trHeaderHeight = $("header.header").outerHeight(); 76 $(".transparent-header .tp-bannertimer").css("marginTop", (trHeaderHeight)+"px"); 77 }); 78 $(window).resize(function() { 79 if ($(this).scrollTop() < headerTopHeight + headerHeight -5) { 80 trHeaderHeight = $("header.header").outerHeight(); 81 $(".transparent-header .tp-bannertimer").css("marginTop", (trHeaderHeight)+"px"); 82 } 83 }); 84 $(window).scroll(function() { 85 if ($(this).scrollTop() == 0 ) { 86 if(timer_tr) { 87 window.clearTimeout(timer_tr); 88 }; 89 timer_tr = window.setTimeout(function() { 90 trHeaderHeight = $("header.header").outerHeight(); 91 $(".transparent-header .tp-bannertimer").css("marginTop", (trHeaderHeight)+"px"); 92 }, 300); 93 }; 94 }); 95 } 96 97 if ($(".transparent-header .slideshow").length>0) { 98 $(".header-container header.header").addClass("transparent-header-on"); 99 } else { 100 $(".header-container header.header").removeClass("transparent-header-on"); 101 } 102 103 //Full Width Slider with Transparent Header Calculations 104 if ($(".transparent-header .slider-banner-fullwidth-big-height").length>0) { 105 if (Modernizr.mq('only all and (max-width: 991px)')) { 106 $("body").removeClass("transparent-header"); 107 $(".header-container header.header").removeClass("transparent-header-on"); 108 $(".tp-bannertimer").css("marginTop", "0px"); 109 $("body").addClass("slider-banner-fullwidth-big-height-removed"); 110 } else { 111 $("body").addClass("transparent-header"); 112 $(".header-container header.header").addClass("transparent-header-on"); 113 $("body").removeClass("slider-banner-fullwidth-big-height-removed"); 114 } 115 }; 116 117 if ($(".transparent-header .slider-banner-fullwidth-big-height").length>0 || $(".slider-banner-fullwidth-big-height-removed").length>0) { 118 $(window).resize(function() { 119 if (Modernizr.mq('only all and (max-width: 991px)')) { 120 $("body").removeClass("transparent-header"); 121 $(".header-container header.header").removeClass("transparent-header-on"); 122 $(".tp-bannertimer").css("marginTop", "0px"); 123 } else { 124 $("body").addClass("transparent-header"); 125 $(".header-container header.header").addClass("transparent-header-on"); 126 } 127 }); 128 }; 129 130 //Revolution Slider 4 131 if ($(".RocketMainSectionMargin .slider-banner-container").length>0) { 132 133 $(".tp-bannertimer").show(); 134 135 $('body:not(.transparent-header) .slider-banner-container .slider-banner-fullscreen').show().revolution({ 136 delay:3000, 137 startwidth:1140, 138 startheight:520, 139 fullWidth:"off", 140 fullScreen:"on", 141 fullScreenOffsetContainer: ".header-container", 142 fullScreenOffset: "0", 143 144 navigationArrows:"solo", 145 146 navigationStyle: "preview2", 147 navigationHAlign:"center", 148 navigationVAlign:"bottom", 149 navigationHOffset:0, 150 navigationVOffset:20, 151 152 soloArrowLeftHalign:"left", 153 soloArrowLeftValign:"center", 154 soloArrowLeftHOffset:0, 155 soloArrowLeftVOffset:0, 156 157 soloArrowRightHalign:"right", 158 soloArrowRightValign:"center", 159 soloArrowRightHOffset:0, 160 soloArrowRightVOffset:0, 161 162 spinner:"spinner2", 163 164 stopLoop:"off", 165 stopAfterLoops:-1, 166 stopAtSlide:-1, 167 onHoverStop: "off", 168 169 shuffle:"off", 170 hideTimerBar:"off", 171 172 autoHeight:"off", 173 forceFullWidth:"off", 174 175 hideThumbsOnMobile:"off", 176 hideNavDelayOnMobile:1500, 177 hideBulletsOnMobile:"off", 178 hideArrowsOnMobile:"off", 179 hideThumbsUnderResolution:0, 180 181 hideSliderAtLimit:0, 182 hideCaptionAtLimit:0, 183 hideAllCaptionAtLilmit:0, 184 startWithSlide:0 185 }); 186 $('.transparent-header .slider-banner-container .slider-banner-fullscreen').show().revolution({ 187 delay:3000, 188 startwidth:1140, 189 startheight:520, 190 fullWidth:"off", 191 fullScreen:"on", 192 fullScreenOffsetContainer: ".header-top", 193 fullScreenOffset: "", 194 195 navigationArrows:"solo", 196 197 navigationStyle: "preview2", 198 navigationHAlign:"center", 199 navigationVAlign:"bottom", 200 navigationHOffset:0, 201 navigationVOffset:20, 202 203 soloArrowLeftHalign:"left", 204 soloArrowLeftValign:"center", 205 soloArrowLeftHOffset:0, 206 soloArrowLeftVOffset:0, 207 208 soloArrowRightHalign:"right", 209 soloArrowRightValign:"center", 210 soloArrowRightHOffset:0, 211 soloArrowRightVOffset:0, 212 213 spinner:"spinner2", 214 215 stopLoop:"off", 216 stopAfterLoops:-1, 217 stopAtSlide:-1, 218 onHoverStop: "off", 219 220 shuffle:"off", 221 hideTimerBar:"off", 222 223 autoHeight:"off", 224 forceFullWidth:"off", 225 226 hideThumbsOnMobile:"off", 227 hideNavDelayOnMobile:1500, 228 hideBulletsOnMobile:"off", 229 hideArrowsOnMobile:"off", 230 hideThumbsUnderResolution:0, 231 232 hideSliderAtLimit:0, 233 hideCaptionAtLimit:0, 234 hideAllCaptionAtLilmit:0, 235 startWithSlide:0 236 }); 237 238 $('.slider-banner-container .slider-banner-fullwidth').show().revolution({ 239 delay:3000, 240 startwidth:1140, 241 startheight:450, 242 243 navigationArrows:"solo", 244 245 navigationStyle: "preview2", 246 navigationHAlign:"center", 247 navigationVAlign:"bottom", 248 navigationHOffset:0, 249 navigationVOffset:20, 250 251 soloArrowLeftHalign:"left", 252 soloArrowLeftValign:"center", 253 soloArrowLeftHOffset:0, 254 soloArrowLeftVOffset:0, 255 256 soloArrowRightHalign:"right", 257 soloArrowRightValign:"center", 258 soloArrowRightHOffset:0, 259 soloArrowRightVOffset:0, 260 261 fullWidth:"on", 262 263 spinner:"spinner2", 264 265 stopLoop:"off", 266 stopAfterLoops:-1, 267 stopAtSlide:-1, 268 onHoverStop: "off", 269 270 shuffle:"off", 271 272 autoHeight:"off", 273 forceFullWidth:"off", 274 275 hideThumbsOnMobile:"off", 276 hideNavDelayOnMobile:1500, 277 hideBulletsOnMobile:"off", 278 hideArrowsOnMobile:"off", 279 hideThumbsUnderResolution:0, 280 281 hideSliderAtLimit:0, 282 hideCaptionAtLimit:0, 283 hideAllCaptionAtLilmit:0, 284 startWithSlide:0 285 }); 286 287 $('.slider-banner-container .slider-banner-fullwidth-big-height').show().revolution({ 288 delay:3000, 289 startwidth:1140, 290 startheight:650, 291 292 navigationArrows:"solo", 293 294 navigationStyle: "preview2", 295 navigationHAlign:"center", 296 navigationVAlign:"bottom", 297 navigationHOffset:0, 298 navigationVOffset:20, 299 300 soloArrowLeftHalign:"left", 301 soloArrowLeftValign:"center", 302 soloArrowLeftHOffset:0, 303 soloArrowLeftVOffset:0, 304 305 soloArrowRightHalign:"right", 306 soloArrowRightValign:"center", 307 soloArrowRightHOffset:0, 308 soloArrowRightVOffset:0, 309 310 fullWidth:"on", 311 312 spinner:"spinner2", 313 314 stopLoop:"off", 315 stopAfterLoops:-1, 316 stopAtSlide:-1, 317 onHoverStop: "off", 318 319 shuffle:"off", 320 321 autoHeight:"off", 322 forceFullWidth:"off", 323 324 hideThumbsOnMobile:"off", 325 hideNavDelayOnMobile:1500, 326 hideBulletsOnMobile:"off", 327 hideArrowsOnMobile:"off", 328 hideThumbsUnderResolution:0, 329 330 hideSliderAtLimit:0, 331 hideCaptionAtLimit:0, 332 hideAllCaptionAtLilmit:0, 333 startWithSlide:0 334 }); 335 336 $('.banner:not(.dark-bg) .slider-banner-container .slider-banner-boxedwidth').show().revolution({ 337 delay:3000, 338 startwidth:1140, 339 startheight:450, 340 341 navigationArrows:"solo", 342 343 navigationStyle: "preview2", 344 navigationHAlign:"center", 345 navigationVAlign:"bottom", 346 navigationHOffset:0, 347 navigationVOffset:20, 348 349 soloArrowLeftHalign:"left", 350 soloArrowLeftValign:"center", 351 soloArrowLeftHOffset:0, 352 soloArrowLeftVOffset:0, 353 354 soloArrowRightHalign:"right", 355 soloArrowRightValign:"center", 356 soloArrowRightHOffset:0, 357 soloArrowRightVOffset:0, 358 359 fullWidth:"off", 360 361 spinner:"spinner2", 362 shadow: 1, 363 364 stopLoop:"off", 365 stopAfterLoops:-1, 366 stopAtSlide:-1, 367 onHoverStop: "off", 368 369 shuffle:"off", 370 371 autoHeight:"off", 372 forceFullWidth:"off", 373 374 hideThumbsOnMobile:"off", 375 hideNavDelayOnMobile:1500, 376 hideBulletsOnMobile:"off", 377 hideArrowsOnMobile:"off", 378 hideThumbsUnderResolution:0, 379 380 hideSliderAtLimit:0, 381 hideCaptionAtLimit:0, 382 hideAllCaptionAtLilmit:0, 383 startWithSlide:0 384 }); 385 386 $('.banner.dark-bg .slider-banner-container .slider-banner-boxedwidth').show().revolution({ 387 delay:3000, 388 startwidth:1140, 389 startheight:450, 390 391 navigationArrows:"solo", 392 393 navigationStyle: "preview2", 394 navigationHAlign:"center", 395 navigationVAlign:"bottom", 396 navigationHOffset:0, 397 navigationVOffset:20, 398 399 soloArrowLeftHalign:"left", 400 soloArrowLeftValign:"center", 401 soloArrowLeftHOffset:0, 402 soloArrowLeftVOffset:0, 403 404 soloArrowRightHalign:"right", 405 soloArrowRightValign:"center", 406 soloArrowRightHOffset:0, 407 soloArrowRightVOffset:0, 408 409 fullWidth:"off", 410 411 spinner:"spinner2", 412 shadow: 3, 413 414 stopLoop:"off", 415 stopAfterLoops:-1, 416 stopAtSlide:-1, 417 onHoverStop: "off", 418 419 shuffle:"off", 420 421 autoHeight:"off", 422 forceFullWidth:"off", 423 424 hideThumbsOnMobile:"off", 425 hideNavDelayOnMobile:1500, 426 hideBulletsOnMobile:"off", 427 hideArrowsOnMobile:"off", 428 hideThumbsUnderResolution:0, 429 430 hideSliderAtLimit:0, 431 hideCaptionAtLimit:0, 432 hideAllCaptionAtLilmit:0, 433 startWithSlide:0 434 }); 435 436 $('.slider-banner-container .slider-banner-boxedwidth-no-shadow').show().revolution({ 437 delay:3000, 438 startwidth:1140, 439 startheight:450, 440 441 navigationArrows:"solo", 442 443 navigationStyle: "preview2", 444 navigationHAlign:"center", 445 navigationVAlign:"bottom", 446 navigationHOffset:0, 447 navigationVOffset:20, 448 449 soloArrowLeftHalign:"left", 450 soloArrowLeftValign:"center", 451 soloArrowLeftHOffset:0, 452 soloArrowLeftVOffset:0, 453 454 soloArrowRightHalign:"right", 455 soloArrowRightValign:"center", 456 soloArrowRightHOffset:0, 457 soloArrowRightVOffset:0, 458 459 fullWidth:"off", 460 461 spinner:"spinner2", 462 shadow: 0, 463 464 stopLoop:"off", 465 stopAfterLoops:-1, 466 stopAtSlide:-1, 467 onHoverStop: "off", 468 469 shuffle:"off", 470 471 autoHeight:"off", 472 forceFullWidth:"off", 473 474 hideThumbsOnMobile:"off", 475 hideNavDelayOnMobile:1500, 476 hideBulletsOnMobile:"off", 477 hideArrowsOnMobile:"off", 478 hideThumbsUnderResolution:0, 479 480 hideSliderAtLimit:0, 481 hideCaptionAtLimit:0, 482 hideAllCaptionAtLilmit:0, 483 startWithSlide:0 484 }); 485 486 $('.banner:not(.dark-bg) .slider-banner-container .slider-banner-boxedwidth-stopped').show().revolution({ 487 delay:3000, 488 startwidth:1140, 489 startheight:450, 490 491 navigationArrows:"solo", 492 493 navigationStyle: "preview2", 494 navigationHAlign:"center", 495 navigationVAlign:"bottom", 496 navigationHOffset:0, 497 navigationVOffset:20, 498 499 soloArrowLeftHalign:"left", 500 soloArrowLeftValign:"center", 501 soloArrowLeftHOffset:0, 502 soloArrowLeftVOffset:0, 503 504 soloArrowRightHalign:"right", 505 soloArrowRightValign:"center", 506 soloArrowRightHOffset:0, 507 soloArrowRightVOffset:0, 508 509 fullWidth:"off", 510 511 spinner:"spinner2", 512 shadow: 1, 513 514 stopLoop:"off", 515 stopAfterLoops:0, 516 stopAtSlide:1, 517 onHoverStop: "off", 518 519 shuffle:"off", 520 521 autoHeight:"off", 522 forceFullWidth:"off", 523 524 hideThumbsOnMobile:"off", 525 hideNavDelayOnMobile:1500, 526 hideBulletsOnMobile:"off", 527 hideArrowsOnMobile:"off", 528 hideThumbsUnderResolution:0, 529 530 hideSliderAtLimit:0, 531 hideCaptionAtLimit:0, 532 hideAllCaptionAtLilmit:0, 533 startWithSlide:0 534 }); 535 536 $('.banner.dark-bg .slider-banner-container .slider-banner-boxedwidth-stopped').show().revolution({ 537 delay:3000, 538 startwidth:1140, 539 startheight:450, 540 541 navigationArrows:"solo", 542 543 navigationStyle: "preview2", 544 navigationHAlign:"center", 545 navigationVAlign:"bottom", 546 navigationHOffset:0, 547 navigationVOffset:20, 548 549 soloArrowLeftHalign:"left", 550 soloArrowLeftValign:"center", 551 soloArrowLeftHOffset:0, 552 soloArrowLeftVOffset:0, 553 554 soloArrowRightHalign:"right", 555 soloArrowRightValign:"center", 556 soloArrowRightHOffset:0, 557 soloArrowRightVOffset:0, 558 559 fullWidth:"off", 560 561 spinner:"spinner2", 562 shadow: 3, 563 564 stopLoop:"off", 565 stopAfterLoops:0, 566 stopAtSlide:1, 567 onHoverStop: "off", 568 569 shuffle:"off", 570 571 autoHeight:"off", 572 forceFullWidth:"off", 573 574 hideThumbsOnMobile:"off", 575 hideNavDelayOnMobile:1500, 576 hideBulletsOnMobile:"off", 577 hideArrowsOnMobile:"off", 578 hideThumbsUnderResolution:0, 579 580 hideSliderAtLimit:0, 581 hideCaptionAtLimit:0, 582 hideAllCaptionAtLilmit:0, 583 startWithSlide:0 584 }); 585 586 }; 587 588 if ($(".slider-banner-container").length>0) { 589 590 $(".tp-bannertimer").show(); 591 592 $('body:not(.transparent-header) .slider-banner-container .slider-banner-fullscreen').show().revolution({ 593 delay:8000,
594 startwidth:1140, 595 startheight:520, 596 fullWidth:"off", 597 fullScreen:"on", 598 fullScreenOffsetContainer: ".header-container", 599 fullScreenOffset: "0", 600 601 navigationArrows:"solo", 602 603 navigationStyle: "preview2", 604 navigationHAlign:"center", 605 navigationVAlign:"bottom", 606 navigationHOffset:0, 607 navigationVOffset:20, 608 609 soloArrowLeftHalign:"left", 610 soloArrowLeftValign:"center", 611 soloArrowLeftHOffset:0, 612 soloArrowLeftVOffset:0, 613 614 soloArrowRightHalign:"right", 615 soloArrowRightValign:"center", 616 soloArrowRightHOffset:0, 617 soloArrowRightVOffset:0, 618 619 spinner:"spinner2", 620 621 stopLoop:"off", 622 stopAfterLoops:-1, 623 stopAtSlide:-1, 624 onHoverStop: "off", 625 626 shuffle:"off", 627 hideTimerBar:"off", 628 629 autoHeight:"off", 630 forceFullWidth:"off", 631 632 hideThumbsOnMobile:"off", 633 hideNavDelayOnMobile:1500, 634 hideBulletsOnMobile:"off", 635 hideArrowsOnMobile:"off", 636 hideThumbsUnderResolution:0, 637 638 hideSliderAtLimit:0, 639 hideCaptionAtLimit:0, 640 hideAllCaptionAtLilmit:0, 641 startWithSlide:0 642 }); 643 $('.transparent-header .slider-banner-container .slider-banner-fullscreen').show().revolution({ 644 delay:8000, 645 startwidth:1140, 646 startheight:520, 647 fullWidth:"off", 648 fullScreen:"on", 649 fullScreenOffsetContainer: ".header-top", 650 fullScreenOffset: "", 651 652 navigationArrows:"solo", 653 654 navigationStyle: "preview2", 655 navigationHAlign:"center", 656 navigationVAlign:"bottom", 657 navigationHOffset:0, 658 navigationVOffset:20, 659 660 soloArrowLeftHalign:"left", 661 soloArrowLeftValign:"center", 662 soloArrowLeftHOffset:0, 663 soloArrowLeftVOffset:0, 664 665 soloArrowRightHalign:"right", 666 soloArrowRightValign:"center", 667 soloArrowRightHOffset:0, 668 soloArrowRightVOffset:0, 669 670 spinner:"spinner2", 671 672 stopLoop:"off", 673 stopAfterLoops:-1, 674 stopAtSlide:-1, 675 onHoverStop: "off", 676 677 shuffle:"off", 678 hideTimerBar:"off", 679 680 autoHeight:"off", 681 forceFullWidth:"off", 682 683 hideThumbsOnMobile:"off", 684 hideNavDelayOnMobile:1500, 685 hideBulletsOnMobile:"off", 686 hideArrowsOnMobile:"off", 687 hideThumbsUnderResolution:0, 688 689 hideSliderAtLimit:0, 690 hideCaptionAtLimit:0, 691 hideAllCaptionAtLilmit:0, 692 startWithSlide:0 693 }); 694 695 $('.slider-banner-container .slider-banner-fullwidth').show().revolution({ 696 delay:8000, 697 startwidth:1140, 698 startheight:450, 699 700 navigationArrows:"solo", 701 702 navigationStyle: "preview2", 703 navigationHAlign:"center", 704 navigationVAlign:"bottom", 705 navigationHOffset:0, 706 navigationVOffset:20, 707 708 soloArrowLeftHalign:"left", 709 soloArrowLeftValign:"center", 710 soloArrowLeftHOffset:0, 711 soloArrowLeftVOffset:0, 712 713 soloArrowRightHalign:"right", 714 soloArrowRightValign:"center", 715 soloArrowRightHOffset:0, 716 soloArrowRightVOffset:0, 717 718 fullWidth:"on", 719 720 spinner:"spinner2", 721 722 stopLoop:"off", 723 stopAfterLoops:-1, 724 stopAtSlide:-1, 725 onHoverStop: "off", 726 727 shuffle:"off", 728 729 autoHeight:"off", 730 forceFullWidth:"off", 731 732 hideThumbsOnMobile:"off", 733 hideNavDelayOnMobile:1500, 734 hideBulletsOnMobile:"off", 735 hideArrowsOnMobile:"off", 736 hideThumbsUnderResolution:0, 737 738 hideSliderAtLimit:0, 739 hideCaptionAtLimit:0, 740 hideAllCaptionAtLilmit:0, 741 startWithSlide:0 742 }); 743 744 $('.slider-banner-container .slider-banner-fullwidth-big-height').show().revolution({ 745 delay:8000, 746 startwidth:1140, 747 startheight:650, 748 749 navigationArrows:"solo", 750 751 navigationStyle: "preview2", 752 navigationHAlign:"center", 753 navigationVAlign:"bottom", 754 navigationHOffset:0, 755 navigationVOffset:20, 756 757 soloArrowLeftHalign:"left", 758 soloArrowLeftValign:"center", 759 soloArrowLeftHOffset:0, 760 soloArrowLeftVOffset:0, 761 762 soloArrowRightHalign:"right", 763 soloArrowRightValign:"center", 764 soloArrowRightHOffset:0, 765 soloArrowRightVOffset:0, 766 767 fullWidth:"on", 768 769 spinner:"spinner2", 770 771 stopLoop:"off", 772 stopAfterLoops:-1, 773 stopAtSlide:-1, 774 onHoverStop: "off", 775 776 shuffle:"off", 777 778 autoHeight:"off", 779 forceFullWidth:"off", 780 781 hideThumbsOnMobile:"off", 782 hideNavDelayOnMobile:1500, 783 hideBulletsOnMobile:"off", 784 hideArrowsOnMobile:"off", 785 hideThumbsUnderResolution:0, 786 787 hideSliderAtLimit:0, 788 hideCaptionAtLimit:0, 789 hideAllCaptionAtLilmit:0, 790 startWithSlide:0 791 }); 792 793 $('.banner:not(.dark-bg) .slider-banner-container .slider-banner-boxedwidth').show().revolution({ 794 delay:8000,
795 startwidth:1140, 796 startheight:450, 797 798 navigationArrows:"solo", 799 800 navigationStyle: "preview2", 801 navigationHAlign:"center", 802 navigationVAlign:"bottom", 803 navigationHOffset:0, 804 navigationVOffset:20, 805 806 soloArrowLeftHalign:"left", 807 soloArrowLeftValign:"center", 808 soloArrowLeftHOffset:0, 809 soloArrowLeftVOffset:0, 810 811 soloArrowRightHalign:"right", 812 soloArrowRightValign:"center", 813 soloArrowRightHOffset:0, 814 soloArrowRightVOffset:0, 815 816 fullWidth:"off", 817 818 spinner:"spinner2", 819 shadow: 1, 820 821 stopLoop:"off", 822 stopAfterLoops:-1, 823 stopAtSlide:-1, 824 onHoverStop: "off", 825 826 shuffle:"off", 827 828 autoHeight:"off", 829 forceFullWidth:"off", 830 831 hideThumbsOnMobile:"off", 832 hideNavDelayOnMobile:1500, 833 hideBulletsOnMobile:"off", 834 hideArrowsOnMobile:"off", 835 hideThumbsUnderResolution:0, 836 837 hideSliderAtLimit:0, 838 hideCaptionAtLimit:0, 839 hideAllCaptionAtLilmit:0, 840 startWithSlide:0 841 }); 842 843 $('.banner.dark-bg .slider-banner-container .slider-banner-boxedwidth').show().revolution({ 844 delay:8000, 845 startwidth:1140, 846 startheight:450, 847 848 navigationArrows:"solo", 849 850 navigationStyle: "preview2", 851 navigationHAlign:"center", 852 navigationVAlign:"bottom", 853 navigationHOffset:0, 854 navigationVOffset:20, 855 856 soloArrowLeftHalign:"left", 857 soloArrowLeftValign:"center", 858 soloArrowLeftHOffset:0, 859 soloArrowLeftVOffset:0, 860 861 soloArrowRightHalign:"right", 862 soloArrowRightValign:"center", 863 soloArrowRightHOffset:0, 864 soloArrowRightVOffset:0, 865 866 fullWidth:"off", 867 868 spinner:"spinner2", 869 shadow: 3, 870 871 stopLoop:"off", 872 stopAfterLoops:-1, 873 stopAtSlide:-1, 874 onHoverStop: "off", 875 876 shuffle:"off", 877 878 autoHeight:"off", 879 forceFullWidth:"off", 880 881 hideThumbsOnMobile:"off", 882 hideNavDelayOnMobile:1500, 883 hideBulletsOnMobile:"off", 884 hideArrowsOnMobile:"off", 885 hideThumbsUnderResolution:0, 886 887 hideSliderAtLimit:0, 888 hideCaptionAtLimit:0, 889 hideAllCaptionAtLilmit:0, 890 startWithSlide:0 891 }); 892 893 $('.slider-banner-container .slider-banner-boxedwidth-no-shadow').show().revolution({ 894 delay:8000, 895 startwidth:1140, 896 startheight:450, 897 898 navigationArrows:"solo", 899 900 navigationStyle: "preview2", 901 navigationHAlign:"center", 902 navigationVAlign:"bottom", 903 navigationHOffset:0, 904 navigationVOffset:20, 905 906 soloArrowLeftHalign:"left", 907 soloArrowLeftValign:"center", 908 soloArrowLeftHOffset:0, 909 soloArrowLeftVOffset:0, 910 911 soloArrowRightHalign:"right", 912 soloArrowRightValign:"center", 913 soloArrowRightHOffset:0, 914 soloArrowRightVOffset:0, 915 916 fullWidth:"off", 917 918 spinner:"spinner2", 919 shadow: 0, 920 921 stopLoop:"off", 922 stopAfterLoops:-1, 923 stopAtSlide:-1, 924 onHoverStop: "off", 925 926 shuffle:"off", 927 928 autoHeight:"off", 929 forceFullWidth:"off", 930 931 hideThumbsOnMobile:"off", 932 hideNavDelayOnMobile:1500, 933 hideBulletsOnMobile:"off", 934 hideArrowsOnMobile:"off", 935 hideThumbsUnderResolution:0, 936 937 hideSliderAtLimit:0, 938 hideCaptionAtLimit:0, 939 hideAllCaptionAtLilmit:0, 940 startWithSlide:0 941 }); 942 943 $('.banner:not(.dark-bg) .slider-banner-container .slider-banner-boxedwidth-stopped').show().revolution({ 944 delay:8000, 945 startwidth:1140, 946 startheight:450, 947 948 navigationArrows:"solo", 949 950 navigationStyle: "preview2", 951 navigationHAlign:"center", 952 navigationVAlign:"bottom", 953 navigationHOffset:0, 954 navigationVOffset:20, 955 956 soloArrowLeftHalign:"left", 957 soloArrowLeftValign:"center", 958 soloArrowLeftHOffset:0, 959 soloArrowLeftVOffset:0, 960 961 soloArrowRightHalign:"right", 962 soloArrowRightValign:"center", 963 soloArrowRightHOffset:0, 964 soloArrowRightVOffset:0, 965 966 fullWidth:"off", 967 968 spinner:"spinner2", 969 shadow: 1, 970 971 stopLoop:"off", 972 stopAfterLoops:0, 973 stopAtSlide:1, 974 onHoverStop: "off", 975 976 shuffle:"off", 977 978 autoHeight:"off", 979 forceFullWidth:"off", 980 981 hideThumbsOnMobile:"off", 982 hideNavDelayOnMobile:1500, 983 hideBulletsOnMobile:"off", 984 hideArrowsOnMobile:"off", 985 hideThumbsUnderResolution:0, 986 987 hideSliderAtLimit:0, 988 hideCaptionAtLimit:0, 989 hideAllCaptionAtLilmit:0, 990 startWithSlide:0 991 }); 992 993 $('.banner.dark-bg .slider-banner-container .slider-banner-boxedwidth-stopped').show().revolution({ 994 delay:8000,
995 startwidth:1140, 996 startheight:450, 997 998 navigationArrows:"solo", 999 1000 navigationStyle: "preview2", 1001 navigationHAlign:"center", 1002 navigationVAlign:"bottom", 1003 navigationHOffset:0, 1004 navigationVOffset:20, 1005 1006 soloArrowLeftHalign:"left", 1007 soloArrowLeftValign:"center", 1008 soloArrowLeftHOffset:0, 1009 soloArrowLeftVOffset:0, 1010 1011 soloArrowRightHalign:"right", 1012 soloArrowRightValign:"center", 1013 soloArrowRightHOffset:0, 1014 soloArrowRightVOffset:0, 1015 1016 fullWidth:"off", 1017 1018 spinner:"spinner2", 1019 shadow: 3, 1020 1021 stopLoop:"off", 1022 stopAfterLoops:0, 1023 stopAtSlide:1, 1024 onHoverStop: "off", 1025 1026 shuffle:"off", 1027 1028 autoHeight:"off", 1029 forceFullWidth:"off", 1030 1031 hideThumbsOnMobile:"off", 1032 hideNavDelayOnMobile:1500, 1033 hideBulletsOnMobile:"off", 1034 hideArrowsOnMobile:"off", 1035 hideThumbsUnderResolution:0, 1036 1037 hideSliderAtLimit:0, 1038 hideCaptionAtLimit:0, 1039 hideAllCaptionAtLilmit:0, 1040 startWithSlide:0 1041 }); 1042 1043 }; 1044 1045 //Revolution Slider 5 1046 if ($(".slider-revolution-5-container").length>0) { 1047 $(".tp-bannertimer").show(); 1048 1049 $('body:not(.transparent-header) .slider-revolution-5-container .slider-banner-fullscreen').revolution({ 1050 sliderType:"standard", 1051 sliderLayout:"fullscreen", 1052 delay:9000, 1053 autoHeight:"on", 1054 fullScreenOffsetContainer: ".header-container", 1055 navigation: { 1056 onHoverStop: "off", 1057 arrows: { 1058 style: "hebe", 1059 enable:true, 1060 tmp: '<div class="tp-title-wrap"><span class="tp-arr-titleholder">{{title}}</span></div>', 1061 left : { 1062 h_align:"left", 1063 v_align:"center", 1064 h_offset:0, 1065 v_offset:0, 1066 }, 1067 right : { 1068 h_align:"right", 1069 v_align:"center", 1070 h_offset:0, 1071 v_offset:0 1072 } 1073 }, 1074 bullets:{ 1075 style:"", 1076 enable:true, 1077 hide_onleave:true, 1078 direction:"horizontal", 1079 space: 3, 1080 h_align:"center", 1081 v_align:"bottom", 1082 h_offset:0, 1083 v_offset:20 1084 } 1085 }, 1086 gridwidth:1140, 1087 gridheight:750 1088 }); 1089 $('.transparent-header .slider-revolution-5-container .slider-banner-fullscreen').revolution({ 1090 sliderType:"standard", 1091 sliderLayout:"fullscreen", 1092 delay:9000, 1093 autoHeight:"on", 1094 fullScreenOffsetContainer: ".header-top", 1095 navigation: { 1096 onHoverStop: "off", 1097 arrows: { 1098 style: "hebe", 1099 enable:true, 1100 tmp: '<div class="tp-title-wrap"><span class="tp-arr-titleholder">{{title}}</span></div>', 1101 left : { 1102 h_align:"left", 1103 v_align:"center", 1104 h_offset:0, 1105 v_offset:0, 1106 }, 1107 right : { 1108 h_align:"right", 1109 v_align:"center", 1110 h_offset:0, 1111 v_offset:0 1112 } 1113 }, 1114 bullets:{ 1115 style:"", 1116 enable:true, 1117 hide_onleave:true, 1118 direction:"horizontal", 1119 space: 3, 1120 h_align:"center", 1121 v_align:"bottom", 1122 h_offset:0, 1123 v_offset:20 1124 } 1125 }, 1126 gridwidth:1140, 1127 gridheight:750 1128 }); 1129 $('.slider-revolution-5-container .slider-banner-fullwidth').revolution({ 1130 sliderType:"standard", 1131 sliderLayout:"fullwidth", 1132 delay:8000, 1133 gridwidth:1140, 1134 gridheight:450, 1135 navigation: { 1136 onHoverStop: "off", 1137 arrows: { 1138 style: "hebe", 1139 enable:true, 1140 tmp: '<div class="tp-title-wrap"><span class="tp-arr-titleholder">{{title}}</span></div>', 1141 left : { 1142 h_align:"left", 1143 v_align:"center", 1144 h_offset:0, 1145 v_offset:0, 1146 }, 1147 right : { 1148 h_align:"right", 1149 v_align:"center", 1150 h_offset:0, 1151 v_offset:0 1152 } 1153 }, 1154 bullets:{ 1155 style:"", 1156 enable:true, 1157 hide_onleave:true, 1158 direction:"horizontal", 1159 space: 3, 1160 h_align:"center", 1161 v_align:"bottom", 1162 h_offset:0, 1163 v_offset:20 1164 } 1165 } 1166 }); 1167 $('.slider-revolution-5-container .slider-banner-fullwidth-big-height').revolution({ 1168 sliderType:"standard", 1169 sliderLayout:"fullwidth", 1170 delay:8000, 1171 gridwidth:1140, 1172 gridheight:650, 1173 navigation: { 1174 onHoverStop: "off", 1175 arrows: { 1176 style: "hebe", 1177 enable:true, 1178 tmp: '<div class="tp-title-wrap"><span class="tp-arr-titleholder">{{title}}</span></div>', 1179 left : { 1180 h_align:"left", 1181 v_align:"center", 1182 h_offset:0, 1183 v_offset:0, 1184 }, 1185 right : { 1186 h_align:"right", 1187 v_align:"center", 1188 h_offset:0, 1189 v_offset:0 1190 } 1191 }, 1192 bullets:{ 1193 style:"", 1194 enable:true, 1195 hide_onleave:true, 1196 direction:"horizontal", 1197 space: 3, 1198 h_align:"center", 1199 v_align:"bottom", 1200 h_offset:0, 1201 v_offset:20 1202 } 1203 } 1204 }); 1205 $('.slider-revolution-5-container .slider-banner-boxedwidth').revolution({ 1206 sliderType:"standard", 1207 sliderLayout:"auto", 1208 delay:8000,
1209 gridwidth:1140, 1210 gridheight:450, 1211 shadow: 1, 1212 navigation: { 1213 onHoverStop: "off", 1214 arrows: { 1215 style: "hebe", 1216 enable:true, 1217 tmp: '<div class="tp-title-wrap"><span class="tp-arr-titleholder">{{title}}</span></div>', 1218 left : { 1219 h_align:"left", 1220 v_align:"center", 1221 h_offset:0, 1222 v_offset:0, 1223 }, 1224 right : { 1225 h_align:"right", 1226 v_align:"center", 1227 h_offset:0, 1228 v_offset:0 1229 } 1230 }, 1231 bullets:{ 1232 style:"", 1233 enable:true, 1234 hide_onleave:true, 1235 direction:"horizontal", 1236 space: 3, 1237 h_align:"center", 1238 v_align:"bottom", 1239 h_offset:0, 1240 v_offset:20 1241 } 1242 } 1243 }); 1244 $('.slider-revolution-5-container .slider-banner-fullscreen-hero:not(.dotted)').revolution({ 1245 sliderType:"hero", 1246 sliderLayout:"fullscreen", 1247 autoHeight:"on", 1248 gridwidth:1140, 1249 gridheight:650, 1250 delay: 9000 1251 }); 1252 $('.slider-revolution-5-container .slider-banner-fullscreen-hero.dotted').revolution({ 1253 sliderType:"hero", 1254 sliderLayout:"fullscreen", 1255 autoHeight:"on", 1256 gridwidth:1140, 1257 gridheight:650, 1258 dottedOverlay:"twoxtwo", 1259 delay: 9000 1260 }); 1261 $('.slider-revolution-5-container .slider-banner-fullwidth-hero:not(.dotted)').revolution({ 1262 sliderType:"hero", 1263 sliderLayout:"fullwidth", 1264 gridwidth:1140, 1265 gridheight:650, 1266 delay: 9000 1267 }); 1268 $('.slider-revolution-5-container .slider-banner-fullwidth-hero.dotted').revolution({ 1269 sliderType:"hero", 1270 sliderLayout:"fullwidth", 1271 gridwidth:1140, 1272 gridheight:650, 1273 delay: 9000, 1274 dottedOverlay:"twoxtwo" 1275 }); 1276 }; 1277 1278 //Full Page 1279 if ($(".fullpage-site").length>0) { 1280 $('.fullpage-site').fullpage({ 1281 anchors: ['firstPage', 'secondPage', 'thirdPage', 'fourthPage', 'fifthPage'], 1282 navigation: true, 1283 navigationPosition: 'right', 1284 navigationTooltips: ['Intro', 'About', 'Portfolio', 'Clients', 'Contact Us'], 1285 fixedElements: '.header-container, .subfooter', 1286 responsiveWidth: 992, 1287 responsiveHeight: 600, 1288 }); 1289 }; 1290 1291 //Owl carousel 1292 //----------------------------------------------- 1293 if ($('.owl-carousel').length>0) { 1294 $(".owl-carousel.carousel").owlCarousel({ 1295 items: 4, 1296 pagination: false, 1297 navigation: true, 1298 navigationText: false 1299 }); 1300 $(".owl-carousel.carousel-autoplay").owlCarousel({ 1301 items: 4, 1302 autoPlay: 5000, 1303 pagination: false, 1304 navigation: true, 1305 navigationText: false 1306 }); 1307 $(".owl-carousel.clients").owlCarousel({ 1308 items: 6, 1309 autoPlay: true, 1310 pagination: false, 1311 itemsDesktopSmall: [992,4], 1312 itemsTablet: [768,4], 1313 itemsMobile: [479,3] 1314 }); 1315 $(".owl-carousel.sf_slider_product").owlCarousel({ 1316 items: 4, 1317 autoPlay: true, 1318 pagination: false, 1319 itemsDesktopSmall: [992,4], 1320 itemsTablet: [768,4], 1321 itemsMobile: [479,1] 1322 }); 1323 $(".owl-carousel.content-slider").owlCarousel({ 1324 singleItem: true, 1325 autoPlay: 5000, 1326 navigation: false, 1327 navigationText: false, 1328 pagination: false 1329 }); 1330 $(".owl-carousel.content-slider-with-controls").owlCarousel({ 1331 singleItem: true, 1332 autoPlay: false, 1333 navigation: true, 1334 pagination: true 1335 }); 1336 $(".owl-carousel.content-slider-with-large-controls").owlCarousel({ 1337 singleItem: true, 1338 autoPlay: false, 1339 navigation: true, 1340 pagination: true 1341 }); 1342 $(".owl-carousel.content-slider-with-controls-autoplay").owlCarousel({ 1343 singleItem: true, 1344 autoPlay: 5000, 1345 navigation: true, 1346 pagination: true 1347 }); 1348 $(".owl-carousel.content-slider-with-large-controls-autoplay").owlCarousel({ 1349 singleItem: true, 1350 autoPlay: 5000, 1351 navigation: true, 1352 pagination: true 1353 }); 1354 $(".owl-carousel.content-slider-with-controls-autoplay-hover-stop").owlCarousel({ 1355 singleItem: true, 1356 autoPlay: 5000, 1357 navigation: true, 1358 pagination: true, 1359 stopOnHover: true 1360 }); 1361 }; 1362 1363 // Fixed header 1364 //----------------------------------------------- 1365 headerTopHeight = $(".header-top").outerHeight(), 1366 headerHeight = $("header.header.fixed").outerHeight(); 1367 $(window).resize(function() { 1368 if(($(this).scrollTop() < headerTopHeight + headerHeight -5 ) && ($(window).width() > 767)) { 1369 headerTopHeight = $(".header-top").outerHeight(), 1370 headerHeight = $("header.header.fixed").outerHeight(); 1371 } 1372 }); 1373 1374 $(window).scroll(function() { 1375 if (($(".header.fixed:not(.fixed-before)").length > 0) && !($(".transparent-header .slideshow").length>0)) { 1376 if (($(this).scrollTop() > headerTopHeight + headerHeight) && ($(window).width() > 767)) { 1377 $("body").addClass("fixed-header-on"); 1378 $(".header.fixed:not(.fixed-before)").addClass('animated object-visible fadeInDown'); 1379 $(".header-container").css("paddingBottom", (headerHeight)+"px"); 1380 } else { 1381 $("body").removeClass("fixed-header-on"); 1382 $(".header-container").css("paddingBottom", (0)+"px"); 1383 $(".header.fixed:not(.fixed-before)").removeClass('animated object-visible fadeInDown'); 1384 } 1385 } else if ($(".header.fixed:not(.fixed-before)").length > 0) { 1386 if (($(this).scrollTop() > headerTopHeight + headerHeight) && ($(window).width() > 767)) { 1387 $("body").addClass("fixed-header-on"); 1388 $(".header.fixed:not(.fixed-before)").addClass('animated object-visible fadeInDown'); 1389 } else { 1390 $("body").removeClass("fixed-header-on"); 1391 $(".header.fixed:not(.fixed-before)").removeClass('animated object-visible fadeInDown'); 1392 } 1393 }; 1394 }); 1395 1396 $(window).scroll(function() { 1397 if (($(".header.fixed.fixed-before").length > 0) && !($(".transparent-header .slideshow").length>0)) { 1398 if (($(this).scrollTop() > headerTopHeight) && ($(window).width() > 767)) { 1399 $("body").addClass("fixed-header-on"); 1400 $(".header.fixed.fixed-before").addClass('object-visible'); 1401 $(".header-container").css("paddingBottom", (headerHeight)+"px"); 1402 } else { 1403 $("body").removeClass("fixed-header-on"); 1404 $(".header-container").css("paddingBottom", (0)+"px"); 1405 $(".header.fixed.fixed-before").removeClass('object-visible'); 1406 } 1407 } else if ($(".header.fixed.fixed-before").length > 0) { 1408 if (($(this).scrollTop() > headerTopHeight) && ($(window).width() > 767)) { 1409 $("body").addClass("fixed-header-on"); 1410 $(".header.fixed.fixed-before").addClass('object-visible'); 1411 } else { 1412 $("body").removeClass("fixed-header-on"); 1413 $(".header.fixed.fixed-before").removeClass('object-visible'); 1414 } 1415 }; 1416 }); 1417 1418 // Charts 1419 //----------------------------------------------- 1420 if ($(".graph").length>0) { 1421 // Creates random numbers you don't need this for real graphs 1422 var randomScalingFactor = function(){ return Math.round(Math.random()*500)}; 1423 1424 if ($(".graph.line").length>0) { 1425 // Data for line charts 1426 var lineChartData = { 1427 labels : ["January","February","March","April","May","June","July"], 1428 datasets : [ 1429 { 1430 label: "First dataset", 1431 fillColor : "rgba(188,188,188,0.2)", 1432 strokeColor : "rgba(188,188,188,1)", 1433 pointColor : "rgba(188,188,188,1)", 1434 pointStrokeColor : "#fff", 1435 pointHighlightFill : "#fff", 1436 pointHighlightStroke : "rgba(188,188,188,1)", 1437 data : [250,300,250,200,250,300,250] 1438 }, 1439 { 1440 label: "Second dataset", 1441 fillColor : "rgba(126,187,205,0.2)", 1442 strokeColor : "rgba(126,187,205,1)", 1443 pointColor : "rgba(126,187,205,1)", 1444 pointStrokeColor : "#fff", 1445 pointHighlightFill : "#fff", 1446 pointHighlightStroke : "rgba(126,187,205,1)", 1447 data : [300,250,200,250,300,250,200] 1448 }, 1449 { 1450 label: "Third dataset", 1451 fillColor : "rgba(98,187,205,0.2)", 1452 strokeColor : "rgba(98,187,205,1)", 1453 pointColor : "rgba(98,187,205,1)", 1454 pointStrokeColor : "#fff", 1455 pointHighlightFill : "#fff", 1456 pointHighlightStroke : "rgba(98,187,205,1)", 1457 data : [0,100,200,300,400,500,400] 1458 } 1459 ] 1460 } 1461 1462 // Line Charts Initialization 1463 $(window).load(function() { 1464 var ctx = document.getElementById("lines-graph").getContext("2d"); 1465 window.newLine = new Chart(ctx).Line(lineChartData, { 1466 responsive: true, 1467 bezierCurve : false 1468 }); 1469 }); 1470 } 1471 if ($(".graph.bar").length>0) { 1472 // Data for bar charts 1473 var barChartData = { 1474 labels : ["January","February","March","April","May","June","July"], 1475 datasets : [ 1476 { 1477 fillColor : "rgba(188,188,188,0.5)", 1478 strokeColor : "rgba(188,188,188,0.8)", 1479 highlightFill: "rgba(188,188,188,0.75)", 1480 highlightStroke: "rgba(188,188,188,1)", 1481 data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()] 1482 }, 1483 { 1484 fillColor : "rgba(168,187,205,0.5)", 1485 strokeColor : "rgba(168,187,205,0.8)", 1486 highlightFill : "rgba(168,187,205,0.75)", 1487 highlightStroke : "rgba(168,187,205,1)", 1488 data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()] 1489 } 1490 ] 1491 } 1492 1493 // Bar Charts Initialization 1494 $(window).load(function() { 1495 var ctx = document.getElementById("bars-graph").getContext("2d"); 1496 window.myBar = new Chart(ctx).Bar(barChartData, { 1497 responsive : true 1498 }); 1499 }); 1500 } 1501 if ($(".graph.pie").length>0) { 1502 // Data for pie chart 1503 var pieData = [ 1504 { 1505 value: 120, 1506 color:"#09afdf", 1507 highlight: "#6BD5F4", 1508 label: "Blue" 1509 }, 1510 { 1511 value: 120, 1512 color: "#FDB45C", 1513 highlight: "#FFC870", 1514 label: "Yellow" 1515 }, 1516 { 1517 value: 120, 1518 color: "#4D5360", 1519 highlight: "#616774", 1520 label: "Dark Grey" 1521 } 1522 ]; 1523 1524 // Pie Chart Initialization 1525 $(window).load(function() { 1526 var ctx = document.getElementById("pie-graph").getContext("2d"); 1527 window.myPie = new Chart(ctx).Pie(pieData); 1528 }); 1529 } 1530 if ($(".graph.doughnut").length>0) { 1531 // Data for doughnut chart 1532 var doughnutData = [ 1533 { 1534 value: 120, 1535 color:"#09afdf", 1536 highlight: "#6BD5F4", 1537 label: "Blue" 1538 }, 1539 { 1540 value: 120, 1541 color: "#FDB45C", 1542 highlight: "#FFC870", 1543 label: "Yellow" 1544 }, 1545 { 1546 value: 120, 1547 color: "#4D5360", 1548 highlight: "#616774", 1549 label: "Dark Grey" 1550 } 1551 ]; 1552 1553 // Doughnut Chart Initialization 1554 $(window).load(function() { 1555 var ctx = document.getElementById("doughnut-graph").getContext("2d");
1556 window.myDoughnut = new Chart(ctx).Doughnut(doughnutData, {responsive : true}); 1557 }); 1558 } 1559 }; 1560 1561 // Magnific popup 1562 //----------------------------------------------- 1563 if (($(".popup-img").length > 0) || ($(".popup-mob-refresh-img-sku").length > 0) || ($(".popup-refresh-img-sku").length > 0) || ($(".popup-mobile-img-sku").length > 0) || ($(".popup-img-sku").length > 0) || ($(".popup-img-gallery").length > 0) || ($(".popup-img-customer-gallery").length > 0) || ($(".popup-iframe").length > 0) || ($(".popup-img-single").length > 0)) { 1564 $(".popup-img").magnificPopup({ 1565 type:"image", 1566 gallery: { 1567 enabled: true, 1568 } 1569 }); 1570 1571 $(".popup-img-gallery").magnificPopup({ 1572 type:"image", 1573 gallery: { 1574 enabled: true, 1575 } 1576 }); 1577 1578 $(".popup-img-customer-gallery").magnificPopup({ 1579 type:"image", 1580 gallery: { 1581 enabled: true, 1582 } 1583 }); 1584 $(".popup-img-single").magnificPopup({ 1585 type:"image", 1586 gallery: { 1587 enabled: false, 1588 } 1589 }); 1590 $('.popup-iframe').magnificPopup({ 1591 disableOn: 700, 1592 type: 'iframe', 1593 preloader: false, 1594 fixedContentPos: false 1595 }); 1596 }; 1597 1598 for(var i = 0; i < 10000; i++){ 1599 if (($(".popup-refresh-img-sku"+i).length > 0)) { 1600 $(".popup-refresh-img-sku"+i).magnificPopup({ 1601 type:"image", 1602 gallery: { 1603 enabled: true, 1604 }, 1605 image: { 1606 titleSrc: 'title' 1607 } 1608 }); 1609 }; 1610 } 1611 1612 for(var i = 0; i < 10000; i++){ 1613 if (($(".popup-mob-refresh-img-sku"+i).length > 0)) { 1614 $(".popup-mob-refresh-img-sku"+i).magnificPopup({ 1615 type:"image", 1616 gallery: { 1617 enabled: true, 1618 }, 1619 image: { 1620 titleSrc: 'title' 1621 } 1622 }); 1623 }; 1624 } 1625 1626 for(var i = 0; i < 10000; i++){ 1627 if (($(".popup-img-sku"+i).length > 0)) { 1628 $(".popup-img-sku"+i).magnificPopup({ 1629 type:"image", 1630 gallery: { 1631 enabled: true, 1632 }, 1633 image: { 1634 titleSrc: 'title' 1635 } 1636 }); 1637 }; 1638 } 1639 1640 for(var i = 0; i < 10000; i++){ 1641 if (($(".popup-mobile-img-sku"+i).length > 0)) { 1642 $(".popup-mobile-img-sku"+i).magnificPopup({ 1643 type:"image", 1644 gallery: { 1645 enabled: true, 1646 }, 1647 image: { 1648 titleSrc: 'title' 1649 } 1650 }); 1651 }; 1652 } 1653 1654 for(var i = 0; i < 10000; i++){ 1655 if (($(".popup-img-tech"+i).length > 0)) { 1656 $(".popup-img-tech"+i).magnificPopup({ 1657 type:"image", 1658 gallery: { 1659 enabled: true, 1660 }, 1661 image: { 1662 titleSrc: 'title' 1663 } 1664 }); 1665 }; 1666 } 1667 1668 1669 // Animations 1670 //----------------------------------------------- 1671 if ($("[data-animation-effect]").length>0) { 1672 $("[data-animation-effect]").each(function() { 1673 if(Modernizr.csstransitions) { 1674 var waypoints = $(this).waypoint(function(direction) { 1675 var appearDelay = $(this.element).attr("data-effect-delay"), 1676 animatedObject = $(this.element); 1677 setTimeout(function() { 1678 animatedObject.addClass('animated object-visible ' + animatedObject.attr("data-animation-effect")); 1679 }, appearDelay); 1680 this.destroy(); 1681 },{ 1682 offset: '90%' 1683 }); 1684 } else { 1685 $(this).addClass('object-visible'); 1686 } 1687 }); 1688 }; 1689 1690 // Text Rotators 1691 //----------------------------------------------- 1692 if ($(".text-rotator").length>0) { 1693 $(".text-rotator").each(function() { 1694 var tr_animationEffect = $(this).attr("data-rotator-animation-effect"); 1695 $(this).Morphext({ 1696 animation: ""+tr_animationEffect+"", // Overrides default "bounceIn" 1697 separator: ",", // Overrides default "," 1698 speed: 3000 // Overrides default 2000 1699 }); 1700 }); 1701 }; 1702 1703 // Stats Count To 1704 //----------------------------------------------- 1705 if ($(".stats [data-to]").length>0) { 1706 $(".stats [data-to]").each(function() { 1707 var stat_item = $(this), 1708 offset = stat_item.offset().top; 1709 if($(window).scrollTop() > (offset - 800) && !(stat_item.hasClass('counting'))) { 1710 stat_item.addClass('counting'); 1711 stat_item.countTo(); 1712 }; 1713 $(window).scroll(function() { 1714 if($(window).scrollTop() > (offset - 800) && !(stat_item.hasClass('counting'))) { 1715 stat_item.addClass('counting'); 1716 stat_item.countTo(); 1717 } 1718 }); 1719 }); 1720 }; 1721 1722 // Isotope filters 1723 //----------------------------------------------- 1724 if ($('.isotope-container').length>0 || $('.masonry-grid').length>0 || $('.masonry-grid-fitrows').length>0 || $('.isotope-container-fitrows').length>0) { 1725 $(window).load(function() { 1726 $('.masonry-grid').isotope({ 1727 itemSelector: '.masonry-grid-item', 1728 layoutMode: 'masonry' 1729 }); 1730 $('.masonry-grid-fitrows').isotope({ 1731 itemSelector: '.masonry-grid-item', 1732 layoutMode: 'fitRows' 1733 }); 1734 $('.isotope-container').fadeIn(); 1735 var $container = $('.isotope-container').isotope({ 1736 itemSelector: '.isotope-item', 1737 layoutMode: 'masonry', 1738 transitionDuration: '0.6s', 1739 filter: "*" 1740 }); 1741 $('.isotope-container-fitrows').fadeIn(); 1742 var $container_fitrows = $('.isotope-container-fitrows').isotope({ 1743 itemSelector: '.isotope-item', 1744 layoutMode: 'fitRows', 1745 transitionDuration: '0.6s', 1746 filter: "*" 1747 }); 1748 1749 var filterValue = $(".isotope-active").attr('data-filter'); 1750 $(".filters").find("li.active").removeClass("active"); 1751 $(".isotope-active").parent().addClass("active"); 1752 $container.isotope({ filter: filterValue }); 1753 $container_fitrows.isotope({ filter: filterValue }); 1754 1755 // filter items on button click 1756 $('.filters').on( 'click', 'ul.nav li a', function() { 1757 var filterValue = $(this).attr('data-filter'); 1758 $(".filters").find("li.active").removeClass("active"); 1759 $(this).parent().addClass("active"); 1760 $container.isotope({ filter: filterValue }); 1761 $container_fitrows.isotope({ filter: filterValue }); 1762 return false;
1763 }); 1764 }); 1765 $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { 1766 $('.tab-pane .masonry-grid-fitrows').isotope({ 1767 itemSelector: '.masonry-grid-item', 1768 layoutMode: 'fitRows' 1769 }); 1770 }); 1771 }; 1772 1773 // Animated Progress Bars 1774 //----------------------------------------------- 1775 if ($("[data-animate-width]").length>0) { 1776 $("[data-animate-width]").each(function() { 1777 if (Modernizr.touch || !Modernizr.csstransitions) { 1778 $(this).find("span").hide(); 1779 }; 1780 var waypoints = $(this).waypoint(function(direction) { 1781 $(this.element).animate({width: $(this.element).attr("data-animate-width")}, 800 ); 1782 this.destroy(); 1783 if (Modernizr.touch || !Modernizr.csstransitions) { 1784 $(this.element).find("span").show('slow'); 1785 }; 1786 },{ 1787 offset: '90%' 1788 }); 1789 }); 1790 }; 1791 1792 // Animated Circular Progress Bars 1793 //----------------------------------------------- 1794 if ($(".knob").length>0) { 1795 1796 $(".knob").knob(); 1797 $(".knob").each(function() { 1798 var animateVal = $(this).attr("data-animate-value"); 1799 $(this).animate({animatedVal: animateVal}, { 1800 duration: 2000, 1801 step: function() { 1802 $(this).val(Math.ceil(this.animatedVal)).trigger("change"); 1803 } 1804 }); 1805 }); 1806 } 1807 1808 //Video Background 1809 //----------------------------------------------- 1810 if($(".video-background").length>0) { 1811 if (Modernizr.touch) { 1812 $(".video-background").vide({ 1813 mp4: "videos/background-video.mp4", 1814 webm: "videos/background-video.webm", 1815 poster: "videos/video-fallback.jpg" 1816 }, { 1817 volume: 1, 1818 playbackRate: 1, 1819 muted: true, 1820 loop: true, 1821 autoplay: true, 1822 position: "50% 100%", // Similar to the CSS `background-position` property. 1823 posterType: "jpg", // Poster image type. "detect" â auto-detection; "none" â no poster; "jpg", "png", "gif",... - extensions. 1824 resizing: true 1825 }); 1826 } else { 1827 $(".video-background").vide({ 1828 mp4: "videos/background-video.mp4", 1829 webm: "videos/background-video.webm", 1830 poster: "videos/video-poster.jpg" 1831 }, { 1832 volume: 1, 1833 playbackRate: 1, 1834 muted: true, 1835 loop: true, 1836 autoplay: true, 1837 position: "50% 100%", // Similar to the CSS `background-position` property. 1838 posterType: "jpg", // Poster image type. "detect" â auto-detection; "none" â no poster; "jpg", "png", "gif",... - extensions. 1839 resizing: true 1840 }); 1841 }; 1842 1843 }; 1844 if($(".video-background-banner").length>0) { 1845 if (Modernizr.touch) { 1846 $(".video-background-banner").vide({ 1847 mp4: "videos/background-video-banner.mp4", 1848 webm: "videos/background-video-banner.webm", 1849 poster: "videos/video-fallback.jpg" 1850 }, { 1851 volume: 1, 1852 playbackRate: 1, 1853 muted: true, 1854 loop: true, 1855 autoplay: true, 1856 position: "50% 50%", // Similar to the CSS `background-position` property. 1857 posterType: "jpg", // Poster image type. "detect" â auto-detection; "none" â no poster; "jpg", "png", "gif",... - extensions. 1858 resizing: true 1859 }); 1860 } else { 1861 $(".video-background-banner").vide({ 1862 mp4: "videos/background-video-banner.mp4", 1863 webm: "videos/background-video-banner.webm", 1864 poster: "videos/video-banner-poster.jpg" 1865 }, { 1866 volume: 1, 1867 playbackRate: 1, 1868 muted: true, 1869 loop: true, 1870 autoplay: true, 1871 position: "50% 50%", // Similar to the CSS `background-position` property. 1872 posterType: "jpg", // Poster image type. "detect" â auto-detection; "none" â no poster; "jpg", "png", "gif",... - extensions. 1873 resizing: true 1874 }); 1875 }; 1876 }; 1877 //Scroll totop 1878 //----------------------------------------------- 1879 $(window).scroll(function() { 1880 if($(this).scrollTop() != 0) { 1881 $(".scrollToTop").fadeIn(); 1882 } else { 1883 $(".scrollToTop").fadeOut(); 1884 } 1885 }); 1886 1887 $(".scrollToTop").click(function() { 1888 $("body,html").animate({scrollTop:0},800); 1889 }); 1890 1891 //Modal 1892 //----------------------------------------------- 1893 if($(".modal").length>0) { 1894 $(".modal").each(function() { 1895 $(".modal").prependTo( "body" ); 1896 }); 1897 } 1898 1899 // Pricing tables popovers 1900 //----------------------------------------------- 1901 if ($(".pricing-tables").length>0) { 1902 $(".plan .pt-popover").popover({ 1903 trigger: 'hover', 1904 container: 'body' 1905 }); 1906 }; 1907 1908 // Contact forms validation 1909 //----------------------------------------------- 1910 if($("#contact-form").length>0) { 1911 $("#contact-form").validate({ 1912 submitHandler: function(form) { 1913 $('.submit-button').button("loading"); 1914 $.ajax({ 1915 type: "POST", 1916 url: "php/email-sender.php", 1917 data: { 1918 "name": $("#contact-form #name").val(), 1919 "email": $("#contact-form #email").val(), 1920 "subject": $("#contact-form #subject").val(), 1921 "message": $("#contact-form #message").val() 1922 }, 1923 dataType: "json", 1924 success: function (data) { 1925 if (data.sent == "yes") { 1926 $("#MessageSent").removeClass("hidden"); 1927 $("#MessageNotSent").addClass("hidden"); 1928 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1929 $("#contact-form .form-control").each(function() { 1930 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1931 }); 1932 } else { 1933 $("#MessageNotSent").removeClass("hidden"); 1934 $("#MessageSent").addClass("hidden"); 1935 } 1936 } 1937 }); 1938 }, 1939 // debug: true, 1940 errorPlacement: function(error, element) { 1941 error.insertBefore( element ); 1942 }, 1943 onkeyup: false, 1944 onclick: false, 1945 rules: { 1946 name: { 1947 required: true, 1948 minlength: 2 1949 }, 1950 email: { 1951 required: true, 1952 email: true 1953 }, 1954 subject: { 1955 required: true 1956 }, 1957 message: { 1958 required: true, 1959 minlength: 10 1960 } 1961 }, 1962 messages: { 1963 name: { 1964 required: "Please specify your name", 1965 minlength: "Your name must be longer than 2 characters" 1966 }, 1967 email: { 1968 required: "We need your email address to contact you", 1969 email: "Please enter a valid email address e.g. [email protected]" 1970 }, 1971 subject: { 1972 required: "Please enter a subject" 1973 }, 1974 message: { 1975 required: "Please enter a message", 1976 minlength: "Your message must be longer than 10 characters" 1977 } 1978 }, 1979 errorElement: "span", 1980 highlight: function (element) { 1981 $(element).parent().removeClass("has-success").addClass("has-error"); 1982 $(element).siblings("label").addClass("hide"); 1983 }, 1984 success: function (element) { 1985 $(element).parent().removeClass("has-error").addClass("has-success"); 1986 $(element).siblings("label").removeClass("hide"); 1987 } 1988 }); 1989 }; 1990 1991 if($("#sidebar-form").length>0) { 1992 1993 $("#sidebar-form").validate({ 1994 submitHandler: function(form) { 1995 $('.submit-button').button("loading"); 1996 $.ajax({ 1997 type: "POST", 1998 url: "php/email-sender.php", 1999 data: { 2000 "name": $("#sidebar-form #name3").val(), 2001 "email": $("#sidebar-form #email3").val(), 2002 "subject": "Message from FAQ page", 2003 "category": $("#sidebar-form #category").val(), 2004 "message": $("#sidebar-form #message3").val() 2005 }, 2006 dataType: "json", 2007 success: function (data) { 2008 if (data.sent == "yes") { 2009 $("#MessageSent3").removeClass("hidden"); 2010 $("#MessageNotSent3").addClass("hidden"); 2011 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 2012 $("#sidebar-form .form-control").each(function() { 2013 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 2014 }); 2015 } else { 2016 $("#MessageNotSent3").removeClass("hidden"); 2017 $("#MessageSent3").addClass("hidden"); 2018 } 2019 } 2020 }); 2021 }, 2022 // debug: true, 2023 errorPlacement: function(error, element) { 2024 error.insertAfter( element ); 2025 }, 2026 onkeyup: false, 2027 onclick: false, 2028 rules: { 2029 name3: { 2030 required: true, 2031 minlength: 2 2032 }, 2033 email3: { 2034 required: true, 2035 email: true 2036 }, 2037 message3: { 2038 required: true, 2039 minlength: 10 2040 } 2041 }, 2042 messages: { 2043 name3: { 2044 required: "Please specify your name", 2045 minlength: "Your name must be longer than 2 characters" 2046 }, 2047 email3: { 2048 required: "We need your email address to contact you", 2049 email: "Please enter a valid email address e.g. [email protected]" 2050 }, 2051 message3: { 2052 required: "Please enter a message", 2053 minlength: "Your message must be longer than 10 characters" 2054 } 2055 }, 2056 errorElement: "span", 2057 highlight: function (element) { 2058 $(element).parent().removeClass("has-success").addClass("has-error"); 2059 }, 2060 success: function (element) { 2061 $(element).parent().removeClass("has-error").addClass("has-success"); 2062 } 2063 }); 2064 2065 }; 2066 2067 if($("#rsvp").length>0) { 2068 $("#rsvp").validate({ 2069 submitHandler: function(form) { 2070 $('.submit-button').button("loading"); 2071 $.ajax({ 2072 type: "POST", 2073 url: "php/email-sender.php", 2074 data: { 2075 "name": $("#rsvp #name").val(), 2076 "email": $("#rsvp #email").val(), 2077 "guests": $("#rsvp #guests").val(), 2078 "subject": "RSVP", 2079 "events": $("#rsvp #events").val() 2080 }, 2081 dataType: "json", 2082 success: function (data) { 2083 if (data.sent == "yes") { 2084 $("#MessageSent").removeClass("hidden"); 2085 $("#MessageNotSent").addClass("hidden"); 2086 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 2087 $("#rsvp .form-control").each(function() { 2088 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 2089 }); 2090 } else { 2091 $("#MessageNotSent").removeClass("hidden"); 2092 $("#MessageSent").addClass("hidden"); 2093 } 2094 } 2095 }); 2096 }, 2097 // debug: true, 2098 errorPlacement: function(error, element) { 2099 error.insertAfter( element ); 2100 }, 2101 onkeyup: false, 2102 onclick: false, 2103 rules: { 2104 name: { 2105 required: true, 2106 minlength: 2 2107 }, 2108 email: { 2109 required: true, 2110 email: true 2111 }, 2112 guests: { 2113 required: true 2114 }, 2115 events: { 2116 required: true 2117 } 2118 }, 2119 messages: { 2120 name: { 2121 required: "Please specify your name", 2122 minlength: "Your name must be longer than 2 characters" 2123 }, 2124 email: { 2125 required: "We need your email address to contact you", 2126 email: "Please enter a valid email address e.g. [email protected]" 2127 } 2128 }, 2129 errorElement: "span", 2130 highlight: function (element) { 2131 $(element).parent().removeClass("has-success").addClass("has-error"); 2132 $(element).siblings("label").addClass("hide"); 2133 }, 2134 success: function (element) { 2135 $(element).parent().removeClass("has-error").addClass("has-success"); 2136 $(element).siblings("label").removeClass("hide"); 2137 } 2138 }); 2139 }; 2140 2141 2142 // Affix Menu 2143 //----------------------------------------------- 2144 if ($(".affix-menu").length>0) { 2145 setTimeout(function () { 2146 var $sideBar = $('.sidebar') 2147 2148 $sideBar.affix({ 2149 offset: { 2150 top: function () { 2151 var offsetTop = $sideBar.offset().top 2152 return (this.top = offsetTop - 65) 2153 }, 2154 bottom: function () { 2155 var affixBottom = $(".footer").outerHeight(true) + $(".subfooter").outerHeight(true) 2156 if ($(".footer-top").length>0) { 2157 affixBottom = affixBottom + $(".footer-top").outerHeight(true) 2158 } 2159 return (this.bottom = affixBottom+50) 2160 } 2161 } 2162 }) 2163 }, 100) 2164 } 2165 2166 //Scroll Spy 2167 //----------------------------------------------- 2168 if($(".scrollspy").length>0) { 2169 $("body").addClass("scroll-spy"); 2170 if($(".fixed.header").length>0) { 2171 $('body').scrollspy({ 2172 target: '.scrollspy', 2173 offset: 85 2174 }); 2175 } else { 2176 $('body').scrollspy({ 2177 target: '.scrollspy', 2178 offset: 20 2179 }); 2180 } 2181 } 2182 2183 //Smooth Scroll 2184 //----------------------------------------------- 2185 if ($(".smooth-scroll").length>0) { 2186 if(($(".header.fixed").length>0) && (Modernizr.mq('only all and (min-width: 768px)'))) { 2187 $('.smooth-scroll a, a.smooth-scroll').click(function() { 2188 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 2189 var target = $(this.hash); 2190 target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 2191 if (target.length) { 2192 $('html,body').animate({ 2193 scrollTop: target.offset().top-63 2194 }, 1000); 2195 return false;
2196 } 2197 } 2198 }); 2199 } else { 2200 $('.smooth-scroll a, a.smooth-scroll').click(function() { 2201 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 2202 var target = $(this.hash); 2203 target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 2204 if (target.length) { 2205 $('html,body').animate({ 2206 scrollTop: target.offset().top 2207 }, 1000); 2208 return false; 2209 } 2210 } 2211 }); 2212 } 2213 } 2214 2215 // Offcanvas side navbar 2216 //----------------------------------------------- 2217 if ($("#offcanvas").length>0) { 2218 $('#offcanvas').offcanvas({ 2219 canvas: "body", 2220 disableScrolling: false, 2221 toggle: false 2222 }); 2223 }; 2224 2225 if ($("#offcanvas").length>0) { 2226 $('#offcanvas [data-toggle=dropdown]').on('click', function(event) { 2227 // Avoid following the href location when clicking 2228 event.preventDefault(); 2229 // Avoid having the menu to close when clicking 2230 event.stopPropagation(); 2231 // close all the siblings 2232 $(this).parent().siblings().removeClass('open'); 2233 // close all the submenus of siblings 2234 $(this).parent().siblings().find('[data-toggle=dropdown]').parent().removeClass('open'); 2235 // opening the one you clicked on 2236 $(this).parent().toggleClass('open'); 2237 }); 2238 }; 2239 2240 // Parallax section 2241 //----------------------------------------------- 2242 if (($(".parallax").length>0) && !Modernizr.touch ){ 2243 $(".parallax").parallax("50%", 0.2); 2244 }; 2245 if (($(".parallax-2").length>0) && !Modernizr.touch ){ 2246 $(".parallax-2").parallax("50%", 0.3); 2247 }; 2248 if (($(".parallax-3").length>0) && !Modernizr.touch ){ 2249 $(".parallax-3").parallax("50%", 0.4); 2250 }; 2251 2252 // Notify Plugin 2253 //----------------------------------------------- 2254 if (($(".main-navigation.onclick").length>0) && !Modernizr.touch ){ 2255 $.notify({ 2256 // options 2257 message: 'The Dropdowns of the Main Menu, are now open with click on Parent Items. Click "Home" to checkout this behavior.' 2258 },{ 2259 // settings 2260 type: 'info', 2261 delay: 10000, 2262 offset : { 2263 y: 150, 2264 x: 20 2265 } 2266 }); 2267 }; 2268 if (!($(".main-navigation.animated").length>0) && !Modernizr.touch && $(".main-navigation").length>0){ 2269 $.notify({ 2270 // options 2271 message: 'The animations of main menu are disabled.' 2272 },{ 2273 // settings 2274 type: 'info', 2275 delay: 10000, 2276 offset : { 2277 y: 150, 2278 x: 20 2279 } 2280 }); 2281 }; 2282 if ($(".btn-alert").length>0){ 2283 $(".btn-alert").on('click', function(event) { 2284 $.notify({ 2285 // options 2286 message: 'Great! you have just created this message :-) you can configure this into the template.js file' 2287 },{ 2288 // settings 2289 type: 'info', 2290 delay: 4000, 2291 offset : { 2292 y: 100, 2293 x: 20 2294 } 2295 }); 2296 return false; 2297 }); 2298 }; 2299 2300 // Remove Button 2301 //----------------------------------------------- 2302 $(".btn-remove").click(function() { 2303 $(this).closest(".remove-data").remove(); 2304 }); 2305 2306 // Shipping Checkbox 2307 //----------------------------------------------- 2308 if ($("#shipping-info-check").is(':checked')) { 2309 $("#shipping-information").hide(); 2310 } 2311 $("#shipping-info-check").change(function(){ 2312 if ($(this).is(':checked')) { 2313 $("#shipping-information").slideToggle(); 2314 } else { 2315 $("#shipping-information").slideToggle(); 2316 } 2317 }); 2318 2319 // Full Width Image Overlay 2320 //----------------------------------------------- 2321 if ($(".full-image-overlay").length>0) { 2322 overlayHeight = $(".full-image-overlay").outerHeight(); 2323 $(".full-image-overlay").css("marginTop",-overlayHeight/2); 2324 }; 2325 2326 //This will prevent the event from bubbling up and close the dropdown when you type/click on text boxes (Header Top). 2327 //----------------------------------------------- 2328 $('.header-top .dropdown-menu input').click(function(e) { 2329 e.stopPropagation(); 2330 }); 2331 2332 }); // End document ready 2333 2334})(this.jQuery); 2335 2336if (jQuery(".btn-print").length>0) { 2337 function print_window() { 2338 var mywindow = window; 2339 mywindow.document.close(); 2340 mywindow.focus(); 2341 mywindow.print(); 2342 mywindow.close(); 2343 } 2344}
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.