1(function($) { 2 3 "use strict"; 4 5 if($(".sidebar-side>.sidebar").length > 0 && $(".sidebar-side>.sidebar").html().trim() == '') { 6 $(".sidebar-side").remove(); 7 $(".content-side").removeClass("col-lg-9").removeClass("col-md-8").addClass("col-lg-12").addClass("col-md-12"); 8 } 9 10 //Hide Loading Box (Preloader) 11 function handlePreloader() { 12 if($('.preloader').length){ 13 $('.preloader').delay(200).fadeOut(500); 14 } 15 } 16 17 //Update Header Style and Scroll to Top 18 function headerStyle() { 19 if($('.main-header').length){ 20 var windowpos = $(window).scrollTop(); 21 var siteHeader = $('.main-header'); 22 var scrollLink = $('.scroll-to-top'); 23 if (windowpos >= 250) { 24 siteHeader.addClass('fixed-header'); 25 scrollLink.fadeIn(300); 26 } else { 27 siteHeader.removeClass('fixed-header'); 28 scrollLink.fadeOut(300); 29 } 30 } 31 } 32 33 headerStyle(); 34 35 //Submenu Dropdown Toggle 36 if($('.main-header .navigation li.dropdown ul').length){ 37 $('.main-header .navigation li.dropdown').append('<div class="dropdown-btn"><span class="fa fa-angle-down"></span></div>'); 38 39 //Dropdown Button 40 $('.main-header .navigation li.dropdown .dropdown-btn').on('click', function() { 41 $(this).prev('ul').slideToggle(500); 42 }); 43 44 //Disable dropdown parent link 45 $('.navigation li.dropdown > a').on('click', function(e) { 46 e.preventDefault(); 47 }); 48 } 49 50 //Revolution Slider 51 if($('.main-slider .tp-banner').length){ 52 53 var MainSlider = $('.main-slider'); 54 var strtHeight = MainSlider.attr('data-start-height'); 55 var slideOverlay = "'"+ MainSlider.attr('data-slide-overlay') +"'"; 56 57 $('.main-slider .tp-banner').show().revolution({ 58 dottedOverlay: slideOverlay, 59 delay:50000, 60 startwidth:1200, 61 startheight:strtHeight, 62 hideThumbs:600, 63 64 thumbWidth:80, 65 thumbHeight:50, 66 thumbAmount:5, 67 68 navigationType:"bullet", 69 navigationArrows:"0", 70 navigationStyle:"preview3", 71 72 touchenabled:"on", 73 onHoverStop:"off", 74 75 swipe_velocity: 0.7, 76 swipe_min_touches: 1, 77 swipe_max_touches: 1, 78 drag_block_vertical: false, 79 80 parallax:"mouse", 81 parallaxBgFreeze:"on", 82 parallaxLevels:[7,4,3,2,5,4,3,2,1,0], 83 84 keyboardNavigation:"off", 85 86 navigationHAlign:"center", 87 navigationVAlign:"bottom", 88 navigationHOffset:0, 89 navigationVOffset:50, 90 91 soloArrowLeftHalign:"left", 92 soloArrowLeftValign:"bottom", 93 soloArrowLeftHOffset:20, 94 soloArrowLeftVOffset:0, 95 96 soloArrowRightHalign:"right", 97 soloArrowRightValign:"center", 98 soloArrowRightHOffset:20, 99 soloArrowRightVOffset:0, 100 101 shadow:0, 102 fullWidth:"on", 103 fullScreen:"off", 104 105 spinner:"spinner4", 106 107 stopLoop:"off", 108 stopAfterLoops:-1, 109 stopAtSlide:-1, 110 111 shuffle:"off", 112 113 autoHeight:"off", 114 forceFullWidth:"on", 115 116 hideThumbsOnMobile:"on", 117 hideNavDelayOnMobile:1500, 118 hideBulletsOnMobile:"on", 119 hideArrowsOnMobile:"on", 120 hideThumbsUnderResolution:0, 121 122 hideSliderAtLimit:0, 123 hideCaptionAtLimit:0, 124 hideAllCaptionAtLilmit:0, 125 startWithSlide:0, 126 videoJsPath:"", 127 fullScreenOffsetContainer: "" 128 }); 129 } 130 131 132 //Fact Counter + Text Count 133 if($('.count-box').length){ 134 $('.count-box').appear(function(){ 135 136 var $t = $(this), 137 n = $t.find(".count-text").attr("data-stop"), 138 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 139 140 if (!$t.hasClass("counted")) { 141 $t.addClass("counted"); 142 $({ 143 countNum: $t.find(".count-text").text() 144 }).animate({ 145 countNum: n 146 }, { 147 duration: r, 148 easing: "linear", 149 step: function() { 150 $t.find(".count-text").text(Math.floor(this.countNum)); 151 }, 152 complete: function() { 153 $t.find(".count-text").text(this.countNum); 154 } 155 }); 156 } 157 158 },{accY: 0}); 159 } 160 161 162 //Accordion Box 163 if($('.accordion-box').length){ 164 $(".accordion-box").on('click', '.acc-btn', function() { 165 166 var outerBox = $(this).parents('.accordion-box'); 167 var target = $(this).parents('.accordion'); 168 169 if($(this).hasClass('active')!==true){ 170 $(outerBox).find('.accordion .acc-btn').removeClass('active'); 171 } 172 173 if ($(this).next('.acc-content').is(':visible')){ 174 return false; 175 }else{ 176 $(this).addClass('active'); 177 $(outerBox).children('.accordion').removeClass('active-block'); 178 $(outerBox).find('.accordion').children('.acc-content').slideUp(300); 179 target.addClass('active-block'); 180 $(this).next('.acc-content').slideDown(300); 181 } 182 }); 183 } 184 185 186 //Tabs Box 187 if($('.tabs-box').length){ 188 $('.tabs-box .tab-buttons .tab-btn').on('click', function(e) { 189 e.preventDefault(); 190 var target = $($(this).attr('data-tab')); 191 192 if ($(target).is(':visible')){ 193 return false; 194 }else{ 195 target.parents('.tabs-box').find('.tab-buttons').find('.tab-btn').removeClass('active-btn'); 196 $(this).addClass('active-btn'); 197 target.parents('.tabs-box').find('.tabs-content').find('.tab').fadeOut(0); 198 target.parents('.tabs-box').find('.tabs-content').find('.tab').removeClass('active-tab'); 199 $(target).fadeIn(300); 200 $(target).addClass('active-tab'); 201 } 202 }); 203 } 204 205 206 //Progress Bar / Levels 207 if($('.progress-levels .progress-box .bar-fill').length){ 208 $('.progress-box .bar-fill').appear(function(){ 209 $(".progress-box .bar-fill").each(function() { 210 var progressWidth = $(this).attr('data-percent'); 211 $(this).css('width',progressWidth+'%'); 212 }); 213 214 },{accY: 0}); 215 } 216 217 218 //Testimonial Carousel 219 if ($('.testimonial-carousel').length) { 220 $('.testimonial-carousel').owlCarousel({ 221 loop:true, 222 margin:30, 223 animateOut: 'fadeOut', 224 nav:true, 225 smartSpeed: 700, 226 autoplay: 4000, 227 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 228 responsive:{ 229 0:{ 230 items:1 231 }, 232 480:{ 233 items:1 234 }, 235 600:{ 236 items:1 237 }, 238 800:{ 239 items:1 240 }, 241 1024:{ 242 items:1 243 } 244 } 245 }); 246 } 247 248 249 //Single Item Carousel 250 if ($('.single-item-carousel').length) { 251 $('.single-item-carousel').owlCarousel({ 252 loop:true, 253 margin:30, 254 nav:true, 255 smartSpeed: 700, 256 autoplay: 4000, 257 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 258 responsive:{ 259 0:{ 260 items:1 261 }, 262 480:{ 263 items:1 264 }, 265 600:{ 266 items:1 267 }, 268 800:{ 269 items:1 270 }, 271 1024:{ 272 items:1 273 } 274 } 275 }); 276 } 277 278 279 //Two Item Carousel 280 if ($('.two-item-carousel').length) { 281 $('.two-item-carousel').owlCarousel({ 282 loop:true, 283 margin:30, 284 nav:true, 285 smartSpeed: 700, 286 autoplay: 4000, 287 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 288 responsive:{ 289 0:{ 290 items:1 291 }, 292 480:{ 293 items:1 294 }, 295 600:{ 296 items:1 297 }, 298 800:{ 299 items:1 300 }, 301 1024:{ 302 items:2 303 } 304 } 305 }); 306 } 307 308 309 //Date TimePicker 310 if($('.datetimepicker').length) { 311 $('.datetimepicker').datetimepicker({ 312 dayOfWeekStart : 1, 313 lang:'en', 314 disabledDates:['1986/01/22','1986/01/23','1986/01/19'], 315 startDate: '2015/01/05' 316 }); 317 } 318 319 320 //Custom Seclect Box 321 if($('.custom-select-box').length){ 322 $('.custom-select-box').selectmenu().selectmenu('menuWidget').addClass('overflow'); 323 } 324 325 326 //Four Item Carousel 327 if ($('.four-item-carousel').length) { 328 $('.four-item-carousel').owlCarousel({ 329 loop:true, 330 margin:0, 331 nav:true, 332 smartSpeed: 700, 333 autoplay: 4000, 334 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 335 responsive:{ 336 0:{ 337 items:1 338 }, 339 480:{ 340 items:1 341 }, 342 600:{ 343 items:2 344 }, 345 800:{ 346 items:3 347 }, 348 1024:{ 349 items:4 350 } 351 } 352 }); 353 } 354 355 356 //LightBox / Fancybox 357 if($('.lightbox-image').length) { 358 $('.lightbox-image').fancybox({ 359 openEffect : 'fade', 360 closeEffect : 'fade', 361 helpers : { 362 media : {} 363 } 364 }); 365 } 366 367 368 //Contact Form Validation 369 /* 370 if($('#contact-form').length){ 371 $('#contact-form').validate({ 372 rules: { 373 username: { 374 required: true 375 }, 376 email: { 377 required: true, 378 email: true 379 }, 380 subject: { 381 required: true 382 }, 383 message: { 384 required: true 385 } 386 } 387 }); 388 } 389 */ 390 391 392 // Scroll to a Specific Div 393 if($('.scroll-to-target').length){ 394 $(".scroll-to-target").on('click', function() { 395 var target = $(this).attr('data-target'); 396 // animate 397 $('html, body').animate({ 398 scrollTop: $(target).offset().top 399 }, 1000); 400 }); 401 } 402 403 404 // Elements Animation 405 if($('.wow').length){ 406 var wow = new WOW( 407 { 408 boxClass: 'wow', // animated element css class (default is wow) 409 animateClass: 'animated', // animation css class (default is animated) 410 offset: 0, // distance to the element when triggering the animation (default is 0) 411 mobile: false, // trigger animations on mobile devices (default is true) 412 live: true // act on asynchronously loaded content (default is true) 413 } 414 ); 415 wow.init(); 416 } 417 418/* ========================================================================== 419 When document is Scrollig, do 420 ========================================================================== */ 421 422 $(window).on('scroll', function() { 423 headerStyle(); 424 }); 425 426/* ========================================================================== 427 When document is loaded, do 428 ========================================================================== */ 429 430 $(window).on('load', function() { 431 handlePreloader(); 432 }); 433 434})(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.