// Smooth scroll blocking
document.addEventListener( 'DOMContentLoaded', function() {
if ( 'onwheel' in document ) {
window.onwheel = function( event ) {
if( typeof( this.RDSmoothScroll ) !== undefined ) {
try { window.removeEventListener( 'DOMMouseScroll', this.RDSmoothScroll.prototype.onWheel ); } catch( error ) {}
event.stopPropagation();
}
};
} else if ( 'onmousewheel' in document ) {
window.onmousewheel= function( event ) {
if( typeof( this.RDSmoothScroll ) !== undefined ) {
try { window.removeEventListener( 'onmousewheel', this.RDSmoothScroll.prototype.onWheel ); } catch( error ) {}
event.stopPropagation();
}
};
}
try { $('body').unmousewheel(); } catch( error ) {}
});
function include(scriptUrl) {
document.write('');
}
function isIE() {
var myNav = navigator.userAgent.toLowerCase();
return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
};
/* ToTop
========================================================*/
;
(function ($) {
var o = $('html');
if (o.hasClass('desktop')) {
$(document).ready(function () {
$().UItoTop({
easingType: 'easeOutQuart',
containerClass: 'toTop fa fa-angle-up'
});
});
}
})(jQuery);
/* EqualHeights
========================================================*/
;
(function ($) {
var o = $('[data-equal-group]');
if (o.length > 0) {
}
})(jQuery);
/* SMOOTH SCROLLIG
========================================================*/
;
(function ($) {
var o = $('html');
if (o.hasClass('desktop')) {
$(document).ready(function () {
$.srSmoothscroll({
step: 150,
speed: 800
});
});
}
})(jQuery);
/* Copyright Year
========================================================*/
;
(function ($) {
var currentYear = (new Date).getFullYear();
$(document).ready(function () {
$("#copyright-year").text((new Date).getFullYear());
});
})(jQuery);
/* WOW
========================================================*/
;
(function ($) {
var o = $('html');
if ((navigator.userAgent.toLowerCase().indexOf('msie') == -1 ) || (isIE() && isIE() > 9)) {
if (o.hasClass('desktop')) {
$(document).ready(function () {
new WOW().init();
});
}
}
})(jQuery);
/* Orientation tablet fix
========================================================*/
$(function () {
// IPad/IPhone
var viewportmeta = document.querySelector && document.querySelector('meta[name="viewport"]'),
ua = navigator.userAgent,
gestureStart = function () {
viewportmeta.content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6, initial-scale=1.0";
},
scaleFix = function () {
if (viewportmeta && /iPhone|iPad/.test(ua) && !/Opera Mini/.test(ua)) {
viewportmeta.content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
document.addEventListener("gesturestart", gestureStart, false);
}
};
scaleFix();
// Menu Android
if (window.orientation != undefined) {
var regM = /ipod|ipad|iphone/gi,
result = ua.match(regM);
if (!result) {
$('.sf-menus li').each(function () {
if ($(">ul", this)[0]) {
$(">a", this).toggle(
function () {
return false;
},
function () {
window.location.href = $(this).attr("href");
}
);
}
})
}
}
});
var ua = navigator.userAgent.toLocaleLowerCase(),
regV = /ipod|ipad|iphone/gi,
result = ua.match(regV),
userScale = "";
if (!result) {
userScale = ",user-scalable=0"
}
document.write('');
/* FancyBox
========================================================*/
;(function ($) {
var o = $('.thumb');
if (o.length > 0) {
$(document).ready(function () {
o.fancybox();
});
}
})(jQuery);
/* Owl Carousel
========================================================*/
;(function ($) {
var o = $('.owl-carousel');
if (o.length > 0) {
$(document).ready(function () {
o.owlCarousel({
margin: 30,
smartSpeed: 450,
items: 1,
loop: true,
nav: true,
navClass: ['owl-prev', 'owl-next']
});
$('#owl-prev').on('click', function (e) {
o.trigger('prev.owl.carousel')
});
$('#owl-next').on('click', function (e) {
o.trigger('next.owl.carousel')
});
});
}
})(jQuery);
/* Google Map
========================================================*/
(function ($) {
var o = document.getElementById("google-map");
if (o) {
$(document).ready(function () {
var o = $('#google-map');
if (o.length > 0) {
o.googleMap({styles: [{"featureType":"landscape","stylers":[{"saturation":-100},{"lightness":65},{"visibility":"on"}]},{"featureType":"poi","stylers":[{"saturation":-100},{"lightness":51},{"visibility":"simplified"}]},{"featureType":"road.highway","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"road.arterial","stylers":[{"saturation":-100},{"lightness":30},{"visibility":"on"}]},{"featureType":"road.local","stylers":[{"saturation":-100},{"lightness":40},{"visibility":"on"}]},{"featureType":"transit","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"administrative.province","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":-25},{"saturation":-100}]},{"featureType":"water","elementType":"geometry","stylers":[{"hue":"#ffff00"},{"lightness":-25},{"saturation":-97}]}]});
}
});
}
})
(jQuery);