/** Wonderplugin Slider Lite
 * Copyright 2025 Magic Hills Pty Ltd All Rights Reserved
 * Website: http://www.wonderplugin.com
 * Version 14.5 
 */
(function($){$(document).ready(function(){$(".wonderplugin-select-mediaimage").click(function(){var textId=$(this).data("textid");var displayId=$(this).data("displayid");var inputName=$(this).data("inputname");var media_uploader=wp.media.frames.file_frame=wp.media({title:"Select Image",library:{type:"image"},button:{text:"Select Image"},multiple:false});media_uploader.on("select",function(event){var selection=media_uploader.state().get("selection");var attachment=selection.first().toJSON();if(attachment.type==
"image"){$("#"+textId).val(attachment.url);if($("input:radio[name="+inputName+"]:checked").val()=="custom")$("#"+displayId).attr("src",attachment.url)}});media_uploader.open()});$(document).on("click",".wonderplugin-dialog-tab-button",function(){if($(this).hasClass("wonderplugin-dialog-tab-button-selected"))return;var index=$(this).index();$(this).closest(".wonderplugin-dialog-tab-buttons").find("li").removeClass("wonderplugin-dialog-tab-button-selected");$(this).addClass("wonderplugin-dialog-tab-button-selected");
var panelsID=$(this).closest(".wonderplugin-dialog-tab-buttons").data("panelsid");$("#"+panelsID).children("li").removeClass("wonderplugin-dialog-tab-panel-selected");$("#"+panelsID).children("li").eq(index).addClass("wonderplugin-dialog-tab-panel-selected")});var config_options={};try{config_options=JSON.parse($("#wonderplugin-slider-id-config").text())}catch(err){}if(config_options&&"customtexteffect"in config_options&&config_options.customtexteffect.length>0){$("#custom-text-effect").val(config_options.customtexteffect);
WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT={};try{WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT=JSON.parse(config_options.customtexteffect)}catch(err){}for(var effect in WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT){var found=false;jQuery("#wonderplugin-slider-textformat").find("option").each(function(){if($(this).val()==effect){found=true;return false}});if(!found)$("#wonderplugin-slider-textformat").append('<option value="'+effect+'">'+effect+"</option>")}}var getTextEffectOptions=function(){var newconfig={};newconfig.textcss=
$.trim($("#wonderplugin-slider-textcss").val());newconfig.textbgcss=$.trim($("#wonderplugin-slider-textbgcss").val());newconfig.titlecss=$.trim($("#wonderplugin-slider-titlecss").val());newconfig.descriptioncss=$.trim($("#wonderplugin-slider-descriptioncss").val());newconfig.buttoncss=$.trim($("#wonderplugin-slider-buttoncss").val());newconfig.texteffectresponsive=$("#wonderplugin-slider-texteffectresponsive").is(":checked");newconfig.texteffectresponsivesize=parseInt($.trim($("#wonderplugin-slider-texteffectresponsivesize").val()));
newconfig.titlecssresponsive=$.trim($("#wonderplugin-slider-titlecssresponsive").val());newconfig.descriptioncssresponsive=$.trim($("#wonderplugin-slider-descriptioncssresponsive").val());newconfig.buttoncssresponsive=$.trim($("#wonderplugin-slider-buttoncssresponsive").val());newconfig.textleftrightpercentforstatic=parseInt($.trim($("#wonderplugin-slider-textleftrightpercentforstatic").val()));newconfig.textpositionstatic=$("#wonderplugin-slider-textpositionstatic").val();var positions=[];for(var i=
0;i<DYNAMIC_POSITIONS.length;i++)if($("#wonderplugin-slider-textpositiondynamic-"+DYNAMIC_POSITIONS[i]).is(":checked"))positions.push(DYNAMIC_POSITIONS[i]);if(positions.length==0)positions.push("bottomleft");newconfig.textpositiondynamic=positions.join(",");newconfig.textautohide=$("#wonderplugin-slider-textautohide").is(":checked");return newconfig};var showAlertMessage=function(message){var dialogCode="<div class='wonderplugin-dialog-container'>"+"<div class='wonderplugin-dialog-bg'></div>"+"<div class='wonderplugin-dialog' style='width:360px;'>"+
"<h3 id='wonderplugin-dialog-title'>"+message+"</h3>"+"<div class='wonderplugin-dialog-buttons'>"+"<input type='button' class='button' id='wonderplugin-dialog-cancel' value='Close' />"+"</div>"+"</div>"+"</div>";var $slideDialog=$(dialogCode);$("body").append($slideDialog);$(".wonderplugin-dialog").css({"margin-top":String($(document).scrollTop()+60)+"px"});$(".wonderplugin-dialog-bg").css({height:$(document).height()+"px"});$("#wonderplugin-dialog-cancel").click(function(){$slideDialog.remove()})};
var saveCurrentTextEffect=function(){var currentformat=$("#wonderplugin-slider-textformat").val();WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT={};if($("#custom-text-effect").val().length>0)try{WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT=JSON.parse($("#custom-text-effect").val())}catch(err){}var newconfig=getTextEffectOptions();if(currentformat in WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT)WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT[currentformat]=$.extend({},WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT[currentformat],newconfig);
else if(currentformat in WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS)WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT[currentformat]=$.extend({},WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS[currentformat],newconfig);$("#custom-text-effect").val(JSON.stringify(WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT))};$("#save-current-text-effect").click(function(){saveCurrentTextEffect();showAlertMessage("Text effect saved.")});$("#delete-current-text-effect").click(function(){var currentformat=$("#wonderplugin-slider-textformat").val();
if(currentformat.substring(0,9)!="Custom - ")return;WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT={};if($("#custom-text-effect").val().length>0)try{WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT=JSON.parse($("#custom-text-effect").val())}catch(err){}delete WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT[currentformat];$("#custom-text-effect").val(JSON.stringify(WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT));$("#wonderplugin-slider-textformat option:selected").remove();$("#wonderplugin-slider-textformat").val("Bottom bar");$("#wonderplugin-slider-textformat").change()});
$("#save-text-effect").click(function(){var dialogCode="<div class='wonderplugin-dialog-container'>"+"<div class='wonderplugin-dialog-bg'></div>"+"<div class='wonderplugin-dialog' style='width:600px;'>"+"<h3 id='wonderplugin-dialog-title'>Save as a new text effect</h3>"+"<div class='error' id='wonderplugin-dialog-error' style='display:none;'></div>"+"<table class='wonderplugin-dialog-form'>";dialogCode+="<tr>"+"<th>New Text Effect</th>"+"<td><input name='texteffectname' type='text' id='texteffectname' value='' class='regular-text' />"+
"</td>"+"</tr>";dialogCode+="</table>"+"<br /><br />"+"<div class='wonderplugin-dialog-buttons'>"+"<input type='button' class='button button-primary' id='wonderplugin-dialog-ok' value='OK' />"+"<input type='button' class='button' id='wonderplugin-dialog-cancel' value='Cancel' />"+"</div>"+"</div>"+"</div>";var $slideDialog=$(dialogCode);$("body").append($slideDialog);$(".wonderplugin-dialog").css({"margin-top":String($(document).scrollTop()+60)+"px"});$(".wonderplugin-dialog-bg").css({height:$(document).height()+
"px"});$("#wonderplugin-dialog-ok").click(function(){var newname=$.trim($("#texteffectname").val());if(newname.length<=0){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please enter a name for the text effect</p>");return}$slideDialog.remove();WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT={};if($("#custom-text-effect").val().length>0)try{WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT=JSON.parse($("#custom-text-effect").val())}catch(err){}newname="Custom - "+newname;var newconfig=getTextEffectOptions();
var currentformat=$("#wonderplugin-slider-textformat").val();if(currentformat in WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS)newconfig=$.extend({},newconfig,WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS[currentformat]);else if(currentformat in WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT)newconfig=$.extend({},WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT[currentformat],newconfig);WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT[newname]=newconfig;$("#custom-text-effect").val(JSON.stringify(WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT));
$("#wonderplugin-slider-textformat").find("option").each(function(index){var effect=$(this).val();if(effect.substring(0,9)=="Custom - ")$(this).remove()});for(var effect in WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT)$("#wonderplugin-slider-textformat").append('<option value="'+effect+'">'+effect+"</option>");$("#wonderplugin-slider-textformat").val(newname);$("#save-text-effect").hide();$("#save-current-text-effect").show();$("#delete-current-text-effect").show()});$("#wonderplugin-dialog-cancel").click(function(){$slideDialog.remove()})});
var TRANSITION_EFFECTS=["fade","crossfade","fadeoutfadein","slide","cssslide","elastic","slice","blinds","blocks","shuffle","tiles","kenburns","flip","flipwithzoom","threed","threedhorizontal","threedwithzoom","threedhorizontalwithzoom","threedflip","threedflipwithzoom","threedtiles"];var DYNAMIC_POSITIONS=["topleft","topcenter","topright","centerleft","centercenter","centerright","bottomleft","bottomcenter","bottomright"];$(".wonderplugin-engine").css({display:"none"});$(".wonderplugin-tab-buttons-horizontal").each(function(){var index=
$.wpSliderCookie($(this).attr("id"));if(index>=0){$(this).children("li").removeClass("wonderplugin-tab-button-horizontal-selected");$(this).children("li").eq(index).addClass("wonderplugin-tab-button-horizontal-selected");var panelsID=$(this).data("panelsid");$("#"+panelsID).children("li").removeClass("wonderplugin-tab-horizontal-selected");$("#"+panelsID).children("li").eq(index).addClass("wonderplugin-tab-horizontal-selected")}$(this).find("li").each(function(index){$(this).click(function(){if($(this).hasClass("wonderplugin-tab-button-horizontal-selected"))return;
$(this).parent().find("li").removeClass("wonderplugin-tab-button-horizontal-selected");$(this).addClass("wonderplugin-tab-button-horizontal-selected");var panelsID=$(this).parent().data("panelsid");$("#"+panelsID).children("li").removeClass("wonderplugin-tab-horizontal-selected");$("#"+panelsID).children("li").eq(index).addClass("wonderplugin-tab-horizontal-selected");$.wpSliderCookie($(this).parent().attr("id"),index)})})});$("#wonderplugin-slider-toolbar").find("li").each(function(index){$(this).click(function(){if($(this).hasClass("wonderplugin-tab-buttons-selected"))return;
$(this).parent().find("li").removeClass("wonderplugin-tab-buttons-selected");if(!$(this).hasClass("laststep"))$(this).addClass("wonderplugin-tab-buttons-selected");$("#wonderplugin-slider-tabs").children("li").removeClass("wonderplugin-tab-selected");$("#wonderplugin-slider-tabs").children("li").eq(index).addClass("wonderplugin-tab-selected");$("#wonderplugin-slider-tabs").removeClass("wonderplugin-tabs-grey");if(index==3){previewSlider();$("#wonderplugin-slider-tabs").addClass("wonderplugin-tabs-grey")}else if(index==
4)publishSlider()})});var getURLParams=function(href){var result={};if(href.indexOf("?")<0)return result;var params=href.substring(href.indexOf("?")+1).split("&");for(var i=0;i<params.length;i++){var value=params[i].split("=");if(value&&value.length==2&&value[0].toLowerCase()!="v")result[value[0].toLowerCase()]=value[1]}return result};var addMediaToList=function(data){if($("#wonderplugin-newestfirst").is(":checked"))wonderplugin_slider_config.slides.unshift(data);else wonderplugin_slider_config.slides.push(data)};
var slideDialog=function(dialogType,onSuccess,data,dataIndex){var dialogTitle=["image","video","Youtube Video","Vimeo Video"];var langlist={};try{langlist=JSON.parse($("#wonderplugin-slider-langlist").text())}catch(err){}var dialogCode="<div class='wonderplugin-dialog-container'>"+"<div id='wonderplugin-dialog-langs' style='display:none;'></div>"+"<div class='wonderplugin-dialog-bg'></div>"+"<div class='wonderplugin-dialog'>"+"<h3 id='wonderplugin-dialog-title'></h3>"+"<div class='error' id='wonderplugin-dialog-error' style='display:none;'></div>"+
"<table class='wonderplugin-dialog-form'>";if(dialogType==2||dialogType==3)dialogCode+="<tr>"+"<th>Enter video URL</th>"+"<td><input name='wonderplugin-dialog-video' type='text' id='wonderplugin-dialog-video' value='' class='regular-text' /> <input type='button' class='button' id='wonderplugin-dialog-select-video' value='Enter' /></td>"+"</tr>"+"<tr>";dialogCode+="<tr>"+"<th>Enter"+(dialogType>0?" poster":"")+" image URL</th>"+"<td><input name='wonderplugin-dialog-image' type='text' id='wonderplugin-dialog-image' value='' class='regular-text' /> or <input type='button' class='button' data-textid='wonderplugin-dialog-image' id='wonderplugin-dialog-select-image' value='Upload' /></td>"+
"</tr>"+"<tr id='wonderplugin-dialog-image-display-tr' style='display:none;'>"+"<th></th>"+"<td><img id='wonderplugin-dialog-image-display' style='width:80px;height:80px;' /></td>"+"</tr>"+"<tr>"+"<th>Thumbnail URL</th>"+"<td><input name='wonderplugin-dialog-thumbnail' type='text' id='wonderplugin-dialog-thumbnail' value='' class='regular-text' /> or <input type='button' class='button' data-textid='wonderplugin-dialog-thumbnail' id='wonderplugin-dialog-select-thumbnail' value='Upload' /></td>"+"</tr>";
if(dialogType==1)dialogCode+="<tr>"+"<th>MP4 video URL</th>"+"<td><input name='wonderplugin-dialog-mp4' type='text' id='wonderplugin-dialog-mp4' value='' class='regular-text' /> or <input type='button' class='button' data-textid='wonderplugin-dialog-mp4' id='wonderplugin-dialog-select-mp4' value='Upload' /></td>"+"</tr>"+"<tr>"+"<tr>"+"<th>WebM video URL (Optional)</th>"+"<td><input name='wonderplugin-dialog-webm' type='text' id='wonderplugin-dialog-webm' value='' class='regular-text' /> or <input type='button' class='button' data-textid='wonderplugin-dialog-webm' id='wonderplugin-dialog-select-webm' value='Upload' /></td>"+
"</tr>"+"<tr>";dialogCode+="</table>";dialogCode+='<ul class="wonderplugin-dialog-tab-buttons" data-panelsid="wonderplugin-dialog-tab-panels-content">'+'<li class="wonderplugin-dialog-tab-button wonderplugin-dialog-tab-button-selected">Text</li>'+'<li class="wonderplugin-dialog-tab-button">Text Effect</li>'+'<li class="wonderplugin-dialog-tab-button">'+(dialogType==0?"Lightbox and Weblink":"Lightbox")+"</li>"+"</ul>";dialogCode+='<ul class="wonderplugin-dialog-tab-panels" id="wonderplugin-dialog-tab-panels-content">'+
'<li class="wonderplugin-dialog-tab-panel wonderplugin-dialog-tab-panel-selected">';dialogCode+="<table class='wonderplugin-dialog-form'>";dialogCode+="<tr>"+"<th>Title</th>"+"<td><input name='wonderplugin-dialog-image-title' type='text' id='wonderplugin-dialog-image-title' value='' class='large-text' /></td>"+"</tr>"+"<tr>"+"<th>Description</th>"+"<td><textarea name='wonderplugin-dialog-image-description' type='' id='wonderplugin-dialog-image-description' value='' class='large-text'></textarea></td>"+
"</tr>"+"<tr>"+"<th>Img Alt Text</th>"+"<td><label><input name='wonderplugin-dialog-image-altusetitle' type='checkbox' id='wonderplugin-dialog-image-altusetitle' checked /> Use Title as Img Alt text. To use a different text, uncheck the option and enter it below:  </label><br><input name='wonderplugin-dialog-image-alt' type='text' id='wonderplugin-dialog-image-alt' value='' class='large-text' disabled /></td>"+"</tr>"+"<tr>"+"<th>Button Text</th>"+"<td><div style='float:left;'><input name='wonderplugin-dialog-image-button' type='text' id='wonderplugin-dialog-image-button' value='' class='regular-text' style='width:240px;'/> Button CSS:&nbsp;&nbsp;&nbsp;&nbsp;</div>"+
"<div class='select-editable' style='float:right;'><select onchange='this.nextElementSibling.value=this.value'>"+"<option value=''></option>"+"<option value='as-btn-blue-small'>as-btn-blue-small</option>"+"<option value='as-btn-blue-medium'>as-btn-blue-medium</option>"+"<option value='as-btn-blue-large'>as-btn-blue-large</option>"+"<option value='as-btn-blueborder-small'>as-btn-blueborder-small</option>"+"<option value='as-btn-blueborder-medium'>as-btn-blueborder-medium</option>"+"<option value='as-btn-blueborder-large'>as-btn-blueborder-large</option>"+
"<option value='as-btn-orange-small'>as-btn-orange-small</option>"+"<option value='as-btn-orange-medium'>as-btn-orange-medium</option>"+"<option value='as-btn-orange-large'>as-btn-orange-large</option>"+"<option value='as-btn-orangeborder-small'>as-btn-orangeborder-small</option>"+"<option value='as-btn-orangeborder-medium'>as-btn-orangeborder-medium</option>"+"<option value='as-btn-orangeborder-large'>as-btn-orangeborder-large</option>"+"<option value='as-btn-navy-small'>as-btn-navy-small</option>"+
"<option value='as-btn-navy-medium'>as-btn-navy-medium</option>"+"<option value='as-btn-navy-large'>as-btn-navy-large</option>"+"<option value='as-btn-navyborder-small'>as-btn-navyborder-small</option>"+"<option value='as-btn-navyborder-medium'>as-btn-navyborder-medium</option>"+"<option value='as-btn-navyborder-large'>as-btn-navyborder-large</option>"+"<option value='as-btn-white-small'>as-btn-white-small</option>"+"<option value='as-btn-white-medium'>as-btn-white-medium</option>"+"<option value='as-btn-white-large'>as-btn-white-large</option>"+
"<option value='as-btn-whiteborder-small'>as-btn-whiteborder-small</option>"+"<option value='as-btn-whiteborder-medium'>as-btn-whiteborder-medium</option>"+"<option value='as-btn-whiteborder-large'>as-btn-whiteborder-large</option>"+"</select><input type='text' name='wonderplugin-dialog-image-buttoncss' id='wonderplugin-dialog-image-buttoncss' value='as-btn-blue-medium' /></div>"+"</td>"+"</tr>"+"<tr>"+"<th>Button Link</th>"+"<td><input name='wonderplugin-dialog-image-buttonlink' type='text' id='wonderplugin-dialog-image-buttonlink' value='' class='regular-text' style='width:240px;'/> Button Link Target: "+
"<div class='select-editable' style='float:right;width:140px;'><select onchange='this.nextElementSibling.value=this.value' id='wonderplugin-dialog-linktarget-select' style='width:140px;'>"+"<option value=''></option>"+"<option value='_blank'>_blank</option>"+"<option value='_self'>_self</option>"+"<option value='_parent'>_parent</option>"+"<option value='_top'>_top</option>"+"</select>"+"<input name='wonderplugin-dialog-image-buttonlinktarget' type='text' id='wonderplugin-dialog-image-buttonlinktarget' value='' class='small-text' style='width:110px;'/></div>"+
"</td>"+"</tr>";if(langlist&&langlist.length>1)dialogCode+='<tr><th></th><td><input type="button" class="button button-primary" id="wonderplugin-dialog-multilingual" value="Multilingual Translation"></td></tr>';dialogCode+="</table>";dialogCode+='</li><li class="wonderplugin-dialog-tab-panel">';dialogCode+="<table class='wonderplugin-dialog-form'>";dialogCode+="<tr>"+"<th>Text Effect</th>"+"<td><label><input name='wonderplugin-dialog-usetexteffect' type='checkbox' id='wonderplugin-dialog-usetexteffect' /> Choose a special text effect for this slide</label>"+
"<select name='wonderplugin-dialog-texteffect' id='wonderplugin-dialog-texteffect'>";for(var key in WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS)dialogCode+="<option value='"+key+"'>"+key+"</option>";for(var key in WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT)dialogCode+="<option value='"+key+"'>"+key+"</option>";dialogCode+='</select><p style="font-style:italic;">If this option is not checked, it will use the effect selected in step 3 Options tab, Text Effect, "Select a pre-defined text effect" drop-down list.</p>'+
"</td></tr>";dialogCode+="</table>";dialogCode+='</li><li class="wonderplugin-dialog-tab-panel">';dialogCode+="<table class='wonderplugin-dialog-form'>";dialogCode+="<tr>"+"<th>Click to open Lightbox popup</th>"+"<td><label><input name='wonderplugin-dialog-lightbox' type='checkbox' id='wonderplugin-dialog-lightbox' value='' /> Open current "+dialogTitle[dialogType]+" in Lightbox</label>"+"<br /><label><input name='wonderplugin-dialog-lightbox-size' type='checkbox' id='wonderplugin-dialog-lightbox-size' value='' /> Set Lightbox size </label>"+
" <input name='wonderplugin-dialog-lightbox-width' type='text' id='wonderplugin-dialog-lightbox-width' value='960' class='small-text' /> / <input name='wonderplugin-dialog-lightbox-height' type='text' id='wonderplugin-dialog-lightbox-height' value='540' class='small-text' />"+"</td>"+"</tr>";if(dialogType==0)dialogCode+="<tr><th>Or click to open web link</th>"+"<td>"+"<input name='wonderplugin-dialog-weblink' type='text' id='wonderplugin-dialog-weblink' value='' class='large-text' />"+"<p style='font-size:0.9em;font-style:italic;'>* Uncheck the option \"Open current image in Lightbox\" to enable weblink</p>"+
"</td>"+"</tr>"+"<tr><th>Set web link target</th>"+"<td>"+"<div class='select-editable'><select onchange='this.nextElementSibling.value=this.value' id='wonderplugin-dialog-linktarget-select'>"+"<option value=''></option>"+"<option value='_blank'>_blank</option>"+"<option value='_self'>_self</option>"+"<option value='_parent'>_parent</option>"+"<option value='_top'>_top</option>"+"</select>"+"<input name='wonderplugin-dialog-linktarget' type='text' id='wonderplugin-dialog-linktarget' value='' class='regular-text' /></div>"+
"</td>"+"</tr>"+"<tr><th></th>"+"<td>"+"<label><input name='wonderplugin-dialog-weblinklightbox' type='checkbox' id='wonderplugin-dialog-weblinklightbox' value='' /> Open web link in Lightbox</label>"+"</td>"+"</tr>";dialogCode+="</table>";dialogCode+="</li></ul>";dialogCode+="<div class='wonderplugin-dialog-buttons'>"+"<input type='button' class='button button-primary' id='wonderplugin-dialog-ok' value='OK' />"+"<input type='button' class='button' id='wonderplugin-dialog-cancel' value='Cancel' />"+
"</div>"+"</div>"+"</div>";var $slideDialog=$(dialogCode);$("body").append($slideDialog);$(".wonderplugin-dialog").css({"margin-top":String($(document).scrollTop()+60)+"px"});$(".wonderplugin-dialog-bg").css({height:$(document).height()+"px"});$("#wonderplugin-dialog-lightbox").click(function(){var is_checked=$(this).is(":checked");if($("#wonderplugin-dialog-weblink").length)$("#wonderplugin-dialog-weblink").prop("disabled",is_checked);if($("#wonderplugin-dialog-linktarget").length){$("#wonderplugin-dialog-linktarget").prop("disabled",
is_checked);$("#wonderplugin-dialog-linktarget-select").prop("disabled",is_checked)}if($("#wonderplugin-dialog-weblinklightbox").length)$("#wonderplugin-dialog-weblinklightbox").prop("disabled",is_checked)});$(".wonderplugin-dialog").css({"margin-top":String($(document).scrollTop()+60)+"px"});$(".wonderplugin-dialog-bg").css({height:$(document).height()+"px"});$("#wonderplugin-dialog-title").html("Add "+dialogTitle[dialogType]);$("#wonderplugin-dialog-image-altusetitle").click(function(){$("#wonderplugin-dialog-image-alt").prop("disabled",
$(this).is(":checked"))});$("#wonderplugin-dialog-usetexteffect").click(function(){$("#wonderplugin-dialog-texteffect").prop("disabled",!$(this).is(":checked"))});if(langlist&&langlist.length>1)$("#wonderplugin-dialog-multilingual").click(function(){var defaultlang=$("#wonderplugin-slider-defaultlang").text();var form='<div><ul class="wonderplugin-dialog-tab-buttons" data-panelsid="wonderplugin-dialog-tab-panels-multilingual">';for(var i=0;i<langlist.length;i++)form+='<li class="wonderplugin-dialog-tab-button'+
(defaultlang==langlist[i].code?" wonderplugin-dialog-tab-button-selected":"")+'">'+langlist[i].translated_name+(defaultlang==langlist[i].code?" (default)":"")+"</li>";form+="</ul>";form+='<ul class="wonderplugin-dialog-tab-panels" id="wonderplugin-dialog-tab-panels-multilingual">';for(var i=0;i<langlist.length;i++){form+='<li data-langcode="'+langlist[i].code+'" class="wonderplugin-dialog-tab-panel-'+langlist[i].code+" wonderplugin-dialog-tab-panel"+(defaultlang==langlist[i].code?" wonderplugin-dialog-tab-panel-selected":
"")+'">';form+='<table style="width:100%;">';form+='<tr><th>Title</th><td><input name="wonderplugin-dialog-multilingual-title" value="" type="text" class="large-text"></input></td></tr>';form+='<tr><th>Description</th><td><textarea name="wonderplugin-dialog-multilingual-description" class="large-text"></textarea></td></tr>';form+='<tr><th>Img Alt Text</th><td><input name="wonderplugin-dialog-multilingual-alt" value="" type="text" class="large-text"></input></td></tr>';form+='<tr><th>Button Text</th><td><input name="wonderplugin-dialog-multilingual-button" value="" type="text" class="large-text"></input></td></tr>';
form+="</table>";form+="</li>"}form+="</ul></div>";$(form).dialog({title:"Multilingual Translation",resizable:true,modal:true,width:800,open:function(){var langs=null;try{langs=JSON.parse($("#wonderplugin-dialog-langs").text())}catch(err){}var defaultlang=$("#wonderplugin-slider-defaultlang").text();if(langs)for(var key in langs){if(key==defaultlang){langs[key].title=$("#wonderplugin-dialog-image-title").val();langs[key].description=$("#wonderplugin-dialog-image-description").val();langs[key].alt=
$("#wonderplugin-dialog-image-alt").val();langs[key].button=$("#wonderplugin-dialog-image-button").val()}var panel=$("#wonderplugin-dialog-tab-panels-multilingual .wonderplugin-dialog-tab-panel-"+key);if(panel.length>0){$("input[name=wonderplugin-dialog-multilingual-title]",panel).val(langs[key].title);$("textarea[name=wonderplugin-dialog-multilingual-description]",panel).val(langs[key].description);$("input[name=wonderplugin-dialog-multilingual-alt]",panel).val(langs[key].alt);$("input[name=wonderplugin-dialog-multilingual-button]",
panel).val(langs[key].button)}}else for(var i=0;i<langlist.length;i++){$("input[name=wonderplugin-dialog-multilingual-title]").val($("#wonderplugin-dialog-image-title").val());$("textarea[name=wonderplugin-dialog-multilingual-description]").val($("#wonderplugin-dialog-image-description").val());$("input[name=wonderplugin-dialog-multilingual-alt]").val($("#wonderplugin-dialog-image-alt").val());$("input[name=wonderplugin-dialog-multilingual-button]").val($("#wonderplugin-dialog-image-button").val())}},
buttons:{"Ok":function(){var defaultlang=$("#wonderplugin-slider-defaultlang").text();var langs={};$("#wonderplugin-dialog-tab-panels-multilingual .wonderplugin-dialog-tab-panel").each(function(index){var langcode=$(this).data("langcode");langs[langcode]={title:$("input[name=wonderplugin-dialog-multilingual-title]",this).val(),description:$("textarea[name=wonderplugin-dialog-multilingual-description]",this).val(),alt:$("input[name=wonderplugin-dialog-multilingual-alt]",this).val(),button:$("input[name=wonderplugin-dialog-multilingual-button]",
this).val()};if(langcode==defaultlang){$("#wonderplugin-dialog-image-title").val(langs[langcode].title);$("#wonderplugin-dialog-image-description").val(langs[langcode].description);$("#wonderplugin-dialog-image-alt").val(langs[langcode].alt);$("#wonderplugin-dialog-image-button").val(langs[langcode].button)}});$("#wonderplugin-dialog-langs").text(JSON.stringify(langs));$(this).dialog("destroy").remove()},"Cancel":function(){$(this).dialog("destroy").remove()}}})});if(data){if(data.langs)$("#wonderplugin-dialog-langs").text(data.langs);
if(dialogType==2||dialogType==3)$("#wonderplugin-dialog-video").val(data.video);$("#wonderplugin-dialog-image").val(data.image);if(data.image){$("#wonderplugin-dialog-image-display-tr").css({display:"table-row"});$("#wonderplugin-dialog-image-display").attr("src",data.image)}$("#wonderplugin-dialog-thumbnail").val(data.thumbnail);if($.trim($("#wonderplugin-dialog-image-title").val()).length<=0)$("#wonderplugin-dialog-image-title").val(data.title);$("#wonderplugin-dialog-image-description").val(data.description);
$("#wonderplugin-dialog-image-button").val(data.button);$("#wonderplugin-dialog-image-buttoncss").val(data.buttoncss);$("#wonderplugin-dialog-image-buttonlink").val(data.buttonlink);$("#wonderplugin-dialog-image-buttonlinktarget").val(data.buttonlinktarget);if("altusetitle"in data){$("#wonderplugin-dialog-image-altusetitle").prop("checked",data.altusetitle);$("#wonderplugin-dialog-image-alt").val(data.alt);$("#wonderplugin-dialog-image-alt").prop("disabled",data.altusetitle)}else{$("#wonderplugin-dialog-image-altusetitle").prop("checked",
true);$("#wonderplugin-dialog-image-alt").val("");$("#wonderplugin-dialog-image-alt").prop("disabled",true)}if(dialogType==1){$("#wonderplugin-dialog-mp4").val(data.mp4);$("#wonderplugin-dialog-webm").val(data.webm)}if(dialogType==0){$("#wonderplugin-dialog-weblink").val(data.weblink);$("#wonderplugin-dialog-linktarget").val(data.linktarget);$("#wonderplugin-dialog-weblinklightbox").prop("checked",data.weblinklightbox);$("#wonderplugin-dialog-weblink").prop("disabled",data.lightbox);$("#wonderplugin-dialog-linktarget").prop("disabled",
data.lightbox);$("#wonderplugin-dialog-linktarget-select").prop("disabled",data.lightbox);$("#wonderplugin-dialog-weblinklightbox").prop("disabled",data.lightbox)}$("#wonderplugin-dialog-lightbox").prop("checked",data.lightbox);if("lightboxsize"in data)$("#wonderplugin-dialog-lightbox-size").prop("checked",data.lightboxsize);if(data.lightboxwidth)$("#wonderplugin-dialog-lightbox-width").val(data.lightboxwidth);if(data.lightboxheight)$("#wonderplugin-dialog-lightbox-height").val(data.lightboxheight);
if("usetexteffect"in data){$("#wonderplugin-dialog-usetexteffect").prop("checked",data.usetexteffect);$("#wonderplugin-dialog-texteffect").val(data.texteffect);$("#wonderplugin-dialog-texteffect").prop("disabled",!data.usetexteffect)}}if(dialogType==2||dialogType==3)$("#wonderplugin-dialog-select-video").click(function(){var videoData={type:dialogType,video:$.trim($("#wonderplugin-dialog-video").val()),image:$.trim($("#wonderplugin-dialog-image").val()),thumbnail:$.trim($("#wonderplugin-dialog-thumbnail").val()),
title:$.trim($("#wonderplugin-dialog-image-title").val()),description:$.trim($("#wonderplugin-dialog-image-description").val()),altusetitle:$("#wonderplugin-dialog-image-altusetitle").is(":checked"),alt:$.trim($("#wonderplugin-dialog-image-alt").val()),usetexteffect:$("#wonderplugin-dialog-usetexteffect").is(":checked"),texteffect:$.trim($("#wonderplugin-dialog-texteffect").val()),button:$.trim($("#wonderplugin-dialog-image-button").val()),buttoncss:$.trim($("#wonderplugin-dialog-image-buttoncss").val()),
buttonlink:$.trim($("#wonderplugin-dialog-image-buttonlink").val()),buttonlinktarget:$.trim($("#wonderplugin-dialog-image-buttonlinktarget").val())};$slideDialog.remove();onlineVideoDialog(dialogType,function(items){items.map(function(data){addMediaToList({type:dialogType,image:data.image,thumbnail:data.thumbnail?data.thumbnail:data.image,video:data.video,mp4:data.mp4,webm:data.webm,title:data.title,description:data.description,altusetitle:data.altusetitle,alt:data.alt,usetexteffect:data.usetexteffect,
texteffect:data.texteffect,button:data.button,buttoncss:data.buttoncss,buttonlink:data.buttonlink,buttonlinktarget:data.buttonlinktarget,weblink:data.weblink,weblinklightbox:data.weblinklightbox,linktarget:data.linktarget,lightbox:data.lightbox,lightboxsize:data.lightboxsize,lightboxwidth:data.lightboxwidth,lightboxheight:data.lightboxheight,langs:data.langs})});updateMediaTable()},videoData,true,dataIndex)});var get_media_langs=function(items,callback){if(langlist&&langlist.length>1){var media=new Array;
for(var i=0;i<items.length;i++)media.push(items[i].id);var ajaxnonce=$("#wonderplugin-slider-ajaxnonce").text();var loading='<div><div class="wonderplugin-dialog-loading"></div><p style="text-align:center;font-size:1.2em;">Loading multilingual text from Media Library ... </p></div>';var loadingDialog=$(loading).dialog({title:"Loading",width:500,resizable:false,modal:true});$.ajax({url:ajaxurl,type:"POST",data:{action:"wonderplugin_slider_get_media_langs",nonce:ajaxnonce,item:JSON.stringify(media)},
success:function(data){if(data){var defaultlang=$("#wonderplugin-slider-defaultlang").text();var currentlang=$("#wonderplugin-slider-currentlang").text();for(var i=0;i<items.length;i++)for(var key in data)if(items[i].id==key){items[i].langs=JSON.stringify(data[key]);if(currentlang!=defaultlang&&data[key])for(var langcode in data[key])if(langcode==defaultlang){items[i].title=data[key][langcode].title;items[i].description=data[key][langcode].description;items[i].alt=data[key][langcode].alt;break}break}}},
complete:function(){callback(items);loadingDialog.dialog("destroy").remove()}})}else callback(items)};var media_upload_onclick=function(event){event.preventDefault();var buttonId=$(this).attr("id");var textId=$(this).data("textid");var library_title=buttonId=="wonderplugin-dialog-select-image"||buttonId=="wonderplugin-dialog-select-thumbnail"?"Add Image":"Add Video";var library_type=buttonId=="wonderplugin-dialog-select-image"||buttonId=="wonderplugin-dialog-select-thumbnail"?"image":"video";var media_uploader=
wp.media.frames.file_frame=wp.media({title:library_title,library:{type:library_type},button:{text:library_title},multiple:dialogType==0&&buttonId=="wonderplugin-dialog-select-image"});media_uploader.on("select",function(event){var selection=media_uploader.state().get("selection");if(dialogType==0&&buttonId=="wonderplugin-dialog-select-image"&&selection.length>1){var items=[];selection.map(function(attachment){attachment=attachment.toJSON();if(attachment.type!="image")return;var thumbnail;var thumbnailsize=
$("#wonderplugin-slider-thumbnailsize").text();if(thumbnailsize&&thumbnailsize.length>0&&attachment.sizes&&attachment.sizes[thumbnailsize]&&attachment.sizes[thumbnailsize].url)thumbnail=attachment.sizes[thumbnailsize].url;else if(attachment.sizes&&attachment.sizes.medium&&attachment.sizes.medium.url)thumbnail=attachment.sizes.medium.url;else if(attachment.sizes&&attachment.sizes.thumbnail&&attachment.sizes.thumbnail.url)thumbnail=attachment.sizes.thumbnail.url;else thumbnail=attachment.url;items.push({id:attachment.id,
image:attachment.url,thumbnail:thumbnail,title:attachment.title,description:attachment.description,altusetitle:attachment.alt&&attachment.alt.length>0?false:true,alt:attachment.alt&&attachment.alt.length>0?attachment.alt:"",usetexteffect:false,texteffect:"Bottom bar",button:"",buttoncss:"as-btn-blue-medium",buttonlink:"",buttonlinktarget:"",weblink:"",weblinklightbox:false,linktarget:"",lightbox:$("#wonderplugin-dialog-lightbox").is(":checked"),lightboxsize:$("#wonderplugin-dialog-lightbox-size").is(":checked"),
lightboxwidth:parseInt($.trim($("#wonderplugin-dialog-lightbox-width").val())),lightboxheight:parseInt($.trim($("#wonderplugin-dialog-lightbox-height").val()))})});$slideDialog.remove();get_media_langs(items,onSuccess)}else{attachment=selection.first().toJSON();if(buttonId=="wonderplugin-dialog-select-image"){if(attachment.type!="image"){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please select an image file</p>");return}var thumbnail;var thumbnailsize=$("#wonderplugin-slider-thumbnailsize").text();
if(thumbnailsize&&thumbnailsize.length>0&&attachment.sizes&&attachment.sizes[thumbnailsize]&&attachment.sizes[thumbnailsize].url)thumbnail=attachment.sizes[thumbnailsize].url;else if(attachment.sizes&&attachment.sizes.medium&&attachment.sizes.medium.url)thumbnail=attachment.sizes.medium.url;else if(attachment.sizes&&attachment.sizes.thumbnail&&attachment.sizes.thumbnail.url)thumbnail=attachment.sizes.thumbnail.url;else thumbnail=attachment.url;$("#wonderplugin-dialog-image-display-tr").css({display:"table-row"});
$("#wonderplugin-dialog-image-display").attr("src",attachment.url);$("#wonderplugin-dialog-image").val(attachment.url);$("#wonderplugin-dialog-thumbnail").val(thumbnail);if($.trim($("#wonderplugin-dialog-image-title").val()).length<=0)$("#wonderplugin-dialog-image-title").val(attachment.title);$("#wonderplugin-dialog-image-description").val(attachment.description);if(attachment.alt&&attachment.alt.length>0){$("#wonderplugin-dialog-image-altusetitle").prop("checked",false);$("#wonderplugin-dialog-image-alt").val(attachment.alt);
$("#wonderplugin-dialog-image-alt").prop("disabled",false)}get_media_langs([{id:attachment.id}],function(data){if(data&&data.length>0){$("#wonderplugin-dialog-langs").text(data[0].langs);var defaultlang=$("#wonderplugin-slider-defaultlang").text();var currentlang=$("#wonderplugin-slider-currentlang").text();if(currentlang!=defaultlang&&data[0].langs){var langs={};try{langs=JSON.parse(data[0].langs)}catch(err){}for(var langcode in langs)if(langcode==defaultlang){$("#wonderplugin-dialog-image-title").val(langs[langcode].title);
$("#wonderplugin-dialog-image-description").val(langs[langcode].description);$("#wonderplugin-dialog-image-alt").val(langs[langcode].alt);break}}}})}else if(buttonId=="wonderplugin-dialog-select-thumbnail"){if(attachment.type!="image"){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please select an image file</p>");return}$("#wonderplugin-dialog-thumbnail").val(attachment.url)}else{if(attachment.type!="video"){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please select a video file</p>");
return}$("#"+textId).val(attachment.url)}}$("#wonderplugin-dialog-error").css({display:"none"}).empty()});media_uploader.open()};if(parseInt($("#wonderplugin-slider-wp-history-media-uploader").text())==1){var buttonId="";var textId="";var history_media_upload_onclick=function(event){buttonId=$(this).attr("id");textId=$(this).data("textid");var mediaType=buttonId=="wonderplugin-dialog-select-image"||buttonId=="wonderplugin-dialog-select-thumbnail"?"image":"video";tb_show("Upload "+mediaType,"media-upload.php?referer=wonderplugin-slider&type="+
mediaType+"&TB_iframe=true",false);return false};window.send_to_editor=function(html){tb_remove();if(buttonId=="wonderplugin-dialog-select-image"){var $img=$("img",html);if(!$img.length){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please select an image file</p>");return}var thumbnail=$img.attr("src");var src=$(html).is("a")?$(html).attr("href"):thumbnail;$("#wonderplugin-dialog-image-display-tr").css({display:"table-row"});$("#wonderplugin-dialog-image-display").attr("src",thumbnail);
$("#wonderplugin-dialog-image").val(src);$("#wonderplugin-dialog-thumbnail").val(thumbnail);if($.trim($("#wonderplugin-dialog-image-title").val()).length<=0)$("#wonderplugin-dialog-image-title").val($("img",html).attr("title"))}else if(buttonId=="wonderplugin-dialog-select-thumbnail"){var $img=$("img",html);if(!$img.length){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please select an image file</p>");return}var src=$(html).is("a")?$(html).attr("href"):$img.attr("src");$("#wonderplugin-dialog-thumbnail").val(src)}else{if($("img",
html).length){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please select a video file</p>");return}$("#"+textId).val($(html).attr("href"))}$("#wonderplugin-dialog-error").css({display:"none"}).empty()};$("#wonderplugin-dialog-select-image").click(history_media_upload_onclick);$("#wonderplugin-dialog-select-thumbnail").click(history_media_upload_onclick);if(dialogType==1){$("#wonderplugin-dialog-select-mp4").click(history_media_upload_onclick);$("#wonderplugin-dialog-select-webm").click(history_media_upload_onclick)}}else{$("#wonderplugin-dialog-select-image").click(media_upload_onclick);
$("#wonderplugin-dialog-select-thumbnail").click(media_upload_onclick);if(dialogType==1){$("#wonderplugin-dialog-select-mp4").click(media_upload_onclick);$("#wonderplugin-dialog-select-webm").click(media_upload_onclick)}}$("#wonderplugin-dialog-ok").click(function(){if($.trim($("#wonderplugin-dialog-image").val()).length<=0){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please select an image file</p>");return}if(dialogType==1&&$.trim($("#wonderplugin-dialog-mp4").val()).length<=
0){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please select a video file</p>");return}var langs={};try{langs=JSON.parse($("#wonderplugin-dialog-langs").text())}catch(err){}var defaultlang=$("#wonderplugin-slider-defaultlang").text();for(var key in langs)if(key==defaultlang){langs[key].title=$("#wonderplugin-dialog-image-title").val();langs[key].description=$("#wonderplugin-dialog-image-description").val();langs[key].alt=$("#wonderplugin-dialog-image-alt").val();langs[key].button=
$("#wonderplugin-dialog-image-button").val()}var item={image:$.trim($("#wonderplugin-dialog-image").val()),thumbnail:$.trim($("#wonderplugin-dialog-thumbnail").val()),video:$.trim($("#wonderplugin-dialog-video").val()),mp4:$.trim($("#wonderplugin-dialog-mp4").val()),webm:$.trim($("#wonderplugin-dialog-webm").val()),title:$.trim($("#wonderplugin-dialog-image-title").val()),description:$.trim($("#wonderplugin-dialog-image-description").val()),altusetitle:$("#wonderplugin-dialog-image-altusetitle").is(":checked"),
alt:$.trim($("#wonderplugin-dialog-image-alt").val()),usetexteffect:$("#wonderplugin-dialog-usetexteffect").is(":checked"),texteffect:$.trim($("#wonderplugin-dialog-texteffect").val()),button:$.trim($("#wonderplugin-dialog-image-button").val()),buttoncss:$.trim($("#wonderplugin-dialog-image-buttoncss").val()),buttonlink:$.trim($("#wonderplugin-dialog-image-buttonlink").val()),buttonlinktarget:$.trim($("#wonderplugin-dialog-image-buttonlinktarget").val()),weblink:$.trim($("#wonderplugin-dialog-weblink").val()),
weblinklightbox:$("#wonderplugin-dialog-weblinklightbox").is(":checked"),linktarget:$.trim($("#wonderplugin-dialog-linktarget").val()),lightbox:$("#wonderplugin-dialog-lightbox").is(":checked"),lightboxsize:$("#wonderplugin-dialog-lightbox-size").is(":checked"),lightboxwidth:parseInt($.trim($("#wonderplugin-dialog-lightbox-width").val())),lightboxheight:parseInt($.trim($("#wonderplugin-dialog-lightbox-height").val())),langs:langs?JSON.stringify(langs):""};$slideDialog.remove();onSuccess([item])});
$("#wonderplugin-dialog-cancel").click(function(){$slideDialog.remove()})};var onlineVideoDialog=function(dialogType,onSuccess,videoData,invokeFromSlideDialog,dataIndex){var dialogTitle=["Image","Video","Youtube Video","Vimeo Video"];var dialogExample=["","","https://www.youtube.com/watch?v=wswxQ3mhwqQ","https://vimeo.com/147079122"];var dialogCode="<div class='wonderplugin-dialog-container'>"+"<div class='wonderplugin-dialog-bg'></div>"+"<div class='wonderplugin-dialog'>"+"<h3 id='wonderplugin-dialog-title'></h3>"+
"<div class='error' id='wonderplugin-dialog-error' style='display:none;'></div>"+"<table class='wonderplugin-dialog-form'>"+"<tr>"+"<th>Enter "+dialogTitle[dialogType]+" URL</th>"+"<td><input name='wonderplugin-dialog-video' type='text' id='wonderplugin-dialog-video' value='' class='regular-text' />"+"<p>URL Example: "+dialogExample[dialogType]+"<p>"+"</td>"+"</tr>";dialogCode+="</table>"+"<div id='wonderplugin-slider-video-dialog-loading'></div>"+"<div class='wonderplugin-dialog-buttons'>"+"<input type='button' class='button button-primary' id='wonderplugin-dialog-ok' value='OK' />"+
"<input type='button' class='button' id='wonderplugin-dialog-cancel' value='Cancel' />"+"</div>"+"</div>"+"</div>";var $videoDialog=$(dialogCode);$("body").append($videoDialog);$(".wonderplugin-dialog").css({"margin-top":String($(document).scrollTop()+60)+"px"});$(".wonderplugin-dialog-bg").css({height:$(document).height()+"px"});if(!videoData)videoData={type:dialogType};$("#wonderplugin-dialog-title").html("Add "+dialogTitle[dialogType]);var videoDataReturn=function(){$videoDialog.remove();slideDialog(dialogType,
function(items){if(items&&items.length>0){if(typeof dataIndex!=="undefined"&&dataIndex>=0)wonderplugin_slider_config.slides.splice(dataIndex,1);items.map(function(data){var result={type:dialogType,image:data.image,thumbnail:data.thumbnail?data.thumbnail:data.image,video:data.video,mp4:data.mp4,webm:data.webm,title:data.title,description:data.description,altusetitle:data.altusetitle,alt:data.alt,usetexteffect:data.usetexteffect,texteffect:data.texteffect,button:data.button,buttoncss:data.buttoncss,
buttonlink:data.buttonlink,buttonlinktarget:data.buttonlinktarget,weblink:data.weblink,weblinklightbox:data.weblinklightbox,linktarget:data.linktarget,lightbox:data.lightbox,lightboxsize:data.lightboxsize,lightboxwidth:data.lightboxwidth,lightboxheight:data.lightboxheight,langs:data.langs};if(typeof dataIndex!=="undefined"&&dataIndex>=0)wonderplugin_slider_config.slides.splice(dataIndex,0,result);else addMediaToList(result)});updateMediaTable()}},videoData,dataIndex)};$("#wonderplugin-dialog-ok").click(function(){var href=
$.trim($("#wonderplugin-dialog-video").val());if(href.length<=0){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please enter a "+dialogTitle[dialogType]+" URL</p>");return}var protocol="https:";if(dialogType==2){var youtubeId="";var regExp=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;var match=href.match(regExp);if(match&&match[7]&&match[7].length==11)youtubeId=match[7];else{regExp=/(?:www\.)?youtube\.com\/shorts\/([\w-]+)/;match=href.match(regExp);
if(match&&match[1]&&match[1].length==11)youtubeId=match[1]}if(!youtubeId){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please enter a valid Youtube URL</p>");return}var result=protocol+"//www.youtube.com/embed/"+youtubeId;var params=getURLParams(href);var first=true;for(var key in params){if(first){result+="?";first=false}else result+="&";result+=key+"="+params[key]}videoData.video=result;videoData.image=protocol+"//img.youtube.com/vi/"+youtubeId+"/0.jpg";videoData.thumbnail=protocol+
"//img.youtube.com/vi/"+youtubeId+"/0.jpg";videoDataReturn()}else if(dialogType==3){var vimeoId="";var regExp=/^.*(vimeo\.com\/)((video\/)|(channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/;var match=href.match(regExp);if(match&&match[6])vimeoId=match[6];else{$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please enter a valid Vimeo URL</p>");return}var result=protocol+"//player.vimeo.com/video/"+vimeoId;var params=getURLParams(href);var first=true;for(var key in params){if(first){result+=
"?";first=false}else result+="&";result+=key+"="+params[key]}videoData.video=result;$("#wonderplugin-slider-video-dialog-loading").css({display:"block"});$.ajax({url:protocol+"//vimeo.com/api/v2/video/"+vimeoId+".json",dataType:"json",timeout:3E3,data:{format:"json"},success:function(data){videoData.title=data[0].title;videoData.description=data[0].description;videoData.image=data[0].thumbnail_large;videoData.thumbnail=data[0].thumbnail_medium;videoDataReturn()},error:function(){videoDataReturn()}})}});
$("#wonderplugin-dialog-cancel").click(function(){$videoDialog.remove();if(invokeFromSlideDialog)videoDataReturn()})};var updateMediaTable=function(){var mediaType=["Image","Video","YouTube","Vimeo","","","WordPress Posts","WooCommerce / Custom Posts"];$("#wonderplugin-slider-media-table").empty();for(var i=0;i<wonderplugin_slider_config.slides.length;i++){var thumbnail="";if(wonderplugin_slider_config.slides[i].type==6)thumbnail=$("#wonderplugin-slider-pluginfolder").text()+"images/wordpressposts.png";
else if(wonderplugin_slider_config.slides[i].type==7)thumbnail=$("#wonderplugin-slider-pluginfolder").text()+"images/wordpresscustompost.png";else thumbnail=wonderplugin_slider_config.slides[i].thumbnail;$("#wonderplugin-slider-media-table").append("<li>"+"<div class='wonderplugin-slider-media-table-id'>"+(i+1)+"</div>"+"<div class='wonderplugin-slider-media-table-img'>"+"<img class='wonderplugin-slider-media-table-image' data-order='"+i+"' src='"+thumbnail+"' />"+"</div>"+"<div class='wonderplugin-slider-media-table-type'>"+
mediaType[wonderplugin_slider_config.slides[i].type]+"</div>"+"<div class='wonderplugin-slider-media-table-buttons-edit'>"+"<a class='wonderplugin-slider-media-table-button wonderplugin-slider-media-table-edit'>Edit</a>&nbsp;|&nbsp;"+"<a class='wonderplugin-slider-media-table-button wonderplugin-slider-media-table-delete'>Delete</a>"+"</div>"+"<div class='wonderplugin-slider-media-table-buttons-move'>"+"<a class='wonderplugin-slider-media-table-button wonderplugin-slider-media-table-moveup'>Move Up</a>&nbsp;|&nbsp;"+
"<a class='wonderplugin-slider-media-table-button wonderplugin-slider-media-table-movedown'>Move Down</a>"+"</div>"+"<div style='clear:both;'></div>"+"</li>")}$(".wonderplugin-slider-media-table-image").wpdraggable(wonderPluginMediaTableMove);$(".wonderplugin-slider-media-table-help").css({display:wonderplugin_slider_config.slides.length>0?"none":"block"})};$("#wonderplugin-add-image").click(function(){slideDialog(0,function(items){items.map(function(data){addMediaToList({type:0,image:data.image,
thumbnail:data.thumbnail?data.thumbnail:data.image,video:data.video,mp4:data.mp4,webm:data.webm,title:data.title,description:data.description,altusetitle:data.altusetitle,alt:data.alt,usetexteffect:data.usetexteffect,texteffect:data.texteffect,button:data.button,buttoncss:data.buttoncss,buttonlink:data.buttonlink,buttonlinktarget:data.buttonlinktarget,weblink:data.weblink,weblinklightbox:data.weblinklightbox,linktarget:data.linktarget,lightbox:data.lightbox,lightboxsize:data.lightboxsize,lightboxwidth:data.lightboxwidth,
lightboxheight:data.lightboxheight,langs:data.langs})});updateMediaTable()})});$("#wonderplugin-add-video").click(function(){slideDialog(1,function(items){items.map(function(data){addMediaToList({type:1,image:data.image,thumbnail:data.thumbnail?data.thumbnail:data.image,video:data.video,mp4:data.mp4,webm:data.webm,title:data.title,description:data.description,altusetitle:data.altusetitle,alt:data.alt,usetexteffect:data.usetexteffect,texteffect:data.texteffect,button:data.button,buttoncss:data.buttoncss,
buttonlink:data.buttonlink,buttonlinktarget:data.buttonlinktarget,weblink:data.weblink,weblinklightbox:data.weblinklightbox,linktarget:data.linktarget,lightbox:data.lightbox,lightboxsize:data.lightboxsize,lightboxwidth:data.lightboxwidth,lightboxheight:data.lightboxheight,langs:data.langs})});updateMediaTable()})});$("#wonderplugin-add-youtube").click(function(){onlineVideoDialog(2,function(items){items.map(function(data){addMediaToList({type:2,image:data.image,thumbnail:data.thumbnail?data.thumbnail:
data.image,video:data.video,mp4:data.mp4,webm:data.webm,title:data.title,description:data.description,altusetitle:data.altusetitle,alt:data.alt,usetexteffect:data.usetexteffect,texteffect:data.texteffect,button:data.button,buttoncss:data.buttoncss,buttonlink:data.buttonlink,buttonlinktarget:data.buttonlinktarget,weblink:data.weblink,weblinklightbox:data.weblinklightbox,linktarget:data.linktarget,lightbox:data.lightbox,lightboxsize:data.lightboxsize,lightboxwidth:data.lightboxwidth,lightboxheight:data.lightboxheight,
langs:data.langs})});updateMediaTable()})});$("#wonderplugin-add-vimeo").click(function(){onlineVideoDialog(3,function(items){items.map(function(data){addMediaToList({type:3,image:data.image,thumbnail:data.thumbnail?data.thumbnail:data.image,video:data.video,mp4:data.mp4,webm:data.webm,title:data.title,description:data.description,altusetitle:data.altusetitle,alt:data.alt,usetexteffect:data.usetexteffect,texteffect:data.texteffect,button:data.button,buttoncss:data.buttoncss,buttonlink:data.buttonlink,
buttonlinktarget:data.buttonlinktarget,weblink:data.weblink,weblinklightbox:data.weblinklightbox,linktarget:data.linktarget,lightbox:data.lightbox,lightboxsize:data.lightboxsize,lightboxwidth:data.lightboxwidth,lightboxheight:data.lightboxheight,langs:data.langs})});updateMediaTable()})});var addPostsDialog=function(dialogType,onSuccess,data,dataIndex){var dialogCode="<div class='wonderplugin-dialog-container'>"+"<div class='wonderplugin-dialog-bg'></div>"+"<div class='wonderplugin-dialog'>"+"<h3 id='wonderplugin-dialog-title'>Add Posts</h3>"+
"<div class='error' id='wonderplugin-dialog-error' style='display:none;'></div>"+"<table class='wonderplugin-dialog-form'>"+"<tr>"+"<th>Select Posts</th><td><select name='wonderplugin-dialog-postcategory' id='wonderplugin-dialog-postcategory'>";var catlist={};try{catlist=JSON.parse($("#wonderplugin-slider-catlist").text())}catch(err){}dialogCode+="<option value='-1'>Recent Posts</option>";dialogCode+="<option value='-2'>All Categories</option>";for(var key in catlist)dialogCode+="<option value='"+
catlist[key].ID+"'>Category: "+catlist[key].cat_name+"</option>";dialogCode+="</select>";dialogCode+="</select>"+"<label style='margin-left:18px;'>Order by: <select name='wonderplugin-dialog-postorderby' id='wonderplugin-dialog-postorderby'></label>"+"<option value='date'>Date</option>"+"<option value='rand'>Random Order</option>"+"<option value='none'>No order</option>"+"<option value='ID'>ID</option>"+"<option value='author'>Author</option>"+"<option value='title'>Title</option>"+"<option value='modified'>Modified Date</option>"+
"<option value='comment_count'>Number of Comments</option>"+"</select>";dialogCode+="</td></tr>";dialogCode+="<tr><th>Posts Tags</th><td><label><input name='wonderplugin-dialog-selectpostbytags' type='checkbox' id='wonderplugin-dialog-selectpostbytags' /> Select posts by tags: <input name='wonderplugin-dialog-posttags' id='wonderplugin-dialog-posttags' type='text' class='medium-text' /></label>  <a href='https://www.wonderplugin.com/wordpress-carousel-plugin/wordpress-posts-carousel-by-tags/' target='_blank'>Tutorial: How to get posts by tags</a></td></tr>";
dialogCode+="</table>";dialogCode+='<ul class="wonderplugin-dialog-tab-buttons" data-panelsid="wonderplugin-dialog-tab-panels-content">'+'<li class="wonderplugin-dialog-tab-button wonderplugin-dialog-tab-button-selected">Text and Image</li>'+'<li class="wonderplugin-dialog-tab-button">Order and Range</li>'+"</ul>";dialogCode+='<ul class="wonderplugin-dialog-tab-panels" id="wonderplugin-dialog-tab-panels-content">'+'<li class="wonderplugin-dialog-tab-panel wonderplugin-dialog-tab-panel-selected">';
dialogCode+="<table class='wonderplugin-dialog-form'>";dialogCode+="<tr><th>Title</th><td><input name='wonderplugin-dialog-posttitlefield' id='wonderplugin-dialog-posttitlefield' type='text' value='%post_title%' class='large-text' /><br><label><input name='wonderplugin-dialog-titlelink' type='checkbox' id='wonderplugin-dialog-titlelink' value='' /> Link title to the post page</label></td></tr>";dialogCode+="<tr><th>Description</th><td><textarea name='wonderplugin-dialog-postdescriptionfield' id='wonderplugin-dialog-postdescriptionfield' class='large-text'>%post_excerpt%</textarea><br><label>Maximum Excerpt Word Length: <input name='wonderplugin-dialog-excerptlength' id='wonderplugin-dialog-excerptlength' type='number' value='25' class='small-text' /></label></td></tr>";
dialogCode+="<tr>"+"<th>Button text</th>"+"<td><div style='float:left;'><input name='wonderplugin-dialog-image-button' type='text' id='wonderplugin-dialog-image-button' value='' class='regular-text' style='width:240px;'/> CSS:&nbsp;&nbsp;&nbsp;&nbsp;</div>"+"<div class='select-editable'><select onchange='this.nextElementSibling.value=this.value'>"+"<option value=''></option>"+"<option value='as-btn-blue-small'>as-btn-blue-small</option>"+"<option value='as-btn-blue-medium'>as-btn-blue-medium</option>"+
"<option value='as-btn-blue-large'>as-btn-blue-large</option>"+"<option value='as-btn-blueborder-small'>as-btn-blueborder-small</option>"+"<option value='as-btn-blueborder-medium'>as-btn-blueborder-medium</option>"+"<option value='as-btn-blueborder-large'>as-btn-blueborder-large</option>"+"<option value='as-btn-orange-small'>as-btn-orange-small</option>"+"<option value='as-btn-orange-medium'>as-btn-orange-medium</option>"+"<option value='as-btn-orange-large'>as-btn-orange-large</option>"+"<option value='as-btn-orangeborder-small'>as-btn-orangeborder-small</option>"+
"<option value='as-btn-orangeborder-medium'>as-btn-orangeborder-medium</option>"+"<option value='as-btn-orangeborder-large'>as-btn-orangeborder-large</option>"+"<option value='as-btn-navy-small'>as-btn-navy-small</option>"+"<option value='as-btn-navy-medium'>as-btn-navy-medium</option>"+"<option value='as-btn-navy-large'>as-btn-navy-large</option>"+"<option value='as-btn-navyborder-small'>as-btn-navyborder-small</option>"+"<option value='as-btn-navyborder-medium'>as-btn-navyborder-medium</option>"+
"<option value='as-btn-navyborder-large'>as-btn-navyborder-large</option>"+"<option value='as-btn-white-small'>as-btn-white-small</option>"+"<option value='as-btn-white-medium'>as-btn-white-medium</option>"+"<option value='as-btn-white-large'>as-btn-white-large</option>"+"<option value='as-btn-whiteborder-small'>as-btn-whiteborder-small</option>"+"<option value='as-btn-whiteborder-medium'>as-btn-whiteborder-medium</option>"+"<option value='as-btn-whiteborder-large'>as-btn-whiteborder-large</option>"+
"</select><input type='text' name='wonderplugin-dialog-image-buttoncss' id='wonderplugin-dialog-image-buttoncss' value='as-btn-blue-medium' /></div>"+"</td>"+"</tr>";dialogCode+="<tr><th>Thumbnail Image Size</th><td><select name='wonderplugin-dialog-featuredimagesize' id='wonderplugin-dialog-featuredimagesize'><option value='thumbnail'>Thumbnail</option><option value='medium'>Medium</option><option value='large'>Large</option><option value='full'>Full</option></select></td>";dialogCode+="<tr><th>When clicking on the slider</th><td><label><input type='radio' name='wonderplugin-dialog-postlightbox' value='1' >Open the featured image in lightbox</label><label style='margin-left:24px;'><input name='wonderplugin-dialog-postlightbox-size' type='checkbox' id='wonderplugin-dialog-postlightbox-size' value='' /> Set Lightbox size </label><input name='wonderplugin-dialog-postlightbox-width' type='text' id='wonderplugin-dialog-postlightbox-width' value='960' class='small-text' /> / <input name='wonderplugin-dialog-postlightbox-height' type='text' id='wonderplugin-dialog-postlightbox-height' value='540' class='small-text' /><br>";
dialogCode+="<label><input type='radio' name='wonderplugin-dialog-postlightbox' value='0' checked>Open the post page</label></td>";dialogCode+="<tr><th>Link Target</th><td><div class='select-editable'><select onchange='this.nextElementSibling.value=this.value'><option value=''></option><option value='_blank'>_blank</option><option value='_self'>_self</option><option value='_parent'>_parent</option><option value='_top'>_top</option></select><input type='text' name='wonderplugin-dialog-postlinktarget' id='wonderplugin-dialog-postlinktarget' value='' /></div></td></tr>";
dialogCode+="</table>";dialogCode+="<ul style='margin-left:24px;list-style-position:outside;list-style-type:square;text-align:left;'><li>The featured image of a post will be used as the image of the slider item. For how to define featured images for posts, please view <a href='https://codex.wordpress.org/Post_Thumbnails' target='_blank'>WordPress Featured Images</a>.</li>"+"<li>The title of a post will be used to replace the macro variable <strong>%post_title%</strong>.</li>"+"<li>The excerpt of a post will be used to replace the macro variable <strong>%post_excerpt%</strong>. For how to add excerpts for posts, please view <a href='https://codex.wordpress.org/Excerpt' target='_blank'>WordPress Excerpts</a>.</li></ul>";
dialogCode+="</li>";dialogCode+='<li class="wonderplugin-dialog-tab-panel">';dialogCode+="<table class='wonderplugin-dialog-form'>";dialogCode+="<tr><th>Maximum Posts</th><td><input name='wonderplugin-dialog-postnumber' id='wonderplugin-dialog-postnumber' type='number' value='10' class='small-text' /><select name='wonderplugin-dialog-postorder' id='wonderplugin-dialog-postorder'><option value='DESC'>Descending</option><option value='ASC'>Ascending</option></select></td></tr>";dialogCode+="<tr><th>Date Range</th><td><label><input name='wonderplugin-dialog-postdaterange' type='checkbox' id='wonderplugin-dialog-postdaterange' /> Only get posts from the past <input name='wonderplugin-dialog-postdaterangeafter' id='wonderplugin-dialog-postdaterangeafter' type='number' value='30' class='small-text' /> days</label></td></tr>";
dialogCode+="</table>";dialogCode+="</li>";dialogCode+="</ul>";dialogCode+="<div class='wonderplugin-dialog-buttons'>"+"<input type='button' class='button button-primary' id='wonderplugin-dialog-ok' value='OK' />"+"<input type='button' class='button' id='wonderplugin-dialog-cancel' value='Cancel' />"+"</div>"+"</div>"+"</div>";var $postsDialog=$(dialogCode);$("body").append($postsDialog);$(".wonderplugin-dialog").css({"margin-top":String($(document).scrollTop()+60)+"px"});$(".wonderplugin-dialog-bg").css({height:$(document).height()+
"px"});if(data){$("#wonderplugin-dialog-postcategory").val(data.postcategory);$("#wonderplugin-dialog-posttitlefield").val(data.posttitlefield);$("#wonderplugin-dialog-postdescriptionfield").val(data.postdescriptionfield);$("#wonderplugin-dialog-postorderby").val(data.postorderby);$("#wonderplugin-dialog-postorder").val(data.postorder);$("#wonderplugin-dialog-selectpostbytags").prop("checked",data.selectpostbytags);$("#wonderplugin-dialog-posttags").val(data.posttags);$("#wonderplugin-dialog-postdaterange").prop("checked",
data.postdaterange);$("#wonderplugin-dialog-postdaterangeafter").val(data.postdaterangeafter);$("#wonderplugin-dialog-postnumber").val(data.postnumber);$("#wonderplugin-dialog-featuredimagesize").val(data.featuredimagesize);$("#wonderplugin-dialog-excerptlength").val(data.excerptlength);$("#wonderplugin-dialog-postlinktarget").val(data.postlinktarget);$("#wonderplugin-dialog-image-button").val(data.button);$("#wonderplugin-dialog-image-buttoncss").val(data.buttoncss);if("postlightbox"in data){$("input[name=wonderplugin-dialog-postlightbox][value="+
(data.postlightbox?1:0)+"]").prop("checked",true);$("#wonderplugin-dialog-postlightbox-size").prop("checked",data.postlightboxsize);$("#wonderplugin-dialog-postlightbox-width").val(data.postlightboxwidth);$("#wonderplugin-dialog-postlightbox-height").val(data.postlightboxheight);$("#wonderplugin-dialog-titlelink").prop("checked",data.posttitlelink)}}$("#wonderplugin-dialog-ok").click(function(){var item={type:dialogType,postcategory:$("#wonderplugin-dialog-postcategory").val(),posttitlefield:$("#wonderplugin-dialog-posttitlefield").val(),
postdescriptionfield:$("#wonderplugin-dialog-postdescriptionfield").val(),postorderby:$("#wonderplugin-dialog-postorderby").val(),postorder:$("#wonderplugin-dialog-postorder").val(),selectpostbytags:$("#wonderplugin-dialog-selectpostbytags").is(":checked"),posttags:$("#wonderplugin-dialog-posttags").val(),postdaterange:$("#wonderplugin-dialog-postdaterange").is(":checked"),postdaterangeafter:$("#wonderplugin-dialog-postdaterangeafter").val(),postnumber:$("#wonderplugin-dialog-postnumber").val(),featuredimagesize:$("#wonderplugin-dialog-featuredimagesize").val(),
excerptlength:$("#wonderplugin-dialog-excerptlength").val(),postlinktarget:$("#wonderplugin-dialog-postlinktarget").val(),button:$("#wonderplugin-dialog-image-button").val(),buttoncss:$("#wonderplugin-dialog-image-buttoncss").val(),postlightbox:$("input[name=wonderplugin-dialog-postlightbox]:checked").val()==1?true:false,postlightboxsize:$("#wonderplugin-dialog-postlightbox-size").is(":checked"),postlightboxwidth:parseInt($.trim($("#wonderplugin-dialog-postlightbox-width").val())),postlightboxheight:parseInt($.trim($("#wonderplugin-dialog-postlightbox-height").val())),
posttitlelink:$("#wonderplugin-dialog-titlelink").is(":checked")};$postsDialog.remove();onSuccess(item)});$("#wonderplugin-dialog-cancel").click(function(){$postsDialog.remove()})};$("#wonderplugin-add-posts").click(function(){addPostsDialog(6,function(data){addMediaToList(data);updateMediaTable()})});var addCustomPostDialog=function(dialogType,onSuccess,data,dataIndex){var custompostlist={};try{custompostlist=JSON.parse($("#wonderplugin-slider-custompostlist").text())}catch(err){}var dialogCode=
"<div class='wonderplugin-dialog-container'>"+"<div class='wonderplugin-dialog-bg'></div>"+"<div class='wonderplugin-dialog wonderplugin-dialog-large'>"+"<h3 id='wonderplugin-dialog-title'>Add WooCommerce / Custom Posts</h3>"+"<div class='error' id='wonderplugin-dialog-error' style='display:none;'></div>"+"<table class='wonderplugin-dialog-form longhead'>";dialogCode+="<tr><th>Select Custom Post Type</th><td><select name='wonderplugin-dialog-customposttype' id='wonderplugin-dialog-customposttype'>";
dialogCode+="<option value='-1'>Select A Custom Post Type</option>";for(var i=0;i<custompostlist.length;i++)dialogCode+="<option value='"+custompostlist[i].name+"'>Custom Post Type: "+custompostlist[i].name+"</option>";dialogCode+="</select></td></tr>";dialogCode+="<tr><th>Query by Taxonomy and Terms</th><td><div id='wonderplugin-dialog-taxonomy-container' data-taxonomytotal=1><div class='wonderplugin-dialog-taxonomy-row wonderplugin-dialog-taxonomy-row-first' ><select class='wonderplugin-dialog-taxonomy'>";
dialogCode+="<option value='-1'>Select A Taxonomy</option>";dialogCode+="</select>";dialogCode+="<select class='wonderplugin-dialog-term'>";dialogCode+="<option value='-1'>Select A Term</option>";dialogCode+="</select><span class='dashicons dashicons-plus-alt wonderplugin-dialog-addtaxonomy'></span></div></div></td></tr>";dialogCode+="<tr class='wonderplugin-dialog-taxonomyrelation-container' style='display:none;'><th>Multiple taxonomy logical relationship</th><td><select name='wonderplugin-dialog-taxonomyrelation' id='wonderplugin-dialog-taxonomyrelation'><option value='OR'>OR</option><option value='AND'>AND</option></select></td></tr>";
dialogCode+="<tr><th></th><td><a href='https://www.wonderplugin.com/wordpress-slider-plugin/how-to-create-a-woocommerce-product-slider/' target='_blank'>Tutorial: How to create a WooCommerce products slider</a></td>";dialogCode+="</table>";dialogCode+='<ul class="wonderplugin-dialog-tab-buttons" data-panelsid="wonderplugin-dialog-tab-panels-content">'+'<li class="wonderplugin-dialog-tab-button wonderplugin-dialog-tab-button-selected">Text and Image</li>'+'<li class="wonderplugin-dialog-tab-button">Order and Range</li>'+
'<li class="wonderplugin-dialog-tab-button">WooCommerce</li>'+"</ul>";dialogCode+='<ul class="wonderplugin-dialog-tab-panels" id="wonderplugin-dialog-tab-panels-content">'+'<li class="wonderplugin-dialog-tab-panel wonderplugin-dialog-tab-panel-selected">';dialogCode+="<table class='wonderplugin-dialog-form'>";dialogCode+="<tr><th>Field for Title</th><td><input style='vertical-align:middle;' name='wonderplugin-dialog-titlefield' id='wonderplugin-dialog-titlefield' type='text' class='large-text' value='%post_title%' /></td></tr>";
dialogCode+="<tr><th>Field for Description</th><td><textarea name='wonderplugin-dialog-descriptionfield' id='wonderplugin-dialog-descriptionfield' type='text' rows='4' class='large-text'>%post_content%</textarea><p><a href='https://www.wonderplugin.com/wordpress-slider-plugin/how-to-create-a-woocommerce-product-slider/#step4' target='_blank'>Tutorial: How to add product price, star ratings, total sales and Add to Cart button to the slider</a></p></td></tr>";dialogCode+="<tr><th>Maximum Post Content/Excerpt Word Length</th><td><input name='wonderplugin-dialog-textlength' id='wonderplugin-dialog-textlength' type='number' value='25' class='small-text' />";
dialogCode+="<label style='margin-left:24px;'><input name='wonderplugin-dialog-titlelink' type='checkbox' id='wonderplugin-dialog-titlelink' value='' /> Link title to the post page</label></td></tr>";dialogCode+="<tr><th>Field for Image</th><td><input style='vertical-align:middle;' name='wonderplugin-dialog-imagefield' id='wonderplugin-dialog-imagefield' type='text' class='medium-text' value='%featured_image%' /><span style='margin-left:18px;'>Size: </span><select name='wonderplugin-dialog-customfeaturedimagesize' id='wonderplugin-dialog-customfeaturedimagesize'><option value='full'>Full</option><option value='large'>Large</option><option value='medium'>Medium</option><option value='thumbnail'>Thumbnail</option></select>";
dialogCode+="<tr><th>Image options</th><td><label><input name='wonderplugin-dialog-imageaction' type='checkbox' id='wonderplugin-dialog-imageaction' checked /> Open the post page or image lightbox on clicking the image</label>";dialogCode+="<div style='margin-left:20px;margin-top:8px;'><label><input type='radio' name='wonderplugin-dialog-imageactionlightbox' value='1' >Open the image in lightbox</label><br>";dialogCode+="<label><input type='radio' name='wonderplugin-dialog-imageactionlightbox' value='0' checked>Click to open the post page</label><label style='margin-left:24px;'><input name='wonderplugin-dialog-openpostinlightbox' type='checkbox' id='wonderplugin-dialog-openpostinlightbox' value='' /> Open in lightbox</label></div></td>";
dialogCode+="<tr><th></th><td><label><input name='wonderplugin-dialog-postlightboxsize' type='checkbox' id='wonderplugin-dialog-postlightboxsize' value='' /> Set Lightbox size </label><input name='wonderplugin-dialog-postlightboxwidth' type='number' id='wonderplugin-dialog-postlightboxwidth' value='960' class='small-text' /> / <input name='wonderplugin-dialog-postlightboxheight' type='number' id='wonderplugin-dialog-postlightboxheight' value='540' class='small-text' /></td></tr>";dialogCode+="<tr><th>Link Target</th><td><div class='select-editable'><select onchange='this.nextElementSibling.value=this.value'><option value=''></option><option value='_blank'>_blank</option><option value='_self'>_self</option><option value='_parent'>_parent</option><option value='_top'>_top</option></select><input type='text' name='wonderplugin-dialog-postlinktarget' id='wonderplugin-dialog-postlinktarget' value='' /></div></td></tr>";
dialogCode+="</table>";dialogCode+="</li>";dialogCode+='<li class="wonderplugin-dialog-tab-panel">';dialogCode+="<table class='wonderplugin-dialog-form'>";dialogCode+="<tr><th>Maximum Posts</th><td><input style='vertical-align:middle;' name='wonderplugin-dialog-postnumber' id='wonderplugin-dialog-postnumber' type='number' value='10' class='small-text' /> Sort by: <select name='wonderplugin-dialog-postorderby' id='wonderplugin-dialog-postorderby'><option value='date'>Date</option><option value='title'>Title</option></select><select name='wonderplugin-dialog-postorder' id='wonderplugin-dialog-postorder'><option value='DESC'>Descending</option><option value='ASC'>Ascending</option></select></td></tr>";
dialogCode+="<tr><th>Date Range</th><td><label><input name='wonderplugin-dialog-postdaterange' type='checkbox' id='wonderplugin-dialog-postdaterange' /> Only get posts from the past <input name='wonderplugin-dialog-postdaterangeafter' id='wonderplugin-dialog-postdaterangeafter' type='number' value='30' class='small-text' /> days</label></td></tr>";dialogCode+="</table>";dialogCode+="</li>";dialogCode+='<li class="wonderplugin-dialog-tab-panel">';dialogCode+="<table class='wonderplugin-dialog-form'>";
dialogCode+="<tr><th>Query by WooCommerce Meta</th><td>";dialogCode+="<p><label><input name='wonderplugin-dialog-metaonsale' type='checkbox' id='wonderplugin-dialog-metaonsale' /> Select products on sale</label></p>";dialogCode+="<p><label><input name='wonderplugin-dialog-metatotalsales' type='checkbox' id='wonderplugin-dialog-metatotalsales' /> Select best selling products</label></p>";dialogCode+="<p><label><input name='wonderplugin-dialog-metafeatured' type='checkbox' id='wonderplugin-dialog-metafeatured' /> Featured products for WooCommerce Version 1 and 2. For WooCommerce Version 3, do NOT check this option, please view the following tutorial instead:</label></p>";
dialogCode+="<p><a href='https://www.wonderplugin.com/wordpress-slider-plugin/how-to-create-a-woocommerce-product-slider/#step6' target='_blank'>Tutorial: How to create a featured products slider for WooCommerce 3 and above</a></p>";dialogCode+="</td></tr>";dialogCode+="<tr class='wonderplugin-dialog-metarelation-container' style='display:none;'><th>Meta Keys Logical Relationship</th><td><select name='wonderplugin-dialog-metarelation' id='wonderplugin-dialog-metarelation'><option value='OR'>OR</option><option value='AND'>AND</option></select></td></tr>";
dialogCode+="</table>";dialogCode+="</li>";dialogCode+="</ul>";dialogCode+="<div class='wonderplugin-dialog-buttons'>"+"<input type='button' class='button button-primary' id='wonderplugin-dialog-ok' value='OK' />"+"<input type='button' class='button' id='wonderplugin-dialog-cancel' value='Cancel' />"+"</div>"+"</div>"+"</div>";var $postsDialog=$(dialogCode);$("body").append($postsDialog);$(".wonderplugin-dialog").css({"margin-top":String($(document).scrollTop()+60)+"px"});$(".wonderplugin-dialog-bg").css({height:$(document).height()+
"px"});var onCustomPostTypeChange=function(customposttype){$(".wonderplugin-dialog-taxonomy").empty().append('<option value="-1">Select A Taxonomy</option>').val("-1");$(".wonderplugin-dialog-term").empty().append('<option value="-1">Select A Term</option>').val("-1");if(customposttype!="-1")for(var i=0;i<custompostlist.length;i++)if(customposttype==custompostlist[i].name){if(custompostlist[i].taxonomies)for(var j=0;j<custompostlist[i].taxonomies.length;j++)$(".wonderplugin-dialog-taxonomy").append('<option value="'+
custompostlist[i].taxonomies[j].name+'">Taxonomy: '+custompostlist[i].taxonomies[j].name+"</option>");break}};var onTaxonomyChange=function(taxonomyid,customposttype,taxonomy){var termElem=$(".wonderplugin-dialog-taxonomy-row").eq(taxonomyid).find(".wonderplugin-dialog-term");if(!termElem)return;termElem.empty().append('<option value="-1">Select A Term</option>').val("-1");if(customposttype!="-1"&&taxonomy!="-1")for(var i=0;i<custompostlist.length;i++)if(customposttype==custompostlist[i].name){if(custompostlist[i].taxonomies)for(var j=
0;j<custompostlist[i].taxonomies.length;j++)if(taxonomy==custompostlist[i].taxonomies[j].name){if(custompostlist[i].taxonomies[j].terms)for(var k=0;k<custompostlist[i].taxonomies[j].terms.length;k++)termElem.append('<option value="'+custompostlist[i].taxonomies[j].terms[k].slug+'">Term: '+custompostlist[i].taxonomies[j].terms[k].slug+"</option>");break}break}};$("#wonderplugin-dialog-taxonomy-container").on("click",".wonderplugin-dialog-addtaxonomy",function(){var total=$("#wonderplugin-dialog-taxonomy-container").data("taxonomytotal");
var taxonomyCode=$("<div class='wonderplugin-dialog-taxonomy-row' ></div>");var taxonomySelect=$(".wonderplugin-dialog-taxonomy-row-first .wonderplugin-dialog-taxonomy").clone().val("-1");var termSelect=$(".wonderplugin-dialog-taxonomy-row-first .wonderplugin-dialog-term").clone().val("-1");var removeTaxonomy="<span class='dashicons dashicons-dismiss wonderplugin-dialog-removetaxonomy'></span>";taxonomyCode.append(taxonomySelect).append(termSelect).append(removeTaxonomy);$("#wonderplugin-dialog-taxonomy-container").append(taxonomyCode);
$("#wonderplugin-dialog-taxonomy-container").data("taxonomytotal",total+1);$(".wonderplugin-dialog-taxonomyrelation-container").css({"display":total>0?"table-row":"none"})});$("#wonderplugin-dialog-taxonomy-container").on("click",".wonderplugin-dialog-removetaxonomy",function(){$(this).closest(".wonderplugin-dialog-taxonomy-row").remove();var total=$("#wonderplugin-dialog-taxonomy-container").data("taxonomytotal");$("#wonderplugin-dialog-taxonomy-container").data("taxonomytotal",total-1);$(".wonderplugin-dialog-taxonomyrelation-container").css({"display":total>
2?"table-row":"none"})});$("#wonderplugin-dialog-customposttype").on("change",function(){onCustomPostTypeChange($(this).val())});$("#wonderplugin-dialog-taxonomy-container").on("change",".wonderplugin-dialog-taxonomy",function(){var taxonomyid=$(this).closest(".wonderplugin-dialog-taxonomy-row").index();onTaxonomyChange(taxonomyid,$("#wonderplugin-dialog-customposttype").val(),$(this).val())});$("#wonderplugin-dialog-metatotalsales,#wonderplugin-dialog-metafeatured").on("click",function(){if($("#wonderplugin-dialog-metatotalsales").is(":checked")&&
$("#wonderplugin-dialog-metafeatured").is(":checked"))$(".wonderplugin-dialog-metarelation-container").css({display:"table-row"});else $(".wonderplugin-dialog-metarelation-container").css({display:"none"})});if(data){$("#wonderplugin-dialog-customposttype").val(data.customposttype);var total=1;for(total=1;;total++)if("taxonomy"+total in data&&"term"+total in data){$("#wonderplugin-dialog-taxonomy-container").data("taxonomytotal",total+1);var taxonomyCode=$("<div class='wonderplugin-dialog-taxonomy-row' ></div>");
var taxonomySelect=$(".wonderplugin-dialog-taxonomy-row-first .wonderplugin-dialog-taxonomy").clone().val("-1");var termSelect=$(".wonderplugin-dialog-taxonomy-row-first .wonderplugin-dialog-term").clone().val("-1");var removeTaxonomy="<span class='dashicons dashicons-dismiss wonderplugin-dialog-removetaxonomy'></span>";taxonomyCode.append(taxonomySelect).append(termSelect).append(removeTaxonomy);$("#wonderplugin-dialog-taxonomy-container").append(taxonomyCode)}else break;$(".wonderplugin-dialog-taxonomyrelation-container").css({"display":total>
1?"table-row":"none"});if(data.customposttype!="-1"){onCustomPostTypeChange(data.customposttype);for(var i=0;i<total;i++){$(".wonderplugin-dialog-taxonomy-row").eq(i).find(".wonderplugin-dialog-taxonomy").val(data["taxonomy"+i]);onTaxonomyChange(i,data.customposttype,data["taxonomy"+i]);if(data["taxonomy"+i]!="-1")$(".wonderplugin-dialog-taxonomy-row").eq(i).find(".wonderplugin-dialog-term").val(data["term"+i])}}$("#wonderplugin-dialog-taxonomyrelation").val(data.taxonomyrelation);$("#wonderplugin-dialog-metaonsale").prop("checked",
data.metaonsale);$("#wonderplugin-dialog-metatotalsales").prop("checked",data.metatotalsales);$("#wonderplugin-dialog-metafeatured").prop("checked",data.metafeatured);$("#wonderplugin-dialog-metarelation").val(data.metarelation);if(data.metatotalsales&&data.metafeatured)$(".wonderplugin-dialog-metarelation-container").css({display:"table-row"});else $(".wonderplugin-dialog-metarelation-container").css({display:"none"});$("#wonderplugin-dialog-postnumber").val(data.postnumber);$("#wonderplugin-dialog-postorderby").val(data.postorderby);
$("#wonderplugin-dialog-postorder").val(data.postorder);$("#wonderplugin-dialog-postdaterange").prop("checked",data.postdaterange);$("#wonderplugin-dialog-postdaterangeafter").val(data.postdaterangeafter);$("#wonderplugin-dialog-titlefield").val(data.titlefield);$("#wonderplugin-dialog-descriptionfield").val(data.descriptionfield);$("#wonderplugin-dialog-textlength").val(data.textlength);$("#wonderplugin-dialog-titlelink").prop("checked",data.titlelink);$("#wonderplugin-dialog-imagefield").val(data.imagefield);
$("#wonderplugin-dialog-customfeaturedimagesize").val(data.customfeaturedimagesize);$("#wonderplugin-dialog-imageaction").prop("checked",data.imageaction);$("input[name=wonderplugin-dialog-imageactionlightbox][value="+(data.imageactionlightbox?1:0)+"]").prop("checked",true);$("#wonderplugin-dialog-openpostinlightbox").prop("checked",data.openpostinlightbox);$("#wonderplugin-dialog-postlightboxsize").prop("checked",data.postlightboxsize);$("#wonderplugin-dialog-postlightboxwidth").val(data.postlightboxwidth);
$("#wonderplugin-dialog-postlightboxheight").val(data.postlightboxheight);$("#wonderplugin-dialog-postlinktarget").val(data.postlinktarget)}$("#wonderplugin-dialog-ok").click(function(){if($("#wonderplugin-dialog-customposttype").val()=="-1"){$("#wonderplugin-dialog-error").css({display:"block"}).html("<p>Please select a custom post type</p>");return}var item={type:dialogType,customposttype:$("#wonderplugin-dialog-customposttype").val(),taxonomyrelation:$("#wonderplugin-dialog-taxonomyrelation").val(),
metaonsale:$("#wonderplugin-dialog-metaonsale").is(":checked"),metatotalsales:$("#wonderplugin-dialog-metatotalsales").is(":checked"),metafeatured:$("#wonderplugin-dialog-metafeatured").is(":checked"),metarelation:$("#wonderplugin-dialog-metarelation").val(),postnumber:$("#wonderplugin-dialog-postnumber").val(),postorderby:$("#wonderplugin-dialog-postorderby").val(),postorder:$("#wonderplugin-dialog-postorder").val(),postdaterange:$("#wonderplugin-dialog-postdaterange").is(":checked"),postdaterangeafter:$("#wonderplugin-dialog-postdaterangeafter").val(),
titlefield:$("#wonderplugin-dialog-titlefield").val(),descriptionfield:$("#wonderplugin-dialog-descriptionfield").val(),textlength:parseInt($.trim($("#wonderplugin-dialog-textlength").val())),titlelink:$("#wonderplugin-dialog-titlelink").is(":checked"),imagefield:$("#wonderplugin-dialog-imagefield").val(),customfeaturedimagesize:$("#wonderplugin-dialog-customfeaturedimagesize").val(),imageaction:$("#wonderplugin-dialog-imageaction").is(":checked"),imageactionlightbox:$("input[name=wonderplugin-dialog-imageactionlightbox]:checked").val()==
1?true:false,openpostinlightbox:$("#wonderplugin-dialog-openpostinlightbox").is(":checked"),postlightboxsize:$("#wonderplugin-dialog-postlightboxsize").is(":checked"),postlightboxwidth:parseInt($.trim($("#wonderplugin-dialog-postlightboxwidth").val())),postlightboxheight:parseInt($.trim($("#wonderplugin-dialog-postlightboxheight").val())),postlinktarget:$.trim($("#wonderplugin-dialog-postlinktarget").val())};for(var i=0;i<$(".wonderplugin-dialog-taxonomy-row").length;i++){item["taxonomy"+i]=$(".wonderplugin-dialog-taxonomy-row").eq(i).find(".wonderplugin-dialog-taxonomy").val();
item["term"+i]=$(".wonderplugin-dialog-taxonomy-row").eq(i).find(".wonderplugin-dialog-term").val()}$postsDialog.remove();onSuccess(item)});$("#wonderplugin-dialog-cancel").click(function(){$postsDialog.remove()})};$("#wonderplugin-add-custompost").click(function(){addCustomPostDialog(7,function(data){addMediaToList(data);updateMediaTable()})});$("#wonderplugin-globalsettings").click(function(){globalSettingsDialog()});var globalSettingsDialog=function(){var form='<table class="table-global-settings">';
form+="<tr>";form+='<td><label><input name="wonderplugin-globalsettings-altusetitle" type="checkbox" value="">Use Title as img alt text</label></td>';form+='<td><button class="button button-secondary wonderplugin-globalsettings-apply" data-option="altusetitle">Apply the Option</button></td>';form+="</tr>";form+="<tr>";form+='<td><label><input name="wonderplugin-globalsettings-lightbox" type="checkbox" value="">Open current image/video in Lightbox</label></td>';form+='<td><button class="button button-secondary wonderplugin-globalsettings-apply" data-option="lightbox">Apply the Option</button></td>';
form+="</tr>";form+="<tr>";form+='<td><label><input name="wonderplugin-globalsettings-lightboxsize" type="checkbox" value="">Set Lightbox size</label> <label><input name="wonderplugin-globalsettings-lightboxwidth" type="number" value="960" class="small-text"></label> / <label><input name="wonderplugin-globalsettings-lightboxheight" type="number" value="540" class="small-text"></label></td>';form+='<td><button class="button button-secondary wonderplugin-globalsettings-apply" data-option="lightboxsize">Apply the Option</button></td>';
form+="</tr>";form+="<tr>";form+="<td><label>Web link target <i>(for images only)</i>: </label>";form+='<div class="select-editable" style="display:inline-block;float:none;"><select onchange="this.nextElementSibling.value=this.value">';form+='<option value=""></option>';form+='<option value="_blank">_blank</option>';form+='<option value="_self">_self</option>';form+='<option value="_parent">_parent</option>';form+='<option value="_top">_top</option>';form+='</select><input name="wonderplugin-globalsettings-linktarget" type="text" value="" /></div>';
form+="</td>";form+='<td><button class="button button-secondary wonderplugin-globalsettings-apply" data-option="linktarget">Apply the Option</button></td>';form+="</tr>";form+="<tr>";form+='<td><label><input name="wonderplugin-globalsettings-weblinklightbox" type="checkbox" value="">Open web link in Lightbox <i>(for images only)</i></label></td>';form+='<td><button class="button button-secondary wonderplugin-globalsettings-apply" data-option="weblinklightbox">Apply the Option</button></td>';form+=
"</tr>";form+="<tr>";form+='<td colspan="2"><p style="text-align:center;"><i><b>Click the button "Apply the Option" to apply the selection of the option to all images/videos in the slider.</b></i></p></td>';form+="</tr>";form+="</table>";$(form).dialog({title:"Apply Options To All Items In The Slider",resizable:true,modal:true,width:720,buttons:{"Close":function(){$(this).dialog("destroy").remove()}}});$(document).off("click",".wonderplugin-globalsettings-apply").on("click",".wonderplugin-globalsettings-apply",
function(){var option=$(this).data("option");for(var i=0;i<wonderplugin_slider_config.slides.length;i++)if(option=="altusetitle")wonderplugin_slider_config.slides[i].altusetitle=$("input[name=wonderplugin-globalsettings-altusetitle]").is(":checked");else if(option=="lightbox")wonderplugin_slider_config.slides[i].lightbox=$("input[name=wonderplugin-globalsettings-lightbox]").is(":checked");else if(option=="lightboxsize"){wonderplugin_slider_config.slides[i].lightboxsize=$("input[name=wonderplugin-globalsettings-lightboxsize]").is(":checked");
wonderplugin_slider_config.slides[i].lightboxwidth=parseInt($.trim($("input[name=wonderplugin-globalsettings-lightboxwidth]").val()));wonderplugin_slider_config.slides[i].lightboxheight=parseInt($.trim($("input[name=wonderplugin-globalsettings-lightboxheight]").val()))}else if(option=="linktarget"){if(wonderplugin_slider_config.slides[i].type==0)wonderplugin_slider_config.slides[i].linktarget=$("input[name=wonderplugin-globalsettings-linktarget]").val()}else if(option=="weblinklightbox")if(wonderplugin_slider_config.slides[i].type==
0)wonderplugin_slider_config.slides[i].weblinklightbox=$("input[name=wonderplugin-globalsettings-weblinklightbox]").is(":checked");$("<div><h2>Option applied to all items in the slider. Make sure to save & publish the slider.</h2></div>").dialog({title:"",modal:true,open:function(e){var parentDialog=$(e.target).closest(".ui-dialog");parentDialog.css("background-color","#eee");parentDialog.find(".ui-dialog-titlebar, .ui-dialog-buttonpane").css("background-color","#eee")},buttons:{"Close":function(){$(this).dialog("close")}}})})};
$("#wonderplugin-reverselist").click(function(){wonderplugin_slider_config.slides.reverse();updateMediaTable()});$("#wonderplugin-updatevimeothumb").click(function(){$("<div></div>").html("Are you sure to update all Vimeo thumbnail images?").dialog({title:"Update Vimeo Thumbs",resizable:false,modal:true,buttons:{"Yes":function(){$(this).dialog("close");updateVimeoThumbs()},"No":function(){$(this).dialog("close")},"Cancel":function(){$(this).dialog("close")}}})});var updateVimeoThumbs=function(){var loading=
'<div><div class="wonderplugin-dialog-loading"></div><p style="text-align:center;font-size:1.2em;">Updating Vimeo thumbnail images ... </p></div>';var loadingDialog=$(loading).dialog({title:"Update Vimeo Thumbs",width:500,resizable:false,modal:true});var processCount=0;var finishProcess=function(){processCount++;if(processCount>=wonderplugin_slider_config.slides.length){loadingDialog.dialog("destroy").remove();updateMediaTable()}};for(var i=0;i<wonderplugin_slider_config.slides.length;i++)if(wonderplugin_slider_config.slides[i].type==
3&&wonderplugin_slider_config.slides[i].video){var regExp=/^.*(vimeo\.com\/)((video\/)|(channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/;var match=wonderplugin_slider_config.slides[i].video.match(regExp);if(match&&match[6])$.ajax({url:"https://vimeo.com/api/v2/video/"+match[6]+".json",dataType:"json",timeout:3E3,data:{format:"json"},indexValue:i,success:function(data){wonderplugin_slider_config.slides[this.indexValue].image=data[0].thumbnail_large;wonderplugin_slider_config.slides[this.indexValue].thumbnail=
data[0].thumbnail_medium},complete:function(){finishProcess()}});else finishProcess()}else finishProcess()};$("#wonderplugin-deleteall").click(function(){$("<div></div>").html("Are you sure to remove all items?").dialog({title:"Wonder Slider",resizable:false,modal:true,buttons:{"Yes":function(){$(this).dialog("close");wonderplugin_slider_config.slides.length=0;updateMediaTable()},"No":function(){$(this).dialog("close")},"Cancel":function(){$(this).dialog("close")}}})});$(document).on("click",".wonderplugin-slider-media-table-edit",
function(){var index=$(this).parent().parent().index();var mediaType=wonderplugin_slider_config.slides[index].type;if(mediaType==6)addPostsDialog(6,function(data){wonderplugin_slider_config.slides.splice(index,1);wonderplugin_slider_config.slides.splice(index,0,data);updateMediaTable()},wonderplugin_slider_config.slides[index],index);else if(mediaType==7)addCustomPostDialog(7,function(data){wonderplugin_slider_config.slides.splice(index,1);wonderplugin_slider_config.slides.splice(index,0,data);updateMediaTable()},
wonderplugin_slider_config.slides[index],index);else slideDialog(mediaType,function(items){if(items&&items.length>0){wonderplugin_slider_config.slides.splice(index,1);items.map(function(data){wonderplugin_slider_config.slides.splice(index,0,{type:mediaType,image:data.image,thumbnail:data.thumbnail?data.thumbnail:data.image,video:data.video,mp4:data.mp4,webm:data.webm,title:data.title,description:data.description,altusetitle:data.altusetitle,alt:data.alt,usetexteffect:data.usetexteffect,texteffect:data.texteffect,
button:data.button,buttoncss:data.buttoncss,buttonlink:data.buttonlink,buttonlinktarget:data.buttonlinktarget,weblink:data.weblink,weblinklightbox:data.weblinklightbox,linktarget:data.linktarget,lightbox:data.lightbox,lightboxsize:data.lightboxsize,lightboxwidth:data.lightboxwidth,lightboxheight:data.lightboxheight,langs:data.langs})});updateMediaTable()}},wonderplugin_slider_config.slides[index],index)});$(document).on("click",".wonderplugin-slider-media-table-delete",function(){var $tr=$(this).parent().parent();
var index=$tr.index();wonderplugin_slider_config.slides.splice(index,1);$tr.remove();$("#wonderplugin-slider-media-table").find("li").each(function(index){$(this).find(".wonderplugin-slider-media-table-id").text(index+1);$(this).find("img").data("order",index);$(this).find("img").css({top:0,left:0})})});var wonderPluginMediaTableMove=function(i,j){var len=wonderplugin_slider_config.slides.length;if(j<0)j=0;if(j>len-1)j=len-1;if(i==j){$("#wonderplugin-slider-media-table").find("li").eq(i).find("img").css({top:0,
left:0});return}var $tr=$("#wonderplugin-slider-media-table").find("li").eq(i);var data=wonderplugin_slider_config.slides[i];wonderplugin_slider_config.slides.splice(i,1);wonderplugin_slider_config.slides.splice(j,0,data);var $trj=$("#wonderplugin-slider-media-table").find("li").eq(j);$tr.remove();if(j>i)$trj.after($tr);else $trj.before($tr);$("#wonderplugin-slider-media-table").find("li").each(function(index){$(this).find(".wonderplugin-slider-media-table-id").text(index+1);$(this).find("img").data("order",
index);$(this).find("img").css({top:0,left:0})});$tr.find("img").wpdraggable(wonderPluginMediaTableMove)};$(document).on("click",".wonderplugin-slider-media-table-moveup",function(){var $tr=$(this).parent().parent();var index=$tr.index();var data=wonderplugin_slider_config.slides[index];wonderplugin_slider_config.slides.splice(index,1);if(index==0){wonderplugin_slider_config.slides.push(data);var $last=$tr.parent().find("li:last");$tr.remove();$last.after($tr)}else{wonderplugin_slider_config.slides.splice(index-
1,0,data);var $prev=$tr.prev();$tr.remove();$prev.before($tr)}$("#wonderplugin-slider-media-table").find("li").each(function(index){$(this).find(".wonderplugin-slider-media-table-id").text(index+1);$(this).find("img").data("order",index);$(this).find("img").css({top:0,left:0})});$tr.find("img").wpdraggable(wonderPluginMediaTableMove)});$(document).on("click",".wonderplugin-slider-media-table-movedown",function(){var $tr=$(this).parent().parent();var index=$tr.index();var len=wonderplugin_slider_config.slides.length;
var data=wonderplugin_slider_config.slides[index];wonderplugin_slider_config.slides.splice(index,1);if(index==len-1){wonderplugin_slider_config.slides.unshift(data);var $first=$tr.parent().find("li:first");$tr.remove();$first.before($tr)}else{wonderplugin_slider_config.slides.splice(index+1,0,data);var $next=$tr.next();$tr.remove();$next.after($tr)}$("#wonderplugin-slider-media-table").find("li").each(function(index){$(this).find(".wonderplugin-slider-media-table-id").text(index+1);$(this).find("img").data("order",
index);$(this).find("img").css({top:0,left:0})});$tr.find("img").wpdraggable(wonderPluginMediaTableMove)});var default_options={id:-1,newestfirst:false,name:"My Slider",width:840,height:360,slides:[],transition:"cssslide",skin:"classic",navshowbuttons:false,navshowplaypause:true,navshowarrow:true,showtext:true,textformat:"Bottom bar",paddingleft:0,paddingright:0,paddingtop:0,paddingbottom:60,titleusealt:false,fadeduration:1E3,crossfadeduration:1E3,fadeoutfadeinduration:2E3,slideduration:1E3,cssslideduration:1E3,
elasticduration:1E3,sliceduration:1500,blindsduration:1500,blocksduration:1500,shuffleduration:1500,tilesduration:2E3,kenburnsduration:5E3,flipduration:1500,flipwithzoomduration:2E3,threedduration:1500,threedhorizontalduration:1500,threedwithzoomduration:2500,threedhorizontalwithzoomduration:2200,threedflipduration:1500,threedflipwithzoomduration:2E3,threedtilesduration:2E3,threedfallback:"flip",threedhorizontalfallback:"flip",threedwithzoomfallback:"flipwithzoom",threedhorizontalwithzoomfallback:"flipwithzoom",
threedflipfallback:"flip",threedflipwithzoomfallback:"flipwithzoom",threedtilesfallback:"tiles",outputtext:false,titletag:"h1",descriptiontag:"h2",inityoutube:true,initvimeo:true,ga4account:"",googleanalyticsaccount:"",lightboxnogroup:false,lightboxresponsive:true,lightboxshownavigation:false,lightboxshowtitle:true,lightboxshowdescription:false,lightboxthumbwidth:90,lightboxthumbheight:60,lightboxthumbtopmargin:12,lightboxthumbbottommargin:4,lightboxbarheight:64,lightboxtitlebottomcss:"color:#333; font-size:14px; font-family:Armata,sans-serif,Arial; overflow:hidden; text-align:left;",
lightboxdescriptionbottomcss:"color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",lightboxadvancedoptions:"",lightboxfullscreenmode:false,lightboxcloseonoverlay:true,lightboxvideohidecontrols:false,lightboxtitlestyle:"bottom",lightboximagepercentage:75,lightboxdefaultvideovolume:1,lightboxoverlaybgcolor:"#000",lightboxoverlayopacity:0.9,lightboxbgcolor:"#fff",lightboxtitleprefix:"%NUM / %TOTAL",lightboxtitleinsidecss:"color:#fff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left;",
lightboxtitleoutsidecss:"color:#fff; font-size:18px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:center; margin: 8px;",lightboxdescriptioninsidecss:"color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",lightboxdescriptionoutsidecss:"color:#fff; font-size:14px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:center; margin:8px; padding: 0px;",lightboxautoslide:false,lightboxslideinterval:5E3,
lightboxshowtimer:true,lightboxtimerposition:"bottom",lightboxtimerheight:2,lightboxtimercolor:"#dc572e",lightboxtimeropacity:1,lightboxshowplaybutton:false,lightboxalwaysshownavarrows:false,lightboxbordersize:8,lightboxshowtitleprefix:true,lightboxborderradius:0,lightboxshowsocial:false,lightboxsocialposition:"position:absolute;top:100%;right:0;",lightboxsocialpositionsmallscreen:"position:absolute;top:100%;right:0;left:0;",lightboxsocialdirection:"horizontal",lightboxsocialbuttonsize:32,lightboxsocialbuttonfontsize:18,
lightboxsocialrotateeffect:true,lightboxshowfacebook:true,lightboxshowtwitter:true,lightboxshowpinterest:true,showsocial:false,socialmode:"mouseover",socialposition:"position:absolute;top:8px;right:8px;",socialpositionsmallscreen:"position:absolute;top:8px;right:8px;",socialdirection:"horizontal",socialbuttonsize:32,socialbuttonfontsize:18,socialrotateeffect:true,showfacebook:true,showtwitter:true,showpinterest:true,pauseonmouseover:false,donotinit:false,addinitscript:false,triggerresize:false,triggerresizedelay:100,
removeinlinecss:true,shownav:true,navthumbresponsivemode:"samesize",navthumbstyle:"imageonly",navthumbcolumn:5,navthumbtitleheight:20,navthumbtitlewidth:120,navshowfeaturedarrow:true,navthumbresponsive:false,navthumbmediumsize:900,navthumbmediumwidth:64,navthumbmediumheight:64,navthumbmediumcolumn:4,navthumbmediumtitleheight:18,navthumbmediumtitlewidth:120,navthumbsmallsize:600,navthumbsmallwidth:48,navthumbsmallheight:48,navthumbsmallcolumn:3,navthumbsmalltitleheight:18,navthumbsmalltitlewidth:120,
navshowfeaturedarrow:true,navthumbnavigationstyle:"arrow",navthumbnavigationarrowimage:"carouselarrows-32-32-0.png",navthumbnavigationarrowimagewidth:32,navthumbnavigationarrowimageheight:32,addwoocommerceclass:true,usethumbnailurl:true,addextraattributes:false,imgextraprops:"",playmutedandinlinewhenautoplay:false,playsinline:false,skincss:"",customcss:"",customjs:"",dataoptions:""};var configSkinOptions=["showbottomshadow","navshowpreview","border","autoplay","randomplay","loadimageondemand","transitiononfirstslide",
"autoplayvideo","isresponsive","showtext","arrowstyle","showtimer","loop","slideinterval","arrowimage","arrowwidth","arrowheight","arrowtop","arrowmargin","navstyle","navimage","navwidth","navheight","navspacing","navmarginx","navmarginy","navposition","navshowplaypause","navshowarrow","navplaypauseimage","navarrowimage","navshowbuttons","navthumbnavigationstyle","navthumbnavigationarrowimage","navthumbnavigationarrowimagewidth","navthumbnavigationarrowimageheight","navthumbresponsivemode","navthumbcolumn",
"navthumbtitleheight","navthumbtitlewidth","navthumbresponsive","navthumbstyle","navshowfeaturedarrow","navthumbmediumsize","navthumbmediumwidth","navthumbmediumheight","navthumbmediumcolumn","navthumbmediumtitleheight","navthumbmediumtitlewidth","navthumbsmallsize","navthumbsmallwidth","navthumbsmallheight","navthumbsmallcolumn","navthumbsmalltitleheight","navthumbsmalltitlewidth","playvideoimage","playvideoimagewidth","playvideoimageheight","textformat","skincss"];var configTextOptions=["textcss",
"textbgcss","titlecss","descriptioncss","buttoncss","texteffectresponsive","texteffectresponsivesize","titlecssresponsive","descriptioncssresponsive","buttoncssresponsive","textpositionstatic","textpositiondynamic","textautohide"];for(var key in WONDERPLUGIN_SLIDER_SKIN_OPTIONS)WONDERPLUGIN_SLIDER_SKIN_OPTIONS[key]["skincss"]="#wonderpluginslider-SLIDERID .star-rating {\n\tdisplay: inline-block;\n}";if("stylelist"in WONDERPLUGIN_SLIDER_SKIN_OPTIONS)WONDERPLUGIN_SLIDER_SKIN_OPTIONS["stylelist"]["skincss"]=
"#wonderpluginslider-SLIDERID .star-rating {\n\tdisplay: inline-block;\n}\n\n#wonderpluginslider-SLIDERID .amazingslider-nav-SLIDERID,\n#wonderpluginslider-SLIDERID .amazingslider-nav-SLIDERID div {\n\tbox-sizing: content-box;\n}\n\n#wonderpluginslider-SLIDERID .amazingslider-nav-SLIDERID {\n\tpadding: 0 4px;\n}\n\n#wonderpluginslider-SLIDERID .amazingslider-bullet-SLIDERID {\n\tbox-shadow: 0px 2px 5px #aaa;\n}\n\n#wonderpluginslider-SLIDERID .amazingslider-bullet-selected {\n\tbackground-color: #333 !important;\n}\n\n#wonderpluginslider-SLIDERID .amazingslider-bullet-selected .amazingslider-nav-thumbnail-tite-SLIDERID {\n\tcolor: #fff;\n}\n\n#wonderpluginslider-SLIDERID .amazingslider-bullet-selected  .amazingslider-nav-thumbnail-description-SLIDERID {\n\tcolor: #fff;\n}\n\n@media only screen and (max-width: 640px) {\n\t#wonderpluginslider-container-SLIDERID {\n\t\tpadding-right: 0 !important;\n\t\tpadding-bottom: 340px !important;\n\t}\n\n\t#wonderpluginslider-SLIDERID .amazingslider-nav-SLIDERID {\n\t\tposition: relative !important;\n\t\twidth: 100% !important;\n\t\theight: 330px !important;\n\t\ttop: 0 !important;\n\t\tleft: 0 !important;\n\t\tmargin-left: 0 !important;\n\t\tpadding: 4px 0 !important;\n\t}\n\n\t#wonderpluginslider-SLIDERID .amazingslider-nav-container-SLIDERID {\n\t\tposition: relative !important;\n\t\theight: 100% !important;\n\t}\n\n\t#wonderpluginslider-SLIDERID .amazingslider-bullet-wrapper-SLIDERID {\n\t\tmargin-left: 0 !important;\n\t}\n\n\t#wonderpluginslider-SLIDERID .amazingslider-bullet-text-SLIDERID {\n\t\twidth: auto !important;\n\t\tbox-sizing: border-box !important;\n\t}\n\n\t#wonderpluginslider-SLIDERID .amazingslider-bullet-SLIDERID {\n\t\twidth: 100% !important;\n\t}\n}";
if("featurelist"in WONDERPLUGIN_SLIDER_SKIN_OPTIONS)WONDERPLUGIN_SLIDER_SKIN_OPTIONS["featurelist"]["skincss"]="#wonderpluginslider-SLIDERID .star-rating {\n\tdisplay: inline-block;\n}\n\n#wonderpluginslider-SLIDERID .amazingslider-nav-SLIDERID,\n#wonderpluginslider-SLIDERID .amazingslider-nav-SLIDERID div {\n\tbox-sizing: content-box;\n}\n\n#wonderpluginslider-SLIDERID .amazingslider-nav-SLIDERID {\n\tpadding: 0 4px;\n}\n\n#wonderpluginslider-SLIDERID .amazingslider-bullet-SLIDERID {\n\tbox-shadow: 0px 1px 2px #aaa;\n}\n\n@media only screen and (max-width: 640px) {\n\t#wonderpluginslider-container-SLIDERID {\n\t\tpadding-right: 0 !important;\n\t\tpadding-bottom: 306px !important;\n\t}\n\n\t#wonderpluginslider-SLIDERID .amazingslider-nav-SLIDERID {\n\t\tposition: relative !important;\n\t\twidth: 100% !important;\n\t\theight: 296px !important;\n\t\ttop: 0 !important;\n\t\tleft: 0 !important;\n\t\tmargin-left: 0 !important;\n\t\tpadding: 4px 0 !important;\n\t}\n\n\t#wonderpluginslider-SLIDERID .amazingslider-nav-container-SLIDERID {\n\t\tposition: relative !important;\n\t\theight: 100% !important;\n\t}\n\n\t#wonderpluginslider-SLIDERID .amazingslider-bullet-wrapper-SLIDERID {\n\t\tmargin-left: 0 !important;\n\t}\n\n\t#wonderpluginslider-SLIDERID .amazingslider-bullet-text-SLIDERID {\n\t\twidth: auto !important;\n\t\tbox-sizing: border-box !important;\n\t}\n\n\t#wonderpluginslider-SLIDERID .amazingslider-bullet-SLIDERID {\n\t\twidth: 100% !important;\n\t}\n}";
var defaultSkinOptions={};for(var key in WONDERPLUGIN_SLIDER_SKIN_OPTIONS){defaultSkinOptions[key]=$.extend({},default_options);for(var i=0;i<configSkinOptions.length;i++)if(configSkinOptions[i]in WONDERPLUGIN_SLIDER_SKIN_OPTIONS[key])defaultSkinOptions[key][configSkinOptions[i]]=WONDERPLUGIN_SLIDER_SKIN_OPTIONS[key][configSkinOptions[i]];defaultSkinOptions[key]["scalemode"]="fill";defaultSkinOptions[key]["arrowimagemode"]="defined";defaultSkinOptions[key]["navimagemode"]="defined";defaultSkinOptions[key]["navthumbnavigationarrowimagemode"]=
"defined";defaultSkinOptions[key]["fullwidth"]=false;defaultSkinOptions[key]["isfullscreen"]=false;defaultSkinOptions[key]["disableinlinecss"]=false;defaultSkinOptions[key]["fullbrowserwidth"]=false;defaultSkinOptions[key]["usejsforfullbrowserwidth"]=false;defaultSkinOptions[key]["navplaypauseimagemode"]="defined";defaultSkinOptions[key]["navarrowimagemode"]="defined";defaultSkinOptions[key]["paddingleft"]=0;if(key=="vertical")defaultSkinOptions[key]["paddingright"]=72;else if(key=="rightthumbs")defaultSkinOptions[key]["paddingright"]=
140;else if(key=="featurelist"||key=="stylelist"||key=="righttabs"||key=="righttabsdark")defaultSkinOptions[key]["paddingright"]=240;else if(key=="lefttabs")defaultSkinOptions[key]["paddingleft"]=240;else if(key=="verticalnumber")defaultSkinOptions[key]["paddingright"]=48;else defaultSkinOptions[key]["paddingright"]=0;defaultSkinOptions[key]["paddingtop"]=0;if(key=="topcarousel")defaultSkinOptions[key]["paddingtop"]=84;if(defaultSkinOptions[key]["shownav"]&&defaultSkinOptions[key]["navstyle"]=="thumbnails"&&
defaultSkinOptions[key]["navposition"]=="bottom")defaultSkinOptions[key]["paddingbottom"]=120;else defaultSkinOptions[key]["paddingbottom"]=60;for(var i=0;i<configTextOptions.length;i++)if(defaultSkinOptions[key]["textformat"]in WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS)defaultSkinOptions[key][configTextOptions[i]]=WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS[defaultSkinOptions[key]["textformat"]][configTextOptions[i]];defaultSkinOptions[key]["textleftrightpercentforstatic"]=40;defaultSkinOptions[key]["ratioresponsive"]=
true;defaultSkinOptions[key]["ratiomediumscreen"]=900;defaultSkinOptions[key]["ratiomediumheight"]=1.6;defaultSkinOptions[key]["ratiosmallscreen"]=640;defaultSkinOptions[key]["ratiosmallheight"]=2.4}var printSkinOptions=function(options){$(".wonderplugin-slider-navshowbuttons-istrue").css({display:options.navshowbuttons?"table-row":"none"});$("#wonderplugin-slider-showbottomshadow").prop("checked",options.showbottomshadow);$("#wonderplugin-slider-navshowpreview").prop("checked",options.navshowpreview);
$("#wonderplugin-slider-border").val(options.border);$("#wonderplugin-slider-paddingleft").val(options.paddingleft);$("#wonderplugin-slider-paddingright").val(options.paddingright);$("#wonderplugin-slider-paddingtop").val(options.paddingtop);$("#wonderplugin-slider-paddingbottom").val(options.paddingbottom);$("input:radio[name=wonderplugin-slider-arrowimagemode][value="+options.arrowimagemode+"]").prop("checked",true);if(wonderplugin_slider_config.arrowimagemode=="custom"){$("#wonderplugin-slider-customarrowimage").val(options.arrowimage);
$("#wonderplugin-slider-displayarrowimage").attr("src",options.arrowimage)}else{$("#wonderplugin-slider-arrowimage").val(options.arrowimage);$("#wonderplugin-slider-displayarrowimage").attr("src",$("#wonderplugin-slider-jsfolder").text()+options.arrowimage)}$("#wonderplugin-slider-arrowstyle").val(options.arrowstyle);$("#wonderplugin-slider-arrowwidth").val(options.arrowwidth);$("#wonderplugin-slider-arrowheight").val(options.arrowheight);$("#wonderplugin-slider-arrowtop").val(options.arrowtop);$("#wonderplugin-slider-arrowmargin").val(options.arrowmargin);
if(options.navstyle=="none"){$(".wonderplugin-slider-confignavbullets-title").hide();$(".wonderplugin-slider-confignavthumbnails-title").hide();$(".wonderplugin-slider-confignavbullets").hide();$(".wonderplugin-slider-confignavthumbnails").hide();$(".wonderplugin-slider-confignavthumbnailsandbullets").hide()}else if(options.navstyle=="bullets"){$(".wonderplugin-slider-confignavbullets-title").show();$(".wonderplugin-slider-confignavthumbnails-title").hide();$(".wonderplugin-slider-confignavbullets").show();
$(".wonderplugin-slider-confignavthumbnails").hide();$(".wonderplugin-slider-confignavthumbnailsandbullets").show()}else if(options.navstyle=="thumbnails"){$(".wonderplugin-slider-confignavbullets-title").hide();$(".wonderplugin-slider-confignavthumbnails-title").show();$(".wonderplugin-slider-confignavbullets").hide();$(".wonderplugin-slider-confignavthumbnails").show();$(".wonderplugin-slider-confignavthumbnailsandbullets").show()}else if(options.navstyle=="numbering"){$(".wonderplugin-slider-confignavbullets-title").hide();
$(".wonderplugin-slider-confignavthumbnails-title").hide();$(".wonderplugin-slider-confignavbullets").hide();$(".wonderplugin-slider-confignavthumbnails").hide();$(".wonderplugin-slider-confignavthumbnailsandbullets").hide()}if(options.navstyle=="bullets"){$("input:radio[name=wonderplugin-slider-navimagemode][value="+options.navimagemode+"]").prop("checked",true);if(wonderplugin_slider_config.navimagemode=="custom"){$("#wonderplugin-slider-customnavimage").val(options.navimage);$("#wonderplugin-slider-displaynavimage").attr("src",
options.navimage)}else{$("#wonderplugin-slider-navimage").val(options.navimage);$("#wonderplugin-slider-displaynavimage").attr("src",$("#wonderplugin-slider-jsfolder").text()+options.navimage)}}$("#wonderplugin-slider-navwidth").val(options.navwidth);$("#wonderplugin-slider-navheight").val(options.navheight);if(options.navstyle=="bullets"||options.navstyle=="thumbnails"||options.navstyle=="numbering"){$("#wonderplugin-slider-navspacing").val(options.navspacing);$("#wonderplugin-slider-navmarginx").val(options.navmarginx);
$("#wonderplugin-slider-navmarginy").val(options.navmarginy);$("#wonderplugin-slider-navposition").val(options.navposition)}$("#wonderplugin-slider-shownav").prop("checked",options.shownav);if(options.navstyle=="thumbnails"){$("#wonderplugin-slider-navthumbresponsivemode").val(options.navthumbresponsivemode);$("#wonderplugin-slider-navthumbstyle").val(options.navthumbstyle);$("#wonderplugin-slider-navthumbcolumn").val(options.navthumbcolumn);$("#wonderplugin-slider-navthumbtitleheight").val(options.navthumbtitleheight);
$("#wonderplugin-slider-navthumbtitlewidth").val(options.navthumbtitlewidth);$("#wonderplugin-slider-navthumbresponsive").prop("checked",options.navthumbresponsive);$("#wonderplugin-slider-navshowfeaturedarrow").prop("checked",options.navshowfeaturedarrow);$("#wonderplugin-slider-navthumbmediumsize").val(options.navthumbmediumsize);$("#wonderplugin-slider-navthumbmediumwidth").val(options.navthumbmediumwidth);$("#wonderplugin-slider-navthumbmediumheight").val(options.navthumbmediumheight);$("#wonderplugin-slider-navthumbmediumcolumn").val(options.navthumbmediumcolumn);
$("#wonderplugin-slider-navthumbmediumtitleheight").val(options.navthumbmediumtitleheight);$("#wonderplugin-slider-navthumbmediumtitlewidth").val(options.navthumbmediumtitlewidth);$("#wonderplugin-slider-navthumbsmallsize").val(options.navthumbsmallsize);$("#wonderplugin-slider-navthumbsmallwidth").val(options.navthumbsmallwidth);$("#wonderplugin-slider-navthumbsmallheight").val(options.navthumbsmallheight);$("#wonderplugin-slider-navthumbsmallcolumn").val(options.navthumbsmallcolumn);$("#wonderplugin-slider-navthumbsmalltitleheight").val(options.navthumbsmalltitleheight);
$("#wonderplugin-slider-navthumbsmalltitlewidth").val(options.navthumbsmalltitlewidth);if(options.navthumbresponsivemode=="samesize"){$(".wonderplugin-slider-navthumbnailsamesize").show();$(".wonderplugin-slider-navthumbnailsamecolumn").hide()}else{$(".wonderplugin-slider-navthumbnailsamesize").hide();$(".wonderplugin-slider-navthumbnailsamecolumn").show()}$("#wonderplugin-slider-navthumbnavigationstyle").val(options.navthumbnavigationstyle);$("input:radio[name=wonderplugin-slider-navthumbnavigationarrowimagemode][value="+
options.navthumbnavigationarrowimagemode+"]").prop("checked",true);if(wonderplugin_slider_config.navthumbnavigationarrowimagemode=="custom"){$("#wonderplugin-slider-customnavthumbnavigationarrowimage").val(options.navthumbnavigationarrowimage);$("#wonderplugin-slider-displaynavthumbnavigationarrowimage").attr("src",options.navthumbnavigationarrowimage)}else{$("#wonderplugin-slider-navthumbnavigationarrowimage").val(options.navthumbnavigationarrowimage);$("#wonderplugin-slider-displaynavthumbnavigationarrowimage").attr("src",
$("#wonderplugin-slider-jsfolder").text()+options.navthumbnavigationarrowimage)}$("#wonderplugin-slider-navthumbnavigationarrowimagewidth").val(options.navthumbnavigationarrowimagewidth);$("#wonderplugin-slider-navthumbnavigationarrowimageheight").val(options.navthumbnavigationarrowimageheight)}else if(options.navstyle=="bullets"){$(".wonderplugin-slider-navthumbnailsamesize").show();$(".wonderplugin-slider-navthumbnailsamecolumn").hide()}$("#wonderplugin-slider-navshowarrow").prop("checked",options.navshowarrow);
$("input:radio[name=wonderplugin-slider-navarrowimagemode][value="+options.navarrowimagemode+"]").prop("checked",true);if(wonderplugin_slider_config.navarrowimagemode=="custom"){$("#wonderplugin-slider-customnavarrowimage").val(options.navarrowimage);$("#wonderplugin-slider-displaynavarrowimage").attr("src",options.navarrowimage)}else{$("#wonderplugin-slider-navarrowimage").val(options.navarrowimage);$("#wonderplugin-slider-displaynavarrowimage").attr("src",$("#wonderplugin-slider-jsfolder").text()+
options.navarrowimage)}$("#wonderplugin-slider-navshowbuttons").prop("checked",options.navshowbuttons);$("#wonderplugin-slider-navshowplaypause").prop("checked",options.navshowplaypause);$("input:radio[name=wonderplugin-slider-navplaypauseimagemode][value="+options.navplaypauseimagemode+"]").prop("checked",true);if(wonderplugin_slider_config.navplaypauseimagemode=="custom"){$("#wonderplugin-slider-customnavplaypauseimage").val(options.navplaypauseimage);$("#wonderplugin-slider-displaynavplaypauseimage").attr("src",
options.navplaypauseimage)}else{$("#wonderplugin-slider-navplaypauseimage").val(options.navplaypauseimage);$("#wonderplugin-slider-displaynavplaypauseimage").attr("src",$("#wonderplugin-slider-jsfolder").text()+options.navplaypauseimage)}$("#wonderplugin-slider-playvideoimage").val(options.playvideoimage);$("#wonderplugin-slider-displayplayvideoimage").attr("src",$("#wonderplugin-slider-jsfolder").text()+options.playvideoimage);$("#wonderplugin-slider-playvideoimagewidth").val(options.playvideoimagewidth);
$("#wonderplugin-slider-playvideoimageheight").val(options.playvideoimageheight);$("#wonderplugin-slider-textformat").val(options.textformat);if(options.textformat.substring(0,9)=="Custom - "){$("#save-text-effect").hide();$("#save-current-text-effect").show();$("#delete-current-text-effect").show()}else{$("#save-text-effect").show();$("#save-current-text-effect").show();$("#delete-current-text-effect").hide()}$("#wonderplugin-slider-textcss").val(options.textcss);$("#wonderplugin-slider-textbgcss").val(options.textbgcss);
$("#wonderplugin-slider-titlecss").val(options.titlecss);$("#wonderplugin-slider-descriptioncss").val(options.descriptioncss);$("#wonderplugin-slider-buttoncss").val(options.buttoncss);$("#wonderplugin-slider-texteffectresponsive").prop("checked",options.texteffectresponsive);$("#wonderplugin-slider-texteffectresponsivesize").val(options.texteffectresponsivesize);$("#wonderplugin-slider-titlecssresponsive").val(options.titlecssresponsive);$("#wonderplugin-slider-descriptioncssresponsive").val(options.descriptioncssresponsive);
$("#wonderplugin-slider-buttoncssresponsive").val(options.buttoncssresponsive);$("#wonderplugin-slider-textleftrightpercentforstatic").val(options.textleftrightpercentforstatic);$("#wonderplugin-slider-textpositionstatic").val(options.textpositionstatic);var positions=options.textpositiondynamic.split(",");for(var i=0;i<DYNAMIC_POSITIONS.length;i++)$("#wonderplugin-slider-textpositiondynamic-"+DYNAMIC_POSITIONS[i]).prop("checked",positions.indexOf(DYNAMIC_POSITIONS[i])>-1);var texteffect=null;if(options.textformat in
WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS)texteffect=WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS[options.textformat];else if(options.textformat in WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT)texteffect=WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT[options.textformat];if(texteffect["textstyle"]=="static"){$(".wonderplugin-slider-texteffect-static").css({display:"block"});$(".wonderplugin-slider-texteffect-dynamic").css({display:"none"})}else if(texteffect["textstyle"]=="dynamic"){$(".wonderplugin-slider-texteffect-static").css({display:"none"});
$(".wonderplugin-slider-texteffect-dynamic").css({display:"block"})}$("#wonderplugin-slider-textautohide").prop("checked",options.textautohide);$("#wonderplugin-slider-skincss").val(options.skincss)};$("input:radio[name=wonderplugin-slider-skin]").click(function(){if($(this).val()==wonderplugin_slider_config.skin)return;$(".wonderplugin-tab-skin").find("img").removeClass("selected");$("input:radio[name=wonderplugin-slider-skin]:checked").parent().find("img").addClass("selected");wonderplugin_slider_config.skin=
$(this).val();printSkinOptions(defaultSkinOptions[$(this).val()])});$(".wonderplugin-slider-options-menu-item").each(function(index){$(this).click(function(){if($(this).hasClass("wonderplugin-slider-options-menu-item-selected"))return;$(".wonderplugin-slider-options-menu-item").removeClass("wonderplugin-slider-options-menu-item-selected");$(this).addClass("wonderplugin-slider-options-menu-item-selected");$(".wonderplugin-slider-options-tab").removeClass("wonderplugin-slider-options-tab-selected");
$(".wonderplugin-slider-options-tab").eq(index).addClass("wonderplugin-slider-options-tab-selected")})});var updateSliderOptions=function(){wonderplugin_slider_config.newestfirst=$("#wonderplugin-newestfirst").is(":checked");wonderplugin_slider_config.name=$.trim($("#wonderplugin-slider-name").val());wonderplugin_slider_config.width=parseInt($.trim($("#wonderplugin-slider-width").val()));wonderplugin_slider_config.height=parseInt($.trim($("#wonderplugin-slider-height").val()));wonderplugin_slider_config.skin=
$("input:radio[name=wonderplugin-slider-skin]:checked").val();wonderplugin_slider_config.autoplay=$("#wonderplugin-slider-autoplay").is(":checked");wonderplugin_slider_config.randomplay=$("#wonderplugin-slider-randomplay").is(":checked");wonderplugin_slider_config.loadimageondemand=$("#wonderplugin-slider-loadimageondemand").is(":checked");wonderplugin_slider_config.transitiononfirstslide=$("#wonderplugin-slider-transitiononfirstslide").is(":checked");wonderplugin_slider_config.pauseonmouseover=$("#wonderplugin-slider-pauseonmouseover").is(":checked");
wonderplugin_slider_config.playmutedandinlinewhenautoplay=$("#wonderplugin-slider-playmutedandinlinewhenautoplay").is(":checked");wonderplugin_slider_config.playsinline=$("#wonderplugin-slider-playsinline").is(":checked");wonderplugin_slider_config.autoplayvideo=$("#wonderplugin-slider-autoplayvideo").is(":checked");wonderplugin_slider_config.isresponsive=$("#wonderplugin-slider-isresponsive").is(":checked");wonderplugin_slider_config.scalemode=$("#wonderplugin-slider-scalemode").val();wonderplugin_slider_config.showtext=
$("#wonderplugin-slider-showtext").is(":checked");wonderplugin_slider_config.arrowstyle=$("#wonderplugin-slider-arrowstyle").val();wonderplugin_slider_config.showtimer=$("#wonderplugin-slider-showtimer").is(":checked");wonderplugin_slider_config.loop=parseInt($.trim($("#wonderplugin-slider-loop").val()));if(isNaN(wonderplugin_slider_config.loop)||wonderplugin_slider_config.loop<0)wonderplugin_slider_config.loop=0;wonderplugin_slider_config.slideinterval=parseInt($.trim($("#wonderplugin-slider-slideinterval").val()));
if(isNaN(wonderplugin_slider_config.slideinterval)||wonderplugin_slider_config.slideinterval<0)wonderplugin_slider_config.slideinterval=8E3;wonderplugin_slider_config.fullwidth=$("#wonderplugin-slider-fullwidth").is(":checked");wonderplugin_slider_config.isfullscreen=$("#wonderplugin-slider-isfullscreen").is(":checked");wonderplugin_slider_config.fullbrowserwidth=$("#wonderplugin-slider-fullbrowserwidth").is(":checked");wonderplugin_slider_config.usejsforfullbrowserwidth=$("#wonderplugin-slider-usejsforfullbrowserwidth").is(":checked");
wonderplugin_slider_config.disableinlinecss=$("#wonderplugin-slider-disableinlinecss").is(":checked");wonderplugin_slider_config.addwoocommerceclass=$("#wonderplugin-slider-addwoocommerceclass").is(":checked");wonderplugin_slider_config.usethumbnailurl=$("#wonderplugin-slider-usethumbnailurl").is(":checked");wonderplugin_slider_config.addextraattributes=$("#wonderplugin-slider-addextraattributes").is(":checked");wonderplugin_slider_config.imgextraprops=$.trim($("#wonderplugin-slider-imgextraprops").val());
wonderplugin_slider_config.ratioresponsive=$("#wonderplugin-slider-ratioresponsive").is(":checked");wonderplugin_slider_config.ratiomediumscreen=parseInt($.trim($("#wonderplugin-slider-ratiomediumscreen").val()));wonderplugin_slider_config.ratiomediumheight=parseFloat($.trim($("#wonderplugin-slider-ratiomediumheight").val()));wonderplugin_slider_config.ratiosmallscreen=parseInt($.trim($("#wonderplugin-slider-ratiosmallscreen").val()));wonderplugin_slider_config.ratiosmallheight=parseFloat($.trim($("#wonderplugin-slider-ratiosmallheight").val()));
wonderplugin_slider_config.textformat=$("#wonderplugin-slider-textformat").val();wonderplugin_slider_config.textcss=$.trim($("#wonderplugin-slider-textcss").val());wonderplugin_slider_config.textbgcss=$.trim($("#wonderplugin-slider-textbgcss").val());wonderplugin_slider_config.titlecss=$.trim($("#wonderplugin-slider-titlecss").val());wonderplugin_slider_config.descriptioncss=$.trim($("#wonderplugin-slider-descriptioncss").val());wonderplugin_slider_config.buttoncss=$.trim($("#wonderplugin-slider-buttoncss").val());
wonderplugin_slider_config.texteffectresponsive=$("#wonderplugin-slider-texteffectresponsive").is(":checked");wonderplugin_slider_config.texteffectresponsivesize=parseInt($.trim($("#wonderplugin-slider-texteffectresponsivesize").val()));wonderplugin_slider_config.titlecssresponsive=$.trim($("#wonderplugin-slider-titlecssresponsive").val());wonderplugin_slider_config.descriptioncssresponsive=$.trim($("#wonderplugin-slider-descriptioncssresponsive").val());wonderplugin_slider_config.buttoncssresponsive=
$.trim($("#wonderplugin-slider-buttoncssresponsive").val());wonderplugin_slider_config.textleftrightpercentforstatic=parseInt($.trim($("#wonderplugin-slider-textleftrightpercentforstatic").val()));wonderplugin_slider_config.textpositionstatic=$("#wonderplugin-slider-textpositionstatic").val();var positions=[];for(var i=0;i<DYNAMIC_POSITIONS.length;i++)if($("#wonderplugin-slider-textpositiondynamic-"+DYNAMIC_POSITIONS[i]).is(":checked"))positions.push(DYNAMIC_POSITIONS[i]);if(positions.length==0)positions.push("bottomleft");
wonderplugin_slider_config.textpositiondynamic=positions.join(",");wonderplugin_slider_config.textautohide=$("#wonderplugin-slider-textautohide").is(":checked");wonderplugin_slider_config.showbottomshadow=$("#wonderplugin-slider-showbottomshadow").is(":checked");wonderplugin_slider_config.navshowpreview=$("#wonderplugin-slider-navshowpreview").is(":checked");wonderplugin_slider_config.border=parseInt($.trim($("#wonderplugin-slider-border").val()));if(isNaN(wonderplugin_slider_config.border)||wonderplugin_slider_config.border<
0)wonderplugin_slider_config.border=0;wonderplugin_slider_config.paddingleft=parseInt($.trim($("#wonderplugin-slider-paddingleft").val()));if(isNaN(wonderplugin_slider_config.paddingleft))wonderplugin_slider_config.paddingleft=0;wonderplugin_slider_config.paddingright=parseInt($.trim($("#wonderplugin-slider-paddingright").val()));if(isNaN(wonderplugin_slider_config.paddingright))wonderplugin_slider_config.paddingright=0;wonderplugin_slider_config.paddingtop=parseInt($.trim($("#wonderplugin-slider-paddingtop").val()));
if(isNaN(wonderplugin_slider_config.paddingtop))wonderplugin_slider_config.paddingtop=0;wonderplugin_slider_config.paddingbottom=parseInt($.trim($("#wonderplugin-slider-paddingbottom").val()));if(isNaN(wonderplugin_slider_config.paddingbottom))wonderplugin_slider_config.paddingbottom=0;wonderplugin_slider_config.arrowimagemode=$("input[name=wonderplugin-slider-arrowimagemode]:checked").val();if(wonderplugin_slider_config.arrowimagemode=="custom")wonderplugin_slider_config.arrowimage=$.trim($("#wonderplugin-slider-customarrowimage").val());
else wonderplugin_slider_config.arrowimage=$.trim($("#wonderplugin-slider-arrowimage").val());wonderplugin_slider_config.arrowwidth=parseInt($.trim($("#wonderplugin-slider-arrowwidth").val()));if(isNaN(wonderplugin_slider_config.arrowwidth)||wonderplugin_slider_config.arrowwidth<0)wonderplugin_slider_config.arrowwidth=defaultSkinOptions[wonderplugin_slider_config.skin]["arrowwidth"];wonderplugin_slider_config.arrowheight=parseInt($.trim($("#wonderplugin-slider-arrowheight").val()));if(isNaN(wonderplugin_slider_config.arrowheight)||
wonderplugin_slider_config.arrowheight<0)wonderplugin_slider_config.arrowheight=defaultSkinOptions[wonderplugin_slider_config.skin]["arrowheight"];wonderplugin_slider_config.arrowtop=parseInt($.trim($("#wonderplugin-slider-arrowtop").val()));if(isNaN(wonderplugin_slider_config.arrowtop))wonderplugin_slider_config.arrowtop=defaultSkinOptions[wonderplugin_slider_config.skin]["arrowtop"];wonderplugin_slider_config.arrowmargin=parseInt($.trim($("#wonderplugin-slider-arrowmargin").val()));if(isNaN(wonderplugin_slider_config.arrowmargin))wonderplugin_slider_config.arrowmargin=
defaultSkinOptions[wonderplugin_slider_config.skin]["arrowmargin"];wonderplugin_slider_config.navstyle=defaultSkinOptions[wonderplugin_slider_config.skin]["navstyle"];wonderplugin_slider_config.navimage=defaultSkinOptions[wonderplugin_slider_config.skin]["navimage"];wonderplugin_slider_config.navwidth=defaultSkinOptions[wonderplugin_slider_config.skin]["navwidth"];wonderplugin_slider_config.navheight=defaultSkinOptions[wonderplugin_slider_config.skin]["navheight"];wonderplugin_slider_config.navspacing=
defaultSkinOptions[wonderplugin_slider_config.skin]["navspacing"];wonderplugin_slider_config.navmarginx=defaultSkinOptions[wonderplugin_slider_config.skin]["navmarginx"];wonderplugin_slider_config.navmarginy=defaultSkinOptions[wonderplugin_slider_config.skin]["navmarginy"];wonderplugin_slider_config.navposition=defaultSkinOptions[wonderplugin_slider_config.skin]["navposition"];wonderplugin_slider_config.navshowbuttons=$("#wonderplugin-slider-navshowbuttons").is(":checked");wonderplugin_slider_config.navshowplaypause=
$("#wonderplugin-slider-navshowplaypause").is(":checked");wonderplugin_slider_config.navplaypauseimagemode=$("input[name=wonderplugin-slider-navplaypauseimagemode]:checked").val();if(wonderplugin_slider_config.navplaypauseimagemode=="custom")wonderplugin_slider_config.navplaypauseimage=$.trim($("#wonderplugin-slider-customnavplaypauseimage").val());else wonderplugin_slider_config.navplaypauseimage=$.trim($("#wonderplugin-slider-navplaypauseimage").val());wonderplugin_slider_config.navshowarrow=$("#wonderplugin-slider-navshowarrow").is(":checked");
wonderplugin_slider_config.navarrowimagemode=$("input[name=wonderplugin-slider-navarrowimagemode]:checked").val();if(wonderplugin_slider_config.navarrowimagemode=="custom")wonderplugin_slider_config.navarrowimage=$.trim($("#wonderplugin-slider-customnavarrowimage").val());else wonderplugin_slider_config.navarrowimage=$.trim($("#wonderplugin-slider-navarrowimage").val());if(wonderplugin_slider_config.navstyle=="bullets"){wonderplugin_slider_config.navimagemode=$("input[name=wonderplugin-slider-navimagemode]:checked").val();
if(wonderplugin_slider_config.navimagemode=="custom")wonderplugin_slider_config.navimage=$.trim($("#wonderplugin-slider-customnavimage").val());else wonderplugin_slider_config.navimage=$.trim($("#wonderplugin-slider-navimage").val())}wonderplugin_slider_config.navwidth=parseInt($.trim($("#wonderplugin-slider-navwidth").val()));if(isNaN(wonderplugin_slider_config.navwidth)||wonderplugin_slider_config.navwidth<0)wonderplugin_slider_config.navwidth=defaultSkinOptions[wonderplugin_slider_config.skin]["navwidth"];
wonderplugin_slider_config.navheight=parseInt($.trim($("#wonderplugin-slider-navheight").val()));if(isNaN(wonderplugin_slider_config.navheight)||wonderplugin_slider_config.navheight<0)wonderplugin_slider_config.navheight=defaultSkinOptions[wonderplugin_slider_config.skin]["navheight"];if(wonderplugin_slider_config.navstyle=="bullets"||wonderplugin_slider_config.navstyle=="thumbnails"||wonderplugin_slider_config.navstyle=="numbering"){wonderplugin_slider_config.navspacing=parseInt($.trim($("#wonderplugin-slider-navspacing").val()));
if(isNaN(wonderplugin_slider_config.navspacing))wonderplugin_slider_config.navspacing=defaultSkinOptions[wonderplugin_slider_config.skin]["navspacing"];wonderplugin_slider_config.navmarginx=parseInt($.trim($("#wonderplugin-slider-navmarginx").val()));if(isNaN(wonderplugin_slider_config.navmarginx))wonderplugin_slider_config.navmarginx=defaultSkinOptions[wonderplugin_slider_config.skin]["navmarginx"];wonderplugin_slider_config.navmarginy=parseInt($.trim($("#wonderplugin-slider-navmarginy").val()));
if(isNaN(wonderplugin_slider_config.navmarginy))wonderplugin_slider_config.navmarginy=defaultSkinOptions[wonderplugin_slider_config.skin]["navmarginy"];wonderplugin_slider_config.navposition=$("#wonderplugin-slider-navposition").val()}wonderplugin_slider_config.shownav=$("#wonderplugin-slider-shownav").is(":checked");if(wonderplugin_slider_config.navstyle=="thumbnails"){wonderplugin_slider_config.navthumbresponsivemode=$("#wonderplugin-slider-navthumbresponsivemode").val();wonderplugin_slider_config.navthumbstyle=
$("#wonderplugin-slider-navthumbstyle").val();wonderplugin_slider_config.navthumbcolumn=parseInt($.trim($("#wonderplugin-slider-navthumbcolumn").val()));wonderplugin_slider_config.navthumbtitleheight=parseInt($.trim($("#wonderplugin-slider-navthumbtitleheight").val()));wonderplugin_slider_config.navthumbtitlewidth=parseInt($.trim($("#wonderplugin-slider-navthumbtitlewidth").val()));wonderplugin_slider_config.navthumbresponsive=$("#wonderplugin-slider-navthumbresponsive").is(":checked");wonderplugin_slider_config.navshowfeaturedarrow=
$("#wonderplugin-slider-navshowfeaturedarrow").is(":checked");wonderplugin_slider_config.navthumbmediumsize=parseInt($.trim($("#wonderplugin-slider-navthumbmediumsize").val()));wonderplugin_slider_config.navthumbmediumwidth=parseInt($.trim($("#wonderplugin-slider-navthumbmediumwidth").val()));wonderplugin_slider_config.navthumbmediumheight=parseInt($.trim($("#wonderplugin-slider-navthumbmediumheight").val()));wonderplugin_slider_config.navthumbmediumcolumn=parseInt($.trim($("#wonderplugin-slider-navthumbmediumcolumn").val()));
wonderplugin_slider_config.navthumbmediumtitleheight=parseInt($.trim($("#wonderplugin-slider-navthumbmediumtitleheight").val()));wonderplugin_slider_config.navthumbmediumtitlewidth=parseInt($.trim($("#wonderplugin-slider-navthumbmediumtitlewidth").val()));wonderplugin_slider_config.navthumbsmallsize=parseInt($.trim($("#wonderplugin-slider-navthumbsmallsize").val()));wonderplugin_slider_config.navthumbsmallwidth=parseInt($.trim($("#wonderplugin-slider-navthumbsmallwidth").val()));wonderplugin_slider_config.navthumbsmallheight=
parseInt($.trim($("#wonderplugin-slider-navthumbsmallheight").val()));wonderplugin_slider_config.navthumbsmallcolumn=parseInt($.trim($("#wonderplugin-slider-navthumbsmallcolumn").val()));wonderplugin_slider_config.navthumbsmalltitleheight=parseInt($.trim($("#wonderplugin-slider-navthumbsmalltitleheight").val()));wonderplugin_slider_config.navthumbsmalltitlewidth=parseInt($.trim($("#wonderplugin-slider-navthumbsmalltitlewidth").val()));wonderplugin_slider_config.navthumbnavigationstyle=$("#wonderplugin-slider-navthumbnavigationstyle").val();
wonderplugin_slider_config.navthumbnavigationarrowimagemode=$("input[name=wonderplugin-slider-navthumbnavigationarrowimagemode]:checked").val();if(wonderplugin_slider_config.navthumbnavigationarrowimagemode=="custom")wonderplugin_slider_config.navthumbnavigationarrowimage=$.trim($("#wonderplugin-slider-customnavthumbnavigationarrowimage").val());else wonderplugin_slider_config.navthumbnavigationarrowimage=$.trim($("#wonderplugin-slider-navthumbnavigationarrowimage").val());wonderplugin_slider_config.navthumbnavigationarrowimagewidth=
parseInt($.trim($("#wonderplugin-slider-navthumbnavigationarrowimagewidth").val()));wonderplugin_slider_config.navthumbnavigationarrowimageheight=parseInt($.trim($("#wonderplugin-slider-navthumbnavigationarrowimageheight").val()))}wonderplugin_slider_config.playvideoimage=$.trim($("#wonderplugin-slider-playvideoimage").val());wonderplugin_slider_config.playvideoimagewidth=parseInt($.trim($("#wonderplugin-slider-playvideoimagewidth").val()));if(isNaN(wonderplugin_slider_config.playvideoimagewidth)||
wonderplugin_slider_config.playvideoimagewidth<0)wonderplugin_slider_config.playvideoimagewidth=defaultSkinOptions[wonderplugin_slider_config.skin]["playvideoimagewidth"];wonderplugin_slider_config.playvideoimageheight=parseInt($.trim($("#wonderplugin-slider-playvideoimageheight").val()));if(isNaN(wonderplugin_slider_config.playvideoimageheight)||wonderplugin_slider_config.playvideoimageheight<0)wonderplugin_slider_config.playvideoimageheight=defaultSkinOptions[wonderplugin_slider_config.skin]["playvideoimageheight"];
var transition=[];for(var i=0;i<TRANSITION_EFFECTS.length;i++)if($("#wonderplugin-slider-effect-"+TRANSITION_EFFECTS[i]).is(":checked"))transition.push(TRANSITION_EFFECTS[i]);wonderplugin_slider_config.transition=transition.join(",");wonderplugin_slider_config.sliceduration=parseInt($.trim($("#wonderplugin-slider-sliceduration").val()));wonderplugin_slider_config.blocksduration=parseInt($.trim($("#wonderplugin-slider-blocksduration").val()));wonderplugin_slider_config.slideduration=parseInt($.trim($("#wonderplugin-slider-slideduration").val()));
wonderplugin_slider_config.cssslideduration=parseInt($.trim($("#wonderplugin-slider-cssslideduration").val()));wonderplugin_slider_config.elasticduration=parseInt($.trim($("#wonderplugin-slider-elasticduration").val()));wonderplugin_slider_config.crossfadeduration=parseInt($.trim($("#wonderplugin-slider-crossfadeduration").val()));wonderplugin_slider_config.fadeoutfadeinduration=parseInt($.trim($("#wonderplugin-slider-fadeoutfadeinduration").val()));wonderplugin_slider_config.fadeduration=parseInt($.trim($("#wonderplugin-slider-fadeduration").val()));
wonderplugin_slider_config.shuffleduration=parseInt($.trim($("#wonderplugin-slider-shuffleduration").val()));wonderplugin_slider_config.blindsduration=parseInt($.trim($("#wonderplugin-slider-blindsduration").val()));wonderplugin_slider_config.tilesduration=parseInt($.trim($("#wonderplugin-slider-tilesduration").val()));wonderplugin_slider_config.kenburnsduration=parseInt($.trim($("#wonderplugin-slider-kenburnsduration").val()));wonderplugin_slider_config.flipduration=parseInt($.trim($("#wonderplugin-slider-flipduration").val()));
wonderplugin_slider_config.flipwithzoomduration=parseInt($.trim($("#wonderplugin-slider-flipwithzoomduration").val()));wonderplugin_slider_config.threedduration=parseInt($.trim($("#wonderplugin-slider-threedduration").val()));wonderplugin_slider_config.threedhorizontalduration=parseInt($.trim($("#wonderplugin-slider-threedhorizontalduration").val()));wonderplugin_slider_config.threedwithzoomduration=parseInt($.trim($("#wonderplugin-slider-threedwithzoomduration").val()));wonderplugin_slider_config.threedhorizontalwithzoomduration=
parseInt($.trim($("#wonderplugin-slider-threedhorizontalwithzoomduration").val()));wonderplugin_slider_config.threedflipduration=parseInt($.trim($("#wonderplugin-slider-threedflipduration").val()));wonderplugin_slider_config.threedflipwithzoomduration=parseInt($.trim($("#wonderplugin-slider-threedflipwithzoomduration").val()));wonderplugin_slider_config.threedtilesduration=parseInt($.trim($("#wonderplugin-slider-threedtilesduration").val()));wonderplugin_slider_config.threedfallback=$("#wonderplugin-slider-threedfallback").val();
wonderplugin_slider_config.threedhorizontalfallback=$("#wonderplugin-slider-threedhorizontalfallback").val();wonderplugin_slider_config.threedwithzoomfallback=$("#wonderplugin-slider-threedwithzoomfallback").val();wonderplugin_slider_config.threedhorizontalwithzoomfallback=$("#wonderplugin-slider-threedhorizontalwithzoomfallback").val();wonderplugin_slider_config.threedflipfallback=$("#wonderplugin-slider-threedflipfallback").val();wonderplugin_slider_config.threedflipwithzoomfallback=$("#wonderplugin-slider-threedflipwithzoomfallback").val();
wonderplugin_slider_config.threedtilesfallback=$("#wonderplugin-slider-threedtilesfallback").val();wonderplugin_slider_config.outputtext=$("#wonderplugin-slider-outputtext").is(":checked");wonderplugin_slider_config.titletag=$.trim($("#wonderplugin-slider-titletag").val());wonderplugin_slider_config.descriptiontag=$.trim($("#wonderplugin-slider-descriptiontag").val());wonderplugin_slider_config.lightboxnogroup=$("#wonderplugin-slider-lightboxnogroup").is(":checked");wonderplugin_slider_config.lightboxresponsive=
$("#wonderplugin-slider-lightboxresponsive").is(":checked");wonderplugin_slider_config.lightboxshownavigation=$("#wonderplugin-slider-lightboxshownavigation").is(":checked");wonderplugin_slider_config.lightboxshowtitle=$("#wonderplugin-slider-lightboxshowtitle").is(":checked");wonderplugin_slider_config.lightboxshowdescription=$("#wonderplugin-slider-lightboxshowdescription").is(":checked");wonderplugin_slider_config.lightboxthumbwidth=parseInt($.trim($("#wonderplugin-slider-lightboxthumbwidth").val()));
wonderplugin_slider_config.lightboxthumbheight=parseInt($.trim($("#wonderplugin-slider-lightboxthumbheight").val()));wonderplugin_slider_config.lightboxthumbtopmargin=parseInt($.trim($("#wonderplugin-slider-lightboxthumbtopmargin").val()));wonderplugin_slider_config.lightboxthumbbottommargin=parseInt($.trim($("#wonderplugin-slider-lightboxthumbbottommargin").val()));wonderplugin_slider_config.lightboxbarheight=parseInt($.trim($("#wonderplugin-slider-lightboxbarheight").val()));wonderplugin_slider_config.lightboxtitlebottomcss=
$.trim($("#wonderplugin-slider-lightboxtitlebottomcss").val());wonderplugin_slider_config.lightboxdescriptionbottomcss=$.trim($("#wonderplugin-slider-lightboxdescriptionbottomcss").val());wonderplugin_slider_config.lightboxadvancedoptions=$.trim($("#wonderplugin-slider-lightboxadvancedoptions").val());wonderplugin_slider_config.lightboxvideohidecontrols=$("#wonderplugin-slider-lightboxvideohidecontrols").is(":checked");wonderplugin_slider_config.lightboxfullscreenmode=$("#wonderplugin-slider-lightboxfullscreenmode").is(":checked");
wonderplugin_slider_config.lightboxcloseonoverlay=$("#wonderplugin-slider-lightboxcloseonoverlay").is(":checked");wonderplugin_slider_config.lightboxtitlestyle=$.trim($("#wonderplugin-slider-lightboxtitlestyle").val());wonderplugin_slider_config.lightboxdefaultvideovolume=parseFloat($.trim($("#wonderplugin-slider-lightboxdefaultvideovolume").val()));wonderplugin_slider_config.lightboximagepercentage=parseInt($.trim($("#wonderplugin-slider-lightboximagepercentage").val()));wonderplugin_slider_config.lightboxoverlayopacity=
parseFloat($.trim($("#wonderplugin-slider-lightboxoverlayopacity").val()));wonderplugin_slider_config.lightboxoverlaybgcolor=$.trim($("#wonderplugin-slider-lightboxoverlaybgcolor").val());wonderplugin_slider_config.lightboxbgcolor=$.trim($("#wonderplugin-slider-lightboxbgcolor").val());wonderplugin_slider_config.lightboxtitleprefix=$("#wonderplugin-slider-lightboxtitleprefix").val();wonderplugin_slider_config.lightboxtitleinsidecss=$.trim($("#wonderplugin-slider-lightboxtitleinsidecss").val());wonderplugin_slider_config.lightboxdescriptioninsidecss=
$.trim($("#wonderplugin-slider-lightboxdescriptioninsidecss").val());wonderplugin_slider_config.lightboxtitleoutsidecss=$.trim($("#wonderplugin-slider-lightboxtitleoutsidecss").val());wonderplugin_slider_config.lightboxdescriptionoutsidecss=$.trim($("#wonderplugin-slider-lightboxdescriptionoutsidecss").val());wonderplugin_slider_config.lightboxautoslide=$("#wonderplugin-slider-lightboxautoslide").is(":checked");wonderplugin_slider_config.lightboxshowtimer=$("#wonderplugin-slider-lightboxshowtimer").is(":checked");
wonderplugin_slider_config.lightboxshowplaybutton=$("#wonderplugin-slider-lightboxshowplaybutton").is(":checked");wonderplugin_slider_config.lightboxalwaysshownavarrows=$("#wonderplugin-slider-lightboxalwaysshownavarrows").is(":checked");wonderplugin_slider_config.lightboxshowtitleprefix=$("#wonderplugin-slider-lightboxshowtitleprefix").is(":checked");wonderplugin_slider_config.lightboxslideinterval=parseInt($.trim($("#wonderplugin-slider-lightboxslideinterval").val()));wonderplugin_slider_config.lightboxtimerheight=
parseInt($.trim($("#wonderplugin-slider-lightboxtimerheight").val()));wonderplugin_slider_config.lightboxbordersize=parseInt($.trim($("#wonderplugin-slider-lightboxbordersize").val()));wonderplugin_slider_config.lightboxborderradius=parseInt($.trim($("#wonderplugin-slider-lightboxborderradius").val()));wonderplugin_slider_config.lightboxtimeropacity=parseFloat($.trim($("#wonderplugin-slider-lightboxtimeropacity").val()));wonderplugin_slider_config.lightboxtimerposition=$.trim($("#wonderplugin-slider-lightboxtimerposition").val());
wonderplugin_slider_config.lightboxtimercolor=$.trim($("#wonderplugin-slider-lightboxtimercolor").val());wonderplugin_slider_config.lightboxshowsocial=$("#wonderplugin-slider-lightboxshowsocial").is(":checked");wonderplugin_slider_config.lightboxsocialposition=$.trim($("#wonderplugin-slider-lightboxsocialposition").val());wonderplugin_slider_config.lightboxsocialpositionsmallscreen=$.trim($("#wonderplugin-slider-lightboxsocialpositionsmallscreen").val());wonderplugin_slider_config.lightboxsocialdirection=
$.trim($("#wonderplugin-slider-lightboxsocialdirection").val());wonderplugin_slider_config.lightboxsocialbuttonsize=parseInt($.trim($("#wonderplugin-slider-lightboxsocialbuttonsize").val()));wonderplugin_slider_config.lightboxsocialbuttonfontsize=parseInt($.trim($("#wonderplugin-slider-lightboxsocialbuttonfontsize").val()));wonderplugin_slider_config.lightboxsocialrotateeffect=$("#wonderplugin-slider-lightboxsocialrotateeffect").is(":checked");wonderplugin_slider_config.lightboxshowfacebook=$("#wonderplugin-slider-lightboxshowfacebook").is(":checked");
wonderplugin_slider_config.lightboxshowtwitter=$("#wonderplugin-slider-lightboxshowtwitter").is(":checked");wonderplugin_slider_config.lightboxshowpinterest=$("#wonderplugin-slider-lightboxshowpinterest").is(":checked");wonderplugin_slider_config.showsocial=$("#wonderplugin-slider-showsocial").is(":checked");wonderplugin_slider_config.socialmode=$.trim($("#wonderplugin-slider-socialmode").val());wonderplugin_slider_config.socialposition=$.trim($("#wonderplugin-slider-socialposition").val());wonderplugin_slider_config.socialpositionsmallscreen=
$.trim($("#wonderplugin-slider-socialpositionsmallscreen").val());wonderplugin_slider_config.socialdirection=$.trim($("#wonderplugin-slider-socialdirection").val());wonderplugin_slider_config.socialbuttonsize=parseInt($.trim($("#wonderplugin-slider-socialbuttonsize").val()));wonderplugin_slider_config.socialbuttonfontsize=parseInt($.trim($("#wonderplugin-slider-socialbuttonfontsize").val()));wonderplugin_slider_config.socialrotateeffect=$("#wonderplugin-slider-socialrotateeffect").is(":checked");
wonderplugin_slider_config.showfacebook=$("#wonderplugin-slider-showfacebook").is(":checked");wonderplugin_slider_config.showtwitter=$("#wonderplugin-slider-showtwitter").is(":checked");wonderplugin_slider_config.showpinterest=$("#wonderplugin-slider-showpinterest").is(":checked");wonderplugin_slider_config.donotinit=$("#wonderplugin-slider-donotinit").is(":checked");wonderplugin_slider_config.addinitscript=$("#wonderplugin-slider-addinitscript").is(":checked");wonderplugin_slider_config.triggerresize=
$("#wonderplugin-slider-triggerresize").is(":checked");wonderplugin_slider_config.triggerresizedelay=parseInt($.trim($("#wonderplugin-slider-triggerresizedelay").val()));wonderplugin_slider_config.removeinlinecss=$("#wonderplugin-slider-removeinlinecss").is(":checked");wonderplugin_slider_config.inityoutube=$("#wonderplugin-slider-inityoutube").is(":checked");wonderplugin_slider_config.initvimeo=$("#wonderplugin-slider-initvimeo").is(":checked");wonderplugin_slider_config.ga4account=$.trim($("#wonderplugin-slider-ga4account").val());
wonderplugin_slider_config.googleanalyticsaccount=$("#wonderplugin-slider-googleanalyticsaccount").val();wonderplugin_slider_config.skincss=$.trim($("#wonderplugin-slider-skincss").val());wonderplugin_slider_config.customcss=$.trim($("#wonderplugin-slider-custom-css").val());wonderplugin_slider_config.dataoptions=$.trim($("#wonderplugin-slider-data-options").val());wonderplugin_slider_config.customjs=$.trim($("#wonderplugin-slider-customjs").val());wonderplugin_slider_config.customtexteffect=$("#custom-text-effect").val()};
$("#wonderplugin-slider-textformat").change(function(){var textformat=$(this).val();if(textformat.substring(0,9)=="Custom - "){$("#save-text-effect").hide();$("#save-current-text-effect").show();$("#delete-current-text-effect").show()}else{$("#save-text-effect").show();$("#save-current-text-effect").show();$("#delete-current-text-effect").hide()}var texteffect=null;if(textformat in WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS)texteffect=WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS[textformat];if(textformat in
WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT)texteffect=WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT[textformat];if(texteffect){if("textautohide"in texteffect)$("#wonderplugin-slider-textautohide").prop("checked",texteffect["textautohide"]);$("#wonderplugin-slider-textcss").val(texteffect["textcss"]);$("#wonderplugin-slider-textbgcss").val(texteffect["textbgcss"]);$("#wonderplugin-slider-titlecss").val(texteffect["titlecss"]);$("#wonderplugin-slider-descriptioncss").val(texteffect["descriptioncss"]);$("#wonderplugin-slider-buttoncss").val(texteffect["buttoncss"]);
$("#wonderplugin-slider-texteffectresponsive").prop("checked",texteffect["texteffectresponsive"]);$("#wonderplugin-slider-texteffectresponsivesize").val(texteffect["texteffectresponsivesize"]);$("#wonderplugin-slider-titlecssresponsive").val(texteffect["titlecssresponsive"]);$("#wonderplugin-slider-descriptioncssresponsive").val(texteffect["descriptioncssresponsive"]);$("#wonderplugin-slider-buttoncssresponsive").val(texteffect["buttoncssresponsive"]);if("textleftrightpercentforstatic"in texteffect)$("#wonderplugin-slider-textleftrightpercentforstatic").val(texteffect["textleftrightpercentforstatic"]);
$("#wonderplugin-slider-textpositionstatic").val(texteffect["textpositionstatic"]);var positions=texteffect["textpositiondynamic"].split(",");for(var i=0;i<DYNAMIC_POSITIONS.length;i++)$("#wonderplugin-slider-textpositiondynamic-"+DYNAMIC_POSITIONS[i]).prop("checked",positions.indexOf(DYNAMIC_POSITIONS[i])>-1);if(texteffect["textstyle"]=="static"){$(".wonderplugin-slider-texteffect-static").css({display:"block"});$(".wonderplugin-slider-texteffect-dynamic").css({display:"none"})}else if(texteffect["textstyle"]==
"dynamic"){$(".wonderplugin-slider-texteffect-static").css({display:"none"});$(".wonderplugin-slider-texteffect-dynamic").css({display:"block"})}}});var escapeHTMLString=function(str){return str.replace(/'/g,"&#39;").replace(/"/g,"&quot;")};var previewSlider=function(){updateSliderOptions();$("#wonderplugin-slider-preview-container").empty();if(wonderplugin_slider_config.fullbrowserwidth||wonderplugin_slider_config.fullwidth)$("#wonderplugin-slider-preview-container").css({"max-width":"100%"});else if(wonderplugin_slider_config.isresponsive)$("#wonderplugin-slider-preview-container").css({"max-width":wonderplugin_slider_config.width+
"px"});if(wonderplugin_slider_config.isfullscreen)$("#wonderplugin-slider-preview-container").css({"height":"500px"});$("#wonderplugin-slider-preview-container").css({"padding-left":wonderplugin_slider_config.paddingleft+"px","padding-right":wonderplugin_slider_config.paddingright+"px","padding-top":wonderplugin_slider_config.paddingtop+"px","padding-bottom":wonderplugin_slider_config.paddingbottom+"px"});$("#wpsliderlightbox_advanced_options").remove();var previewCode="";if(wonderplugin_slider_config.lightboxadvancedoptions&&
wonderplugin_slider_config.lightboxadvancedoptions.length>0){previewCode+="<div id='wpsliderlightbox_advanced_options'";previewCode+=" "+wonderplugin_slider_config.lightboxadvancedoptions;previewCode+="></div>"}previewCode+="<div class='wonderpluginslider' id='wonderplugin-slider-preview'";if(wonderplugin_slider_config.dataoptions&&wonderplugin_slider_config.dataoptions.length>0)previewCode+=" "+wonderplugin_slider_config.dataoptions;previewCode+="></div>";$("#wonderplugin-slider-preview-container").html(previewCode);
if(wonderplugin_slider_config.slides.length>0){var sliderid=wonderplugin_slider_config.id>0?wonderplugin_slider_config.id:0;$("head").find("style").each(function(){if($(this).data("creator")&&$(this).data("creator").indexOf("wonderpluginslidercreator")==0)$(this).remove()});$("head").find("link").each(function(){if($(this).data("creator")&&$(this).data("creator").indexOf("wonderpluginslidercreator")==0)$(this).remove()});if(wonderplugin_slider_config.customcss&&wonderplugin_slider_config.customcss.length>
0){var customcss=wonderplugin_slider_config.customcss.replace(/wonderpluginslider-container-SLIDERID/g,"wonderplugin-slider-preview-container").replace(/wonderpluginslider-SLIDERID/g,"wonderplugin-slider-preview").replace(/SLIDERID/g,sliderid);$("head").append("<style type='text/css' data-creator='wonderpluginslidercreator"+sliderid+"'>"+customcss+"</style>")}if(wonderplugin_slider_config.skincss&&wonderplugin_slider_config.skincss.length>0){var skincss=wonderplugin_slider_config.skincss.replace(/wonderpluginslider-container-SLIDERID/g,
"wonderplugin-slider-preview-container").replace(/wonderpluginslider-SLIDERID/g,"wonderplugin-slider-preview").replace(/SLIDERID/g,sliderid);$("head").append("<style type='text/css' data-creator='wonderpluginslidercreator"+sliderid+"'>"+skincss+"</style>")}var i;var code='<ul class="amazingslider-slides" style="display:none;">';var hasPosts=false;for(i=0;i<wonderplugin_slider_config.slides.length;i++){if(wonderplugin_slider_config.slides[i].type==6||wonderplugin_slider_config.slides[i].type==7){hasPosts=
true;continue}code+="<li>";if(wonderplugin_slider_config.slides[i].lightbox){code+='<a href="';if(wonderplugin_slider_config.slides[i].type==0)code+=wonderplugin_slider_config.slides[i].image;else if(wonderplugin_slider_config.slides[i].type==1){code+=wonderplugin_slider_config.slides[i].mp4;if(wonderplugin_slider_config.slides[i].webm)code+='" data-webm="'+wonderplugin_slider_config.slides[i].webm}else if(wonderplugin_slider_config.slides[i].type==2||wonderplugin_slider_config.slides[i].type==3)code+=
wonderplugin_slider_config.slides[i].video;if(wonderplugin_slider_config.slides[i].lightboxsize)code+='" data-width="'+wonderplugin_slider_config.slides[i].lightboxwidth+'" data-height="'+wonderplugin_slider_config.slides[i].lightboxheight;if(wonderplugin_slider_config.slides[i].description&&wonderplugin_slider_config.slides[i].description.length>0)code+='" data-description="'+escapeHTMLString(wonderplugin_slider_config.slides[i].description);code+='" class="html5lightbox">'}else if(wonderplugin_slider_config.slides[i].weblink&&
wonderplugin_slider_config.slides[i].weblink.length>0){code+='<a href="'+wonderplugin_slider_config.slides[i].weblink+'"';if(wonderplugin_slider_config.slides[i].weblinklightbox){code+=' class="html5lightbox"';if(wonderplugin_slider_config.slides[i].lightboxsize)code+=' data-width="'+wonderplugin_slider_config.slides[i].lightboxwidth+'" data-height="'+wonderplugin_slider_config.slides[i].lightboxheight+'"';if(wonderplugin_slider_config.slides[i].description&&wonderplugin_slider_config.slides[i].description.length>
0)code+=' data-description="'+escapeHTMLString(wonderplugin_slider_config.slides[i].description)+'"'}else if(wonderplugin_slider_config.slides[i].linktarget&&wonderplugin_slider_config.slides[i].linktarget.length>0)code+=' target="'+wonderplugin_slider_config.slides[i].linktarget+'"';code+=">"}code+="<img";if(wonderplugin_slider_config.addextraattributes&&wonderplugin_slider_config.imgextraprops)code+=" "+wonderplugin_slider_config.imgextraprops;if(i>0&&wonderplugin_slider_config.loadimageondemand)code+=
' class="amazingsliderimg" data-src="';else code+=' class="amazingsliderimg" src="';code+=wonderplugin_slider_config.slides[i].image+'"';if(!wonderplugin_slider_config.slides[i].altusetitle&&wonderplugin_slider_config.slides[i].alt&&wonderplugin_slider_config.slides[i].alt.length>0)code+=' alt="'+escapeHTMLString(wonderplugin_slider_config.slides[i].alt)+'"';else if(wonderplugin_slider_config.slides[i].title&&wonderplugin_slider_config.slides[i].title.length>0)code+=' alt="'+escapeHTMLString(wonderplugin_slider_config.slides[i].title)+
'"';code+=' title="'+escapeHTMLString(wonderplugin_slider_config.slides[i].title)+'"';code+=' data-description="'+escapeHTMLString(wonderplugin_slider_config.slides[i].description)+'"';if(wonderplugin_slider_config.slides[i].usetexteffect){var textformat=wonderplugin_slider_config.slides[i].texteffect;code+=' data-texteffect="'+textformat+'"'}code+=" />";if(wonderplugin_slider_config.slides[i].lightbox||!wonderplugin_slider_config.slides[i].lightbox&&wonderplugin_slider_config.slides[i].weblink&&
wonderplugin_slider_config.slides[i].weblink.length>0)code+="</a>";if(!wonderplugin_slider_config.slides[i].lightbox)if(wonderplugin_slider_config.slides[i].type==1){code+='<video preload="none" data-src="'+wonderplugin_slider_config.slides[i].mp4+'"';if(wonderplugin_slider_config.slides[i].webm)code+=' data-webm="'+wonderplugin_slider_config.slides[i].webm+'"';code+="></video>"}else if(wonderplugin_slider_config.slides[i].type==2||wonderplugin_slider_config.slides[i].type==3)code+='<video preload="none" data-src="'+
wonderplugin_slider_config.slides[i].video+'"></video>';if(wonderplugin_slider_config.slides[i].button&&wonderplugin_slider_config.slides[i].button.length>0){if(wonderplugin_slider_config.slides[i].buttonlink&&wonderplugin_slider_config.slides[i].buttonlink.length>0){code+='<a href="'+wonderplugin_slider_config.slides[i].buttonlink+'"';if(wonderplugin_slider_config.slides[i].buttonlinktarget&&wonderplugin_slider_config.slides[i].buttonlinktarget.length>0)code+=' target="'+wonderplugin_slider_config.slides[i].buttonlinktarget+
'"';code+=">"}code+='<button class="amazingsliderbutton '+wonderplugin_slider_config.slides[i].buttoncss+'">'+wonderplugin_slider_config.slides[i].button+"</button>";if(wonderplugin_slider_config.slides[i].buttonlink&&wonderplugin_slider_config.slides[i].buttonlink.length>0)code+="</a>"}code+="</li>"}code+="</ul>";code+='<ul class="amazingslider-thumbnails" style="display:none;">';for(i=0;i<wonderplugin_slider_config.slides.length;i++){if(wonderplugin_slider_config.slides[i].type==6||wonderplugin_slider_config.slides[i].type==
7)continue;code+='<li><img class="amazingsliderthumbnailimg" src="'+wonderplugin_slider_config.slides[i].thumbnail+'"';if(!wonderplugin_slider_config.slides[i].altusetitle&&wonderplugin_slider_config.slides[i].alt&&wonderplugin_slider_config.slides[i].alt.length>0)code+=' alt="'+escapeHTMLString(wonderplugin_slider_config.slides[i].alt)+'"';else if(wonderplugin_slider_config.slides[i].title&&wonderplugin_slider_config.slides[i].title.length>0)code+=' alt="'+escapeHTMLString(wonderplugin_slider_config.slides[i].title)+
'"';code+=' title="'+escapeHTMLString(wonderplugin_slider_config.slides[i].title)+'"';code+=' data-description="'+escapeHTMLString(wonderplugin_slider_config.slides[i].description)+'"';code+=" /></li>"}code+="</ul>";$("#wonderplugin-slider-preview").html(code);var default_texteffect={};if(wonderplugin_slider_config["textformat"]in WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS)default_texteffect=WONDERPLUGIN_SLIDER_TEXT_EFFECT_FORMATS[wonderplugin_slider_config["textformat"]];else if(wonderplugin_slider_config["textformat"]in
WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT)default_texteffect=WONDERPLUGIN_SLIDER_CUSTOM_TEXT_EFFECT[wonderplugin_slider_config["textformat"]];var jsfolder=$("#wonderplugin-slider-jsfolder").text();var sliderOptions=$.extend({},WONDERPLUGIN_SLIDER_SKIN_OPTIONS[wonderplugin_slider_config["skin"]],default_texteffect,{sliderid:sliderid,jsfolder:jsfolder},wonderplugin_slider_config);if(sliderOptions.fullbrowserwidth){sliderOptions.fullbrowserwidth=false;sliderOptions.fullwidth=true}$("#wonderplugin-slider-preview").wonderpluginslider(sliderOptions);
if(hasPosts)$("#wonderplugin-slider-preview-message").html("The WordPress posts slider is not available in the Preview tab. To view the effect, save and publish the slider, then clik the View Slider link. Or you can add the provided shortcode to a post or page to view the effect.");else $("#wonderplugin-slider-preview-message").empty()}};var extraBackslashConfig=function(){var addextra=$("#wonderplugin-slider-addextrabackslash").text();if(addextra!=="1")return wonderplugin_slider_config;var copied_config=
$.extend(true,{},wonderplugin_slider_config);for(var key in copied_config)if(copied_config[key])if(key=="slides")for(var i=0;i<copied_config[key].length;i++)for(var slidekey in copied_config[key][i]){if(typeof copied_config[key][i][slidekey]==="string"&&copied_config[key][i][slidekey])copied_config[key][i][slidekey]=copied_config[key][i][slidekey].replace(/"/g,'\\"')}else if(typeof copied_config[key]==="string")copied_config[key]=copied_config[key].replace(/"/g,'\\"');return copied_config};var postPublish=
function(message,afterajax){$("#wonderplugin-slider-publish-loading").hide();var formnonce=$("#wonderplugin-slider-saveformnonce").html();var errorHtml="";if(afterajax)if(message){errorHtml+="<div class='error'><p>Error message: "+message+"</p></div>";errorHtml+="<div class='error'><p>WordPress Ajax call failed. Please click the button below and save with POST method</p></div>"}else{errorHtml+="<div class='error'><p>WordPress Ajax call failed. Please check your WordPress configuration file and make sure the WP_DEBUG is set to false.</p></div>";
errorHtml+="<div class='error'><p>Please click the button below and save with POST method</p></div>"}else errorHtml+="<div class='updated'><p>Please click the button below and save with POST method</p></div>";errorHtml+="<form method='post'>";errorHtml+=formnonce;errorHtml+="<input type='hidden' name='wonderplugin-slider-save-item-post-value' id='wonderplugin-slider-save-item-post-value' value='"+JSON.stringify(extraBackslashConfig()).replace(/"/g,"&quot;").replace(/'/g,"&#39;")+"' />";errorHtml+=
"<p class='submit'><input type='submit' name='wonderplugin-slider-save-item-post' id='wonderplugin-slider-save-item-post' class='button button-primary' value='Save & Publish with Post Method'  /></p>";errorHtml+="</form>";$("#wonderplugin-slider-publish-information").html(errorHtml)};var displayCheck=function(days){var code=days<30?"<p>The trial version will expire in "+String(30-days)+' days. To continue using the plugin after expiration, please <a href="https://www.wonderplugin.com/wordpress-slider/order/" target="_blank">Upgrade to the Pro Version</a>.</p>':
'<p>The 30-day trial period has expired. To continue using the plugin, please <a href="https://www.wonderplugin.com/wordpress-slider/order/" target="_blank">Upgrade to the Pro Version</a>.</p>';$("<div></div>").html(code).dialog({title:"Wonder Slider Trial Version",resizable:false,modal:true,width:480,open:function(){$(this).siblings(".ui-dialog-buttonpane").find("button:eq(1)").focus()},buttons:{"Close":function(){$(this).dialog("close")},"Upgrade to the Pro Version":function(){window.open("https://www.wonderplugin.com/wordpress-slider/order/",
"_blank")}}})};var checkDays=function(){var checkOptions={check:0};if(!checkOptions.check||$("#wonderplugin_slider_initd").length<0)return-1;var initTime=parseInt($("#wonderplugin_slider_initd").text());if(isNaN(initTime)||initTime<=0)return-1;return Math.floor((Math.floor((new Date).getTime()/1E3)-initTime)/86400)};var initCheck=function(){var days=checkDays();if(days<15)return;displayCheck(days)};initCheck();var publishSlider=function(){var days=checkDays();if(days>=30){$("#wonderplugin-slider-publish-information").html('<p>The 30-day trial period has expired. To continue using the plugin, please <a href="https://www.wonderplugin.com/wordpress-slider/order/" target="_blank">Upgrade to the Pro Version</a>.</p>');
displayCheck(days);return}saveCurrentTextEffect();$("#wonderplugin-slider-publish-loading").show();updateSliderOptions();var usepostsave=$("#wonderplugin-slider-usepostsave").text()=="1";if(usepostsave){postPublish("",false);return}var ajaxnonce=$("#wonderplugin-slider-ajaxnonce").text();jQuery.ajax({url:ajaxurl,type:"POST",data:{action:"wonderplugin_slider_save_config",nonce:ajaxnonce,item:JSON.stringify(extraBackslashConfig())},success:function(data){if(wonderplugin_slider_config.id=="-1"&&data&&
data.success&&data.id>=0){var urlparams={};var searcharr=window.location.search.substring(1).split("&");for(var i=0;i<searcharr.length;i++){var value=searcharr[i].split("=");if(value&&value.length==2)urlparams[value[0]]=value[1]}urlparams["page"]="wonderplugin_slider_edit_item";urlparams["itemid"]=data.id;window.history.pushState(null,null,window.location.href.split("?")[0]+"?"+$.param(urlparams))}$("#wonderplugin-slider-publish-loading").hide();if(data&&data.success&&data.id>=0){wonderplugin_slider_config.id=
data.id;$("#wonderplugin-slider-publish-information").html("<div class='updated'><p>The slider has been saved and published: <a href='"+$("#wonderplugin-slider-viewadminurl").text()+"&itemid="+data.id+"' target='_blank'>View Slider</a></p></div>"+"<div class='updated'><p>To embed the slider into your page or post, use shortcode:  [wonderplugin_slider id="+data.id+"]</p></div>"+"<div class='updated'><p>To embed the slider into your template, use php code:  &lt;?php echo do_shortcode('[wonderplugin_slider id="+
data.id+"]'); ?&gt;</p></div>")}else postPublish(data&&data.message?data.message:"",true)},error:function(){$("#wonderplugin-slider-publish-loading").hide();postPublish("",true)}})};var wonderplugin_slider_config=$.extend({},default_options,defaultSkinOptions[default_options["skin"]]);var sliderId=parseInt($("#wonderplugin-slider-id").text());if(sliderId>=0){var config_options={};try{config_options=JSON.parse($("#wonderplugin-slider-id-config").text())}catch(err){}if("isresponsive"in config_options&&
!("fullwidth"in config_options))config_options.fullwidth=config_options.isresponsive;if("skin"in config_options&&config_options.skin in defaultSkinOptions)$.extend(wonderplugin_slider_config,defaultSkinOptions[config_options.skin]);$.extend(wonderplugin_slider_config,config_options);wonderplugin_slider_config.id=sliderId}var i;var j;for(i=0;i<wonderplugin_slider_config.slides.length;i++){if(!("altusetitle"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i]["altusetitle"]=
true;if(!("alt"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i]["alt"]="";if(!("usetexteffect"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i]["usetexteffect"]=false;if(!("texteffect"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i]["texteffect"]="Bottom bar";if(!("weblinklightbox"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i]["weblinklightbox"]=false;if(!("lightboxsize"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i]["lightboxsize"]=
false;if(!("lightboxwidth"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i]["lightboxwidth"]=960;if(!("lightboxheight"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i]["lightboxheight"]=540}for(i=0;i<wonderplugin_slider_config.slides.length;i++){if(wonderplugin_slider_config.slides[i].type==7){if(!("postorderby"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i].postorderby="date";continue}if(wonderplugin_slider_config.slides[i].type==
6){if(!("postorder"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i].postorder="DESC";if(!("postdaterange"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i].postdaterange=false;else if(wonderplugin_slider_config.slides[i].postdaterange!==true&&wonderplugin_slider_config.slides[i].postdaterange!==false)wonderplugin_slider_config.slides[i].postdaterange=wonderplugin_slider_config.slides[i].postdaterange&&wonderplugin_slider_config.slides[i].postdaterange.toLowerCase()===
"true";if(!("postdaterangeafter"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i].postdaterangeafter=30;if(!("selectpostbytags"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i].selectpostbytags=false;else if(wonderplugin_slider_config.slides[i].selectpostbytags!==true&&wonderplugin_slider_config.slides[i].selectpostbytags!==false)wonderplugin_slider_config.slides[i].selectpostbytags=wonderplugin_slider_config.slides[i].selectpostbytags&&wonderplugin_slider_config.slides[i].selectpostbytags.toLowerCase()===
"true";if(!("posttags"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i].posttags="";if(!("postorderby"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i].postorderby="date";if(!("posttitlefield"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i].posttitlefield="%post_title%";if(!("postdescriptionfield"in wonderplugin_slider_config.slides[i]))wonderplugin_slider_config.slides[i].postdescriptionfield="%post_excerpt%";continue}wonderplugin_slider_config.slides[i].title=
wonderplugin_slider_config.slides[i].title?wonderplugin_slider_config.slides[i].title.replace(/\\'/g,"'").replace(/\\"/g,'"'):"";wonderplugin_slider_config.slides[i].description=wonderplugin_slider_config.slides[i].description?wonderplugin_slider_config.slides[i].description.replace(/\\'/g,"'").replace(/\\"/g,'"'):"";wonderplugin_slider_config.slides[i].alt=wonderplugin_slider_config.slides[i].alt?wonderplugin_slider_config.slides[i].alt.replace(/\\'/g,"'").replace(/\\"/g,'"'):""}var cssOptions=["textcss",
"textbgcss","titlecss","descriptioncss","buttoncss","titlecssresponsive","descriptioncssresponsive","buttoncssresponsive"];for(i=0;i<cssOptions.length;i++)wonderplugin_slider_config[cssOptions[i]]=wonderplugin_slider_config[cssOptions[i]].replace(/\\'/g,"'").replace(/\\"/g,'"');for(i=0;i<wonderplugin_slider_config.slides.length;i++){if(wonderplugin_slider_config.slides[i].lightbox!==true&&wonderplugin_slider_config.slides[i].lightbox!==false)wonderplugin_slider_config.slides[i].lightbox=wonderplugin_slider_config.slides[i].lightbox&&
wonderplugin_slider_config.slides[i].lightbox.toLowerCase()==="true";if(wonderplugin_slider_config.slides[i].weblinklightbox!==true&&wonderplugin_slider_config.slides[i].weblinklightbox!==false)wonderplugin_slider_config.slides[i].weblinklightbox=wonderplugin_slider_config.slides[i].weblinklightbox&&wonderplugin_slider_config.slides[i].weblinklightbox.toLowerCase()==="true";if(wonderplugin_slider_config.slides[i].lightboxsize!==true&&wonderplugin_slider_config.slides[i].lightboxsize!==false)wonderplugin_slider_config.slides[i].lightboxsize=
wonderplugin_slider_config.slides[i].lightboxsize&&wonderplugin_slider_config.slides[i].lightboxsize.toLowerCase()==="true";if(wonderplugin_slider_config.slides[i].altusetitle!==true&&wonderplugin_slider_config.slides[i].altusetitle!==false)wonderplugin_slider_config.slides[i].altusetitle=wonderplugin_slider_config.slides[i].altusetitle&&wonderplugin_slider_config.slides[i].altusetitle.toLowerCase()==="true";if(wonderplugin_slider_config.slides[i].usetexteffect!==true&&wonderplugin_slider_config.slides[i].usetexteffect!==
false)wonderplugin_slider_config.slides[i].usetexteffect=wonderplugin_slider_config.slides[i].usetexteffect&&wonderplugin_slider_config.slides[i].usetexteffect.toLowerCase()==="true";if("postlightbox"in wonderplugin_slider_config.slides[i]){if(wonderplugin_slider_config.slides[i].postlightbox!==true&&wonderplugin_slider_config.slides[i].postlightbox!==false)wonderplugin_slider_config.slides[i].postlightbox=wonderplugin_slider_config.slides[i].postlightbox&&wonderplugin_slider_config.slides[i].postlightbox.toLowerCase()===
"true";if(wonderplugin_slider_config.slides[i].postlightboxsize!==true&&wonderplugin_slider_config.slides[i].postlightboxsize!==false)wonderplugin_slider_config.slides[i].postlightboxsize=wonderplugin_slider_config.slides[i].postlightboxsize&&wonderplugin_slider_config.slides[i].postlightboxsize.toLowerCase()==="true";if(wonderplugin_slider_config.slides[i].posttitlelink!==true&&wonderplugin_slider_config.slides[i].posttitlelink!==false)wonderplugin_slider_config.slides[i].posttitlelink=wonderplugin_slider_config.slides[i].posttitlelink&&
wonderplugin_slider_config.slides[i].posttitlelink.toLowerCase()==="true"}}var slideBoolOptions=["metaonsale","metatotalsales","metafeatured","postdaterange","titlelink","imageaction","imageactionlightbox","openpostinlightbox","postlightboxsize"];for(i=0;i<wonderplugin_slider_config.slides.length;i++)if(wonderplugin_slider_config.slides[i].type==7)for(j=0;j<slideBoolOptions.length;j++)if(slideBoolOptions[j]in wonderplugin_slider_config.slides[i]){if(wonderplugin_slider_config.slides[i][slideBoolOptions[j]]!==
true&&wonderplugin_slider_config.slides[i][slideBoolOptions[j]]!==false)wonderplugin_slider_config.slides[i][slideBoolOptions[j]]=wonderplugin_slider_config.slides[i][slideBoolOptions[j]]&&wonderplugin_slider_config.slides[i][slideBoolOptions[j]].toLowerCase()==="true"}else wonderplugin_slider_config.slides[i][slideBoolOptions[j]]=false;var boolOptions=["usejsforfullbrowserwidth","fullbrowserwidth","outputtext","playmutedandinlinewhenautoplay","playsinline","addextraattributes","newestfirst","autoplay",
"randomplay","loadimageondemand","transitiononfirstslide","autoplayvideo","isresponsive","fullwidth","isfullscreen","ratioresponsive","showtext","showtimer","showbottomshadow","navshowpreview","textautohide","pauseonmouseover","lightboxresponsive","lightboxshownavigation","lightboxshowtitle","lightboxshowdescription","texteffectresponsive","donotinit","addinitscript","removeinlinecss","shownav","navthumbresponsive","navshowfeaturedarrow","navshowplaypause","navshowarrow","navshowbuttons","inityoutube",
"initvimeo","lightboxfullscreenmode","lightboxcloseonoverlay","lightboxvideohidecontrols","lightboxnogroup","lightboxshowsocial","lightboxshowfacebook","lightboxshowtwitter","lightboxshowpinterest","lightboxsocialrotateeffect","showsocial","showfacebook","showtwitter","showpinterest","socialrotateeffect","disableinlinecss","addwoocommerceclass","usethumbnailurl","triggerresize","lightboxautoslide","lightboxshowtimer","lightboxshowplaybutton","lightboxalwaysshownavarrows","lightboxshowtitleprefix"];
for(i=0;i<boolOptions.length;i++)if(wonderplugin_slider_config[boolOptions[i]]!==true&&wonderplugin_slider_config[boolOptions[i]]!==false)wonderplugin_slider_config[boolOptions[i]]=wonderplugin_slider_config[boolOptions[i]]&&wonderplugin_slider_config[boolOptions[i]].toLowerCase()==="true";if(wonderplugin_slider_config.dataoptions&&wonderplugin_slider_config.dataoptions.length>0)wonderplugin_slider_config.dataoptions=wonderplugin_slider_config.dataoptions.replace(/\\"/g,'"').replace(/\\'/g,"'");var printConfig=
function(){$("#wonderplugin-newestfirst").prop("checked",wonderplugin_slider_config.newestfirst);$("#wonderplugin-slider-name").val(wonderplugin_slider_config.name);$("#wonderplugin-slider-width").val(wonderplugin_slider_config.width);$("#wonderplugin-slider-height").val(wonderplugin_slider_config.height);updateMediaTable();$(".wonderplugin-tab-skin").find("img").removeClass("selected");$("input:radio[name=wonderplugin-slider-skin][value="+wonderplugin_slider_config.skin+"]").prop("checked",true);
$("input:radio[name=wonderplugin-slider-skin][value="+wonderplugin_slider_config.skin+"]").parent().find("img").addClass("selected");$("#wonderplugin-slider-autoplay").prop("checked",wonderplugin_slider_config.autoplay);$("#wonderplugin-slider-randomplay").prop("checked",wonderplugin_slider_config.randomplay);$("#wonderplugin-slider-loadimageondemand").prop("checked",wonderplugin_slider_config.loadimageondemand);$("#wonderplugin-slider-transitiononfirstslide").prop("checked",wonderplugin_slider_config.transitiononfirstslide);
$("#wonderplugin-slider-pauseonmouseover").prop("checked",wonderplugin_slider_config.pauseonmouseover);$("#wonderplugin-slider-playmutedandinlinewhenautoplay").prop("checked",wonderplugin_slider_config.playmutedandinlinewhenautoplay);$("#wonderplugin-slider-playsinline").prop("checked",wonderplugin_slider_config.playsinline);$("#wonderplugin-slider-autoplayvideo").prop("checked",wonderplugin_slider_config.autoplayvideo);$("#wonderplugin-slider-isresponsive").prop("checked",wonderplugin_slider_config.isresponsive);
$("#wonderplugin-slider-scalemode").val(wonderplugin_slider_config.scalemode);$("#wonderplugin-slider-showtext").prop("checked",wonderplugin_slider_config.showtext);$("#wonderplugin-slider-showtimer").prop("checked",wonderplugin_slider_config.showtimer);$("#wonderplugin-slider-loop").val(wonderplugin_slider_config.loop);$("#wonderplugin-slider-slideinterval").val(wonderplugin_slider_config.slideinterval);$("#wonderplugin-slider-fullwidth").prop("checked",wonderplugin_slider_config.fullwidth);$("#wonderplugin-slider-isfullscreen").prop("checked",
wonderplugin_slider_config.isfullscreen);$("#wonderplugin-slider-fullbrowserwidth").prop("checked",wonderplugin_slider_config.fullbrowserwidth);$("#wonderplugin-slider-usejsforfullbrowserwidth").prop("checked",wonderplugin_slider_config.usejsforfullbrowserwidth);$("#wonderplugin-slider-disableinlinecss").prop("checked",wonderplugin_slider_config.disableinlinecss);$("#wonderplugin-slider-addwoocommerceclass").prop("checked",wonderplugin_slider_config.addwoocommerceclass);$("#wonderplugin-slider-usethumbnailurl").prop("checked",
wonderplugin_slider_config.usethumbnailurl);$("#wonderplugin-slider-addextraattributes").prop("checked",wonderplugin_slider_config.addextraattributes);$("#wonderplugin-slider-imgextraprops").val(wonderplugin_slider_config.imgextraprops);$("#wonderplugin-slider-ratioresponsive").prop("checked",wonderplugin_slider_config.ratioresponsive);$("#wonderplugin-slider-ratiomediumscreen").val(wonderplugin_slider_config.ratiomediumscreen);$("#wonderplugin-slider-ratiomediumheight").val(wonderplugin_slider_config.ratiomediumheight);
$("#wonderplugin-slider-ratiosmallscreen").val(wonderplugin_slider_config.ratiosmallscreen);$("#wonderplugin-slider-ratiosmallheight").val(wonderplugin_slider_config.ratiosmallheight);var transition=wonderplugin_slider_config.transition.split(",");for(var i=0;i<TRANSITION_EFFECTS.length;i++)$("#wonderplugin-slider-effect-"+TRANSITION_EFFECTS[i]).prop("checked",transition.indexOf(TRANSITION_EFFECTS[i])>-1);$("#wonderplugin-slider-sliceduration").val(wonderplugin_slider_config.sliceduration);$("#wonderplugin-slider-blocksduration").val(wonderplugin_slider_config.blocksduration);
$("#wonderplugin-slider-slideduration").val(wonderplugin_slider_config.slideduration);$("#wonderplugin-slider-cssslideduration").val(wonderplugin_slider_config.cssslideduration);$("#wonderplugin-slider-elasticduration").val(wonderplugin_slider_config.elasticduration);$("#wonderplugin-slider-crossfadeduration").val(wonderplugin_slider_config.crossfadeduration);$("#wonderplugin-slider-fadeoutfadeinduration").val(wonderplugin_slider_config.fadeoutfadeinduration);$("#wonderplugin-slider-fadeduration").val(wonderplugin_slider_config.fadeduration);
$("#wonderplugin-slider-shuffleduration").val(wonderplugin_slider_config.shuffleduration);$("#wonderplugin-slider-blindsduration").val(wonderplugin_slider_config.blindsduration);$("#wonderplugin-slider-tilesduration").val(wonderplugin_slider_config.tilesduration);$("#wonderplugin-slider-kenburnsduration").val(wonderplugin_slider_config.kenburnsduration);$("#wonderplugin-slider-flipduration").val(wonderplugin_slider_config.flipduration);$("#wonderplugin-slider-flipwithzoomduration").val(wonderplugin_slider_config.flipwithzoomduration);
$("#wonderplugin-slider-threedduration").val(wonderplugin_slider_config.threedduration);$("#wonderplugin-slider-threedhorizontalduration").val(wonderplugin_slider_config.threedhorizontalduration);$("#wonderplugin-slider-threedwithzoomduration").val(wonderplugin_slider_config.threedwithzoomduration);$("#wonderplugin-slider-threedhorizontalwithzoomduration").val(wonderplugin_slider_config.threedhorizontalwithzoomduration);$("#wonderplugin-slider-threedflipduration").val(wonderplugin_slider_config.threedflipduration);
$("#wonderplugin-slider-threedflipwithzoomduration").val(wonderplugin_slider_config.threedflipwithzoomduration);$("#wonderplugin-slider-threedtilesduration").val(wonderplugin_slider_config.threedtilesduration);$("#wonderplugin-slider-threedfallback").val(wonderplugin_slider_config.threedfallback);$("#wonderplugin-slider-threedhorizontalfallback").val(wonderplugin_slider_config.threedhorizontalfallback);$("#wonderplugin-slider-threedwithzoomfallback").val(wonderplugin_slider_config.threedwithzoomfallback);
$("#wonderplugin-slider-threedhorizontalwithzoomfallback").val(wonderplugin_slider_config.threedhorizontalwithzoomfallback);$("#wonderplugin-slider-threedflipfallback").val(wonderplugin_slider_config.threedflipfallback);$("#wonderplugin-slider-threedflipwithzoomfallback").val(wonderplugin_slider_config.threedflipwithzoomfallback);$("#wonderplugin-slider-threedtilesfallback").val(wonderplugin_slider_config.threedtilesfallback);$("#wonderplugin-slider-outputtext").prop("checked",wonderplugin_slider_config.outputtext);
$("#wonderplugin-slider-titletag").val(wonderplugin_slider_config.titletag);$("#wonderplugin-slider-descriptiontag").val(wonderplugin_slider_config.descriptiontag);$("#wonderplugin-slider-inityoutube").prop("checked",wonderplugin_slider_config.inityoutube);$("#wonderplugin-slider-initvimeo").prop("checked",wonderplugin_slider_config.initvimeo);$("#wonderplugin-slider-ga4account").val(wonderplugin_slider_config.ga4account);$("#wonderplugin-slider-googleanalyticsaccount").val(wonderplugin_slider_config.googleanalyticsaccount);
$("#wonderplugin-slider-lightboxnogroup").prop("checked",wonderplugin_slider_config.lightboxnogroup);$("#wonderplugin-slider-lightboxresponsive").prop("checked",wonderplugin_slider_config.lightboxresponsive);$("#wonderplugin-slider-lightboxshownavigation").prop("checked",wonderplugin_slider_config.lightboxshownavigation);$("#wonderplugin-slider-lightboxshowtitle").prop("checked",wonderplugin_slider_config.lightboxshowtitle);$("#wonderplugin-slider-lightboxshowdescription").prop("checked",wonderplugin_slider_config.lightboxshowdescription);
$("#wonderplugin-slider-lightboxthumbwidth").val(wonderplugin_slider_config.lightboxthumbwidth);$("#wonderplugin-slider-lightboxthumbheight").val(wonderplugin_slider_config.lightboxthumbheight);$("#wonderplugin-slider-lightboxthumbtopmargin").val(wonderplugin_slider_config.lightboxthumbtopmargin);$("#wonderplugin-slider-lightboxthumbbottommargin").val(wonderplugin_slider_config.lightboxthumbbottommargin);$("#wonderplugin-slider-lightboxbarheight").val(wonderplugin_slider_config.lightboxbarheight);
$("#wonderplugin-slider-lightboxtitlebottomcss").val(wonderplugin_slider_config.lightboxtitlebottomcss);$("#wonderplugin-slider-lightboxdescriptionbottomcss").val(wonderplugin_slider_config.lightboxdescriptionbottomcss);$("#wonderplugin-slider-lightboxadvancedoptions").val(wonderplugin_slider_config.lightboxadvancedoptions);$("#wonderplugin-slider-lightboxvideohidecontrols").prop("checked",wonderplugin_slider_config.lightboxvideohidecontrols);$("#wonderplugin-slider-lightboxfullscreenmode").prop("checked",
wonderplugin_slider_config.lightboxfullscreenmode);$("#wonderplugin-slider-lightboxcloseonoverlay").prop("checked",wonderplugin_slider_config.lightboxcloseonoverlay);$("#wonderplugin-slider-lightboxtitlestyle").val(wonderplugin_slider_config.lightboxtitlestyle);$("#wonderplugin-slider-lightboximagepercentage").val(wonderplugin_slider_config.lightboximagepercentage);$("#wonderplugin-slider-lightboxdefaultvideovolume").val(wonderplugin_slider_config.lightboxdefaultvideovolume);$("#wonderplugin-slider-lightboxoverlaybgcolor").val(wonderplugin_slider_config.lightboxoverlaybgcolor);
$("#wonderplugin-slider-lightboxoverlayopacity").val(wonderplugin_slider_config.lightboxoverlayopacity);$("#wonderplugin-slider-lightboxbgcolor").val(wonderplugin_slider_config.lightboxbgcolor);$("#wonderplugin-slider-lightboxtitleprefix").val(wonderplugin_slider_config.lightboxtitleprefix);$("#wonderplugin-slider-lightboxtitleinsidecss").val(wonderplugin_slider_config.lightboxtitleinsidecss);$("#wonderplugin-slider-lightboxdescriptioninsidecss").val(wonderplugin_slider_config.lightboxdescriptioninsidecss);
$("#wonderplugin-slider-lightboxtitleoutsidecss").val(wonderplugin_slider_config.lightboxtitleoutsidecss);$("#wonderplugin-slider-lightboxdescriptionoutsidecss").val(wonderplugin_slider_config.lightboxdescriptionoutsidecss);$("#wonderplugin-slider-lightboxautoslide").prop("checked",wonderplugin_slider_config.lightboxautoslide);$("#wonderplugin-slider-lightboxshowtimer").prop("checked",wonderplugin_slider_config.lightboxshowtimer);$("#wonderplugin-slider-lightboxshowplaybutton").prop("checked",wonderplugin_slider_config.lightboxshowplaybutton);
$("#wonderplugin-slider-lightboxalwaysshownavarrows").prop("checked",wonderplugin_slider_config.lightboxalwaysshownavarrows);$("#wonderplugin-slider-lightboxshowtitleprefix").prop("checked",wonderplugin_slider_config.lightboxshowtitleprefix);$("#wonderplugin-slider-lightboxslideinterval").val(wonderplugin_slider_config.lightboxslideinterval);$("#wonderplugin-slider-lightboxtimerposition").val(wonderplugin_slider_config.lightboxtimerposition);$("#wonderplugin-slider-lightboxtimerheight").val(wonderplugin_slider_config.lightboxtimerheight);
$("#wonderplugin-slider-lightboxtimercolor").val(wonderplugin_slider_config.lightboxtimercolor);$("#wonderplugin-slider-lightboxtimeropacity").val(wonderplugin_slider_config.lightboxtimeropacity);$("#wonderplugin-slider-lightboxbordersize").val(wonderplugin_slider_config.lightboxbordersize);$("#wonderplugin-slider-lightboxborderradius").val(wonderplugin_slider_config.lightboxborderradius);$("#wonderplugin-slider-lightboxshowsocial").prop("checked",wonderplugin_slider_config.lightboxshowsocial);$("#wonderplugin-slider-lightboxsocialposition").val(wonderplugin_slider_config.lightboxsocialposition);
$("#wonderplugin-slider-lightboxsocialpositionsmallscreen").val(wonderplugin_slider_config.lightboxsocialpositionsmallscreen);$("#wonderplugin-slider-lightboxsocialdirection").val(wonderplugin_slider_config.lightboxsocialdirection);$("#wonderplugin-slider-lightboxsocialbuttonsize").val(wonderplugin_slider_config.lightboxsocialbuttonsize);$("#wonderplugin-slider-lightboxsocialbuttonfontsize").val(wonderplugin_slider_config.lightboxsocialbuttonfontsize);$("#wonderplugin-slider-lightboxsocialrotateeffect").prop("checked",
wonderplugin_slider_config.lightboxsocialrotateeffect);$("#wonderplugin-slider-lightboxshowfacebook").prop("checked",wonderplugin_slider_config.lightboxshowfacebook);$("#wonderplugin-slider-lightboxshowtwitter").prop("checked",wonderplugin_slider_config.lightboxshowtwitter);$("#wonderplugin-slider-lightboxshowpinterest").prop("checked",wonderplugin_slider_config.lightboxshowpinterest);$("#wonderplugin-slider-showsocial").prop("checked",wonderplugin_slider_config.showsocial);$("#wonderplugin-slider-socialmode").val(wonderplugin_slider_config.socialmode);
$("#wonderplugin-slider-socialposition").val(wonderplugin_slider_config.socialposition);$("#wonderplugin-slider-socialpositionsmallscreen").val(wonderplugin_slider_config.socialpositionsmallscreen);$("#wonderplugin-slider-socialdirection").val(wonderplugin_slider_config.socialdirection);$("#wonderplugin-slider-socialbuttonsize").val(wonderplugin_slider_config.socialbuttonsize);$("#wonderplugin-slider-socialbuttonfontsize").val(wonderplugin_slider_config.socialbuttonfontsize);$("#wonderplugin-slider-socialrotateeffect").prop("checked",
wonderplugin_slider_config.socialrotateeffect);$("#wonderplugin-slider-showfacebook").prop("checked",wonderplugin_slider_config.showfacebook);$("#wonderplugin-slider-showtwitter").prop("checked",wonderplugin_slider_config.showtwitter);$("#wonderplugin-slider-showpinterest").prop("checked",wonderplugin_slider_config.showpinterest);printSkinOptions(wonderplugin_slider_config);$("#wonderplugin-slider-donotinit").prop("checked",wonderplugin_slider_config.donotinit);$("#wonderplugin-slider-addinitscript").prop("checked",
wonderplugin_slider_config.addinitscript);$("#wonderplugin-slider-triggerresize").prop("checked",wonderplugin_slider_config.triggerresize);$("#wonderplugin-slider-triggerresizedelay").val(wonderplugin_slider_config.triggerresizedelay);$("#wonderplugin-slider-removeinlinecss").prop("checked",wonderplugin_slider_config.removeinlinecss);$("#wonderplugin-slider-custom-css").val(wonderplugin_slider_config.customcss);$("#wonderplugin-slider-data-options").val(wonderplugin_slider_config.dataoptions);$("#wonderplugin-slider-customjs").val(wonderplugin_slider_config.customjs)};
printConfig()});$.fn.wpdraggable=function(callback){this.css("cursor","move").on("mousedown",function(e){var $dragged=$(this);var x=$dragged.offset().left-e.pageX;var y=$dragged.offset().top-e.pageY;var z=$dragged.css("z-index");$(document).on("mousemove.wpdraggable",function(e){$dragged.css({"z-index":999}).offset({left:x+e.pageX,top:y+e.pageY});e.preventDefault()}).one("mouseup",function(){$(this).off("mousemove.wpdraggable click.wpdraggable");$dragged.css("z-index",z);var i=$dragged.data("order");
var coltotal=Math.floor($dragged.parent().parent().parent().innerWidth()/$dragged.parent().parent().outerWidth());var row=Math.floor(($dragged.offset().top-$dragged.parent().parent().parent().offset().top)/$dragged.parent().parent().outerHeight());var col=Math.floor(($dragged.offset().left-$dragged.parent().parent().parent().offset().left)/$dragged.parent().parent().outerWidth());var j=row*coltotal+col;callback(i,j)});e.preventDefault()});return this}})(jQuery);
(function($){$(document).ready(function(){var wp_replace_list=new Array({"search":"","replace":""});init_render();render_list();function update_list(){wp_replace_list=new Array;for(var i=0;;i++){if($("#olddomain"+i).length<=0)break;wp_replace_list.push({"search":$.trim($("#olddomain"+i).val()),"replace":$.trim($("#newdomain"+i).val())})}}function render_list(){var replace_code="";for(var i=0;i<wp_replace_list.length;i++){replace_code+='<p><input type="text" size="40" name="olddomain'+i+'" id="olddomain'+
i+'" placeholder="Search" value="'+wp_replace_list[i].search+'" >';replace_code+='<span class="dashicons dashicons-arrow-right-alt" style="margin:0 12px;line-height:inherit;"></span>';replace_code+='<input type="text" size="40" name="newdomain'+i+'" id="newdomain'+i+'" placeholder="Replace" value="'+wp_replace_list[i].replace+'" >';replace_code+='<span class="dashicons dashicons-no wp-delete-replace-list" style="margin:0 12px;line-height:inherit;cursor:pointer;" data-listid='+i+"></span></p>"}$("#wp-search-replace").html(replace_code)}
function init_render(){$("body").on("click",".wp-delete-replace-list",function(){update_list();wp_replace_list.splice($(this).data("listid"),1);render_list()});$("#wp-add-replace-list").click(function(){update_list();wp_replace_list.push({"search":"","replace":""});render_list();return false});$("#wp-import-submit").click(function(){if(!$("#wp-importxml").val()){$("#wp-import-error").show().html("<p>Error: please select an exported .xml file.</p>");return false}else $("#wp-import-error").hide();update_list();
for(var i=0;i<wp_replace_list.length;i++){if(wp_replace_list[i].search.length>0&&wp_replace_list[i].replace.length<=0){$("#wp-replace-error").show().html("<p>Error: please enter the new domain or delete the whole row.</p>");return false}if(wp_replace_list[i].search.length<=0&&wp_replace_list[i].replace.length>0){$("#wp-replace-error").show().html("<p>Error: please enter the old domain or delete the whole row.</p>");return false}}})}})})(jQuery);
(function($){$(document).ready(function(){var wp_replace_list=new Array({"search":"","replace":""});init_render();render_list();function update_list(){wp_replace_list=new Array;for(var i=0;;i++){if($("#standalonesearch"+i).length<=0)break;wp_replace_list.push({"search":$.trim($("#standalonesearch"+i).val()),"replace":$.trim($("#standalonereplace"+i).val())})}}function render_list(){var replace_code="";for(var i=0;i<wp_replace_list.length;i++){replace_code+='<p><input type="text" size="40" name="standalonesearch'+
i+'" id="standalonesearch'+i+'" placeholder="Search" value="'+wp_replace_list[i].search+'" >';replace_code+='<span class="dashicons dashicons-arrow-right-alt" style="margin:0 12px;line-height:inherit;"></span>';replace_code+='<input type="text" size="40" name="standalonereplace'+i+'" id="standalonereplace'+i+'" placeholder="Replace" value="'+wp_replace_list[i].replace+'" >';replace_code+='<span class="dashicons dashicons-no wp-standalone-delete-replace-list" style="margin:0 12px;line-height:inherit;cursor:pointer;" data-listid='+
i+"></span></p>"}$("#wp-standalone-search-replace").html(replace_code)}function init_render(){$("body").on("click",".wp-standalone-delete-replace-list",function(){update_list();wp_replace_list.splice($(this).data("listid"),1);render_list()});$("#wp-add-standalone-replace-list").click(function(){update_list();wp_replace_list.push({"search":"","replace":""});render_list();return false});$("#wp-search-replace-submit").click(function(){update_list();for(var i=0;i<wp_replace_list.length;i++){if(wp_replace_list[i].search.length>
0&&wp_replace_list[i].replace.length<=0){$("#wp-standalone-replace-error").show().html("<p>Error: please enter the string to replace or delete the whole row.</p>");return false}if(wp_replace_list[i].search.length<=0&&wp_replace_list[i].replace.length>0){$("#wp-standalone-replace-error").show().html("<p>Error: please enter the string to search or delete the whole row.</p>");return false}}})}});$.wpSliderCookie=function(key,value,options){if(typeof value!=="undefined"){options=$.extend({},{path:"/"},
options);if(options.expires){var seconds=options.expires;options.expires=new Date;options.expires.setTime(options.expires.getTime()+seconds*1E3)}return document.cookie=key+"="+encodeURIComponent(value)+(options.expires?";expires="+options.expires.toUTCString():"")+(options.path?";path="+options.path:"")}var result=null;var cookies=document.cookie?document.cookie.split(";"):[];for(var i in cookies){var parts=$.trim(cookies[i]).split("=");if(parts.length&&parts[0]==key){result=decodeURIComponent(parts[1]);
break}}return result};$.wpSliderRemoveCookie=function(key){return $.wpSliderCookie(key,"",$.extend({},{expires:-1}))}})(jQuery);
