// source --> https://ironlights.net/wp-content/plugins/events-manager/includes/js/events-manager.js?ver=5.7
jQuery(document).ready( function($){
var load_ui_css = false; //load jquery ui css?
/* Time Entry */
$('#start-time').each(function(i, el){
$(el).addClass('em-time-input em-time-start').next('#end-time').addClass('em-time-input em-time-end').parent().addClass('em-time-range');
});
if( $(".em-time-input").length > 0 ){
em_setup_timepicker('body');
}
/* Calendar AJAX */
$('.em-calendar-wrapper a').unbind("click");
$('.em-calendar-wrapper a').undelegate("click");
$('.em-calendar-wrapper').delegate('a.em-calnav, a.em-calnav', 'click', function(e){
e.preventDefault();
$(this).closest('.em-calendar-wrapper').prepend('
');
var url = em_ajaxify($(this).attr('href'));
$(this).closest('.em-calendar-wrapper').load(url, function(){$(this).trigger('em_calendar_load');});
} );
//Events Search
$(document).delegate('.em-toggle', 'click change', function(e){
e.preventDefault();
//show or hide advanced tickets, hidden by default
var el = $(this);
var rel = el.attr('rel').split(':');
if( el.hasClass('show-search') ){
if( rel.length > 1 ){ el.closest(rel[1]).find(rel[0]).slideUp(); }
else{ $(rel[0]).slideUp(); }
el.find('.show, .show-advanced').show();
el.find('.hide, .hide-advanced').hide();
el.removeClass('show-search');
}else{
if( rel.length > 1 ){ el.closest(rel[1]).find(rel[0]).slideDown(); }
else{ $(rel[0]).slideDown(); }
el.find('.show, .show-advanced').hide();
el.find('.hide, .hide-advanced').show();
el.addClass('show-search');
}
});
if( EM.search_term_placeholder ){
if( 'placeholder' in document.createElement('input') ){
$('input.em-events-search-text, input.em-search-text').attr('placeholder', EM.search_term_placeholder);
}else{
$('input.em-events-search-text, input.em-search-text').blur(function(){
if( this.value=='' ) this.value = EM.search_term_placeholder;
}).focus(function(){
if( this.value == EM.search_term_placeholder ) this.value='';
}).trigger('blur');
}
}
$('.em-search-form select[name=country]').change( function(){
var el = $(this);
$('.em-search select[name=state]').html(''+EM.txt_loading+' ');
$('.em-search select[name=region]').html(''+EM.txt_loading+' ');
$('.em-search select[name=town]').html(''+EM.txt_loading+' ');
if( el.val() != '' ){
el.closest('.em-search-location').find('.em-search-location-meta').slideDown();
var data = {
action : 'search_states',
country : el.val(),
return_html : true
};
$('.em-search select[name=state]').load( EM.ajaxurl, data );
data.action = 'search_regions';
$('.em-search select[name=region]').load( EM.ajaxurl, data );
data.action = 'search_towns';
$('.em-search select[name=town]').load( EM.ajaxurl, data );
}else{
el.closest('.em-search-location').find('.em-search-location-meta').slideUp();
}
});
$('.em-search-form select[name=region]').change( function(){
$('.em-search select[name=state]').html(''+EM.txt_loading+' ');
$('.em-search select[name=town]').html(''+EM.txt_loading+' ');
var data = {
action : 'search_states',
region : $(this).val(),
country : $('.em-search-form select[name=country]').val(),
return_html : true
};
$('.em-search select[name=state]').load( EM.ajaxurl, data );
data.action = 'search_towns';
$('.em-search select[name=town]').load( EM.ajaxurl, data );
});
$('.em-search-form select[name=state]').change( function(){
$('.em-search select[name=town]').html(''+EM.txt_loading+' ');
var data = {
action : 'search_towns',
state : $(this).val(),
region : $('.em-search-form select[name=region]').val(),
country : $('.em-search-form select[name=country]').val(),
return_html : true
};
$('.em-search select[name=town]').load( EM.ajaxurl, data );
});
//in order for this to work, you need the above classes to be present in your templates
$(document).delegate('.em-search-form, .em-events-search-form', 'submit', function(e){
var form = $(this);
if( this.em_search && this.em_search.value == EM.txt_search){ this.em_search.value = ''; }
var results_wrapper = form.closest('.em-search-wrapper').find('.em-search-ajax');
if( results_wrapper.length == 0 ) results_wrapper = $('.em-search-ajax');
if( results_wrapper.length > 0 ){
results_wrapper.append('
');
var submitButton = form.find('.em-search-submit');
submitButton.data('buttonText', submitButton.val()).val(EM.txt_searching);
var img = submitButton.children('img');
if( img.length > 0 ) img.attr('src', img.attr('src').replace('search-mag.png', 'search-loading.gif'));
var vars = form.serialize();
$.ajax( EM.ajaxurl, {
type : 'POST',
dataType : 'html',
data : vars,
success : function(responseText){
submitButton.val(submitButton.data('buttonText'));
if( img.length > 0 ) img.attr('src', img.attr('src').replace('search-loading.gif', 'search-mag.png'));
results_wrapper.replaceWith(responseText);
if( form.find('input[name=em_search]').val() == '' ){ form.find('input[name=em_search]').val(EM.txt_search); }
//reload results_wrapper
results_wrapper = form.closest('.em-search-wrapper').find('.em-search-ajax');
if( results_wrapper.length == 0 ) results_wrapper = $('.em-search-ajax');
jQuery(document).triggerHandler('em_search_ajax', [vars, results_wrapper, e]); //ajax has loaded new results
}
});
e.preventDefault();
return false;
}
});
if( $('.em-search-ajax').length > 0 ){
$(document).delegate('.em-search-ajax a.page-numbers', 'click', function(e){
var a = $(this);
var data = a.closest('.em-pagination').attr('data-em-ajax');
var wrapper = a.closest('.em-search-ajax');
var wrapper_parent = wrapper.parent();
var qvars = a.attr('href').split('?');
var vars = qvars[1];
//add data-em-ajax att if it exists
if( data != '' ){
vars = vars != '' ? vars+'&'+data : data;
}
wrapper.append('
');
$.ajax( EM.ajaxurl, {
type : 'POST',
dataType : 'html',
data : vars,
success : function(responseText) {
wrapper.replaceWith(responseText);
wrapper = wrapper_parent.find('.em-search-ajax');
jQuery(document).triggerHandler('em_search_ajax', [vars, wrapper, e]); //ajax has loaded new results
}
});
e.preventDefault();
return false;
});
}
/*
* ADMIN AREA AND PUBLIC FORMS (Still polishing this section up, note that form ids and classes may change accordingly)
*/
//Events List
//Approve/Reject Links
$('.events-table').on('click', '.em-event-delete', function(){
if( !confirm("Are you sure you want to delete?") ){ return false; }
window.location.href = this.href;
});
//Forms
$('#event-form #event-image-delete, #location-form #location-image-delete').on('click', function(){
var el = $(this);
if( el.is(':checked') ){
el.closest('.event-form-image, .location-form-image').find('#event-image-img, #location-image-img').hide();
}else{
el.closest('.event-form-image, .location-form-image').find('#event-image-img, #location-image-img').show();
}
});
//Event Editor
//Recurrence Warnings
$('#event-form.em-event-admin-recurring').submit( function(event){
var form = $(this);
if( form.find('input[name="event_reschedule"]').first().val() == 1 ){
var warning_text = EM.event_reschedule_warning;
}else if( form.find('input[name="event_recreate_tickets"]').first().val() == 1 ){
var warning_text = EM.event_recurrence_bookings;
}else{
var warning_text = EM.event_recurrence_overwrite;
}
confirmation = confirm(warning_text);
if( confirmation == false ){
event.preventDefault();
}
});
//Buttons for recurrence warnings within event editor forms
$('.em-reschedule-trigger').click(function(e){
e.preventDefault();
var trigger = $(this);
trigger.closest('.em-recurrence-reschedule').find(trigger.data('target')).removeClass('reschedule-hidden');
trigger.siblings('.em-reschedule-value').val(1);
trigger.addClass('reschedule-hidden').siblings('a').removeClass('reschedule-hidden');
});
$('.em-reschedule-cancel').click(function(e){
e.preventDefault();
var trigger = $(this);
trigger.closest('.em-recurrence-reschedule').find(trigger.data('target')).addClass('reschedule-hidden');
trigger.siblings('.em-reschedule-value').val(0);
trigger.addClass('reschedule-hidden').siblings('a').removeClass('reschedule-hidden');
});
//Tickets & Bookings
if( $("#em-tickets-form").length > 0 ){
//Enable/Disable Bookings
$('#event-rsvp').click( function(event){
if( !this.checked ){
confirmation = confirm(EM.disable_bookings_warning);
if( confirmation == false ){
event.preventDefault();
}else{
$('#event-rsvp-options').hide();
}
}else{
$('#event-rsvp-options').fadeIn();
}
});
if($('input#event-rsvp').is(":checked")) {
$("div#rsvp-data").fadeIn();
} else {
$("div#rsvp-data").hide();
}
//Ticket(s) UI
var reset_ticket_forms = function(){
$('#em-tickets-form table tbody tr.em-tickets-row').show();
$('#em-tickets-form table tbody tr.em-tickets-row-form').hide();
};
//recurrences and cut-off logic for ticket availability
if( $('#em-recurrence-checkbox').length > 0 ){
$('#em-recurrence-checkbox').change(function(){
if( $('#em-recurrence-checkbox').is(':checked') ){
$('#em-tickets-form .ticket-dates-from-recurring, #em-tickets-form .ticket-dates-to-recurring, #event-rsvp-options .em-booking-date-recurring').show();
$('#em-tickets-form .ticket-dates-from-normal, #em-tickets-form .ticket-dates-to-normal, #event-rsvp-options .em-booking-date-normal, #em-tickets-form .hidden').hide();
}else{
$('#em-tickets-form .ticket-dates-from-normal, #em-tickets-form .ticket-dates-to-normal, #event-rsvp-options .em-booking-date-normal').show();
$('#em-tickets-form .ticket-dates-from-recurring, #em-tickets-form .ticket-dates-to-recurring, #event-rsvp-options .em-booking-date-recurring, #em-tickets-form .hidden').hide();
}
}).trigger('change');
}else if( $('#em-form-recurrence').length > 0 ){
$('#em-tickets-form .ticket-dates-from-recurring, #em-tickets-form .ticket-dates-to-recurring, #event-rsvp-options .em-booking-date-recurring').show();
$('#em-tickets-form .ticket-dates-from-normal, #em-tickets-form .ticket-dates-to-normal, #event-rsvp-options .em-booking-date-normal, #em-tickets-form .hidden').hide();
}else{
$('#em-tickets-form .ticket-dates-from-recurring, #em-tickets-form .ticket-dates-to-recurring, #event-rsvp-options .em-booking-date-recurring, #em-tickets-form .hidden').hide();
}
//Add a new ticket
$("#em-tickets-add").click(function(e){
e.preventDefault();
reset_ticket_forms();
//create copy of template slot, insert so ready for population
var tickets = $('#em-tickets-form table tbody');
var rowNo = tickets.length+1;
var slot = tickets.first().clone(true).attr('id','em-ticket-'+ rowNo).appendTo($('#em-tickets-form table'));
//change the index of the form element names
slot.find('*[name]').each( function(index,el){
el = $(el);
el.attr('name', el.attr('name').replace('em_tickets[0]','em_tickets['+rowNo+']'));
});
//show ticket and switch to editor
slot.show().find('.ticket-actions-edit').trigger('click');
//refresh datepicker and values
slot.find('.em-date-input-loc').datepicker('destroy').removeAttr('id'); //clear all datepickers
slot.find('.em-time-input').unbind().each(function(index, el){ this.timePicker = false; }); //clear all timepickers - consequently, also other click/blur/change events, recreate the further down
em_setup_datepicker(slot);
em_setup_timepicker(slot);
$('html, body').animate({ scrollTop: slot.offset().top - 30 }); //sends user to form
});
//Edit a Ticket
$(document).delegate('.ticket-actions-edit', 'click', function(e){
e.preventDefault();
reset_ticket_forms();
var tbody = $(this).closest('tbody');
tbody.find('tr.em-tickets-row').hide();
tbody.find('tr.em-tickets-row-form').fadeIn();
return false;
});
$(document).delegate('.ticket-actions-edited', 'click', function(e){
e.preventDefault();
var tbody = $(this).closest('tbody');
var rowNo = tbody.attr('id').replace('em-ticket-','');
tbody.find('.em-tickets-row').fadeIn();
tbody.find('.em-tickets-row-form').hide();
tbody.find('*[name]').each(function(index,el){
el = $(el);
if( el.attr('name') == 'ticket_start_pub'){
tbody.find('span.ticket_start').text(el.attr('value'));
}else if( el.attr('name') == 'ticket_end_pub' ){
tbody.find('span.ticket_end').text(el.attr('value'));
}else if( el.attr('name') == 'em_tickets['+rowNo+'][ticket_type]' ){
if( el.find(':selected').val() == 'members' ){
tbody.find('span.ticket_name').prepend('* ');
}
}else if( el.attr('name') == 'em_tickets['+rowNo+'][ticket_start_recurring_days]' ){
var text = tbody.find('select.ticket-dates-from-recurring-when').val() == 'before' ? '-'+el.attr('value'):el.attr('value');
if( el.attr('value') != '' ){
tbody.find('span.ticket_start_recurring_days').text(text);
tbody.find('span.ticket_start_recurring_days_text, span.ticket_start_time').removeClass('hidden').show();
}else{
tbody.find('span.ticket_start_recurring_days').text(' - ');
tbody.find('span.ticket_start_recurring_days_text, span.ticket_start_time').removeClass('hidden').hide();
}
}else if( el.attr('name') == 'em_tickets['+rowNo+'][ticket_end_recurring_days]' ){
var text = tbody.find('select.ticket-dates-to-recurring-when').val() == 'before' ? '-'+el.attr('value'):el.attr('value');
if( el.attr('value') != '' ){
tbody.find('span.ticket_end_recurring_days').text(text);
tbody.find('span.ticket_end_recurring_days_text, span.ticket_end_time').removeClass('hidden').show();
}else{
tbody.find('span.ticket_end_recurring_days').text(' - ');
tbody.find('span.ticket_end_recurring_days_text, span.ticket_end_time').removeClass('hidden').hide();
}
}else{
tbody.find('.'+el.attr('name').replace('em_tickets['+rowNo+'][','').replace(']','').replace('[]','')).text(el.attr('value'));
}
});
//allow for others to hook into this
$(document).triggerHandler('em_maps_tickets_edit', [tbody, rowNo, true]);
$('html, body').animate({ scrollTop: tbody.parent().offset().top - 30 }); //sends user back to top of form
return false;
});
$(document).delegate('.em-ticket-form select.ticket_type','change', function(e){
//check if ticket is for all users or members, if members, show roles to limit the ticket to
var el = $(this);
if( el.find('option:selected').val() == 'members' ){
el.closest('.em-ticket-form').find('.ticket-roles').fadeIn();
}else{
el.closest('.em-ticket-form').find('.ticket-roles').hide();
}
});
$(document).delegate('.em-ticket-form .ticket-options-advanced','click', function(e){
//show or hide advanced tickets, hidden by default
e.preventDefault();
var el = $(this);
if( el.hasClass('show') ){
el.closest('.em-ticket-form').find('.em-ticket-form-advanced').fadeIn();
el.find('.show,.show-advanced').hide();
el.find('.hide,.hide-advanced').show();
}else{
el.closest('.em-ticket-form').find('.em-ticket-form-advanced').hide();
el.find('.show,.show-advanced').show();
el.find('.hide,.hide-advanced').hide();
}
el.toggleClass('show');
});
$('.em-ticket-form').each( function(){
//check whether to show advanced options or not by default for each ticket
var show_advanced = false;
var el = $(this);
el.find('.em-ticket-form-advanced input[type="text"]').each(function(){ if(this.value != '') show_advanced = true; });
if( el.find('.em-ticket-form-advanced input[type="checkbox"]:checked').length > 0 ){ show_advanced = true; }
el.find('.em-ticket-form-advanced option:selected').each(function(){ if(this.value != '') show_advanced = true; });
if( show_advanced ) el.find('.ticket-options-advanced').trigger('click');
});
//Delete a ticket
$(document).delegate('.ticket-actions-delete', 'click', function(e){
e.preventDefault();
var el = $(this);
var tbody = el.closest('tbody');
if( tbody.find('input.ticket_id').val() > 0 ){
//only will happen if no bookings made
el.text('Deleting...');
$.getJSON( $(this).attr('href'), {'em_ajax_action':'delete_ticket', 'id':tbody.find('input.ticket_id').val()}, function(data){
if(data.result){
tbody.remove();
}else{
el.text('Delete');
alert(data.error);
}
});
}else{
//not saved to db yet, so just remove
tbody.remove();
}
return false;
});
}
//Manageing Bookings
if( $('#em-bookings-table').length > 0 ){
//Pagination link clicks
$(document).delegate('#em-bookings-table .tablenav-pages a', 'click', function(){
var el = $(this);
var form = el.parents('#em-bookings-table form.bookings-filter');
//get page no from url, change page, submit form
var match = el.attr('href').match(/#[0-9]+/);
if( match != null && match.length > 0){
var pno = match[0].replace('#','');
form.find('input[name=pno]').val(pno);
}else{
form.find('input[name=pno]').val(1);
}
form.trigger('submit');
return false;
});
//Overlay Options
var em_bookings_settings_dialog = {
modal : true,
autoOpen: false,
minWidth: 500,
height: 'auto',
buttons: [{
text: EM.bookings_settings_save,
click: function(e){
e.preventDefault();
//we know we'll deal with cols, so wipe hidden value from main
var match = $("#em-bookings-table form.bookings-filter [name=cols]").val('');
var booking_form_cols = $('form#em-bookings-table-settings-form input.em-bookings-col-item');
$.each( booking_form_cols, function(i,item_match){
//item_match = $(item_match);
if( item_match.value == 1 ){
if( match.val() != ''){
match.val(match.val()+','+item_match.name);
}else{
match.val(item_match.name);
}
}
});
//submit main form
$('#em-bookings-table-settings').trigger('submitted'); //hook into this with bind()
$('#em-bookings-table form.bookings-filter').trigger('submit');
$(this).dialog('close');
}
}]
};
var em_bookings_export_dialog = {
modal : true,
autoOpen: false,
minWidth: 500,
height: 'auto',
buttons: [{
text: EM.bookings_export_save,
click: function(e){
$(this).children('form').submit();
$(this).dialog('close');
}
}]
};
if( $("#em-bookings-table-settings").length > 0 ){
//Settings Overlay
$("#em-bookings-table-settings").dialog(em_bookings_settings_dialog);
$(document).delegate('#em-bookings-table-settings-trigger','click', function(e){ e.preventDefault(); $("#em-bookings-table-settings").dialog('open'); });
//Export Overlay
$("#em-bookings-table-export").dialog(em_bookings_export_dialog);
$(document).delegate('#em-bookings-table-export-trigger','click', function(e){ e.preventDefault(); $("#em-bookings-table-export").dialog('open'); });
var export_overlay_show_tickets = function(){
if( $('#em-bookings-table-export-form input[name=show_tickets]').is(':checked') ){
$('#em-bookings-table-export-form .em-bookings-col-item-ticket').show();
$('#em-bookings-table-export-form #em-bookings-export-cols-active .em-bookings-col-item-ticket input').val(1);
}else{
$('#em-bookings-table-export-form .em-bookings-col-item-ticket').hide().find('input').val(0);
}
};
//Sync export overlay with table search field changes
$('#em-bookings-table form select').each(function(i, el){
$(el).change(function(e){
var select_el = $(this);
var input_par = $('#em-bookings-table-export-form input[name='+select_el.attr('name')+']');
var input_par_selected = select_el.find('option:selected');
input_par.val(input_par_selected.val());
});
});
export_overlay_show_tickets();
$('#em-bookings-table-export-form input[name=show_tickets]').click(export_overlay_show_tickets);
//Sortables
$( ".em-bookings-cols-sortable" ).sortable({
connectWith: ".em-bookings-cols-sortable",
update: function(event, ui) {
if( ui.item.parents('ul#em-bookings-cols-active, ul#em-bookings-export-cols-active').length > 0 ){
ui.item.addClass('ui-state-highlight').removeClass('ui-state-default').children('input').val(1);
}else{
ui.item.addClass('ui-state-default').removeClass('ui-state-highlight').children('input').val(0);
}
}
}).disableSelection();
load_ui_css = true;
}
//Widgets and filter submissions
$(document).delegate('#em-bookings-table form.bookings-filter', 'submit', function(e){
var el = $(this);
//append loading spinner
el.parents('#em-bookings-table').find('.table-wrap').first().append('
');
//ajax call
$.post( EM.ajaxurl, el.serializeArray(), function(data){
var root = el.parents('#em-bookings-table').first();
root.replaceWith(data);
//recreate overlays
$('#em-bookings-table-export input[name=scope]').val(root.find('select[name=scope]').val());
$('#em-bookings-table-export input[name=status]').val(root.find('select[name=status]').val());
jQuery(document).triggerHandler('em_bookings_filtered', [data, root, el]);
});
return false;
});
//Approve/Reject Links
$(document).delegate('.em-bookings-approve,.em-bookings-reject,.em-bookings-unapprove,.em-bookings-delete', 'click', function(){
var el = $(this);
if( el.hasClass('em-bookings-delete') ){
if( !confirm(EM.booking_delete) ){ return false; }
}
var url = em_ajaxify( el.attr('href'));
var td = el.parents('td').first();
td.html(EM.txt_loading);
td.load( url );
return false;
});
}
//Old Bookings Table - depreciating soon
if( $('.em_bookings_events_table').length > 0 ){
//Widgets and filter submissions
$(document).delegate('.em_bookings_events_table form', 'submit', function(e){
var el = $(this);
var url = em_ajaxify( el.attr('action') );
el.parents('.em_bookings_events_table').find('.table-wrap').first().append('
');
$.get( url, el.serializeArray(), function(data){
el.parents('.em_bookings_events_table').first().replaceWith(data);
});
return false;
});
//Pagination link clicks
$(document).delegate('.em_bookings_events_table .tablenav-pages a', 'click', function(){
var el = $(this);
var url = em_ajaxify( el.attr('href') );
el.parents('.em_bookings_events_table').find('.table-wrap').first().append('
');
$.get( url, function(data){
el.parents('.em_bookings_events_table').first().replaceWith(data);
});
return false;
});
}
//Manual Booking
$('a.em-booking-button').click(function(e){
e.preventDefault();
var button = $(this);
if( button.text() != EM.bb_booked && $(this).text() != EM.bb_booking){
button.text(EM.bb_booking);
var button_data = button.attr('id').split('_');
$.ajax({
url: EM.ajaxurl,
dataType: 'jsonp',
data: {
event_id : button_data[1],
_wpnonce : button_data[2],
action : 'booking_add_one'
},
success : function(response, statusText, xhr, $form) {
if(response.result){
button.text(EM.bb_booked);
}else{
button.text(EM.bb_error);
}
if(response.message != '') alert(response.message);
},
error : function(){ button.text(EM.bb_error); }
});
}
return false;
});
$('a.em-cancel-button').click(function(e){
e.preventDefault();
var button = $(this);
if( button.text() != EM.bb_cancelled && button.text() != EM.bb_canceling){
button.text(EM.bb_canceling);
var button_data = button.attr('id').split('_');
$.ajax({
url: EM.ajaxurl,
dataType: 'jsonp',
data: {
booking_id : button_data[1],
_wpnonce : button_data[2],
action : 'booking_cancel'
},
success : function(response, statusText, xhr, $form) {
if(response.result){
button.text(EM.bb_cancelled);
}else{
button.text(EM.bb_cancel_error);
}
},
error : function(){ button.text(EM.bb_cancel_error); }
});
}
return false;
});
//Datepicker
if( $('.em-date-single, .em-date-range, #em-date-start').length > 0 ){
load_ui_css = true;
em_setup_datepicker('body');
}
if( load_ui_css ) em_load_jquery_css();
//previously in em-admin.php
function updateIntervalDescriptor () {
$(".interval-desc").hide();
var number = "-plural";
if ($('input#recurrence-interval').val() == 1 || $('input#recurrence-interval').val() == "")
number = "-singular";
var descriptor = "span#interval-"+$("select#recurrence-frequency").val()+number;
$(descriptor).show();
}
function updateIntervalSelectors () {
$('p.alternate-selector').hide();
$('p#'+ $('select#recurrence-frequency').val() + "-selector").show();
}
function updateShowHideRecurrence () {
if( $('input#event-recurrence').is(":checked")) {
$("#event_recurrence_pattern").fadeIn();
$("#event-date-explanation").hide();
$("#recurrence-dates-explanation").show();
$("h3#recurrence-dates-title").show();
$("h3#event-date-title").hide();
} else {
$("#event_recurrence_pattern").hide();
$("#recurrence-dates-explanation").hide();
$("#event-date-explanation").show();
$("h3#recurrence-dates-title").hide();
$("h3#event-date-title").show();
}
}
$("#recurrence-dates-explanation").hide();
$("#date-to-submit").hide();
$("#end-date-to-submit").hide();
$("#localised-date").show();
$("#localised-end-date").show();
$('#em-wrapper input.select-all').change(function(){
if($(this).is(':checked')){
$('input.row-selector').prop('checked', true);
$('input.select-all').prop('checked', true);
}else{
$('input.row-selector').prop('checked', false);
$('input.select-all').prop('checked', false);
}
});
updateIntervalDescriptor();
updateIntervalSelectors();
updateShowHideRecurrence();
$('input#event-recurrence').change(updateShowHideRecurrence);
// recurrency elements
$('input#recurrence-interval').keyup(updateIntervalDescriptor);
$('select#recurrence-frequency').change(updateIntervalDescriptor);
$('select#recurrence-frequency').change(updateIntervalSelectors);
/* Load any maps */
if( $('.em-location-map').length > 0 || $('.em-locations-map').length > 0 || $('#em-map').length > 0 || $('.em-search-geo').length > 0 ){
em_maps_load();
}
//Finally, add autocomplete here
//Autocomplete
if( jQuery( "div.em-location-data input#location-name" ).length > 0 ){
jQuery( "div.em-location-data input#location-name" ).autocomplete({
source: EM.locationajaxurl,
minLength: 2,
focus: function( event, ui ){
jQuery("input#location-id" ).val( ui.item.value );
return false;
},
select: function( event, ui ){
jQuery("input#location-id" ).val(ui.item.id).trigger('change');
jQuery("input#location-name" ).val(ui.item.value);
jQuery('input#location-address').val(ui.item.address);
jQuery('input#location-town').val(ui.item.town);
jQuery('input#location-state').val(ui.item.state);
jQuery('input#location-region').val(ui.item.region);
jQuery('input#location-postcode').val(ui.item.postcode);
if( ui.item.country == '' ){
jQuery('select#location-country option:selected').removeAttr('selected');
}else{
jQuery('select#location-country option[value="'+ui.item.country+'"]').attr('selected', 'selected');
}
jQuery('div.em-location-data input, div.em-location-data select').css('background-color','#ccc').attr('readonly','readonly');
jQuery('#em-location-reset').show();
jQuery('#em-location-search-tip').hide();
jQuery(document).triggerHandler('em_locations_autocomplete_selected', [event, ui]);
return false;
}
}).data( "ui-autocomplete" )._renderItem = function( ul, item ) {
html_val = "" + item.label + ''+ item.address + ', ' + item.town+" ";
return jQuery( " " ).data( "item.autocomplete", item ).append(html_val).appendTo( ul );
};
jQuery('#em-location-reset a').click( function(){
jQuery('div.em-location-data input').css('background-color','#fff').val('').removeAttr('readonly');
jQuery('div.em-location-data select').css('background-color','#fff');
jQuery('div.em-location-data option:selected').removeAttr('selected');
jQuery('input#location-id').val('');
jQuery('#em-location-reset').hide();
jQuery('#em-location-search-tip').show();
jQuery('#em-map').hide();
jQuery('#em-map-404').show();
if(typeof(marker) !== 'undefined'){
marker.setPosition(new google.maps.LatLng(0, 0));
infoWindow.close();
marker.setDraggable(true);
}
return false;
});
if( jQuery('input#location-id').val() != '0' && jQuery('input#location-id').val() != '' ){
jQuery('div.em-location-data input, div.em-location-data select').css('background-color','#ccc').attr('readonly','readonly');
jQuery('#em-location-reset').show();
jQuery('#em-location-search-tip').hide();
}
}
});
function em_load_jquery_css(){
if( EM.ui_css && jQuery('link#jquery-ui-css').length == 0 ){
var script = document.createElement("link");
script.id = 'jquery-ui-css';
script.rel = "stylesheet";
script.href = EM.ui_css;
document.body.appendChild(script);
}
}
function em_setup_datepicker(wrap){
wrap = jQuery(wrap);
//default picker vals
var datepicker_vals = { altFormat: "yy-mm-dd", changeMonth: true, changeYear: true, firstDay : EM.firstDay, yearRange:'-100:+10' };
if( EM.dateFormat ) datepicker_vals.dateFormat = EM.dateFormat;
if( EM.yearRange ) datepicker_vals.yearRange = EM.yearRange;
jQuery(document).triggerHandler('em_datepicker', datepicker_vals);
//apply datepickers
dateDivs = wrap.find('.em-date-single, .em-date-range');
if( dateDivs.length > 0 ){
//apply datepickers to elements
dateDivs.find('input.em-date-input-loc').each(function(i,dateInput){
//init the datepicker
var dateInput = jQuery(dateInput);
var dateValue = dateInput.nextAll('input.em-date-input').first();
var dateValue_value = dateValue.val();
dateInput.datepicker(datepicker_vals);
dateInput.datepicker('option', 'altField', dateValue);
//now set the value
if( dateValue_value ){
var this_date_formatted = jQuery.datepicker.formatDate( EM.dateFormat, jQuery.datepicker.parseDate('yy-mm-dd', dateValue_value) );
dateInput.val(this_date_formatted);
dateValue.val(dateValue_value);
}
//add logic for texts
dateInput.change(function(){
if( jQuery(this).val() == '' ){
jQuery(this).nextAll('.em-date-input').first().val('');
}
});
});
//deal with date ranges
dateDivs.filter('.em-date-range').find('input.em-date-input-loc').each(function(i,dateInput){
//finally, apply start/end logic to this field
dateInput = jQuery(dateInput);
if( dateInput.hasClass('em-date-start') ){
dateInput.datepicker('option','onSelect', function( selectedDate ) {
//get corresponding end date input, we expect ranges to be contained in .em-date-range with a start/end input element
var startDate = jQuery(this);
var endDate = startDate.parents('.em-date-range').find('.em-date-end').first();
var startValue = startDate.nextAll('input.em-date-input').first().val();
var endValue = endDate.nextAll('input.em-date-input').first().val();
if( startValue > endValue && endValue != '' ){
endDate.datepicker( "setDate" , selectedDate );
endDate.trigger('change');
}
endDate.datepicker( "option", 'minDate', selectedDate );
});
}else if( dateInput.hasClass('em-date-end') ){
var startInput = dateInput.parents('.em-date-range').find('.em-date-start').first();
if( startInput.val() != '' ){
dateInput.datepicker('option', 'minDate', startInput.val());
}
}
});
}
}
function em_setup_timepicker(wrap){
wrap = jQuery(wrap);
var timepicker_options = {
show24Hours: EM.show24hours == 1,
step:15
}
jQuery(document).triggerHandler('em_timepicker_options', timepicker_options);
wrap.find(".em-time-input").timePicker(timepicker_options);
// Keep the duration between the two inputs.
wrap.find(".em-time-range input.em-time-start").each( function(i, el){
jQuery(el).data('oldTime', jQuery.timePicker(el).getTime());
}).change( function() {
var start = jQuery(this);
var end = start.nextAll('.em-time-end');
if (end.val()) { // Only update when second input has a value.
// Calculate duration.
var oldTime = start.data('oldTime');
var duration = (jQuery.timePicker(end).getTime() - oldTime);
var time = jQuery.timePicker(start).getTime();
if( jQuery.timePicker(end).getTime() >= oldTime ){
// Calculate and update the time in the second input.
jQuery.timePicker(end).setTime(new Date(new Date(time.getTime() + duration)));
}
start.data('oldTime', time);
}
});
// Validate.
wrap.find(".em-time-range input.em-time-end").change(function() {
var end = jQuery(this);
var start = end.prevAll('.em-time-start');
if( start.val() ){
if( jQuery.timePicker(start).getTime() > jQuery.timePicker(this).getTime() && ( jQuery('.em-date-end').val().length == 0 || jQuery('.em-date-start').val() == jQuery('.em-date-end').val() ) ) { end.addClass("error"); }
else { end.removeClass("error"); }
}
});
//Sort out all day checkbox
wrap.find('.em-time-range input.em-time-all-day').change(function(){
var allday = jQuery(this);
if( allday.is(':checked') ){
allday.siblings('.em-time-input').css('background-color','#ccc');
}else{
allday.siblings('.em-time-input').css('background-color','#fff');
}
}).trigger('change');
}
/* Useful function for adding the em_ajax flag to a url, regardless of querystring format */
var em_ajaxify = function(url){
if ( url.search('em_ajax=0') != -1){
url = url.replace('em_ajax=0','em_ajax=1');
}else if( url.search(/\?/) != -1 ){
url = url + "&em_ajax=1";
}else{
url = url + "?em_ajax=1";
}
return url;
};
/*
* MAP FUNCTIONS
*/
var em_maps_loaded = false;
var maps = {};
var maps_markers = {};
var infowindow;
//loads maps script if not already loaded and executes EM maps script
function em_maps_load(){
if( !em_maps_loaded ){
if ( jQuery('script#google-maps').length == 0 && ( typeof google !== 'object' || typeof google.maps !== 'object' ) ){
var script = document.createElement("script");
script.type = "text/javascript";
script.id = "google-maps";
var proto = (EM.is_ssl) ? 'https:' : 'http:';
if( typeof EM.google_maps_api !== 'undefined' ){
script.src = proto + '//maps.google.com/maps/api/js?v=3&libraries=places&callback=em_maps&key='+EM.google_maps_api;
}else{
script.src = proto + '//maps.google.com/maps/api/js?v=3&libraries=places&callback=em_maps';
}
document.body.appendChild(script);
}else if( typeof google === 'object' && typeof google.maps === 'object' && !em_maps_loaded ){
em_maps();
}else if( jQuery('script#google-maps').length > 0 ){
jQuery(window).load(function(){ if( !em_maps_loaded ) em_maps(); }); //google isn't loaded so wait for page to load resources
}
}
}
//re-usable function to load global location maps
function em_maps_load_locations(el){
var el = jQuery(el);
var map_id = el.attr('id').replace('em-locations-map-','');
var em_data = jQuery.parseJSON( el.nextAll('.em-locations-map-coords').first().text() );
if( em_data == null ){
var em_data = jQuery.parseJSON( jQuery('#em-locations-map-coords-'+map_id).text() );
}
jQuery.getJSON(document.URL, em_data , function(data){
if(data.length > 0){
//define default options and allow option for extension via event triggers
var map_options = { mapTypeId: google.maps.MapTypeId.ROADMAP };
if( typeof EM.google_map_id_styles == 'object' && typeof EM.google_map_id_styles[map_id] !== 'undefined' ){ console.log(EM.google_map_id_styles[map_id]); map_options.styles = EM.google_map_id_styles[map_id]; }
else if( typeof EM.google_maps_styles !== 'undefined' ){ map_options.styles = EM.google_maps_styles; }
jQuery(document).triggerHandler('em_maps_locations_map_options', map_options);
var marker_options = {};
jQuery(document).triggerHandler('em_maps_location_marker_options', marker_options);
maps[map_id] = new google.maps.Map(el[0], map_options);
maps_markers[map_id] = [];
var bounds = new google.maps.LatLngBounds();
jQuery.map( data, function( location, i ){
if( !(location.location_latitude == 0 && location.location_longitude == 0) ){
var latitude = parseFloat( location.location_latitude );
var longitude = parseFloat( location.location_longitude );
var location_position = new google.maps.LatLng( latitude, longitude );
//extend the default marker options
jQuery.extend(marker_options, {
position: location_position,
map: maps[map_id]
})
var marker = new google.maps.Marker(marker_options);
maps_markers[map_id].push(marker);
marker.setTitle(location.location_name);
var myContent = ''+ location.location_balloon +'
';
em_map_infobox(marker, myContent, maps[map_id]);
//extend bounds
bounds.extend(new google.maps.LatLng(latitude,longitude))
}
});
// Zoom in to the bounds
maps[map_id].fitBounds(bounds);
//Call a hook if exists
jQuery(document).triggerHandler('em_maps_locations_hook', [maps[map_id], data, map_id, maps_markers[map_id]]);
}else{
el.children().first().html('No locations found');
jQuery(document).triggerHandler('em_maps_locations_hook_not_found', [el]);
}
});
}
function em_maps_load_location(el){
el = jQuery(el);
var map_id = el.attr('id').replace('em-location-map-','');
em_LatLng = new google.maps.LatLng( jQuery('#em-location-map-coords-'+map_id+' .lat').text(), jQuery('#em-location-map-coords-'+map_id+' .lng').text());
//extend map and markers via event triggers
var is_touch = 'ontouchstart' in window || navigator.maxTouchPoints;
var map_options = {
zoom: 14,
center: em_LatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
scrollwheel: is_touch
};
if( typeof EM.google_map_id_styles == 'object' && typeof EM.google_map_id_styles[map_id] !== 'undefined' ){ console.log(EM.google_map_id_styles[map_id]); map_options.styles = EM.google_map_id_styles[map_id]; }
else if( typeof EM.google_maps_styles !== 'undefined' ){ map_options.styles = EM.google_maps_styles; }
jQuery(document).triggerHandler('em_maps_location_map_options', map_options);
maps[map_id] = new google.maps.Map( document.getElementById('em-location-map-'+map_id), map_options);
if( !is_touch ){
maps[map_id].addListener('click', function(){ maps[map_id].setOptions({ scrollwheel:true }); });
maps[map_id].addListener('mouseout', function(){ maps[map_id].setOptions({ scrollwheel:false }); });
}
var marker_options = {
position: em_LatLng,
map: maps[map_id]
};
jQuery(document).triggerHandler('em_maps_location_marker_options', marker_options);
maps_markers[map_id] = new google.maps.Marker(marker_options);
infowindow = new google.maps.InfoWindow({ content: jQuery('#em-location-map-info-'+map_id+' .em-map-balloon').get(0) });
infowindow.open(maps[map_id],maps_markers[map_id]);
maps[map_id].panBy(40,-70);
//JS Hook for handling map after instantiation
//Example hook, which you can add elsewhere in your theme's JS - jQuery(document).bind('em_maps_location_hook', function(){ alert('hi');} );
jQuery(document).triggerHandler('em_maps_location_hook', [maps[map_id], infowindow, maps_markers[map_id], map_id]);
//map resize listener
jQuery(window).on('resize', function(e) {
google.maps.event.trigger(maps[map_id], "resize");
maps[map_id].setCenter(maps_markers[map_id].getPosition());
maps[map_id].panBy(40,-70);
});
}
jQuery(document).bind('em_search_ajax', function(e, vars, wrapper){
if( em_maps_loaded ){
wrapper.find('.em-location-map').each( function(index, el){ em_maps_load_location(el); } );
wrapper.find('.em-locations-map').each( function(index, el){ em_maps_load_locations(el); });
}
});
//Load single maps (each map is treated as a seperate map).
function em_maps() {
//Find all the maps on this page and load them
jQuery('.em-location-map').each( function(index, el){ em_maps_load_location(el); } );
jQuery('.em-locations-map').each( function(index, el){ em_maps_load_locations(el); } );
//Location stuff - only needed if inputs for location exist
if( jQuery('select#location-select-id, input#location-address').length > 0 ){
var map, marker;
//load map info
var refresh_map_location = function(){
var location_latitude = jQuery('#location-latitude').val();
var location_longitude = jQuery('#location-longitude').val();
if( !(location_latitude == 0 && location_longitude == 0) ){
var position = new google.maps.LatLng(location_latitude, location_longitude); //the location coords
marker.setPosition(position);
var mapTitle = (jQuery('input#location-name').length > 0) ? jQuery('input#location-name').val():jQuery('input#title').val();
marker.setTitle( jQuery('input#location-name input#title, #location-select-id').first().val() );
jQuery('#em-map').show();
jQuery('#em-map-404').hide();
google.maps.event.trigger(map, 'resize');
map.setCenter(position);
map.panBy(40,-55);
infoWindow.setContent(
'' +
mapTitle +
' ' +
jQuery('#location-address').val() +
' ' + jQuery('#location-town').val()+
'
'
);
infoWindow.open(map, marker);
jQuery(document).triggerHandler('em_maps_location_hook', [map, infowindow, marker, 0]);
} else {
jQuery('#em-map').hide();
jQuery('#em-map-404').show();
}
};
//Add listeners for changes to address
var get_map_by_id = function(id){
if(jQuery('#em-map').length > 0){
jQuery.getJSON(document.URL,{ em_ajax_action:'get_location', id:id }, function(data){
if( data.location_latitude!=0 && data.location_longitude!=0 ){
loc_latlng = new google.maps.LatLng(data.location_latitude, data.location_longitude);
marker.setPosition(loc_latlng);
marker.setTitle( data.location_name );
marker.setDraggable(false);
jQuery('#em-map').show();
jQuery('#em-map-404').hide();
map.setCenter(loc_latlng);
map.panBy(40,-55);
infoWindow.setContent( ''+ data.location_balloon +'
');
infoWindow.open(map, marker);
google.maps.event.trigger(map, 'resize');
jQuery(document).triggerHandler('em_maps_location_hook', [map, infowindow, marker, 0]);
}else{
jQuery('#em-map').hide();
jQuery('#em-map-404').show();
}
});
}
};
jQuery('#location-select-id, input#location-id').change( function(){get_map_by_id(jQuery(this).val());} );
jQuery('#location-name, #location-town, #location-address, #location-state, #location-postcode, #location-country').change( function(){
//build address
var addresses = [ jQuery('#location-address').val(), jQuery('#location-town').val(), jQuery('#location-state').val(), jQuery('#location-postcode').val() ];
var address = '';
jQuery.each( addresses, function(i, val){
if( val != '' ){
address = ( address == '' ) ? address+val:address+', '+val;
}
});
if( address == '' ){ //in case only name is entered, no address
jQuery('#em-map').hide();
jQuery('#em-map-404').show();
return false;
}
//do country last, as it's using the text version
if( jQuery('#location-country option:selected').val() != 0 ){
address = ( address == '' ) ? address+jQuery('#location-country option:selected').text():address+', '+jQuery('#location-country option:selected').text();
}
if( address != '' && jQuery('#em-map').length > 0 ){
geocoder.geocode( { 'address': address }, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
jQuery('#location-latitude').val(results[0].geometry.location.lat());
jQuery('#location-longitude').val(results[0].geometry.location.lng());
}
refresh_map_location();
});
}
});
//Load map
if(jQuery('#em-map').length > 0){
var em_LatLng = new google.maps.LatLng(0, 0);
var is_touch = 'ontouchstart' in window || navigator.maxTouchPoints;
var map_options = {
zoom: 14,
center: em_LatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
scrollwheel: is_touch
};
if( typeof EM.google_maps_styles !== 'undefined' ){ map_options.styles = EM.google_maps_styles; }
map = new google.maps.Map( document.getElementById('em-map'), map_options);
if( !is_touch ){
map.addListener('click', function(){ map.setOptions({ scrollwheel:true }); });
map.addListener('mouseout', function(){ map.setOptions({ scrollwheel:false }); });
}
var marker = new google.maps.Marker({
position: em_LatLng,
map: map,
draggable: true
});
infoWindow = new google.maps.InfoWindow({
content: ''
});
var geocoder = new google.maps.Geocoder();
google.maps.event.addListener(infoWindow, 'domready', function() {
document.getElementById('location-balloon-content').parentNode.style.overflow='';
document.getElementById('location-balloon-content').parentNode.parentNode.style.overflow='';
});
google.maps.event.addListener(marker, 'dragend', function() {
var position = marker.getPosition();
jQuery('#location-latitude').val(position.lat());
jQuery('#location-longitude').val(position.lng());
map.setCenter(position);
map.panBy(40,-55);
});
if( jQuery('#location-select-id').length > 0 ){
jQuery('#location-select-id').trigger('change');
}else{
refresh_map_location();
}
jQuery(document).triggerHandler('em_map_loaded', [map, infowindow, marker]);
}
//map resize listener
jQuery(window).on('resize', function(e) {
google.maps.event.trigger(map, "resize");
map.setCenter(marker.getPosition());
map.panBy(40,-55);
});
}
em_maps_loaded = true; //maps have been loaded
jQuery(document).triggerHandler('em_maps_loaded');
}
function em_map_infobox(marker, message, map) {
var iw = new google.maps.InfoWindow({ content: message });
google.maps.event.addListener(marker, 'click', function() {
if( infowindow ) infowindow.close();
infowindow = iw;
iw.open(map,marker);
});
}
/* jQuery timePicker - http://labs.perifer.se/timedatepicker/ @ http://github.com/perifer/timePicker commit 100644 */
(function(e){function t(t,n,r,i){t.value=e(n).text();e(t).change();if(!navigator.userAgent.match(/msie/i)){t.focus()}r.hide()}function n(e,t){var n=e.getHours();var i=t.show24Hours?n:(n+11)%12+1;var s=e.getMinutes();return r(i)+t.separator+r(s)+(t.show24Hours?"":n<12?" AM":" PM")}function r(e){return(e<10?"0":"")+e}function i(e,t){return typeof e=="object"?o(e):s(e,t)}function s(e,t){if(e){var n=e.split(t.separator);var r=parseFloat(n[0]);var i=parseFloat(n[1]);if(!t.show24Hours){if(r===12&&e.indexOf("AM")!==-1){r=0}else if(r!==12&&e.indexOf("PM")!==-1){r+=12}}var s=new Date(0,0,0,r,i,0);return o(s)}return null}function o(e){e.setFullYear(2001);e.setMonth(0);e.setDate(0);return e}e.fn.timePicker=function(t){var n=e.extend({},e.fn.timePicker.defaults,t);return this.each(function(){e.timePicker(this,n)})};e.timePicker=function(t,n){var r=e(t)[0];return r.timePicker||(r.timePicker=new jQuery._timePicker(r,n))};e.timePicker.version="0.3";e._timePicker=function(r,u){var a=false;var f=false;var l=i(u.startTime,u);var c=i(u.endTime,u);var h="selected";var p="li."+h;e(r).attr("autocomplete","OFF");var d=[];var v=new Date(l);while(v<=c){d[d.length]=n(v,u);v=new Date(v.setMinutes(v.getMinutes()+u.step))}var m=e('
');var g=e("");for(var y=0;y"+d[y]+"")}m.append(g);m.appendTo("body").hide();m.mouseover(function(){a=true}).mouseout(function(){a=false});e("li",g).mouseover(function(){if(!f){e(p,m).removeClass(h);e(this).addClass(h)}}).mousedown(function(){a=true}).click(function(){t(r,this,m,u);a=false});var b=function(){if(m.is(":visible")){return false}e("li",m).removeClass(h);var t=e(r).offset();m.css({top:t.top+r.offsetHeight,left:t.left});m.show();var i=r.value?s(r.value,u):l;var a=l.getHours()*60+l.getMinutes();var f=i.getHours()*60+i.getMinutes()-a;var p=Math.round(f/u.step);var d=o(new Date(0,0,0,0,p*u.step+a,0));d=ls+m[0].offsetHeight){m[0].scrollTop=s+a.offsetHeight}}else{i.removeClass(h);a=e("li:first",g).addClass(h)[0];m[0].scrollTop=0}return false;break;case 13:if(m.is(":visible")){var l=e(p,g)[0];t(r,l,m,u)}return false;break;case 27:m.hide();return false;break}return true});e(r).keyup(function(e){f=false});this.getTime=function(){return s(r.value,u)};this.setTime=function(t){r.value=n(i(t,u),u);e(r).change()}};e.fn.timePicker.defaults={step:30,startTime:new Date(0,0,0,0,0,0),endTime:new Date(0,0,0,23,30,0),separator:":",show24Hours:true}})(jQuery);
// source --> https://ironlights.net/wp-content/plugins/revslider/public/assets/js/jquery.themepunch.revolution.min.js?ver=5.2.5.1
/**************************************************************************
* jquery.themepunch.revolution.js - jQuery Plugin for Revolution Slider
* @version: 5.2.5.1 (28.04.2016)
* @requires jQuery v1.7 or later (tested on 1.9)
* @author ThemePunch
**************************************************************************/
!function(jQuery,undefined){"use strict";jQuery.fn.extend({revolution:function(e){var t={delay:9e3,responsiveLevels:4064,visibilityLevels:[2048,1024,778,480],gridwidth:960,gridheight:500,minHeight:0,autoHeight:"off",sliderType:"standard",sliderLayout:"auto",fullScreenAutoWidth:"off",fullScreenAlignForce:"off",fullScreenOffsetContainer:"",fullScreenOffset:"0",hideCaptionAtLimit:0,hideAllCaptionAtLimit:0,hideSliderAtLimit:0,disableProgressBar:"off",stopAtSlide:-1,stopAfterLoops:-1,shadow:0,dottedOverlay:"none",startDelay:0,lazyType:"smart",spinner:"spinner0",shuffle:"off",viewPort:{enable:!1,outof:"wait",visible_area:"60%"},fallbacks:{isJoomla:!1,panZoomDisableOnMobile:"off",simplifyAll:"on",nextSlideOnWindowFocus:"off",disableFocusListener:!0,ignoreHeightChanges:"off",ignoreHeightChangesSize:0},parallax:{type:"off",levels:[10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85],origo:"enterpoint",speed:400,bgparallax:"off",opacity:"on",disable_onmobile:"off",ddd_shadow:"on",ddd_bgfreeze:"off",ddd_overflow:"visible",ddd_layer_overflow:"visible",ddd_z_correction:65,ddd_path:"mouse"},carousel:{horizontal_align:"center",vertical_align:"center",infinity:"on",space:0,maxVisibleItems:3,stretch:"off",fadeout:"on",maxRotation:0,minScale:0,vary_fade:"off",vary_rotation:"on",vary_scale:"off",border_radius:"0px",padding_top:0,padding_bottom:0},navigation:{keyboardNavigation:"off",keyboard_direction:"horizontal",mouseScrollNavigation:"off",onHoverStop:"on",touch:{touchenabled:"off",swipe_treshold:75,swipe_min_touches:1,drag_block_vertical:!1,swipe_direction:"horizontal"},arrows:{style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,tmp:"",rtl:!1,left:{h_align:"left",v_align:"center",h_offset:20,v_offset:0,container:"slider"},right:{h_align:"right",v_align:"center",h_offset:20,v_offset:0,container:"slider"}},bullets:{container:"slider",rtl:!1,style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",h_align:"left",v_align:"center",space:0,h_offset:20,v_offset:0,tmp:' '},thumbnails:{container:"slider",rtl:!1,style:"",enable:!1,width:100,height:50,min_width:100,wrapper_padding:2,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:' ',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,position:"inner",space:2,h_align:"left",v_align:"center",h_offset:20,v_offset:0},tabs:{container:"slider",rtl:!1,style:"",enable:!1,width:100,min_width:100,height:50,wrapper_padding:10,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:' ',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,space:0,position:"inner",h_align:"left",v_align:"center",h_offset:20,v_offset:0}},extensions:"extensions/",extensions_suffix:".min.js",debugMode:!1};return e=jQuery.extend(!0,{},t,e),this.each(function(){var t=jQuery(this);e.minHeight=e.minHeight!=undefined?parseInt(e.minHeight,0):e.minHeight,"hero"==e.sliderType&&t.find(">ul>li").each(function(e){e>0&&jQuery(this).remove()}),e.jsFileLocation=e.jsFileLocation||getScriptLocation("themepunch.revolution.min.js"),e.jsFileLocation=e.jsFileLocation+e.extensions,e.scriptsneeded=getNeededScripts(e,t),e.curWinRange=0,e.rtl=!0,e.navigation!=undefined&&e.navigation.touch!=undefined&&(e.navigation.touch.swipe_min_touches=e.navigation.touch.swipe_min_touches>5?1:e.navigation.touch.swipe_min_touches),jQuery(this).on("scriptsloaded",function(){return e.modulesfailing?(t.html('!! Error at loading Slider Revolution 5.0 Extrensions.'+e.errorm+"
").show(),!1):(_R.migration!=undefined&&(e=_R.migration(t,e)),punchgs.force3D=!0,"on"!==e.simplifyAll&&punchgs.TweenLite.lagSmoothing(1e3,16),prepareOptions(t,e),void initSlider(t,e))}),t.data("opt",e),waitForScripts(t,e)})},revremoveslide:function(e){return this.each(function(){var t=jQuery(this);if(t!=undefined&&t.length>0&&jQuery("body").find("#"+t.attr("id")).length>0){var i=t.parent().find(".tp-bannertimer"),a=i.data("opt");if(a&&a.li.length>0&&(e>0||e<=a.li.length)){var n=jQuery(a.li[e]),r=n.data("index"),o=!1;a.slideamount=a.slideamount-1,removeNavWithLiref(".tp-bullet",r,a),removeNavWithLiref(".tp-tab",r,a),removeNavWithLiref(".tp-thumb",r,a),n.hasClass("active-revslide")&&(o=!0),n.remove(),a.li=removeArray(a.li,e),a.carousel&&a.carousel.slides&&(a.carousel.slides=removeArray(a.carousel.slides,e)),a.thumbs=removeArray(a.thumbs,e),_R.updateNavIndexes&&_R.updateNavIndexes(a),o&&t.revnext(),punchgs.TweenLite.set(a.li,{minWidth:"99%"}),punchgs.TweenLite.set(a.li,{minWidth:"100%"})}}})},revaddcallback:function(e){return this.each(function(){var t=jQuery(this);if(t!=undefined&&t.length>0&&jQuery("body").find("#"+t.attr("id")).length>0){var i=t.parent().find(".tp-bannertimer"),a=i.data("opt");a.callBackArray===undefined&&(a.callBackArray=new Array),a.callBackArray.push(e)}})},revgetparallaxproc:function(){var e=jQuery(this);if(e!=undefined&&e.length>0&&jQuery("body").find("#"+e.attr("id")).length>0){var t=e.parent().find(".tp-bannertimer"),i=t.data("opt");return i.scrollproc}},revdebugmode:function(){return this.each(function(){var e=jQuery(this);if(e!=undefined&&e.length>0&&jQuery("body").find("#"+e.attr("id")).length>0){var t=e.parent().find(".tp-bannertimer"),i=t.data("opt");i.debugMode=!0,containerResized(e,i)}})},revscroll:function(e){return this.each(function(){var t=jQuery(this);t!=undefined&&t.length>0&&jQuery("body").find("#"+t.attr("id")).length>0&&jQuery("body,html").animate({scrollTop:t.offset().top+t.height()-e+"px"},{duration:400})})},revredraw:function(e){return this.each(function(){var e=jQuery(this);if(e!=undefined&&e.length>0&&jQuery("body").find("#"+e.attr("id")).length>0){var t=e.parent().find(".tp-bannertimer"),i=t.data("opt");containerResized(e,i)}})},revkill:function(e){var t=this,i=jQuery(this);if(punchgs.TweenLite.killDelayedCallsTo(_R.showHideNavElements),_R.endMoveCaption&&n.endtimeouts&&n.endtimeouts.length>0&&jQuery.each(n.endtimeouts,function(e,t){clearTimeout(t)}),i!=undefined&&i.length>0&&jQuery("body").find("#"+i.attr("id")).length>0){i.data("conthover",1),i.data("conthover-changed",1),i.trigger("revolution.slide.onpause");var a=i.parent().find(".tp-bannertimer"),n=a.data("opt");n.tonpause=!0,i.trigger("stoptimer"),punchgs.TweenLite.killTweensOf(i.find("*"),!1),punchgs.TweenLite.killTweensOf(i,!1),i.unbind("hover, mouseover, mouseenter,mouseleave, resize");var r="resize.revslider-"+i.attr("id");jQuery(window).off(r),i.find("*").each(function(){var e=jQuery(this);e.unbind("on, hover, mouseenter,mouseleave,mouseover, resize,restarttimer, stoptimer"),e.off("on, hover, mouseenter,mouseleave,mouseover, resize"),e.data("mySplitText",null),e.data("ctl",null),e.data("tween")!=undefined&&e.data("tween").kill(),e.data("kenburn")!=undefined&&e.data("kenburn").kill(),e.data("timeline_out")!=undefined&&e.data("timeline_out").kill(),e.data("timeline")!=undefined&&e.data("timeline").kill(),e.remove(),e.empty(),e=null}),punchgs.TweenLite.killTweensOf(i.find("*"),!1),punchgs.TweenLite.killTweensOf(i,!1),a.remove();try{i.closest(".forcefullwidth_wrapper_tp_banner").remove()}catch(o){}try{i.closest(".rev_slider_wrapper").remove()}catch(o){}try{i.remove()}catch(o){}return i.empty(),i.html(),i=null,n=null,delete t.c,delete t.opt,!0}return!1},revpause:function(){return this.each(function(){var e=jQuery(this);if(e!=undefined&&e.length>0&&jQuery("body").find("#"+e.attr("id")).length>0){e.data("conthover",1),e.data("conthover-changed",1),e.trigger("revolution.slide.onpause");var t=e.parent().find(".tp-bannertimer"),i=t.data("opt");i.tonpause=!0,e.trigger("stoptimer")}})},revresume:function(){return this.each(function(){var e=jQuery(this);if(e!=undefined&&e.length>0&&jQuery("body").find("#"+e.attr("id")).length>0){e.data("conthover",0),e.data("conthover-changed",1),e.trigger("revolution.slide.onresume");var t=e.parent().find(".tp-bannertimer"),i=t.data("opt");i.tonpause=!1,e.trigger("starttimer")}})},revstart:function(){var e=jQuery(this);return e!=undefined&&e.length>0&&jQuery("body").find("#"+e.attr("id")).length>0&&e.data("opt")?e.data("opt").sliderisrunning?(console.log("Slider Is Running Already"),!1):(runSlider(e,e.data("opt")),!0):void 0},revnext:function(){return this.each(function(){var e=jQuery(this);if(e!=undefined&&e.length>0&&jQuery("body").find("#"+e.attr("id")).length>0){var t=e.parent().find(".tp-bannertimer"),i=t.data("opt");_R.callingNewSlide(i,e,1)}})},revprev:function(){return this.each(function(){var e=jQuery(this);if(e!=undefined&&e.length>0&&jQuery("body").find("#"+e.attr("id")).length>0){var t=e.parent().find(".tp-bannertimer"),i=t.data("opt");_R.callingNewSlide(i,e,-1)}})},revmaxslide:function(){return jQuery(this).find(".tp-revslider-mainul >li").length},revcurrentslide:function(){var e=jQuery(this);if(e!=undefined&&e.length>0&&jQuery("body").find("#"+e.attr("id")).length>0){var t=e.parent().find(".tp-bannertimer"),i=t.data("opt");return parseInt(i.act,0)+1}},revlastslide:function(){return jQuery(this).find(".tp-revslider-mainul >li").length},revshowslide:function(e){return this.each(function(){var t=jQuery(this);if(t!=undefined&&t.length>0&&jQuery("body").find("#"+t.attr("id")).length>0){var i=t.parent().find(".tp-bannertimer"),a=i.data("opt");_R.callingNewSlide(a,t,"to"+(e-1))}})},revcallslidewithid:function(e){return this.each(function(){var t=jQuery(this);if(t!=undefined&&t.length>0&&jQuery("body").find("#"+t.attr("id")).length>0){var i=t.parent().find(".tp-bannertimer"),a=i.data("opt");_R.callingNewSlide(a,t,e)}})}});var _R=jQuery.fn.revolution;jQuery.extend(!0,_R,{simp:function(e,t,i){var a=Math.abs(e)-Math.floor(Math.abs(e/t))*t;return i?a:0>e?-1*a:a},iOSVersion:function(){var e=!1;return navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/iPad/i)?navigator.userAgent.match(/OS 4_\d like Mac OS X/i)&&(e=!0):e=!1,e},isIE:function(e,t){var i=jQuery('
').appendTo(jQuery("body"));i.html("");var a=i.find("a").length;return i.remove(),a},is_mobile:function(){var e=["android","webos","iphone","ipad","blackberry","Android","webos",,"iPod","iPhone","iPad","Blackberry","BlackBerry"],t=!1;for(var i in e)navigator.userAgent.split(e[i]).length>1&&(t=!0);return t},callBackHandling:function(e,t,i){try{e.callBackArray&&jQuery.each(e.callBackArray,function(e,a){a&&a.inmodule&&a.inmodule===t&&a.atposition&&a.atposition===i&&a.callback&&a.callback.call()})}catch(a){console.log("Call Back Failed")}},get_browser:function(){var e,t=navigator.appName,i=navigator.userAgent,a=i.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return a&&null!=(e=i.match(/version\/([\.\d]+)/i))&&(a[2]=e[1]),a=a?[a[1],a[2]]:[t,navigator.appVersion,"-?"],a[0]},get_browser_version:function(){var e,t=navigator.appName,i=navigator.userAgent,a=i.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return a&&null!=(e=i.match(/version\/([\.\d]+)/i))&&(a[2]=e[1]),a=a?[a[1],a[2]]:[t,navigator.appVersion,"-?"],a[1]},getHorizontalOffset:function(e,t){var i=gWiderOut(e,".outer-left"),a=gWiderOut(e,".outer-right");switch(t){case"left":return i;case"right":return a;case"both":return i+a}},callingNewSlide:function(e,t,i){var a=t.find(".next-revslide").length>0?t.find(".next-revslide").index():t.find(".processing-revslide").length>0?t.find(".processing-revslide").index():t.find(".active-revslide").index(),n=0;t.find(".next-revslide").removeClass("next-revslide"),t.find(".active-revslide").hasClass("tp-invisible-slide")&&(a=e.last_shown_slide),i&&jQuery.isNumeric(i)||i.match(/to/g)?(1===i||-1===i?(n=a+i,n=0>n?e.slideamount-1:n>=e.slideamount?0:n):(i=jQuery.isNumeric(i)?i:parseInt(i.split("to")[1],0),n=0>i?0:i>e.slideamount-1?e.slideamount-1:i),t.find(".tp-revslider-slidesli:eq("+n+")").addClass("next-revslide")):i&&t.find(".tp-revslider-slidesli").each(function(){var e=jQuery(this);e.data("index")===i&&e.addClass("next-revslide")}),n=t.find(".next-revslide").index(),t.trigger("revolution.nextslide.waiting"),n!==a&&-1!=n?swapSlide(t,e):t.find(".next-revslide").removeClass("next-revslide")},slotSize:function(e,t){t.slotw=Math.ceil(t.width/t.slots),"fullscreen"==t.sliderLayout?t.sloth=Math.ceil(jQuery(window).height()/t.slots):t.sloth=Math.ceil(t.height/t.slots),"on"==t.autoHeight&&e!==undefined&&""!==e&&(t.sloth=Math.ceil(e.height()/t.slots))},setSize:function(e){var t=(e.top_outer||0)+(e.bottom_outer||0),i=parseInt(e.carousel.padding_top||0,0),a=parseInt(e.carousel.padding_bottom||0,0),n=e.gridheight[e.curWinRange];if(e.paddings=e.paddings===undefined?{top:parseInt(e.c.parent().css("paddingTop"),0)||0,bottom:parseInt(e.c.parent().css("paddingBottom"),0)||0}:e.paddings,n=ne.gridheight[e.curWinRange]&&"on"!=e.autoHeight&&(e.height=e.gridheight[e.curWinRange]),"fullscreen"==e.sliderLayout||e.infullscreenmode){e.height=e.bw*e.gridheight[e.curWinRange];var r=(e.c.parent().width(),jQuery(window).height());if(e.fullScreenOffsetContainer!=undefined){try{var o=e.fullScreenOffsetContainer.split(",");o&&jQuery.each(o,function(e,t){r=jQuery(t).length>0?r-jQuery(t).outerHeight(!0):r})}catch(s){}try{e.fullScreenOffset.split("%").length>1&&e.fullScreenOffset!=undefined&&e.fullScreenOffset.length>0?r-=jQuery(window).height()*parseInt(e.fullScreenOffset,0)/100:e.fullScreenOffset!=undefined&&e.fullScreenOffset.length>0&&(r-=parseInt(e.fullScreenOffset,0))}catch(s){}}r=r0&&jQuery.each(e.lastplayedvideos,function(t,i){_R.playVideo(i,e)})},leaveViewPort:function(e){e.sliderlaststatus=e.sliderstatus,e.c.trigger("stoptimer"),e.playingvideos!=undefined&&e.playingvideos.length>0&&(e.lastplayedvideos=jQuery.extend(!0,[],e.playingvideos),e.playingvideos&&jQuery.each(e.playingvideos,function(t,i){e.leaveViewPortBasedStop=!0,_R.stopVideo&&_R.stopVideo(i,e)}))},unToggleState:function(e){e!=undefined&&e.length>0&&jQuery.each(e,function(e,t){t.removeClass("rs-toggle-content-active")})},toggleState:function(e){e!=undefined&&e.length>0&&jQuery.each(e,function(e,t){t.addClass("rs-toggle-content-active")})},lastToggleState:function(e){var t=0;return e!=undefined&&e.length>0&&jQuery.each(e,function(e,i){t=i.hasClass("rs-toggle-content-active")}),t}});var _ISM=_R.is_mobile(),removeArray=function(e,t){var i=[];return jQuery.each(e,function(e,a){e!=t&&i.push(a)}),i},removeNavWithLiref=function(e,t,i){i.c.find(e).each(function(){var e=jQuery(this);e.data("liref")===t&&e.remove()})},lAjax=function(e,t){return jQuery("body").data(e)?!1:t.filesystem?(t.errorm===undefined&&(t.errorm=" Local Filesystem Detected ! Put this to your header:"),console.warn("Local Filesystem detected !"),t.errorm=t.errorm+' <script type="text/javascript" src="'+t.jsFileLocation+e+t.extensions_suffix+'"></script>',console.warn(t.jsFileLocation+e+t.extensions_suffix+" could not be loaded !"),console.warn("Please use a local Server or work online or make sure that you load all needed Libraries manually in your Document."),console.log(" "),t.modulesfailing=!0,!1):(jQuery.ajax({url:t.jsFileLocation+e+t.extensions_suffix,dataType:"script",cache:!0,error:function(i){console.warn("Slider Revolution 5.0 Error !"),console.error("Failure at Loading:"+e+t.extensions_suffix+" on Path:"+t.jsFileLocation),console.info(i)}}),void jQuery("body").data(e,!0))},getNeededScripts=function(e,t){var i=new Object,a=e.navigation;return i.kenburns=!1,i.parallax=!1,i.carousel=!1,i.navigation=!1,i.videos=!1,i.actions=!1,i.layeranim=!1,i.migration=!1,t.data("version")&&t.data("version").toString().match(/5./gi)?(t.find("img").each(function(){"on"==jQuery(this).data("kenburns")&&(i.kenburns=!0)}),("carousel"==e.sliderType||"on"==a.keyboardNavigation||"on"==a.mouseScrollNavigation||"on"==a.touch.touchenabled||a.arrows.enable||a.bullets.enable||a.thumbnails.enable||a.tabs.enable)&&(i.navigation=!0),t.find(".tp-caption, .tp-static-layer, .rs-background-video-layer").each(function(){var e=jQuery(this);(e.data("ytid")!=undefined||e.find("iframe").length>0&&e.find("iframe").attr("src").toLowerCase().indexOf("youtube")>0)&&(i.videos=!0),(e.data("vimeoid")!=undefined||e.find("iframe").length>0&&e.find("iframe").attr("src").toLowerCase().indexOf("vimeo")>0)&&(i.videos=!0),e.data("actions")!==undefined&&(i.actions=!0),i.layeranim=!0}),t.find("li").each(function(){jQuery(this).data("link")&&jQuery(this).data("link")!=undefined&&(i.layeranim=!0,i.actions=!0)}),!i.videos&&(t.find(".rs-background-video-layer").length>0||t.find(".tp-videolayer").length>0||t.find(".tp-audiolayer")||t.find("iframe").length>0||t.find("video").length>0)&&(i.videos=!0),"carousel"==e.sliderType&&(i.carousel=!0),("off"!==e.parallax.type||e.viewPort.enable||"true"==e.viewPort.enable)&&(i.parallax=!0)):(i.kenburns=!0,i.parallax=!0,i.carousel=!1,i.navigation=!0,i.videos=!0,i.actions=!0,i.layeranim=!0,i.migration=!0),"hero"==e.sliderType&&(i.carousel=!1,i.navigation=!1),window.location.href.match(/file:/gi)&&(i.filesystem=!0,e.filesystem=!0),i.videos&&"undefined"==typeof _R.isVideoPlaying&&lAjax("revolution.extension.video",e),i.carousel&&"undefined"==typeof _R.prepareCarousel&&lAjax("revolution.extension.carousel",e),i.carousel||"undefined"!=typeof _R.animateSlide||lAjax("revolution.extension.slideanims",e),i.actions&&"undefined"==typeof _R.checkActions&&lAjax("revolution.extension.actions",e),i.layeranim&&"undefined"==typeof _R.handleStaticLayers&&lAjax("revolution.extension.layeranimation",e),i.kenburns&&"undefined"==typeof _R.stopKenBurn&&lAjax("revolution.extension.kenburn",e),i.navigation&&"undefined"==typeof _R.createNavigation&&lAjax("revolution.extension.navigation",e),i.migration&&"undefined"==typeof _R.migration&&lAjax("revolution.extension.migration",e),i.parallax&&"undefined"==typeof _R.checkForParallax&&lAjax("revolution.extension.parallax",e),e.addons!=undefined&&e.addons.length>0&&jQuery.each(e.addons,function(t,i){"object"==typeof i&&i.fileprefix!=undefined&&lAjax(i.fileprefix,e)}),i},waitForScripts=function(e,t){var i=!0,a=t.scriptsneeded;t.addons!=undefined&&t.addons.length>0&&jQuery.each(t.addons,function(e,t){"object"==typeof t&&t.init!=undefined&&_R[t.init]===undefined&&(i=!1)}),a.filesystem||"undefined"!=typeof punchgs&&i&&(!a.kenburns||a.kenburns&&"undefined"!=typeof _R.stopKenBurn)&&(!a.navigation||a.navigation&&"undefined"!=typeof _R.createNavigation)&&(!a.carousel||a.carousel&&"undefined"!=typeof _R.prepareCarousel)&&(!a.videos||a.videos&&"undefined"!=typeof _R.resetVideo)&&(!a.actions||a.actions&&"undefined"!=typeof _R.checkActions)&&(!a.layeranim||a.layeranim&&"undefined"!=typeof _R.handleStaticLayers)&&(!a.migration||a.migration&&"undefined"!=typeof _R.migration)&&(!a.parallax||a.parallax&&"undefined"!=typeof _R.checkForParallax)&&(a.carousel||!a.carousel&&"undefined"!=typeof _R.animateSlide)?e.trigger("scriptsloaded"):setTimeout(function(){waitForScripts(e,t)},50)},getScriptLocation=function(e){var t=new RegExp("themepunch.revolution.min.js","gi"),i="";return jQuery("script").each(function(){var e=jQuery(this).attr("src");e&&e.match(t)&&(i=e)}),i=i.replace("jquery.themepunch.revolution.min.js",""),i=i.replace("jquery.themepunch.revolution.js",""),i=i.split("?")[0]},setCurWinRange=function(e,t){var i=9999,a=0,n=0,r=0,o=jQuery(window).width(),s=t&&9999==e.responsiveLevels?e.visibilityLevels:e.responsiveLevels;s&&s.length&&jQuery.each(s,function(e,t){t>o&&(0==a||a>t)&&(i=t,r=e,a=t),o>t&&t>a&&(a=t,n=e)}),i>a&&(r=n),t?e.forcedWinRange=r:e.curWinRange=r},prepareOptions=function(e,t){t.carousel.maxVisibleItems=t.carousel.maxVisibleItems<1?999:t.carousel.maxVisibleItems,t.carousel.vertical_align="top"===t.carousel.vertical_align?"0%":"bottom"===t.carousel.vertical_align?"100%":"50%"},gWiderOut=function(e,t){var i=0;return e.find(t).each(function(){var e=jQuery(this);!e.hasClass("tp-forcenotvisible")&&i'),container.find(">ul").addClass("tp-revslider-mainul"),opt.c=container,opt.ul=container.find(".tp-revslider-mainul"),opt.ul.find(">li").each(function(e){var t=jQuery(this);"on"==t.data("hideslideonmobile")&&_ISM&&t.remove(),(t.data("invisible")||t.data("invisible")===!0)&&(t.addClass("tp-invisible-slide"),t.appendTo(opt.ul))}),opt.addons!=undefined&&opt.addons.length>0&&jQuery.each(opt.addons,function(i,obj){"object"==typeof obj&&obj.init!=undefined&&_R[obj.init](eval(obj.params))}),opt.cid=container.attr("id"),opt.ul.css({visibility:"visible"}),opt.slideamount=opt.ul.find(">li").not(".tp-invisible-slide").length,opt.slayers=container.find(".tp-static-layers"),void(1!=opt.waitForInit&&(container.data("opt",opt),runSlider(container,opt))))},runSlider=function(e,t){if(t.sliderisrunning=!0,t.ul.find(">li").each(function(e){jQuery(this).data("originalindex",e)}),"on"==t.shuffle){var i=new Object,a=t.ul.find(">li:first-child");i.fstransition=a.data("fstransition"),i.fsmasterspeed=a.data("fsmasterspeed"),i.fsslotamount=a.data("fsslotamount");for(var n=0;nli:eq("+r+")").prependTo(t.ul)}var o=t.ul.find(">li:first-child");o.data("fstransition",i.fstransition),o.data("fsmasterspeed",i.fsmasterspeed),o.data("fsslotamount",i.fsslotamount),t.li=t.ul.find(">li").not(".tp-invisible-slide")}if(t.allli=t.ul.find(">li"),t.li=t.ul.find(">li").not(".tp-invisible-slide"),t.inli=t.ul.find(">li.tp-invisible-slide"),t.thumbs=new Array,t.slots=4,t.act=-1,t.firststart=1,t.loadqueue=new Array,t.syncload=0,t.conw=e.width(),t.conh=e.height(),t.responsiveLevels.length>1?t.responsiveLevels[0]=9999:t.responsiveLevels=9999,jQuery.each(t.allli,function(e,i){var i=jQuery(i),a=i.find(".rev-slidebg")||i.find("img").first(),n=0;i.addClass("tp-revslider-slidesli"),i.data("index")===undefined&&i.data("index","rs-"+Math.round(999999*Math.random()));var r=new Object;r.params=new Array,r.id=i.data("index"),r.src=i.data("thumb")!==undefined?i.data("thumb"):a.data("lazyload")!==undefined?a.data("lazyload"):a.attr("src"),i.data("title")!==undefined&&r.params.push({from:RegExp("\\{\\{title\\}\\}","g"),to:i.data("title")}),i.data("description")!==undefined&&r.params.push({from:RegExp("\\{\\{description\\}\\}","g"),to:i.data("description")});for(var n=1;10>=n;n++)i.data("param"+n)!==undefined&&r.params.push({from:RegExp("\\{\\{param"+n+"\\}\\}","g"),to:i.data("param"+n)});if(t.thumbs.push(r),i.data("origindex",i.index()),i.data("link")!=undefined){var o=i.data("link"),s=i.data("target")||"_self",d="back"===i.data("slideindex")?0:60,l=i.data("linktoslide"),u=l;l!=undefined&&"next"!=l&&"prev"!=l&&t.allli.each(function(){var e=jQuery(this);e.data("origindex")+1==u&&(l=e.data("index"))}),"slide"!=o&&(l="no");var c='':c+"data-actions='"+p+'\' data-start="0">',c+='
',i.append(c)}}),t.rle=t.responsiveLevels.length||1,t.gridwidth=cArray(t.gridwidth,t.rle),t.gridheight=cArray(t.gridheight,t.rle),"on"==t.simplifyAll&&(_R.isIE(8)||_R.iOSVersion())&&(e.find(".tp-caption").each(function(){var e=jQuery(this);e.removeClass("customin customout").addClass("fadein fadeout"),e.data("splitin",""),e.data("speed",400)}),t.allli.each(function(){var e=jQuery(this);e.data("transition","fade"),e.data("masterspeed",500),e.data("slotamount",1);var t=e.find(".rev-slidebg")||e.find(">img").first();t.data("kenburns","off")})),t.desktop=!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i),t.autoHeight="fullscreen"==t.sliderLayout?"on":t.autoHeight,"fullwidth"==t.sliderLayout&&"off"==t.autoHeight&&e.css({maxHeight:t.gridheight[t.curWinRange]+"px"}),"auto"!=t.sliderLayout&&0==e.closest(".forcefullwidth_wrapper_tp_banner").length&&("fullscreen"!==t.sliderLayout||"on"!=t.fullScreenAutoWidth)){var s=e.parent(),d=s.css("marginBottom"),l=s.css("marginTop"),u=e.attr("id")+"_forcefullwidth";d=d===undefined?0:d,l=l===undefined?0:l,s.wrap('
'),e.closest(".forcefullwidth_wrapper_tp_banner").append('
'),e.parent().css({marginTop:"0px",marginBottom:"0px"}),e.parent().css({position:"absolute"})}if(t.shadow!==undefined&&t.shadow>0&&(e.parent().addClass("tp-shadow"+t.shadow),e.parent().append('
'),e.parent().find(".tp-shadowcover").css({backgroundColor:e.parent().css("backgroundColor"),backgroundImage:e.parent().css("backgroundImage")})),setCurWinRange(t),setCurWinRange(t,!0),!e.hasClass("revslider-initialised")){e.addClass("revslider-initialised"),e.addClass("tp-simpleresponsive"),e.attr("id")==undefined&&e.attr("id","revslider-"+Math.round(1e3*Math.random()+5)),t.firefox13=!1,t.ie=!jQuery.support.opacity,t.ie9=9==document.documentMode,t.origcd=t.delay;var c=jQuery.fn.jquery.split("."),p=parseFloat(c[0]),f=parseFloat(c[1]);parseFloat(c[2]||"0");1==p&&7>f&&e.html(' The Current Version of jQuery:'+c+" Please update your jQuery Version to min. 1.7 in Case you wish to use the Revolution Slider Plugin
"),p>1&&(t.ie=!1);var h=new Object;h.addedyt=0,h.addedvim=0,h.addedvid=0,e.find(".tp-caption, .rs-background-video-layer").each(function(e){var i=jQuery(this),a=i.data("autoplayonlyfirsttime"),n=i.data("autoplay"),r=i.hasClass("tp-audiolayer"),o=i.data("videoloop");i.hasClass("tp-static-layer")&&_R.handleStaticLayers&&_R.handleStaticLayers(i,t);var s=i.data("noposteronmobile")||i.data("noPosterOnMobile")||i.data("posteronmobile")||i.data("posterOnMobile")||i.data("posterOnMObile");i.data("noposteronmobile",s);var d=0;if(i.find("iframe").each(function(){punchgs.TweenLite.set(jQuery(this),{autoAlpha:0}),d++}),d>0&&i.data("iframes",!0),i.hasClass("tp-caption")){var l=i.hasClass("slidelink")?"width:100% !important;height:100% !important;":"";i.wrap('');var u=["pendulum","rotate","slideloop","pulse","wave"],c=i.closest(".tp-loop-wrap");jQuery.each(u,function(e,t){var a=i.find(".rs-"+t),n=a.data()||"";""!=n&&(c.data(n),c.addClass("rs-"+t),a.children(0).unwrap(),i.data("loopanimation","on"))}),punchgs.TweenLite.set(i,{visibility:"hidden"})}var p=i.data("actions");p!==undefined&&_R.checkActions(i,t,p),checkHoverDependencies(i,t),_R.checkVideoApis&&(h=_R.checkVideoApis(i,t,h)),_ISM&&((1==a||"true"==a)&&(i.data("autoplayonlyfirsttime","false"),a=!1),(1==n||"true"==n||"on"==n||"1sttime"==n)&&(i.data("autoplay","off"),n="off")),i.data("videoloop",o),r||1!=a&&"true"!=a&&"1sttime"!=n||"loopandnoslidestop"==o||i.closest("li.tp-revslider-slidesli").addClass("rs-pause-timer-once"),r||1!=n&&"true"!=n&&"on"!=n&&"no1sttime"!=n||"loopandnoslidestop"==o||i.closest("li.tp-revslider-slidesli").addClass("rs-pause-timer-always")}),e.hover(function(){e.trigger("tp-mouseenter"),t.overcontainer=!0},function(){e.trigger("tp-mouseleft"),t.overcontainer=!1}),e.on("mouseover",function(){e.trigger("tp-mouseover"),t.overcontainer=!0}),e.find(".tp-caption video").each(function(e){var t=jQuery(this);t.removeClass("video-js vjs-default-skin"),t.attr("preload",""),t.css({display:"none"})}),"standard"!==t.sliderType&&(t.lazyType="all"),loadImages(e.find(".tp-static-layers"),t,0,!0),waitForCurrentImages(e.find(".tp-static-layers"),t,function(){e.find(".tp-static-layers img").each(function(){var e=jQuery(this),i=e.data("lazyload")!=undefined?e.data("lazyload"):e.attr("src"),a=getLoadObj(t,i);e.attr("src",a.src)})}),t.allli.each(function(e){var i=jQuery(this);("all"==t.lazyType||"smart"==t.lazyType&&(0==e||1==e||e==t.slideamount||e==t.slideamount-1))&&(loadImages(i,t,e),waitForCurrentImages(i,t,function(){"carousel"==t.sliderType&&punchgs.TweenLite.to(i,1,{autoAlpha:1,ease:punchgs.Power3.easeInOut})}))});var g=getUrlVars("#")[0];if(g.length<9&&g.split("slide").length>1){var v=parseInt(g.split("slide")[1],0);1>v&&(v=1),v>t.slideamount&&(v=t.slideamount),t.startWithSlide=v-1}e.append(''),0===e.find(".tp-bannertimer").length&&e.append('
'),e.find(".tp-bannertimer").css({width:"0%"}),e.find(".tp-bannertimer").data("opt",t),t.ul.css({display:"block"}),prepareSlides(e,t),"off"!==t.parallax.type&&_R.checkForParallax&&_R.checkForParallax(e,t),_R.setSize(t),"hero"!==t.sliderType&&_R.createNavigation&&_R.createNavigation(e,t),_R.resizeThumbsTabs&&_R.resizeThumbsTabs&&_R.resizeThumbsTabs(t),contWidthManager(t);var m=t.viewPort;t.inviewport=!1,m!=undefined&&m.enable&&(jQuery.isNumeric(m.visible_area)||-1!==m.visible_area.indexOf("%")&&(m.visible_area=parseInt(m.visible_area)/100),_R.scrollTicker&&_R.scrollTicker(t,e)),setTimeout(function(){"carousel"==t.sliderType&&_R.prepareCarousel&&_R.prepareCarousel(t),!m.enable||m.enable&&t.inviewport||m.enable&&!t.inviewport&&"wait"==!m.outof?swapSlide(e,t):t.waitForFirstSlide=!0,_R.manageNavigation&&_R.manageNavigation(t),t.slideamount>1&&(!m.enable||m.enable&&t.inviewport?countDown(e,t):t.waitForCountDown=!0),setTimeout(function(){e.trigger("revolution.slide.onloaded")},100)},t.startDelay),t.startDelay=0,jQuery("body").data("rs-fullScreenMode",!1),
jQuery(window).on("mozfullscreenchange webkitfullscreenchange fullscreenchange",function(){jQuery("body").data("rs-fullScreenMode",!jQuery("body").data("rs-fullScreenMode")),jQuery("body").data("rs-fullScreenMode")&&setTimeout(function(){jQuery(window).trigger("resize")},200)});var y="resize.revslider-"+e.attr("id");jQuery(window).on(y,function(){if(e==undefined)return!1;0!=jQuery("body").find(e)&&contWidthManager(t);var i=!1;if("fullscreen"==t.sliderLayout){var a=jQuery(window).height();"mobile"==t.fallbacks.ignoreHeightChanges&&_ISM||"always"==t.fallbacks.ignoreHeightChanges?(t.fallbacks.ignoreHeightChangesSize=t.fallbacks.ignoreHeightChangesSize==undefined?0:t.fallbacks.ignoreHeightChangesSize,i=a!=t.lastwindowheight&&Math.abs(a-t.lastwindowheight)>t.fallbacks.ignoreHeightChangesSize):i=a!=t.lastwindowheight}(e.outerWidth(!0)!=t.width||e.is(":hidden")||i)&&(t.lastwindowheight=jQuery(window).height(),containerResized(e,t))}),hideSliderUnder(e,t),contWidthManager(t),t.fallbacks.disableFocusListener||"true"==t.fallbacks.disableFocusListener||t.fallbacks.disableFocusListener===!0||tabBlurringCheck(e,t)}},cArray=function(e,t){if(!jQuery.isArray(e)){var i=e;e=new Array,e.push(i)}if(e.length0&&o.hasClass("active-revslide")||o.hasClass("processing-revslide")||s.length>0){a!=undefined&&(a.pause(0),a.kill()),_R.animateSingleCaption(i,t,n,r,0,!1,!0);var d=i.data("timeline");i.data("triggerstate","on"),d.play(0)}})}),t.c.on("tp-mouseleft",function(){t.layersonhover&&jQuery.each(t.layersonhover,function(e,i){i.data("animdirection","out"),i.data("triggered",!0),i.data("triggerstate","off"),_R.stopVideo&&_R.stopVideo(i,t),_R.endMoveCaption&&_R.endMoveCaption(i,null,null,t)})}),t.layersonhover=new Array),t.layersonhover.push(e))},contWidthManager=function(e){var t=_R.getHorizontalOffset(e.c,"left");if("auto"==e.sliderLayout||"fullscreen"===e.sliderLayout&&"on"==e.fullScreenAutoWidth)"fullscreen"==e.sliderLayout&&"on"==e.fullScreenAutoWidth?punchgs.TweenLite.set(e.ul,{left:0,width:e.c.width()}):punchgs.TweenLite.set(e.ul,{left:t,width:e.c.width()-_R.getHorizontalOffset(e.c,"both")});else{var i=Math.ceil(e.c.closest(".forcefullwidth_wrapper_tp_banner").offset().left-t);punchgs.TweenLite.set(e.c.parent(),{left:0-i+"px",width:jQuery(window).width()-_R.getHorizontalOffset(e.c,"both")})}e.slayers&&"fullwidth"!=e.sliderLayout&&"fullscreen"!=e.sliderLayout&&punchgs.TweenLite.set(e.slayers,{left:t})},cv=function(e,t){return e===undefined?t:e},hideSliderUnder=function(e,t,i){var a=e.parent();jQuery(window).width()e.bw?e.bh=e.bw:e.bw=e.bh,(e.bh>1||e.bw>1)&&(e.bw=1,e.bh=1)},prepareSlides=function(e,t){if(e.find(".tp-caption").each(function(){var e=jQuery(this);e.data("transition")!==undefined&&e.addClass(e.data("transition"))}),t.ul.css({overflow:"hidden",width:"100%",height:"100%",maxHeight:e.parent().css("maxHeight")}),"on"==t.autoHeight&&(t.ul.css({overflow:"hidden",width:"100%",height:"100%",maxHeight:"none"}),e.css({maxHeight:"none"}),e.parent().css({maxHeight:"none"})),t.allli.each(function(e){var i=jQuery(this),a=i.data("originalindex");(t.startWithSlide!=undefined&&a==t.startWithSlide||t.startWithSlide===undefined&&0==e)&&i.addClass("next-revslide"),i.css({width:"100%",height:"100%",overflow:"hidden"})}),"carousel"===t.sliderType){t.ul.css({overflow:"visible"}).wrap('
');var i='
';t.c.parent().prepend(i),t.c.parent().append(i),_R.prepareCarousel(t)}e.parent().css({overflow:"visible"}),t.allli.find(">img").each(function(e){var i=jQuery(this),a=i.closest("li").find(".rs-background-video-layer");a.addClass("defaultvid").css({zIndex:30}),i.addClass("defaultimg"),"on"==t.fallbacks.panZoomDisableOnMobile&&_ISM&&(i.data("kenburns","off"),i.data("bgfit","cover")),i.wrap('
'),a.appendTo(i.closest("li").find(".slotholder"));var n=i.data();i.closest(".slotholder").data(n),a.length>0&&n.bgparallax!=undefined&&a.data("bgparallax",n.bgparallax),"none"!=t.dottedOverlay&&t.dottedOverlay!=undefined&&i.closest(".slotholder").append('
');var r=i.attr("src");n.src=r,n.bgfit=n.bgfit||"cover",n.bgrepeat=n.bgrepeat||"no-repeat",n.bgposition=n.bgposition||"center center";var o=i.closest(".slotholder");i.parent().append('
');var s=document.createComment("Runtime Modification - Img tag is Still Available for SEO Goals in Source - "+i.get(0).outerHTML);i.replaceWith(s),i=o.find(".tp-bgimg"),i.data(n),i.attr("src",r),("standard"===t.sliderType||"undefined"===t.sliderType)&&i.css({opacity:0})})},removeSlots=function(e,t,i,a){t.removePrepare=t.removePrepare+a,i.find(".slot, .slot-circle-wrapper").each(function(){jQuery(this).remove()}),t.transition=0,t.removePrepare=0},cutParams=function(e){var t=e;return e!=undefined&&e.length>0&&(t=e.split("?")[0]),t},relativeRedir=function(e){return location.pathname.replace(/(.*)\/[^\/]*/,"$1/"+e)},abstorel=function(e,t){var i=e.split("/"),a=t.split("/");i.pop();for(var n=0;n'),i.find(".tp-svg-innercontainer").append(r.innerHTML));i.data("loaded",!0)}if(r&&r.progress&&r.progress.match(/inprogress|inload|prepared/g)&&(!r.error&&jQuery.now()-i.data("start-to-load")<5e3?a=!0:(r.progress="failed",r.reported_img||(r.reported_img=!0,console.warn(n+" Could not be loaded !")))),1==t.youtubeapineeded&&(!window.YT||YT.Player==undefined)&&(a=!0,jQuery.now()-t.youtubestarttime>5e3&&1!=t.youtubewarning)){t.youtubewarning=!0;var d="YouTube Api Could not be loaded !";"https:"===location.protocol&&(d+=" Please Check and Renew SSL Certificate !"),console.error(d),t.c.append(''+d+"
")}if(1==t.vimeoapineeded&&!window.Froogaloop&&(a=!0,jQuery.now()-t.vimeostarttime>5e3&&1!=t.vimeowarning)){t.vimeowarning=!0;var d="Vimeo Froogaloop Api Could not be loaded !";"https:"===location.protocol&&(d+=" Please Check and Renew SSL Certificate !"),console.error(d),t.c.append(''+d+"
")}}),!_ISM&&t.audioqueue&&t.audioqueue.length>0&&jQuery.each(t.audioqueue,function(e,t){t.status&&"prepared"===t.status&&jQuery.now()-t.start0)return t.waitWithSwapSlide=setTimeout(function(){swapSlide(e,t)},150),!1;var i=e.find(".active-revslide"),a=e.find(".next-revslide"),n=a.find(".defaultimg");return a.index()===i.index()?(a.removeClass("next-revslide"),!1):(a.removeClass("next-revslide").addClass("processing-revslide"),a.data("slide_on_focus_amount",a.data("slide_on_focus_amount")+1||1),"on"==t.stopLoop&&a.index()==t.lastslidetoshow-1&&(e.find(".tp-bannertimer").css({visibility:"hidden"}),e.trigger("revolution.slide.onstop"),t.noloopanymore=1),a.index()===t.slideamount-1&&(t.looptogo=t.looptogo-1,t.looptogo<=0&&(t.stopLoop="on")),t.tonpause=!0,e.trigger("stoptimer"),t.cd=0,"off"===t.spinner?e.find(".tp-loader").css({display:"none"}):e.find(".tp-loader").css({display:"block"}),loadImages(a,t,1),_R.preLoadAudio&&_R.preLoadAudio(a,t,1),void waitForCurrentImages(a,t,function(){a.find(".rs-background-video-layer").each(function(){var e=jQuery(this);e.hasClass("HasListener")||(e.data("bgvideo",1),_R.manageVideoLayer&&_R.manageVideoLayer(e,t)),0==e.find(".rs-fullvideo-cover").length&&e.append('
')}),swapSlideProgress(t,n,e)}))},swapSlideProgress=function(e,t,i){var a=i.find(".active-revslide"),n=i.find(".processing-revslide"),r=a.find(".slotholder"),o=n.find(".slotholder");e.tonpause=!1,e.cd=0,i.find(".tp-loader").css({display:"none"}),_R.setSize(e),_R.slotSize(t,e),_R.manageNavigation&&_R.manageNavigation(e);var s={};s.nextslide=n,s.currentslide=a,i.trigger("revolution.slide.onbeforeswap",s),e.transition=1,e.videoplaying=!1,n.data("delay")!=undefined?(e.cd=0,e.delay=n.data("delay")):e.delay=e.origcd,"true"==n.data("ssop")||n.data("ssop")===!0?e.ssop=!0:e.ssop=!1,i.trigger("nulltimer");var d=a.index(),l=n.index();e.sdir=d>l?1:0,"arrow"==e.sc_indicator&&(0==d&&l==e.slideamount-1&&(e.sdir=1),d==e.slideamount-1&&0==l&&(e.sdir=0)),e.lsdir=e.lsdir===undefined?e.sdir:e.lsdir,e.dirc=e.lsdir!=e.sdir,e.lsdir=e.sdir,a.index()!=n.index()&&1!=e.firststart&&_R.removeTheCaptions&&_R.removeTheCaptions(a,e),n.hasClass("rs-pause-timer-once")||n.hasClass("rs-pause-timer-always")?e.videoplaying=!0:i.trigger("restarttimer"),n.removeClass("rs-pause-timer-once");var u,c;if("carousel"==e.sliderType)c=new punchgs.TimelineLite,_R.prepareCarousel(e,c),letItFree(i,e,o,r,n,a,c),e.transition=0,e.firststart=0;else{c=new punchgs.TimelineLite({onComplete:function(){letItFree(i,e,o,r,n,a,c)}}),c.add(punchgs.TweenLite.set(o.find(".defaultimg"),{opacity:0})),c.pause(),1==e.firststart&&(punchgs.TweenLite.set(a,{autoAlpha:0}),e.firststart=0),punchgs.TweenLite.set(a,{zIndex:18}),punchgs.TweenLite.set(n,{autoAlpha:0,zIndex:20}),"prepared"==n.data("differentissplayed")&&(n.data("differentissplayed","done"),n.data("transition",n.data("savedtransition")),n.data("slotamount",n.data("savedslotamount")),n.data("masterspeed",n.data("savedmasterspeed"))),n.data("fstransition")!=undefined&&"done"!=n.data("differentissplayed")&&(n.data("savedtransition",n.data("transition")),n.data("savedslotamount",n.data("slotamount")),n.data("savedmasterspeed",n.data("masterspeed")),n.data("transition",n.data("fstransition")),n.data("slotamount",n.data("fsslotamount")),n.data("masterspeed",n.data("fsmasterspeed")),n.data("differentissplayed","prepared")),n.data("transition")==undefined&&n.data("transition","random"),u=0;var p=n.data("transition")!==undefined?n.data("transition").split(","):"fade",f=n.data("nexttransid")==undefined?-1:n.data("nexttransid");"on"==n.data("randomtransition")?f=Math.round(Math.random()*p.length):f+=1,f==p.length&&(f=0),n.data("nexttransid",f);var h=p[f];e.ie&&("boxfade"==h&&(h="boxslide"),"slotfade-vertical"==h&&(h="slotzoom-vertical"),"slotfade-horizontal"==h&&(h="slotzoom-horizontal")),_R.isIE(8)&&(h=11),c=_R.animateSlide(u,h,i,e,n,a,o,r,c),"on"==o.data("kenburns")&&(_R.startKenBurn(o,e),c.add(punchgs.TweenLite.set(o,{autoAlpha:0}))),c.pause()}_R.scrollHandling&&(_R.scrollHandling(e,!0),c.eventCallback("onUpdate",function(){_R.scrollHandling(e,!0)})),"off"!=e.parallax.type&&e.parallax.firstgo==undefined&&_R.scrollHandling&&(e.parallax.firstgo=!0,e.lastscrolltop=-999,_R.scrollHandling(e,!0),setTimeout(function(){e.lastscrolltop=-999,_R.scrollHandling(e,!0)},210),setTimeout(function(){e.lastscrolltop=-999,_R.scrollHandling(e,!0)},420)),_R.animateTheCaptions?_R.animateTheCaptions(n,e,null,c):c!=undefined&&setTimeout(function(){c.resume()},30),punchgs.TweenLite.to(n,.001,{autoAlpha:1})},letItFree=function(e,t,i,a,n,r,o){"carousel"===t.sliderType||(t.removePrepare=0,punchgs.TweenLite.to(i.find(".defaultimg"),.001,{zIndex:20,autoAlpha:1,onComplete:function(){removeSlots(e,t,n,1)}}),n.index()!=r.index()&&punchgs.TweenLite.to(r,.2,{zIndex:18,autoAlpha:0,onComplete:function(){removeSlots(e,t,r,1)}})),e.find(".active-revslide").removeClass("active-revslide"),e.find(".processing-revslide").removeClass("processing-revslide").addClass("active-revslide"),t.act=n.index(),t.c.attr("data-slideactive",e.find(".active-revslide").data("index")),("scroll"==t.parallax.type||"scroll+mouse"==t.parallax.type||"mouse+scroll"==t.parallax.type)&&(t.lastscrolltop=-999,_R.scrollHandling(t)),o.clear(),a.data("kbtl")!=undefined&&(a.data("kbtl").reverse(),a.data("kbtl").timeScale(25)),"on"==i.data("kenburns")&&(i.data("kbtl")!=undefined?(i.data("kbtl").timeScale(1),i.data("kbtl").play()):_R.startKenBurn(i,t)),n.find(".rs-background-video-layer").each(function(e){if(_ISM)return!1;var i=jQuery(this);_R.resetVideo(i,t),punchgs.TweenLite.fromTo(i,1,{autoAlpha:0},{autoAlpha:1,ease:punchgs.Power3.easeInOut,delay:.2,onComplete:function(){_R.animcompleted&&_R.animcompleted(i,t)}})}),r.find(".rs-background-video-layer").each(function(e){if(_ISM)return!1;var i=jQuery(this);_R.stopVideo&&(_R.resetVideo(i,t),_R.stopVideo(i,t)),punchgs.TweenLite.to(i,1,{autoAlpha:0,ease:punchgs.Power3.easeInOut,delay:.2})});var s={};s.slideIndex=n.index()+1,s.slideLIIndex=n.index(),s.slide=n,s.currentslide=n,s.prevslide=r,t.last_shown_slide=r.index(),e.trigger("revolution.slide.onchange",s),e.trigger("revolution.slide.onafterswap",s),t.duringslidechange=!1;var d=r.data("slide_on_focus_amount"),l=r.data("hideafterloop");0!=l&&d>=l&&t.c.revremoveslide(r.index())},removeAllListeners=function(e,t){e.children().each(function(){try{jQuery(this).die("click")}catch(e){}try{jQuery(this).die("mouseenter")}catch(e){}try{jQuery(this).die("mouseleave")}catch(e){}try{jQuery(this).unbind("hover")}catch(e){}});try{e.die("click","mouseenter","mouseleave")}catch(i){}clearInterval(t.cdint),e=null},countDown=function(e,t){t.cd=0,t.loop=0,t.stopAfterLoops!=undefined&&t.stopAfterLoops>-1?t.looptogo=t.stopAfterLoops:t.looptogo=9999999,t.stopAtSlide!=undefined&&t.stopAtSlide>-1?t.lastslidetoshow=t.stopAtSlide:t.lastslidetoshow=999,t.stopLoop="off",0==t.looptogo&&(t.stopLoop="on");var i=e.find(".tp-bannertimer");e.on("stoptimer",function(){var e=jQuery(this).find(".tp-bannertimer");e.data("tween").pause(),"on"==t.disableProgressBar&&e.css({visibility:"hidden"}),t.sliderstatus="paused",_R.unToggleState(t.slidertoggledby)}),e.on("starttimer",function(){t.forcepause_viatoggle||(1!=t.conthover&&1!=t.videoplaying&&t.width>t.hideSliderAtLimit&&1!=t.tonpause&&1!=t.overnav&&1!=t.ssop&&(1===t.noloopanymore||t.viewPort.enable&&!t.inviewport||(i.css({visibility:"visible"}),i.data("tween").resume(),t.sliderstatus="playing")),"on"==t.disableProgressBar&&i.css({visibility:"hidden"}),_R.toggleState(t.slidertoggledby))}),e.on("restarttimer",function(){if(!t.forcepause_viatoggle){var e=jQuery(this).find(".tp-bannertimer");if(t.mouseoncontainer&&"on"==t.navigation.onHoverStop&&!_ISM)return!1;1===t.noloopanymore||t.viewPort.enable&&!t.inviewport||1==t.ssop||(e.css({visibility:"visible"}),e.data("tween").kill(),e.data("tween",punchgs.TweenLite.fromTo(e,t.delay/1e3,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:a,delay:1})),t.sliderstatus="playing"),"on"==t.disableProgressBar&&e.css({visibility:"hidden"}),_R.toggleState(t.slidertoggledby)}}),e.on("nulltimer",function(){i.data("tween").kill(),i.data("tween",punchgs.TweenLite.fromTo(i,t.delay/1e3,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:a,delay:1})),i.data("tween").pause(0),"on"==t.disableProgressBar&&i.css({visibility:"hidden"}),t.sliderstatus="paused"});var a=function(){0==jQuery("body").find(e).length&&(removeAllListeners(e,t),clearInterval(t.cdint)),e.trigger("revolution.slide.slideatend"),1==e.data("conthover-changed")&&(t.conthover=e.data("conthover"),e.data("conthover-changed",0)),_R.callingNewSlide(t,e,1)};i.data("tween",punchgs.TweenLite.fromTo(i,t.delay/1e3,{width:"0%"},{force3D:"auto",width:"100%",ease:punchgs.Linear.easeNone,onComplete:a,delay:1})),i.data("opt",t),t.slideamount>1&&(0!=t.stopAfterLoops||1!=t.stopAtSlide)?e.trigger("starttimer"):(t.noloopanymore=1,e.trigger("nulltimer")),e.on("tp-mouseenter",function(){t.mouseoncontainer=!0,"on"!=t.navigation.onHoverStop||_ISM||(e.trigger("stoptimer"),e.trigger("revolution.slide.onpause"))}),e.on("tp-mouseleft",function(){t.mouseoncontainer=!1,1!=e.data("conthover")&&"on"==t.navigation.onHoverStop&&(1==t.viewPort.enable&&t.inviewport||0==t.viewPort.enable)&&(e.trigger("revolution.slide.onresume"),e.trigger("starttimer"))})},vis=function(){var e,t,i={hidden:"visibilitychange",webkitHidden:"webkitvisibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange"};for(e in i)if(e in document){t=i[e];break}return function(i){return i&&document.addEventListener(t,i),!document[e]}}(),restartOnFocus=function(e){return e==undefined||e.c==undefined?!1:void(1!=e.windowfocused&&(e.windowfocused=!0,punchgs.TweenLite.delayedCall(.3,function(){"on"==e.fallbacks.nextSlideOnWindowFocus&&e.c.revnext(),e.c.revredraw(),"playing"==e.lastsliderstatus&&e.c.revresume()})))},lastStatBlur=function(e){e.windowfocused=!1,e.lastsliderstatus=e.sliderstatus,e.c.revpause();var t=e.c.find(".active-revslide .slotholder"),i=e.c.find(".processing-revslide .slotholder");"on"==i.data("kenburns")&&_R.stopKenBurn(i,e),"on"==t.data("kenburns")&&_R.stopKenBurn(t,e)},tabBlurringCheck=function(e,t){var i=document.documentMode===undefined,a=window.chrome;i&&!a?jQuery(window).on("focusin",function(){restartOnFocus(t)}).on("focusout",function(){lastStatBlur(t)}):window.addEventListener?(window.addEventListener("focus",function(e){restartOnFocus(t)},!1),window.addEventListener("blur",function(e){lastStatBlur(t)},!1)):(window.attachEvent("focus",function(e){restartOnFocus(t)}),window.attachEvent("blur",function(e){lastStatBlur(t)}))},getUrlVars=function(e){for(var t,i=[],a=window.location.href.slice(window.location.href.indexOf(e)+1).split("_"),n=0;n https://ironlights.net/wp-content/themes/wp_nuvo/js/bootstrap.min.js?ver=3.2.0
/*!
* Bootstrap v3.2.0 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('
').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j ').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;e?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(150):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var f=function(){c.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",f).emulateTransitionEnd(150):f()}else b&&b()},c.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.2.0",c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var c=a.contains(document.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!c)return;var d=this,e=this.tip(),f=this.getUID(this.type);this.setContent(),e.attr("id",f),this.$element.attr("aria-describedby",f),this.options.animation&&e.addClass("fade");var g="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,h=/\s?auto?\s?/i,i=h.test(g);i&&(g=g.replace(h,"")||"top"),e.detach().css({top:0,left:0,display:"block"}).addClass(g).data("bs."+this.type,this),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element);var j=this.getPosition(),k=e[0].offsetWidth,l=e[0].offsetHeight;if(i){var m=g,n=this.$element.parent(),o=this.getPosition(n);g="bottom"==g&&j.top+j.height+l-o.scroll>o.height?"top":"top"==g&&j.top-o.scroll-l<0?"bottom":"right"==g&&j.right+k>o.width?"left":"left"==g&&j.left-kg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.2.0",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").empty()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.2.0",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.2.0",c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.closest("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},c.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one("bsTransitionEnd",e).emulateTransitionEnd(150):e(),f.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(c){c.preventDefault(),b.call(a(this),"show")})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.2.0",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=a(document).height(),d=this.$target.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=b-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){null!=this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:b-this.$element.height()-h}))}}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},d.offsetBottom&&(d.offset.bottom=d.offsetBottom),d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
// source --> https://ironlights.net/wp-content/themes/wp_nuvo/js/cs_parallax.js?ver=4.5.31
(function($) { "use strict";
jQuery(document).ready(function ($) {
var window_height = $(window).height();
var window_width = $(window).width();
$('.stripe-parallax-bg').each(function () {
var $this = $(this),
element_h = $this.outerHeight(),
background_w = $this.data('background-width'),
background_h = $this.data('background-height'),
ratio = background_w / background_h;
var speedFactor = $this.data('stellar-background-ratio');
var backgroundsize = 'background-size:auto ' + background_h + 'px !important';
var adjustbackground = function(){
window_height = $(window).height();
element_h = $this.outerHeight();
background_h = element_h + (window_height) * (1-speedFactor);
background_w = background_h*ratio;
if(background_w < $this.outerWidth()){
background_w = $this.outerWidth();
background_h = background_w/ratio;
}
backgroundsize = 'background-size:auto ' + background_h + 'px !important';
};
var doScroll = function(){
//if ($(window).width() < 768) return;
var delta = Math.round(isappears($this) * (1-speedFactor));
if (delta > 0) {
var background_y = $this.outerHeight() - background_h + delta;
$this.css('cssText', 'background-position: 0px ' + background_y + 'px !important');
}
};
adjustbackground();
$(window).bind('resize', function () {
adjustbackground();
doScroll();
}).bind('load',function(){
adjustbackground();
doScroll();
}).bind('scroll', doScroll);
});
/*Video parallax*/
$('.stripe-video-wrap').each(function () {
var $this = $(this),$video = $this.find('video'),speedFactor=$(this).data('stellar-background-ratio')||0.7,ratio=0,video_bottom=0;
var video_height = 0;
var el_height = $(this).outerHeight();
$video.bind('loadeddata', function(){
adjustvideo();
doScroll();
});
var adjustvideo = function(){
ratio = $video.data('ratio');
//video_height = $(window).width() / ratio;
video_height = el_height + (el_height + window_height) * (1 - speedFactor);
if (video_height < $(window).width() / ratio) {
video_height = $(window).width() / ratio
}
$video.css({
'height': video_height + 'px',
'width': video_height * ratio + 'px',
'maxWidth': video_height * ratio + 'px',
bottom: 0
});
}
if (speedFactor == 1) return;
var doScroll = function(){
if ($(window).width() < 768) return;
$video.attr(
{
'appear':isappears($this),
'delta':Math.round(isappears($this) * (1-speedFactor))
}
);
var delta = Math.round(isappears($this) * (1-speedFactor));
$video.css({
bottom: (0 - delta) + 'px'
})
};
adjustvideo();
doScroll();
$(window).bind('scroll', doScroll).bind('resize',function(){
adjustvideo();
doScroll();
});
})
function isappears(element) {
var scrolltop = $(window).scrollTop(),top = $(element).offset().top;
if(top < $(window).height()){
return scrolltop;
}
if ((scrolltop + $(window).height()) >= ($(element).offset().top)) {
return scrolltop + $(window).height() - $(element).offset().top;
}
return 0;
}
});
})(jQuery);
// source --> https://ironlights.net/wp-content/themes/wp_nuvo/js/jquery_cookie.min.js?ver=4.5.31
/*!
* jQuery Cookie Plugin v1.4.0
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2013 Klaus Hartl
* Released under the MIT license
*/(function(e){typeof define=="function"&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{e=decodeURIComponent(e.replace(t," "))}catch(n){return}try{return u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setDate(l.getDate()+f)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p https://ironlights.net/wp-content/themes/wp_nuvo/js/main.js?ver=1.0.0
/*
* CS Hero
*
*/
/*same height*/
function sameHeight(){
"use strict";
var biggestHeight = 0;
jQuery('.sameheight article').each(function(){
if(jQuery(this).height() > biggestHeight){
biggestHeight = jQuery(this).height();
}
});
jQuery('.sameheight article').height(biggestHeight);
}
(function($) { "use strict";
/*color box*/
jQuery(function(){
if(jQuery(".colorbox").length>0){
jQuery(".colorbox").colorbox();
}
if(jQuery(".cs-colorbox-post-video").length>0){
jQuery(".cs-colorbox-post-video").colorbox({
iframe:true,
innerWidth:640,
innerHeight:390
});
}
if(jQuery(".cs-colorbox-post-gallery").length>0){
var pid=jQuery(".cs-colorbox-post-gallery").data('sid');
jQuery(".cs-colorbox-post-gallery").colorbox({
html: ""
});
}
if(jQuery(".cs-masonry-layout").length>0){
jQuery(".cs-masonry-layout").imagesLoaded(function(){
jQuery(".cs-masonry-layout").isotope({
itemSelector: '.cs-masonry-layout-item'
});
});
}
});
function wheel(event) {
if (event.wheelDelta) delta = event.wheelDelta / 120;
else if (event.detail) delta = -event.detail / 3;
handle(270,300,delta);
if (event.preventDefault){event.preventDefault()};
event.returnValue = false;
}
function handle(distance,time,delta) {
jQuery('html, body').stop().animate({
scrollTop: jQuery(window).scrollTop() - (distance * delta)
}, time);
}
function fullWidth(){
var windowWidth = jQuery(window).width();
jQuery('.stripe').each(function(){
var $bgobj = jQuery(this);
var width = $bgobj.width();
var v = (windowWidth - width)/2;
$bgobj.css({
marginLeft:-v,
paddingLeft:v,
paddingRight:v
});
})
}
function boxed(){
var windowWidth = jQuery(window).width();
jQuery('.stripe').each(function(){
jQuery(this).css({
marginLeft:0,
paddingLeft:0,
paddingRight:0
});
})
}
jQuery(document).ready(function($){
/* Menu */
var depth = 0;
var el = null;
var w_width = jQuery(window).width();
jQuery('li.menu-item').hover(function(){
el = jQuery('.sub-menu:first',this);
if(el.length > 0){
var el_width = el.outerWidth();
var el_left = el.offset().left;
if(w_width < (el_left+el_width)){
el.addClass('autodrop_left');
}else if(el_left<=0){
el.addClass('autodrop_right');
}
}
},function(){
if(el){
el.removeClass('autodrop_left');
el.removeClass('autodrop_right');
el = null;
}
})
/* End Menu */
$('.widget_widget_cart_search').removeAttr('id');
$('.smooth2pager').click(function(){
var selector = $(this).data('el-selector');
var top = $(selector).offset().top;
$("html,body").animate({scrollTop: top }, 500);
})
var $mainmenu = $('.main-menu-content .cshero-dropdown');
var $stickymenu = $('.sticky-menu .cshero-mobile > ul');
var $mobilemenu = $mainmenu.clone().removeClass('main-menu right left').addClass('cshero-mobile-menu');
$mobilemenu.find('li').each(function(){
var $this = $(this);
if($this.find('ul').length > 0){
var $menutoggle = $('');
$menutoggle.bind('click',function(){$this.toggleClass('open')});
$this.append($menutoggle);
}
});
$mobilemenu.appendTo('#cshero-main-menu-mobile');
var $mobilesticky = $mobilemenu.clone(true);
$mobilesticky.find('li').each(function(){
var $this = $(this);
if($this.find('ul').length > 0){
var $menutoggle = $('');
$menutoggle.bind('click',function(){$this.toggleClass('open')});
$this.append($menutoggle);
}
});
$mobilesticky.appendTo('#cshero-sticky-menu-mobile');
/* Show Tooltip */
jQuery('[data-rel="tooltip"]').tooltip();
/* Back to top */
var window_height = $(window).height();
var back_to_top = $('#back_to_top');
var mainmenu = $('.cs-header-custom').find('div').first();
var menu_top = $('#cs-header-custom-bottom');
if(menu_top.length > 0){
menu_top.addClass('menu-up');
}
$(window).scroll(function() {
/* fixed menu */
var scroll_top = $(window).scrollTop();
if(menu_top.length > 0){
if(scroll_top >= menu_top.outerHeight(true)){
menu_top.removeClass('menu-up');
} else{
menu_top.addClass('menu-up');
}
if(scroll_top >= (mainmenu.outerHeight(true) - menu_top.outerHeight(true))){
menu_top.addClass('fixed-top');
if(scroll_top >= (mainmenu.outerHeight(true) + menu_top.outerHeight(true) / 2)){
menu_top.removeClass('fullsize').addClass('resize');
}
} else{
menu_top.removeClass('fixed-top');
if(scroll_top <= (mainmenu.outerHeight(true) + menu_top.outerHeight(true))){
menu_top.removeClass('resize').addClass('fullsize');
}
}
}
/* back to top */
if(scroll_top < window_height){
back_to_top.addClass('off').removeClass('on');
} else {
back_to_top.removeClass('off').addClass('on');
}
});
back_to_top.click(function() {
$("html, body").animate({scrollTop: 0}, 1500);
});
/* Fix Column Height */
jQuery('.feature-box').each(function(){
var subs = $(this).find('> .column_container');
if(subs.length < 2) return;
var maxHeight = Math.max.apply(null, $(this).find("> .column_container").map(function(){
return $(this).height();
}).get());
$(this).find("> .column_container").height(maxHeight-3);
});
/* Parallax Section */
var windowHeight = jQuery(window).height();
fullWidth();
// Same Height
jQuery('.wpb_row').each(function(){
if(jQuery(this).hasClass('ww-same-height')){
var height = jQuery(this).height();
jQuery(this).children(":first").children().each(function(){
jQuery(this).css('min-height', height);
});
}
});
//Fade out Title Bar on Scroll
var item_height = $(".cs-page-title").outerHeight(true);
var position = $(".cs-page-title").position();
var title_animate = $("#title-animate");
$(window).scroll(function() {
if(position){
var scroll = $(window).scrollTop();
var max = position.top + item_height;
if(scroll <= max){
var opacity = scroll/item_height;
title_animate.css("opacity",1 - opacity);
} else {
title_animate.css("opacity",opacity);
}
}
});
//Woo
//$('body').on('click', 'input.minus',function(){
//$(this).parent().find('input[type="number"]').get(0).stepDown();
//});
//$('body').on('click', 'input.plus',function(){
//$(this).parent().find('input[type="number"]').get(0).stepUp();
//});
// Woo if IE
$('body').on('click', 'input.minus',function(){
var curent_number = $(this).parent().find('input[type="number"]');
var curent_minus = curent_number.val();
curent_minus = parseInt(curent_minus);
if(curent_minus > 1){
curent_minus--;
curent_number.val(curent_minus);
}
});
$('body').on('click', 'input.plus',function(){
var curent_number = $(this).parent().find('input[type="number"]');
var curent_plus = curent_number.val();
if(curent_plus){
curent_plus = parseInt(curent_plus);
curent_plus++;
curent_number.val(curent_plus);
}
});
/* row navigator. */
$('body').on('click', ".scroll-slider" , function () {
var row_id = $(this).attr('data-id');
if(row_id != undefined && row_id != ''){
$("html, body").animate({
scrollTop: $(row_id).offset().top
}, 1000);
}
});
/* Add arrow woo categories */
$('.product-categories li.cat-parent').append('');
$('.product-categories .cs-menu-toggle').click(function(){
$(this).prev().toggleClass('submenu-open');
});
});
})(jQuery);
// source --> https://ironlights.net/wp-content/themes/wp_nuvo/js/jquery.easing.min.js?ver=1.3.1
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b+c;return-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b+c;return d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b+c;return-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b*b+c;return d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){if(b==0)return c;if(b==e)return c+d;if((b/=e/2)<1)return d/2*Math.pow(2,10*(b-1))+c;return d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){if((b/=e/2)<1)return-d/2*(Math.sqrt(1-b*b)-1)+c;return d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e)==1)return c+d;if(!g)g=e*.3;if(h https://ironlights.net/wp-content/themes/wp_nuvo/js/jquery.nav.js?ver=3.0.0
/*
* jQuery One Page Nav Plugin
* http://github.com/davist11/jQuery-One-Page-Nav
*
* Copyright (c) 2010 Trevor Davis (http://trevordavis.net)
* Dual licensed under the MIT and GPL licenses.
* Uses the same license as jQuery, see:
* http://jquery.org/license
*
* @version 3.0.0
*
* Example usage:
* $('#nav').onePageNav({
* currentClass: 'current',
* changeHash: false,
* scrollSpeed: 750
* });
*/
;(function($, window, document, undefined){
// our plugin constructor
var OnePageNav = function(elem, options){
this.elem = elem;
this.$elem = $(elem);
this.options = options;
this.metadata = this.$elem.data('plugin-options');
this.$win = $(window);
this.sections = {};
this.didScroll = false;
this.$doc = $(document);
this.docHeight = this.$doc.height();
};
// the plugin prototype
OnePageNav.prototype = {
defaults: {
navItems: 'a',
currentClass: 'current',
changeHash: false,
easing: 'swing',
filter: '',
scrollSpeed: 750,
scrollThreshold: 0.5,
scrollOffset: 0,
begin: false,
end: false,
scrollChange: false
},
init: function() {
// Introduce defaults that can be extended either
// globally or using an object literal.
this.config = $.extend({}, this.defaults, this.options, this.metadata);
this.$nav = this.$elem.find(this.config.navItems);
//Filter any links out of the nav
if(this.config.filter !== '') {
this.$nav = this.$nav.filter(this.config.filter);
}
//Handle clicks on the nav
this.$nav.on('click.onePageNav', $.proxy(this.handleClick, this));
//Get the section positions
this.getPositions();
//Handle scroll changes
this.bindInterval();
//Update the positions on resize too
this.$win.on('resize.onePageNav', $.proxy(this.getPositions, this));
return this;
},
adjustNav: function(self, $parent) {
self.$elem.find('.' + self.config.currentClass).removeClass(self.config.currentClass);
$parent.addClass(self.config.currentClass);
},
bindInterval: function() {
var self = this;
var docHeight;
self.$win.on('scroll.onePageNav', function() {
self.didScroll = true;
});
self.t = setInterval(function() {
docHeight = self.$doc.height();
//If it was scrolled
if(self.didScroll) {
self.didScroll = false;
self.scrollChange();
}
//If the document height changes
if(docHeight !== self.docHeight) {
self.docHeight = docHeight;
self.getPositions();
}
}, 250);
},
getHash: function($link) {
var url = $link.attr('href');
if(url != undefined){
return url.split('#')[1];
}
},
getPositions: function() {
var self = this;
var linkHref;
var topPos;
var $target;
self.$nav.each(function() {
linkHref = self.getHash($(this));
$target = $('#' + linkHref);
if($target.length) {
topPos = $target.offset().top;
self.sections[linkHref] = Math.round(topPos);
}
});
},
getSection: function(windowPos) {
var returnValue = null;
var windowHeight = Math.round(this.$win.height() * this.config.scrollThreshold);
for(var section in this.sections) {
if((this.sections[section] - windowHeight) < windowPos) {
returnValue = section;
}
}
return returnValue;
},
handleClick: function(e) {
var self = this;
var $link = $(e.currentTarget);
var $parent = $link.parent();
var newLoc = '#' + self.getHash($link);
if(!$parent.hasClass(self.config.currentClass)) {
//Start callback
if(self.config.begin) {
self.config.begin();
}
//Change the highlighted nav item
self.adjustNav(self, $parent);
//Removing the auto-adjust on scroll
self.unbindInterval();
//Scroll to the correct position
self.scrollTo(newLoc, function() {
//Do we need to change the hash?
if(self.config.changeHash) {
window.location.hash = newLoc;
}
//Add the auto-adjust on scroll back in
self.bindInterval();
//End callback
if(self.config.end) {
self.config.end();
}
});
}
e.preventDefault();
},
scrollChange: function() {
var windowTop = this.$win.scrollTop();
var position = this.getSection(windowTop);
var $parent;
//If the position is set
if(position !== null) {
$parent = this.$elem.find('a[href$="#' + position + '"]').parent();
//If it's not already the current section
if(!$parent.hasClass(this.config.currentClass)) {
//Change the highlighted nav item
this.adjustNav(this, $parent);
//If there is a scrollChange callback
if(this.config.scrollChange) {
this.config.scrollChange($parent);
}
}
}
},
scrollTo: function(target, callback) {
var offset = $(target).offset().top;
$('html, body').animate({
scrollTop: offset + this.config.scrollOffset
}, this.config.scrollSpeed, this.config.easing, callback);
},
unbindInterval: function() {
clearInterval(this.t);
this.$win.unbind('scroll.onePageNav');
}
};
OnePageNav.defaults = OnePageNav.prototype.defaults;
$.fn.onePageNav = function(options) {
return this.each(function() {
new OnePageNav(this, options).init();
});
};
})( jQuery, window , document );