1(function($) { 2 3 "use strict"; 4 5 6 //Hide Loading Box (Preloader) 7 function handlePreloader() { 8 if($('.preloader').length){ 9 $('.preloader').delay(200).fadeOut(500); 10 } 11 } 12 13 14 //Update Header Style and Scroll to Top 15 function headerStyle() { 16 if($('.main-header').length){ 17 var windowpos = $(window).scrollTop(); 18 var siteHeader = $('.main-header'); 19 var scrollLink = $('.scroll-to-top'); 20 if (windowpos >= 200) { 21 siteHeader.addClass('fixed-header'); 22 scrollLink.fadeIn(300); 23 } else { 24 siteHeader.removeClass('fixed-header'); 25 scrollLink.fadeOut(300); 26 } 27 } 28 } 29 30 headerStyle(); 31 32 33 //Submenu Dropdown Toggle 34 if($('.main-header .navigation li.dropdown ul').length){ 35 $('.main-header .navigation li.dropdown').append('<div class="dropdown-btn"><span class="fa fa-angle-down"></span></div>'); 36 37 //Dropdown Button 38 $('.main-header .navigation li.dropdown .dropdown-btn').on('click', function() { 39 $(this).prev('ul').slideToggle(500); 40 }); 41 42 //Disable dropdown parent link 43 $('.main-header .navigation li.dropdown > a,.hidden-bar .side-menu li.dropdown > a').on('click', function(e) { 44 e.preventDefault(); 45 }); 46 } 47 48 49 //Revolution Slider 50 if($('.main-slider .tp-banner').length){ 51 52 var MainSlider = $('.main-slider'); 53 var strtHeight = MainSlider.attr('data-start-height'); 54 var slideOverlay = "'"+ MainSlider.attr('data-slide-overlay') +"'"; 55 56 $('.main-slider .tp-banner').show().revolution({ 57 dottedOverlay: slideOverlay, 58 delay:10000, 59 startwidth:1200, 60 startheight:strtHeight, 61 hideThumbs:600, 62 63 thumbWidth:80, 64 thumbHeight:50, 65 thumbAmount:5, 66 67 navigationType:"bullet", 68 navigationArrows:"0", 69 navigationStyle:"preview3", 70 71 touchenabled:"on", 72 onHoverStop:"off", 73 74 swipe_velocity: 0.7, 75 swipe_min_touches: 1, 76 swipe_max_touches: 1, 77 drag_block_vertical: false, 78 79 parallax:"mouse", 80 parallaxBgFreeze:"on", 81 parallaxLevels:[7,4,3,2,5,4,3,2,1,0], 82 83 keyboardNavigation:"off", 84 85 navigationHAlign:"center", 86 navigationVAlign:"bottom", 87 navigationHOffset:0, 88 navigationVOffset:40, 89 90 soloArrowLeftHalign:"left", 91 soloArrowLeftValign:"center", 92 soloArrowLeftHOffset:20, 93 soloArrowLeftVOffset:20, 94 95 soloArrowRightHalign:"right", 96 soloArrowRightValign:"center", 97 soloArrowRightHOffset:20, 98 soloArrowRightVOffset:20, 99 100 shadow:0, 101 fullWidth:"on", 102 fullScreen:"off", 103 104 spinner:"spinner4", 105 106 stopLoop:"off", 107 stopAfterLoops:-1, 108 stopAtSlide:-1, 109 110 shuffle:"off", 111 112 autoHeight:"off", 113 forceFullWidth:"on", 114 115 hideThumbsOnMobile:"on", 116 hideNavDelayOnMobile:1500, 117 hideBulletsOnMobile:"on", 118 hideArrowsOnMobile:"on", 119 hideThumbsUnderResolution:0, 120 121 hideSliderAtLimit:0, 122 hideCaptionAtLimit:0, 123 hideAllCaptionAtLilmit:0, 124 startWithSlide:0, 125 videoJsPath:"", 126 fullScreenOffsetContainer: "" 127 }); 128 129 } 130 131 //Search Panel Hide/Show 132 if ($('.search-toggle-btn').length) { 133 134 //Show Panel 135 $('.search-toggle-btn').on('click', function (e) { 136 e.preventDefault(); 137 $(this).toggleClass('active'); 138 $('.search-form-panel').toggleClass('opened'); 139 }); 140 } 141 142 143 //Price Range Slider 144 if($('.price-range-slider').length){ 145 $( ".price-range-slider" ).slider({ 146 range: true, 147 min: 0, 148 max: 900000, 149 values: [ 0, 900000 ], 150 slide: function( event, ui ) { 151 $( "input.property-amount" ).val( ui.values[ 0 ] + " - " + ui.values[ 1 ] ); 152 } 153 }); 154 155 $( "input.property-amount" ).val( $( ".price-range-slider" ).slider( "values", 0 ) + " - " + $( ".price-range-slider" ).slider( "values", 1 ) ); 156 } 157 158 //Area Range Slider 159 if($('.area-range-slider').length){ 160 $( ".area-range-slider" ).slider({ 161 range: true, 162 min: 0, 163 max: 72000, 164 values: [ 0, 72000 ], 165 slide: function( event, ui ) { 166 $( "input.area-size" ).val( ui.values[ 0 ] + " - " + ui.values[ 1 ] ); 167 } 168 }); 169 170 $( "input.area-size" ).val( $( ".area-range-slider" ).slider( "values", 0 ) + " - " + $( ".area-range-slider" ).slider( "values", 1 ) ); 171 } 172 173 174 //Featured Properties Carousel 175 if ($('.featured-properties-carousel').length) { 176 $('.featured-properties-carousel').owlCarousel({ 177 animateOut: 'fadeOut', 178 animateIn: 'fadeIn', 179 loop:true, 180 margin:20, 181 nav:true, 182 mouseDrag:false, 183 smartSpeed: 1000, 184 autoplay: false, 185 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 186 responsive:{ 187 0:{ 188 items:1 189 }, 190 600:{ 191 items:1 192 }, 193 800:{ 194 items:1 195 }, 196 1200:{ 197 items:1 198 } 199 } 200 }); 201 } 202 203 //Single Item Slider 204 if ($('.single-item-carousel').length) { 205 $('.single-item-carousel').owlCarousel({ 206 loop:true, 207 mouseDrag:true, 208 margin:10, 209 nav:true, 210 smartSpeed: 1000, 211 autoplay: true, 212 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 213 responsive:{ 214 0:{ 215 items:1 216 }, 217 600:{ 218 items:1 219 }, 220 1200:{ 221 items:1 222 } 223 } 224 }); 225 } 226 227 228 //Sponsors Carousel 229 if ($('.sponsors-carousel').length) { 230 $('.sponsors-carousel').owlCarousel({ 231 loop:true, 232 margin:30, 233 nav:true, 234 smartSpeed: 700, 235 autoplay: 5000, 236 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 237 responsive:{ 238 0:{ 239 items:1 240 }, 241 600:{ 242 items:2 243 }, 244 800:{ 245 items:3 246 }, 247 1024:{ 248 items:4 249 }, 250 1200:{ 251 items:5 252 } 253 } 254 }); 255 } 256 257 // Testimonials Carousel Slider 258 if ($('.testimonial-slider-content').length && $('.testimonial-slider-pager').length) { 259 260 var $sync1 = $(".testimonial-slider-content"), 261 $sync2 = $(".testimonial-slider-pager"), 262 flag = false, 263 duration = 500; 264 265 $sync1 266 .owlCarousel({ 267 loop:true, 268 items: 1, 269 margin: 0, 270 nav: false, 271 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 272 dots: false, 273 autoplay: false, 274 autoplayTimeout: 5000 275 }) 276 .on('changed.owl.carousel', function (e) { 277 if (!flag) { 278 flag = false; 279 $sync2.trigger('to.owl.carousel', [e.item.index, duration, true]); 280 flag = false; 281 } 282 }); 283 284 $sync2 285 .owlCarousel({ 286 loop:true, 287 margin: 50, 288 items: 1, 289 nav: false, 290 dots: false, 291 navText:false, 292 center: false, 293 autoplay: false, 294 autoplayTimeout: 5000, 295 responsive: { 296 0:{ 297 items:1, 298 autoWidth: false 299 }, 300 400:{ 301 items:1, 302 autoWidth: false 303 }, 304 500:{ 305 items:1, 306 center: false, 307 autoWidth: false 308 }, 309 600:{ 310 items:1, 311 autoWidth: false 312 }, 313 1200:{ 314 items:1, 315 autoWidth: false 316 } 317 }, 318 }) 319 320 .on('click', '.owl-item', function () { 321 $sync1.trigger('to.owl.carousel', [$(this).index(), duration, true]); 322 }) 323 .on('changed.owl.carousel', function (e) { 324 if (!flag) { 325 flag = true; 326 $sync1.trigger('to.owl.carousel', [e.item.index, duration, true]); 327 flag = false; 328 } 329 }); 330 331 } 332 333 334 // Product Details Carousel 335 if ($('.prod-image-carousel').length && $('.prod-thumbs-carousel').length) { 336 337 var $sync3 = $(".prod-image-carousel"), 338 $sync4 = $(".prod-thumbs-carousel"), 339 flag = false, 340 duration = 500; 341 342 $sync3 343 .owlCarousel({ 344 loop:false, 345 items: 1, 346 margin: 10, 347 nav: false, 348 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 349 dots: false, 350 smartSpeed: 700, 351 autoplay: true, 352 autoplayTimeout: 5000 353 }) 354 .on('changed.owl.carousel', function (e) { 355 if (!flag) { 356 flag = false; 357 $sync4.trigger('to.owl.carousel', [e.item.index, duration, true]); 358 flag = false; 359 } 360 }); 361 362 $sync4 363 .owlCarousel({ 364 loop:false, 365 margin: 15, 366 items: 1, 367 nav: true, 368 navText: [ '<span class="icon fa fa-angle-left"></span>', '<span class="icon fa fa-angle-right"></span>' ], 369 dots: false, 370 center: false, 371 smartSpeed: 700, 372 autoplay: true, 373 autoplayTimeout: 5000, 374 responsive: { 375 0:{ 376 items:2, 377 autoWidth: false 378 }, 379 400:{ 380 items:2, 381 autoWidth: false 382 }, 383 600:{ 384 items:3, 385 autoWidth: false 386 }, 387 1000:{ 388 items:4, 389 autoWidth: false 390 }, 391 1200:{ 392 items:4, 393 autoWidth: false 394 } 395 }, 396 }) 397 398 .on('click', '.owl-item', function () { 399 $sync3.trigger('to.owl.carousel', [$(this).index(), duration, true]); 400 }) 401 .on('changed.owl.carousel', function (e) { 402 if (!flag) { 403 flag = true; 404 $sync3.trigger('to.owl.carousel', [e.item.index, duration, true]); 405 flag = false; 406 } 407 }); 408 409 } 410 411 412 //Custom Seclect Box 413 if($('.custom-select-box').length){ 414 $('.custom-select-box').selectmenu().selectmenu('menuWidget').addClass('overflow'); 415 } 416 417 //Masonary 418 function enableMasonry() { 419 if($('.masonry-items-container').length){ 420 421 var winDow = $(window); 422 // Needed variables 423 var $container=$('.masonry-items-container'); 424 425 $container.isotope({ 426 itemSelector: '.masonry-item', 427 masonry: { 428 columnWidth : 1 429 }, 430 animationOptions:{ 431 duration:500, 432 easing:'linear' 433 } 434 }); 435 436 winDow.bind('resize', function(){ 437 438 $container.isotope({ 439 itemSelector: '.masonry-item', 440 animationOptions: { 441 duration: 500, 442 easing : 'linear', 443 queue : false 444 } 445 }); 446 }); 447 } 448 } 449 450 enableMasonry(); 451 452 453 //Contact Form Validation 454 if($('#contact-form').length){ 455 $('#contact-form').validate({ 456 rules: { 457 username: { 458 required: true 459 }, 460 email: { 461 required: true, 462 email: true 463 }, 464 subject: { 465 required: true 466 }, 467 message: { 468 required: true 469 } 470 } 471 }); 472 } 473 474 475 //LightBox / Fancybox 476 if($('.lightbox-image').length) { 477 $('.lightbox-image').fancybox({ 478 openEffect : 'fade', 479 closeEffect : 'fade', 480 helpers : { 481 media : {} 482 } 483 }); 484 } 485 486 487 // Scroll to a Specific Div 488 if($('.scroll-to-target').length){ 489 $(".scroll-to-target").on('click', function() { 490 var target = $(this).attr('data-target'); 491 // animate 492 $('html, body').animate({ 493 scrollTop: $(target).offset().top 494 }, 1500); 495 496 }); 497 } 498 499 500 // Elements Animation 501 if($('.wow').length){ 502 var wow = new WOW( 503 { 504 boxClass: 'wow', // animated element css class (default is wow) 505 animateClass: 'animated', // animation css class (default is animated) 506 offset: 0, // distance to the element when triggering the animation (default is 0) 507 mobile: true, // trigger animations on mobile devices (default is true) 508 live: true // act on asynchronously loaded content (default is true) 509 } 510 ); 511 wow.init(); 512 } 513 514 515/* ========================================================================== 516 When document is Scrollig, do 517 ========================================================================== */ 518 519 $(window).on('scroll', function() { 520 headerStyle(); 521 }); 522 523/* ========================================================================== 524 When document is loading, do 525 ========================================================================== */ 526 527 $(window).on('load', function() { 528 handlePreloader(); 529 enableMasonry(); 530 }); 531 532 533 534 535})(window.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.