1$(document).ready(function () { 2 'use strict'; 3 4 //===== Menu Active =====// 5 var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/") + 1); 6 $("nav ul li a").each(function () { 7 if ($(this).attr("href") == pgurl || $(this).attr("href") == '') 8 $(this).parent('li').addClass("active").parent().parent().addClass("active").parent().parent().addClass("active"); 9 }); 10 11 //===== Menu Active =====// 12 var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/") + 1); 13 $(".rsnp-mnu ul li a").each(function () { 14 if ($(this).attr("href") == pgurl || $(this).attr("href") == '') 15 $(this).parent('li').addClass("active").parent().parent().addClass("active-parent").parent().parent().addClass("active-parent"); 16 }); 17 18 //===== Width =====// 19 var width = window.innerWidth; 20 21 //===== Wow Animation Setting =====// 22 if ($(".wow").length > 0) { 23 var wow = new WOW({ 24 boxClass: 'wow', // default 25 animateClass: 'animated', // default 26 offset: 0, // default 27 mobile: true, // default 28 live: true // default 29 }); 30 31 wow.init(); 32 } 33 34 //===== Header Search =====// 35 $('.search-btn').on('click', function () { 36 $('.header-search').addClass('active'); 37 return false; 38 }); 39 $('.search-close-btn').on('click', function () { 40 $('.header-search').removeClass('active'); 41 return false; 42 }); 43 44 //===== Side Menu =====// 45 $('.rspn-mnu-btn').on('click', function () { 46 $('.rsnp-mnu').addClass('slidein'); 47 return false; 48 }); 49 $('.rspn-mnu-cls').on('click', function () { 50 $('.rsnp-mnu').removeClass('slidein'); 51 }); 52 $('.rsnp-mnu li.menu-item-has-children > a').on('click', function () { 53 $(this).parent().siblings('li').children('ul').slideUp(); 54 $(this).parent().siblings('li').removeClass('active'); 55 $(this).parent().children('ul').slideToggle(); 56 $(this).parent().toggleClass('active'); 57 return false; 58 }); 59 60 //===== Select =====// 61 if ($('.slc-wrp > select').length > 0) { 62 $('.slc-wrp > select').selectpicker(); 63 } 64 65 //===== Sticky Sidebar =====// 66 if(width > 991) { 67 if ($('.post-detail-wrap > div.row > div').length > 0) { 68 $('.post-detail-wrap > div.row > div').theiaStickySidebar({ 69 additionalMarginTop: 40, 70 additionalMarginBottom: 40 71 }); 72 } 73 } 74 75 //===== Counter Up =====// 76 if ($.isFunction($.fn.counterUp)) { 77 $('.counter').counterUp({ 78 delay: 10, 79 time: 2000 80 }); 81 } 82 83 //===== LightBox =====// 84 if ($.isFunction($.fn.fancybox)) { 85 $('[data-fancybox],[data-fancybox="gallery"]').fancybox({}); 86 } 87 88 //===== Scrollbar =====// 89 if ($('.rsnp-mnu').length > 0) { 90 var ps = new PerfectScrollbar('.rsnp-mnu'); 91 } 92 93 //===== Calendar =====// 94 if ($('#calendar').length > 0) { 95 $('#calendar').fullCalendar({ 96 defaultDate: '2021-02-12', 97 editable: true, 98 eventLimit: true // allow "more" link when too many events 99 }); 100 } 101 102 //===== Contact Form Validation =====// 103 if($('#email-form').length){ 104 $('form#email-form').submit(function (e) { 105 e.preventDefault(); 106 var fname = $('#email-form .fname').val(); 107 var email = $('#email-form .email').val(); 108 var subject = $('#email-form .subject').val(); 109 var message = $('#email-form .contact_message').val(); 110 if(fname == '' || email == '') { 111 $(this).children('.response').html('<div class="failed alert alert-warning text-center rounded-pill mt-2">Please fill the required fields.</div>'); 112 return false; 113 } 114 $.ajax({ 115 url: "sendemail.php", 116 method: "POST", 117 data: $(this).serialize(), 118 beforeSend: () => { 119 $(this).children('.response').html('<div class="text-info"><img src="assets/images/preloader.gif"> Loading...</div>'); 120 }, 121 success: (data) => { 122 $(this).children('.response').fadeIn().html(data); 123 setTimeout(function () { 124 $(this).children('.response').fadeOut("slow"); 125 }, 5000); 126 $(this).trigger("reset"); 127 }, 128 error: (res) => { 129 console.log(res); 130 $(this).children('.response').fadeIn().html(data); 131 } 132 }); 133 }); 134 } 135 136 //===== Slick Carousel =====// 137 if ($.isFunction($.fn.slick)) { 138 139 //=== Featured Area Carousel ===// 140 $('.feat-caro').slick({ 141 initialSlide: 0, 142 infinite: true, 143 slidesToShow: 1, 144 slidesToScroll: 1, 145 fade: true, 146 autoplay: false, 147 autoplaySpeed: 6000, 148 cssEase: 'cubic-bezier(0.7, 0, 0.3, 1)', 149 speed: 1500, 150 draggable: true, 151 dots: false, 152 arrows: true, 153 pauseOnDotsHover: true, 154 pauseOnFocus: false, 155 pauseOnHover: false, 156 prevArrow:"<button type='button' class='slick-prev'><i class='flaticon-arrow-pointing-to-right'></i></button>", 157 nextArrow:"<button type='button' class='slick-next'><i class='flaticon-arrow-pointing-to-left'></i></button>", 158 responsive: [{ 159 breakpoint: 1076, 160 settings: { 161 slidesToShow: 1, 162 slidesToScroll: 1, 163 dots: true,
164 arrows: false 165 } 166 }, 167 { 168 breakpoint: 851, 169 settings: { 170 slidesToShow: 1, 171 slidesToScroll: 1, 172 dots: true, 173 arrows: false 174 } 175 }, 176 { 177 breakpoint: 576, 178 settings: { 179 slidesToShow: 1, 180 slidesToScroll: 1, 181 dots: true, 182 arrows: false 183 } 184 }] 185 }); 186 187 //=== Featured Area Carousel 2 ===// 188 $('.feat-caro2').slick({ 189 initialSlide: 0, 190 infinite: true, 191 slidesToShow: 1, 192 slidesToScroll: 1, 193 centerMode: true, 194 fade: true, 195 autoplay: true, 196 autoplaySpeed: 4000, 197 cssEase: 'cubic-bezier(0.7, 0, 0.3, 1)', 198 speed: 1500, 199 draggable: true, 200 dots: false, 201 arrows: true, 202 pauseOnDotsHover: true, 203 pauseOnFocus: false, 204 pauseOnHover: false, 205 prevArrow:"<button type='button' class='slick-next'><i class='flaticon-arrow-pointing-to-left'></i></button>", 206 nextArrow:"<button type='button' class='slick-prev'><i class='flaticon-arrow-pointing-to-right'></i></button>", 207 responsive: [{ 208 breakpoint: 995, 209 settings: { 210 slidesToShow: 1, 211 slidesToScroll: 1, 212 dots: true, 213 arrows: false 214 } 215 }, 216 { 217 breakpoint: 851, 218 settings: { 219 slidesToShow: 1, 220 slidesToScroll: 1, 221 dots: true, 222 arrows: false 223 } 224 }, 225 { 226 breakpoint: 770, 227 settings: { 228 slidesToShow: 1, 229 slidesToScroll: 1, 230 dots: true, 231 arrows: false 232 } 233 }, 234 { 235 breakpoint: 576, 236 settings: { 237 slidesToShow: 1, 238 slidesToScroll: 1, 239 dots: true, 240 arrows: false 241 } 242 }] 243 }); 244 245 //=== Featured Area Image Carousel ===// 246 $('.feat-img-caro').slick({ 247 initialSlide: 0, 248 infinite: true, 249 slidesToShow: 1, 250 slidesToScroll: 1, 251 fade: true, 252 autoplay: true, 253 autoplaySpeed: 6000, 254 cssEase: 'cubic-bezier(0.7, 0, 0.3, 1)', 255 speed: 1500, 256 draggable: true, 257 dots: false, 258 arrows: false, 259 pauseOnDotsHover: true, 260 pauseOnFocus: false, 261 pauseOnHover: false, 262 prevArrow:"<button type='button' class='slick-prev'><i class='flaticon-arrow-pointing-to-right'></i></button>", 263 nextArrow:"<button type='button' class='slick-next'><i class='flaticon-arrow-pointing-to-left'></i></button>", 264 responsive: [{ 265 breakpoint: 981, 266 settings: { 267 slidesToShow: 1, 268 slidesToScroll: 1 269 } 270 }, 271 { 272 breakpoint: 851, 273 settings: { 274 slidesToShow: 1, 275 slidesToScroll: 1 276 } 277 }, 278 { 279 breakpoint: 770, 280 settings: { 281 slidesToShow: 1, 282 slidesToScroll: 1 283 } 284 }, 285 { 286 breakpoint: 576, 287 settings: { 288 slidesToShow: 1, 289 slidesToScroll: 1 290 } 291 }, 292 { 293 breakpoint: 490, 294 settings: { 295 slidesToShow: 1, 296 slidesToScroll: 1 297 } 298 }] 299 }); 300 301 //=== News Carousel ===// 302 $('.news-caro').slick({ 303 arrows: true, 304 initialSlide: 0, 305 infinite: true, 306 slidesToShow: 3, 307 slidesToScroll: 1, 308 fade: false, 309 autoplay: false, 310 autoplaySpeed: 5000, 311 speed: 1000, 312 draggable: true, 313 dots: false, 314 pauseOnDotsHover: true, 315 pauseOnFocus: false, 316 pauseOnHover: false, 317 prevArrow:"<button type='button' class='slick-prev'><i class='flaticon-angle-pointing-to-left'></i></button>", 318 nextArrow:"<button type='button' class='slick-next'><i class='flaticon-angle-arrow-pointing-to-right'></i></button>", 319 responsive: [{ 320 breakpoint: 1210, 321 settings: { 322 slidesToShow: 3, 323 slidesToScroll: 1, 324 arrows: false, 325 dots: true 326 } 327 }, 328 { 329 breakpoint: 995, 330 settings: { 331 slidesToShow: 2, 332 slidesToScroll: 1,
333 arrows: false, 334 dots: true 335 } 336 }, 337 { 338 breakpoint: 576, 339 settings: { 340 slidesToShow: 1, 341 slidesToScroll: 1, 342 arrows: false, 343 dots: true 344 } 345 }] 346 }); 347 348 //===== Testimonials Carousel =====// 349 $('.testi-list-caro').slick({ 350 slidesToShow: 1, 351 slidesToScroll: 1, 352 arrows: true, 353 autoplay: true, 354 prevArrow:"<button type='button' class='slick-prev'><i class='flaticon-angle-pointing-to-left'></i></button>", 355 nextArrow:"<button type='button' class='slick-next'><i class='flaticon-angle-arrow-pointing-to-right'></i></button>", 356 // slide: 'li', 357 fade: true, 358 asNavFor: '.testi-nav-caro', 359 responsive: [{ 360 breakpoint: 1290, 361 settings: { 362 slidesToShow: 1, 363 slidesToScroll: 1, 364 arrows: false 365 } 366 }, 367 { 368 breakpoint: 850, 369 settings: { 370 slidesToShow: 1, 371 slidesToScroll: 1, 372 arrows: false 373 } 374 }, 375 { 376 breakpoint: 480, 377 settings: { 378 slidesToShow: 1, 379 slidesToScroll: 1, 380 arrows: false 381 } 382 }] 383 }); 384 385 $('.testi-nav-caro').slick({ 386 slidesToShow: 3, 387 slidesToScroll: 1, 388 asNavFor: '.testi-list-caro', 389 dots: false, 390 arrows: false, 391 // slide: 'li', 392 centerMode: true, 393 vertical: true, 394 centerPadding: '0px', 395 focusOnSelect: true, 396 prevArrow:"<button type='button' class='slick-prev'><i class='flaticon-angle-pointing-to-left'></i></button>", 397 nextArrow:"<button type='button' class='slick-next'><i class='flaticon-angle-arrow-pointing-to-right'></i></button>", 398 responsive: [{ 399 breakpoint: 1200, 400 settings: { 401 slidesToShow: 3, 402 slidesToScroll: 1, 403 infinite: true, 404 } 405 }, 406 { 407 breakpoint: 995, 408 settings: { 409 slidesToShow: 3, 410 slidesToScroll: 1, 411 arrows: false, 412 vertical: false 413 } 414 }, 415 { 416 breakpoint: 480, 417 settings: { 418 slidesToShow: 3, 419 slidesToScroll: 1, 420 arrows: false, 421 vertical: false 422 } 423 }] 424 }); 425 426 } 427 428}); //===== Document Ready Ends =====// 429 430//===== Window onLoad =====// 431$(window).on('load',function () { 432 'use strict'; 433 434 //===== Page Loader =====// 435 jQuery("#preloader").fadeOut(300); 436 437 //===== Isotope =====// 438 if (jQuery('.fltr-itm').length > 0) { 439 if (jQuery().isotope) { 440 var jQuerycontainer = jQuery('.masonry'); // cache container 441 jQuerycontainer.isotope({ 442 itemSelector: '.fltr-itm', 443 columnWidth: .1 444 }); 445 jQuery('.filter-links a').on('click',function () { 446 var selector = jQuery(this).attr('data-filter'); 447 jQuery('.filter-links li').removeClass('active'); 448 jQuery(this).parent().addClass('active'); 449 jQuerycontainer.isotope({ filter: selector }); 450 return false; 451 }); 452 jQuerycontainer.isotope('layout'); // layout/layout 453 } 454 455 jQuery(window).resize(function () { 456 if (jQuery().isotope) { 457 jQuery('.masonry').isotope('layout'); // layout/relayout on window resize 458 } 459 }); 460 } 461 462});//===== Window onLoad Ends =====// 463 464//===== Sticky Header =====// 465$(window).on('scroll',function () { 466 'use strict'; 467 468 var menu_height = $('header').innerHeight(); 469 var scroll = $(window).scrollTop(); 470 if (scroll >= menu_height) { 471 $('body').addClass('sticky'); 472 } else { 473 $('body').removeClass('sticky'); 474 } 475 476});//===== Window onScroll Ends =====//
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.