1// $(window).load(function () { 2// if ("Notification" in window && navigator.serviceWorker) { 3// // Display the UI to let the user toggle notifications 4// Notification.requestPermission(function (status) { 5// console.log("Notification permission status:", status); 6// }); 7// } 8// }); 9 10(function($) { 11 12 "use strict"; 13 14 var cfg = { 15 defAnimation: "fadeInUp", // default css animation 16 scrollDuration: 800, // smoothscroll duration 17 mailChimpURL: 'http://facebook.us8.list-manage.com/subscribe/post?u=cdb7b577e41181934ed6a6a44&id=e65110b38d' 18 }, 19 20 $WIN = $(window); 21 22 23 // Add the User Agent to the <html> 24 // will be used for IE10 detection (Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)) 25 var doc = document.documentElement; 26 $(".lazyload").Lazy(); 27 doc.setAttribute('data-useragent', navigator.userAgent); 28 29 30 /* Preloader 31 * -------------------------------------------------- */ 32 var ssPreloader = function() { 33 34 $WIN.on('load', function() { 35 36 // force page scroll position to top at page refresh 37 /*$('html, body').animate({ scrollTop: 0 }, 'normal');*/ 38 39 // will first fade out the loading animation 40 $("#loader").fadeOut("slow", function() { 41 42 // will fade out the whole DIV that covers the website. 43 $("#preloader").delay(100).fadeOut("slow"); 44 45 }); 46 }); 47 }; 48 49 50 /* FitVids 51 ------------------------------------------------------ */ 52 var ssFitVids = function() { 53 $(".fluid-video-wrapper").fitVids(); 54 }; 55 56 57 /* Masonry 58 ------------------------------------------------------ */ 59 var ssMasonryFolio = function() { 60 61 var containerBricks = $('.bricks-wrapper'); 62 63 containerBricks.imagesLoaded(function() { 64 containerBricks.masonry({ 65 itemSelector: '.brick', 66 resize: true 67 }); 68 }); 69 }; 70 71 72 /* Light Gallery 73 ------------------------------------------------------- */ 74 var ssLightGallery = function() { 75 76 $('#folio-wrap').lightGallery({ 77 showThumbByDefault: false, 78 hash: false, 79 selector: ".item-wrap" 80 }); 81 }; 82 83 84 /* Flexslider 85 * ------------------------------------------------------ */ 86 var ssFlexSlider = function() { 87 88 $WIN.on('load', function() { 89 90 $('#testimonial-slider').flexslider({ 91 namespace: "flex-", 92 controlsContainer: "", 93 animation: 'slide', 94 controlNav: true, 95 directionNav: false, 96 smoothHeight: true, 97 slideshowSpeed: 7000, 98 animationSpeed: 600, 99 randomize: false, 100 touch: true, 101 }); 102 103 }); 104 105 }; 106 107 108 /* Carousel 109 * ------------------------------------------------------ */ 110 var ssOwlCarousel = function() { 111 112 $(".owl-carousel").owlCarousel({ 113 nav: false, 114 loop: true, 115 margin: 50, 116 responsiveClass: true, 117 responsive: { 118 0: { 119 items: 2, 120 margin: 20 121 }, 122 400: { 123 items: 3, 124 margin: 30 125 }, 126 600: { 127 items: 4, 128 margin: 40 129 }, 130 1000: { 131 items: 6 132 } 133 } 134 }); 135 136 }; 137 138 139 140 /* Menu on Scrolldown 141 * ------------------------------------------------------ */ 142 var ssMenuOnScrolldown = function() { 143 144 var menuTrigger = $('#header-menu-trigger'); 145 146 $WIN.on('scroll', function() { 147 148 if ($WIN.scrollTop() > 150) { 149 menuTrigger.addClass('opaque'); 150 } else { 151 menuTrigger.removeClass('opaque'); 152 } 153 154 }); 155 }; 156 157 158 /* OffCanvas Menu 159 * ------------------------------------------------------ */ 160 var ssOffCanvas = function() { 161 162 var menuTrigger = $('#header-menu-trigger'), 163 nav = $('#menu-nav-wrap'), 164 closeButton = nav.find('.close-button'), 165 siteBody = $('body'), 166 mainContents = $('section, footer'); 167 168 // open-close menu by clicking on the menu icon 169 menuTrigger.on('click', function(e) { 170 e.preventDefault();
171 menuTrigger.toggleClass('is-clicked'); 172 siteBody.toggleClass('menu-is-open'); 173 }); 174 175 // close menu by clicking the close button 176 closeButton.on('click', function(e) { 177 e.preventDefault(); 178 menuTrigger.trigger('click'); 179 }); 180 181 // close menu clicking outside the menu itself 182 siteBody.on('click', function(e) { 183 if (!$(e.target).is('#menu-nav-wrap, #header-menu-trigger, #header-menu-trigger span')) { 184 menuTrigger.removeClass('is-clicked'); 185 siteBody.removeClass('menu-is-open'); 186 } 187 }); 188 189 }; 190 191 192 /* Smooth Scrolling 193 * ------------------------------------------------------ */ 194 var ssSmoothScroll = function() { 195 196 $('.smoothscroll').on('click', function(e) { 197 var target = this.hash, 198 $target = $(target); 199 200 e.preventDefault(); 201 e.stopPropagation(); 202 203 $('html, body').stop().animate({ 204 'scrollTop': $target.offset().top 205 }, cfg.scrollDuration, 'swing').promise().done(function() { 206 207 // check if menu is open 208 if ($('body').hasClass('menu-is-open')) { 209 $('#header-menu-trigger').trigger('click'); 210 } 211 212 window.location.hash = target; 213 }); 214 }); 215 216 }; 217 218 219 /* Placeholder Plugin Settings 220 * ------------------------------------------------------ */ 221 var ssPlaceholder = function() { 222 $('input, textarea, select').placeholder(); 223 }; 224 225 226 /* Alert Boxes 227 ------------------------------------------------------- */ 228 var ssAlertBoxes = function() { 229 230 $('.alert-box').on('click', '.close', function() { 231 $(this).parent().fadeOut(500); 232 }); 233 234 }; 235 236 237 /* Animations 238 * ------------------------------------------------------- */ 239 var ssAnimations = function() { 240 241 if (!$("html").hasClass('no-cssanimations')) { 242 $('.animate-this').waypoint({ 243 handler: function(direction) { 244 245 var defAnimationEfx = cfg.defAnimation; 246 247 if (direction === 'down' && !$(this.element).hasClass('animated')) { 248 $(this.element).addClass('item-animate'); 249 250 setTimeout(function() { 251 $('body .animate-this.item-animate').each(function(ctr) { 252 var el = $(this), 253 animationEfx = el.data('animate') || null; 254 255 if (!animationEfx) { 256 animationEfx = defAnimationEfx; 257 } 258 259 setTimeout(function() { 260 el.addClass(animationEfx + ' animated'); 261 el.removeClass('item-animate'); 262 }, ctr * 30); 263 264 }); 265 }, 100); 266 } 267 268 // trigger once only 269 this.destroy(); 270 }, 271 offset: '95%' 272 }); 273 } 274 275 }; 276 277 278 /* Intro Animation 279 * ------------------------------------------------------- */ 280 var ssIntroAnimation = function() { 281 282 $WIN.on('load', function() { 283 284 if (!$("html").hasClass('no-cssanimations')) { 285 setTimeout(function() { 286 $('.animate-intro').each(function(ctr) { 287 var el = $(this), 288 animationEfx = el.data('animate') || null; 289 290 if (!animationEfx) { 291 animationEfx = cfg.defAnimation; 292 } 293 294 setTimeout(function() { 295 el.addClass(animationEfx + ' animated'); 296 }, ctr * 300); 297 }); 298 }, 100); 299 } 300 }); 301 302 }; 303 304 305 /* Contact Form 306 * ------------------------------------------------------ */ 307 var ssContactForm = function() { 308 309 /* local validation */ 310 $('#contactForm').validate({ 311 312 /* submit via ajax */ 313 submitHandler: function(form) { 314 var sLoader = $('#submit-loader'); 315 316 $.ajax({
317 type: "POST", 318 url: "inc/sendEmail.php", 319 data: $(form).serialize(), 320 321 beforeSend: function() { 322 sLoader.fadeIn(); 323 }, 324 success: function(msg) { 325 // Message was sent 326 if (msg == 'OK') { 327 sLoader.fadeOut(); 328 $('#message-warning').hide(); 329 $('#contactForm').fadeOut(); 330 $('#message-success').fadeIn(); 331 } 332 // There was an error 333 else { 334 sLoader.fadeOut(); 335 $('#message-warning').html(msg); 336 $('#message-warning').fadeIn(); 337 } 338 }, 339 error: function() { 340 sLoader.fadeOut(); 341 $('#message-warning').html("Something went wrong. Please try again."); 342 $('#message-warning').fadeIn(); 343 } 344 }); 345 } 346 347 }); 348 }; 349 350 351 /* AjaxChimp 352 * ------------------------------------------------------ */ 353 var ssAjaxChimp = function() { 354 355 $('#mc-form').ajaxChimp({ 356 language: 'es', 357 url: cfg.mailChimpURL 358 }); 359 360 // Mailchimp translation 361 // 362 // Defaults: 363 // 'submit': 'Submitting...', 364 // 0: 'We have sent you a confirmation email', 365 // 1: 'Please enter a value', 366 // 2: 'An email address must contain a single @', 367 // 3: 'The domain portion of the email address is invalid (the portion after the @: )', 368 // 4: 'The username portion of the email address is invalid (the portion before the @: )', 369 // 5: 'This email address looks fake or invalid. Please enter a real email address' 370 371 $.ajaxChimp.translations.es = { 372 'submit': 'Submitting...', 373 0: '<i class="fa fa-check"></i> We have sent you a confirmation email', 374 1: '<i class="fa fa-warning"></i> You must enter a valid e-mail address.', 375 2: '<i class="fa fa-warning"></i> E-mail address is not valid.', 376 3: '<i class="fa fa-warning"></i> E-mail address is not valid.', 377 4: '<i class="fa fa-warning"></i> E-mail address is not valid.', 378 5: '<i class="fa fa-warning"></i> E-mail address is not valid.' 379 } 380 381 }; 382 383 384 /* Back to Top 385 * ------------------------------------------------------ */ 386 var ssBackToTop = function() { 387 388 var pxShow = 500, // height on which the button will show 389 fadeInTime = 400, // how slow/fast you want the button to show 390 fadeOutTime = 400, // how slow/fast you want the button to hide 391 scrollSpeed = 300, // how slow/fast you want the button to scroll to top. can be a value, 'slow', 'normal' or 'fast' 392 goTopButton = $("#go-top") 393 394 // Show or hide the sticky footer button 395 $(window).on('scroll', function() { 396 if ($(window).scrollTop() >= pxShow) { 397 goTopButton.fadeIn(fadeInTime); 398 } else { 399 goTopButton.fadeOut(fadeOutTime); 400 } 401 }); 402 }; 403 404 405 406 /* Initialize 407 * ------------------------------------------------------ */ 408 (function ssInit() { 409 410 ssPreloader(); 411 ssFitVids(); 412 ssMasonryFolio(); 413 ssLightGallery(); 414 ssFlexSlider(); 415 ssOwlCarousel(); 416 ssMenuOnScrolldown(); 417 ssOffCanvas(); 418 ssSmoothScroll(); 419 ssPlaceholder(); 420 ssAlertBoxes(); 421 ssAnimations(); 422 ssIntroAnimation(); 423 ssContactForm(); 424 ssAjaxChimp(); 425 ssBackToTop(); 426 427 })(); 428 429 430})(jQuery); 431 432var camp = document.getElementById('but'); 433var c = 0; 434 435function fun() { 436 if (c % 2 == 1) { 437 camp.style.opacity = "100"; 438 setTimeout(function() { camp.style.opacity = "0"; }, 3300); 439 setTimeout(function() { 440 camp.innerText = 'Register for E-Summit' + 441 "'19 "; 442 var icon = document.createElement("i"); 443 icon.setAttribute("class", "fa fa-share"); 444 but.appendChild(icon); 445 }, 3600); 446 c++; 447 448 } else { 449 camp.style.opacity = "100"; 450 setTimeout(function() { camp.style.opacity = "0"; }, 3300); 451 setTimeout(function() { 452 camp.innerText = 'Myriad Of Mavericks'; 453 var icon = document.createElement("i"); 454 icon.setAttribute("class", "fa fa-share"); 455 but.appendChild(icon); 456 }, 3600); 457 c++; 458 459 } 460}
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.