//Ann Hammer custom.js
jQuery(document).ready(function ($) {
$('.front .cover-title-inner .col-xs-12').html(' \
');
$('.front .cover-title-inner').fadeIn(2000);
$('.footer-top-left').prepend('');
//If in customizer, ensure contact form hash value is set to ts
if ( (window.location.href.indexOf("?editkey=") > -1) ) {
$('#home-bodycontent #get-in-touch #contact-form #justintime').val('ts');
}
});
//Add jQuery Count Up
var a = 0;
jQuery(window).scroll(function($) {
var cBox = jQuery('.counter-box');
if (cBox.length) {
var oTop = jQuery('.counter-box').offset().top - window.innerHeight;
if (a == 0 && jQuery(window).scrollTop() > oTop) {
jQuery('.counter').each(function() {
var $this = jQuery(this),
countTo = $this.attr('data-count');
$this.text('0');
jQuery({
countNum: $this.text()
}).animate({
countNum: countTo
},
{
duration: 3000,
easing: 'swing',
step: function() {
$this.text(Math.floor(this.countNum));
},
complete: function() {
$this.text(this.countNum);
}
});
});
a = 1;
}
}
});