/*!
* Vitality v1.3.5 (http://themes.startbootstrap.com/vitality-v1.3.5)
* Copyright 2013-2015 Start Bootstrap Themes
* To use this theme you must have a license purchased at WrapBootstrap (https://wrapbootstrap.com)
*/
(function($) {
"use strict"; // Start of use strict
// Smooth Scrolling: Smooth scrolls to an ID on the current page.
// To use this feature, add a link on your page that links to an ID, and add the .page-scroll class to the link itself. See the docs for more details.
$('a.page-scroll').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: ($($anchor.attr('href')).offset().top - 0)
}, 1250, 'easeInOutExpo');
event.preventDefault();
});
// Activates floating label headings for the contact form.
$("body").on("input propertychange", ".floating-label-form-group", function(e) {
$(this).toggleClass("floating-label-form-group-with-value", !!$(e.target).val());
}).on("focus", ".floating-label-form-group", function() {
$(this).addClass("floating-label-form-group-with-focus");
}).on("blur", ".floating-label-form-group", function() {
$(this).removeClass("floating-label-form-group-with-focus");
});
// Closes the Responsive Menu on Menu Item Click
$('.navbar-collapse ul li a').click(function() {
$('.navbar-toggle:visible').click();
});
// Owl Carousel Settings
$(".about-carousel").owlCarousel({
items: 3,
navigation: true,
pagination: false,
navigationText: [
"",
""
],
});
$(".portfolio-carousel").owlCarousel({
singleItem: true,
navigation: true,
pagination: false,
navigationText: [
"",
""
],
autoHeight: true,
mouseDrag: false,
touchDrag: false,
transitionStyle: "fadeUp"
});
$(".testimonials-carousel").owlCarousel({
singleItem: true,
navigation: true,
pagination: true,
autoHeight: true,
navigationText: [
"",
""
],
transitionStyle: "backSlide"
});
$(".portfolio-gallery").owlCarousel({
items: 3,
});
// Magnific Popup jQuery Lightbox Gallery Settings
$('.gallery-link').magnificPopup({
type: 'image',
gallery: {
enabled: true
},
image: {
titleSrc: 'title'
}
});
// Formstone Background - Video Background Settings
var base_url = '/home/';
$("header.video").background({
source: {
poster: base_url+"assets/img/bg-mobile-fallback.jpg",
mp4: base_url+"assets/mp4/InteractiveAvatarCreator.mp4"
}
});
// Scrollspy: Highlights the navigation menu items while scrolling.
$('body').scrollspy({
target: '.navbar-fixed-top',
offset: 51
})
// Portfolio Filtering Scripts & Hover Effect
var filterList = {
init: function() {
// MixItUp plugin
// http://mixitup.io
$('#portfoliolist').mixitup({
targetSelector: '.portfolio',
filterSelector: '.filter',
effects: ['fade'],
easing: 'snap',
// call the hover effect
onMixEnd: filterList.hoverEffect()
});
},
hoverEffect: function() {
// Simple parallax effect
$('#portfoliolist .portfolio').hover(
function() {
$(this).find('.caption').stop().animate({
bottom: 0
}, 200, 'easeOutQuad');
$(this).find('img').stop().animate({
top: -20
}, 300, 'easeOutQuad');
},
function() {
$(this).find('.caption').stop().animate({
bottom: -75
}, 200, 'easeInQuad');
$(this).find('img').stop().animate({
top: 0
}, 300, 'easeOutQuad');
}
);
}
};
filterList.init();
})(jQuery); // End of use strict
// Load WOW.js on non-touch devices
var isPhoneDevice = "ontouchstart" in document.documentElement;
$(document).ready(function() {
if (isPhoneDevice) {
//mobile
} else {
//desktop
// Initialize WOW.js
wow = new WOW({
offset: 50
})
wow.init();
}
});