",{"class":"owl-next",html:a.options.navigationText[1]||""});b.append(a.buttonPrev).append(a.buttonNext);b.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(a){a.preventDefault()});b.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(b){b.preventDefault();f(this).hasClass("owl-next")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper=
f('
' +
'
');
};
/**
* Set the percentage and status message for the progressbar.
*/
Drupal.progressBar.prototype.setProgress = function (percentage, message) {
if (percentage >= 0 && percentage <= 100) {
$('div.progress-bar', this.element).css('width', percentage + '%');
$('div.progress-bar', this.element).attr('aria-valuenow', percentage);
$('div.percentage', this.element).html(percentage + '%');
}
$('div.message', this.element).html(message);
if (this.updateCallback) {
this.updateCallback(percentage, message, this);
}
};
/**
* Start monitoring progress via Ajax.
*/
Drupal.progressBar.prototype.startMonitoring = function (uri, delay) {
this.delay = delay;
this.uri = uri;
this.sendPing();
};
/**
* Stop monitoring progress via Ajax.
*/
Drupal.progressBar.prototype.stopMonitoring = function () {
clearTimeout(this.timer);
// This allows monitoring to be stopped from within the callback.
this.uri = null;
};
/**
* Request progress data from server.
*/
Drupal.progressBar.prototype.sendPing = function () {
if (this.timer) {
clearTimeout(this.timer);
}
if (this.uri) {
var pb = this;
// When doing a post request, you need non-null data. Otherwise a
// HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
$.ajax({
type: this.method,
url: this.uri,
data: '',
dataType: 'json',
success: function (progress) {
// Display errors.
if (progress.status == 0) {
pb.displayError(progress.data);
return;
}
// Update display.
pb.setProgress(progress.percentage, progress.message);
// Schedule next timer.
pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay);
},
error: function (xmlhttp) {
pb.displayError(Drupal.ajaxError(xmlhttp, pb.uri));
}
});
}
};
/**
* Display errors on the page.
*/
Drupal.progressBar.prototype.displayError = function (string) {
var error = $('
').append(string);
$(this.element).before(error).hide();
if (this.errorCallback) {
this.errorCallback(this);
}
};
})(jQuery);
;/*})'"*/
;/*})'"*/
/**
* @file
* Handles AJAX fetching of views, including filter submission and response.
*/
(function ($) {
/**
* Attaches the AJAX behavior to exposed filter forms and key views links.
*/
Drupal.behaviors.ViewsAjaxView = {};
Drupal.behaviors.ViewsAjaxView.attach = function() {
if (Drupal.settings && Drupal.settings.views && Drupal.settings.views.ajaxViews) {
$.each(Drupal.settings.views.ajaxViews, function(i, settings) {
Drupal.views.instances[i] = new Drupal.views.ajaxView(settings);
});
}
};
Drupal.views = {};
Drupal.views.instances = {};
/**
* JavaScript object for a certain view.
*/
Drupal.views.ajaxView = function(settings) {
var selector = '.view-dom-id-' + settings.view_dom_id;
this.$view = $(selector);
// If view is not present return to prevent errors.
if (!this.$view.length) {
return;
}
// Retrieve the path to use for views' ajax.
var ajax_path = Drupal.settings.views.ajax_path;
// If there are multiple views this might've ended up showing up multiple
// times.
if (ajax_path.constructor.toString().indexOf("Array") != -1) {
ajax_path = ajax_path[0];
}
// Check if there are any GET parameters to send to views.
var queryString = window.location.search || '';
if (queryString !== '') {
// Remove the question mark and Drupal path component if any.
var queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, '');
if (queryString !== '') {
// If there is a '?' in ajax_path, clean url are on and & should be
// used to add parameters.
queryString = ((/\?/.test(ajax_path)) ? '&' : '?') + queryString;
}
}
this.element_settings = {
url: ajax_path + queryString,
submit: settings,
setClick: true,
event: 'click',
selector: selector,
progress: {
type: 'throbber'
}
};
this.settings = settings;
// Add the ajax to exposed forms.
this.$exposed_form = $('#views-exposed-form-' + settings.view_name.replace(/_/g, '-') + '-' + settings.view_display_id.replace(/_/g, '-'));
this.$exposed_form.once(jQuery.proxy(this.attachExposedFormAjax, this));
// Store Drupal.ajax objects here for all pager links.
this.links = [];
// Add the ajax to pagers.
this.$view
.once(jQuery.proxy(this.attachPagerAjax, this));
// Add a trigger to update this view specifically. In order to trigger a
// refresh use the following code.
//
// @code
// jQuery('.view-name').trigger('RefreshView');
// @endcode
// Add a trigger to update this view specifically.
var self_settings = this.element_settings;
self_settings.event = 'RefreshView';
var self = this;
this.$view.once('refresh', function () {
self.refreshViewAjax = new Drupal.ajax(self.selector, self.$view, self_settings);
});
};
Drupal.views.ajaxView.prototype.attachExposedFormAjax = function() {
var button = $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form);
button = button[0];
// Call the autocomplete submit before doing AJAX.
$(button).click(function () {
if (Drupal.autocompleteSubmit) {
Drupal.autocompleteSubmit();
}
});
this.exposedFormAjax = new Drupal.ajax($(button).attr('id'), button, this.element_settings);
};
/**
* Attach the ajax behavior to each link.
*/
Drupal.views.ajaxView.prototype.attachPagerAjax = function() {
this.$view.find('ul.pager > li > a, ol.pager > li > a, th.views-field a, .attachment .views-summary a')
.each(jQuery.proxy(this.attachPagerLinkAjax, this));
};
/**
* Attach the ajax behavior to a single link.
*/
Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function(id, link) {
var $link = $(link);
var viewData = {};
var href = $link.attr('href');
// Don't attach to pagers inside nested views.
if ($link.closest('.view')[0] !== this.$view[0] &&
$link.closest('.view').parent().hasClass('attachment') === false) {
return;
}
// Provide a default page if none has been set. This must be done
// prior to merging with settings to avoid accidentally using the
// page landed on instead of page 1.
if (typeof(viewData.page) === 'undefined') {
viewData.page = 0;
}
// Construct an object using the settings defaults and then overriding
// with data specific to the link.
$.extend(
viewData,
this.settings,
Drupal.Views.parseQueryString(href),
// Extract argument data from the URL.
Drupal.Views.parseViewArgs(href, this.settings.view_base_path)
);
// For anchor tags, these will go to the target of the anchor rather
// than the usual location.
$.extend(viewData, Drupal.Views.parseViewArgs(href, this.settings.view_base_path));
// Construct an object using the element settings defaults,
// then overriding submit with viewData.
var pager_settings = $.extend({}, this.element_settings);
pager_settings.submit = viewData;
this.pagerAjax = new Drupal.ajax(false, $link, pager_settings);
this.links.push(this.pagerAjax);
};
Drupal.ajax.prototype.commands.viewsScrollTop = function (ajax, response, status) {
// Scroll to the top of the view. This will allow users
// to browse newly loaded content after e.g. clicking a pager
// link.
var offset = $(response.selector).offset();
// We can't guarantee that the scrollable object should be
// the body, as the view could be embedded in something
// more complex such as a modal popup. Recurse up the DOM
// and scroll the first element that has a non-zero top.
var scrollTarget = response.selector;
while ($(scrollTarget).scrollTop() == 0 && $(scrollTarget).parent()) {
scrollTarget = $(scrollTarget).parent();
}
// Only scroll upward.
if (offset.top - 10 < $(scrollTarget).scrollTop()) {
$(scrollTarget).animate({scrollTop: (offset.top - 10)}, 500);
}
};
})(jQuery);
;/*})'"*/
;/*})'"*/
(function($){
Drupal.behaviors.home_carousel = {
attach: function (context, settings) {
var sync1 = $("#sync1");
var sync2 = $("#sync2");
var nbre = $('#sync2 .item').length;
if (nbre<4){
nbre = 4
};
if (nbre>10){
nbre = 10
};
sync1.owlCarousel({
singleItem: true,
slideSpeed: 1000,
transitionStyle : "fade",
navigation: false,
pagination: false,
touchDrag: false,
mouseDrag: false,
afterAction: syncPosition,
responsiveRefreshRate: 200,
});
sync2.owlCarousel({
items: nbre,
itemsDesktop: [1199, 10],
itemsDesktopSmall: [979, 10],
itemsTablet: [768, 8],
itemsMobile: [479, 4],
pagination: false,
navigation: true,
navigationText: [
"
",
"
"
],
responsiveRefreshRate: 100,
afterInit: function (el) {
var counter = 0;
var today;
$(".item").each(function() {
if($(this).attr("class") == "item active today") {
today = counter;
}
counter ++;
});
if(typeof today !== 'undefined') {
el.trigger("owl.jumpTo", today);
// center(el, today);
el.find(".owl-item").eq(today).addClass("synced");
}
}
});
function syncPosition(el) {
var current = this.currentItem;
$("#sync2")
.find(".owl-item")
.removeClass("synced")
.eq(current)
.addClass("synced")
if ($("#sync2").data("owlCarousel") !== undefined) {
// center(current);
}
}
$("#sync2").on("click", ".owl-item", function (e) {
e.preventDefault();
var number = $(this).data("owlItem");
sync1.trigger("owl.goTo", number);
});
function center(number) {
var sync2visible = $("#sync2").data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for (var i in sync2visible) {
if (num === sync2visible[i]) {
var found = true;
}
}
if (found === false) {
if (num > sync2visible[sync2visible.length - 1]) {
sync2.trigger("owl.goTo", num - sync2visible.length + 2)
} else {
if (num - 1 === -1) {
num = 0;
}
sync2.trigger("owl.goTo", num);
}
} else if (num === sync2visible[sync2visible.length - 1]) {
sync2.trigger("owl.goTo", sync2visible[1])
} else if (num === sync2visible[0]) {
sync2.trigger("owl.goTo", num - 1)
}
}
}
};
})(jQuery);
;/*})'"*/
;/*})'"*/
(function ($) {
Drupal.behaviors.qtip = {
attach: function (context, settings) {
$(function () {
var instances = $.parseJSON(settings.instances);
var debug = $.parseJSON(settings.qtipDebug);
$('.qtip-link:not(.qtip-processed)', context).each(function() { // Call .each() so we can access $(this) in the settings/config
// Check for a sibling .qtip-tooltip containing the tooltip information, otherwise (for forms)
// go to the element's parent and look for .qtip-tooltip container as a sibling of the parent
if ($(this, context).next('.qtip-tooltip').length) {
var tooltipElement = $(this).next('.qtip-tooltip');
}
else {
var tooltipElement = $(this).parent().siblings('.qtip-tooltip');
}
var tooltip = tooltipElement;
if (!debug.leaveElement) {
// Remove the tooltip element to keep the DOM clean
tooltipElement.remove();
}
var text = tooltip.html();
var title = (tooltip.data('qtip-title') != undefined) ? tooltip.data('qtip-title') + '' : ''; // Concatenate an empty string to make sure that the value being passed as the title is a string, otherwise it will not display
var instance = (tooltip.data('qtip-instance') != undefined) ? tooltip.data('qtip-instance') : '';
var settings = (instances[instance] != undefined) ? instances[instance] : '';
if (settings) {
$(this).qtip(settings);
$(this).qtip('option', 'content.text', text);
if (title) {
$(this).qtip('option', 'content.title', title);
}
}
// If no settings have been passed through, we still want to display a tooltip
else {
$(this).qtip({
content: {
text: text,
title: title,
}
});
}
// Add instance class to the container to aid in styling
$(this).addClass('qtip-instance-' + instance);
// Add processed class to not process again on AJAX calls.
$(this).addClass('qtip-processed');
});
});
}
};
})(jQuery);
;/*})'"*/
;/*})'"*/