1// JavaScript Document 2 3 /*----------------------------------------------------*/ 4 /* Mobile Menu Toggle 5 /*----------------------------------------------------*/ 6 $(document).ready(function() { 7 8 "use strict"; 9 10 $('.navbar-nav li a').click(function() { 11 $('#navigation-menu').css("height", "1px").removeClass("in").addClass("collapse"); 12 $('#navigation-menu').removeClass("open"); 13 }); 14 }); 15 16 17 /*----------------------------------------------------*/ 18 /* OnScroll Animation 19 /*----------------------------------------------------*/ 20 21 $(document).ready(function(){ 22 23 "use strict"; 24 25 $('.animated').css('opacity', '0'); 26 27 $('.triggerAnimation').waypoint(function() { 28 var animation = $(this).attr('data-animate'); 29 $(this).css('opacity', ''); 30 $(this).addClass("animated " + animation); 31 32 }, 33 { 34 offset: '95%', 35 triggerOnce: true 36 } 37 ); 38 39 }); 40 41 42 /*----------------------------------------------------*/ 43 /* Parallax 44 /*----------------------------------------------------*/ 45 46 $(window).bind('load', function() { 47 48 "use strict";
49 parallaxInit(); 50 51 }); 52 53 function parallaxInit() { 54 $('#call_to_action').parallax("30%", 0.3); 55 $('#video').parallax("30%", 0.3); 56 } 57 58 59 /*----------------------------------------------------*/ 60 /* ScrollUp 61 /*----------------------------------------------------*/ 62 /** 63 * scrollUp v1.1.0 64 * Author: Mark Goodyear - http://www.markgoodyear.com 65 * Git: https://github.com/markgoodyear/scrollup 66 * 67 * Copyright 2013 Mark Goodyear 68 * Licensed under the MIT license 69 * http://www.opensource.org/licenses/mit-license.php 70 */ 71 72 $(document).ready(function(){ 73 74 'use strict'; 75 76 $.scrollUp = function (options) { 77 78 // Defaults 79 var defaults = { 80 scrollName: 'scrollUp', // Element ID 81 topDistance: 600, // Distance from top before showing element (px) 82 topSpeed: 1200, // Speed back to top (ms) 83 animation: 'fade', // Fade, slide, none 84 animationInSpeed: 200, // Animation in speed (ms) 85 animationOutSpeed: 200, // Animation out speed (ms) 86 scrollText: '', // Text for element 87 scrollImg: false, // Set true to use image 88 activeOverlay: false // Set CSS color to display scrollUp active point, e.g '#00FFFF' 89 }; 90 91 var o = $.extend({}, defaults, options), 92 scrollId = '#' + o.scrollName; 93 94 // Create element 95 $('<a/>', { 96 id: o.scrollName, 97 href: '#top', 98 title: o.scrollText 99 }).appendTo('body'); 100 101 // If not using an image display text 102 if (!o.scrollImg) { 103 $(scrollId).text(o.scrollText); 104 } 105 106 // Minium CSS to make the magic happen 107 $(scrollId).css({'display':'none','position': 'fixed','z-index': '2147483647'}); 108 109 // Active point overlay 110 if (o.activeOverlay) { 111 $("body").append("<div id='"+ o.scrollName +"-active'></div>"); 112 $(scrollId+"-active").css({ 'position': 'absolute', 'top': o.topDistance+'px', 'width': '100%', 'border-top': '1px dotted '+o.activeOverlay, 'z-index': '2147483647' }); 113 } 114 115 // Scroll function 116 $(window).scroll(function(){ 117 switch (o.animation) { 118 case "fade": 119 $( ($(window).scrollTop() > o.topDistance) ? $(scrollId).fadeIn(o.animationInSpeed) : $(scrollId).fadeOut(o.animationOutSpeed) ); 120 break; 121 case "slide": 122 $( ($(window).scrollTop() > o.topDistance) ? $(scrollId).slideDown(o.animationInSpeed) : $(scrollId).slideUp(o.animationOutSpeed) ); 123 break; 124 default: 125 $( ($(window).scrollTop() > o.topDistance) ? $(scrollId).show(0) : $(scrollId).hide(0) ); 126 } 127 }); 128 129 // To the top 130 $(scrollId).click( function(event) { 131 $('html, body').animate({scrollTop:0}, o.topSpeed); 132 event.preventDefault(); 133 }); 134 135 }; 136 137 $.scrollUp(); 138 139 }); 140 141 142 /*----------------------------------------------------*/ 143 /* Testimonials Rotator 144 /*----------------------------------------------------*/ 145 146 $(document).ready(function(){ 147 148 "use strict"; 149 150 $('.flexslider').flexslider({ 151 animation: "fade", 152 controlNav: true, 153 directionNav: false, 154 slideshowSpeed: 4000, 155 animationSpeed: 800, 156 start: function(slider){ 157 $('body').removeClass('loading'); 158 } 159 }); 160 161 }); 162 163 164 /*----------------------------------------------------*/ 165 /* Animated Scroll To Anchor 166 /*----------------------------------------------------*/ 167 /** 168 * Animated Scroll To Anchor v0.3 169 * Author: David Vogeleer 170 * http://www.individual11.com/ 171 * 172 * THANKS: 173 * 174 * -> solution for setting the hash without jumping the page -> Lea Verou : http://leaverou.me/2011/05/change-url-hash-without-page-jump/ 175 * -> Add stop - Joe Mafia 176 * -> add some easing - Daniel Garcia 177 * -> added use strict, cleaned up some white space adn added conditional for anchors without hashtag -> Bret Morris, https://github.com/bretmorris 178 * 179 * TODO: 180 * -> Add hashchange support, but make it optional http://leaverou.me/2011/05/get-your-hash-the-bulletproof-way/ 181 * 182 * Licensed under the MIT license. 183 * http://www.opensource.org/licenses/mit-license.php 184 * 185 */ 186 187 $(document).ready(function(){ 188 189 "use strict"; 190 191 $.fn.scrollTo = function( options ) { 192 193 var settings = { 194 offset : -60, //an integer allowing you to offset the position by a certain
194number of pixels. Can be negative or positive 195 speed : 'slow', //speed at which the scroll animates 196 override : null, //if you want to override the default way this plugin works, pass in the ID of the element you want to scroll through here 197 easing : null //easing equation for the animation. Supports easing plugin as well (http://gsgd.co.uk/sandbox/jquery/easing/) 198 }; 199 200 if (options) { 201 if(options.override){ 202 //if they choose to override, make sure the hash is there 203 options.override = (override('#') != -1)? options.override:'#' + options.override; 204 } 205 $.extend( settings, options ); 206 } 207 208 return this.each(function(i, el){ 209 $(el).click(function(e){ 210 var idToLookAt; 211 if ($(el).attr('href').match(/#/) !== null) { 212 e.preventDefault(); 213 idToLookAt = (settings.override)? settings.override:$(el).attr('href');//see if the user is forcing an ID they want to use 214 //if the browser supports it, we push the hash into the pushState for better linking later 215 if(history.pushState){ 216 history.pushState(null, null, idToLookAt); 217 $('html,body').stop().animate({scrollTop: $(idToLookAt).offset().top + settings.offset}, settings.speed, settings.easing); 218 }else{ 219 //if the browser doesn't support pushState, we set the hash after the animation, which may cause issues if you use offset 220 $('html,body').stop().animate({scrollTop: $(idToLookAt).offset().top + settings.offset}, settings.speed, settings.easing,function(e){ 221 //set the hash of the window for better linking 222 window.location.hash = idToLookAt; 223 }); 224 } 225 } 226 }); 227 }); 228 }; 229 230 $('#GoToStart, #GoToFeatures, #GoToResult, #GoToAbout, #GoToTestimonials, #GoToPricing' ).scrollTo({ speed: 1400 }); 231 232 }); 233 234 235 /*----------------------------------------------------*/ 236 /* Current Menu Item 237 /*----------------------------------------------------*/ 238 239 $(document).ready(function() { 240 241 //Bootstraping variable 242 headerWrapper = parseInt($('#navigation-menu').height()); 243 offsetTolerance = 250; 244 245 //Detecting user's scroll 246 $(window).scroll(function() { 247 248 //Check scroll position 249 scrollPosition = parseInt($(this).scrollTop()); 250 251 //Move trough each menu and check its position with scroll position then add selected-nav class 252 $('.navbar-nav > li > a').each(function() { 253 254 thisHref = $(this).attr('href'); 255 thisTruePosition = parseInt($(thisHref).offset().top); 256 thisPosition = thisTruePosition - headerWrapper - offsetTolerance; 257 258 if(scrollPosition >= thisPosition) { 259 260 $('.selected-nav').removeClass('selected-nav'); 261 $('.navbar-nav > li > a[href='+ thisHref +']').addClass('selected-nav'); 262 263 } 264 }); 265 266 267 //If we're at the bottom of the page, move pointer to the last section 268 bottomPage = parseInt($(document).height()) - parseInt($(window).height()); 269 270 if(scrollPosition == bottomPage || scrollPosition >= bottomPage) { 271 272 $('.selected-nav').removeClass('selected-nav'); 273 $('.navbar-nav > li > a:last').addClass('selected-nav'); 274 } 275 }); 276 277 }); 278 279 280 /*----------------------------------------------------*/ 281 /* Portfolio Lightbox 282 /*----------------------------------------------------*/ 283 284 $(document).ready(function(){ 285 286 "use strict"; 287 288 $("a[class^='prettyPhoto']").prettyPhoto(); 289 290 }); 291 292 293 /*----------------------------------------------------*/ 294 /* Clients Carousel 295 /*----------------------------------------------------*/ 296 297 $(document).ready(function(){ 298 299 "use strict"; 300 301 $("#our-customers").owlCarousel({ 302 303 slideSpeed : 600, 304 items : 6, 305 itemsDesktop : [1199,5], 306 itemsDesktopSmall : [960,4], 307 itemsTablet: [768,3], 308 itemsMobile : [480,2], 309 navigation:true, 310 pagination:false, 311 navigationText : false 312 313 }); 314 315 // Carousel Navigation 316 $(".next").click(function(){ 317 $("#our-customers").trigger('owl.next'); 318 }) 319 320 $(".prev").click(function(){ 321 $("#our-customers").trigger('owl.prev'); 322 }) 323 324 325 }); 326 327 328 329 /*----------------------------------------------------*/ 330 /* Newsletter Subscribe Form 331 /*----------------------------------------------------*/ 332 333 $(document).ready(function() { 334 335 "use strict"; 336 337 $('#newsletter_form').submit(function() { 338 if (!valid_email_address($("#s_email").val())) 339 { 340 $(".message").html("<span style='color:red;'>
340The email address you entered was invalid. Please make sure you enter a valid email address to subscribe.</span>"); 341 } 342 else 343 { 344 $(".message").html("<span style='color:#19acca;'>Adding your email address...</span>"); 345 $.ajax({ 346 url: 'subscribe.php', 347 data: $('#newsletter_form').serialize(), 348 type: 'POST', 349 success: function(msg) { 350 if(msg=="success") 351 { 352 $("#s_email").val(""); 353 $(".message").html('<span style="color:#19acca;">You have successfully subscribed to our mailing list.</span>'); 354 } 355 else 356 { 357 $(".message").html("<span style='color:red;'>The email address you entered was invalid. Please make sure you enter a valid email address to subscribe.</span>"); 358 } 359 } 360 }); 361 } 362 363 return false; 364 }); 365 366 }); 367 368 function valid_email_address(email) { 369 var pattern = new RegExp(/^[+a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i); 370 return pattern.test(email); 371 } 372 373$(document).ready(function(){ 374 $('#pricing-table-holder .btn-check-me').click(function(){ 375 var st = $(this).parent().siblings('.price-header').children('.plan-title').html(); 376 $('#orderModalLabel').html("СÑÑаÑÐµÐ³Ð¸Ñ «" + st + "»"); 377 $('#askFormModal [name="strategy"]').val(st); 378 }); 379}); 380 381(function(){ 382 var a = document.querySelector('#fixme'), b = null, P = 60; // еÑли Ð½Ð¾Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ð¸ÑÑ Ð½Ð° ÑиÑло, Ñо блок бÑÐ´ÐµÑ Ð¿ÑилипаÑÑ Ð´Ð¾ Ñого, как веÑÑ Ð½Ð¸Ð¹ кÑай окна бÑаÑзеÑа дойдÑÑ Ð´Ð¾ веÑÑ Ð½ÐµÐ³Ð¾ кÑÐ°Ñ ÑлеменÑа. ÐÐ¾Ð¶ÐµÑ Ð±ÑÑÑ Ð¾ÑÑиÑаÑелÑнÑм ÑиÑлом 383 window.addEventListener('scroll', Ascroll, false); 384 document.body.addEventListener('scroll', Ascroll, false); 385 function Ascroll() { 386 if (b == null) { 387 var Sa = getComputedStyle(a, ''), s = ''; 388 for (var i = 0; i < Sa.length; i++) { 389 if (Sa[i].indexOf('box-sizing') == 0 || Sa[i].indexOf('overflow') == 0 || Sa[i].indexOf('width') == 0 || Sa[i].indexOf('padding') == 0 || Sa[i].indexOf('border') == 0 || Sa[i].indexOf('outline') == 0 || Sa[i].indexOf('box-shadow') == 0 || Sa[i].indexOf('background') == 0) { 390 s += Sa[i] + ': ' +Sa.getPropertyValue(Sa[i]) + '; ' 391 } 392 } 393 s = 'width: ' + Sa['width'] + '; height: ' + Sa['height']; 394 a.innerHTML = '<div class="zzz" style="'+s+'">'+a.innerHTML+'</div>'; 395 b = a.children[0]; 396 a.style.height = b.getBoundingClientRect().height + 'px'; 397 a.style.padding = '0'; 398 a.style.border = '0'; 399 } 400 var Ra = a.getBoundingClientRect(), 401 R = Math.round(Ra.top + b.getBoundingClientRect().height - document.querySelector('#otkating').getBoundingClientRect().top + 250); // ÑелекÑÐ¾Ñ Ð±Ð»Ð¾ÐºÐ°, пÑи доÑÑижении веÑÑ Ð½ÐµÐ³Ð¾ кÑÐ°Ñ ÐºÐ¾ÑоÑого нÑжно оÑкÑепиÑÑ Ð¿ÑилипаÑÑий ÑлеменÑ; Math.round() ÑолÑко Ð´Ð»Ñ IE; еÑли Ð½Ð¾Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ð¸ÑÑ Ð½Ð° ÑиÑло, Ñо блок бÑÐ´ÐµÑ Ð¿ÑилипаÑÑ Ð´Ð¾ Ñого, как нижний кÑай ÑлеменÑа дойдÑÑ Ð´Ð¾ ÑÑÑеÑа 402 if ((Ra.top - P) <= 0) { 403 console.log((Ra.top - P) + ' - R=' + R + ' - Ra.top=' + Ra.top + ' - b.height=' + b.getBoundingClientRect().height + ' otkating.top=' + document.querySelector('#otkating').getBoundingClientRect().top); 404 if ((Ra.top - P) < R) { 405 b.className = 'stop'; 406 b.style.top = 'auto'; 407 } else { 408 b.className = 'sticky'; 409 b.style.top = P + 'px'; 410 } 411 } else { 412 b.className = ''; 413 b.style.top = ''; 414 } 415 } 416})() 417 418document.addEventListener('DOMContentLoaded', function () { 419 // ÐÑовеÑÑем налиÑие cookie 'accepted' 420 if (!checkCookie('accepted')) { 421 showNotification(); 422 } 423}); 424 425// ФÑнкÑÐ¸Ñ Ð¿Ð¾ÐºÐ°Ð·Ð° ÑÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ 426function showNotification() { 427 const notification = document.getElementById('metrikaNotification'); 428 notification.classList.remove('hidden'); 429} 430 431// ÐÑинÑÑие ÑоглаÑÐ¸Ñ Ð¸ ÑÑÑановка кÑки 432function acceptCookies() {
433 setCookie('accepted', true, { expiresInDays: 365 }); 434 hideNotification(); 435} 436 437// СкÑÑÑие ÑÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ 438function hideNotification() { 439 const notification = document.getElementById('metrikaNotification'); 440 notification.classList.add('hidden'); 441} 442 443// УÑÑановка Cookie 444function setCookie(name, value, options={}) { 445 let cookieString = `${name}=${value}`; 446 447 if(options.expiresInDays){ 448 let date = new Date(); 449 date.setTime(date.getTime() + (options.expiresInDays * 24 * 60 * 60 * 1000)); 450 cookieString += `;expires=${date.toUTCString()}`; 451 } 452 453 document.cookie = cookieString; 454} 455 456// ÐолÑÑение знаÑÐµÐ½Ð¸Ñ Cookie 457function checkCookie(name) { 458 return !!document.cookie.split(`;`).find(row => row.trim().startsWith(`${name}=`)); 459}
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.