1jQuery(document).ready(function($) { 2 "use strict"; 3 4 /* Search Box Effect Handler */ 5 6 //Click 7 $('.searchbox .searchbox-icon').click(function() { 8 var $search_tbox = $('.searchbox .searchbox-inputtext'); 9 $search_tbox.css('width', '110px'); 10 window.setTimeout(function() { 11 $search_tbox.focus(); 12 }, 50); 13 $('.searchbox', this).addClass('searchbox-focus'); 14 }); 15 16 //Blur 17 $('.searchbox .searchbox-inputtext,body').bind('blur touchstart', function() { 18 var $search_tbox = $('.searchbox .searchbox-inputtext'); 19 if ($.trim($search_tbox.val()) === '') { 20 $search_tbox.css('width', '0px'); 21 $('.searchbox', this).removeClass('searchbox-focus'); 22 } 23 }); 24 25 // Clients Carousel 26 if ($(".clients-list").length) { 27 $(".clients-list").carouFredSel({ 28 items: { 29 width: 170, 30 visible: { 31 min: 1, 32 max: 5 33 } 34 }, 35 prev: { 36 button: function() { 37 return jQuery(this).closest('.carousel-container').find('.carousel-prev'); 38 }, 39 key: "left" 40 }, 41 next: { 42 button: function() { 43 return jQuery(this).closest('.carousel-container').find('.carousel-next'); 44 }, 45 key: "right" 46 }, 47 responsive: true, 48 auto: false, 49 scroll: { 50 onAfter: function() { 51 /** 52 We have bug in chrome, and we need to force chrome to re-render specific portion of the page 53 after it's complete the scrolling animation so this is why we add these dumb lines. 54 */ 55 if (/chrome/.test(navigator.userAgent.toLowerCase())) { 56 this.style.display = 'none'; 57 this.offsetHeight; 58 this.style.display = 'block'; 59 } 60 61 }, 62 items: 1 63 } 64 65 }, { 66 debug: false 67 }); 68 } 69 70 71 /* Tabs Init */ 72 easyTabsArwa('.tab-container', { 73 animate: true, 74 animationSpeed: 'fast', 75 defaultTab: 'li:first-child' 76 }); 77 78 79 $('.accordion .accordion-row:first-child .title').trigger('click'); 80 81 82 if (document.getElementById('contact_map')) { 83 $(window).on('load', function () { 84 var tries = 0; 85 (function waitGoogleMaps() { 86 if (window.google && google.maps) { 87 contactusMap(); 88 } else if (tries++ < 120) { 89 setTimeout(waitGoogleMaps, 50); 90 } 91 })(); 92 }); 93 } 94 95 96 /* Portfolio PrettyPhoto */ 97 98 99 $("a[data-rel^='prettyPhoto']").prettyPhoto({ 100 animation_speed: 'fast', /* fast/slow/normal */ 101 slideshow: 5000, /* false OR interval time in ms */ 102 autoplay_slideshow: false, /* true/false */ 103 opacity: 0.80 /* Value between 0 and 1 */ 104 }); 105 106 107 /* 108 Responsive menu Handler 109 */ 110 //sticky menu 111 $('#sticky-navigation').append('<ul class="navigation">' + $('.navigation').html() + '</ul>'); 112 //$('.navigation').first().remove() 113 $('.navigation').AXMenu({ 114 animSpeed: 0, //animation speed 115 timeout: 0, //time out for hiding the menu 116 animIn: "show", //the in animation for the menu, all jQuery animations are valid for this option 117 animOut: "hide", //the out animation for the menu, all jQuery animations are valid for this option 118 showArrowIcon: true, // true for showing the menu arrow, false for hide them 119 firstLevelArrowIcon: '<i class="icon-chevron-down"></i>', 120 menuArrowIcon: "" 121 }); 122 123 124 /* Mobile Nav */ 125 $('.header .mobile-nav ').append($('.navigation').html()); 126 $('.header .mobile-nav li').bind('click', function(e) { 127 128 var $this = $(this); 129 var $ulKid = $this.find('>ul'); 130 var $ulKidA = $this.find('>a'); 131 132 if ($ulKid.length === 0 && $ulKidA[0].nodeName.toLowerCase() === 'a') { 133 window.location.href = $ulKidA.attr('href'); 134 } 135 else { 136 $ulKid.toggle(0, function() { 137 if ($(this).css('display') === 'block') { 138 $ulKidA.find('.icon-chevron-down').removeClass('icon-chevron-down').addClass('icon-chevron-up'); 139 } 140 else { 141 $ulKidA.find('.icon-chevron-up').removeClass('icon-chevron-up').addClass('icon-chevron-down'); 142 } 143 }); 144 } 145 146 e.stopPropagation(); 147 148 return false;
149 }); 150 151 $('.mobile-menu-button').click(function() { 152 $('.mobile-nav').toggle(); 153 }); 154 155 $('.header .mobile-nav .icon-chevron-right').each(function() { 156 $(this).removeClass('icon-chevron-right').addClass('icon-chevron-down'); 157 }); 158 159 160 /* Revolution Slider */ 161 //show until every thing loaded 162 $('.rev-slider-fixed,.rev-slider-full').css('visibility', 'visible'); 163 164 //Fixed Size 165 var revFixedSlider = $('.rev-slider-banner-fixed').revolution({ 166 delay: 9000, 167 startwidth: 926, 168 startheight: 430, 169 onHoverStop: "on", 170 thumbWidth: 100, 171 thumbHeight: 50, 172 thumbAmount: 3, 173 hideThumbs: 0, 174 navigationType: "bullet", 175 navigationArrows: "solo", 176 navigationStyle: "round", 177 navigationHAlign: "center", 178 navigationVAlign: "bottom", 179 navigationHOffset: 30, 180 navigationVOffset: -40, 181 soloArrowLeftHalign: "left", 182 soloArrowLeftValign: "center", 183 soloArrowLeftHOffset: 5, 184 soloArrowLeftVOffset: 0, 185 soloArrowRightHalign: "right", 186 soloArrowRightValign: "center", 187 soloArrowRightHOffset: 5, 188 soloArrowRightVOffset: 0, 189 touchenabled: "on", 190 stopAtSlide: -1, 191 stopAfterLoops: -1, 192 hideCaptionAtLimit: 0, 193 hideAllCaptionAtLilmit: 0, 194 hideSliderAtLimit: 0, 195 fullWidth: "off", 196 fullScreen: "off", 197 fullScreenOffsetContainer: "#topheader-to-offset", 198 shadow: 0 199 200 }); 201 202 203 /* Full */ 204 $('.rev-slider-banner-full').revolution({ 205 delay: 5000, 206 startwidth: 960, 207 startheight: 500, 208 onHoverStop: "on", 209 thumbWidth: 100, 210 thumbHeight: 50, 211 thumbAmount: 3, 212 hideThumbs: 0, 213 navigationType: "none", 214 navigationArrows: "solo", 215 navigationStyle: "bullets", 216 navigationHAlign: "center", 217 navigationVAlign: "bottom", 218 navigationHOffset: 30, 219 navigationVOffset: 30, 220 soloArrowLeftHalign: "left", 221 soloArrowLeftValign: "center", 222 soloArrowLeftHOffset: 20, 223 soloArrowLeftVOffset: 0, 224 soloArrowRightHalign: "right", 225 soloArrowRightValign: "center", 226 soloArrowRightHOffset: 20, 227 soloArrowRightVOffset: 0, 228 touchenabled: "on", 229 stopAtSlide: -1, 230 stopAfterLoops: -1, 231 hideCaptionAtLimit: 0, 232 hideAllCaptionAtLilmit: 0, 233 hideSliderAtLimit: 0, 234 fullWidth: "on", 235 fullScreen: "off", 236 fullScreenOffsetContainer: "#topheader-to-offset", 237 shadow: 0 238 239 }); 240 241 242 /* Elastic Slide Show */ 243 $('#ei-slider').eislideshow({ 244 // animation types: 245 // "sides" : new slides will slide in from left / right 246 // "center": new slides will appear in the center 247 animation: 'center', // sides || center 248 249 // if true the slider will automatically slide, and it will only stop if the user clicks on a thumb 250 autoplay: true, 251 // interval for the slideshow 252 slideshow_interval: 3000, 253 // speed for the sliding animation 254 speed: 800, 255 // easing for the sliding animation 256 easing: '', 257 // percentage of speed for the titles animation. Speed will be speed * titlesFactor 258 titlesFactor: 0.60, 259 // titles animation speed 260 titlespeed: 800, 261 // titles animation easing 262 titleeasing: '', 263 // maximum width for the thumbs in pixels 264 thumbMaxWidth: 150 265 266 }); 267 268 269 /* jQuery Tweetable */ 270 $('.footer-recent-tweets-container').tweetable({ 271 username: 'wrapbootstrap', 272 limit: 2, 273 time: true, 274 html5: true, 275 onComplete: function($ul) { 276 $('time').timeago(); 277 } 278 }); 279 280 281 /* Accrodion */ 282 ArwaAccordion('.accordion', true); 283 284 285 /* Init the plugin */ 286 287 288 form_validation('#contact-form'); 289 form_validation('#comment-form'); 290 291 /* get in touch form valdiation */ 292 $('#footer-contact-form').validate({ 293 rules: { 294 name: "required" 295 } 296 }); 297 298 /* to top button */ 299 $('body').append('<div id="to-top-button"> <i class="icon-angle-up"></i> </div>'); 300 301 302 $('#to-top-button').click(function() { 303 $('body,html').animate({ 304 scrollTop: 0 305 }); 306 }); 307 308 309 /* Info Box Listeners */ 310 $('.info-box .icon-remove').click(function() { 311 $(this).parents('.info-box').first().fadeOut(); 312 }); 313 314 315 stickyMenu(); 316 317 $(window).resize(function() { 318 stickyMenu(); 319 centeringBullets(); 320 }); 321 322 //place holder fallback 323 $('input, textarea').placeholder(); 324 325 326 //process video posts 327 embed_video_processing(); 328 329 //init tooltip tipsy 330 $('.social-media-icon,.tool-tip').tipsy({gravity: 's', fade: true, offset: 5}); 331 332 //Remove tipsy tooltip event from image overlay elements 333 $('.item_img_overlay_content .social-media-icon').unbind('mouseenter'); 334 335 336 //Callout Box And Message Box Mobile Button 337 $('.message-box ,.callout-box').each(function() { 338 var $box = $(this); 339 var $button = $box.find(".button"); 340 $box.append('<a href="' + $button.attr("href") + '" class="button large mobile">' + $button.html() + '</a>'); 341 }); 342 343}); 344 345 346/* Portfolio â Isotope ÑолÑко Ñам, где еÑÑÑ ÑилÑÑÑ; инаÑе Ð»Ð¾Ð¼Ð°ÐµÑ ÑеÑÐºÑ ÐºÐ°Ñалога (4 в ÑÑд) */ 347$(window).load(function() { 348 var $cont = $('.portfolio-items'); 349 var $filterRoot = $('.portfolio-filter-container'); 350 351 if ($cont.length && $filterRoot.length && typeof $.fn.isotope === 'function') { 352 var $first = $cont.find('.thumb-label-item').first(); 353 var colW = $first.length ? $first.outerWidth(true) : null; 354 $cont.isotope({ 355 itemSelector: '.portfolio-items .thumb-label-item', 356 masonry: {columnWidth: colW || 1, gutterWidth: 20}, 357 filter: '*' 358 }); 359 360 $('.portfolio-filter-container a').click(function() { 361 $cont.isotope({ 362 filter: this.getAttribute('data-filter') 363 }); 364 365 return false;
366 }); 367 } 368 369 var lastClickFilter = null; 370 $('.portfolio-filter a').click(function() { 371 372 //first clicked we don't know which element is selected last time 373 if (lastClickFilter === null) { 374 $('.portfolio-filter a').removeClass('portfolio-selected'); 375 } 376 else { 377 $(lastClickFilter).removeClass('portfolio-selected'); 378 } 379 380 lastClickFilter = this; 381 $(this).addClass('portfolio-selected'); 382 }); 383 384 /* Animation Engine Init. */ 385 centeringBullets(); 386 387 /** 388 * Remove header shadow if it is has no element other than the header. 389 */ 390 $('.top_wrapper').each(function() { 391 var $this = $(this); 392 if ($this.children().length == 1) { 393 $this.find('.header').addClass('header-no-shadow'); 394 } 395 }); 396 397 398 //bread crumb last child fix for IE8 399 $('.breadcrumbs li:last-child').addClass('last-child'); 400}); 401 402 403/** 404 * This function used to add some features to easytabs out of the box. 405 * @param selector 406 */ 407function easyTabsArwa(selector, options) { 408 409 410 var $ref = $('.tab-container li.tab'); 411 options = options || {}; 412 options['animationSpeed'] = options['animationSpeed'] || 'fast'; 413 $(selector).easytabs(options); 414 415} 416 417 418/* Contaact Map */ 419var map; 420function contactusMap() { 421 422 var myLatlng, mapOptions, marker; 423 var myLatlng = new google.maps.LatLng(37.775133, -122.419289); 424 425 mapOptions = { 426 zoom: 11, 427 center: myLatlng, 428 scrollwheel: false, 429 mapTypeId: google.maps.MapTypeId.ROADMAP 430 }; 431 432 map = new google.maps.Map(document.getElementById('contact_map'), mapOptions); 433 434 marker = new google.maps.Marker({ 435 position: myLatlng, 436 map: map, 437 title: 'Arwa' 438 }); 439} 440 441 442/** 443 * Form Validation Helper 444 */ 445function form_validation(selector) { 446 var errorContainerOpen = '<div class="span1 error_container" ><div class="error-box">', 447 errorContainerClose = '<i class="icon-remove"></i></div></div>'; 448 /* Contact From Validation */ 449 $(selector).validate({ 450 errorClass: "input_error", 451 errorElement: "span" 452 }); 453 454 /* Close error lister */ 455 $('.form-wrapper').on('click', '.error-box .icon-remove', function() { 456 var $boxContainer = $(this).parents('.error_container').first(); 457 $boxContainer.fadeOut('fast', function() { 458 $boxContainer.remove(); 459 }); 460 }); 461 462} 463 464 465/** 466 * Embed Video 467 */ 468function embed_video_processing() { 469 470 var youtube_template = '<iframe src="https://www.youtube.com/embed/{{id}}" frameborder="0" allowfullscreen="" width="100%" height="100%" allowfullscreen></iframe>', 471 vimeo_template = '<iframe src="https://player.vimeo.com/video/{{id}}?color=ffffff" frameborder="0" allowfullscreen="" width="100%" height="360"></iframe>', 472 soundcloud_template = '<iframe src="https://w.soundcloud.com/player/?url={{id}}" frameborder="0" allowfullscreen="" width="100%" height="166"></iframe>', 473 dzen_template = '<iframe src="{{url}}" frameborder="0" scrolling="no" allow="autoplay; fullscreen; accelerometer; gyroscope; picture-in-picture; encrypted-media" allowfullscreen width="100%" height="360"></iframe>', 474 iframe_template = '<iframe src="{{url}}" frameborder="0" allowfullscreen="" width="100%" height="360"></iframe>', 475 template, id, url; 476 477 $('.blog-post-youtube,.blog-post-vimeo,.blog-post-soundcloud,.blog-post-dzen,.blog-post-iframe').each(function() { 478 id = false; 479 url = false; 480 481 //youtube 482 if ($(this).hasClass('blog-post-youtube')) { 483 id = getYoutubeId($(this).attr('href')); 484 template = youtube_template; 485 } 486 //vimeo 487 else if ($(this).hasClass('blog-post-vimeo')) { 488 id = getVimeoId($(this).attr('href')); 489 template = vimeo_template; 490 } 491 //sound clound 492 else if ($(this).hasClass('blog-post-soundcloud')) { 493 id = $(this).attr('href'); 494 template = soundcloud_template; 495 } 496 //dzen 497 else if ($(this).hasClass('blog-post-dzen')) { 498 url = normalizeDzenUrl($(this).attr('href')); 499 template = dzen_template; 500 } 501 //generic iframe 502 else if ($(this).hasClass('blog-post-iframe')) { 503 url = normalizeIframeUrl($(this).attr('href')); 504 template = iframe_template; 505 } 506 507 if (id !== false) { 508 //process the template 509 $(this).replaceWith(template.replace('{{id}}', id)); 510 } 511 else if (url !== false) { 512 $(this).replaceWith(template.replace('{{url}}', url)); 513 } 514 515 }); 516 517} 518 519/*** 520 * Get youtube url. 521 * 522 * @param url 523 * @returns {*} 524 */ 525function getYoutubeId(url) { 526 var regExp = /^.*((youtu.[\w]{1,3}\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; 527 var match = url.match(regExp); 528 if (match && match[7].length == 11) { 529 return match[7]; 530 } else { 531 return false;
532 } 533} 534/*** 535 * Get vimeo url. 536 * 537 * @param url 538 * @returns {*} 539 */ 540function getVimeoId(url) { 541 var regExp = /http:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/; 542 var match = url.match(regExp); 543 544 if (match) { 545 return match[2]; 546 } else { 547 return false; 548 } 549} 550 551/*** 552 * Normalize Dzen embed/watch url for iframe src. 553 * 554 * Accepts: 555 * - https://dzen.ru/embed/<id>... 556 * - https://dzen.ru/video/watch/<id>... 557 * - old Zen links that contain /video/watch/ 558 */ 559function normalizeDzenUrl(url) { 560 if (!url) return false; 561 try { 562 // trim spaces that may appear from CMS 563 url = String(url).trim(); 564 } catch (e) { 565 return false; 566 } 567 568 // allow only known Dzen/Zen video URL patterns 569 var m = url.match(/^https?:\/\/(?:dzen\.ru)\/(embed|video\/watch)\/([A-Za-z0-9_-]+)/i); 570 if (m) return url; 571 572 // legacy zen.yandex.ru URLs; keep as-is if it clearly points to video/watch 573 if (/^https?:\/\/zen\.yandex\.ru\//i.test(url) && /\/video\/watch\//i.test(url)) { 574 return url; 575 } 576 577 return false; 578} 579 580/*** 581 * Basic allowlist-ish normalization for generic iframe src. 582 * (Some platforms will still refuse framing via headers.) 583 */ 584function normalizeIframeUrl(url) { 585 if (!url) return false; 586 try { 587 url = String(url).trim(); 588 } catch (e) { 589 return false; 590 } 591 592 // allow only http(s) URLs 593 if (!/^https?:\/\//i.test(url)) return false; 594 return url; 595} 596 597 598/* 599 * Arwa Accordion 600 * Written specially for Arwa Theme 601 */ 602function ArwaAccordion(selector) { 603 604 $(document).on('click', selector + ' .accordion-row .title,' + selector + ' .accordion-row .open-icon', function() { 605 606 var me = this, 607 accordion = $(this).parents('.accordion'), 608 $prev, 609 $accRow = $(this), 610 $accTitle = $accRow.parent(), $this, icon, desc, title, activeRow, 611 $accRow = $accTitle.parent(), 612 toggle = accordion.data('toggle') == 'on' ? true : false; 613 614 615 if (toggle === true) { 616 617 icon = $accTitle.find('.open-icon'); 618 desc = $accTitle.find('.desc'); 619 title = $accTitle.find('.title'); 620 621 if ($accTitle.find('.close-icon').length > 0) { 622 desc.slideUp('fast'); 623 icon.removeClass('close-icon'); 624 title.removeClass('active'); 625 } 626 else { 627 desc.slideDown('fast'); 628 icon.addClass('close-icon'); 629 title.addClass('active'); 630 } 631 632 } 633 else { 634 $accRow.find('.accordion-row').each(function() { 635 636 $this = $(this); 637 icon = $this.find('.open-icon'); 638 desc = $this.find('.desc'); 639 title = $this.find('.title'); 640 641 /* if this the one which is clicked , slide up */ 642 if ($accTitle[0] != this) { 643 desc.slideUp('fast'); 644 icon.removeClass('close-icon'); 645 title.removeClass('active'); 646 } 647 648 else { 649 desc.slideDown('fast'); 650 icon.addClass('close-icon'); 651 title.addClass('active'); 652 } 653 654 }); 655 } 656 657 }); 658 659 660 // active div 661 $(selector).each(function() { 662 663 var $this = $(this), icon, desc, title, activeRow, 664 activeIndex = parseInt($this.data('active-index')), 665 activeIndex = activeIndex < 0 ? false : activeIndex; 666 667 if (activeIndex !== false) { 668 activeRow = $this.find('.accordion-row').eq(activeIndex); 669 icon = activeRow.find('.open-icon'); 670 desc = activeRow.find('.desc'); 671 title = activeRow.find('.title'); 672 673 desc.slideDown('fast'); 674 icon.addClass('close-icon'); 675 title.addClass('active'); 676 } 677 678 }); 679 680 681} 682 683/* Sticky Menu */ 684function stickyMenu() { 685 686 if ($(window).width() < 980) { 687 $('.sticky-navigation,#to-top-button').hide(); 688 } 689 else { 690 $(window).scroll(function() { 691 if ($(window).scrollTop() > 35) { 692 $('#header').addClass('sticky-header'); 693 $('.sticky-navigation,#to-top-button').fadeIn(); 694 } 695 else { 696 $('#header').removeClass('sticky-header'); 697 $('.sticky-navigation,#to-top-button').fadeOut(); 698 } 699 }); 700 } 701} 702 703/* Centering Bullets */ 704function centeringBullets() { 705 //Bullets center fixing in revolution slide 706 $('.simplebullets,.slider-fixed-frame .home-bullets').each(function() { 707 var $this = $(this), w = $this.width(); 708 $this.css('margin-left', -(w / 2) + 'px'); 709 }); 710 711}
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.