function addScript(src,callback) { var s = document.createElement('script'); s.setAttribute('src', src); s.onload=callback; document.body.appendChild(s); } function callback_main() { window.setTimeout(function(){ if ( typeof UniteGalleryMain == 'function' ) { $('div[id^="gallery"]').each(function(){ $(this).unitegallery({ gallery_images_preload_type:"minimal", gallery_autoplay:false, slider_control_zoom:true, gallery_play_interval: 10000, slider_scale_mode: "fit", slider_scale_mode_fullscreen: "fit", slider_enable_bullets: false, gallery_autoplay:true, theme_panel_position: "left", gallery_theme:"compact"}); }); } }, 1000); } function callback2_flickrembed_37() { $('head').append(''); $('head').append(''); $('#flickrembed_37').html('
'); addScript('https://flickrembed.com/unitegallery/themes/compact/ug-theme-compact.js', callback_main); } function callback1_flickrembed_37() { $.getScript("https://flickrembed.com/js/remodal.min.js"); addScript('https://flickrembed.com/unitegallery/js/unitegallery.min.js', callback2_flickrembed_37); } addScript('https://code.jquery.com/jquery-1.12.1.min.js', callback1_flickrembed_37);