The website of Ura Design
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
3.4 KiB

6 years ago
jQuery(document).ready(function($){"use strict";$(document).foundation();if($('form#contact_form').length>0){$('form#contact_form').validate({messages:{},submitHandler:function(form){$.ajax({type:'POST',url:'send.php',data:$(form).serialize(),success:function(data){if(data.match(/success/)){$(form).trigger('reset');$('#thanks').show().fadeOut(5000);}}});return false;}});}
$('#menu-toggler').on('click',function(){$('.top-bar-section').toggle();return false;});if($('#slides').length>0){$('#slides').on('init.slides',function(){var that=this;setTimeout(function(){$('.slides-container',that).children().eq(0).addClass('active');},300);});$('#slides').superslides({animation:'fade',hashchange:false,play:15000});$('#slides').on('animated.slides',function(){$('.slides-container',this).children().removeClass('active');var index=$(this).superslides('current');var that=this;setTimeout(function(){$('.slides-container',that).children().eq(index).addClass('active');},300);});}
if($('.slides').length>0){$('.slides').slick({autoplay:true,pauseOnHover:false,dots:true,speed:1000,arrows:false});}
new WOW().init();var bars=$(".bars");for(var i=0;i<bars.length;i++){var bar=bars[i];var highlights=$('> li > .highlighted',$(bar));for(var j=0;j<highlights.length;j++){var highlight=highlights[j];$(highlight).appear(function(){var percent=$(this).attr("data-percent");$(this).animate({'width':percent+'%'},1700,function(){$(highlight).css('overflow','visible');});});}}
$(".milestone").appear(function(){$('.number',$(this)).countTo({speed:1400});});if($('.clients').length>0){$('.clients').slick({slidesToShow:5,slidesToScroll:1,autoplay:true,autoplaySpeed:3000,pauseOnHover:false,responsive:[{breakpoint:767,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:480,settings:{slidesToShow:2,slidesToScroll:1}}]});}
$('.back-to-top').on('click',function(){$("html, body").animate({scrollTop:0},1000);return false;});var masonryGallery=function(sel){var $ctx=$(sel);var items=$('.gallery li',$ctx);var gutter=$ctx.data('gutter');if(!gutter){gutter=0};for(var i=0;i<items.length;i++){var item=items[i];$(item).data('masonry-id',i);}
var msnry=new Masonry($('.gallery',$ctx)[0],{itemSelector:'li',gutter:gutter,isInitLayout:false,columnWidth:".gallery li:not(.wide)"});window.msnry=msnry;$('.gallery',$ctx).imagesLoaded(function(){msnry.layout();});$('.gallery-nav ul li a',$ctx).on('click',function(){$('.gallery-nav ul li').removeClass('current');$(this).closest('li').addClass('current');var cat=$(this).attr('data-cat');var gallery=$('.gallery-nav').closest('.masonry-gallery').find('ul.gallery');if(cat==='all'){var exists=$('.gallery li',$ctx);var elems=[];for(var i=0;i<items.length;i++){var item=items[i];var skip=false;for(var j=0;j<exists.length;j++){var exist=exists[j];if($(item).data('masonry-id')==$(exist).data('masonry-id')){skip=true;}}
if(!skip){($('.gallery',$ctx)[0]).appendChild($(item)[0]);elems.push($(item)[0]);}}
msnry.prepended(elems);}else{var lis=$('li',gallery);for(var i=0;i<lis.length;i++){var li=lis[i];if(!$(li).hasClass(cat)){msnry.remove($(li));}}
var exists=$('.gallery li',$ctx);var elems=[];for(var i=0;i<items.length;i++){var item=items[i];var skip=false;for(var j=0;j<exists.length;j++){var exist=exists[j];if($(item).data('masonry-id')==$(exist).data('masonry-id')){skip=true;}}
if($(item).hasClass(cat)&&!skip){($('.gallery',$ctx)[0]).appendChild($(item)[0]);elems.push($(item)[0]);}}
msnry.appended(elems);}
msnry.layout();return false;});}});