1/* 2Name: Theme Initializer 3Written by: JanXcode Themes - (http://www.janxcode.com) 4Version: 1.0 5*/ 6 7(function() { 8 9 "use strict"; 10 11 var Theme = { 12 13 initialized: false, 14 15 initialize: function() { 16 17 if (this.initialized) return; 18 this.initialized = true; 19 20 this.build(); 21 this.events(); 22 23 }, 24 25 build: function() { 26 27 //Items on ready 28 this.onReady(); 29 30 //Items on load 31 this.onLoad(); 32 33 // Nav Menu 34 this.stickyMenu(); 35 36 //Mobile Menu 37 jQuery('.jx-evont-mainmenu').slicknav(); 38 39 // ScrollTop 40 this.scrollTop(); 41 42 // Word Rotate 43 this.wordAnimate(); 44 45 // Animation 46 this.animation(); 47 48 // Toggle 49 this.toggle(); 50 51 // Tabs 52 this.tabs(); 53 54 // Lightbox 55 this.prettyPhoto(); 56 57 // Parallax 58 this.parallax(); 59 60 //Counter 61 this.counter(); 62 63 //Alert 64 this.alertBox(); 65 66 //FlipBox 67 this.flipbox(); 68 69 70 //Theme Styler 71 //this.themestyler(); 72 73 }, 74 75 events: function() { 76 77 // Window Resize 78 jQuery(window).afterResize(function() { 79 80 // Revolution Slider Fix 81 Theme.fixRevolutionSlider(); 82 83 }); 84 85 86 }, 87 88 89 //Items on Ready 90 onReady: function(){ 91 92 93 jQuery(document).ready(function(){ 94 95 96 jQuery('#mailchimp-sign-up p').hide(); 97 98 if (jQuery(".select-box").length > 0){ 99 jQuery(".select-box").selectbox(); 100 } 101 102 103 jQuery('.jx-evont-service-content table tr').filter( 104 function(){ 105 return jQuery(this).find('td').length == jQuery(this).find('td:empty').length; 106 }).remove(); 107 108 /*Point of interest */ 109 //open interest point description 110 jQuery('.jx-evont-single-point').children('a').on('click', function(){ 111 var selectedPoint = jQuery(this).parent('li'); 112 if( selectedPoint.hasClass('is-open') ) { 113 selectedPoint.removeClass('is-open').addClass('visited'); 114 } else { 115 selectedPoint.addClass('is-open').siblings('.jx-evont-point.is-open').removeClass('is-open').addClass('visited'); 116 } 117 }); 118 119 //close interest point description 120 jQuery('.jx-evont-close-info').on('click', function(event){ 121 event.preventDefault(); 122 jQuery(this).parents('.jx-evont-single-point').eq(0).removeClass('is-open').addClass('visited'); 123 }); 124 125 126 var words = jQuery(".jx-evont-counter-up-box").text().split(""); 127 jQuery(".jx-evont-counter-up-box").empty(); 128 jQuery.each(words, function(i, v) { 129 130 if(v==','){ 131 jQuery(".jx-evont-counter-up-box").append(jQuery("<span class='comma'>").text(v)); 132 }else{ 133 jQuery(".jx-evont-counter-up-box").append(jQuery("<span class='jx-evont-counter-up-stat'>").text(v)); 134 } 135 }); 136 if (jQuery(".jx-evont-counter-up-stat").length > 0){ 137 jQuery(".jx-evont-counter-up-stat").counterUp({ 138 delay: 10, 139 time: 1000 140 }); 141 } 142 143 144 ///Count Down 145 if (jQuery(".jx_evont_countdown").length > 0){ 146 147 var time_1 = jQuery( ".jx_evont_countdown" ).data( "time" ); 148 149 150 jQuery(".jx_evont_countdown .countdown").jCounter({ 151 date: time_1,//time_1.replace(/\-/g, " "), 152 timezone: "Europe/Bucharest", 153 serverDateSource: "/wp-content/themes/evont/dateandtime.php", 154 format: "dd:hh:mm:ss", 155 twoDigits: 'on', 156 fallback: function() { console.log("Counter finished!") } 157 }); 158 } 159 160 //Sidebar 161 jQuery('#sidebar').theiaStickySidebar({ 162 additionalMarginTop: 30 163 }); 164 165 166 //Mobile Menu 167 jQuery('.slicknav_nav li.col > ul').children().unwrap(); 168 //jQuery('.slicknav_nav ul li ul a').children().unwrap(); 169 jQuery('.submenu .submenu .slicknav_parent > a.slicknav_item').remove(); 170 jQuery('.submenu .submenu .slicknav_parent > ul').css({'display':'block'}); 171 172 173 //Mobile Chk 174 var isMobile = { 175 Android: function() { 176 return navigator.userAgent.match(/Android/i); 177 }, 178 BlackBerry: function() { 179 return navigator.userAgent.match(/BlackBerry/i); 180 }, 181 iOS: function() { 182 return navigator.userAgent.match(/iPhone|iPad|iPod/i); 183 }, 184 Opera: function() { 185 return navigator.userAgent.match(/Opera Mini/i); 186 }, 187 Windows: function() { 188 return navigator.userAgent.match(/IEMobile/i); 189 }, 190 any: function() { 191 return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); 192 } 193 }; 194 195 if( isMobile.any() ) { 196 jQuery('.jx-evont-rev-slider-holder').removeClass('jx-evont-animate-header'); 197 } 198 199 }); 200 201 var $messages = jQuery('.jx-evont-status-message'); 202 203 //Form validator 204 jQuery.validate({ 205 modules : 'toggleDisabled', 206 errorMessagePosition : $messages, 207 disabledFormFilter : 'form.toggle-disabled', 208 showErrorDialogs : false 209 }); 210 211 212 // Menu Active 213 var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/")+1); 214 jQuery(".menu > li").each(function(){ 215 if(jQuery(this).find("a").attr("href") == pgurl || jQuery(this).find("a").attr("href") == '' ) 216 jQuery(this).addClass("active"); 217 }); 218 219 220 221 //Login & Registeration 222 jQuery('#pop_login, #pop_signup').live('click', function (e) { 223 formToFadeOut = jQuery('form#register'); 224 formtoFadeIn = jQuery('form#login'); 225 if (jquery(this).attr('id') == 'pop_signup') { 226 formToFadeOut = jQuery('form#login'); 227 formtoFadeIn = jQuery('form#register'); 228 229 230 } 231 formToFadeOut.fadeOut(500, function () { 232 formtoFadeIn.fadeIn(); 233 }) 234 return false;
235 }); 236 237 // Close popup 238 jQuery(document).on('click', '.bg_overlay, .close', function () { 239 jQuery('form#login, form#register, .jx-modalbox').fadeOut(500, function () { 240 jQuery('.bg_overlay').remove(); 241 }); 242 return false; 243 }); 244 245 // Show the login/signup popup on click 246 jQuery('.show_login, .show_signup, .jx-modal-btn').on('click', function (e) { 247 248 if(jQuery('.bg_overlay').length > 0){ 249 250 }else{ 251 jQuery('body').prepend('<div class="bg_overlay"></div>'); 252 } 253 254 if ((jQuery(this).attr('id') == 'show_login_button') || (jQuery(this).attr('id') == 'show_login')) { 255 jQuery('form#login').fadeIn(500); 256 jQuery('form#register').fadeOut(500); 257 }else { 258 jQuery('form#register').fadeIn(500); 259 jQuery('form#login').fadeOut(500); 260 } 261 262 e.preventDefault(); 263 }); 264 265 //Mailchimp 266 jQuery('form#mailchimp').submit(function(e) { 267 e.preventDefault(); 268 269 var successMSG = "<p>You've been added to our sign-up list.<br />We have sent an email, asking you to confirm the same.</p>"; 270 var errorMSG = "<p>There was an error. Please try again.</p>"; 271 var invalidEmailMSG = "<p>That does not look like a valid email.</p>"; 272 var alreadySubscribedMSG = "<p>You have already subscribed to our sign-up list.</p>"; 273 274 jQuery('.ajax-loader').show(); 275 276 jQuery(this).ajaxSubmit({ 277 success : function (responseText) { 278 if (responseText === 'added') { 279 jQuery('#mailchimp-sign-up p').show(); 280 jQuery('form#mailchimp').fadeOut('fast'); 281 jQuery('#mailchimp-sign-up p').replaceWith(successMSG).fadeIn('slow'); 282 } else if (responseText === 'already subscribed') { 283 jQuery('#mailchimp-sign-up p').show(); 284 jQuery('form#mailchimp').fadeOut('fast'); 285 jQuery('#mailchimp-sign-up p').replaceWith(alreadySubscribedMSG).fadeIn('slow'); 286 } else if (responseText === 'invalid email') { 287 jQuery('#mailchimp-sign-up p').show(); 288 jQuery('#mailchimp-sign-up p').replaceWith(invalidEmailMSG).fadeIn('slow'); 289 } else { 290 jQuery('#mailchimp-sign-up p').show(); 291 jQuery('#mailchimp-sign-up p').replaceWith(errorMSG).fadeIn('slow'); 292 } 293 jQuery('.ajax-loader').hide(); 294 }, 295 url : ajaxVars.ajaxurl, 296 data : { ajax_nonce : ajaxVars.ajax_nonce, action : 'add_to_mailchimp_list' }, 297 type : 'POST', 298 timeout : 50000, 299 }); 300 }); 301 302 303 //Woocommerce QTY. 304 jQuery(".product_quantity_minus").click(function(e){ 305 var quantityInput = jQuery(this).closest(".quantity").children("input"); 306 var currentQuantity = parseInt(jQuery(quantityInput).val()); 307 var newQuantity = ( currentQuantity > 1 ) ? ( currentQuantity - 1) : 1; 308 jQuery(quantityInput).val(newQuantity); 309 }); 310 311 jQuery(".product_quantity_plus").click(function(e){ 312 var max_quantity = 99999; 313 var quantityInput = jQuery(this).closest(".quantity").children("input"); 314 var currentQuantity = parseInt(jQuery(quantityInput).val()); 315 var newQuantity = ( currentQuantity >= max_quantity ) ? max_quantity : ( currentQuantity+1 ); 316 jQuery(quantityInput).val(newQuantity); 317 }); 318 319 // Perform AJAX login/register on form submit 320 jQuery('form#login, form#register').on('submit', function (e) { 321 if (!jQuery(this).valid()) return false; 322 jQuery('p.status', this).show().text(ajax_auth_object.loadingmessage); 323 action = 'ajaxlogin'; 324 username = jQuery('form#login #username').val(); 325 password = jQuery('form#login #password').val(); 326 email = ''; 327 security = jQuery('form#login #security').val(); 328 if (jQuery(this).attr('id') == 'register') { 329 action = 'ajaxregister'; 330 username = jQuery('#signonname').val(); 331 password = jQuery('#signonpassword').val(); 332 email = jQuery('#email').val(); 333 security = jQuery('#signonsecurity').val(); 334 } 335 ctrl = jQuery(this); 336 jQuery.ajax({ 337 type: 'POST', 338 dataType: 'json', 339 url: ajax_auth_object.ajaxurl, 340 data: { 341 'action': action, 342 'username': username, 343 'password': password, 344 'email': email, 345 'security': security 346 }, 347 success: function (data) { 348 jQuery('p.status', ctrl).text(data.message); 349 if (data.loggedin == true) { 350 document.location.href = ajax_auth_object.redirecturl; 351 } 352 } 353 }); 354 e.preventDefault(); 355 }); 356 357 358 }, 359 //Items on windows load 360 onLoad: function(){ 361 362 jQuery(window).on("load",function(){ 363 364 "use strict"; 365 jQuery('.spinner').fadeOut(); // will first fade out the loading animation 366 jQuery('.loader').delay(350).fadeOut('slow'); // will fade out the white DIV that covers the website. 367 jQuery('body').delay(350).css({'overflow':'visible'}); 368 369 370 371 372 [].slice.call(document.querySelectorAll('img.tilt-effect')).forEac
372h(function(img) { 373 new TiltFx(img, JSON.parse(img.getAttribute('data-tilt-options'))); 374 }); 375 376 377 /* Page Scroll to id fn call */ 378 jQuery("a[href='#top'],.menu li a").mPageScroll2id({ 379 highlightSelector:".menu li a" 380 }); 381 382 383 384 /*Flexslider*/ 385 jQuery('.jx-evont-blog-1 .flexslider,.jx-evont-image-holder .flexslider').flexslider({ 386 animation: "slide", 387 directionNav:false, 388 slideshowSpeed:"8000" 389 }); 390 391 /*Flexslider*/ 392 jQuery('.jx-evont-blog-2 .flexslider').flexslider({ 393 animation: "slide", 394 directionNav:true, 395 slideshowSpeed:"8000", 396 prevText:'', 397 nextText:'' 398 399 }); 400 401 /*Service Flexslider*/ 402 jQuery('.jx-evont-slider.flexslider').flexslider({ 403 animation: "slide", 404 directionNav:false, 405 slideshowSpeed:"8000" 406 }); 407 408 409 410 /*Projects Flexslider*/ 411 jQuery('.jx-evont-protfolio-details #slider').flexslider({ 412 animation: "slide", 413 directionNav:false, 414 slideshowSpeed:"8000" 415 }); 416 417 jQuery('.jx-evont-protfolio-details #carousel').flexslider({ 418 animation: "slide", 419 controlNav: false, 420 animationLoop: false, 421 slideshow: false, 422 itemWidth: 153, 423 asNavFor: '#slider', 424 prevText:'', 425 nextText:'' 426 }); 427 428 429 //Owl Testimonial 430 var owl_t = jQuery(".jx-testimonial-1 #testimonials"); 431 432 owl_t.owlCarousel({ 433 items : 2, //10 items above 1000px browser width 434 itemsDesktop : [1000,2], //5 items between 1000px and 901px 435 itemsDesktopSmall : [900,2], // betweem 900px and 601px 436 itemsTablet: [600,1], //2 items between 600 and 0 437 itemsMobile : false, // itemsMobile disabled - inherit from itemsTablet option 438 responsive:{ 439 0:{ 440 items:1, 441 nav:false 442 }, 443 600:{ 444 items:2, 445 nav:false 446 }, 447 1000:{ 448 items:2 449 } 450 } 451 }); 452 453 // Custom Navigation Events 454 jQuery(".customNavigation .next").click(function(){ 455 owl_t.trigger('next.owl.carousel'); 456 }) 457 jQuery(".customNavigation .prev").click(function(){ 458 owl_t.trigger('prev.owl.carousel'); 459 }) 460 461 //EOF 462 463 //Partners Slider 464 var owl_p = jQuery(".jx-evont-partnerslide #partner-slider"); 465 466 owl_p.owlCarousel({ 467 items : 4, //10 items above 1000px browser width 468 itemsDesktop : [1000,4], //5 items between 1000px and 901px 469 itemsDesktopSmall : [900,4], // betweem 900px and 601px 470 itemsTablet: [600,1], //2 items between 600 and 0 471 itemsMobile : false, // itemsMobile disabled - inherit from itemsTablet option 472 dots:false, 473 responsive:{ 474 0:{ 475 items:1, 476 nav:false 477 }, 478 600:{ 479 items:2, 480 nav:false 481 }, 482 1000:{ 483 items:4 484 } 485 } 486 }); 487 488 489 //Exchange rate 490 //Partners Slider 491 var owl_e = jQuery("#exrates-slider"); 492 493 owl_e.owlCarousel({ 494 items : 4, //10 items above 1000px browser width 495 itemsDesktop : [1000,4], //5 items between 1000px and 901px 496 itemsDesktopSmall : [900,4], // betweem 900px and 601px 497 itemsTablet: [600,1], //2 items between 600 and 0 498 itemsMobile : false, // itemsMobile disabled - inherit from itemsTablet option 499 autoplay:true, 500 autoplayTimeout:1000, 501 autoplayHoverPause:true, 502 loop:true, 503 dots:false, 504 responsive:{ 505 0:{ 506 items:1, 507 nav:false 508 }, 509 600:{ 510 items:2, 511 nav:false 512 }, 513 1000:{ 514 items:4 515 } 516 } 517 }); 518 519 if (jQuery(window).height() < 850){ 520 521 jQuery('.jx-evont-parallax-fullwidth').css({'height':'auto'}); 522 jQuery('.jx-evont-parallax-fullwidth .slides > li').css({'height':'auto'}); 523 }else{ 524 jQuery('.jx-evont-parallax-fullwidth').css({'height':((jQuery(window).height()))+'px'}); 525 jQuery('.jx-evont-parallax-fullwidth .slides > li').css({'height':((jQuery(window).height()))+'px'}); 526 } 527 528 529 getWidthAndHeight(); 530 531 function getWidthAndHeight (){ 532 var winWidth = jQuery(window).width(); 533 var winHeight = jQuery(window).height();
534 jQuery('.jx-evont-middle').css({'height': winHeight}); 535 536 jQuery('.jx-evont-middle').each(function(){ 537 var $pa = jQuery(this); 538 var $ch = $pa.find('.main-content-slider'); 539 var paH = $pa.innerHeight(); 540 var chH = $ch.innerHeight(); 541 542 $ch.css({marginTop: (paH-chH)/2}); 543 544 }); 545 } 546 547 jQuery(window).resize(function(){ // On resize 548 549 550 551 if (jQuery(window).height() < 850){ 552 jQuery('.jx-evont-parallax-fullwidth').css({'height':'100%'}); 553 }else{ 554 jQuery('.jx-evont-parallax-fullwidth').css({'height':((jQuery(window).height()))+'px'}); 555 } 556 557 558 getWidthAndHeight(); 559 560 function getWidthAndHeight (){ 561 var winWidth = jQuery(window).width(); 562 var winHeight = jQuery(window).height(); 563 jQuery('.jx-evont-middle').css({'height': winHeight}); 564 565 jQuery('.jx-evont-middle').each(function(){ 566 var $pa = jQuery(this); 567 var $ch = $pa.find('.main-content-slider'); 568 var paH = $pa.innerHeight(); 569 var chH = $ch.innerHeight(); 570 571 $ch.css({marginTop: (paH-chH)/2}); 572 573 }); 574 } 575 576 577 578 }); 579 580 }); 581 582 }, 583 584 stickyMenu: function() { 585 //Menu 586 var s = jQuery(".jx-evont-sticky"); 587 var pos = s.position(); 588 var top = s.css('top'); 589 var home_slider = jQuery('.main-titlebar'); 590 var count_down = jQuery('.jx-evont-counting-down'); 591 var page_titlebar = jQuery('.jx-evont-common_page_header'); 592 var page_titlebar_title = jQuery('.jx-evont-page-titlebar .jx-evont-titlebar'); 593 594 var count_down_margintop= count_down.css('marginTop'); 595 //Page Header 596 var nav_height = s.height(); 597 598 jQuery(window).on("scroll",function() { 599 600 var scroll = getCurrentScroll(); 601 602 603 if ((s.length >0)){ 604 605 if ( scroll >= pos.top+1){ 606 s.addClass('fixed'); 607 608 //Home slider 609 if (home_slider.length > 0){ 610 //home_slider.css({'marginTop':nav_height}); 611 count_down.css({'marginTop':count_down_margintop+nav_height}); 612 } 613 614 //Page titlebar 615 if (page_titlebar.length > 0){ 616 page_titlebar.css({'marginTop':nav_height}); 617 //page_titlebar_title.css({'paddingTop':'29px'}); 618 } 619 620 }else{ 621 s.removeClass('fixed'); 622 623 //Home slider 624 if (home_slider.length > 0){ 625 //home_slider.css({'marginTop':0}); 626 count_down.css({'marginTop':count_down_margintop+0}); 627 } 628 629 //Page titlebar 630 if (page_titlebar.length > 0){ 631 page_titlebar.css({'marginTop':0}); 632 //page_titlebar_title.css({'paddingTop':'29px'}); 633 } 634 } 635 636 } 637 638 639 }); 640 641 642 function getCurrentScroll() { 643 return window.pageYOffset || document.documentElement.scrollTop; 644 } 645 646 }, 647 648 animation:function(){ 649 650 // Animation Appear 651 jQuery("[data-appear-animation]").each(function($) { 652 653 var $this = $(this); 654 655 $this.addClass("appear-animation"); 656 657 if(!$("html").hasClass("no-csstransitions") && $(window).width() > 767) { 658 659 $this.appear(function() { 660 661 var delay = ($this.attr("data-appear-animation-delay") ? $this.attr("data-appear-animation-delay") : 1); 662 663 if(delay > 1) $this.css("animation-delay", delay + "ms"); 664 $this.addClass($this.attr("data-appear-animation")); 665 666 setTimeout(function() { 667 $this.addClass("appear-animation-visible"); 668 }, delay); 669 670 }, {accX: 0, accY: -150}); 671 672 } else { 673 674 $this.addClass("appear-animation-visible"); 675 676 } 677 678 }); 679 680 681 //Sill Bar 682 // Animation Progress Bars 683 jQuery("[data-progress-animate]").each(function() { 684 685 var $this = jQuery(this); 686 687 $this.appear(function() { 688 689 var delay = ($this.attr("data-appear-animation-delay") ? $this.attr("data-appear-animation-delay") : 1); 690 691 if(delay > 1) $this.css("animation-delay", delay + "ms"); 692 $this.addClass($this.attr("data-appear-animation")); 693 694 setTimeout(function() { 695 696 $this.animate( 697 { 698 width: $this.attr("data-progress-animate") 699 }, 1500, "easeOutQuad", function() { 700 $this.find(".percenttext").animate({opacity: 1,left:$this.attr("data-progress-animate")}, 500, "easeOutQuad"); 701 }); 702 703 }, delay); 704 705 }
705, {accX: 0, accY: -50}); 706 707 }); 708 709 710 //circle Progressbar 711 jQuery('.circliful').appear(); 712 713 }, 714 715 fixRevolutionSlider: function() { 716 717 jQuery(".revslider-initialised").each(function() { 718 try{ 719 $(this).revredraw(); 720 } catch(e) {} 721 }); 722 723 }, 724 725 scrollTop: function(){ 726 727 jQuery.scrollUp({ 728 scrollName: 'scrollUp', // Element ID 729 scrollDistance: 300, // Distance from top/bottom before showing element (px) 730 scrollFrom: 'top', // 'top' or 'bottom' 731 scrollSpeed: 300, // Speed back to top (ms) 732 easingType: 'linear', // Scroll to top easing (see http://easings.net/) 733 animation: 'fade', // Fade, slide, none 734 animationInSpeed: 200, // Animation in speed (ms) 735 animationOutSpeed: 200, // Animation out speed (ms) 736 scrollTitle: false, // Set a custom <a> title if required. Defaults to scrollText 737 scrollImg: false, // Set true to use image 738 activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF' 739 zIndex: 2147483647 // Z-Index for the overlay 740 }); 741 742 jQuery(function($){ 743 jQuery('.destroy').on("click",function($){ 744 $.scrollUp.destroy(); 745 }) 746 }); 747 748 }, 749 wordAnimate: function(){ 750 //set animation timing 751 var animationDelay = 2500, 752 //loading bar effect 753 barAnimationDelay = 3800, 754 barWaiting = barAnimationDelay - 3000, //3000 is the duration of the transition on the loading bar - set in the scss/css file 755 //letters effect 756 lettersDelay = 50, 757 //type effect 758 typeLettersDelay = 150, 759 selectionDuration = 500, 760 typeAnimationDelay = selectionDuration + 800, 761 //clip effect 762 revealDuration = 600, 763 revealAnimationDelay = 1500; 764 765 initHeadline(); 766 767 768 function initHeadline() { 769 //insert <i> element for each letter of a changing word 770 singleLetters(jQuery('.jx-evont-headline.letters').find('b')); 771 //initialise headline animation 772 animateHeadline(jQuery('.jx-evont-headline')); 773 } 774 775 function singleLetters($words) { 776 $words.each(function(){ 777 var i; 778 var word = jQuery(this),
779 letters = word.text().split(''), 780 selected = word.hasClass('is-visible'); 781 for (i in letters) { 782 if(word.parents('.rotate-2').length > 0) letters[i] = letters[i]; 783 letters[i] = (selected) ? '<i class="in">' + letters[i] + '</i>': '<i>' + letters[i] + '</i>'; 784 } 785 var newLetters = letters.join(''); 786 word.html(newLetters).css('opacity', 1); 787 }); 788 } 789 790 function animateHeadline($headlines) { 791 var duration = animationDelay; 792 $headlines.each(function(){ 793 var headline = jQuery(this); 794 795 if(headline.hasClass('loading-bar')) { 796 duration = barAnimationDelay; 797 setTimeout(function(){ headline.find('.jx-evont-words-wrapper').addClass('is-loading') }, barWaiting); 798 } else if (headline.hasClass('clip')){ 799 var spanWrapper = headline.find('.jx-evont-words-wrapper'), 800 newWidth = spanWrapper.width() + 10 801 spanWrapper.css('width', newWidth); 802 } else if (!headline.hasClass('type') ) { 803 //assign to .jx-evont-words-wrapper the width of its longest word 804 var words = headline.find('.jx-evont-words-wrapper b'), 805 width = 0; 806 words.each(function(){ 807 var wordWidth = jQuery(this).width(); 808 if (wordWidth > width) width = wordWidth; 809 }); 810 headline.find('.jx-evont-words-wrapper').css('width', width); 811 }; 812 813 //trigger animation 814 setTimeout(function(){ hideWord( headline.find('.is-visible').eq(0) ) }, duration); 815 }); 816 } 817 818 function hideWord($word) { 819 var nextWord = takeNext($word); 820 821 if($word.parents('.jx-evont-headline').hasClass('type')) { 822 var parentSpan = $word.parent('.jx-evont-words-wrapper'); 823 parentSpan.addClass('selected').removeClass('waiting'); 824 setTimeout(function(){ 825 parentSpan.removeClass('selected'); 826 $word.removeClass('is-visible').addClass('is-hidden').children('i').removeClass('in').addClass('out'); 827 }, selectionDuration); 828 setTimeout(function(){ showWord(nextWord, typeLettersDelay) }, typeAnimationDelay); 829 830 } else if($word.parents('.jx-evont-headline').hasClass('letters')) { 831 var bool = ($word.children('i').length >= nextWord.children('i').length) ? true : false; 832 hideLetter($word.find('i').eq(0), $word, bool, lettersDelay); 833 showLetter(nextWord.find('i').eq(0), nextWord, bool, lettersDelay); 834 835 } else if($word.parents('.jx-evont-headline').hasClass('clip')) { 836 $word.parents('.jx-evont-words-wrapper').animate({ width : '2px' }, revealDuration, function(){ 837 switchWord($word, nextWord); 838 showWord(nextWord); 839 }); 840 841 } else if ($word.parents('.jx-evont-headline').hasClass('loading-bar')){ 842 $word.parents('.jx-evont-words-wrapper').removeClass('is-loading'); 843 switchWord($word, nextWord); 844 setTimeout(function(){ hideWord(nextWord) }, barAnimationDelay); 845 setTimeout(function(){ $word.parents('.jx-evont-words-wrapper').addClass('is-loading') }, barWaiting); 846 847 } else { 848 switchWord($word, nextWord); 849 setTimeout(function(){ hideWord(nextWord) }, animationDelay); 850 } 851 } 852 853 function showWord($word, $duration) { 854 if($word.parents('.jx-evont-headline').hasClass('type')) { 855 showLetter($word.find('i').eq(0), $word, false, $duration); 856 $word.addClass('is-visible').removeClass('is-hidden'); 857 858 } else if($word.parents('.jx-evont-headline').hasClass('clip')) { 859 $word.parents('.jx-evont-words-wrapper').animate({ 'width' : $word.width() + 10 }, revealDuration, function(){ 860 setTimeout(function(){ hideWord($word) }, revealAnimationDelay); 861 }); 862 } 863 } 864 865 function hideLetter($letter, $word, $bool, $duration) { 866 $letter.removeClass('in').addClass('out'); 867 868 if(!$letter.is(':last-child')) { 869 setTimeout(function(){ hideLetter($letter.next(), $word, $bool, $duration); }, $duration); 870 } else if($bool) { 871 setTimeout(function(){ hideWord(takeNext($word)) }, animationDelay); 872 } 873 874 if($letter.is(':last-child') && jQuery('html').hasClass('no-csstransitions')) { 875 var nextWord = takeNext($word); 876 switchWord($word, nextWord); 877 } 878 } 879 880 function showLetter($letter, $word, $bool, $duration) { 881 $letter.addClass('in').removeClass('out'); 882 883 if(!$letter.is(':last-child')) { 884 setTimeout(function(){ showLetter($letter.next(), $word, $bool, $duration); }, $duration); 885 } else { 886 if($word.parents('.jx-evont-headline').hasClass('type')) { setTimeout(function(){ $word.parents('.jx-evont-words-wrapper').addClass('waiting'); }, 200);} 887 if(!$bool) { setTimeout(function(){ hideWord($word) }, animationDelay) } 888 } 889 } 890 891 function takeNext($word) { 892 return (!$word.is(':last-child')) ? $word.next() : $word.parent().children().eq(0); 893 } 894 895 function takePrev($word) { 896 return (!$word.is(':first-child')) ? $word.prev() : $word.parent().children().last(
896); 897 } 898 899 function switchWord($oldWord, $newWord) { 900 $oldWord.removeClass('is-visible').addClass('is-hidden'); 901 $newWord.removeClass('is-hidden').addClass('is-visible'); 902 } 903 }, 904 905 toggle: function(){ 906 907 //jQuery('#accordion-1 [data-accordion],#accordion-2 [data-accordion],#accordion-3 [data-accordion],#accordion-4 [data-accordion]').accordion(); 908 909 jQuery('.accordion [data-accordion]').accordion({ 910 singleOpen: true 911 }); 912 913 jQuery('.accordion-open [data-accordion]').accordion({ 914 singleOpen: false 915 }); 916 917 918 }, 919 920 tabs:function(){ 921 922 923 jQuery('#ParentTab').easyResponsiveTabs({ 924 type: 'horizontal', //Types: default, vertical, accordion 925 width: 'auto', //auto or any width like 600px 926 fit: true, // 100% fit in a container 927 closed: 'accordion', // Start closed if in accordion view 928 tabidentify: 'parenttab_1' 929 930 }); 931 932 jQuery('#ChildTab-1').easyResponsiveTabs({ 933 type: 'horizontal', //Types: default, vertical, accordion 934 width: 'auto', //auto or any width like 600px 935 fit: true, // 100% fit in a container 936 tabidentify: 'childtab_1' 937 938 }); 939 940 jQuery('#ChildTab-2').easyResponsiveTabs({ 941 type: 'horizontal', //Types: default, vertical, accordion 942 width: 'auto', //auto or any width like 600px 943 fit: true, // 100% fit in a container 944 tabidentify: 'childtab_1' 945 946 }); 947 948 jQuery('#ChildTab-3').easyResponsiveTabs({ 949 type: 'horizontal', //Types: default, vertical, accordion 950 width: 'auto', //auto or any width like 600px 951 fit: true, // 100% fit in a container 952 tabidentify: 'childtab_1' 953 954 }); 955 956 jQuery('#ChildTab-4').easyResponsiveTabs({ 957 type: 'horizontal', //Types: default, vertical, accordion 958 width: 'auto', //auto or any width like 600px 959 fit: true, // 100% fit in a container 960 tabidentify: 'childtab_1' 961 962 }); 963 964 jQuery('#ChildTab-5').easyResponsiveTabs({ 965 type: 'horizontal', //Types: default, vertical, accordion 966 width: 'auto', //auto or any width like 600px 967 fit: true, // 100% fit in a container 968 tabidentify: 'childtab_1' 969 970 }); 971 972 973 }, 974 prettyPhoto: function(){ 975 976 977 var prettyPhoto_parameters = { 978 animation_speed: 'fast', 979 slideshow: true, /* false OR interval time in ms */ 980 theme:'facebook', 981 opacity: 1, 982 show_title:true, /* true/false */ 983 allow_resize: true, /* Resize the photos bigger than viewport. true/false */ 984 default_width: 920, 985 default_height: 540, 986 counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ 987 hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ 988 wmode: 'opaque', /* Set the flash wmode attribute */ 989 autoplay: true, /* Automatically start videos: True/False */ 990 modal: false, /* If set to true, only the close button will close the window */ 991 overlay_gallery: true 992 }; 993 994 995 jQuery('a[href$=jpg], a[href$=JPG], a[href$=jpeg], a[href$=JPEG], a[href$=png], a[href$=gif], a[href$=bmp]:has(img),a[class^="prettyPhoto"],a[data-rel^="prettyPhoto"]').prettyPhoto(prettyPhoto_parameters); 996 997 998 jQuery('a[class^="prettyPhoto"],a[data-rel^="prettyPhoto"]').prettyPhoto(prettyPhoto_parameters); //prettyPhoto_parameters 999 1000 }, 1001 1002 parallax: function(){ 1003 1004 jQuery('.parallax,.jx-evont-page-header-parallax').scrolly({bgParallax: true}); 1005 1006 }, 1007 1008 1009 counter: function(){ 1010 1011 1012 if (jQuery('.jx-evont-count-up').length >0){ 1013 jQuery(".jx-evont-count-up").counterUp({ 1014 delay: 10, 1015 time: 1000 1016 }); 1017 } 1018 1019 }, 1020 1021 1022 alertBox: function(){ 1023 1024 jQuery('.jx-evont-close').on("click",function($) { 1025 jQuery(this).parent().hide(); 1026 }); 1027 }, 1028 1029 flipbox: function(){ 1030 1031 jQuery('.jx-evont-flipbox .hover').hover(function(){ 1032 jQuery(this).addClass('flip'); 1033 },function(){ 1034 jQuery(this).removeClass('flip'); 1035 }); 1036 1037 }, 1038 1039 themestyler: function(){ 1040 1041 var $b = jQuery('body'), 1042 $h = jQuery('head'), 1043 $w = jQuery(window); 1044 1045 1046 $b.append('<div style="left: 0px;" id="evont-styleswitcher"><div class="evont-styleswitcher-body"><div class="toggle-switchme"><div class="evont-styleswitcher-toogle"><i class="fa fa-gear fa-gear-animate"></i></div><div class="evont-styleswitcher-head">Style Switcher</div></div><div class="evont-styleswitcher-section"><strong>Layout Style</strong><select name="layout"><option>Wide</option><option>Boxed</option></select></div><div class="evont-styleswitcher-section colors clearfix"><strong>Color Versions</strong><a href="#" title="Blue"><div class="color_css" id="3ea7d7"style="background:#3ea7d7; width:20px; height:20px;"></div></a><a href="#" title="Green Crayola"><div class="color_css" id="1DA879"style="background:#1DA879; width:20px; height:20px;"></div></a><a href="#" title="Red"><div class="color_css" id="d80000"style="background:#d80000; width:20px; height:20px;"></div></a><a href="#" title="Orange"><div class="color_css" id="E5493A"style="background:#E5493A; width:20px; height:20px;"></div></a><a href="#" title="Pink"><div class="color_css" id="E22467"style="background:#E22467; width:20px; height:20px;"></div></a><a href="#" title="Sun"><div class="color_css" id="f5a823"style="background:#f5a823; width:20px; height:20px;"></div></a><a href="#" title="GreenTea"><div class="color_css" id="9dc032"style="background:#9dc032; width:20px; height:20px;"></div></a><a href="#" title="Torquze"><div class="color_css" id="32b4c0"style="background:#32b4c0; width:20px; height:20px;"></div></a></div><div class="evont-styleswitcher-section patterns clearfix"><strong>Patterns for Boxed Version</strong><a href="#" title="bg1"><div class="bg2"></div></a><a href="#" title="bg2"><div class="bg17"></div></a><a href="#" title="bg3"><div class="bg3"></div></a><a href="#" title="bg4"><div class="bg4"></div></a><a href="#" title="bg5"><div class="bg5"></div></a><a href="#" title="bg6"><div class="bg6"></div></a><a href="#" title="bg7"><div class="bg7"></div></a><a href="#" title="bg8"><div class="bg8"></div></a><a href="#" title="bg9"><div class="bg9"></div></a><a href="#" title="bg10"><div class="bg10"></div></a><a href="#" title="bg11"><div class="bg11"></div></a><a href="#" title="bg12"><div class="bg12"></div></a><a href="#" title="bg13"><div class="bg13"></div></a><a href="#" title="bg14"><div class="bg14"></div></a><a href="#" title="bg15"><div class="bg15"></div></a></div><div class="evont-styleswitcher-section patterns clearfix last"><strong>Images for Boxed Version</strong><a href="#" title="bg_demo1" class="fullimage"><div class="bg_demo1_thumb"></div></a><a href="#" title="bg_demo2" class="fullimage"><div class="bg_demo2_thumb"></div></a><a href="#" title="bg_demo3" class="fullimage"><div class="bg_demo3_thumb"></div></a><a href="#" title="bg_demo4" class="fullimage"><div class="bg_demo4_thumb"></div></a><a href="#" title="bg_demo5" class="fullimage"><div class="bg_demo5_thumb"></div></a><a href="#" title="bg_demo6" class="fullimage"><div class="bg_demo6_thumb"></div></a><a href="#" title="bg_demo7" class="fullimage"><div class="bg_demo7_thumb"></div></a><a href="#" title="bg_demo8" class="fullimage"><div class="bg_demo8_thumb"></div></a><a href="#" title="bg_demo9" class="fullimage"><div class="bg_demo9_thumb"></div></a></div></div></div>'); 1047 1048 1049 $h.append('<style type="text/css">.bg0,.bg10,.bg11,.bg12,.bg13,.bg14,.bg15,.bg16,.bg17,.bg18,.bg2,.bg3,.bg4,.bg5,.bg6,.bg7,.bg8,.bg9,.bg_demo1_thumb,.bg_demo2_thumb,.bg_demo3_thumb,.bg_demo4_thumb,.bg_demo5_thumb,.bg_demo6_thumb,.bg_demo7_thumb,.bg_demo8_thumb,.bg_demo9_thumb{background:url(http://janxcode.com/evont/images/background_setting_sprite.png) no-repeat}.bg4{background-position:-51px 0;width:19px;height:19px;border:1px solid #999}.bg0{background-position:0 0;width:19px;height:19px;border:1px solid #999}.bg2{background-position:-95px -1px;width:19px;height:19px;border:1px solid #999}.bg3{background-position:-145px 0;width:19px;height:19px;border:1px solid #999}.bg5{background-position:-196px 0;width:19px;height:19px;border:1px solid #999}.bg6{background-position:-250px -1px;width:19px;height:19px;border:1px solid #999}.bg7{background-position:-299px 0;width:19px;height:19px;border:1px solid #999}.bg8{background-position:-345px -1px;width:19px;height:19px;border:1px solid #999}.bg12{background-position:-394px -3px;width:19px;height:19px;border:1px solid #999}.bg9{background-position:-447px -1px;width:19px;height:19px;border:1px solid #999}.bg10{background-position:-498px 0;width:19px;height:19px;border:1px solid #999}.bg11{background-position:-550px -3px;width:19px;height:19px;border:1px solid #999}.bg13{background-position:-602px -3px;width:19px;height:19px;border:1px solid #999}.bg14{background-position:-2px -50px;width:19px;height:19px;border:1px solid #999}.bg15{background-position:-48px -50px;width:19px;height:19px;border:1px solid #999}.bg16{background-position:-95px -50px;width:19px;height:19px;border:1px solid #999}.bg18{background-position:-146px -51px;width:19px;height:19px;border:1px solid #999}.bg17{background-position:-198px -53px;width:19px;height:19px;border:1px solid #999}.bg_demo9_thumb{background-position:-1px -102px;width:19px;height:19px;border:1px solid #999}.bg_demo1_thumb{background-position:-599px -53px;width:19px;height:19px;border:1px solid #999}.bg_demo2_thumb{background-position:-548px -55px;width:19px;height:19px;border:1px solid #999}.bg_demo3_thumb{background-position:-500px -52px;width:19px;height:19px;border:1px solid #999}
1049.bg_demo4_thumb{background-position:-451px -55px;width:19px;height:19px;border:1px solid #999}.bg_demo5_thumb{background-position:-402px -52px;width:19px;height:19px;border:1px solid #999}.bg_demo6_thumb{background-position:-352px -50px;width:19px;height:19px;border:1px solid #999}.bg_demo7_thumb{background-position:-301px -50px;width:19px;height:19px;border:1px solid #999}.bg_demo8_thumb{background-position:-252px -51px;width:19px;height:19px;border:1px solid #999}#loginform p{margin:10px 0 0;padding:0}.login_new_registration{margin-top:-45px;text-align:right}.login_new_registration a:hover{color:#CCC}#evont-styleswitcher{position:fixed;z-index:99999;top:120px;left:-240px!important;width:240px}.evont-styleswitcher-toogle{float:right;background:#333;width:52px;height:52px;margin-right:-50px;border-radius:0 5px 5px 0;padding-top:15px;font-size:23px;color:#fff;cursor:pointer;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.2);box-shadow:0 0 5px 0 rgba(0,0,0,.2);text-align:center}.evont-styleswitcher-head{background:#333;color:#fff;padding:18px 20px;margin-right:0;font-size:18px;font-weight:700;cursor:pointer;position:relative;z-index:1;height:52px}.evont-styleswitcher-body{background:#f1f1f1;-webkit-border-radius:0 0 3px;border-radius:0 0 3px;color:#fff;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.2);box-shadow:0 0 5px 0 rgba(0,0,0,.2);position:relative;z-index:0}.evont-styleswitcher-section{padding:10px 25px 20px;border-bottom:1px dashed #666;margin-bottom:5px}.evont-styleswitcher-section.last{border:none;color:#333}.evont-styleswitcher-section select{background:#555;color:#fff;margin:0;padding:6px}.evont-styleswitcher-section a{float:left;margin:10px 5px 0}.evont-styleswitcher-section a img{display:block;width:20px;height:20px;border:2px solid #999}.evont-styleswitcher-body strong{display:block;margin-bottom:10px}.previewoptions{color:#ccc;font-size:11px;line-height:19px}.evont-styleswitcher-section .color_css{padding:5px;border:2px solid #999;width:37px!important;height:37px!important}@media only screen and (max-width:767px){#evont-styleswitcher{display:none}}@media only screen and (max-width:1000px){#boxed-layout #header,#boxed-layout #header-v2 #navigation,#boxed-layout #header-v3,#boxed-layout #header-v4 #navigation,#boxed-layout #header-v5 #navigation,#boxed-layout #header-v6{width:100%!important}}.fa-gear-animate{animation:rotation 2s infinite steps(30);-webkit-animation:rotation 2s infinite steps(30);-moz-animation:rotation 2s infinite steps(30)}@keyframes rotation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@-moz-keyframes rotation{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(360deg)}}</style>'); 1050 1051 if(jQuery.cookie("css")) { 1052 jQuery("#skin").attr("href",jQuery.cookie("css")); 1053 } 1054 1055 if(jQuery.cookie("body-layout")) { 1056 if(jQuery.cookie("body-layout") == 'boxed') { 1057 $b.addClass('boxed'); 1058 $b.css('background', 'url(http://janxcode.com/evont/images/bg/bg12.png) repeat fixed center center transparent'); 1059 $b.css('background-size', 'auto'); 1060 $w.resize(); 1061 1062 }else if(jQuery.cookie("body-layout") == 'Wide') { 1063 $b.removeClass('boxed'); 1064 $w.resize(); 1065 } 1066 1067 } 1068 1069 var i=0; 1070 jQuery('#evont-styleswitcher .toggle-switchme').click(function(){ 1071 if (i==0){ 1072 jQuery(this).parent().animate({'left' : '240px'}, 300, 'easeOutExpo'); 1073 i=1; 1074 }else{ 1075 jQuery(this).parent().animate({'left' : '0px'}, 300, 'easeOutExpo'); 1076 i=0; 1077 } 1078 }); 1079 1080 jQuery('#evont-styleswitcher select[name=layout]').change(function() { 1081 var current = $(this).find('option:selected').val(); 1082 1083 1084 if(current == 'Boxed') { 1085 $b.addClass('boxed'); 1086 $b.css('background', 'url(http://janxcode.com/evont/images/bg/bg12.png) repeat fixed center center transparent'); 1087 $b.css('background-size', 'auto'); 1088 $w.resize(); 1089 jQuery.cookie("body-layout","boxed", {expires: 365, path: '/'}); 1090 1091 }else if(current == 'Wide') { 1092 $b.removeClass('boxed'); 1093 jQuery.cookie("body-layout","wide", {expires: 365, path: '/'}); 1094 $w.resize(); 1095 } 1096 1097 }); 1098 1099 jQuery('.patterns a').click(function() { 1100 var current = jQuery('#evont-styleswitcher select[name=layout]').find('option:selected').val(); 1101 1102 if(current == 'Boxed') { 1103 1104 var pattern = jQuery(this).attr('title'); 1105 1106 if(jQuery(this).hasClass('fullimage')) { 1107 $b.css('background', 'url(http://janxcode.com/evont/images/bg-image/'+pattern+'.jpg) no-repeat center center fixed'); 1108 $b.css('background-size', 'cover'); 1109 } else { 1110 $b.css('background', 'url(http://janxcode.com/evont/images/bg/'+pattern+'.png) repeat center center fixed'); 1111 $b.css('background-size', 'auto'); 1112 } 1113 }else { 1114 alert('Please select Boxed Layout'); 1115 } 1116 }); 1117 1118 //Color Skin Switcher 1119 1120 jQuery('.color_css').click(function(e) { 1121 1122 var color = jQuery(this).attr('id'); 1123 1124 if (color == "3ea7d7") { 1125 var skin_link="http://janxcode.com/evont/css/skins/blue.css"; 1126 jQuery('#skin').attr('href', skin_link); 1127 $b.css('background-color',color); 1128 jQuery.cookie("css",skin_link, {expires: 365, path: '/'}); 1129 return false; 1130 } 1131 1132 if (color == "1DA879") { 1133 var skin_link="http://janxcode.com/evont/css/skins/green.css"; 1134 jQuery('#skin').attr('href', skin_link); 1135 $b.css('background-color',color); 1136 jQuery.cookie("css",skin_link, {expires: 365, path: '/'}); 1137 return false; 1138 } 1139 1140 if (color == "d80000") { 1141 var skin_link="http://janxcode.com/evont/css/skins/red.css"; 1142 jQuery('#skin').attr('href', skin_link); 1143 $b.css('background-color',color); 1144 jQuery.cookie("css",skin_link, {expires: 365, path: '/'}); 1145 return false; 1146 } 1147 1148 if (color == "E5493A") { 1149 var skin_link="http://janxcode.com/evont/css/skins/orange.css"; 1150 jQuery('#skin').attr('href', skin_link); 1151 $b.css('background-color',color); 1152 jQuery.cookie("css",skin_link, {expires: 365, path: '/'}); 1153 return false; 1154 } 1155 1156 if (color == "E22467") { 1157 var skin_link="http://janxcode.com/evont/css/skins/pink.css"; 1158 jQuery('#skin').attr('href', skin_link); 1159 $b.css('background-color',color); 1160 jQuery.cookie("css",skin_link, {expires: 365, path: '/'}); 1161 return false; 1162 } 1163 1164 if (color == "f5a823") { 1165 var skin_link="http://janxcode.com/evont/css/skins/sun.css"; 1166 jQuery('#skin').attr('href', skin_link); 1167 $b.css('background-color',color); 1168 jQuery.cookie("css",skin_link, {expires: 365, path: '/'}); 1169 return false; 1170 } 1171 1172 if (color == "9dc032") { 1173 var skin_link="http://janxcode.com/evont/css/skins/greentea.css"; 1174 jQuery('#skin').attr('href', skin_link); 1175 $b.css('background-color',color); 1176 jQuery.cookie("css",skin_link, {expires: 365, path: '/'}); 1177 return false; 1178 } 1179 1180 if (color == "32b4c0") { 1181 var skin_link="http://janxcode.com/evont/css/skins/torquze.css"; 1182 jQuery('#skin').attr('href', skin_link); 1183 $b.css('background-color',color); 1184 jQuery.cookie("css",skin_link, {expires: 365, path: '/'}); 1185 return false; 1186 } 1187 1188 }); 1189 1190 } 1191 1192 }; 1193 1194 Theme.initialize(); 1195
vendor: 5 bytes, line 1196
1196})();
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.