. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 52.223.31.75 / Your IP : 172.31.32.98 [ Web Server : Apache/2.4.66 () OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux ip-172-31-14-81.eu-central-1.compute.internal 4.14.281-212.502.amzn2.x86_64 #1 SMP Thu May 26 09:52:17 UTC 2022 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE Domains : 4 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/ripara.co/js/ |
Upload File : |
var isIEBrows =navigator.appVersion.indexOf("MSIE") != -1 || navigator.appVersion.indexOf('Trident/') > 0;
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
/**
* @function Include
* @description Includes an external scripts to the page
* @param {string} scriptUrl
*/
function include(scriptUrl) {
document.write('<script src="' + scriptUrl + '"></script>');
}
/**
* @function Include
* @description Lazy script initialization
*/
function lazyInit(element, func) {
var $win = jQuery(window),
wh = $win.height();
$win.on('load scroll', function () {
var st = $(this).scrollTop();
if (!element.hasClass('lazy-loaded')) {
var et = element.offset().top,
eb = element.offset().top + element.outerHeight();
if (st + wh > et - 100 && st < eb + 100) {
func.call();
element.addClass('lazy-loaded');
}
}
});
}
/**
* @function isIE
* @description checks if browser is an IE
* @returns {number} IE Version
*/
function isIE() {
var myNav = navigator.userAgent.toLowerCase();
return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
};
/**
* @module IE Fall&Polyfill
* @description Adds some loosing functionality to old IE browsers
*/
;
(function ($) {
if (isIE() && isIE() < 11) {
include('js/pointer-events.min.js');
$('html').addClass('lt-ie11');
$(document).ready(function () {
PointerEventsPolyfill.initialize({});
});
}
if (isIE() && isIE() < 10) {
$('html').addClass('lt-ie10');
}
})(jQuery);
/**
* @module Copyright
* @description Evaluates the copyright year
*/
;
(function ($) {
$(document).ready(function () {
$("#copyright-year").text((new Date).getFullYear());
});
})(jQuery);
/**
* @module WOW Animation
* @description Enables scroll animation on the page
*/
;
(function ($) {
var o = $('html');
if (o.hasClass('desktop') && o.hasClass("wow-animation") && $(".wow").length) {
$(document).ready(function () {
new WOW().init();
});
}
})(jQuery);
/**
* @module ToTop
* @description Enables ToTop Plugin
*/
;
(function ($) {
var o = $('html');
if (o.hasClass('desktop')) {
$(document).ready(function () {
$().UItoTop({
easingType: 'easeOutQuart',
containerClass: 'ui-to-top fa fa-angle-up'
});
});
}
})(jQuery);
/**
* @module Responsive Tabs
* @description Enables Easy Responsive Tabs Plugin
*/
;
(function ($) {
var o = $('.responsive-tabs');
if (o.length > 0) {
$(document).ready(function () {
o.each(function () {
var $this = $(this);
$this.easyResponsiveTabs({
type: $this.attr("data-type") === "accordion" ? "accordion" : "default"
});
})
});
}
})(jQuery);
/**
* @module RD Mailform
* @description Enables RD Mailform Plugin
;
(function ($) {
var o = $('.rd-mailform');
if (o.length > 0) {
$(document).ready(function () {
var o = $('.rd-mailform');
if (o.length) {
o.rdMailForm({
validator: {
'constraints': {
'@LettersOnly': {
message: 'Perfavore usa solamente lettere.'
},
'@NumbersOnly': {
message: 'Perfavore usa solamente numeri.'
},
'@NotEmpty': {
message: 'Questo campo deve essere compilato.'
},
'@Email': {
message: 'Indirizzo email non valido.'
},
'@Phone': {
message: 'Numero di telefono non valido.'
},
'@Date': {
message: 'Usa il formato MM/DD/YYYY.'
},
'@SelectRequired': {
message: 'Perfavore scegli un opzione.'
}
}
}
}, {
'MF000': 'Inviata',
'MF001': 'Recipients are not set.',
'MF002': 'Form will not work locally.',
'MF003': 'Please define email field in your form.',
'MF004': 'Please define the type of your form.',
'MF254': 'Something went wrong with PHPMailer.',
'MF255': 'There was an error submitting the form.'
});
}
});
}
})(jQuery);
/**
* @module RD Google Map
* @description Enables RD Google Map Plugin
*/
;
(function ($) {
var o = $('#google-map');
if (o.length) {
include('//maps.google.com/maps/api/js');
$(document).ready(function () {
var head = document.getElementsByTagName('head')[0],
insertBefore = head.insertBefore;
head.insertBefore = function (newElement, referenceElement) {
if (newElement.href && newElement.href.indexOf('//fonts.googleapis.com/css?family=Roboto') != -1 || newElement.innerHTML.indexOf('gm-style') != -1) {
return;
}
insertBefore.call(head, newElement, referenceElement);
};
lazyInit(o, function () {
o.googleMap({
styles: []
});
});
});
}
})(jQuery);
/**
* @module RD Navbar
* @description Enables RD Navbar Plugin
*/
;
(function ($) {
var o = $('.rd-navbar');
if (o.length > 0) {
$(document).ready(function () {
o.RDNavbar({
stuckWidth: 768,
stuckMorph: true,
stuckLayout: "rd-navbar-static",
responsive: {
0: {
layout: 'rd-navbar-fixed',
focusOnHover: false
},
1200: {
layout: o.attr("data-rd-navbar-lg").split(" ")[0],
}
},
onepage: {
enable: false,
offset: 0,
speed: 400
}
});
});
}
})(jQuery);
/**
* @module Magnific Popup
* @description Enables Magnific Popup Plugin
*/
;
(function ($) {
var o = $('[data-lightbox]').not('[data-lightbox="gallery"] [data-lightbox]'),
g = $('[data-lightbox^="gallery"]');
if (o.length > 0 || g.length > 0) {
$(document).ready(function () {
if (o.length) {
o.each(function () {
var $this = $(this);
$this.magnificPopup({
type: $this.attr("data-lightbox")
});
})
}
if (g.length) {
g.each(function () {
var $gallery = $(this);
$gallery
.find('[data-lightbox]').each(function () {
var $item = $(this);
$item.addClass("mfp-" + $item.attr("data-lightbox"));
})
.end()
.magnificPopup({
delegate: '[data-lightbox]',
type: "image",
gallery: {
enabled: true
}
});
})
}
});
}
})(jQuery);
/**
* @module Owl Carousel
* @description Enables Owl Carousel Plugin
*/
;
(function ($) {
var o = $('.owl-carousel');
if (o.length) {
var isTouch = "ontouchstart" in window;
function preventScroll(e) {
e.preventDefault();
}
$(document).ready(function () {
o.each(function () {
var c = $(this),
responsive = {};
var aliaces = ["-", "-xs-", "-sm-", "-md-", "-lg-"],
values = [0, 480, 768, 992, 1200],
i, j;
for (i = 0; i < values.length; i++) {
responsive[values[i]] = {};
for (j = i; j >= -1; j--) {
if (!responsive[values[i]]["items"] && c.attr("data" + aliaces[j] + "items")) {
responsive[values[i]]["items"] = j < 0 ? 1 : parseInt(c.attr("data" + aliaces[j] + "items"));
}
if (!responsive[values[i]]["stagePadding"] && responsive[values[i]]["stagePadding"] !== 0 && c.attr("data" + aliaces[j] + "stage-padding")) {
responsive[values[i]]["stagePadding"] = j < 0 ? 0 : parseInt(c.attr("data" + aliaces[j] + "stage-padding"));
}
if (!responsive[values[i]]["margin"] && responsive[values[i]]["margin"] !== 0 && c.attr("data" + aliaces[j] + "margin")) {
responsive[values[i]]["margin"] = j < 0 ? 30 : parseInt(c.attr("data" + aliaces[j] + "margin"));
}
}
}
c.owlCarousel({
autoplay: c.attr("data-autoplay") === "true",
loop: c.attr("data-loop") !== "false",
items: 1,
mouseDrag: c.attr("data-mouse-drag") !== "false",
nav: c.attr("data-nav") === "true",
dots: c.attr("data-dots") === "true",
dotsEach: c.attr("data-dots-each") ? parseInt(c.attr("data-dots-each")) : false,
responsive: responsive,
navText: [],
onInitialized: function () {
if ($.fn.magnificPopup) {
var o = this.$element.attr('data-lightbox') !== undefined && this.$element.attr("data-lightbox") !== "gallery",
g = this.$element.attr('data-lightbox') === "gallery";
if (o) {
this.$element.each(function () {
var $this = $(this);
$this.magnificPopup({
type: $this.attr("data-lightbox"),
callbacks: {
open: function () {
if (isTouch) {
$(document).on("touchmove", preventScroll);
$(document).swipe({
swipeDown: function () {
$.magnificPopup.close();
}
});
}
},
close: function () {
if (isTouch) {
$(document).off("touchmove", preventScroll);
$(document).swipe("destroy");
}
}
}
});
})
}
if (g) {
this.$element.each(function () {
var $gallery = $(this);
$gallery
.find('[data-lightbox]').each(function () {
var $item = $(this);
$item.addClass("mfp-" + $item.attr("data-lightbox"));
})
.end()
.magnificPopup({
delegate: '.owl-item [data-lightbox]',
type: "image",
gallery: {
enabled: true
},
callbacks: {
open: function () {
if (isTouch) {
$(document).on("touchmove", preventScroll);
$(document).swipe({
swipeDown: function () {
$.magnificPopup.close();
}
});
}
},
close: function () {
if (isTouch) {
$(document).off("touchmove", preventScroll);
$(document).swipe("destroy");
}
}
}
});
})
}
}
}
});
});
});
}
})(jQuery);
/**
* @module RD Search
* @description Enables RD Search Plugin
*/
;
(function ($) {
var o = $('.rd-navbar-search');
if (o.length) {
$(document).ready(function () {
o.RDSearch({});
});
}
})(jQuery);
/**
* @module Swiper Slider
* @description Enables Swiper Plugin
*/
;
(function ($, undefined) {
var o = $(".swiper-slider");
if (o.length) {
function getSwiperHeight(object, attr) {
var val = object.attr("data-" + attr),
dim;
if (!val) {
return undefined;
}
dim = val.match(/(px)|(%)|(vh)$/i);
if (dim.length) {
switch (dim[0]) {
case "px":
return parseFloat(val);
case "vh":
return $(window).height() * (parseFloat(val) / 100);
case "%":
return object.width() * (parseFloat(val) / 100);
}
} else {
return undefined;
}
}
function toggleSwiperInnerVideos(swiper) {
var prevSlide = $(swiper.slides[swiper.previousIndex]),
nextSlide = $(swiper.slides[swiper.activeIndex]),
videos;
prevSlide.find("video").each(function () {
this.pause();
});
videos = nextSlide.find("video");
if (videos.length) {
videos.get(0).play();
}
}
function toggleSwiperCaptionAnimation(swiper) {
var prevSlide = $(swiper.container),
nextSlide = $(swiper.slides[swiper.activeIndex]);
prevSlide
.find("[data-caption-animate]")
.each(function () {
var $this = $(this);
$this
.removeClass("animated")
.removeClass($this.attr("data-caption-animate"))
.addClass("not-animated");
});
nextSlide
.find("[data-caption-animate]")
.each(function () {
var $this = $(this),
delay = $this.attr("data-caption-delay");
setTimeout(function () {
$this
.removeClass("not-animated")
.addClass($this.attr("data-caption-animate"))
.addClass("animated");
}, delay ? parseInt(delay) : 0);
});
}
function makeParallax(el, speed, wrapper, prevScroll) {
var scrollY = window.scrollY || window.pageYOffset;
if (prevScroll != scrollY) {
prevScroll = scrollY;
el.addClass('no-transition');
el[0].style['transform'] = 'translate3d(0,' + -scrollY * (1 - speed) + 'px,0)';
el.height();
el.removeClass('no-transition');
if (el.attr('data-fade') === 'true') {
var bound = el[0].getBoundingClientRect(),
offsetTop = bound.top * 2 + scrollY,
sceneHeight = wrapper.outerHeight(),
sceneDevider = wrapper.offset().top + sceneHeight / 2.0,
layerDevider = offsetTop + el.outerHeight() / 2.0,
pos = sceneHeight / 6.0,
opacity;
if (sceneDevider + pos > layerDevider && sceneDevider - pos < layerDevider) {
el[0].style["opacity"] = 1;
} else {
if (sceneDevider - pos < layerDevider) {
opacity = 1 + ((sceneDevider + pos - layerDevider) / sceneHeight / 3.0 * 5);
} else {
opacity = 1 - ((sceneDevider - pos - layerDevider) / sceneHeight / 3.0 * 5);
}
el[0].style["opacity"] = opacity < 0 ? 0 : opacity > 1 ? 1 : opacity.toFixed(2);
}
}
}
requestAnimationFrame(function () {
makeParallax(el, speed, wrapper, prevScroll);
});
}
$(document).ready(function () {
o.each(function () {
var s = $(this);
var pag = s.find(".swiper-pagination"),
next = s.find(".swiper-button-next"),
prev = s.find(".swiper-button-prev"),
bar = s.find(".swiper-scrollbar"),
h = getSwiperHeight(o, "height"), mh = getSwiperHeight(o, "min-height"),
parallax = s.parents('.rd-parallax').length;
s.find(".swiper-slide")
.each(function () {
var $this = $(this),
url;
if (url = $this.attr("data-slide-bg")) {
$this.css({
"background-image": "url(" + url + ")",
"background-size": "cover"
})
}
})
.end()
.find("[data-caption-animate]")
.addClass("not-animated")
.end()
.swiper({
autoplay: s.attr('data-autoplay') ? s.attr('data-autoplay') === "false" ? undefined : s.attr('data-autoplay') : 5000,
direction: s.attr('data-direction') ? s.attr('data-direction') : "horizontal",
effect: s.attr('data-slide-effect') ? s.attr('data-slide-effect') : "slide",
speed: s.attr('data-slide-speed') ? s.attr('data-slide-speed') : 600,
keyboardControl: s.attr('data-keyboard') === "true",
mousewheelControl: s.attr('data-mousewheel') === "true",
mousewheelReleaseOnEdges: s.attr('data-mousewheel-release') === "true",
nextButton: next.length ? next.get(0) : null,
prevButton: prev.length ? prev.get(0) : null,
pagination: pag.length ? pag.get(0) : null,
paginationClickable: pag.length ? pag.attr("data-clickable") !== "false" : false,
paginationBulletRender: pag.length ? pag.attr("data-index-bullet") === "true" ? function (index, className) {
return '<span class="' + className + '">' + (index + 1) + '</span>';
} : null : null,
scrollbar: bar.length ? bar.get(0) : null,
scrollbarDraggable: bar.length ? bar.attr("data-draggable") !== "false" : true,
scrollbarHide: bar.length ? bar.attr("data-draggable") === "false" : false,
loop: s.attr('data-loop') !== "false",
onTransitionStart: function (swiper) {
toggleSwiperInnerVideos(swiper);
},
onTransitionEnd: function (swiper) {
toggleSwiperCaptionAnimation(swiper);
},
onInit: function (swiper) {
toggleSwiperInnerVideos(swiper);
toggleSwiperCaptionAnimation(swiper);
s.find(".swiper-parallax")
.each(function () {
var $this = $(this),
speed;
if (parallax && !isIEBrows && !isMobile) {
if (speed = $this.attr("data-speed")) {
makeParallax($this, speed, s, false);
}
}
});
$(window).on('resize', function () {
swiper.update(true);
})
}
});
$(window)
.on("resize", function () {
var mh = getSwiperHeight(s, "min-height"),
h = getSwiperHeight(s, "height");
if (h) {
s.css("height", mh ? mh > h ? mh : h : h);
}
})
.trigger("resize");
});
});
}
})(jQuery);
/**
* @module RD Parallax 3
* @description Enables RD Parallax 3 Plugin
*/
;
(function ($) {
var o = $('.rd-parallax');
if (o.length) {
$(document).ready(function () {
$.RDParallax();
});
}
})(jQuery);