1/* --------------------------------------------- 2 javaScript Document 3 --------------------------------------------- */ 4$(document).ready(function() { 5 "use strict"; 6 7 /* --------------------------------------------- 8 Carousel Slider 9 --------------------------------------------- */ 10 11 var owl = $("#news-feed-carousel"); 12 owl.owlCarousel({ 13 autoPlay: 5000, //Set AutoPlay to 5 seconds 14 navigation: false, 15 singleItem: true, 16 transitionStyle: "fade" 17 }); 18 19 $("#content-slide").owlCarousel({ 20 //autoPlay: 5000, Set AutoPlay to 5 seconds 21 items: 2, 22 itemsDesktop: [1199, 2], 23 itemsDesktopSmall: [980, 2], 24 itemsTablet: [768, 2], 25 itemsTabletSmall: false, 26 itemsMobile: [479, 1], 27 pagination: false, 28 dots: false, 29 lazyLoad: true, 30 navigation: true, 31 navigationText: [ 32 "<i class='fa pe-7s-angle-left'></i>", 33 "<i class='fa pe-7s-angle-right'></i>" 34 ], 35 afterInit: function(elem) { 36 var that = this; 37 that.owlControls.prependTo(elem); 38 } 39 }); 40 41 $("#content-slide-2").owlCarousel({ 42 items: 1, 43 itemsDesktop: [1199, 1], 44 itemsDesktopSmall: [980, 1], 45 itemsTablet: [768, 1], 46 itemsTabletSmall: false, 47 itemsMobile: [479, 1], 48 pagination: false, 49 dots: false, 50 lazyLoad: true, 51 navigation: true, 52 navigationText: [ 53 "<i class='fa pe-7s-angle-left'></i>", 54 "<i class='fa pe-7s-angle-right'></i>" 55 ], 56 afterInit: function(elem) { 57 var that = this; 58 that.owlControls.prependTo(elem); 59 } 60 }); 61 62 $("#content-slide-3").owlCarousel({ 63 items: 1, 64 itemsDesktop: [1199, 1], 65 itemsDesktopSmall: [980, 1], 66 itemsTablet: [768, 1], 67 itemsTabletSmall: false, 68 itemsMobile: [479, 1], 69 pagination: false, 70 dots: false, 71 lazyLoad: true, 72 navigation: true, 73 navigationText: [ 74 "<i class='fa pe-7s-angle-left'></i>", 75 "<i class='fa pe-7s-angle-right'></i>" 76 ], 77 afterInit: function(elem) { 78 var that = this; 79 that.owlControls.prependTo(elem); 80 } 81 }); 82 83 $("#content-slide-4").owlCarousel({ 84 autoPlay: 3000, //Set AutoPlay to 3 seconds 85 items: 3, 86 itemsDesktop: [1199, 3], 87 itemsDesktopSmall: [980, 3], 88 itemsTablet: [768, 2], 89 itemsTabletSmall: false, 90 itemsMobile: [479, 1], 91 pagination: false, 92 dots: false, 93 lazyLoad: true, 94 navigation: false 95 }); 96 97 $("#content-slide-5").owlCarousel({ 98 //autoPlay: 5000, Set AutoPlay to 5 seconds 99 items: 1, 100 itemsDesktop: [1199, 1], 101 itemsDesktopSmall: [980, 1], 102 itemsTablet: [768, 1], 103 itemsTabletSmall: false, 104 itemsMobile: [479, 1], 105 pagination: false, 106 dots: false, 107 lazyLoad: true, 108 navigation: true, 109 navigationText: [ 110 "<i class='fa pe-7s-angle-left'></i>", 111 "<i class='fa pe-7s-angle-right'></i>" 112 ], 113 afterInit: function(elem) { 114 var that = this; 115 that.owlControls.prependTo(elem); 116 } 117 }); 118 $("#content-slide-6").owlCarousel({ 119 items: 1, 120 itemsDesktop: [1199, 1], 121 itemsDesktopSmall: [980, 1], 122 itemsTablet: [768, 1], 123 itemsTabletSmall: false, 124 itemsMobile: [479, 1], 125 pagination: false, 126 dots: false, 127 lazyLoad: true, 128 navigation: true, 129 navigationText: [ 130 "<i class='fa pe-7s-angle-left'></i>", 131 "<i class='fa pe-7s-angle-right'></i>" 132 ], 133 afterInit: function(elem) { 134 var that = this; 135 that.owlControls.prependTo(elem); 136 } 137 }); 138 139 $("#content-slide-7").owlCarousel({ 140 //autoPlay: 5000, Set AutoPlay to 5 seconds 141 items: 1, 142 itemsDesktop: [1199, 1], 143 itemsDesktopSmall: [980, 1], 144 itemsTablet: [768, 1], 145 itemsTabletSmall: false, 146 itemsMobile: [479, 1], 147 pagination: false, 148 dots: false, 149 lazyLoad: true, 150 navigation: true, 151 navigationText: [ 152 "<i class='fa pe-7s-angle-left'></i>", 153 "<i class='fa pe-7s-angle-right'></i>" 154 ], 155 afterInit: function(elem) { 156 var that = this; 157 that.owlControls.prependTo(elem); 158 } 159 }); 160 161 $("#video-slide").owlCarousel({ 162 items: 1, 163 itemsDesktop: [1199, 1], 164 itemsDesktopSmall: [980, 1], 165 itemsTablet: [768, 1], 166 itemsTabletSmall: false, 167 itemsMobile: [479, 1], 168 pagination: false, 169 dots: false, 170 lazyLoad: true, 171 navigation: true, 172 navigationText: [ 173 "<i class='fa pe-7s-angle-left left'></i>", 174 "<i class='fa pe-7s-angle-right right'></i>" 175 ], 176 afterInit: function(elem) { 177 var that = this; 178 that.owlControls.prependTo(elem); 179 } 180 }); 181 182 var owl = $("#widget-slider"); 183 owl.owlCarousel({ 184 autoPlay: 5000, //Set AutoPlay to 5 seconds 185 navigation: false, 186 singleItem: true, 187 transitionStyle: "fade" 188 }); 189 190 var owl2 = $("#widget-slider2"); 191 owl2.owlCarousel({ 192 autoPlay: 5000, //Set AutoPlay to 5 seconds 193 navigation: false, 194 singleItem: true, 195 transitionStyle: "fade" 196 }); 197 198 /* --------------------------------------------- 199 Video Effect 200 --------------------------------------------- */ 201 202 $(".post-thumb").mouseenter(function() { 203 $(this).addClass("hover"); 204 }) 205 // handle the mouseleave functionality 206 .mouseleave(function() { 207 $(this).removeClass("hover"); 208 }); 209 210 $(".img-thumb").mouseenter(function() { 211 $(this).addClass("hover"); 212 }) 213 // handle the mouseleave functionality 214 .mouseleave(function() { 215 $(this).removeClass("hover"); 216 }); 217 /* --------------------------------------------- 218 Scroll to Top Button it is called for scrolling down to top at html 219 --------------------------------------------- */ 220 $('body').append('<div id="toTop" class="btn btn-info"><span class="fa fa-arrow-circle-up top"></span><br></div>'); 221 222 223 $('#toTop').on('click', function() { 224 $("html, body").animate({ scrollTop: 0 }, 600); 225 return false;
226 }); 227 228 229 /* --------------------------------------------- 230 Side Menu 231 --------------------------------------------- */ 232 $('.side-menu').metisMenu(); 233 234 /* --------------------------------------------- 235 Pre loader loader 236 --------------------------------------------- */ 237 238 $(".se-pre-con").fadeOut("slow"); 239 240 241 242 /* --------------------------------------------- 243 newstricker 244 --------------------------------------------- */ 245 $('.newsticker').newsTicker({ 246 row_height: 12, 247 max_rows: 2, 248 speed: 600, 249 direction: 'up', 250 duration: 4000, 251 autostart: 1, 252 pauseOnHover: 0, 253 prevButton: $('#prev-button'), 254 nextButton: $('#next-button'), 255 stopButton: $('#stop-button'), 256 startButton: $('#start-button') 257 }); 258 259 260 /* --------------------------------------------- 261 Tab 262 --------------------------------------------- */ 263 264 $('.tab-inner ul.tabs').addClass('active').find('> li:eq(0)').addClass('current'); 265 $('.tab-inner ul.tabs li a').on('click', function(g) { 266 var tab = $(this).closest('.tab-inner'), 267 index = $(this).closest('li').index(); 268 269 tab.find('ul.tabs > li').removeClass('current'); 270 $(this).closest('li').addClass('current'); 271 272 tab.find('.tab_content').find('div.tab-item-inner').not('div.tab-item-inner:eq(' + index + ')').slideUp(); 273 tab.find('.tab_content').find('div.tab-item-inner:eq(' + index + ')').slideDown(); 274 275 g.preventDefault(); 276 }); 277 278 279 280 /* --------------------------------------------- 281 Date picker 282 --------------------------------------------- */ 283 284 $("#from").datepicker({ 285 defaultDate: "+1w", 286 changeMonth: true, 287 numberOfMonths: 3, 288 onClose: function(selectedDate) { 289 $("#to").datepicker("option", "minDate", selectedDate); 290 } 291 }); 292 $("#to").datepicker({ 293 defaultDate: "+1w", 294 changeMonth: true, 295 numberOfMonths: 3, 296 onClose: function(selectedDate) { 297 $("#from").datepicker("option", "maxDate", selectedDate); 298 } 299 }); 300 301 302 303 304 /* --------------------------------------------- 305 Youtube Video 306 --------------------------------------------- */ 307 var api_key = 'AIzaSyAroKpLQWTON6y34m5VqGcLCPtOmfLBqh4'; // use your own api key 308 309 // Start all players on the page with default options 310 $('.RYPP').rypp('AIzaSyAroKpLQWTON6y34m5VqGcLCPtOmfLBqh4'); // use your own api key 311 312 // Start two players by ID, with default settings 313 $('#rypp-demo-4').rypp(api_key, { 314 autoplay: false, 315 autonext: false, 316 loop: false, 317 mute: true 318 }); 319 320 /* --------------------------------------------- 321 Youtube Video for home page four 322 --------------------------------------------- */ 323 324 $(".arrow-right").bind("click", function(event) { 325 event.preventDefault(); 326 $(".vid-list-container").stop().animate({ 327 scrollLeft: "+=336" 328 }, 750); 329 }); 330 $(".arrow-left").bind("click", function(event) { 331 event.preventDefault(); 332 $(".vid-list-container").stop().animate({ 333 scrollLeft: "-=336" 334 }, 750); 335 }); 336 337 /* --------------------------------------------- 338 youtube video for home page five 339 --------------------------------------------- */ 340 341 $('#player-button').on('click', function(ev) { 342 343 $("#yt")[0].src += "?autoplay=1"; 344 $("#player").hide(); 345 $("#post-info").hide(); 346 ev.preventDefault(); 347 }); 348 349 350 /* --------------------------------------------- 351 tricker animation for home page four 352 --------------------------------------------- */ 353 354 355 function tick() { 356 $('#ticker li:first').animate({ 'opacity': 0 }, 400, function() { 357 $(this).appendTo($('#ticker')).css('opacity', 1); 358 }); 359 } 360 setInterval(function() { tick() }, 3000); 361 362 /* --------------------------------------------- 363 Form 364 --------------------------------------------- */ 365 366 if (!String.prototype.trim) { 367 (function() { 368 // Make sure we trim BOM and NBSP 369 var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; 370 String.prototype.trim = function() { 371 return this.replace(rtrim, ''); 372 }; 373 })(); 374 } 375 [].slice.call(document.querySelectorAll('input.input_field,textarea.input_field')).forEac
375h(function(inputEl) { 376 // in case the input is already filled.. 377 if (inputEl.value.trim() !== '') { 378 classie.add(inputEl.parentNode, 'input--filled'); 379 } 380 // events: 381 inputEl.addEventListener('focus', onInputFocus); 382 inputEl.addEventListener('blur', onInputBlur); 383 }); 384 385 function onInputFocus(ev) { 386 classie.add(ev.target.parentNode, 'input--filled'); 387 } 388 389 function onInputBlur(ev) { 390 if (ev.target.value.trim() === '') { 391 classie.remove(ev.target.parentNode, 'input--filled'); 392 } 393 } 394 395}); 396 397 398 399 400$(window).on({ 401 load: function() { 402 403 /* --------------------------------------------- 404 Scroll Box 405 --------------------------------------------- */ 406 407 $(".mobile-menu").mCustomScrollbar({ theme: "minimal" }); 408 $(".archive-post").mCustomScrollbar({ theme: "minimal-dark" }); 409 410 411 }, 412 413 scroll: function() { 414 415 /* --------------------------------------------- 416 Scroll to Top 417 --------------------------------------------- */ 418 419 if ($(this).scrollTop() !== 0) { 420 $('#toTop').fadeIn(); 421 } else { 422 $('#toTop').fadeOut(); 423 } 424 } 425 426}); 427 428 429 430/* --------------------------------------------- 431 This is for Mobile Menu 432 --------------------------------------------- */ 433 434//Nav Icon at mobile 435$('.nav-icon').on('click', function() { 436 $(this).toggleClass('open'); 437}); 438 439//mobile Menu showLeft at mobile 440var menuLeft = document.getElementById('mobile-menu'), 441 showLeft = document.getElementById('showLeft'), 442 body = document.body; 443var classie; 444 445$('#close-menu').on('click', function() { 446 $('.nav-icon').toggleClass('open'); 447 classie.toggle(showLeft, 'active'); 448 classie.toggle(menuLeft, 'mobile-menu-open'); 449 disableOther('showLeft'); 450 if ($('#showLeft').hasClass("open")) { 451 body.style.overflow = 'hidden' 452 } else { 453 body.style.overflow = 'visible' 454 } 455}); 456 457showLeft.onclick = function() { 458 classie.toggle(this, 'active'); 459 classie.toggle(menuLeft, 'mobile-menu-open'); 460 disableOther('showLeft'); 461 462 if ($('#showLeft').hasClass("open")) { 463 body.style.overflow = 'hidden' 464 } else { 465 body.style.overflow = 'visible' 466 } 467}; 468 469function disableOther(button) { 470 if (button !== 'showLeft') { 471 classie.toggle(showLeft, 'disabled'); 472 } 473}
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.