1"use strict"; 2 3jQuery(document).ready(function ($) { 4 5 6 if (Function('/*@cc_on return document.documentMode===10@*/')()) { 7 document.documentElement.className += ' ie10'; 8 } 9 10 11 /* Show testimonial after loading */ 12 $('.testimonial-item').css('visibility', 'visible'); 13 14 15 /* Tabs Init */ 16 easyTabsZeina('.tab-container', { 17 animate: false, 18 animationSpeed: 'fast', 19 defaultTab: 'li:first-child', 20 tabs: 'ul>li' 21 }); 22 23 24 /* Search Box Effect Handler */ 25 26 //Click 27 $('.searchbox .searchbox-icon,.searchbox .searchbox-inputtext').bind('click', function () { 28 var $search_tbox = $('.searchbox .searchbox-inputtext'); 29 $search_tbox.css('width', '120px'); 30 $search_tbox.focus(); 31 $('.searchbox', this).addClass('searchbox-focus'); 32 }); 33 34 //Blur 35 $('.top-bar .searchbox-inputtext,body').bind('blur', function () { 36 var $search_tbox = $('.searchbox .searchbox-inputtext'); 37 $search_tbox.css('width', '0px'); 38 $('.searchbox', this).removeClass('searchbox-focus'); 39 }); 40 41 // Clients Carousel 42 $(".clients-list").carouFredSel({ 43 items: { 44 width: 170, 45 visible: { 46 min: 1, 47 max: 6 48 } 49 }, 50 prev: { 51 button: function () { 52 return jQuery(this).closest('.row-fluid').find('.carousel-prev'); 53 }, 54 key: "left" 55 }, 56 next: { 57 button: function () { 58 return jQuery(this).closest('.row-fluid').find('.carousel-next'); 59 }, 60 key: "right" 61 }, 62 responsive: true, 63 auto: false, 64 scroll: { 65 onAfter: function () { 66 /** 67 We have bug in chrome, and we need to force chrome to re-render specific portion of the page 68 after it's complete the scrolling animation so this is why we add these dumb lines. 69 */ 70 if (/chrome/.test(navigator.userAgent.toLowerCase())) { 71 this.style.display = 'none'; 72 this.offsetHeight; 73 this.style.display = 'block'; 74 } 75 76 }, 77 items: 1 78 } 79 80 }, { 81 debug: false 82 }); 83 84 85 var $blogFeaturesCarousel = $(".blog-features-carousel"); 86 $blogFeaturesCarousel.carouFredSel({ 87 responsive: true, 88 prev: { 89 button: ".feature-arrow-left", 90 key: "left", 91 items: 1 92 }, 93 next: { 94 button: ".feature-arrow-right", 95 key: "right", 96 items: 1 97 }, 98 items: { 99 //width: 375, 100 height: 'variable', 101 visible: { 102 min: 1, 103 max: 3 104 }, 105 }, 106 auto: false, 107 scroll: 1, 108 circular: false 109 }); 110 111 $(window).load(function () { 112 $blogFeaturesCarousel.carouFredSel({ 113 responsive: true, 114 prev: { 115 button: ".feature-arrow-left", 116 key: "left", 117 items: 1 118 }, 119 next: { 120 button: ".feature-arrow-right", 121 key: "right", 122 items: 1 123 }, 124 items: { 125 //width: 375, 126 height: 'variable', 127 visible: { 128 min: 1, 129 max: 3 130 }, 131 }, 132 auto: false, 133 scroll: 1, 134 circular: false 135 }); 136 }); 137 138 $('.accordion .accordion-row:first-child .title').trigger('click'); 139 140 //if (document.getElementById('contact_map')) { 141 // google.maps.event.addDomListener(window, 'load', contactusMap); 142 //} 143 144 145 /* Portfolio PrettyPhoto */ 146 147 148 $("a[data-rel^='prettyPhoto']").prettyPhoto({ 149 animation_speed: 'fast', /* fast/slow/normal */ 150 slideshow: 5000, /* false OR interval time in ms */ 151 autoplay_slideshow: false, /* true/false */ 152 opacity: 0.80 /* Value between 0 and 1 */ 153 }); 154 155 156 $('.navigation').AXMenu({ 157 showArrowIcon: true,// true for showing the menu arrow, false for hide them 158 firstLevelArrowIcon: '', 159 menuArrowIcon: "" 160 }); 161 162 163 /* Mobile Nav */ 164 //$('.header .mobile-nav ').append($('.navigation').html());navmenu 165 $('.header .mobile-nav ').append($('#navmenu').html()); 166 $('.row_menu .mobile-nav li').bind('click', function (e) { 167 168 var $this = $(this); 169 var $ulKid = $this.find('>ul'); 170 var $ulKidA = $this.find('>a'); 171 /* ÐакоменÑиÑÑем 172 ÑÑÑÐ¾ÐºÑ ÐºÐ¾Ð´Ð°. ÐÑÑ Ð¾Ð´Ð½Ñй код 172 if ($ulKid.length === 0 && $ulKidA[0].nodeName.toLowerCase() === 'a') { 173 window.location.href = $ulKidA.attr('href'); 174 } 175 */ 176 if ($ulKid.length === 0 && $ulKidA.length > 0 && $ulKidA[0].nodeName.toLowerCase() === 'a') { 177 window.location.href = $ulKidA.attr('href'); 178 } 179 180 else { 181 $ulKid.toggle(0, function () { 182 if ($(this).css('display') === 'block') { 183 $ulKidA.find('.icon-chevron-down').removeClass('icon-chevron-down').addClass('icon-chevron-up'); 184 } 185 else { 186 $ulKidA.find('.icon-chevron-up').removeClass('icon-chevron-up').addClass('icon-chevron-down'); 187 } 188 }); 189 } 190 191 e.stopPropagation(); 192 //return false; ÑаÑкомменÑиÑование данной ÑÑÑоки вÑÐ·Ð¾Ð²ÐµÑ Ð¾Ñибки 193 }); 194 195 $('.mobile-menu-button').click(function () { 196 $('.mobile-nav').toggle(); 197 }); 198 199 $('.header .mobile-nav .icon-chevron-right').each(function () { 200 $(this).removeClass('icon-chevron-right').addClass('icon-chevron-down'); 201 }); 202 203 204 /* Revolution Slider */ 205 //show until every thing loaded 206 $('.rev-slider-fixed,.rev-slider-full').css('visibility', 'visible'); 207 208 //Fixed Size 209 $('.rev-slider-banner-fixed').revolution({ 210 delay: 5000, 211 startwidth: 926, 212 startheight: 430, 213 214 onHoverStop: "on", 215 216 thumbWidth: 100,
217 thumbHeight: 50, 218 thumbAmount: 3, 219 220 hideThumbs: 0, 221 222 navigationType: "bullet", 223 navigationArrows: "solo", 224 navigationStyle: "round", 225 226 227 navigationHAlign: "center", 228 navigationVAlign: "bottom", 229 navigationHOffset: 30, 230 navigationVOffset: -40, 231 232 soloArrowLeftHalign: "left", 233 soloArrowLeftValign: "center", 234 soloArrowLeftHOffset: 5, 235 soloArrowLeftVOffset: 0, 236 237 soloArrowRightHalign: "right", 238 soloArrowRightValign: "center", 239 soloArrowRightHOffset: 5, 240 soloArrowRightVOffset: 0, 241 242 touchenabled: "on", 243 244 stopAtSlide: -1, 245 stopAfterLoops: -1, 246 hideCaptionAtLimit: 0, 247 hideAllCaptionAtLilmit: 0, 248 hideSliderAtLimit: 0, 249 250 fullWidth: "off", 251 fullScreen: "off", 252 fullScreenOffsetContainer: "#topheader-to-offset", 253 254 shadow: 0 255 256 }); 257 258 259 /* Full */ 260 $('.rev-slider-banner-full').revolution({ 261 delay: 5000, 262 startwidth: 1170, 263 startheight: 500, 264 265 onHoverStop: "on", 266 267 thumbWidth: 100, 268 thumbHeight: 50, 269 thumbAmount: 3, 270 271 hideThumbs: 0, 272 273 navigationType: "none", 274 navigationArrows: "solo", 275 navigationStyle: "bullets", 276 navigationHAlign: "center", 277 navigationVAlign: "bottom", 278 navigationHOffset: 30, 279 navigationVOffset: 30, 280 281 soloArrowLeftHalign: "left", 282 soloArrowLeftValign: "center", 283 soloArrowLeftHOffset: 20, 284 soloArrowLeftVOffset: 0, 285 286 soloArrowRightHalign: "right", 287 soloArrowRightValign: "center", 288 soloArrowRightHOffset: 20, 289 soloArrowRightVOffset: 0, 290 291 touchenabled: "on", 292 293 stopAtSlide: -1, 294 stopAfterLoops: -1, 295 hideCaptionAtLimit: 0, 296 hideAllCaptionAtLilmit: 0, 297 hideSliderAtLimit: 0, 298 299 fullWidth: "on", 300 fullScreen: "off", 301 fullScreenOffsetContainer: "#topheader-to-offset", 302 303 shadow: 0 304 305 }); 306 307 308 /* Elastic Slide Show */ 309 $('#ei-slider').eislideshow({ 310 // animation types: 311 // "sides" : new slides will slide in from left / right 312 // "center": new slides will appear in the center 313 animation: 'center', // sides || center 314 315 // if true the slider will automatically slide, and it will only stop if the user clicks on a thumb 316 autoplay: true, 317 318 // interval for the slideshow 319 slideshow_interval: 3000, 320 321 // speed for the sliding animation 322 speed: 800, 323 324 // easing for the sliding animation 325 easing: '', 326 327 // percentage of speed for the titles animation. Speed will be speed * titlesFactor 328 titlesFactor: 0.60, 329 330 // titles animation speed 331 titlespeed: 800, 332 333 // titles animation easing 334 titleeasing: '', 335 336 // maximum width for the thumbs in pixels 337 thumbMaxWidth: 150 338 339 }); 340 341 342 /* jQuery Tweetable */ 343 $('.section-twitter-tweet').tweetable({ 344 username: 'wrapbootstrap', 345 limit: 4, 346 time: true, 347 html5: true, 348 onComplete: function ($ul) { 349 $('time').timeago(); 350 } 351 }); 352 353 354 /* Accrodion */ 355 zeinaAccordion('.accordion', true); 356 357 358 /* Init the plugin */ 359 360 361 form_validation('#contact-form'); 362 form_validation('#comment-form'); 363 364 /* get in touch form valdiation */ 365 $('#footer-contact-form').validate({ 366 367 rules: { 368 name: "required" 369 } 370 }); 371 372 /* to top button */ 373 $('body').append('<div id="to-top-button"> <i class="icon-angle-up"></i> </div>'); 374 375 376 $('#to-top-button').click(function () { 377 $('body,html').animate({ 378 scrollTop: 0 379 }); 380 }); 381 382 383 /* Info Box Listeners */ 384 $('.info-box .icon-remove').click(function () { 385 $(this).parents('.info-box').first().fadeOut(); 386 return false; 387 }); 388 389 $(window).resize(function () { 390 centeringBullets(); 391 392 $('.tab-container').trigger('easytabs:midTransition'); 393 $('#masonry-elements,.portfolio-items').isotope('reLayout'); 394 setTimeout(function () { 395 $('#masonry-elements,.portfolio-items').isotope('reLayout'); 396 }, 500); 397 }); 398 399 //place holder fallback 400 $('input, textarea').placeholder(); 401 402 //Pie Chart 403 $('.chart').each(function () { 404 var $currentCircleChart = $(this), 405 size = $(".span4") ? 130 : 110; 406 407 $currentCircleChart.easyPieChart({ 408 animate: 1000, 409 lineWidth: $currentCircleChart.attr('data-line-width'), 410 size: size, 411 barColor: $currentCircleChart.attr('data-color'), 412 trackColor: $currentCircleChart.attr('data-track-color'), 413 scaleColor: false, 414 lineCap: 'butt' 415 }); 416 417 }); 418 419 420 //process video posts 421 embed_video_processing(); 422 423 //init tooltip tipsy 424 $('.social-media-icon,.tool-tip').tipsy({gravity: 's', fade: true, offset: 5}); 425 426 427 //Remove tipsy tooltip event from image overlay elements 428 $('.item_img_overlay_content .social-media-icon,.top-bar .social-media-icon').unbind('mouseenter'); 429 430 431 stickyMenu(); 432 433 if ($("html").hasClass("lt-ie9")) { 434 435 //bread crumb last child fix for IE8 436 $('.breadcrumbs li:last-child').addClass('last-child'); 437 $('.navigation > li:last-child').addClass('last-child-nav'); 438 $('.flickr_badge_wrapper .flickr_badge_image').addClass('flicker-ie'); 439 $('.flickr_badge_wrapper .flickr_badge_image:nth-child(3n+1)').addClass('last-child-flicker'); 440 $('.content-style3 ').css('width', '100%').css('width', '-=28px'); 441 $('.section-subscribe input[type=text]').css('width', '100%').css('width', '-=40px'); 442 $('.blog-search .blog-search-input').css('width', '100%').css('width', '-=40px'); 443 444 $('.tab').click(function () { 445 setTimeout(function () { 446 $('.content-style3 ').css('width', '100%').css('width', '-=28px'); 447 $('.section-subscribe input[type=text]').css('width', '100%').css('width', '-=40px'); 448 }, 500); 449 450 }); 451 452 setInterval(function () { 453 $('#masonry-elements,.portfolio-items').isotope('reLayout'); 454 }, 1000); 455 } 456 ; 457 458 centeringBullets(); 459 460 461 var $cont = $('.portfolio-items'); 462 463 // IE 8 464 if ($("html").hasClass("lt-ie9")) { 465 $cont.isotope({ 466 itemSelector: '.portfolio-items .thumb-label-item', 467 masonry: { columnWidth: $('.isotope-item:first').width(), gutterWidth: 6}, 468 filter: '*', 469 transformsEnabled: false, 470 layoutMode: 'masonry', 471 animationEngine: 'css' 472 }); 473 } 474 else { 475 $cont.isotope({ 476 itemSelector: '.portfolio-items .thumb-label-item', 477 masonry: { columnWidth: $('.isotope-item:first').width(), gutterWidth: 6}, 478 filter: '*', 479 transformsEnabled: false, 480 layoutMode: 'masonry', 481 // animationEngine: 'css' 482 }); 483 } 484 485 486 $('.portfolio-filter-container a').click(function () { 487 $cont.isotope({ 488 filter: this.getAttribute('data-filter') 489 }); 490 491 return false;
492 }); 493 494 var lastClickFilter = null; 495 $('.portfolio-filter a').click(function () { 496 497 //first clicked we don't know which element is selected last time 498 if (lastClickFilter === null) { 499 $('.portfolio-filter a').removeClass('portfolio-selected'); 500 } 501 else { 502 $(lastClickFilter).removeClass('portfolio-selected'); 503 } 504 505 lastClickFilter = this; 506 $(this).addClass('portfolio-selected'); 507 }); 508 509 510 var $testimonialVerticalRef = $(".testimonial-vertical"); 511 $(".testimonial-vertical").easytabs({ 512 defaultTab: "li:first-child", 513 panelActiveClass: "active-accord-content", 514 tabActiveClass: "active-accord", 515 tabs: "ul>li", 516 updateHash: false, 517 animate: false 518 }).bind('easytabs:midTransition', function () { 519 var $this = $(this), activeLink = $this.find('li.active-accord'), offset = activeLink.position(); 520 521 $this.find('.testimonial-vertical-arrow').css('top', (( offset.top + ( activeLink.outerHeight() ) / 2 ) ) + 'px'); 522 }); 523 524 //trigger event on init 525 $testimonialVerticalRef.trigger('easytabs:midTransition'); 526 $(window).load(function () { 527 $testimonialVerticalRef.trigger('easytabs:midTransition'); 528 }); 529 530 531 $('.flexslider').flexslider({ 532 animation: "slide", 533 animationLoop: false, 534 itemMargin: 5, 535 pausePlay: true, 536 start: function (slider) { 537 $('body').removeClass('loading'); 538 }, 539 before: function () { 540 $('.flexslider img').each(function () { 541 $(this).css('margin-left', 0); 542 }); 543 }, 544 }); 545 546 setTimeout(function () { 547 $('.flexslider').hide().fadeIn().css('visibility', 'visible'); 548 }, 500); 549 550 $(window).resize(function () { 551 552 var winWidth = $(window).width(); 553 if (winWidth < 768) { 554 var marginLeft = -1 * parseInt((768 - winWidth - 10) / 2); 555 $('.flexslider img').each(function () { 556 $(this).css('margin-left', marginLeft); 557 }); 558 } 559 else { 560 $('.flexslider img').each(function () { 561 $(this).css('margin-left', 0); 562 }); 563 } 564 565 }); 566 567 568}); 569 570 571function calculateAspectRatioFit(srcWidth, srcHeight, maxWidth, maxHeight) { 572 573 var ratio = [maxWidth / srcWidth, maxHeight / srcHeight ]; 574 ratio = Math.min(ratio[0], ratio[1]); 575 576 return { width: srcWidth * ratio, height: srcHeight * ratio }; 577} 578/* Portfolio */ 579 580var loaded = false, timeout = 20000;//loaded flag for timeout 581setTimeout(function () { 582 if (!loaded) { 583 hideLoading(); 584 } 585}, timeout); 586 587$(window).load(function () { 588 loaded = true; 589 centeringBullets(); 590 591 hideLoading(); 592 593 var $masonryElement = $('#masonry-elements'); 594 $masonryElement.isotope({ 595 transformsEnabled: false, 596 masonry: { 597 columnWidth: 270, 598 gutterWidth: 20 599 } 600 }); 601 602 $masonryElement.infinitescroll({ 603 navSelector: '#masonry-elements-nav', // selector for the paged navigation 604 nextSelector: '#masonry-elements-nav a:first', // selector for the NEXT link (to page 2) 605 itemSelector: '.feature', // selector for all items you'll retrieve 606 loading: { 607 finishedMsg: 'No more pages to load.', 608 img: 'images/loading.gif', 609 selector: '#loading', 610 speed: 'normal' 611 }, 612 maxPage: 3 613 }, 614 // call Isotope as a callback 615 function (newElements) { 616 embed_video_processing(); 617 var $newElements = $(newElements); 618 $masonryElement.append($newElements); 619 $masonryElement.isotope('appended', $newElements); 620 621 $masonryElement.find('.cycle-slideshow').cycle({ 622 623 }); 624 }); 625 626 $('#masonry-elements,.portfolio-items').isotope('reLayout'); 627 628 /* Parallax */ 629 $('.section-parallax').each(function () { 630 var me = $(this), speed = parseFloat(me.data('speed')); 631 me.parallax("0%", speed); 632 }); 633 634 $(window).resize(function () { 635 /* Parallax */ 636 $('.section-parallax').each(function () { 637 var me = $(this), speed = parseFloat(me.data('speed')); 638 me.parallax("0%", speed); 639 }); 640 }); 641}); 642 643 644/* Loading functions */ 645function hideLoading() { 646 var loadingREF = $('.hide-until-loading'); 647 648 $('.loading-container').remove(); 649 650 loadingREF.removeClass('hide-until-loading'); 651 652} 653 654/** 655 * This function used to add some features to easytabs out of the box. 656 * @param selector 657 */ 658function easyTabsZeina(selector, options) { 659 var $ref = $(selector); 660 661 $('.tab-container').css('visibility', 'visible'); 662 options = options || {}; 663 options['animationSpeed'] = options['animationSpeed'] || 'fast'; 664 $ref.easytabs(options).bind('easytabs:midTransition', function () { 665 var $this = $(this), activeLink = $this.find('a.active'), offset = activeLink.offset(); 666 $this.find('.section-tab-arrow').css('left', (( offset.left + ( activeLink.outerWidth() ) / 2 ) - 7) + 'px'); 667 }); 668 669 //trigger event on init 670 $ref.trigger('easytabs:midTransition'); 671 $(window).load(function () { 672 $ref.trigger('easytabs:midTransition'); 673 }); 674} 675 676 677/* Contaact Map */ 678var map; 679function contactusMap() { 680 681 var myLatlng, mapOptions, marker; 682 //var myLatlng = new google.maps.LatLng(42.873971, 74.618060); 683 var myLatlng = new google.maps.LatLng(42.84347993, 74.59833205); 684 mapOptions = { 685 zoom: 16, 686 center: myLatlng, 687 scrollwheel: false, 688 mapTypeId: google.maps.MapTypeId.ROADMAP 689 }; 690 691 map = new google.maps.Map(document.getElementById('contact_map'), mapOptions); 692 693 marker = new google.maps.Marker({ 694 position: myLatlng, 695 map: map, 696 title: 'Ñл. ÐÑ Ñнбаева 127/1 (пеÑеÑеÑение Ñ Ñл. ÐалдÑбаева), 4-й ÑÑаж.' 697 }); 698} 699 700 701/** 702 * Form Validation Helper 703 */ 704function form_validation(selector) { 705 var errorContainerOpen = '<div class="span1 error_container" ><div class="error-box">', 706 errorContainerClose = '<i class="icon-remove"></i></div></div>'; 707 /* Contact From Validation */ 708 $(selector).validate({ 709 errorClass: "input_error", 710 errorElement: "span", 711 success: function (label, element) { 712 713 } 714 }); 715 716} 717 718 719/** 720 * Embed Video 721 */ 722function embed_video_processing() { 723 724 var youtube_template = '<iframe src="http://www.youtube.com/embed/{{id}}" frameborder="0" allowfullscreen="" width="100%" height="100%" allowfullscreen></iframe>', 725 vimeo_template = '<iframe src="http://player.vimeo.com/video/{{id}}?color=ffffff" frameborder="0" allowfullscreen="" width="100%" height="360"></iframe>', 726 soundcloud_template = '<iframe src="https://w.soundcloud.com/player/?url={{id}}" frameborder="0" allowfullscreen="" width="100%" height="166"></iframe>', 727 template, id; 728 729 $('.blog-post-youtube,.blog-post-vimeo,.blog-post-soundcloud').each(function () { 730 id = false;
731 732 //youtube 733 if ($(this).hasClass('blog-post-youtube')) { 734 id = getYoutubeId($(this).attr('href')); 735 template = youtube_template; 736 } 737 //vimeo 738 else if ($(this).hasClass('blog-post-vimeo')) { 739 id = getVimeoId($(this).attr('href')); 740 template = vimeo_template; 741 } 742 //sound clound 743 else if ($(this).hasClass('blog-post-soundcloud')) { 744 id = $(this).attr('href'); 745 template = soundcloud_template; 746 } 747 748 if (id !== false) { 749 //process the template 750 $(this).replaceWith(template.replace('{{id}}', id)); 751 } 752 753 }); 754 755} 756 757/*** 758 * Get youtube url. 759 * 760 * @param url 761 * @returns {*} 762 */ 763function getYoutubeId(url) { 764 var regExp = /^.*((youtu.[\w]{1,3}\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; 765 var match = url.match(regExp); 766 if (match && match[7].length == 11) { 767 return match[7]; 768 } else { 769 return false; 770 } 771} 772/*** 773 * Get vimeo url. 774 * 775 * @param url 776 * @returns {*} 777 */ 778function getVimeoId(url) { 779 var regExp = /http:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/; 780 var match = url.match(regExp); 781 782 if (match) { 783 return match[2]; 784 } else { 785 return false; 786 } 787} 788 789 790/* 791 * Zeina Accordion 792 * Written specially for Zeina Theme 793 */ 794function zeinaAccordion(selector) { 795 796 $(document).on('click', selector + ' .accordion-row .title,' + selector + ' .accordion-row .open-icon', function () { 797 798 var me = this, 799 accordion = $(this).parents('.accordion'), 800 $prev, 801 $accRow = $(this), 802 $accTitle = $accRow.parent(), $this, icon, desc, title, activeRow, 803 $accRow = $accTitle.parent(), 804 toggle = accordion.data('toggle') == 'on' ? true : false; 805 806 807 if (toggle === true) { 808 809 icon = $accTitle.find('.accord-icon'); 810 desc = $accTitle.find('.desc'); 811 title = $accTitle.find('.title'); 812 813 if ($accTitle.find('.icon-minus-sign').length > 0) { 814 desc.slideUp('fast'); 815 icon.removeClass('icon-minus-sign').addClass('icon-plus-sign'); 816 title.removeClass('active'); 817 } 818 else { 819 desc.slideDown('fast'); 820 icon.removeClass('icon-plus-sign').addClass('icon-minus-sign'); 821 title.addClass('active'); 822 } 823 824 } 825 else { 826 $accRow.find('.accordion-row').each(function () { 827 828 $this = $(this); 829 icon = $this.find('.accord-icon'); 830 desc = $this.find('.desc'); 831 title = $this.find('.title'); 832 833 /* if this the one which is clicked , slide up */ 834 if ($accTitle[0] != this) { 835 desc.slideUp('fast'); 836 icon.removeClass('icon-minus-sign').addClass('icon-plus-sign'); 837 title.removeClass('active'); 838 } 839 else { 840 desc.slideDown('fast'); 841 icon.removeClass('icon-plus-sign').addClass('icon-minus-sign'); 842 title.addClass('active'); 843 } 844 845 }); 846 } 847 848 }); 849 850 851 // active div 852 $(selector).each(function () { 853 854 var $this = $(this), icon, desc, title, activeRow, 855 activeIndex = parseInt($this.data('active-index')), 856 activeIndex = activeIndex < 0 ? false : activeIndex; 857 858 if (activeIndex !== false) { 859 activeRow = $this.find('.accordion-row').eq(activeIndex); 860 icon = activeRow.find('.icon-plus-sign'); 861 desc = activeRow.find('.desc'); 862 title = activeRow.find('.title'); 863 864 desc.slideDown('fast'); 865 icon.removeClass('icon-plus-sign').addClass('icon-minus-sign'); 866 title.addClass('active'); 867 } 868 869 }); 870 871 872} 873 874/* Sticky Menu */ 875function stickyMenu() { 876 877 $(window).scroll(function () { 878 if ($(window).scrollTop() > 128) { 879 $('#header').addClass('sticky-header'); 880 $('.sticky-navigation,#to-top-button').fadeIn(); 881 } 882 else { 883 $('#header').removeClass('sticky-header'); 884 $('.sticky-navigation,#to-top-button').fadeOut(); 885 } 886 }); 887} 888 889/* Centering Bullets */ 890function centeringBullets() { 891 //Bullets center fixing in revolution slide 892 $('.simplebullets,.slider-fixed-frame .home-bullets').each(function () { 893 var $this = $(this), w = $this.width(); 894 $this.css('margin-left', -(w / 2) + 'px'); 895 }); 896} 897 898function initMap() { 899 if (document.getElementById('contact_map')) { 900 //google.maps.event.addDomListener(window, 'load', contactusMap); 901 //'google.maps.event.addDomListener() is deprecated, use the standard addEventListener() method instead' warning 902 window.addEventListener('load', contactusMap); 903 } 904}
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.