1// Calculate banner title position 2$(document).ready(function () { 3 var banner = parseInt($('.banner.inner').outerHeight()); 4 var naslov = parseInt($('.banner.inner .container').outerHeight()); 5 var padding = (banner / 2) - (naslov - (naslov / 2)); 6 $('.banner.inner').css('padding-top', padding - 10); 7}); 8 9$(document).ready(function () { 10 var sectionbanner = parseInt($('.banner.section-banner').outerHeight()); 11 var naslov = parseInt($('.banner.section-banner .container').outerHeight()); 12 var padding = (sectionbanner / 2) - (naslov - (naslov / 2)); 13 $('.banner.section-banner').css('padding-top', padding); 14}); 15// Chosen 16$(document).ready(function () { 17 //Chosen 18 $(".chosen-select").chosen(); 19 // 20}); 21// Collapse content 22function collapseForm() { 23 24 if ($('#collapseContent').hasClass('in')) { 25 $('#collapseContent').removeClass("collapse in").addClass('collapsing'); 26 27 setTimeout(function () { 28 $('#collapseContent').removeClass('collapsing').addClass('collapse '); 29 }, 200); 30 } else { 31 $('#collapseContent').removeClass("collapse ").addClass('collapsing'); 32 setTimeout(function () { 33 $('#collapseContent').removeClass('collapsing').addClass('collapse in'); 34 }, 200); 35 $('html,body').animate({ 36 scrollTop: $('#collapseContent').offset().top - 0 37 }, 1000); 38 } 39} 40// Search fullscreen 41$(function () { 42 $('a[href="#search"]').on('click', function (event) { 43 event.preventDefault(); 44 $('#search').addClass('open'); 45 $('#search > form > input[type="search"]').focus(); 46 }); 47 48 $('#search').on('click keyup', function (event) { 49 if (event.target === this || event.target.className === 'close' || event.keyCode === 27) { 50 $(this).removeClass('open'); 51 } 52 }); 53 54 $('#close').on('click', function (event) { 55 $('#search').removeClass('open'); 56 57 }); 58 $('#close').on('touch', function (event) { 59 $('#search').removeClass('open'); 60 61 }); 62}); 63 64//close other open accordion on click 65$('.procedura [data-toggle="collapse"]').click(function () { 66 $('.collapse.in').collapse('hide') 67}); 68 69(function ($) { 70 71 /****************** Date Picker *********************/ 72 /****************************************************/ 73 $('#datefilter').daterangepicker({ 74 locale: { 75 format: 'DD/MM/YYYY' 76 }, 77 78 "cancelClass": "btn-gray", 79 autoApply: true 80 }, function (start, end, label) { 81 console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')"); 82 }); 83 $('#datefilter').val(''); 84 85 $('#datefilter-xs').daterangepicker({ 86 locale: { 87 format: 'DD/MM/YYYY' 88 }, 89 90 "cancelClass": "btn-gray", 91 autoApply: true 92 }, function (start, end, label) { 93 console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')"); 94 }); 95 $('#datefilter-xs').val(''); 96 97 //Change user profile picture 98//---------------------------------- 99 function promeniSliku(elemId) { 100 var elem = document.getElementById(elemId); 101 if (elem && document.createEvent) { 102 var evt = document.createEvent("MouseEvents"); 103 evt.initEvent("click", true, false); 104 elem.dispatchEvent(evt); 105 } 106 } 107 108 $(document).ready(function () { 109 110 if ($('.boxed .fullscreen-bg').length > 0) { 111 $("body").addClass("transparent-page-wrapper"); 112 } 113 ; 114 115 $(window).load(function () { 116 $("body").removeClass("no-trans"); 117 }); 118 // Enable Smooth Scroll only on Chrome and only on Win and Linux Systems 119 var platform = navigator.platform.toLowerCase(); 120 if ((platform.indexOf('win') == 0 || platform.indexOf('linux') == 0) && !Modernizr.touch) { 121 if ($.browser.webkit) { 122 $.webkitSmoothScroll(); 123 console.log("hello webkit"); 124 } 125 } 126 ; 127 //Show dropdown on hover only for desktop devices 128 //-----------------------------------------------
129 var delay = 0, setTimeoutConst; 130 if ((Modernizr.mq('only all and (min-width: 768px)') && !Modernizr.touch) || $("html.ie8").length > 0) { 131 $('.main-navigation:not(.onclick) .navbar-nav>li.dropdown, .main-navigation:not(.onclick) li.dropdown>ul>li.dropdown').hover( 132 function () { 133 var $this = $(this); 134 setTimeoutConst = setTimeout(function () { 135 $this.addClass('open').slideDown(); 136 $this.find('.dropdown-toggle').addClass('disabled'); 137 }, delay); 138 139 }, function () { 140 clearTimeout(setTimeoutConst); 141 $(this).removeClass('open'); 142 $(this).find('.dropdown-toggle').removeClass('disabled'); 143 }); 144 } 145 ; 146 147 //Show dropdown on click only for mobile devices 148 //----------------------------------------------- 149 if (Modernizr.mq('only all and (max-width: 991px)') || Modernizr.touch || $(".main-navigation.onclick").length > 0) { 150 $('.main-navigation [data-toggle=dropdown], .header-dropdown-buttons [data-toggle=dropdown], .header-top [data-toggle=dropdown]').on('click', function (event) { 151 // Avoid following the href location when clicking 152 event.preventDefault(); 153 // Avoid having the menu to close when clicking 154 event.stopPropagation(); 155 // close all the siblings 156 $(this).parent().siblings().removeClass('open'); 157 // close all the submenus of siblings 158 $(this).parent().siblings().find('[data-toggle=dropdown]').parent().removeClass('open'); 159 // opening the one you clicked on 160 $(this).parent().toggleClass('open'); 161 }); 162 } 163 ; 164 165 //Transparent Header Calculations 166 var timer_tr; 167 if ($(".transparent-header").length > 0) { 168 $(window).load(function () { 169 trHeaderHeight = $("header.header").outerHeight(); 170 $(".transparent-header .tp-bannertimer").css("marginTop", (trHeaderHeight) + "px"); 171 }); 172 $(window).resize(function () { 173 if ($(this).scrollTop() < headerTopHeight + headerHeight - 5) { 174 trHeaderHeight = $("header.header").outerHeight(); 175 $(".transparent-header .tp-bannertimer").css("marginTop", (trHeaderHeight) + "px"); 176 } 177 }); 178 $(window).scroll(function () { 179 if ($(this).scrollTop() == 0) { 180 if (timer_tr) { 181 window.clearTimeout(timer_tr); 182 } 183 ; 184 timer_tr = window.setTimeout(function () { 185 trHeaderHeight = $("header.header").outerHeight(); 186 $(".transparent-header .tp-bannertimer").css("marginTop", (trHeaderHeight) + "px"); 187 }, 300); 188 } 189 ; 190 }); 191 } 192 193 if ($(".transparent-header .slideshow").length > 0) { 194 $(".header-container").addClass("transparent-header-on"); 195 } else { 196 $(".header-container").removeClass("transparent-header-on"); 197 } 198 199 //Full Width Slider with Transparent Header Calculations 200 if ($(".transparent-header .slider-banner-fullwidth-big-height").length > 0) { 201 if (Modernizr.mq('only all and (max-width: 991px)')) { 202 $("body").removeClass("transparent-header"); 203 $(".header-container header.header").removeClass("transparent-header-on"); 204 $(".tp-bannertimer").css("marginTop", "0px"); 205 $("body").addClass("slider-banner-fullwidth-big-height-removed"); 206 } else { 207 $("body").addClass("transparent-header"); 208 $(".header-container header.header").addClass("transparent-header-on"); 209 $("body").removeClass("slider-banner-fullwidth-big-height-removed"); 210 } 211 } 212 ; 213 214 if ($(".transparent-header .slider-banner-fullwidth-big-height").length > 0 || $(".slider-banner-fullwidth-big-height-removed").length > 0) { 215 $(window).resize(function () { 216 if (Modernizr.mq('only all and (max-width: 991px)')) { 217 $("body").removeClass("transparent-header"); 218 $(".header-container header.header").removeClass("transparent-header-on"); 219 $(".tp-bannertimer").css("marginTop", "0px"); 220 } else { 221 $("body").addClass("transparent-header"); 222 $(".header-container header.header").addClass("transparent-header-on"); 223 } 224 }); 225 } 226 ; 227 228 //Revolution Slider 229 if ($(".slider-banner-container").length > 0) { 230 231 $(".tp-bannertimer").show(); 232 233 $('body:not(.transparent-header) .slider-banner-container .slider-banner-fullscreen').show().revolution({ 234 delay: 8000, 235 startwidth: 1140, 236 startheight: 520, 237 fullWidth: "off", 238 fullScreen: "on", 239 fullScreenOffsetContainer: ".header-container", 240 fullScreenOffset: "0", 241 navigationArrows: "solo", 242 navigationStyle: "preview2", 243 navigationHAlign: "center", 244 navigationVAlign: "bottom", 245 navigationHOffset: 0, 246 navigationVOffset: 20, 247 soloArrowLeftHalign: "left", 248 soloArrowLeftValign: "center", 249 soloArrowLeftHOffset: 0, 250 soloArrowLeftVOffset: 0, 251 soloArrowRightHalign: "right", 252 soloArrowRightValign: "center", 253 soloArrowRightHOffset: 0, 254 soloArrowRightVOffset: 0, 255 spinner: "spinner2", 256 stopLoop: "off", 257 stopAfterLoops: -1, 258 stopAtSlide: -1, 259 onHoverStop: "off", 260 shuffle: "off", 261 hideTimerBar: "off", 262 autoHeight: "off", 263 forceFullWidth: "off", 264 hideThumbsOnMobile: "off", 265 hideNavDelayOnMobile: 1500, 266 hideBulletsOnMobile: "off", 267 hideArrowsOnMobile: "off", 268 hideThumbsUnderResolution: 0, 269 hideSliderAtLimit: 0, 270 hideCaptionAtLimit: 0, 271 hideAllCaptionAtLilmit: 0, 272 startWithSlide: 0 273 }); 274 $('.transparent-header .slider-banner-container .slider-banner-fullscreen').show().revolution({ 275 delay: 8000, 276 startwidth: 1140, 277 startheight: 520, 278 fullWidth: "off", 279 fullScreen: "on", 280 fullScreenOffsetContainer: ".header-container", 281 fullScreenOffset: "", 282 navigationArrows: "solo", 283 navigationStyle: "preview2", 284 navigationHAlign: "center", 285 navigationVAlign: "bottom", 286 navigationHOffset: 0, 287 navigationVOffset: 20, 288 soloArrowLeftHalign: "left", 289 soloArrowLeftValign: "center", 290 soloArrowLeftHOffset: 0, 291 soloArrowLeftVOffset: 0, 292 soloArrowRightHalign: "right", 293 soloArrowRightValign: "center", 294 soloArrowRightHOffset: 0, 295 soloArrowRightVOffset: 0, 296 spinner: "spinner2", 297 stopLoop: "off", 298 stopAfterLoops: -1, 299 stopAtSlide: -1, 300 onHoverStop: "off", 301 shuffle: "off", 302 hideTimerBar: "off", 303 autoHeight: "off", 304 forceFullWidth: "off", 305 hideThumbsOnMobile: "off", 306 hideNavDelayOnMobile: 1500, 307 hideBulletsOnMobile: "off", 308 hideArrowsOnMobile: "off", 309 hideThumbsUnderResolution: 0, 310 hideSliderAtLimit: 0, 311 hideCaptionAtLimit: 0, 312 hideAllCaptionAtLilmit: 0, 313 startWithSlide: 0 314 }); 315 316 $('.slider-banner-container .slider-banner-fullwidth').show().revolution({ 317 delay: 8000, 318 startwidth: 1140, 319 startheight: 450, 320 navigationArrows: "solo", 321 navigationStyle: "preview2", 322 navigationHAlign: "center", 323 navigationVAlign: "bottom", 324 navigationHOffset: 0, 325 navigationVOffset: 20, 326 soloArrowLeftHalign: "left", 327 soloArrowLeftValign: "center", 328 soloArrowLeftHOffset: 0, 329 soloArrowLeftVOffset: 0, 330 soloArrowRightHalign: "right", 331 soloArrowRightValign: "center", 332 soloArrowRightHOffset: 0, 333 soloArrowRightVOffset: 0, 334 fullWidth: "on", 335 spinner: "spinner2", 336 stopLoop: "off", 337 stopAfterLoops: -1, 338 stopAtSlide: -1, 339 onHoverStop: "off", 340 shuffle: "off", 341 autoHeight: "off", 342 forceFullWidth: "off", 343 hideThumbsOnMobile: "off", 344 hideNavDelayOnMobile: 1500, 345 hideBulletsOnMobile: "off", 346 hideArrowsOnMobile: "off", 347 hideThumbsUnderResolution: 0, 348 hideSliderAtLimit: 0, 349 hideCaptionAtLimit: 0, 350 hideAllCaptionAtLilmit: 0, 351 startWithSlide: 0 352 }); 353 354 $('.slider-banner-container .slider-banner-fullwidth-big-height').show().revolution({ 355 delay: 8000, 356 startwidth: 1140, 357 startheight: 650, 358 navigationArrows: "solo", 359 navigationStyle: "preview2", 360 navigationHAlign: "center", 361 navigationVAlign: "bottom", 362 navigationHOffset: 0, 363 navigationVOffset: 20, 364 soloArrowLeftHalign: "left", 365 soloArrowLeftValign: "center", 366 soloArrowLeftHOffset: 0, 367 soloArrowLeftVOffset: 0, 368 soloArrowRightHalign: "right", 369 soloArrowRightValign: "center", 370 soloArrowRightHOffset: 0, 371 soloArrowRightVOffset: 0, 372 fullWidth: "on", 373 spinner: "spinner2", 374 stopLoop: "off", 375 stopAfterLoops: -1, 376 stopAtSlide: -1, 377 onHoverStop: "off", 378 shuffle: "off", 379 autoHeight: "off", 380 forceFullWidth: "off", 381 hideThumbsOnMobile: "off", 382 hideNavDelayOnMobile: 1500, 383 hideBulletsOnMobile: "off", 384 hideArrowsOnMobile: "off", 385 hideThumbsUnderResolution: 0, 386 hideSliderAtLimit: 0, 387 hideCaptionAtLimit: 0, 388 hideAllCaptionAtLilmit: 0, 389 startWithSlide: 0 390 }); 391 392 $('.banner:not(.dark-bg) .slider-banner-container .slider-banner-boxedwidth').show().revolution({ 393 delay: 8000, 394 startwidth: 1140, 395 startheight: 450, 396 navigationArrows: "solo", 397 navigationStyle: "preview2", 398 navigationHAlign: "center", 399 navigationVAlign: "bottom", 400 navigationHOffset: 0, 401 navigationVOffset: 20, 402 soloArrowLeftHalign: "left", 403 soloArrowLeftValign: "center", 404 soloArrowLeftHOffset: 0, 405 soloArrowLeftVOffset: 0, 406 soloArrowRightHalign: "right", 407 soloArrowRightValign: "center", 408 soloArrowRightHOffset: 0, 409 soloArrowRightVOffset: 0, 410 fullWidth: "off", 411 spinner: "spinner2", 412 shadow: 1, 413 stopLoop: "off", 414 stopAfterLoops: -1, 415 stopAtSlide: -1, 416 onHoverStop: "off", 417 shuffle: "off", 418 autoHeight: "off", 419 forceFullWidth: "off", 420 hideThumbsOnMobile: "off", 421 hideNavDelayOnMobile: 1500, 422 hideBulletsOnMobile: "off", 423 hideArrowsOnMobile: "off", 424 hideThumbsUnderResolution: 0, 425 hideSliderAtLimit: 0, 426 hideCaptionAtLimit: 0, 427 hideAllCaptionAtLilmit: 0, 428 startWithSlide: 0 429 }); 430 431 $('.banner.dark-bg .slider-banner-container .slider-banner-boxedwidth').show().revolution({ 432 delay: 8000, 433 startwidth: 1140, 434 startheight: 450, 435 navigationArrows: "solo", 436 navigationStyle: "preview2", 437 navigationHAlign: "center", 438 navigationVAlign: "bottom", 439 navigationHOffset: 0, 440 navigationVOffset: 20, 441 soloArrowLeftHalign: "left", 442 soloArrowLeftValign: "center", 443 soloArrowLeftHOffset: 0, 444 soloArrowLeftVOffset: 0, 445 soloArrowRightHalign: "right", 446 soloArrowRightValign: "center", 447 soloArrowRightHOffset: 0, 448 soloArrowRightVOffset: 0, 449 fullWidth: "off", 450 spinner: "spinner2", 451 shadow: 3, 452 stopLoop: "off", 453 stopAfterLoops: -1, 454 stopAtSlide: -1, 455 onHoverStop: "off", 456 shuffle: "off", 457 autoHeight: "off", 458 forceFullWidth: "off", 459 hideThumbsOnMobile: "off", 460 hideNavDelayOnMobile: 1500, 461 hideBulletsOnMobile: "off", 462 hideArrowsOnMobile: "off", 463 hideThumbsUnderResolution: 0, 464 hideSliderAtLimit: 0, 465 hideCaptionAtLimit: 0, 466 hideAllCaptionAtLilmit: 0, 467 startWithSlide: 0 468 }); 469 470 $('.banner:not(.dark-bg) .slider-banner-container .slider-banner-boxedwidth-stopped').show().revolution({ 471 delay: 8000, 472 startwidth: 1140, 473 startheight: 450, 474 navigationArrows: "solo", 475 navigationStyle: "preview2", 476 navigationHAlign: "center", 477 navigationVAlign: "bottom", 478 navigationHOffset: 0, 479 navigationVOffset: 20, 480 soloArrowLeftHalign: "left", 481 soloArrowLeftValign: "center", 482 soloArrowLeftHOffset: 0, 483 soloArrowLeftVOffset: 0, 484 soloArrowRightHalign: "right", 485 soloArrowRightValign: "center", 486 soloArrowRightHOffset: 0, 487 soloArrowRightVOffset: 0, 488 fullWidth: "off", 489 spinner: "spinner2", 490 shadow: 1, 491 stopLoop: "off", 492 stopAfterLoops: 0, 493 stopAtSlide: 1, 494 onHoverStop: "off", 495 shuffle: "off", 496 autoHeight: "off", 497 forceFullWidth: "off", 498 hideThumbsOnMobile: "off", 499 hideNavDelayOnMobile: 1500, 500 hideBulletsOnMobile: "off", 501 hideArrowsOnMobile: "off", 502 hideThumbsUnderResolution: 0, 503 hideSliderAtLimit: 0, 504 hideCaptionAtLimit: 0, 505 hideAllCaptionAtLilmit: 0, 506 startWithSlide: 0 507 }); 508 509 $('.banner.dark-bg .slider-banner-container .slider-banner-boxedwidth-stopped').show().revolution({ 510 delay: 8000, 511 startwidth: 1140, 512 startheight: 450, 513 navigationArrows: "solo", 514 navigationStyle: "preview2", 515 navigationHAlign: "center", 516
516 navigationVAlign: "bottom", 517 navigationHOffset: 0, 518 navigationVOffset: 20, 519 soloArrowLeftHalign: "left", 520 soloArrowLeftValign: "center", 521 soloArrowLeftHOffset: 0, 522 soloArrowLeftVOffset: 0, 523 soloArrowRightHalign: "right", 524 soloArrowRightValign: "center", 525 soloArrowRightHOffset: 0, 526 soloArrowRightVOffset: 0, 527 fullWidth: "off", 528 spinner: "spinner2", 529 shadow: 3, 530 stopLoop: "off", 531 stopAfterLoops: 0, 532 stopAtSlide: 1, 533 onHoverStop: "off", 534 shuffle: "off", 535 autoHeight: "off", 536 forceFullWidth: "off", 537 hideThumbsOnMobile: "off", 538 hideNavDelayOnMobile: 1500, 539 hideBulletsOnMobile: "off", 540 hideArrowsOnMobile: "off", 541 hideThumbsUnderResolution: 0, 542 hideSliderAtLimit: 0, 543 hideCaptionAtLimit: 0, 544 hideAllCaptionAtLilmit: 0, 545 startWithSlide: 0 546 }); 547 548 } 549 ; 550 551 //Owl carousel 552 //----------------------------------------------- 553 if ($('.owl-carousel').length > 0) { 554 555 owlResetSlider(); // does the carousel loading 556 557 $(window).resize(function () { 558 $('.owl-carousel').not("#sync1 ").not("#sync2 ").trigger('destroy.owl.carousel').removeClass('owl-loaded'); 559 $('.owl-carousel').not("#sync1 ").not("#sync2 ").find('.owl-stage-outer').children().unwrap(); 560 561 owlResetSlider(); 562 }); 563 564 function owlResetSlider() { 565 566 $(".owl-carousel.carousel").owlCarousel({ 567 items: 4, 568 pagination: false, 569 navigation: true, 570 navigationText: false 571 }); 572 573 $(".owl-carousel.carousel-modern-autoplay").owlCarousel({ 574 items: 1, 575 thumbs: false, 576 autoplay: true, 577 autoplayTimeout: 4000, 578 autoplayHoverPause: false, 579 pagination: false, 580 margin: 0, 581 center: true, 582 stagePadding: 0, 583 loop: true, 584 nav: true, 585 lazyLoad: false, 586 smartSpeed: 1500, 587 navText: false, 588 video: false, 589 videoWidth: false, // Default false; Type: Boolean/Number 590 videoHeight: false, // Default false; Type: Boolean/Number 591 responsiveClass: true, 592 responsive: { 593 0: { 594 items: 1, 595 slideBy: 1 596 }, 597 480: { 598 items: 1, 599 slideBy: 1 600 }, 601 768: { 602 items: 1, 603 slideBy: 1 604 }, 605 1024: { 606 items: 1, 607 slideBy: 1 608 }, 609 1200: { 610 items: 1, 611 slideBy: 1 612 } 613 } 614 }); 615 616 $(".owl-carousel.carousel-fullscreen").owlCarousel({ 617 items: 1, 618 thumbs: false, 619 autoplay: true, 620 autoplayTimeout: 6000, 621 autoplayHoverPause: false, 622 smartSpeed: 1500, 623 pagination: false, 624 margin: 0, 625 center: true, 626 stagePadding: 0, 627 loop: true, 628 nav: true, 629 lazyLoad: true, 630 navText: false, 631 video: true, 632 videoWidth: false, // Default false; Type: Boolean/Number 633 videoHeight: false, // Default false; Type: Boolean/Number 634 responsiveClass: true, 635 responsive: { 636 0: { 637 items: 1, 638 slideBy: 1 639 }, 640 480: { 641 items: 1, 642 slideBy: 1 643 }, 644 768: { 645 items: 1, 646 slideBy: 1 647 }, 648 1024: { 649 items: 1, 650 slideBy: 1 651 }, 652 1200: { 653 items: 1, 654 slideBy: 1 655 } 656 } 657 }); 658 659 $(".owl-carousel.carousel-autoplay").owlCarousel({ 660 items: 6, 661 thumbs: false, 662 autoplay: true, 663 autoplayTimeout: 4000, 664 smartSpeed: 1000, 665 autoplayHoverPause: false, 666 pagination: true, 667 margin: 30, 668 loop: true, 669 nav: true, 670 navText: false, 671 responsiveClass: true, 672 responsive: { 673 0: { 674 items: 1, 675 slideBy: 1 676 }, 677 480: { 678 items: 1, 679 slideBy: 1 680 }, 681 768: { 682 items: 2, 683 slideBy: 1 684 }, 685 992: { 686 items: 3, 687 slideBy: 1 688 }, 689 1200: { 690 items: 3, 691 slideBy: 1 692 } 693 } 694 }); 695 $(".owl-carousel.clients").owlCarousel({ 696 items: 6, 697 thumbs: false, 698 autoplay: true, 699 autoplayTimeout: 4000, 700 smartSpeed: 1000, 701 autoplayHoverPause: false, 702 pagination: true, 703 margin: 30, 704 loop: true, 705 nav: true, 706 navText: false, 707 responsiveClass: true, 708 responsive: { 709 0: { 710 items: 2, 711 slideBy: 1 712 }, 713 480: { 714 items: 3, 715 slideBy: 1 716 }, 717 768: { 718 items: 4, 719 slideBy: 1 720 }, 721 1024: { 722 items: 6, 723 slideBy: 1 724 }, 725 1200: { 726 items: 6, 727 slideBy: 1 728 } 729 } 730 }); 731 $(".owl-carousel.content-slider").owlCarousel({ 732 singleItem: true, 733 autoPlay: 5000, 734 navigation: false, 735 navigationText: false, 736 pagination: false 737 }); 738 $(".owl-carousel.content-slider-with-controls").owlCarousel({ 739 singleItem: true,
740 autoPlay: false, 741 navigation: true, 742 pagination: true 743 }); 744 $(".owl-carousel.content-slider-with-large-controls").owlCarousel({ 745 singleItem: true, 746 autoPlay: false, 747 navigation: true, 748 pagination: true 749 }); 750 $(".owl-carousel.content-slider-with-controls-autoplay").owlCarousel({ 751 items: 1, 752 thumbs: false, 753 autoplay: 4000, 754 loop: true, 755 nav: false, 756 pagination: true, 757 navText: false, 758 animateOut: 'fadeOut', 759 animateIn: 'fadeIn', 760 }); 761 $(".owl-carousel.content-slider-with-large-controls-autoplay").owlCarousel({ 762 singleItem: true, 763 autoPlay: 5000, 764 navigation: true, 765 pagination: true 766 }); 767 $(".owl-carousel.content-slider-with-controls-autoplay-hover-stop").owlCarousel({ 768 singleItem: true, 769 autoPlay: 5000, 770 navigation: true, 771 pagination: true, 772 stopOnHover: true 773 }); 774 } 775 } 776 ; 777 778 779 $(document).ready(function () { 780 781 var sync1 = $("#sync1"); 782 var sync2 = $("#sync2"); 783 784 var slidesPerPage = 4; //globaly define number of elements per page 785 var syncedSecondary = false; 786 787 sync1.owlCarousel({ 788 animateOut: 'fadeOut', 789 animateIn: 'fadeIn', 790 items: 1, 791 slideSpeed: 2000, 792 nav: true, 793 navText: false, 794 autoplay: 5000, 795 loop: true, 796 responsiveRefreshRate: 200, 797 }).on('changed.owl.carousel', syncPosition); 798 799 sync2 800 .on('initialized.owl.carousel', function () { 801 sync2.find(".owl-item").eq(0).addClass("current"); 802 }) 803 .owlCarousel({ 804 items: slidesPerPage, 805 nav: false, 806 navText: false, 807 smartSpeed: 200, 808 slideSpeed: 500, 809 slideBy: 1, //alternatively you can slide by 1, this way the active slide will stick to the first item in the second carousel 810 responsiveRefreshRate: 100 811 }).on('changed.owl.carousel', syncPosition2); 812 813 function syncPosition(el) { 814 //if you set loop to false, you have to restore this next line 815 //var current = el.item.index; 816 //console.log(el.page.index); 817 // if you disable loop you have to comment this block 818 var count = el.item.count - 1; 819 var current = el.page.index; 820 //console.log("Index glavnog elementa:"+current); 821 if (current < 0) { 822 current = count; 823 } 824 if (current > count) { 825 current = 0; 826 } 827 //end block 828 829 sync2 830 .find(".owl-item") 831 .removeClass("current") 832 .eq(current) 833 .addClass("current"); 834 var onscreen = sync2.find('.owl-item.active').length - 1; 835 var start = sync2.find('.owl-item.active').first().index(); 836 var end = sync2.find('.owl-item.active').last().index(); 837 838 if (current > end) { 839 sync2.data('owlCarousel').to(current, 100, true); 840 } 841 if (current < start) { 842 sync2.data('owlCarousel').to(current - onscreen, 100, true); 843 } 844 } 845 846 function syncPosition2(el) { 847 if (syncedSecondary) { 848 var number = el.item.index; 849 sync1.data('owlCarousel').to(number, 100, true); 850 } 851 } 852 853 sync2.on("click", ".owl-item", function (e) { 854 e.preventDefault(); 855 var number = $(this).index(); 856 sync1.data('owlCarousel').to(number, 300, true); 857 }); 858 }); 859 860 // Fixed header 861 //----------------------------------------------- 862 headerTopHeight = $(".header-top").outerHeight(), 863 headerHeight = $("header.header.fixed").outerHeight(); 864 $(window).resize(function () { 865 if (($(this).scrollTop() < headerTopHeight + headerHeight - 5) && ($(window).width() > 767)) { 866 headerTopHeight = $(".header-top").outerHeight(), 867 headerHeight = $("header.header.fixed").outerHeight(); 868 } 869 }); 870 871 $(window).scroll(function () { 872 if (($(".header.fixed").length > 0) && !($(".transparent-header .slideshow").length > 0)) { 873 if (($(this).scrollTop() > headerTopHeight + headerHeight) && ($(window).width() > 767)) { 874 $("body").addClass("fixed-header-on"); 875 $(".header.fixed").addClass('animated object-visible fadeInDownBig'); 876 $(".header-top.fixed").addClass('animated object-visible fadeInDownBig'); 877 $(".header-container").css("paddingBottom", (headerHeight) + "px"); 878 } else { 879 $("body").removeClass("fixed-header-on"); 880 $(".header-container").css("paddingBottom", (0) + "px"); 881 $(".header.fixed").removeClass('animated object-visible fadeInDownBig'); 882 $(".header-top.fixed").removeClass('animated object-visible fadeInDownBig'); 883 } 884 } else if ($(".header.fixed").length > 0) { 885 if (($(this).scrollTop() > headerTopHeight + headerHeight) && ($(window).width() > 767)) { 886 $("body").addClass("fixed-header-on"); 887 $(".header.fixed").addClass('animated object-visible fadeInDown'); 888 $(".header-top.fixed").addClass('animated object-visible fadeInDown'); 889 } else { 890 $("body").removeClass("fixed-header-on"); 891 $(".header.fixed").removeClass('animated object-visible fadeInDown'); 892 $(".header-top.fixed").removeClass('animated object-visible fadeInDown'); 893 } 894 } 895 ; 896 }); 897 898 // Fixed filter nav 899 //----------------------------------------------- 900 901// filterNavHeight = $(".filter-nav.fixed").outerHeight(); 902// $(window).resize(function () {
903// if (($(this).scrollTop() < filterNavHeight - 5) && ($(window).width() > 767)) { 904// 905// filterNavHeight = $(".filter-nav.fixed").outerHeight(); 906// } 907// }); 908// 909// $(window).scroll(function () { 910// if (($(".filter-nav.fixed").length > 0)) { 911// if (($(this).scrollTop() > filterNavHeight) && ($(window).width() > 767)) { 912// $("body").addClass("fixed-filter-nav-on"); 913// $(".filter-nav.fixed").addClass('animated object-visible fadeInDown'); 914// $(".filter-nav-container").css("paddingBottom", (filterNavHeight) + "px"); 915// } else { 916// $("body").removeClass("fixed-filter-nav-on"); 917// $(".filter-nav-container").css("paddingBottom", (0) + "px"); 918// $(".filter-nav.fixed").removeClass('animated object-visible fadeInDown'); 919// } 920// } else if ($(".filter-nav.fixed").length > 0) { 921// if (($(this).scrollTop() > filterNavHeight) && ($(window).width() > 767)) { 922// $("body").addClass("fixed-filter-nav-on"); 923// $(".filter-nav.fixed").addClass('animated object-visible fadeInDown'); 924// } else { 925// $("body").removeClass("fixed-filter-nav-on"); 926// $(".filter-nav.fixed").removeClass('animated object-visible fadeInDown'); 927// } 928// } 929// ; 930// }); 931 932 933 // Charts 934 //----------------------------------------------- 935 if ($(".graph").length > 0) { 936 // Creates random numbers you don't need this for real graphs 937 var randomScalingFactor = function () { 938 return Math.round(Math.random() * 500) 939 }; 940 941 if ($(".graph.line").length > 0) { 942 // Data for line charts 943 var lineChartData = { 944 labels: ["January", "February", "March", "April", "May", "June", "July"], 945 datasets: [ 946 { 947 label: "First dataset", 948 fillColor: "rgba(188,188,188,0.2)", 949 strokeColor: "rgba(188,188,188,1)", 950 pointColor: "rgba(188,188,188,1)", 951 pointStrokeColor: "#fff", 952 pointHighlightFill: "#fff", 953 pointHighlightStroke: "rgba(188,188,188,1)", 954 data: [250, 300, 250, 200, 250, 300, 250] 955 }, 956 { 957 label: "Second dataset", 958 fillColor: "rgba(126,187,205,0.2)", 959 strokeColor: "rgba(126,187,205,1)", 960 pointColor: "rgba(126,187,205,1)", 961 pointStrokeColor: "#fff", 962 pointHighlightFill: "#fff", 963 pointHighlightStroke: "rgba(126,187,205,1)", 964 data: [300, 250, 200, 250, 300, 250, 200] 965 }, 966 { 967 label: "Third dataset", 968 fillColor: "rgba(98,187,205,0.2)", 969 strokeColor: "rgba(98,187,205,1)", 970 pointColor: "rgba(98,187,205,1)", 971 pointStrokeColor: "#fff", 972 pointHighlightFill: "#fff", 973 pointHighlightStroke: "rgba(98,187,205,1)", 974 data: [0, 100, 200, 300, 400, 500, 400] 975 } 976 ] 977 } 978 979 // Line Charts Initialization 980 $(window).load(function () { 981 var ctx = document.getElementById("lines-graph").getContext("2d"); 982 window.newLine = new Chart(ctx).Line(lineChartData, { 983 responsive: true, 984 bezierCurve: false 985 }); 986 }); 987 } 988 if ($(".graph.bar").length > 0) { 989 // Data for bar charts 990 var barChartData = { 991 labels: ["January", "February", "March", "April", "May", "June", "July"], 992 datasets: [ 993 { 994 fillColor: "rgba(188,188,188,0.5)", 995 strokeColor: "rgba(188,188,188,0.8)", 996 highlightFill: "rgba(188,188,188,0.75)", 997 highlightStroke: "rgba(188,188,188,1)", 998 data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()] 999 }, 1000 { 1001 fillColor: "rgba(168,187,205,0.5)", 1002 strokeColor: "rgba(168,187,205,0.8)", 1003 highlightFill: "rgba(168,187,205,0.75)", 1004 highlightStroke: "rgba(168,187,205,1)", 1005 data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()] 1006 } 1007 ] 1008 } 1009 1010 // Bar Charts Initialization 1011 $(window).load(function () { 1012 var ctx = document.getElementById("bars-graph").getContext("2d"); 1013 window.myBar = new Chart(ctx).Bar(barChartData, { 1014 responsive: true 1015 }); 1016 }); 1017 } 1018 if ($(".graph.pie").length > 0) { 1019 // Data for pie chart 1020 var pieData = [ 1021 { 1022 value: 120, 1023 color: "#09afdf", 1024 highlight: "#6BD5F4", 1025 label: "Blue" 1026 }, 1027 { 1028 value: 120, 1029 color: "#FDB45C", 1030 highlight: "#FFC870", 1031 label: "Yellow" 1032 }, 1033 { 1034 value: 120, 1035 color: "#4D5360", 1036 highlight: "#616774", 1037 label: "Dark Grey" 1038 } 1039 ]; 1040 1041 // Pie Chart Initialization 1042 $(window).load(function () { 1043 var ctx = document.getElementById("pie-graph").getContext("2d"); 1044 window.myPie = new Chart(ctx).Pie(pieData); 1045 }); 1046 } 1047 if ($(".graph.doughnut").length > 0) { 1048 // Data for doughnut chart 1049 var doughnutData = [ 1050 { 1051 value: 120, 1052 color: "#09afdf", 1053 highlight: "#6BD5F4", 1054 label: "Blue" 1055 }, 1056 { 1057 value: 120, 1058 color: "#FDB45C", 1059 highlight: "#FFC870", 1060 label: "Yellow" 1061 }, 1062 { 1063 value: 120, 1064 color: "#4D5360", 1065 highlight: "#616774", 1066 label: "Dark Grey" 1067 } 1068 ]; 1069 1070 // Doughnut Chart Initialization 1071 $(window).load(function () { 1072 var ctx = document.getElementById("doughnut-graph").getContext("2d"); 1073 window.myDoughnut = new Chart(ctx).Doughnut(d
1073oughnutData, {responsive: true}); 1074 }); 1075 } 1076 } 1077 ; 1078 1079 // Magnific popup 1080 //----------------------------------------------- 1081 if (($(".popup-img").length > 0) || ($(".popup-iframe").length > 0) || ($(".popup-img-single").length > 0)) { 1082 $(".popup-img").magnificPopup({ 1083 type: "image", 1084 gallery: { 1085 enabled: true, 1086 } 1087 }); 1088 $(".popup-img-single").magnificPopup({ 1089 type: "image", 1090 gallery: { 1091 enabled: false, 1092 } 1093 }); 1094 $('.popup-iframe').magnificPopup({ 1095 disableOn: 700, 1096 type: 'iframe', 1097 preloader: false, 1098 fixedContentPos: false 1099 }); 1100 } 1101 ; 1102 1103 // Animations 1104 //----------------------------------------------- 1105 if (($("[data-animation-effect]").length > 0) && !Modernizr.touch) { 1106 $("[data-animation-effect]").each(function () { 1107 if (Modernizr.mq('only all and (min-width: 768px)') && Modernizr.csstransitions) { 1108 var waypoints = $(this).waypoint(function (direction) { 1109 var appearDelay = $(this.element).attr("data-effect-delay"), 1110 animatedObject = $(this.element); 1111 setTimeout(function () { 1112 animatedObject.addClass('animated object-visible ' + animatedObject.attr("data-animation-effect")); 1113 }, appearDelay); 1114 this.destroy(); 1115 }, { 1116 offset: '90%' 1117 }); 1118 } else { 1119 $(this).addClass('object-visible'); 1120 } 1121 }); 1122 } 1123 ; 1124 1125 // Text Rotators 1126 //----------------------------------------------- 1127 if ($(".text-rotator").length > 0) { 1128 $(".text-rotator").each(function () { 1129 var tr_animationEffect = $(this).attr("data-rotator-animation-effect"); 1130 $(this).Morphext({ 1131 animation: "" + tr_animationEffect + "", // Overrides default "bounceIn" 1132 separator: ",", // Overrides default "," 1133 speed: 3000 // Overrides default 2000 1134 }); 1135 }); 1136 } 1137 ; 1138 1139 // Stats Count To 1140 //----------------------------------------------- 1141 if ($(".stats [data-to]").length > 0) { 1142 $(".stats [data-to]").each(function () { 1143 var stat_item = $(this), 1144 offset = stat_item.offset().top; 1145 if ($(window).scrollTop() > (offset - 800) && !(stat_item.hasClass('counting'))) { 1146 stat_item.addClass('counting'); 1147 stat_item.countTo(); 1148 } 1149 ; 1150 $(window).scroll(function () { 1151 if ($(window).scrollTop() > (offset - 800) && !(stat_item.hasClass('counting'))) { 1152 stat_item.addClass('counting'); 1153 stat_item.countTo(); 1154 } 1155 }); 1156 }); 1157 } 1158 ; 1159 1160 // Isotope filters 1161 //----------------------------------------------- 1162 if ($('.isotope-container').length > 0 || $('.masonry-grid').length > 0 || $('.masonry-grid-fitrows').length > 0 || $('.isotope-container-fitrows').length > 0) { 1163 $(window).load(function () { 1164 $('.masonry-grid').isotope({ 1165 itemSelector: '.masonry-grid-item', 1166 layoutMode: 'masonry' 1167 }); 1168 $('.masonry-grid-fitrows').isotope({ 1169 itemSelector: '.masonry-grid-item', 1170 layoutMode: 'fitRows', 1171 transitionDuration: '0.6s' 1172 }); 1173 $('.isotope-container').fadeIn(); 1174 var $container = $('.isotope-container').isotope({ 1175 itemSelector: '.isotope-item', 1176 layoutMode: 'masonry', 1177 transitionDuration: '0.6s', 1178 filter: "*" 1179 }); 1180 $('.isotope-container-fitrows').fadeIn(); 1181 var $container_fitrows = $('.isotope-container-fitrows').isotope({ 1182 itemSelector: '.isotope-item', 1183 layoutMode: 'fitRows', 1184 transitionDuration: '0.6s', 1185 filter: "*" 1186 }); 1187 // filter items on button click 1188 $('.filters').on('click', 'ul.nav li a', function () { 1189 var filterValue = $(this).attr('data-filter'); 1190 $(".filters").find("li.active").removeClass("active"); 1191 $(this).parent().addClass("active"); 1192 $container.isotope({filter: filterValue}); 1193 $container_fitrows.isotope({filter: filterValue}); 1194 return false;
1195 }); 1196 }); 1197 $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { 1198 $('.tab-pane .masonry-grid-fitrows').isotope({ 1199 itemSelector: '.masonry-grid-item', 1200 layoutMode: 'fitRows' 1201 }); 1202 }); 1203 } 1204 ; 1205 1206 // Animated Progress Bars 1207 //----------------------------------------------- 1208 if ($("[data-animate-width]").length > 0) { 1209 $("[data-animate-width]").each(function () { 1210 if (Modernizr.touch || !Modernizr.csstransitions) { 1211 $(this).find("span").hide(); 1212 } 1213 ; 1214 var waypoints = $(this).waypoint(function (direction) { 1215 $(this.element).animate({width: $(this.element).attr("data-animate-width")}, 800); 1216 this.destroy(); 1217 if (Modernizr.touch || !Modernizr.csstransitions) { 1218 $(this.element).find("span").show('slow'); 1219 } 1220 ; 1221 }, { 1222 offset: '90%' 1223 }); 1224 }); 1225 } 1226 ; 1227 1228 // Animated Circular Progress Bars 1229 //----------------------------------------------- 1230 if ($(".knob").length > 0) { 1231 1232 $(".knob").knob(); 1233 $(".knob").each(function () { 1234 var animateVal = $(this).attr("data-animate-value"); 1235 $(this).animate({animatedVal: animateVal}, { 1236 duration: 2000, 1237 step: function () { 1238 $(this).val(Math.ceil(this.animatedVal)).trigger("change"); 1239 } 1240 }); 1241 }); 1242 } 1243 1244 //Video Background 1245 //----------------------------------------------- 1246 if ($(".video-background").length > 0) { 1247 if (Modernizr.touch) { 1248 $(".video-background").vide({ 1249 mp4: "videos/background-video.mp4", 1250 webm: "videos/background-video.webm", 1251 poster: "videos/video-fallback.jpg" 1252 }, { 1253 volume: 1, 1254 playbackRate: 1, 1255 muted: true, 1256 loop: true, 1257 autoplay: true, 1258 position: "50% 100%", // Similar to the CSS `background-position` property. 1259 posterType: "jpg", // Poster image type. "detect" ââ¬â auto-detection; "none" ââ¬â no poster; "jpg", "png", "gif",... - extensions. 1260 resizing: true 1261 }); 1262 } else { 1263 $(".video-background").vide({ 1264 mp4: "videos/background-video.mp4", 1265 webm: "videos/background-video.webm", 1266 poster: "videos/video-poster.jpg" 1267 }, { 1268 volume: 1, 1269 playbackRate: 1, 1270 muted: true, 1271 loop: true, 1272 autoplay: true, 1273 position: "50% 100%", // Similar to the CSS `background-position` property. 1274 posterType: "jpg", // Poster image type. "detect" ââ¬â auto-detection; "none" ââ¬â no poster; "jpg", "png", "gif",... - extensions. 1275 resizing: true 1276 }); 1277 } 1278 ; 1279 1280 } 1281 ; 1282 if ($(".video-background-banner").length > 0) { 1283 if (Modernizr.touch) { 1284 $(".video-background-banner").vide({ 1285 mp4: "videos/background-video-banner.mp4", 1286 webm: "videos/background-video-banner.webm", 1287 poster: "videos/video-fallback.jpg" 1288 }, { 1289 volume: 1, 1290 playbackRate: 1, 1291 muted: true, 1292 loop: true, 1293 autoplay: true, 1294 position: "50% 50%", // Similar to the CSS `background-position` property. 1295 posterType: "jpg", // Poster image type. "detect" ââ¬â auto-detection; "none" ââ¬â no poster; "jpg", "png", "gif",... - extensions. 1296 resizing: true 1297 }); 1298 } else { 1299 $(".video-background-banner").vide({ 1300 mp4: "videos/background-video-banner.mp4", 1301 webm: "videos/background-video-banner.webm", 1302 poster: "videos/video-banner-poster.jpg" 1303 }, { 1304 volume: 1, 1305 playbackRate: 1, 1306 muted: true, 1307 loop: true, 1308 autoplay: true, 1309 position: "50% 50%", // Similar to the CSS `background-position` property. 1310 posterType: "jpg", // Poster image type. "detect" ââ¬â auto-detection; "none" ââ¬â no poster; "jpg", "png", "gif",... - extensions. 1311 resizing: true 1312 }); 1313 } 1314 ; 1315 } 1316 ; 1317 //Scroll totop 1318 //----------------------------------------------- 1319 $(window).scroll(function () { 1320 if ($(this).scrollTop() != 0) { 1321 $(".scrollToTop").fadeIn(); 1322 } else { 1323 $(".scrollToTop").fadeOut(); 1324 } 1325 }); 1326 1327 $(".scrollToTop").click(function () { 1328 $("body,html").animate({scrollTop: 0}, 800); 1329 }); 1330 1331 //Modal 1332 //----------------------------------------------- 1333 if ($(".modal").length > 0) { 1334 $(".modal").each(function () { 1335 $(".modal").prependTo("body"); 1336 }); 1337 } 1338 1339 // Pricing tables popovers 1340 //----------------------------------------------- 1341 if ($(".pricing-tables").length > 0) { 1342 $(".plan .pt-popover").popover({ 1343 trigger: 'hover', 1344 container: 'body' 1345 }); 1346 } 1347 ; 1348 1349 // Contact forms validation 1350 //----------------------------------------------- 1351 if ($("#contact-form").length > 0) { 1352 $("#contact-form").validate({ 1353 submitHandler: function (form) { 1354 $('.submit-button').button("loading"); 1355 $.ajax({ 1356 type: "POST", 1357 url: "contact-send-email.php", 1358 data: { 1359 "name": $("#contact-form #name").val(), 1360 "email": $("#contact-form #email").val(), 1361 "subject": $("#contact-form #subject").val(), 1362 "message": $("#contact-form #message").val(), 1363 "sendEmail": 1 1364 }, 1365 dataType: "json", 1366 success: function (data) { 1367 if (data.sent == "yes") { 1368 $("#MessageSent").removeClass("hidden"); 1369 $("#MessageNotSent").addClass("hidden"); 1370 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1371 $("#contact-form .form-control").each(function () { 1372 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1373 }); 1374 } else { 1375 $("#MessageNotSent").removeClass("hidden"); 1376 $("#MessageSent").addClass("hidden"); 1377 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1378 $("#contact-form .form-control").each(function () { 1379 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1380 }); 1381 } 1382 } 1383 }); 1384 }, 1385 // debug: true, 1386 errorPlacement: function (error, element) { 1387 error.insertBefore(element); 1388 }, 1389 onkeyup: false, 1390 onclick: false, 1391 rules: { 1392 name: { 1393 required: true, 1394 minlength: 3 1395 }, 1396 email: { 1397 required: true, 1398 email: true 1399 }, 1400 subject: { 1401 required: true, 1402 minlength: 3 1403 }, 1404 message: { 1405 required: true, 1406 minlength: 10 1407 } 1408 }, 1409 messages: { 1410 name: { 1411 required: "Unesite vaÅ¡e ime i prezime", 1412 minlength: "Morate uneti minimum 3 karaktera" 1413 }, 1414 email: { 1415 required: "Unesite vaÅ¡u e-mail adresu", 1416 email: "Unesite e-mail adresu u ispravnom formatu" 1417 }, 1418 subject: { 1419 required: "Unesite ime pojma", 1420 minlength: "Morate uneti minimum 3 karaktera" 1421 }, 1422 message: { 1423 required: "Unesite opis procedure", 1424 minlength: "Morate uneti minimum 10 karaktera" 1425 } 1426 }, 1427 errorElement: "span", 1428 highlight: function (element) { 1429 $(element).parent().removeClass("has-success").addClass("has-error"); 1430 $(element).siblings("label").addClass("hide"); 1431 }, 1432 success: function (element) { 1433 $(element).parent().removeClass("has-error").addClass("has-success"); 1434 $(element).siblings("label").removeClass("hide"); 1435 } 1436 }); 1437 } 1438 ; 1439 1440 if ($("#contact-form-definisi-pojam").length > 0) { 1441 $("#contact-form-definisi-pojam").validate({ 1442 submitHandler: function (form) { 1443 $('.submit-button').button("loading"); 1444 $.ajax({ 1445 type: "POST", 1446 url: "contact-form-definisi-pojam-send-email.php", 1447 data: { 1448 "name": $("#contact-form-definisi-pojam #name").val(), 1449 "email": $("#contact-form-definisi-pojam #email").val(), 1450 "subject": $("#contact-form-definisi-pojam #subject").val(), 1451 "sendEmail": 1 1452 }, 1453 dataType: "json", 1454 success: function (data) { 1455 if (data.sent == "yes") { 1456 $("#MessageSent").removeClass("hidden"); 1457 $("#MessageNotSent").addClass("hidden"); 1458 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1459 $("#contact-form-definisi-pojam .form-control").each(function () { 1460 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1461 }); 1462 } else { 1463 $("#MessageNotSent").removeClass("hidden"); 1464 $("#MessageSent").addClass("hidden"); 1465 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1466 $("#contact-form-definisi-pojam .form-control").each(function () { 1467 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1468 }); 1469 } 1470 } 1471 }); 1472 }, 1473 // debug: true, 1474 errorPlacement: function (error, element) { 1475 error.insertBefore(element); 1476 }, 1477 onkeyup: false, 1478 onclick: false, 1479 rules: { 1480 name: { 1481 required: true, 1482 minlength: 3 1483 }, 1484 email: { 1485 required: true, 1486 email: true 1487 }, 1488 subject: { 1489 required: true, 1490 minlength: 3 1491 } 1492 }, 1493 messages: { 1494 name: { 1495 required: "Unesite vaÅ¡e ime i prezime", 1496 minlength: "Morate uneti minimum 3 karaktera" 1497 }, 1498 email: { 1499 required: "Unesite vaÅ¡u e-mail adresu", 1500 email: "Unesite e-mail adresu u ispravnom formatu" 1501 }, 1502 subject: { 1503 required: "Unesite ime pojma", 1504 minlength: "Morate uneti minimum 3 karaktera" 1505 } 1506 }, 1507 errorElement: "span", 1508 highlight: function (element) { 1509 $(element).parent().removeClass("has-success").addClass("has-error"); 1510 $(element).siblings("label").addClass("hide"); 1511 }, 1512 success: function (element) { 1513 $(element).parent().removeClass("has-error").addClass("has-success"); 1514 $(element).siblings("label").removeClass("hide"); 1515 } 1516 }); 1517 } 1518 ; 1519 1520 if ($("#contact-form-contact").length > 0) { 1521 $("#contact-form-contact").validate({ 1522 submitHandler: function (form) { 1523 $('.submit-button').button("loading"); 1524 $.ajax({ 1525 type: "POST", 1526 url: "contact-send-email.php", 1527 data: { 1528 "name": $("#contact-form-contact #name").val(), 1529 "email": $("#contact-form-contact #email").val(), 1530 "subject": $("#contact-form-contact #subject").val(), 1531 "message": $("#contact-form-contact #message").val(), 1532 "sendEmail": 1 1533 }, 1534 dataType: "json", 1535 success: function (data) { 1536 if (data.sent == "yes") { 1537 $("#MessageSent").removeClass("hidden"); 1538 $("#MessageNotSent").addClass("hidden"); 1539 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1540 $("#contact-form .form-control").each(function () { 1541 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1542 }); 1543 } else { 1544 $("#MessageNotSent").removeClass("hidden"); 1545 $("#MessageSent").addClass("hidden"); 1546 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1547 $("#contact-form .form-control").each(function () { 1548 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1549 }); 1550 } 1551 } 1552 }); 1553 }, 1554 // debug: true, 1555 errorPlacement: function (error, element) { 1556 error.insertBefore(element); 1557 }, 1558 onkeyup: false, 1559
1559 onclick: false, 1560 rules: { 1561 name: { 1562 required: true, 1563 minlength: 3 1564 }, 1565 email: { 1566 required: true, 1567 email: true 1568 }, 1569 subject: { 1570 required: true, 1571 minlength: 3 1572 }, 1573 message: { 1574 required: true, 1575 minlength: 10 1576 } 1577 }, 1578 messages: { 1579 name: { 1580 required: "Unesite vaše ime i prezime", 1581 minlength: "Unesite minimum 3 karaktera" 1582 }, 1583 email: { 1584 required: "Unesite vašu email adresu", 1585 email: "Unesite vašu email adresu u ispravnom formatu" 1586 }, 1587 subject: { 1588 required: "Unesite naslov", 1589 minlength: "Unesite minimum 3 karaktera" 1590 }, 1591 message: { 1592 required: "Unesite poruku", 1593 minlength: "Unesite minimum 10 karaktera" 1594 } 1595 }, 1596 errorElement: "span", 1597 highlight: function (element) { 1598 $(element).parent().removeClass("has-success").addClass("has-error"); 1599 $(element).siblings("label").addClass("hide"); 1600 }, 1601 success: function (element) { 1602 $(element).parent().removeClass("has-error").addClass("has-success"); 1603 $(element).siblings("label").removeClass("hide"); 1604 } 1605 }); 1606 } 1607 ; 1608 1609 1610 // Contact forms predlozi 1611 //----------------------------------------------- 1612 if ($("#contact-form-predlozi").length > 0) { 1613 $("#contact-form-predlozi").validate({ 1614 submitHandler: function (form) { 1615 $('.submit-button').button("loading"); 1616 $.ajax({ 1617 type: "POST", 1618 url: "PredloziEmail.php", 1619 data: { 1620 "sektor": $("#contact-form-predlozi #sektor").val(), 1621 "email": $("#contact-form-predlozi #email").val(), 1622 "subject": $("#contact-form-predlozi #subject").val(), 1623 "message_problem": $("#contact-form-predlozi #message_problem").val(), 1624 "message_solution": $("#contact-form-predlozi #message_solution").val(), 1625 "sendEmail": 1 1626 }, 1627 dataType: "json", 1628 success: function (data) { 1629 if (data.sent == "yes") { 1630 $("#MessageSent").removeClass("hidden"); 1631 $("#MessageNotSent").addClass("hidden"); 1632 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1633 $("#contact-form .form-control").each(function () { 1634 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1635 }); 1636 } else { 1637 $("#MessageNotSent").removeClass("hidden"); 1638 $("#MessageSent").addClass("hidden"); 1639 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1640 $("#contact-form .form-control").each(function () { 1641 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1642 }); 1643 } 1644 } 1645 }); 1646 }, 1647 // debug: true, 1648 errorPlacement: function (error, element) { 1649 error.insertBefore(element); 1650 }, 1651 onkeyup: false, 1652 onclick: false, 1653 rules: { 1654 sektor: { 1655 required: true 1656 }, 1657 email: { 1658 required: true, 1659 email: true 1660 }, 1661 subject: { 1662 required: true, 1663 minlength: 3 1664 }, 1665 message_problem: { 1666 required: true, 1667 minlength: 10 1668 }, 1669 message_solution: { 1670 required: false 1671 } 1672 }, 1673 messages: { 1674 sektor: { 1675 required: "Unesite sektor", 1676 }, 1677 email: { 1678 required: "Unesite vašu e-mail adresu", 1679 email: "Unesite e-mail adresu u ispravnom formatu" 1680 }, 1681 subject: { 1682 required: "Unesite naslov problema", 1683 minlength: "Morate uneti minimum 3 karaktera" 1684 }, 1685 message_problem: { 1686 required: "Unesite problem", 1687 minlength: "Morate uneti minimum 10 karaktera" 1688 }, 1689 message_solution: { 1690 required: "Unesite predlog rešenja", 1691 minlength: "Morate uneti minimum 10 karaktera" 1692 } 1693 }, 1694 errorElement: "span", 1695 highlight: function (element) { 1696 $(element).parent().removeClass("has-success").addClass("has-error"); 1697 $(element).siblings("label").addClass("hide"); 1698 }, 1699 success: function (element) { 1700 $(element).parent().removeClass("has-error").addClass("has-success"); 1701 $(element).siblings("label").removeClass("hide"); 1702 } 1703 }); 1704 } 1705 ; 1706 1707 1708 if ($("#contact-dealer").length > 0) { 1709 $("#contact-dealer").validate({ 1710// submitHandler: function (form) { 1711// $('.submit-button').button("Sending message..."); 1712// $.ajax({ 1713// type: "POST", 1714// url: "php/dealer-email-sender.php", 1715// data: { 1716// "name": $("#contact-dealer #name").val(), 1717// "email": $("#contact-dealer #email").val(), 1718// "subject": "Message from contact form", 1719// "message": $("#contact-dealer #message").val() 1720// }, 1721// dataType: "json", 1722// success: function (data) { 1723// if (data.sent == "yes") { 1724// $("#MessageSent").removeClass("hidden"); 1725// $("#MessageNotSent").addClass("hidden"); 1726// $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1727// $("#contact-dealer .form-control").each(function () { 1728// $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1729// }); 1730// } else { 1731// $("#MessageNotSent").removeClass("hidden"); 1732// $("#MessageSent").addClass("hidden"); 1733// } 1734// } 1735// }); 1736// }, 1737 // debug: true, 1738 errorPlacement: function (error, element) { 1739 error.insertBefore(element); 1740 }, 1741 onkeyup: false, 1742 onclick: false, 1743 rules: { 1744 name: { 1745 required: true, 1746 minlength: 2 1747 }, 1748 email: { 1749 required: true, 1750 email: true 1751 }, 1752 subject: { 1753 required: true, 1754 minlength: 2 1755 }, 1756 message: { 1757 required: true, 1758 minlength: 10 1759 } 1760 }, 1761 messages: { 1762 name: { 1763 required: "Please specify your name", 1764 minlength: "Your name must be longer than 2 characters" 1765 }, 1766 email: { 1767 required: "We need your email address to contact you", 1768 email: "Please enter a valid email address e.g. [email protected]" 1769 }, 1770 subject: { 1771 required: "Please specify subject", 1772 minlength: "Your subject must be longer than 2 characters" 1773 }, 1774 message: { 1775 required: "Please enter a message", 1776 minlength: "Your message must be longer than 10 characters" 1777 } 1778 }, 1779 errorElement: "span", 1780 highlight: function (element) { 1781 $(element).parent().removeClass("has-success").addClass("has-error"); 1782 $(element).siblings("label").addClass("hide"); 1783 }, 1784 success: function (element) { 1785 $(element).parent().removeClass("has-error").addClass("has-success"); 1786 $(element).siblings("label").removeClass("hide"); 1787 } 1788 }); 1789 } 1790 ; 1791 1792 // Register tab form 1793 if ($("#tab-form").length > 0) { 1794 $("#tab-form").validate({ 1795 1796 errorPlacement: function (error, element) { 1797 error.insertAfter(element); 1798 }, 1799 onkeyup: false, 1800 onclick: false, 1801 rules: { 1802 inputName: { 1803 required: true, 1804 minlength: 2 1805 }, 1806 inputLastName: { 1807 required: true, 1808 minlength: 2 1809 }, 1810 inputCompanyName: { 1811 required: true, 1812 minlength: 2 1813 }, 1814 inputPIB: { 1815 required: true 1816 }, 1817 inputAddress: { 1818 required: true 1819 }, 1820 inputTelephone: { 1821 required: true 1822 }, 1823 inputEmail: { 1824 required: true, 1825 email: true 1826 }, 1827 inputUserName: { 1828 required: true, 1829 minlength: 2 1830 }, 1831 inputPasswordLogin: { 1832 required: true, 1833 minlength: 5, 1834 maxlength: 10 1835 }, 1836 inputRegisterPassword: { 1837 required: true, 1838 minlength: 5, 1839 maxlength: 10 1840 }, 1841 inputConfirmRegisterPassword: { 1842 required: true, 1843 equalTo: "#inputRegisterPassword" 1844 } 1845 }, 1846 messages: { 1847 inputName: { 1848 required: "Please specify your name", 1849 minlength: "Your name must be longer than 2 characters" 1850 }, 1851 inputLastName: { 1852 required: "Please specify your last name", 1853 minlength: "Your last name must be longer than 2 characters" 1854 }, 1855 inputCompanyName: { 1856 required: "Please specify your company name", 1857 minlength: "Your company name must be longer than 2 characters" 1858 }, 1859 inputPIB: { 1860 required: "Please specify your company PIB" 1861 }, 1862 inputAddress: { 1863 required: "Please specify your address" 1864 }, 1865 inputTelephone: { 1866 required: "Please specify your telephone" 1867 }, 1868 inputEmail: { 1869 required: "We need your email address to contact you", 1870 email: "Please enter a valid email address e.g. [email protected]" 1871 }, 1872 inputUserName: { 1873 required: "Please specify your user name", 1874 minlength: "Your user name must be longer than 2 characters" 1875 }, 1876 1877 inputPasswordLogin: { 1878 required: "Please specify your password", 1879 minlength: "Your password must be longer than 5 characters", 1880 maxlength: "Password can have up to 10 characters" 1881 }, 1882 inputRegisterPassword: { 1883 required: "Please specify your password", 1884 minlength: "Your password must be longer than 5 characters", 1885 maxlength: "Password can have up to 10 characters" 1886 }, 1887 inputConfirmRegisterPassword: { 1888 required: "Repeat your password", 1889 equalTo: "Password does not match. Try again." 1890 } 1891 }, 1892 errorElement: "span", 1893 highlight: function (element) { 1894 $(element).parent().removeClass("has-success").addClass("has-error"); 1895 $(element).siblings("label").addClass("hide"); 1896 }, 1897 success: function (element) { 1898 $(element).parent().removeClass("has-error").addClass("has-success"); 1899 $(element).siblings("label").removeClass("hide"); 1900 } 1901 }); 1902 } 1903 ; 1904 1905 if ($("#sidebar-form").length > 0) { 1906 1907 $("#sidebar-form").validate({ 1908 submitHandler: function (form) { 1909 $('.submit-button').button("loading"); 1910 $.ajax({ 1911 type: "POST", 1912 url: "php/email-sender.php", 1913 data: { 1914 "name": $("#sidebar-form #name3").val(), 1915 "email": $("#sidebar-form #email3").val(), 1916 "subject": "Message from FAQ page", 1917 "category": $("#sidebar-form #category").val(), 1918 "message": $("#sidebar-form #message3").val() 1919 }, 1920 dataType: "json", 1921 success: function (data) { 1922 if (data.sent == "yes") { 1923 $("#MessageSent3").removeClass("hidden"); 1924 $("#MessageNotSent3").addClass("hidden"); 1925 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 1926 $("#sidebar-form .form-control").each(function () { 1927 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 1928 }); 1929
1929 } else { 1930 $("#MessageNotSent3").removeClass("hidden"); 1931 $("#MessageSent3").addClass("hidden"); 1932 } 1933 } 1934 }); 1935 }, 1936 // debug: true, 1937 errorPlacement: function (error, element) { 1938 error.insertAfter(element); 1939 }, 1940 onkeyup: false, 1941 onclick: false, 1942 rules: { 1943 name3: { 1944 required: true, 1945 minlength: 2 1946 }, 1947 email3: { 1948 required: true, 1949 email: true 1950 }, 1951 message3: { 1952 required: true, 1953 minlength: 10 1954 } 1955 }, 1956 messages: { 1957 name3: { 1958 required: "Please specify your name", 1959 minlength: "Your name must be longer than 2 characters" 1960 }, 1961 email3: { 1962 required: "We need your email address to contact you", 1963 email: "Please enter a valid email address e.g. [email protected]" 1964 }, 1965 message3: { 1966 required: "Please enter a message", 1967 minlength: "Your message must be longer than 10 characters" 1968 } 1969 }, 1970 errorElement: "span", 1971 highlight: function (element) { 1972 $(element).parent().removeClass("has-success").addClass("has-error"); 1973 }, 1974 success: function (element) { 1975 $(element).parent().removeClass("has-error").addClass("has-success"); 1976 } 1977 }); 1978 1979 } 1980 ; 1981 1982 if ($("#rsvp").length > 0) { 1983 $("#rsvp").validate({ 1984 submitHandler: function (form) { 1985 $('.submit-button').button("loading"); 1986 $.ajax({ 1987 type: "POST", 1988 url: "php/email-sender.php", 1989 data: { 1990 "name": $("#rsvp #name").val(), 1991 "email": $("#rsvp #email").val(), 1992 "guests": $("#rsvp #guests").val(), 1993 "subject": "RSVP", 1994 "events": $("#rsvp #events").val() 1995 }, 1996 dataType: "json", 1997 success: function (data) { 1998 if (data.sent == "yes") { 1999 $("#MessageSent").removeClass("hidden"); 2000 $("#MessageNotSent").addClass("hidden"); 2001 $(".submit-button").removeClass("btn-default").addClass("btn-success").prop('value', 'Message Sent'); 2002 $("#rsvp .form-control").each(function () { 2003 $(this).prop('value', '').parent().removeClass("has-success").removeClass("has-error"); 2004 }); 2005 } else { 2006 $("#MessageNotSent").removeClass("hidden"); 2007 $("#MessageSent").addClass("hidden"); 2008 } 2009 } 2010 }); 2011 }, 2012 // debug: true, 2013 errorPlacement: function (error, element) { 2014 error.insertAfter(element); 2015 }, 2016 onkeyup: false, 2017 onclick: false, 2018 rules: { 2019 name: { 2020 required: true, 2021 minlength: 2 2022 }, 2023 email: { 2024 required: true, 2025 email: true 2026 }, 2027 guests: { 2028 required: true 2029 }, 2030 events: { 2031 required: true 2032 } 2033 }, 2034 messages: { 2035 name: { 2036 required: "Please specify your name", 2037 minlength: "Your name must be longer than 2 characters" 2038 }, 2039 email: { 2040 required: "We need your email address to contact you", 2041 email: "Please enter a valid email address e.g. [email protected]" 2042 } 2043 }, 2044 errorElement: "span", 2045 highlight: function (element) { 2046 $(element).parent().removeClass("has-success").addClass("has-error"); 2047 $(element).siblings("label").addClass("hide"); 2048 }, 2049 success: function (element) { 2050 $(element).parent().removeClass("has-error").addClass("has-success"); 2051 $(element).siblings("label").removeClass("hide"); 2052 } 2053 }); 2054 } 2055 ; 2056 2057 2058 // Affix Menu 2059 //----------------------------------------------- 2060 setTimeout(function () { 2061 var $sideBar = $('.sidebar') 2062 2063 $sideBar.affix({ 2064 offset: { 2065 top: function () { 2066 var height = $sideBar.height(); 2067 return (this.top = height + $(".affix-sidebar-turned-on").offset().top) 2068 2069 }, 2070 2071 } 2072 }) 2073 }, 100) 2074 2075 2076 2077 setTimeout(function () {
2078 var $navBar = $('.filter-nav') 2079 2080 $navBar.affix({ 2081 offset: { 2082 top: function () { 2083 var offsetTop = $navBar.offset().top 2084 return (this.top = offsetTop - 0) 2085 }, 2086 2087 } 2088 }) 2089 }, 100) 2090 2091 if ($(".affix-menu").length > 0) { 2092 setTimeout(function () { 2093 var $navBar = $('.vehicle-price') 2094 2095 $navBar.affix({ 2096 offset: { 2097 top: function () { 2098 var offsetTop = $navBar.offset().top 2099 return (this.top = offsetTop - 0) 2100 }, 2101 bottom: function () { 2102 var affixBottom = $(".footer").outerHeight(true) + $(".subfooter").outerHeight(true) 2103 if ($(".footer-top").length > 0) { 2104 affixBottom = affixBottom + $(".footer-top").outerHeight(true) 2105 } 2106 return (this.bottom = affixBottom + 50) 2107 } 2108 } 2109 }) 2110 }, 100) 2111 } 2112 2113 //Scroll Spy 2114 //----------------------------------------------- 2115 if ($(".scrollspy").length > 0) { 2116 $("body").addClass("scroll-spy"); 2117 if ($(".fixed.header").length > 0) { 2118 $('body').scrollspy({ 2119 target: '.scrollspy', 2120 offset: 85 2121 }); 2122 } else { 2123 $('body').scrollspy({ 2124 target: '.scrollspy', 2125 offset: 45 2126 }); 2127 } 2128 } 2129 2130 2131 //Smooth Scroll 2132 //----------------------------------------------- 2133 if ($(".smooth-scroll").length > 0) { 2134 headerHeight = $("header.header.fixed").outerHeight(); 2135 if (($(".header.fixed").length > 0) && (Modernizr.mq('only all and (min-width: 768px)'))) { 2136 $('.smooth-scroll a[href*=#]:not([href=#]), a[href*=#]:not([href=#]).smooth-scroll').click(function () { 2137 if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 2138 var target = $(this.hash); 2139 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 2140 if (target.length) { 2141 $('html,body').animate({ 2142 scrollTop: target.offset().top - headerHeight 2143 }, 1000); 2144 return false; 2145 } 2146 } 2147 }); 2148 } else { 2149 $('.smooth-scroll a[href*=#]:not([href=#]), a[href*=#]:not([href=#]).smooth-scroll').click(function () { 2150 if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 2151 var target = $(this.hash); 2152 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 2153 if (target.length) { 2154 $('html,body').animate({ 2155 scrollTop: target.offset().top - headerHeight 2156 }, 1000); 2157 return false; 2158 } 2159 } 2160 }); 2161 } 2162 } 2163 2164 // Offcanvas side navbar 2165 //----------------------------------------------- 2166 2167 // Offcanvas side navbar 2168 //----------------------------------------------- 2169 if ($("#offcanvas-users").length > 0) { 2170 $('#offcanvas-users').offcanvas({ 2171 canvas: "", 2172 disableScrolling: true, 2173 toggle: false, 2174 autohide: false 2175 }); 2176 } 2177 ; 2178 2179 if ($("#offcanvas-users").length > 0) { 2180 $('#offcanvas-users [data-toggle=dropdown]').on('click', function (event) { 2181 // Avoid following the href location when clicking 2182 event.preventDefault(); 2183 // Avoid having the menu to close when clicking 2184 event.stopPropagation(); 2185 // close all the siblings 2186 // $(this).parent().siblings().removeClass('open'); 2187 // close all the submenus of siblings 2188 // $(this).parent().siblings().find('[data-toggle=dropdown]').parent().removeClass('open'); 2189 // opening the one you clicked on 2190 $(this).parent().toggleClass('open'); 2191 }); 2192 } 2193 ; 2194 2195 // Offcanvas side navbar 2196 //----------------------------------------------- 2197 if ($("#offcanvas-press").length > 0) { 2198 $('#offcanvas-press').offcanvas({ 2199 canvas: "", 2200 disableScrolling: true, 2201 toggle: false, 2202 autohide: false 2203 }); 2204 } 2205 ; 2206 2207 if ($("#offcanvas-press").length > 0) { 2208 $('#offcanvas-press [data-toggle=dropdown]').on('click', function (event) { 2209 // Avoid following the href location when clicking 2210 event.preventDefault(); 2211 // Avoid having the menu to close when clicking 2212 event.stopPropagation(); 2213 // close all the siblings 2214 $(this).parent().siblings().removeClass('open'); 2215 // close all the submenus of siblings 2216 $(this).parent().siblings().find('[data-toggle=dropdown]').parent().removeClass('open'); 2217 // opening the one you clicked on 2218 $(this).parent().toggleClass('open'); 2219 }); 2220 } 2221 ; 2222 2223 // Parallax section 2224 //----------------------------------------------- 2225 if (($(".parallax").length > 0) && !Modernizr.touch) { 2226 $(".parallax").parallax("50%", 0.2); 2227 } 2228 ; 2229 if (($(".parallax-2").length > 0) && !Modernizr.touch) { 2230 $(".parallax-2").parallax("50%", 0.3); 2231 } 2232 ; 2233 if (($(".parallax-3").length > 0) && !Modernizr.touch) { 2234 $(".parallax-3").parallax("50%", 0.4); 2235 } 2236 ; 2237 2238 // Notify Plugin 2239 //----------------------------------------------- 2240 if (($(".main-navigation.onclick").length > 0) && !Modernizr.touch) { 2241 $.notify({ 2242 // options 2243 message: 'The Dropdowns of the Main Menu, are now open with click on Parent Items. Click "Home" to checkout this behavior.' 2244 }, { 2245 // settings 2246 type: 'info', 2247 delay: 10000, 2248 offset: { 2249 y: 150, 2250 x: 20 2251 } 2252 }); 2253 } 2254 ; 2255 if (!($(".main-navigation.animated").length > 0) && !Modernizr.touch && $(".main-navigation").length > 0) { 2256 $.notify({ 2257 // options 2258 message: 'The animations of main menu are disabled.' 2259 }, { 2260 // settings 2261 type: 'info', 2262 delay: 10000, 2263 offset: { 2264 y: 150, 2265 x: 20 2266 } 2267 }); 2268 } 2269 ; 2270 if ($(".btn-alert").length > 0) { 2271 $(".btn-alert").on('click', function (event) { 2272 $.notify({ 2273 // options 2274 message: 'Great! you have just created this message :-) you can configure this into the template.js file' 2275 }, { 2276 // settings 2277 type: 'info', 2278 delay: 4000, 2279 offset: { 2280 y: 100, 2281 x: 20 2282 } 2283 }); 2284 return false;
vendor: 16,816 bytes, lines 2285-2778
2285 }); 2286 } 2287 ; 2288 2289 // Remove Button 2290 //----------------------------------------------- 2291 $(".btn-remove").click(function () { 2292 $(this).closest(".remove-data").remove(); 2293 }); 2294 2295 // Shipping Checkbox 2296 //----------------------------------------------- 2297 if ($("#shipping-info-check").is(':checked')) { 2298 $("#shipping-information").hide(); 2299 } 2300 $("#shipping-info-check").change(function () { 2301 if ($(this).is(':checked')) { 2302 $("#shipping-information").slideToggle(); 2303 } else { 2304 $("#shipping-information").slideToggle(); 2305 } 2306 }); 2307 2308 // Full Width Image Overlay 2309 //----------------------------------------------- 2310 if ($(".full-image-overlay").length > 0) { 2311 overlayHeight = $(".full-image-overlay").outerHeight(); 2312 $(".full-image-overlay").css("marginTop", -overlayHeight / 2); 2313 } 2314 ; 2315 2316 //This will prevent the event from bubbling up and close the dropdown when you type/click on text boxes (Header Top). 2317 //----------------------------------------------- 2318 $('.header-top .dropdown-menu input').click(function (e) { 2319 e.stopPropagation(); 2320 }); 2321 2322 }); // End document ready 2323 2324})(this.jQuery); 2325 2326if (jQuery(".btn-print").length > 0) { 2327 function print_window() { 2328 var mywindow = window; 2329 mywindow.document.close(); 2330 mywindow.focus(); 2331 mywindow.print(); 2332 mywindow.close(); 2333 } 2334} 2335 2336$('.dropdown-menu #customBtn').click(function (e) { 2337 e.stopPropagation(); 2338}); 2339 2340$('#baze-dropdown a').click(function (e) { 2341 e.stopPropagation(); 2342}); 2343 2344$('#zaClanove a').click(function (e) { 2345 e.stopPropagation(); 2346}); 2347 2348/*! 2349 * jQuery UI Tooltip 1.11.2 2350 * http://jqueryui.com 2351 * 2352 * Copyright 2014 jQuery Foundation and other contributors 2353 * Released under the MIT license. 2354 * http://jquery.org/license 2355 * 2356 * http://api.jqueryui.com/tooltip/ 2357 */ 2358 2359$('[data-rel=tooltip]').tooltip({container: 'body'}); 2360$('[data-rel=popover]').popover({container: 'body'}); 2361var tooltip = $("ui.tooltip", { 2362 version: "1.11.2", 2363 options: { 2364 content: function () { 2365 // support: IE<9, Opera in jQuery <1.7 2366 // .text() can't accept undefined, so coerce to a string 2367 var title = $(this).attr("title") || ""; 2368 // Escape title, since we're going from an attribute to raw HTML 2369 return $("<a>").text(title).html(); 2370 }, 2371 hide: true, 2372 // Disabled elements have inconsistent behavior across browsers (#8661) 2373 items: "[title]:not([disabled])", 2374 position: { 2375 my: "left top+15", 2376 at: "left bottom", 2377 collision: "flipfit flip" 2378 }, 2379 show: true, 2380 tooltipClass: null, 2381 track: false, 2382 // callbacks 2383 close: null, 2384 open: null 2385 }, 2386 _addDescribedBy: function (elem, id) { 2387 var describedby = (elem.attr("aria-describedby") || "").split(/\s+/); 2388 describedby.push(id); 2389 elem 2390 .data("ui-tooltip-id", id) 2391 .attr("aria-describedby", $.trim(describedby.join(" "))); 2392 }, 2393 _removeDescribedBy: function (elem) { 2394 var id = elem.data("ui-tooltip-id"), 2395 describedby = (elem.attr("aria-describedby") || "").split(/\s+/), 2396 index = $.inArray(id, describedby); 2397 2398 if (index !== -1) { 2399 describedby.splice(index, 1); 2400 } 2401 2402 elem.removeData("ui-tooltip-id"); 2403 describedby = $.trim(describedby.join(" ")); 2404 if (describedby) { 2405 elem.attr("aria-describedby", describedby); 2406 } else { 2407 elem.removeAttr("aria-describedby"); 2408 } 2409 }, 2410 _create: function () { 2411 this._on({ 2412 mouseover: "open", 2413 focusin: "open" 2414 }); 2415 2416 // IDs of generated tooltips, needed for destroy 2417 this.tooltips = {}; 2418 2419 // IDs of parent tooltips where we removed the title attribute 2420 this.parents = {}; 2421 2422 if (this.options.disabled) { 2423 this._disable(); 2424 } 2425 2426 // Append the aria-live region so tooltips announce correctly 2427 this.liveRegion = $("<div>") 2428 .attr({ 2429 role: "log", 2430 "aria-live": "assertive", 2431 "aria-relevant": "additions" 2432 }) 2433 .addClass("ui-helper-hidden-accessible") 2434 .appendTo(this.document[ 0 ].body); 2435 }, 2436 _setOption: function (key, value) { 2437 var that = this; 2438 2439 if (key === "disabled") { 2440 this[ value ? "_disable" : "_enable" ](); 2441 this.options[ key ] = value; 2442 // disable element style changes 2443 return; 2444 } 2445 2446 this._super(key, value); 2447 2448 if (key === "content") { 2449 $.each(this.tooltips, function (id, tooltipData) { 2450 that._updateContent(tooltipData.element); 2451 }); 2452 } 2453 }, 2454 _disable: function () { 2455 var that = this; 2456 2457 // close open tooltips 2458 $.each(this.tooltips, function (id, tooltipData) { 2459 var event = $.Event("blur"); 2460 event.target = event.currentTarget = tooltipData.element[ 0 ]; 2461 that.close(event, true); 2462 }); 2463 2464 // remove title attributes to prevent native tooltips 2465 this.element.find(this.options.items).addBack().each(function () { 2466 var element = $(this); 2467 if (element.is("[title]")) { 2468 element 2469 .data("ui-tooltip-title", element.attr("title")) 2470 .removeAttr("title"); 2471 } 2472 }); 2473 }, 2474 _enable: function () { 2475 // restore title attributes 2476 this.element.find(this.options.items).addBack().each(function () { 2477 var element = $(this); 2478 if (element.data("ui-tooltip-title")) { 2479 element.attr("title", element.data("ui-tooltip-title")); 2480 } 2481 }); 2482 }, 2483 open: function (event) { 2484 var that = this, 2485 target = $(event ? event.target : this.element) 2486 // we need closest here due to mouseover bubbling, 2487 // but always pointing at the same event target 2488 .closest(this.options.items); 2489 2490 // No element to show a tooltip for or the tooltip is already open 2491 if (!target.length || target.data("ui-tooltip-id")) { 2492 return; 2493 } 2494 2495 if (target.attr("title")) { 2496 target.data("ui-tooltip-title", target.attr("title")); 2497 } 2498 2499 target.data("ui-tooltip-open", true); 2500 2501 // kill parent tooltips, custom or native, for hover 2502 if (event && event.type === "mouseover") { 2503 target.parents().each(function () { 2504 var parent = $(this), 2505 blurEvent; 2506 if (parent.data("ui-tooltip-open")) { 2507 blurEvent = $.Event("blur"); 2508 blurEvent.target = blurEvent.currentTarget = this; 2509 that.close(blurEvent, true); 2510 } 2511 if (parent.attr("title")) { 2512 parent.uniqueId(); 2513 that.parents[ this.id ] = { 2514 element: this, 2515 title: parent.attr("title") 2516 }; 2517 parent.attr("title", ""); 2518 } 2519 }); 2520 } 2521 2522 this._updateContent(target, event); 2523 }, 2524 _updateContent: function (target, event) { 2525 var content, 2526 contentOption = this.options.content, 2527 that = this, 2528 eventType = event ? event.type : null; 2529 2530 if (typeof contentOption === "string") { 2531 return this._open(event, target, contentOption); 2532 } 2533 2534 content = contentOption.call(target[0], function (response) { 2535 // ignore async response if tooltip was closed already 2536 if (!target.data("ui-tooltip-open")) { 2537 return; 2538 } 2539 // IE may instantly serve a cached response for ajax requests 2540 // delay this call to _open so the other call to _open runs first 2541 that._delay(function () { 2542 // jQuery creates a special event for focusin when it doesn't 2543 // exist natively. To improve performance, the native event 2544 // object is reused and the type is changed. Therefore, we can't 2545 // rely on the type being correct after the event finished 2546 // bubbling, so we set it back to the previous value. (#8740) 2547 if (event) { 2548 event.type = eventType; 2549 } 2550 this._open(event, target, response); 2551 }); 2552 }); 2553 if (content) { 2554 this._open(event, target, content); 2555 } 2556 }, 2557 _open: function (event, target, content) { 2558 var tooltipData, tooltip, events, delayedShow, a11yContent, 2559 positionOption = $.extend({}, this.options.position); 2560 2561 if (!content) { 2562 return; 2563 } 2564 2565 // Content can be updated multiple times. If the tooltip already 2566 // exists, then just update the content and bail. 2567 tooltipData = this._find(target); 2568 if (tooltipData) { 2569 tooltipData.tooltip.find(".ui-tooltip-content").html(content); 2570 return; 2571 } 2572 2573 // if we have a title, clear it to prevent the native tooltip 2574 // we have to check first to avoid defining a title if none exists 2575 // (we don't want to cause an element to start matching [title]) 2576 // 2577 // We use removeAttr only for key events, to allow IE to export the correct 2578 // accessible attributes. For mouse events, set to empty string to avoid 2579 // native tooltip showing up (happens only when removing inside mouseover). 2580 if (target.is("[title]")) { 2581 if (event && event.type === "mouseover") { 2582 target.attr("title", ""); 2583 } else { 2584 target.removeAttr("title"); 2585 } 2586 } 2587 2588 tooltipData = this._tooltip(target); 2589 tooltip = tooltipData.tooltip; 2590 this._addDescribedBy(target, tooltip.attr("id")); 2591 tooltip.find(".ui-tooltip-content").html(content); 2592 2593 // Support: Voiceover on OS X, JAWS on IE <= 9 2594 // JAWS announces deletions even when aria-relevant="additions" 2595 // Voiceover will sometimes re-read the entire log region's contents from the beginning 2596 this.liveRegion.children().hide(); 2597 if (content.clone) { 2598 a11yContent = content.clone(); 2599 a11yContent.removeAttr("id").find("[id]").removeAttr("id"); 2600 } else { 2601 a11yContent = content; 2602 } 2603 $("<div>").html(a11yContent).appendTo(this.liveRegion); 2604 2605 function position(event) { 2606 positionOption.of = event; 2607 if (tooltip.is(":hidden")) { 2608 return; 2609 } 2610 tooltip.position(positionOption); 2611 } 2612 if (this.options.track && event && /^mouse/.test(event.type)) { 2613 this._on(this.document, { 2614 mousemove: position 2615 }); 2616 // trigger once to override element-relative positioning 2617 position(event); 2618 } else { 2619 tooltip.position($.extend({ 2620 of: target 2621 }, this.options.position)); 2622 } 2623 2624 tooltip.hide(); 2625 2626 this._show(tooltip, this.options.show); 2627 // Handle tracking tooltips that are shown with a delay (#8644). As soon 2628 // as the tooltip is visible, position the tooltip using the most recent 2629 // event. 2630 if (this.options.show && this.options.show.delay) { 2631 delayedShow = this.delayedShow = setInterval(function () { 2632 if (tooltip.is(":visible")) { 2633 position(positionOption.of); 2634 clearInterval(delayedShow); 2635 } 2636 }, $.fx.interval); 2637 } 2638 2639 this._trigger("open", event, {tooltip: tooltip}); 2640 2641 events = { 2642 keyup: function (event) { 2643 if (event.keyCode === $.ui.keyCode.ESCAPE) { 2644 var fakeEvent = $.Event(event); 2645 fakeEvent.currentTarget = target[0]; 2646 this.close(fakeEvent, true); 2647 } 2648 } 2649 }; 2650 2651 // Only bind remove handler for delegated targets. Non-delegated 2652 // tooltips will handle this in destroy. 2653 if (target[ 0 ] !== this.element[ 0 ]) { 2654 events.remove = function () { 2655 this._removeTooltip(tooltip); 2656 }; 2657 } 2658 2659 if (!event || event.type === "mouseover") { 2660 events.mouseleave = "close"; 2661 } 2662 if (!event || event.type === "focusin") { 2663 events.focusout = "close"; 2664 } 2665 this._on(true, target, events); 2666 }, 2667 close: function (event) { 2668 var tooltip, 2669 that = this, 2670 target = $(event ? event.currentTarget : this.element), 2671 tooltipData = this._find(target); 2672 2673 // The tooltip may already be closed 2674 if (!tooltipData) { 2675 return; 2676 } 2677 2678 tooltip = tooltipData.tooltip; 2679 2680 // disabling closes the tooltip, so we need to track when we're closing 2681 // to avoid an infinite loop in case the tooltip becomes disabled on close 2682 if (tooltipData.closing) { 2683 return; 2684 } 2685 2686 // Clear the interval for delayed tracking tooltips 2687 clearInterval(this.delayedShow); 2688 2689 // only set title if we had one before (see comment in _open()) 2690 // If the title attribute has changed since open(), don't restore 2691 if (target.data("ui-tooltip-title") && !target.attr("title")) { 2692 target.attr("title", target.data("ui-tooltip-title")); 2693 } 2694 2695 this._removeDescribedBy(target); 2696 2697 tooltipData.hiding = true; 2698 tooltip.stop(true); 2699 this._hide(tooltip, this.options.hide, function () { 2700 that._removeTooltip($(this)); 2701 }); 2702 2703 target.removeData("ui-tooltip-open"); 2704 this._off(target, "mouseleave focusout keyup"); 2705 2706 // Remove 'remove' binding only on delegated targets 2707 if (target[ 0 ] !== this.element[ 0 ]) { 2708 this._off(target, "remove"); 2709 } 2710 this._off(this.document, "mousemove"); 2711 2712 if (event && event.type === "mouseleave") { 2713 $.each(this.parents, function (id, parent) { 2714 $(parent.element).attr("title", parent.title); 2715 delete that.parents[ id ]; 2716 }); 2717 } 2718 2719 tooltipData.closing = true; 2720 this._trigger("close", event, {tooltip: tooltip}); 2721 if (!tooltipData.hiding) { 2722 tooltipData.closing = false; 2723 } 2724 }, 2725 _tooltip: function (element) { 2726 var tooltip = $("<div>") 2727 .attr("role", "tooltip") 2728 .addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + 2729 (this.options.tooltipClass || "")), 2730 id = tooltip.uniqueId().attr("id"); 2731 2732 $("<div>") 2733 .addClass("ui-tooltip-content") 2734 .appendTo(tooltip); 2735 2736 tooltip.appendTo(this.document[0].body); 2737 2738 return this.tooltips[ id ] = { 2739 element: element, 2740 tooltip: tooltip 2741 }; 2742 }, 2743 _find: function (target) { 2744 var id = target.data("ui-tooltip-id"); 2745 return id ? this.tooltips[ id ] : null; 2746 }, 2747 _removeTooltip: function (tooltip) { 2748 tooltip.remove(); 2749 delete this.tooltips[ tooltip.attr("id") ]; 2750 }, 2751 _destroy: function () { 2752 var that = this; 2753 2754 // close open tooltips 2755 $.each(this.tooltips, function (id, tooltipData) { 2756 // Delegate to close method to handle common cleanup 2757 var event = $.Event("blur"), 2758 element = tooltipData.element; 2759 event.target = event.currentTarget = element[ 0 ]; 2760 that.close(event, true); 2761 2762 // Remove immediately; destroying an open tooltip doesn't use the 2763 // hide animation 2764 $("#" + id).remove(); 2765 2766 // Restore the title 2767 if (element.data("ui-tooltip-title")) { 2768 // If the title attribute has changed since open(), don't restore 2769 if (!element.attr("title")) { 2770 element.attr("title", element.data("ui-tooltip-title")); 2771 } 2772 element.removeData("ui-tooltip-title"); 2773 } 2774 }); 2775 this.liveRegion.remove(); 2776 } 2777} 2778);
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.