(function($) { $.fn.menumaker = function(options) { var cssmenu = $(this), settings = $.extend({ title: "", format: "dropdown", sticky: false }, options); return this.each(function() { cssmenu.prepend(''); $(this).find("#menu-button").on('click', function(){ $(this).toggleClass('menu-opened'); var mainmenu = $(this).next('ul'); if (mainmenu.hasClass('open')) { mainmenu.hide().removeClass('open'); } else { mainmenu.show().addClass('open'); if (settings.format === "dropdown") { mainmenu.find('ul').show(); } } }); cssmenu.find('li ul').parent().addClass('has-sub'); multiTg = function() { cssmenu.find(".has-sub").prepend(''); cssmenu.find('.submenu-button').on('click', function() { $(this).toggleClass('submenu-opened'); if ($(this).siblings('ul').hasClass('open')) { $(this).siblings('ul').removeClass('open').hide(); } else { $(this).siblings('ul').addClass('open').show(); } }); }; if (settings.format === 'multitoggle') multiTg(); else cssmenu.addClass('dropdown'); if (settings.sticky === true) cssmenu.css('position', 'fixed'); resizeFix = function() { if ($( window ).width() > 1023) { cssmenu.find('ul').show(); } if ($(window).width() <= 1023) { cssmenu.find('ul').hide().removeClass('open'); } }; resizeFix(); return $(window).on('resize', resizeFix); }); }; })(jQuery); (function($){ $(document).ready(function(){ $("#cssmenu").menumaker({ title: "", format: "multitoggle" }); }); })(jQuery); function maxSymbols ($elem, num, fadeLength) { if($elem.hasClass('leave_as_is')) return; var text = $elem.text(), temp = text.split(''), step, fade, result; if (!fadeLength) { fadeLength = 20; } fade = temp.slice(num - fadeLength, num); temp.length = num - fadeLength; result = temp.join(''); for (var i = 0; i < fadeLength; i++) { step = +(1 - (1 / fadeLength * i)).toFixed(2); result += '' + fade[i] + ''; } $elem.html(result); } maxSymbols($('.text'), 930, 20); //$(document).on('ready', function() { //$('.progress').each(function(){ //var load = $(this).data('load'), //load_max = $(this).data('maxLoad'), //deduction = (load * 100)/load_max; //$(this).children('div').stop().animate({width:parseInt(deduction) + "%"},1000); //}); //}); (function() { function $(id){ return document.getElementById(id); } function goTop(acceleration, time) { acceleration = acceleration || 0.1; time = time || 12; var dx = 0; var dy = 0; var bx = 0; var by = 0; var wx = 0; var wy = 0; if (document.documentElement) { dx = document.documentElement.scrollLeft || 0; dy = document.documentElement.scrollTop || 0; } if (document.body) { bx = document.body.scrollLeft || 0; by = document.body.scrollTop || 0; } var wx = window.scrollX || 0; var wy = window.scrollY || 0; var x = Math.max(wx, Math.max(bx, dx)); var y = Math.max(wy, Math.max(by, dy)); var speed = 1 + acceleration; window.scrollTo(Math.floor(x / speed), Math.floor(y / speed)); if(x > 0 || y > 0) { var invokeFunction = "top.goTop(" + acceleration + ", " + time + ")" window.setTimeout(invokeFunction, time); } return false; } function scrollTop(){ var el = $('gotop'); var stop = (document.body.scrollTop || document.documentElement.scrollTop); if(stop>400){ if(el.style.display!='block'){ el.style.display='block'; smoothopaque(el, 0, 100, 1); } } else el.style.display='none'; return false; } function smoothopaque(el, startop, endop, inc){ op = startop; setopacity(el, op); setTimeout(slowopacity, 1); function slowopacity(){ if(startop < endop){ op = op + inc; if(op < endop){ setTimeout(slowopacity, 1); } }else{ op = op - inc; if(op > endop){ setTimeout(slowopacity, 1); } } setopacity(el, op); }; }; function setopacity(el, opacity){ el.style.opacity = (opacity/100); el.style.filter = 'alpha(opacity=' + opacity + ')'; }; if (window.addEventListener){ window.addEventListener("scroll", scrollTop, false); window.addEventListener("load", scrollTop, false); } else if (window.attachEvent){ window.attachEvent("onscroll", scrollTop); window.attachEvent("onload", scrollTop); } window['top'] = {}; window['top']['goTop'] = goTop; })();