"use strict";
var fullscreen_elem=document.documentElement,
aurel_window=jQuery(window),
aurel_header=jQuery('header.aurel_main_header'),
aurel_footer=jQuery('footer.aurel_footer'),
aurel_header_logo_part=jQuery('.aurel_header_logo_part'),
aurel_header_menu_part=jQuery('.aurel_header_menu_part'),
aurel_header_socials_part=jQuery('.aurel_header_socials_part'),
aurel_nav=jQuery('.aurel_nav'),
aurel_menu=jQuery('.aurel_menu'),
aurel_dp=jQuery('.aurel_dp'),
aurel_body=jQuery('body');
if(jQuery('.aurel_photoswipe_wrapper').size() > 0){
var photoswipe_html='\
<!-- Root element of PhotoSwipe. Must have class pswp. -->\
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">\
<div class="pswp__bg"></div><!-- PSWP Background -->\
\
<div class="pswp__scroll-wrap">\
<div class="pswp__container">\
<div class="pswp__item"></div>\
<div class="pswp__item"></div>\
<div class="pswp__item"></div>\
</div><!-- .pswp__container -->\
\
<div class="pswp__ui pswp__ui--hidden">\
<div class="pswp__top-bar">\
<!--  Controls are self-explanatory. Order can be changed. -->\
<div class="pswp__counter"></div>\
\
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>\
<button class="pswp__button pswp__button--share" title="Share"></button>\
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>\
\
<!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->\
<!-- element will get class pswp__preloader--active when preloader is running -->\
<div class="pswp__preloader">\
<div class="pswp__preloader__icn">\
<div class="pswp__preloader__cut">\
<div class="pswp__preloader__donut"></div>\
</div><!-- .pswp__preloader__cut -->\
</div><!-- .pswp__preloader__icn -->\
</div><!-- .pswp__preloader -->\
</div><!-- .pswp__top-bar -->\
\
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">\
<div class="pswp__share-tooltip"></div>\
</div><!-- .pswp__share-modal -->\
\
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>\
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>\
\
<div class="pswp__caption">\
<div class="pswp__caption__center"></div>\
</div><!-- .pswp__caption -->\
</div><!-- .pswp__ui pswp__ui--hidden -->\
</div><!-- .pswp__scroll-wrap -->\
</div><!-- .pswp -->\
';
jQuery('body').append(photoswipe_html);
var $pswp=jQuery('.pswp')[0],
$pswp_gallery_array=[];
jQuery('.aurel_photoswipe_wrapper').each(function(){
var this_id=jQuery(this).attr('data-uniqid');
$pswp_gallery_array['aurel_gallery_' + this_id]={};
$pswp_gallery_array['aurel_gallery_' + this_id].slides=[];
jQuery(this).find('.aurel_pswp_slide').each(function(){
if(jQuery(this).hasClass('aurel_pswp_video_slide')){
var aurel_thishref=jQuery(this).attr('href');
if(aurel_thishref.indexOf('youtu') + 1){
var videoid_split=aurel_thishref.split('='),
videoid=videoid_split[1],
aurel_pswp_html='<div class="aurel_pswp_video_wrapper"><iframe width="100%" height="100%" src="https://www.youtube.com/embed/' + videoid + '?controls=1&autoplay=0&showinfo=0&modestbranding=1&wmode=opaque&rel=0&hd=1&disablekb=1" frameborder="0" allowfullscreen></iframe></div>';
}
if(aurel_thishref.indexOf('vimeo') + 1){
var videoid_split=aurel_thishref.split('m/'),
videoid=videoid_split[1],
aurel_pswp_html='<div class="aurel_pswp_video_wrapper"><iframe width="100%" height="100%" src="https://player.vimeo.com/video/' + videoid + '?api=1&amp;title=0&amp;byline=0&amp;portrait=0&autoplay=0&loop=0&controls=1" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe></div>';0
}
var this_item={
html:aurel_pswp_html
}
$pswp_gallery_array['aurel_gallery_' + this_id].slides.push(this_item);
}else{
var item_size=jQuery(this).data('size').split('x'),
item_width=item_size[0],
item_height=item_size[1],
this_item={
src:jQuery(this).attr('href'),
w:item_width,
h:item_height
}
$pswp_gallery_array['aurel_gallery_' + this_id].slides.push(this_item);
}});
});
}
jQuery(document).on('contextmenu', function (e){
if(jQuery('.aurel_drc_trigger').length){
e.preventDefault();
if(jQuery('.aurel_drc_trigger').hasClass('aurel_drc_alert_enabled')){
alert(jQuery('.aurel_drc_trigger').attr('data-alert'));
}}
});
jQuery(document).on('click', '.aurel_pswp_slide', function (event){
event.preventDefault();
var $index=parseInt(jQuery(this).attr('data-count'), 10),
this_id=jQuery(this).parents('.aurel_photoswipe_wrapper').attr('data-uniqid'),
options={
index: $index,
bgOpacity: 0.7,
showHideOpacity: true
}
var aurel_lightBox=new PhotoSwipe($pswp, PhotoSwipeUI_Default, $pswp_gallery_array['aurel_gallery_' + this_id].slides, options);
aurel_lightBox.init();
aurel_lightBox.listen('gettingData', function(index, item){
if(jQuery('.aurel_pswp_video_wrapper').size() > 0){
jQuery('.aurel_pswp_video_wrapper').each(function(){
var aurel_video_html=jQuery(this).html();
jQuery(this).empty().html(aurel_video_html);
});
var aurel_window_height=aurel_window.height();
if(jQuery('.pswp__top-bar').size() > 0){
aurel_window_height=aurel_window_height - jQuery('.pswp__top-bar').height()*2;
}
if(jQuery('#wpadminbar').size() > 0){
aurel_window_height=aurel_window_height - jQuery('#wpadminbar').height();
}
if((aurel_window.width()/16)*9 > aurel_window_height){
var set_width=(aurel_window_height/9)*16,
set_height=aurel_window_height;
}else{
var set_height=(aurel_window.width()/16)*9,
set_width=aurel_window.width();
}
jQuery('.aurel_pswp_video_wrapper').width(set_width).height(set_height);
}});
aurel_lightBox.listen('close', function(){
if(jQuery('.aurel_pswp_video_wrapper').size() > 0){
jQuery('.aurel_pswp_video_wrapper').each(function(){
var aurel_video_html=jQuery(this).html();
jQuery(this).empty().html(aurel_video_html);
});
}});
});
jQuery(document).on('click', '.grid-item-button-approve', function (event){
event.preventDefault();
var item_container=jQuery(this).parents('.grid-item-proofing'),
this_link=jQuery(this);
if(item_container.hasClass('approved')){
jQuery.post(aurel_ajaxurl.url, {
action:'aurel_photo_proofing',
module_id:jQuery(this).attr('data-moduleid'),
img_id:jQuery(this).attr('data-imgid'),
action_type:'remove'
}, function (response){
item_container.removeClass('approved');
item_container.addClass('unviewed');
this_link.find('i').removeClass().addClass('pm-fa pm-fa-check-circle');
});
}else{
jQuery.post(aurel_ajaxurl.url, {
action:'aurel_photo_proofing',
module_id:jQuery(this).attr('data-moduleid'),
img_id:jQuery(this).attr('data-imgid'),
action_type:'approve'
}, function (response){
item_container.addClass('approved');
item_container.removeClass('unviewed');
this_link.find('i').removeClass().addClass('pm-fa pm-fa-minus-circle');
});
}
if(item_container.hasClass('unapproved')){
item_container.removeClass('unapproved');
item_container.find('.grid-item-button-unapprove i').removeClass().addClass('pm-fa pm-fa-times-circle');
}});
jQuery(document).on('click', '.grid-item-button-unapprove', function (event){
event.preventDefault();
var item_container=jQuery(this).parents('.grid-item-proofing'),
this_link=jQuery(this);
if(item_container.hasClass('unapproved')){
jQuery.post(aurel_ajaxurl.url, {
action:'aurel_photo_proofing',
module_id:jQuery(this).attr('data-moduleid'),
img_id:jQuery(this).attr('data-imgid'),
action_type:'remove'
}, function (response){
item_container.removeClass('unapproved');
item_container.addClass('unviewed');
this_link.find('i').removeClass().addClass('pm-fa pm-fa-times-circle');
});
}else{
jQuery.post(aurel_ajaxurl.url, {
action:'aurel_photo_proofing',
module_id:jQuery(this).attr('data-moduleid'),
img_id:jQuery(this).attr('data-imgid'),
action_type:'unapprove'
}, function (response){
item_container.addClass('unapproved');
item_container.removeClass('unviewed');
this_link.find('i').removeClass().addClass('pm-fa pm-fa-minus-circle');
});
}
if(item_container.hasClass('approved')){
item_container.removeClass('approved');
item_container.find('.grid-item-button-approve i').removeClass().addClass('pm-fa pm-fa-check-circle');
}});
jQuery(document).on('click', '.aurel_photo_proofing_notified', function (event){
event.preventDefault();
var this_button=jQuery(this),
this_wrapper=this_button.parent('.aurel_photo_proofing_notified_wrapper'),
this_message=this_wrapper.find('.aurel_photo_proofing_notified_message'),
this_attach_approved='no',
approved_file_names='',
approved_file_urls='',
this_attach_unapproved='no',
unapproved_file_names='',
unapproved_file_urls='';
if(this_wrapper.parents('.elementor-widget-pm-proofing-gallery').hasClass('aurel_notify_approved_yes')){
this_attach_approved='yes';
this_wrapper.parent('.aurel_grid_wrapper').find('.grid-item-proofing.approved').each(function(){
var this_a=jQuery(this),
file_name_array=this_a.attr('data-img').split('/'),
file_name=file_name_array[file_name_array.length - 1];
if(approved_file_names==''){
approved_file_names=file_name;
}else{
approved_file_names=approved_file_names + ','+file_name;
}
if(approved_file_urls==''){
approved_file_urls=this_a.attr('data-img');
}else{
approved_file_urls=approved_file_urls + ','+this_a.attr('data-img');
}});
}
if(this_wrapper.parents('.elementor-widget-pm-proofing-gallery').hasClass('aurel_notify_redjected_yes')){
this_attach_unapproved='yes';
this_wrapper.parent('.aurel_grid_wrapper').find('.grid-item-proofing.unapproved').each(function(){
var this_a=jQuery(this),
file_name_array=this_a.attr('data-img').split('/'),
file_name=file_name_array[file_name_array.length - 1];
if(unapproved_file_names==''){
unapproved_file_names=file_name;
}else{
unapproved_file_names=unapproved_file_names + ','+file_name;
}
if(unapproved_file_urls==''){
unapproved_file_urls=this_a.attr('data-img');
}else{
unapproved_file_urls=unapproved_file_urls + ','+this_a.attr('data-img');
}});
}
this_button.slideUp(300);
jQuery.post(aurel_ajaxurl.url, {
action:'pm_photo_proofing_notify',
email:jQuery(this).attr('data-email'),
attach_approved: this_attach_approved,
approved_file_names: approved_file_names,
approved_file_urls: approved_file_urls,
attach_unapproved: this_attach_unapproved,
unapproved_file_names: unapproved_file_names,
unapproved_file_urls: unapproved_file_urls,
url:document.URL
}, function (response){
this_wrapper.addClass('aurel_already_notified');
this_message.html(response).slideDown(300);
});
});
jQuery(function(){
if(!jQuery.fullscreen.isNativelySupported()){
jQuery('.aurel_toogle_fullview').remove();
}
jQuery('.aurel_toogle_fullview').on('click', function(){
jQuery('html').toggleClass('aurel_in_fullview_mode');
if(jQuery('html').hasClass('aurel_in_fullview_mode')){
jQuery('html').fullscreen({overflow:'visible'});
return false;
}else{
jQuery.fullscreen.exit();
return false;
}});
jQuery(document).on('fscreenchange', function(e, state, elem){
if(jQuery.fullscreen.isFullScreen()){
}else{
jQuery('html').removeClass('aurel_in_fullview_mode');
aurel_window.trigger('resize');
setTimeout("aurel_window.trigger('resize')", 500);
}});
});
jQuery(document).ready(function (){
jQuery('#wpadminbar').css('position', 'fixed');
if(jQuery('.fadeOnLoad').length){
if(jQuery('.aurel_preloader_wrapper').length){
}else{
setTimeout("jQuery('.fadeOnLoad').removeClass('fadeOnLoad')",500);
}}
if(jQuery('.aurel_lazy').length&&jQuery('.elementor-editor-active').size() < 1){
jQuery('.aurel_lazy').lazy({
scrollDirection: 'vertical',
effect: 'fadeIn',
effectTime: 500,
afterLoad: function(element){
jQuery(element).addClass('aurel_lazy_loaded').removeClass('aurel_lazy');
if(jQuery(element).parents('.aurel_isotope_trigger').data('isotope')){
jQuery(element).parents('.aurel_isotope_trigger').isotope('layout');
}},
});
}
if(aurel_header.hasClass('aurel_header_gradient_style')){
jQuery('html').addClass('aurel_header_gradient_page');
if(jQuery('.page-template-page-centered').size() < 1){
jQuery('html').addClass('aurel_content_under_header');
}}
if(aurel_header.hasClass('aurel_header_transparent_style')){
jQuery('html').addClass('aurel_header_transparent_page');
if(jQuery('.page-template-page-centered').size() < 1){
jQuery('html').addClass('aurel_content_under_header');
}}
if(jQuery('.aurel_404_content_wrapper').size() > 0){
aurel_header.addClass('aurel_header_gradient_style');
jQuery('html').addClass('aurel_header_gradient_page');
}
if(jQuery('.aurel_pp_content_wrapper').size() > 0){
aurel_header.addClass('aurel_header_transparent_style');
jQuery('html').addClass('aurel_header_transparent_page');
if(jQuery('.aurel_pp_content_wrapper').hasClass('aurel_pp_demo')){
jQuery('.aurel_pp_content_wrapper').find('.post-password-form p:first').html(jQuery('.aurel_pp_content_wrapper').attr('data-text'));
}}
if(aurel_header.hasClass('aurel_sticky_menu_on')&&!jQuery('.aurel_site_wrapper').hasClass('fixed_header_footer')){
if(aurel_header.hasClass('aurel_header_solid_style')){
aurel_header.after('<div class="aurel_header_holder"></div>');
jQuery('.aurel_header_holder').height(aurel_header.height());
}
if(aurel_window.scrollTop() > 0&&aurel_window.width() > 1024){
aurel_header.addClass('aurel_stick_me');
}else{
aurel_header.removeClass('aurel_stick_me');
}
aurel_window.on('scroll', function(){
if(aurel_window.scrollTop() > 0&&aurel_window.width() > 1024){
aurel_header.addClass('aurel_stick_me');
}else{
aurel_header.removeClass('aurel_stick_me');
}});
}
if(jQuery('.aurel_element_countdown').size() > 0){
jQuery('html').addClass('aurel_transparent_header');
jQuery('time').countDown({
with_separators: false
});
}
aurel_countdown();
jQuery('.aurel_nav a').each(function (){
if(jQuery(this).attr('href')=='#'){
jQuery(this).attr('href', 'javascript:void(0)');
}});
jQuery('nav.aurel_mobile_nav').find('.sub-menu').slideUp(1);
jQuery('nav.aurel_mobile_nav a').each(function (){
if(jQuery(this).parent('li').hasClass('menu-item-has-children')){
jQuery(this).addClass('open_sub_menu').attr('href', 'javascript:void(0)');
}});
if(jQuery('#wpadminbar').size() > 0){
jQuery('html').addClass('has_admin_bar');
}
var aurel_js_bg_color=jQuery('.aurel_js_bg_color'),
aurel_js_bg_image=jQuery('.aurel_js_bg_image'),
aurel_js_color=jQuery('.aurel_js_color'),
aurel_js_font_size=jQuery('.aurel_js_font_size'),
aurel_js_height=jQuery('.aurel_js_height');
if(jQuery(aurel_js_bg_color).size() > 0){
jQuery(aurel_js_bg_color).each(function (){
jQuery(this).css('background-color', jQuery(this).attr('data-bgcolor'));
});
}
if(jQuery(aurel_js_bg_image).size() > 0){
jQuery(aurel_js_bg_image).each(function (){
jQuery(this).css('background-image', 'url(' + jQuery(this).attr('data-src') + ')');
});
}
if(jQuery(aurel_js_color).size() > 0){
jQuery(aurel_js_color).each(function (){
jQuery(this).css('color', jQuery(this).attr('data-color'));
});
}
if(jQuery(aurel_js_font_size).size() > 0){
jQuery(aurel_js_font_size).each(function(){
var font_size=jQuery(this).attr('data-font-size');
jQuery(this).css({'font-size': font_size, 'line-height': font_size});
});
}
if(jQuery(aurel_js_height).size() > 0){
jQuery(aurel_js_height).each(function(){
var block_height=jQuery(this).attr('data-height');
jQuery(this).height(block_height);
});
}
if(jQuery('.aurel_js_opacity').size() > 0){
jQuery('.aurel_js_opacity').each(function(){
var block_opacity=jQuery(this).attr('data-opacity');
jQuery(this).css('opacity', block_opacity);
});
}
if(jQuery('.aurel_js_transition').size() > 0){
jQuery('.aurel_js_transition').each(function(){
var transition_time=jQuery(this).attr('data-transition') + 'ms';
jQuery(this).css({'transition-duration': transition_time});
});
}
if(jQuery('.aurel_testimonials_carousel').size() > 0){
jQuery(".aurel_testimonials_carousel").each(function (){
var autoplay=jQuery(this).attr('data-autoplay'),
speed=parseInt(jQuery(this).attr('data-speed')),
pause=jQuery(this).attr('data-pause'),
infinite=jQuery(this).attr('data-infinite');
if(autoplay=='yes'){
autoplay=true;
}else{
autoplay=false;
}
if(pause=='yes'){
pause=true;
}else{
pause=false;
}
if(infinite=='yes'){
infinite=true;
}else{
infinite=false;
}
jQuery(this).on("initialized.owl.carousel", function (e){
jQuery(this).css("opacity", "1");
});
jQuery(this).owlCarousel({
items: 3,
autoHeight: true,
center: false,
dotsEach: 1,
lazyLoad: true,
loop: infinite,
autoplay: autoplay,
autoplayTimeout: speed,
autoplayHoverPause: pause,
navigation: false,
responsive: {
0: {
items: 1
},
760: {
items: 2
},
960: {
items: 3
}}
}
);
});
}
if(jQuery('.aurel_albums_carousel').size() > 0){
jQuery(".aurel_albums_carousel").each(function (){
var autoplay=jQuery(this).attr('data-autoplay'),
items_padding=parseInt(jQuery(this).attr('data-setpad')),
on_screen=parseInt(jQuery(this).attr('data-onscreen')),
speed=parseInt(jQuery(this).attr('data-speed')),
pause=jQuery(this).attr('data-pause'),
infinite=jQuery(this).attr('data-infinite');
if(autoplay=='yes'){
autoplay=true;
}else{
autoplay=false;
}
if(pause=='yes'){
pause=true;
}else{
pause=false;
}
if(infinite=='yes'){
infinite=true;
}else{
infinite=false;
}
jQuery(this).on("initialized.owl.carousel", function (e){
jQuery(this).css("opacity", "1");
});
jQuery(this).owlCarousel({
items: on_screen,
autoHeight: true,
center: true,
lazyLoad: true,
loop: infinite,
autoplay: autoplay,
autoplayTimeout: speed,
autoplayHoverPause: pause,
navigation: false,
nav: false,
dots: false,
margin: items_padding,
responsive: {
0: {
items: 1
},
760: {
items: 2
},
960: {
items: 3
},
1200: {
items: on_screen
}}
}
);
});
}
if(jQuery('.aurel_isotope_trigger').size() > 0&&jQuery('.elementor-editor-active').size() < 1){
if(jQuery('.aurel_isotope_trigger').hasClass('is_masonry')){
jQuery('.aurel_isotope_trigger').isotope({
layoutMode: 'masonry'
});
}else if(jQuery('.aurel_isotope_trigger').hasClass('is_packery')){
jQuery('.aurel_isotope_trigger').isotope({
layoutMode: 'packery'
});
}else{
jQuery('.aurel_isotope_trigger').isotope({
layoutMode: 'fitRows'
});
}}
aurel_theme_setup();
if(jQuery('.aurel_flickr_widget_wrapper').size() > 0){
aurel_flickr_widget();
}
jQuery('.aurel_grid_filter li').eq(0).find('a').click();
jQuery('.aurel_grid_filter li a').on('click', function(){
jQuery(this).parents('.aurel_grid_filter').find('a').removeClass('is-checked');
jQuery(this).parents('.aurel_grid_filter').find('li').removeClass('is-checked');
jQuery(this).addClass('is-checked');
jQuery(this).parent().addClass('is-checked');
var filterSelector=jQuery(this).attr('data-category');
jQuery(this).parents('div.aurel_front_end_display').find('.aurel_isotope_trigger').isotope({
filter: filterSelector
});
return false;
});
if(jQuery('.aurel_site_wrapper').hasClass('fixed_header_footer')){
jQuery('.aurel_site_wrapper').prepend('<div class="aurel_main_header_holder"></div>');
jQuery('.aurel_site_wrapper').append('<div class="aurel_footer_holder"></div>');
aurel_window.on('scroll', function (){
var max_scroll=jQuery('body').height() - aurel_window.height();
if(jQuery('#wpadminbar').size() > 0){
max_scroll=max_scroll + jQuery('#wpadminbar').height();
}
if(aurel_window.scrollTop() > 0){
jQuery('html').addClass('page_scrolled');
}else{
jQuery('html').removeClass('page_scrolled');
}
if(aurel_window.scrollTop()==max_scroll){
jQuery('html').addClass('page_reached_bottom');
}else{
jQuery('html').removeClass('page_reached_bottom');
}});
}
jQuery('.aurel_back_to_top').attr('data-bottom', parseInt(jQuery('.aurel_back_to_top').css('bottom')));
if(aurel_window.scrollTop() > aurel_window.height()){
jQuery('.aurel_back_to_top').addClass('aurel_show_me');
}else{
jQuery('.aurel_back_to_top').removeClass('aurel_show_me');
if(jQuery('.aurel_footer').size() > 0){
var footer_offset=jQuery('.aurel_footer').offset().top,
check_footer_state=aurel_window.scrollTop() + aurel_window.height(),
aurel_footer_showed='no',
aurel_b2t_fixer=0;
if(check_footer_state >=footer_offset){
aurel_b2t_fixer=check_footer_state - footer_offset;
aurel_footer_showed='yes';
}else{
aurel_footer_showed='no';
aurel_b2t_fixer=0;
}
jQuery('.aurel_back_to_top').css('bottom', parseInt(jQuery('.aurel_back_to_top').attr('data-bottom')) + aurel_b2t_fixer + 'px');
}}
aurel_window.on('scroll', function(){
if(aurel_window.scrollTop() > aurel_window.height()){
jQuery('.aurel_back_to_top').addClass('aurel_show_me');
}else{
jQuery('.aurel_back_to_top').removeClass('aurel_show_me');
}
if(jQuery('.aurel_footer').size() > 0){
var footer_offset=jQuery('.aurel_footer').offset().top,
check_footer_state=aurel_window.scrollTop() + aurel_window.height(),
aurel_footer_showed='no',
aurel_b2t_fixer=0;
if(check_footer_state >=footer_offset){
aurel_b2t_fixer=check_footer_state - footer_offset;
aurel_footer_showed='yes';
}else{
aurel_footer_showed='no';
aurel_b2t_fixer=0;
}
jQuery('.aurel_back_to_top').css('bottom', parseInt(jQuery('.aurel_back_to_top').attr('data-bottom')) + aurel_b2t_fixer + 'px');
}});
jQuery('.aurel_back_to_top').on('click', function(){
jQuery('html, body').stop().animate({scrollTop: 0}, 400, function(){
jQuery('.aurel_back_to_top').removeClass('aurel_show_me');
});
});
if(jQuery('.aurel_preloader_wrapper').size() > 0){
jQuery('.aurel_preloader_wrapper').addClass('run_preloader');
}
if(jQuery('.aurel_itemized_links_grid').size() > 0&&jQuery('.elementor-editor-active').size() < 1){
jQuery('.aurel_grid_inner').each(function(){
var setPad=Math.floor(parseInt(jQuery(this).attr('data-pad'))/2);
if(aurel_window.width() < 1200&&setPad > 20){
setPad=setPad/2;
}
if(aurel_window.width() < 760&&setPad > 10){
setPad=10;
}
jQuery(this).css('margin', setPad+'px');
if(jQuery(this).hasClass('vertical_paddings_on')){
jQuery(this).css('margin-top', -1*setPad+'px').css('margin-bottom', -1*setPad+'px');
}
if(jQuery(this).hasClass('side_paddings_on')){
jQuery(this).css('margin-left', -1*setPad+'px').css('margin-right', -1*setPad+'px');
}
jQuery(this).find('.grid-item-inner').css({
'margin-left':setPad+'px',
'margin-top':setPad+'px',
'margin-right':setPad+'px',
'margin-bottom':setPad+'px'
});
jQuery(this).isotope('layout');
setTimeout("jQuery('.aurel_grid_inner').isotope('layout')",1000);
});
}
jQuery('.aurel_featured_video_play').on('click', function(){
jQuery(this).parents('.aurel_featured_video_wrapper').addClass('show_video');
if(jQuery(this).parents('.aurel_featured_video_wrapper').find('iframe')[0].src.indexOf('youtu') + 1){
jQuery(this).parents('.aurel_featured_video_wrapper').find('iframe')[0].src +="&autoplay=1";
}else{
jQuery(this).parents('.aurel_featured_video_wrapper').find('iframe')[0].src +="?autoplay=1";
}});
jQuery('.aurel_before_after').on('mousemove', function(e){
var this_offset=jQuery(this).offset().left,
mouse_pos=e.pageX - this_offset,
current_pos=jQuery(this).find('.aurel_after_image').width();
jQuery(this).find('.aurel_after_image').width(mouse_pos);
jQuery(this).find('.aurel_before_after_divider').css('left', mouse_pos + 'px');
});
jQuery('.aurel_before_after').on('touchmove', function(e){
var touch=e.originalEvent.touches[0],
this_offset=jQuery(this).offset().left,
set_pos=touch.pageX - this_offset;
if(set_pos < 0) set_pos=0;
if(set_pos > jQuery(this).width()) set_pos=jQuery(this).width();
jQuery(this).find('.aurel_after_image').width(set_pos);
jQuery(this).find('.aurel_before_after_divider').css('left', set_pos + 'px');
});
if(aurel_body.hasClass('aurel_drag_protection')){
aurel_dp.on('mousedown',function(e){
e.preventDefault();
});
}
jQuery('.aurel_tiny').find('select').each(function(){
var $this=jQuery(this),
numberOfOptions=$this.children('option').length,
thisWidth=$this.width() + parseInt($this.css('padding-left'),10) + parseInt($this.css('padding-right'),10),
this_val=$this.val();
$this.addClass('select-hidden');
$this.wrap('<div class="aurel_select_wrapper" style="min-width: '+ thisWidth +'px"></div>');
$this.after('<div class="aurel_select"></div>');
var $styledSelect=$this.next('div.aurel_select');
if(this_val==''){
$styledSelect.text($this.children('option').eq(0).text());
}else{
$styledSelect.text($this.children('option[value="'+ this_val +'"]').text());
}
var $list=jQuery('<ul />', {
'class': 'select-options'
}).insertAfter($styledSelect);
for (var i=0; i < numberOfOptions; i++){
jQuery('<li />', {
text: $this.children('option').eq(i).text(),
rel: $this.children('option').eq(i).val()
}).appendTo($list);
}
var $listItems=$list.children('li');
$styledSelect.click(function(e){
e.stopPropagation();
var $this_list=jQuery(this).next('ul.select-options'),
max_height=aurel_window.height()/2;
jQuery('div.aurel_select.active').not(this).each(function(){
var $this_list=jQuery(this).next('ul.select-options');
jQuery(this).removeClass('active').next('ul.select-options').hide();
$this_list.removeClass('long_select').css('max-height', 'none');
});
if($this_list.height() > max_height&&!jQuery(this).hasClass('active')){
$this_list.addClass('long_select');
$this_list.css('max-height', max_height+'px');
}else{
$this_list.removeClass('long_select').css('max-height', 'none');
}
jQuery(this).toggleClass('active').next('ul.select-options').toggle();
});
$listItems.click(function(e){
e.stopPropagation();
$styledSelect.text(jQuery(this).text()).removeClass('active');
$this.val(jQuery(this).attr('rel'));
$this.trigger('change');
$list.hide().removeClass('long_select').css('max-height', 'none');
});
jQuery(document).click(function(){
$styledSelect.removeClass('active');
$list.hide().removeClass('long_select').css('max-height', 'none');
});
});
if(jQuery('.aurel_tiny').find('.elementor').size() < 1){
jQuery('html').addClass('aurel_swipe_box');
jQuery('.aurel_tiny').find('a[href*=".jpg"]').each(function(){
var $this=jQuery(this);
if($this.next('p').hasClass('wp-caption-text')){
$this.attr('title', $this.next('p').text());
}});
jQuery('.aurel_tiny').find('a[href*=".jpeg"]').each(function(){
var $this=jQuery(this);
if($this.next('p').hasClass('wp-caption-text')){
$this.attr('title', $this.next('p').text());
}});
jQuery('.aurel_tiny').find('a[href*=".bmp"]').each(function(){
var $this=jQuery(this);
if($this.next('p').hasClass('wp-caption-text')){
$this.attr('title', $this.next('p').text());
}});
jQuery('.aurel_tiny').find('a[href*=".gif"]').each(function(){
var $this=jQuery(this);
if($this.next('p').hasClass('wp-caption-text')){
$this.attr('title', $this.next('p').text());
}});
jQuery('.aurel_tiny').find('a[href*=".png"]').each(function(){
var $this=jQuery(this);
if($this.next('p').hasClass('wp-caption-text')){
$this.attr('title', $this.next('p').text());
}});
}});
jQuery(document).on('click', '.reset_variations', function(){
var $this=jQuery(this),
$variations_table=$this.parents('.variations');
$variations_table.find('select').each(function(){
var $this_select=jQuery(this),
$this_liza_select=$this_select.next('.aurel_select'),
$this_list=$this_liza_select.next('.select-options');
$this_liza_select.text($this_list.find('li[rel=""]').text());
});
});
jQuery(window).load(function(){
aurel_theme_setup();
setTimeout("aurel_window.trigger('resize')",300);
setTimeout('aurel_theme_setup()', 300);
if(jQuery('.aurel_preloader_wrapper').size() > 0){
setTimeout("jQuery('.fadeOnLoad').removeClass('fadeOnLoad')",900);
setTimeout("jQuery('.aurel_preloader_wrapper').addClass('remove_preloader_step01')", 300);
setTimeout("jQuery('.aurel_preloader_wrapper').addClass('remove_preloader_step02')", 800);
setTimeout("jQuery('.aurel_preloader_wrapper').remove()", 1200);
}});
jQuery(window).resize(function(){
aurel_theme_setup();
setTimeout("aurel_theme_setup()",300);
});
jQuery('a[href="#"]').on('click', function(event){
event.preventDefault();
});
function aurel_theme_setup(){
if(jQuery('.aurel_before_after').size() > 0){
jQuery('.aurel_before_after').each(function(){
var $this=jQuery(this),
$this_after_img=$this.find('.aurel_after_img'),
img_w=$this.find('.aurel_before_image').width(),
img_h=$this.find('.aurel_before_image').height();
if($this.width() > img_w){
$this.css('max-width', img_w+'px');
}else{
$this.css('max-width', 'auto');
}
$this_after_img.width(img_w).height(img_h).css('max-width', img_w+'px');
$this.find('.aurel_after_image').css('width', '50%');
$this.find('.aurel_before_after_divider').css('left', '50%');
});
}
if(jQuery('.aurel_attachment_page_content').length){
jQuery('.aurel_attachment_page_content').each(function(){
var $this=jQuery(this),
this_img=$this.find('img'),
this_margin=parseInt($this.css('margin-top'),10),
this_padding=parseInt($this.css('padding-top'),10),
ratio=this_img.attr('data-ratio'),
setHeight=aurel_window.height() - aurel_header.height() - aurel_footer.height() - this_margin*2 - this_padding*2,
setWidth=setHeight*ratio,
check_width=aurel_window.width() - this_margin*2,
minHeight=aurel_window.height() - aurel_header.height() - aurel_footer.height();
if(jQuery('#wpadminbar').length){
setHeight=setHeight - jQuery('#wpadminbar').height();
setWidth=setHeight*ratio;
minHeight=minHeight - jQuery('#wpadminbar').height();
}
if(setHeight < 150){
setHeight=aurel_window.height();
setWidth=setHeight*ratio;
}
if(aurel_header.hasClass('aurel_header_gradient_style')||aurel_header.hasClass('aurel_header_transparent_style')){
minHeight=minHeight + aurel_header.height();
jQuery('.aurel_attachment_page').css('padding-top', aurel_header.height()+'px');
}
jQuery('.aurel_attachment_page').css('min-height', minHeight+'px');
if(setWidth < check_width){
$this.height(setHeight).width(setWidth);
this_img.height(setHeight).width(setWidth);
}else{
var newWidth=check_width,
newHeight=check_width/ratio;
$this.height(newHeight).width(newWidth);
this_img.height(newHeight).width(newWidth);
}});
}
if(aurel_window.width() > 960){
if(aurel_header.hasClass('aurel_logo_middle')){
var logo_width=aurel_header_logo_part.width(),
other_parts=(aurel_window.width() - logo_width - 1)/2;
aurel_header_menu_part.width(other_parts);
aurel_header_logo_part.width(logo_width);
aurel_header_socials_part.width(other_parts);
}else{
var use_width=0,
logo_width=aurel_header_logo_part.width(),
socials_width=aurel_header_socials_part.width()+1;
if(logo_width > socials_width){
use_width=logo_width;
}else{
use_width=socials_width;
}
var set_menu_width=aurel_header.width() - use_width*2 - 2;
aurel_header_menu_part.width(set_menu_width);
aurel_header_logo_part.width(use_width);
aurel_header_socials_part.width(use_width);
}}
if(jQuery('.aurel_header_holder').length){
jQuery('.aurel_header_holder').height(aurel_header.height());
}
if(!jQuery('.aurel_site_wrapper').hasClass('fixed_header_footer')){
if(aurel_window.scrollTop() > 0&&aurel_window.width() > 1024){
aurel_header.addClass('aurel_stick_me');
}else{
aurel_header.removeClass('aurel_stick_me');
}}
if(jQuery('.aurel_set_this_after_header').length){
jQuery('.aurel_set_this_after_header').each(function(){
var $this=jQuery(this),
set_top=aurel_header.height();
if(jQuery('#wpadminbar').length&&aurel_window.width() > 760){
set_top=set_top + jQuery('#wpadminbar').height();
}
$this.css('top', set_top);
});
}
if(jQuery('.aurel_site_wrapper').hasClass('fixed_header_footer')){
jQuery('.aurel_main_header_holder').height(jQuery('header.aurel_main_header').height());
jQuery('.aurel_footer_holder').height(jQuery('footer.aurel_footer').height());
}
if(jQuery('html').hasClass('aurel_content_under_header')){
aurel_push_content_under_header();
}
if(jQuery('section.elementor-section-height-full').size() > 0&&aurel_window.width() < 1200){
jQuery('section.elementor-section-height-full').height(aurel_window.height());
}
if(jQuery('.aurel_albums_packery').size() > 0){
aurel_albums_packery_setup();
setTimeout("aurel_albums_packery_setup()", 750);
}
if(jQuery('.aurel_owlCarousel').size() > 0){
jQuery('.aurel_owlCarousel').each(function (){
jQuery(this).trigger('refresh.owl.carousel');
});
}
if(jQuery('.aurel_content').size() > 0){
var set_min_height=aurel_window.height();
if(jQuery('header.aurel_main_header').size() > 0){
set_min_height=set_min_height - jQuery('header.aurel_main_header').height();
}
if(jQuery('.footer_widgets_wrapper').size() > 0){
set_min_height=set_min_height - jQuery('.footer_widgets_wrapper').height();
}
if(jQuery('footer.aurel_footer').size() > 0){
set_min_height=set_min_height - jQuery('footer.aurel_footer').height();
}
if(jQuery('#wpadminbar').size() > 0){
set_min_height=set_min_height - jQuery('#wpadminbar').height();
}
jQuery('.aurel_main_wrapper').css('min-height', set_min_height+'px');
}
if(jQuery('.aurel_pf_fullwidth').size() > 0&&jQuery('.aurel_sidebar').size() < 1){
var set_width=jQuery('.aurel_site_wrapper').width();
jQuery('.aurel_pf_fullwidth').each(function(){
var set_mar=(jQuery('.aurel_container').width() - set_width)/2;
jQuery(this).width(set_width).css('margin-left', set_mar+'px');
});
}
if(jQuery('.aurel_pswp_video_wrapper').size() > 0){
var aurel_window_height=aurel_window.height();
if(jQuery('.pswp__top-bar').size() > 0){
aurel_window_height=aurel_window_height - jQuery('.pswp__top-bar').height()*2;
}
if(jQuery('#wpadminbar').size() > 0){
aurel_window_height=aurel_window_height - jQuery('#wpadminbar').height();
}
if((aurel_window.width()/16)*9 > aurel_window_height){
var set_width=(aurel_window_height/9)*16,
set_height=aurel_window_height;
}else{
var set_height=(aurel_window.width()/16)*9,
set_width=aurel_window.width();
}
jQuery('.aurel_pswp_video_wrapper').width(set_width).height(set_height);
}
if(jQuery('.aurel_404_content_wrapper').size() > 0){
if(jQuery('#wpadminbar').size() > 0){
jQuery('.aurel_site_wrapper').css('min-height', aurel_window.height() - jQuery('#wpadminbar').height()+'px');
}else{
jQuery('.aurel_site_wrapper').css('min-height', aurel_window.height()+'px');
}}
if(jQuery('.aurel_pp_content_wrapper').size() > 0){
if(jQuery('#wpadminbar').size() > 0){
jQuery('.aurel_site_wrapper').css('min-height', aurel_window.height() - jQuery('#wpadminbar').height()+'px');
}else{
jQuery('.aurel_site_wrapper').css('min-height', aurel_window.height()+'px');
}}
if(jQuery('.aurel_verticaly_page_trigger').size() > 0){
var centered_min_height=aurel_window.height();
if(jQuery('#wpadminbar').size() > 0){
centered_min_height=centered_min_height - jQuery('#wpadminbar').height();
jQuery('.aurel_site_wrapper').css('min-height', (aurel_window.height() - jQuery('#wpadminbar').height())+'px');
}else{
jQuery('.aurel_site_wrapper').css('min-height', aurel_window.height()+'px');
}
if(aurel_header.size() > 0){
centered_min_height=centered_min_height - aurel_header.height();
}
if(aurel_footer.size() > 0){
centered_min_height=centered_min_height - aurel_footer.height();
}
if(jQuery('.aurel_verticaly_page_wrapper').size() > 0){
var centered_page_container=jQuery('.aurel_verticaly_page_wrapper'),
set_centered_top=aurel_header.height();
if(centered_min_height > centered_page_container.height()){
set_centered_top=(centered_min_height - centered_page_container.height())/2 + aurel_header.height();
centered_page_container.css('top', set_centered_top + 'px').addClass('centered_this');
jQuery('html').addClass('aurel_html_centered_page');
jQuery('html').removeClass('aurel_html_stick2top_page');
}else{
centered_page_container.css('top', '0px').addClass('stick_to_top');;
jQuery('html').addClass('aurel_html_stick2top_page');
jQuery('html').removeClass('aurel_html_centered_page');
jQuery('html').removeClass('page_reached_bottom');
jQuery('html').removeClass('page_reached_top');
}}else{
jQuery('html').addClass('aurel_centered_no_content');
}
if(jQuery('.aurel_centered_page_video').size() > 0){
var window_w=aurel_window.width(),
window_h=aurel_window.height(),
current_iframe=jQuery('.aurel_centered_page_video').find('iframe');
if(((window_h + 150) / 9) * 16 > window_w){
current_iframe.height(window_h + 150).width(((window_h + 150) / 9) * 16);
current_iframe.css({
'margin-left': (-1 * current_iframe.width() / 2) + 'px',
'top': "-75px",
'margin-top': '0px'
});
}else{
current_iframe.width(window_w).height(((window_w) / 16) * 9);
current_iframe.css({
'margin-left': (-1 * jQuery('iframe').width() / 2) + 'px',
'margin-top': (-1 * jQuery('iframe').height() / 2) + 'px',
'top': '50%'
});
}}
if(jQuery('.aurel_verticaly_page_wrapper').size() < 1){
jQuery('html').addClass('aurel_no_content_block');
}}
if(jQuery('.aurel_video_stretch').length){
jQuery('.aurel_video_stretch').each(function(){
var video_iframe=jQuery(this).find('.elementor-background-video-container iframe'),
container_h=jQuery(this).height(),
container_w=jQuery(this).width();
if(aurel_window.width() > 1024){
if(video_iframe.size() > 0){
if(((container_h + 150) / 9) * 16 > container_w){
video_iframe.height(container_h + 150).width(((container_h + 150) / 9) * 16);
video_iframe.css({
'margin-left': (-1 * video_iframe.width() / 2) + 'px',
'top': '-75px',
'margin-top': '0px'
});
}else{
video_iframe.width(container_w).height(((container_w) / 16) * 9);
video_iframe.css({
'margin-left': (-1 * video_iframe.width() / 2) + 'px',
'margin-top': (-1 * video_iframe.height() / 2) + 'px',
'top': '50%'
});
}}
}else{
video_iframe.height(aurel_window.height()).width(aurel_window.width()).css({
'top': '0px',
'margin-left':'0px',
'left':'0px',
'margin-top': '0px'
});
}});
}
if(jQuery('.aurel_isotope_trigger').size() > 0&&jQuery('.elementor-editor-active').size() < 1){
jQuery('.aurel_isotope_trigger').isotope("layout");
setTimeout("jQuery('.aurel_isotope_trigger').isotope('layout')",300);
}}
jQuery(document).on('click', '.aurel_header_mobile_menu_toggler', function(){
jQuery('html').toggleClass('aurel_show_mobile_header');
jQuery('.aurel_mobile_menu_wrapper').slideToggle(400);
if(jQuery('html').hasClass('aurel_content_under_header')){
jQuery('.aurel_mobile_menu_wrapper').css({
'transform':'translateY('+ aurel_header.height() +'px)',
});
}});
jQuery(document).on("click", '.open_sub_menu', function (){
jQuery(this).parent('li').toggleClass('aurel_mobile_submenu_showed');
jQuery(this).parent('li').children('ul.sub-menu').toggleClass('aurel_mobile_submenu_showed').slideToggle(400);
});
function aurel_ajax_query_posts(aurel_ajax_query_posts_this, aurel_ajax_query_posts_first_load){
var aurel_return_to=aurel_ajax_query_posts_this.attr('data-return-to');
var aurel_ajax_query_posts_data_args=aurel_ajax_query_posts_this.data('args');
aurel_ajax_query_posts_this.removeClass('aurel_ajax_query_posts').addClass('aurel_ajax_query_posts_disabled');
if(aurel_ajax_query_posts_first_load==true){
var aurel_ajax_query_posts_per_page=parseInt(aurel_ajax_query_posts_data_args['posts_first_load'], 10);
var aurel_ajax_query_posts_per_page_old=aurel_ajax_query_posts_data_args['posts_per_page'];
aurel_ajax_query_posts_data_args['posts_per_page']=aurel_ajax_query_posts_per_page;
jQuery('.aurel_ajax_query_posts_active_preloader').addClass('first_load');
}else{
aurel_ajax_query_posts_per_page=parseInt(aurel_ajax_query_posts_data_args['posts_per_page'], 10);
}
jQuery.post(aurel_ajaxurl.url, {
action: 'aurel_ajax_query_posts',
aurel_ajax_query_posts: '' + JSON.stringify(aurel_ajax_query_posts_data_args) + ''
}).done(function (data){
if(jQuery('.'+aurel_return_to).hasClass('aurel_isotope_trigger')){
var grid_cont=jQuery('.'+aurel_return_to);
grid_cont.isotope('insert', jQuery(data), function(){
grid_cont.ready(function(){
grid_cont.isotope('reLayout');
});
});
grid_cont.imagesLoaded().progress(function(){
grid_cont.isotope("layout");
});
setTimeout("aurel_isotop_el_loading()",300);
setTimeout("aurel_theme_setup()",300);
setTimeout("jQuery('.aurel_isotope_trigger').find('.aurel_load').removeClass('aurel_load')", 500);
}else{
jQuery('.' + aurel_return_to).append(data);
setTimeout(function(){
var aurel_return_to=aurel_ajax_query_posts_this.attr('data-return-to');
jQuery('.' + aurel_return_to).find('.aurel_load').removeClass('aurel_load');
}, 500);
setTimeout("aurel_grid_blog_loading()",300);
setTimeout("aurel_theme_setup()",300);
}
if(aurel_ajax_query_posts_first_load==true){
aurel_ajax_query_posts_data_args['posts_per_page']=aurel_ajax_query_posts_per_page_old;
}
if(typeof aurel_ajax_query_posts_data_args['row_counter']!=="undefined"){
if(aurel_ajax_query_posts_first_load==true){
aurel_ajax_query_posts_data_args['row_counter']=parseInt(aurel_ajax_query_posts_data_args['row_counter'], 10) + parseInt(aurel_ajax_query_posts_data_args['rows_first_load'], 10);
}else{
aurel_ajax_query_posts_data_args['row_counter']=parseInt(aurel_ajax_query_posts_data_args['row_counter'], 10) + parseInt(aurel_ajax_query_posts_data_args['rows_per_click'], 10);
}}
aurel_ajax_query_posts_data_args['offset']=parseInt(aurel_ajax_query_posts_data_args['offset'], 10) + aurel_ajax_query_posts_per_page;
aurel_ajax_query_posts_data_args['posts_counter']=parseInt(aurel_ajax_query_posts_data_args['posts_counter'], 10) + aurel_ajax_query_posts_per_page;
aurel_ajax_query_posts_this.attr('data-args', JSON.stringify(aurel_ajax_query_posts_data_args));
aurel_ajax_query_posts_this.addClass('aurel_ajax_query_posts').removeClass('aurel_ajax_query_posts_disabled');
if(aurel_ajax_query_posts_data_args['ajax_callback_function']){
window[aurel_ajax_query_posts_data_args['ajax_callback_function']]();
}
var all_posts_this=jQuery('.' + aurel_return_to).find('input[name="count_posts"]'),
last_post_this=jQuery('.' + aurel_return_to).find('input[name="posts_counter"]'),
all_posts=parseInt(all_posts_this.attr('value'), 10),
last_post=parseInt(last_post_this.attr('value'), 10);
all_posts_this.remove();
last_post_this.remove();
if(last_post > all_posts){
aurel_ajax_query_posts_this.fadeOut();
aurel_ajax_query_posts_this.parent('.aurel_load_more_button_wrapper').addClass('all_posts_loaded');
}
var $aurel_dp=jQuery('.' + aurel_return_to).find('.aurel_dp');
if(aurel_body.hasClass('aurel_drag_protection')){
$aurel_dp.on('mousedown',function(e){
e.preventDefault();
});
}
jQuery('.aurel_load_more_button').on('mousedown',function(e){
e.preventDefault();
});
});
}
function aurel_isotop_el_loading(){
if(jQuery('.aurel_isotop_el_loading:first').size() > 0){
jQuery('.aurel_isotop_el_loading:first').removeClass('aurel_isotop_el_loading');
setTimeout("aurel_isotop_el_loading()",200);
}}
function aurel_grid_blog_loading(){
if(jQuery('.aurel_grid_blog_loading:first').size() > 0){
jQuery('.aurel_grid_blog_loading:first').removeClass('aurel_grid_blog_loading');
setTimeout("aurel_grid_blog_loading()",200);
}}
if(jQuery('.aurel_ajax_query_posts').size() > 0){
jQuery('.aurel_ajax_query_posts').each(function (){
var $this=jQuery(this);
if($this.hasClass('grid_albums_trigger')){
var $container=jQuery('.' + $this.attr('data-return-to'));
if($container.data('isotope')){
aurel_ajax_query_posts(jQuery(this), true);
}else{
$this.addClass('wait4react');
aurel_ajax_query_rerun();
}}else{
aurel_ajax_query_posts(jQuery(this), true);
}});
jQuery(document).on("click", ".aurel_ajax_query_posts", function (){
aurel_ajax_query_posts(jQuery(this), false);
});
}
function aurel_ajax_query_rerun(){
if(jQuery('.aurel_ajax_query_posts.wait4react').length){
jQuery('.aurel_ajax_query_posts.wait4react').each(function(){
var $this=jQuery(this),
$container=jQuery('.' + $this.attr('data-return-to'));
$this.removeClass('wait4react');
if($container.data('isotope')){
aurel_ajax_query_posts($this, true);
}else{
$this.addClass('wait4react');
setTimeout("aurel_ajax_query_rerun()", 500);
}});
}}
function aurel_countdown(){
jQuery('.aurel_countdown').each(function(){
var pm_year=jQuery(this).attr('data-year'),
pm_month=jQuery(this).attr('data-month'),
pm_day=jQuery(this).attr('data-day'),
austDay=new Date(pm_year, pm_month - 1, pm_day);
jQuery(this).countdown({
until: austDay,
padZeroes: true
});
});
}
function aurel_flickr_widget (){
jQuery('.aurel_flickr_widget_wrapper').each(function (){
var flickrid=jQuery(this).attr('data-flickrid'),
widget_id=jQuery(this).attr('data-widget_id'),
widget_number=jQuery(this).attr('data-widget_number');
jQuery(this).addClass('aurel_flickr_widget_wrapper'+flickrid);
jQuery.getJSON("https://api.flickr.com/services/feeds/photos_public.gne?id="+widget_id+"&lang=en-us&format=json&jsoncallback=?", function(data){
jQuery.each(data.items, function(i,item){
if(i<widget_number){
jQuery("<img/>").attr("src", item.media.m).appendTo(".aurel_flickr_widget_wrapper"+flickrid).wrap("<div class=\'aurel_flickr_badge_image\'><a href=\'" + item.link + "\' target=\'_blank\' class=\'aurel_no_select\' title=\'Flickr\'></a></div>");
}});
});
});
}
function aurel_albums_grid_setup(){
jQuery('.aurel_albums_grid').each(function(){
var setPad=parseInt(jQuery(this).attr('data-setPad'))/2;
jQuery(this).css('margin', setPad+'px').css('margin-top', -1*setPad+'px');
jQuery(this).parent('.aurel_front_end_display').find('.aurel_load_more_button_wrapper').css('padding-bottom', setPad*2+'px');
jQuery(this).find('.aurel_albums_grid_item .aurel_inner_cont').css({
'margin-left':setPad+'px',
'margin-top':setPad+'px',
'margin-right':setPad+'px',
'margin-bottom':setPad+'px'
});
});
}
function aurel_index_packery(){
if(jQuery('.wait4index:first').size() > 0){
var packery_container=jQuery('.wait4index:first').parent('.is_packery');
if(packery_container.find('.indexed').size() > 0){
var set_index=packery_container.find('.indexed:last').attr('data-count');
}else{
var set_index=0;
}
set_index++;
if(set_index > 8){
set_index=1;
}
jQuery('.wait4index:first').attr('data-count', set_index).addClass('packery-item'+set_index).removeClass('wait4index').addClass('indexed');
aurel_index_packery();
}}
function aurel_animatePostsPackery(){
if(jQuery('.load_anim:first').size() > 0){
(function (img, src){
img.src=src;
img.onload=function (){
jQuery('.load_anim:first').find('.packery-item-inner').css('background-image', 'url(' + jQuery('.load_anim:first').find('.packery-item-inner').attr('data-src') + ')');
jQuery('.load_anim:first').removeClass('load_anim').removeClass('anim_el').animate({
'z-index': '15'
}, 200, function(){
aurel_animatePostsPackery();
});
};}(new Image(), jQuery('.load_anim:first').find('.packery-item-inner').attr('data-src')));
}}
function aurel_index_packery(){
if(jQuery('.wait4index:first').size() > 0){
var packery_container=jQuery('.wait4index:first').parent('.is_packery');
if(packery_container.find('.indexed').size() > 0){
var set_index=packery_container.find('.indexed:last').attr('data-count');
}else{
var set_index=0;
}
set_index++;
if(set_index > 8){
set_index=1;
}
jQuery('.wait4index:first').attr('data-count', set_index).addClass('packery-item'+set_index).removeClass('wait4index').addClass('indexed');
aurel_index_packery();
}}
function aurel_albums_packery_setup(){
aurel_index_packery();
jQuery('.aurel_albums_packery').each(function(){
var setPad=Math.floor(parseInt(jQuery(this).attr('data-setPad'))/2);
if(aurel_window.width() < 1200&&setPad > 20){
setPad=setPad/2;
}
if(aurel_window.width() < 760&&setPad > 10){
setPad=10;
}
jQuery(this).parent('.aurel_albums_packery_wrapper').css('padding', setPad+'px').css('padding-top','0px').css('margin-top', -1*setPad+'px');
jQuery(this).parents('.aurel_front_end_display').find('.aurel_load_more_button_wrapper').css('padding-bottom', setPad*2+'px');
var	norm_size=Math.floor((jQuery(this).width())/4),
double_size=norm_size*2;
jQuery(this).find('.packery-item').each(function(){
if(jQuery(this).hasClass('anim_el2')){
jQuery(this).removeClass('anim_el2');
}
var set_w=norm_size,
set_h=norm_size;
if(jQuery(this).hasClass('packery-item1')||jQuery(this).hasClass('packery-item7')){
set_w=double_size,
set_h=double_size;
}
if(jQuery(this).hasClass('packery-item4')||jQuery(this).hasClass('packery-item8')){
set_w=double_size,
set_h=norm_size;
}
if(aurel_window.width() < 760){
set_w=aurel_window.width() - setPad*2;
set_h=aurel_window.width() - setPad*2;
}
jQuery(this).find('.packery-item-inner').css({
'margin-left':setPad+'px',
'margin-top':setPad+'px',
'margin-right':setPad+'px',
'margin-bottom':setPad+'px',
'width':(set_w-setPad*2)+'px',
'height':(set_h-setPad*2)+'px'
});
jQuery(this).css({
'width':set_w+'px',
'height':set_h+'px'
});
if(jQuery(this).hasClass('anim_el2')){
jQuery(this).removeClass('anim_el2');
}});
jQuery('.aurel_albums_packery').isotope('layout');
setTimeout("jQuery('.aurel_albums_packery').isotope('layout')",1000);
});
aurel_animatePostsPackery();
}
function aurel_push_content_under_header(){
var header_height=aurel_header.height();
aurel_header.css('margin-bottom', -1*header_height+'px');
};