jQuery(document).ready(function(){
var attrName = 'data-a-src' ;
if(jQuery('.wp_automatic_gallery').attr('data-a-src') == undefined) attrName = 'src';
var wp_automatic_main_scr = jQuery('.wp_automatic_gallery:first-child').attr(attrName);
jQuery('.wp_automatic_gallery:first-child').before('
');
jQuery('.wp_automatic_gallery').each(function(){
jQuery('.wp_automatic_gallery_wrap').append('');
jQuery(this).remove();
});
jQuery('.wp_automatic_gallery_btn:last').after('
');
jQuery('.wp_automatic_gallery_btn').click(function(){
jQuery('.wp_automatic_gallery_main').css('background-image', jQuery(this).css('background-image') );
});
});