1(function ($) { 2 "use strict"; 3 4 /*------------------------------------- 5 Current Day and Date 6 -------------------------------------*/ 7 if($("#current_date").length) { 8 document.getElementById("current_date").innerHTML = formatAMPM(); 9 } 10 function formatAMPM() { 11 var d = new Date(), 12 months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'], 13 days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']; 14 return days[d.getDay()]+' , '+months[d.getMonth()]+' '+d.getDate()+' , '+d.getFullYear(); 15 } 16 17 /*------------------------------------- 18 IE Fixing 19 -------------------------------------*/ 20 function isIE() { 21 var myNav = navigator.userAgent.toLowerCase(); 22 return (myNav.indexOf('msie') != -1 || myNav.indexOf('trident') != -1) ? true : false; 23 } 24 25 if (isIE()) { 26 $('body').addClass('ie'); 27 } 28 29 /*------------------------------------- 30 Popup 31 -------------------------------------*/ 32 var yPopup = $(".popup-youtube"); 33 if (yPopup.length) { 34 yPopup.magnificPopup({ 35 disableOn: 700, 36 type: 'iframe', 37 mainClass: 'mfp-fade', 38 removalDelay: 160, 39 preloader: false, 40 fixedContentPos: false 41 }); 42 } 43 if ($('.zoom-gallery').length) { 44 $('.zoom-gallery').each(function () { // the containers for all your galleries 45 $(this).magnificPopup({ 46 delegate: 'a.ne-zoom', // the selector for gallery item 47 type: 'image', 48 gallery: { 49 enabled: true 50 } 51 }); 52 }); 53 } 54 55 /*------------------------------------- 56 Jquery Serch Box 57 -------------------------------------*/ 58 $(document).on('click', '#top-search-form .search-button', function (e) { 59 e.preventDefault(); 60 var targrt = $(this).prev('input.search-input'); 61 targrt.animate({ 62 width: ["toggle", "swing"], 63 height: ["toggle", "swing"], 64 opacity: "toggle" 65 }, 500, "linear"); 66 return false; 67 }); 68 69 /*------------------------------------- 70 On click loadmore functionality 71 -------------------------------------*/ 72 $('.loadmore').on('click', 'a', function (e) { 73 e.preventDefault(); 74 var _this = $(this), 75 _parent = _this.parents('.menu-list-wrapper'), 76 _target = _parent.find('.menu-list'), 77 _set = _target.find('.menu-item.hidden').slice(0, 3); 78 if (_set.length) { 79 _set.animate({ 80 opacity: 0 81 }); 82 _set.promise().done(function () { 83 _set.removeClass('hidden'); 84 _set.show().animate({ 85 opacity: 1 86 }, 1000); 87 }); 88 } else { 89 _this.text('No more item to display'); 90 } 91 return false; 92 }); 93 94 /*------------------------------------- 95 jQuery MeanMenu activation code 96 --------------------------------------*/ 97 $('nav#dropdown').meanmenu({ 98 siteLogo: "<div class='mobile-menu-nav-back'><a href='/' class='logo-mobile'><img src='/assets/img/logo.png'/></a></div>" 99 }); 100 101 /*------------------------------------- 102 Wow js Active 103 -------------------------------------*/ 104 new WOW().init(); 105 106 /*------------------------------------- 107 Jquery Scollup 108 -------------------------------------*/ 109 $.scrollUp({ 110 scrollText: '<i class="fa fa-angle-double-up"></i>', 111 easingType: 'linear', 112 scrollSpeed: 900, 113 animation: 'fade' 114 }); 115 116 /*------------------------------------- 117 Offcanvas Menu activation code 118 -------------------------------------*/ 119 $('#wrapper').on('click', '#side-menu-trigger a.menu-bar', function (e) { 120 e.preventDefault(); 121 var $this = $(this), 122 wrapper = $(this).parents('body').find('>#wrapper'), 123 wrapMask = $('<div />').addClass('offcanvas-mask'); 124 wrapper.addClass('open').append(wrapMask); 125 $this.addClass('open'); 126 $this.next('.menu-times').removeClass('close'); 127 document.getElementById('offcanvas-body-wrapper').style.right = '0'; 128 return false; 129 });
130 $('#wrapper').on('click', '#side-menu-trigger a.menu-times', function (e) { 131 e.preventDefault(); 132 var $this = $(this); 133 $("#offcanvas-body-wrapper").attr('style', ''); 134 $this.prev('.menu-bar').removeClass('open'); 135 $this.addClass('close'); 136 closeSideMenu(); 137 return false; 138 }); 139 $('#wrapper').on('click', '#offcanvas-nav-close a', function (e) { 140 closeSideMenu(); 141 return false; 142 }); 143 $(document).on('click', '#wrapper.open .offcanvas-mask', function () { 144 closeSideMenu(); 145 }); 146 $(document).on('keyup', function (event) { 147 if (event.which === 27) { 148 event.preventDefault(); 149 closeSideMenu(); 150 } 151 }); 152 153 function closeSideMenu() { 154 var wrapper = $('body').find('>#wrapper'), 155 $this = $('#side-menu-trigger a.menu-times'); 156 wrapper.removeClass('open').find('.offcanvas-mask').remove(); 157 $("#offcanvas-body-wrapper").attr('style', ''); 158 $this.prev('.menu-bar').removeClass('open'); 159 $this.addClass('close'); 160 } 161 162 /*------------------------------------- 163 Select2 activation code 164 -------------------------------------*/ 165 if ($('#archive-search select.select2').length) { 166 $('#archive-search select.select2').select2({ 167 theme: 'classic', 168 dropdownAutoWidth: true, 169 width: '100%' 170 }); 171 } 172 173 /*------------------------------------- 174 Window load function 175 -------------------------------------*/ 176 $(window).on('load', function () { 177 178 /*------------------------------------- 179 Page Preloader 180 -------------------------------------*/ 181 $('#preloader').fadeOut('slow', function () { 182 $(this).remove(); 183 }); 184 185 /*------------------------------------- 186 jQuery for Isotope initialization 187 -------------------------------------*/ 188 var iso_container = $('.ne-isotope'); 189 if (iso_container.length > 0) { 190 191 iso_container.each(function () { 192 var $container = $(this), 193 selector = $container.find('.isotope-classes-tab a.current').attr('data-filter'); 194 // Isotope initialization 195 var $isotope = $container.find('.featuredContainer').isotope({ 196 filter: selector, 197 animationOptions: { 198 duration: 750, 199 easing: 'linear', 200 queue: false 201 } 202 }); 203 204 // Isotope filter 205 $container.find('.isotope-classes-tab').on('click', 'a', function () { 206 207 var $this = $(this); 208 $this.parent('.isotope-classes-tab').find('a').removeClass('current'); 209 $this.addClass('current'); 210 var selector = $this.attr('data-filter'); 211 $isotope.isotope({ 212 filter: selector, 213 animationOptions: { 214 duration: 750, 215 easing: 'linear', 216 queue: false 217 } 218 }); 219 return false; 220 221 }); 222 223 }); 224 } 225 226 /*------------------------------------- 227 jQuery for Isotope initialization 228 -------------------------------------*/ 229 var $container = $('.ne-isotope-all'); 230 if ($container.length > 0) { 231 232 var selector = $container.find('.isotope-classes-tab a.current').attr('data-filter'); 233 console.log(selector); 234 // Isotope initialization 235 var $isotope = $container.find('.featuredContainer').isotope({ 236 filter: selector, 237 animationOptions: { 238 duration: 750, 239 easing: 'linear', 240 queue: false 241 } 242 }); 243 244 // Isotope filter 245 $container.find('.isotope-classes-tab').on('click', 'a', function () { 246 247 var $this = $(this); 248 $this.parent('.isotope-classes-tab').find('a').removeClass('current'); 249 $this.addClass('current'); 250 var selector = $this.attr('data-filter'); 251 $isotope.isotope({ 252 filter: selector, 253 animationOptions: { 254 duration: 750, 255 easing: 'linear', 256 queue: false 257 } 258 }); 259 return false; 260 261 }); 262 } 263 });
264 265 /*------------------------------------- 266 Accordion 267 -------------------------------------*/ 268 var accordion = $('#accordion'); 269 accordion.children('.panel').children('.panel-collapse').each(function () { 270 if ($(this).hasClass('in')) { 271 $(this).parent('.panel').children('.panel-heading').addClass('active'); 272 } 273 }); 274 accordion.on('show.bs.collapse', function (e) { 275 $(e.target).prev('.panel-heading').addClass('active'); 276 }).on('hide.bs.collapse', function (e) { 277 $(e.target).prev('.panel-heading').removeClass('active'); 278 }); 279 280 /*------------------------------------- 281 Contact Form initiating 282 -------------------------------------*/ 283 var contactForm = $('#contact-form'); 284 if (contactForm.length) { 285 contactForm.validator().on('submit', function (e) { 286 var $this = $(this), 287 $target = contactForm.find('.form-response'); 288 if (e.isDefaultPrevented()) { 289 $target.html("<div class='alert alert-success'><p>Please select all required field.</p></div>"); 290 } else { 291 $.ajax({
292 url: "/assets/vendor/php/contact-form-process.php", 293 type: "POST", 294 data: contactForm.serialize(), 295 beforeSend: function () { 296 $target.html("<div class='alert alert-info'><p>Loading ...</p></div>"); 297 }, 298 success: function (text) { 299 if (text === "success") { 300 $this[0].reset(); 301 $target.html("<div class='alert alert-success'><p>Message has been sent successfully.</p></div>"); 302 } else { 303 $target.html("<div class='alert alert-success'><p>" + text + "</p></div>"); 304 } 305 } 306 }); 307 return false; 308 } 309 }); 310 } 311 312 /*------------------------------------- 313 Login pop up form 314 -------------------------------------*/ 315 $('#login-button').on('click', function (e) { 316 e.preventDefault(); 317 var self = $(this), 318 target = self.next('#login-form'); 319 if (self.hasClass('open')) { 320 target.slideUp('slow'); 321 self.removeClass('open'); 322 } else { 323 target.slideDown('slow'); 324 self.addClass('open'); 325 } 326 }); 327 $('#login-form').on('click', '.form-cancel', function (e) { 328 e.preventDefault(); 329 var self = $(this), 330 parent = self.parents('#login-form'), 331 loginButton = parent.prev('#login-button'); 332 parent.slideUp('slow'); 333 loginButton.removeClass('open'); 334 }); 335 336 /*------------------------------------- 337 Google Map 338 -------------------------------------*/ 339 if ($("#googleMap").length) { 340 window.onload = function () { 341 var styles = [{ 342 featureType: 'water', 343 elementType: 'geometry.fill', 344 stylers: [{ 345 color: '#b7d0ea' 346 }] 347 }, { 348 featureType: 'road', 349 elementType: 'labels.text.fill', 350 stylers: [{ 351 visibility: 'off' 352 }] 353 }, { 354 featureType: 'road', 355 elementType: 'geometry.stroke', 356 stylers: [{ 357 visibility: 'off' 358 }] 359 }, { 360 featureType: 'road.highway', 361 elementType: 'geometry', 362 stylers: [{ 363 color: '#c2c2aa' 364 }] 365 }, { 366 featureType: 'poi.park', 367 elementType: 'geometry', 368 stylers: [{ 369 color: '#b6d1b0' 370 }] 371 }, { 372 featureType: 'poi.park', 373 elementType: 'labels.text.fill', 374 stylers: [{ 375 color: '#6b9a76' 376 }] 377 }]; 378 var options = { 379 mapTypeControlOptions: { 380 mapTypeIds: ['Styled'] 381 }, 382 center: new google.maps.LatLng(-37.81618, 144.95692), 383 zoom: 11, 384 disableDefaultUI: true, 385 mapTypeId: 'Styled' 386 }; 387 var div = document.getElementById('googleMap'); 388 var map = new google.maps.Map(div, options); 389 var marker = new google.maps.Marker({ 390 position: map.getCenter(), 391 animation: google.maps.Animation.BOUNCE, 392 icon: '/assets/img/map-marker.png', 393 map: map 394 }); 395 var styledMapType = new google.maps.StyledMapType(styles, { 396 name: 'Styled' 397 }); 398 399 map.mapTypes.set('Styled', styledMapType); 400 }; 401 } 402 403 /*------------------------------------- 404 Carousel slider initiation 405 -------------------------------------*/ 406 $('.ne-carousel').each(function () { 407 var carousel = $(this), 408 loop = carousel.data('loop'), 409 items = carousel.data('items'), 410 margin = carousel.data('margin'), 411 stagePadding = carousel.data('stage-padding'), 412 autoplay = carousel.data('autoplay'), 413 autoplayTimeout = carousel.data('autoplay-timeout'), 414 smartSpeed = carousel.data('smart-speed'), 415 dots = carousel.data('dots'), 416 nav = carousel.data('nav'), 417 navSpeed = carousel.data('nav-speed'), 418 rXsmall = carousel.data('r-x-small'), 419 rXsmallNav = carousel.data('r-x-small-nav'), 420 rXsmallDots = carousel.data('r-x-small-dots'), 421 rXmedium = carousel.data('r-x-medium'), 422 rXmediumNav = carousel.data('r-x-medium-nav'),
423 rXmediumDots = carousel.data('r-x-medium-dots'), 424 rSmall = carousel.data('r-small'), 425 rSmallNav = carousel.data('r-small-nav'), 426 rSmallDots = carousel.data('r-small-dots'), 427 rMedium = carousel.data('r-medium'), 428 rMediumNav = carousel.data('r-medium-nav'), 429 rMediumDots = carousel.data('r-medium-dots'), 430 rLarge = carousel.data('r-Large'), 431 rLargeNav = carousel.data('r-Large-nav'), 432 rLargeDots = carousel.data('r-Large-dots'), 433 center = carousel.data('center'); 434 carousel.owlCarousel({ 435 loop: (loop ? true : false), 436 items: (items ? items : 4), 437 lazyLoad: true, 438 margin: (margin ? margin : 0), 439 autoplay: (autoplay ? true : false), 440 autoplayTimeout: (autoplayTimeout ? autoplayTimeout : 1000), 441 smartSpeed: (smartSpeed ? smartSpeed : 250), 442 dots: (dots ? true : false), 443 nav: (nav ? true : false), 444 navText: ['<i class="fa fa-angle-left" aria-hidden="true"></i>', '<i class="fa fa-angle-right" aria-hidden="true"></i>'], 445 navSpeed: (navSpeed ? true : false), 446 center: (center ? true : false), 447 responsiveClass: true, 448 responsive: { 449 0: { 450 items: (rXsmall ? rXsmall : 1), 451 nav: (rXsmallNav ? true : false), 452 dots: (rXsmallDots ? true : false) 453 }, 454 480: { 455 items: (rXmedium ? rXmedium : 2), 456 nav: (rXmediumNav ? true : false), 457 dots: (rXmediumDots ? true : false) 458 }, 459 768: { 460 items: (rSmall ? rSmall : 3), 461 nav: (rSmallNav ? true : false), 462 dots: (rSmallDots ? true : false) 463 }, 464 992: { 465 items: (rMedium ? rMedium : 4), 466 nav: (rMediumNav ? true : false), 467 dots: (rMediumDots ? true : false) 468 }, 469 1200: { 470 items: (rLarge ? rLarge : 5), 471 nav: (rLargeNav ? true : false), 472 dots: (rLargeDots ? true : false) 473 } 474 } 475 }); 476 }); 477 478 /*------------------------------------- 479 Window onLoad and onResize event trigger 480 -------------------------------------*/ 481 $(window).on('load resize', function () { 482 var wHeight = $(window).height(), 483 mLogoH = $('a.logo-mobile').outerHeight(); 484 wHeight = wHeight - 50; 485 $('.mean-nav > ul').css('height', wHeight + 'px'); 486 487 /* add top margin */ 488 var target = $(".add-top-margin"), 489 mHeight = $(".header-menu-fixed").outerHeight(); 490 target.css({ 491 "margin-top": mHeight + 'px' 492 }); 493 var windowWidth = $(window).width(); 494 if (windowWidth < 991) { 495 $('body.mean-container').css('margin-top', 0); 496 } 497 498 }); 499 500 /*------------------------------------- 501 Jquery Stiky Menu at window Load 502 -------------------------------------*/ 503 $(window).on('scroll', function () { 504 var s = $('#sticker'), 505 sH = s.outerHeight(), 506 windowpos = $(window).scrollTop(), 507 windowWidth = $(window).width(), 508 h1 = $('#header-layout1'), 509 h2 = $('#header-layout2'); 510 if (windowWidth > 991) { 511 var topBarH = 1, 512 mBottom = 0; 513 514 if (h2.length) { 515 topBarH = h2.find('.header-top-bar').outerHeight(); 516 } 517 518 if (windowpos >= topBarH) { 519 if (h1.length) { 520 s.addClass('stick'); 521 } 522 if (h2.length) { 523 s.addClass('stick'); 524 $('.main-menu-area').addClass('header-menu-fixed'); 525 $('body').css({ 526 'margin-top': sH + 'px' 527 }); 528 } 529 530 } else { 531 s.removeClass('stick'); 532 if (h2.length) { 533 s.removeClass('stick'); 534 $('.main-menu-area').removeClass('header-menu-fixed'); 535 $('body').css({ 536 'margin-top': 0 537 }); 538 } 539 } 540 } 541 });
542 543 /*------------------------------------- 544 Masonry 545 -------------------------------------*/ 546 $('.masonry-items').masonry({ 547 // set itemSelector so .grid-sizer is not used in layout 548 itemSelector: '.masonry-item', 549 // use element for option 550 columnWidth: '.masonry-item', 551 // percentPosition: true 552 }); 553 554})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.