/** Wonderplugin Carousel Plugin Free Version * Copyright 2015 Magic Hills Pty Ltd All Rights Reserved * Website: http://www.wonderplugin.com * Version 12.3 */ (function($){$(document).ready(function(){$(".wonderplugin-engine").css({display:"none"});$(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")});$(".wonderplugin-tab-buttons-horizontal").each(function(){var index=$.wpcarouselCookie($(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");$.wpcarouselCookie($(this).parent().attr("id"),index)})})});$("#wonderplugin-carousel-fixaspectratio").click(function(){if($(this).is(":checked")){$("#wonderplugin-carousel-sameheight").prop("checked",false);$("#wonderplugin-carousel-fitimage").prop("checked",false)}});$("#wonderplugin-carousel-sameheight").click(function(){if($(this).is(":checked")){$("#wonderplugin-carousel-fixaspectratio").prop("checked", false);$("#wonderplugin-carousel-fitimage").prop("checked",false)}});$("#wonderplugin-carousel-fitimage").click(function(){if($(this).is(":checked")){$("#wonderplugin-carousel-fixaspectratio").prop("checked",false);$("#wonderplugin-carousel-sameheight").prop("checked",false)}});$("#wonderplugin-carousel-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-carousel-tabs").children("li").removeClass("wonderplugin-tab-selected");$("#wonderplugin-carousel-tabs").children("li").eq(index).addClass("wonderplugin-tab-selected");$("#wonderplugin-carousel-tabs").removeClass("wonderplugin-tabs-grey");if(index==3){previewCarousel();$("#wonderplugin-carousel-tabs").addClass("wonderplugin-tabs-grey")}else if(index==4)publishCarousel()})});var socialbgcolor={"facebook":"#3b5998", "dribbble":"#d94a8b","dropbox":"#477ff2","mail":"#4d83ff","flickr":"#3c58e6","git":"#4174ba","gplus":"#e45104","instagram":"#d400c8","linkedin":"#458bb7","pinterest":"#c92228","reddit":"#ee5300","skype":"#53adf5","tumblr":"#415878","twitter":"#03b3ee","link":"#517dd9","whatsapp":"#72be44","youtube":"#c7221b"};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"+"
"+"

"+""+"";if(dialogType==2||dialogType==3)dialogCode+=""+""+""+ ""+"";dialogCode+=""+""+""+""+""+""+""+ ""+""+""+""+""; if(dialogType==1)dialogCode+=""+""+""+""+""+""+""+""+ "";if(dialogType==11)dialogCode+=""+""+""+"";dialogCode+="
Enter video URL
Enter"+(dialogType>0?" poster":"")+" image URL or
Thumbnail URL"+" or
"+""+"
MP4 video URL or
WebM video URL (Optional) or
PDF URL or "+"
  • To support PDF files, please install the free plugin WonderPlugin PDF Embed first.
  • The PDF file must be hosted at the same domain as the WordPrss website
"+ "
";dialogCode+='";dialogCode+='
"+"";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('').val("-1");$(".wonderplugin-dialog-term").empty().append('').val("-1");if(customposttype!="-1")for(var i=0;iTaxonomy: '+custompostlist[i].taxonomies[j].name+"");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('').val("-1");if(customposttype!="-1"&&taxonomy!="-1")for(var i=0;iTerm: '+custompostlist[i].taxonomies[j].terms[k].slug+"");break}break}};$("#wonderplugin-dialog-taxonomy-container").on("click",".wonderplugin-dialog-addtaxonomy",function(){var total=$("#wonderplugin-dialog-taxonomy-container").data("taxonomytotal"); var taxonomyCode=$("
");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="";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=$("
"); 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="";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;iPlease select a custom post type

");return}var item={type:dialogType,customposttype:$("#wonderplugin-dialog-customposttype").val(),taxonomyrelation:$("#wonderplugin-dialog-taxonomyrelation").val(),metatotalsales:$("#wonderplugin-dialog-metatotalsales").is(":checked"),metafeatured:$("#wonderplugin-dialog-metafeatured").is(":checked"),metarelation:$("#wonderplugin-dialog-metarelation").val(),postnumber:$("#wonderplugin-dialog-postnumber").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()})}); var addPageDialog=function(dialogType,onSuccess,data,dataIndex){var dialogCode="
"+"
"+"
"+"

Add WordPress Page

"+"";dialogCode+='
    '+'
  • Select a Page
  • '+ '
  • Page Options
  • '+"
";dialogCode+='
    '+'
  • ';dialogCode+="

    "+ "

    ";dialogCode+="

    "; dialogCode+="

    "; dialogCode+='
  • ';dialogCode+="";dialogCode+="";dialogCode+=""; dialogCode+="";dialogCode+="";dialogCode+=""; dialogCode+="
    Featured Image Size
    Maximum Excerpt Word Length
    On clicking the image
    ";dialogCode+=" /
    "; dialogCode+="
    Title
    Link Target
    "+"
    • The featured image of the page will be used as the image of the carousel item. For how to define featured images for pages, please view WordPress Featured Images.
    • "+"
    • The title of the page will be used as the title property of the carousel item.
    • "+"
    • The excerpt of a page will be used as the description property of the carousel item. For how to add excerpts for posts, please view WordPress Excerpts.
    "; dialogCode+="
";dialogCode+="
"+""+""+"
"+"
"+"
";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 display_pagelist=function(searchtext){var selectedid=$("#wonderplugin-dialog-pagelist").data("selectedpageid");$("#wonderplugin-dialog-pagelist").empty();var pagelist=$.parseJSON($("#wonderplugin-carousel-pagelist").text());for(var i=0;i'+'
'+''+"
"+'
'+pagelist[i].ID+"
"+'
'+pagelist[i].post_author+"
"+'
'+pagelist[i].post_title+"
"+'
';$("#wonderplugin-dialog-pagelist").append(pageitem)}$(".wonderplugin-dialog-pagelist-item").click(function(){$(".wonderplugin-dialog-pagelist-item").removeClass("wonderplugin-dialog-pagelist-item-selected"); $(this).addClass("wonderplugin-dialog-pagelist-item-selected");var selected=$(this).find("input:radio[name=wonderplugin-dialog-pagelist-item-radioinput]");selected.attr("checked",true);$("#wonderplugin-dialog-pagelist").data("selectedpageid",selected.val());var selectedhtml="Select Page ID: "+$(this).find(".wonderplugin-dialog-pagelist-item-id").text()+", Author: "+$(this).find(".wonderplugin-dialog-pagelist-item-author").text()+", Title: "+$(this).find(".wonderplugin-dialog-pagelist-item-title").text(); $("#wonderplugin-dialog-pagelistselected").html(selectedhtml)})};$("#wonderplugin-dialog-pagelistsearch").click(function(){var searchtext=$.trim($("#wonderplugin-dialog-pagelistsearchtext").val());display_pagelist(searchtext)});$("#wonderplugin-dialog-pagelistsearchtext").on("keyup",function(e){var searchtext=$.trim($("#wonderplugin-dialog-pagelistsearchtext").val());display_pagelist(searchtext)});display_pagelist();if(data){if(data.pageid>0){$("input:radio[name=wonderplugin-dialog-pagelist-item-radioinput][value="+ data.pageid+"]").attr("checked",true);if($("input[name=wonderplugin-dialog-pagelist-item-radioinput]:checked").length>0){var item=$("input[name=wonderplugin-dialog-pagelist-item-radioinput]:checked").closest(".wonderplugin-dialog-pagelist-item");$(".wonderplugin-dialog-pagelist-item").removeClass("wonderplugin-dialog-pagelist-item-selected");item.addClass("wonderplugin-dialog-pagelist-item-selected");var t=item.position().top;$("#wonderplugin-dialog-pagelist").scrollTop(t);$("#wonderplugin-dialog-pagelist").data("selectedpageid", data.pageid);var selectedhtml="Select Page ID: "+item.find(".wonderplugin-dialog-pagelist-item-id").text()+", Author: "+item.find(".wonderplugin-dialog-pagelist-item-author").text()+", Title: "+item.find(".wonderplugin-dialog-pagelist-item-title").text();$("#wonderplugin-dialog-pagelistselected").html(selectedhtml)}}$("#wonderplugin-dialog-pagechildmode").val(data.pagechildmode);$("#wonderplugin-dialog-pageorderby").val(data.pageorderby);$("#wonderplugin-dialog-pageorder").val(data.pageorder);$("#wonderplugin-dialog-featuredimagesize").val(data.featuredimagesize); $("#wonderplugin-dialog-excerptlength").val(data.excerptlength);$("#wonderplugin-dialog-postlinktarget").val(data.postlinktarget);if("postlightbox"in data){$("input[name=wonderplugin-dialog-postlightbox][value="+(data.postlightbox?1:0)+"]").attr("checked",true);$("#wonderplugin-dialog-postlightbox-size").attr("checked",data.postlightboxsize);$("#wonderplugin-dialog-postlightbox-width").val(data.postlightboxwidth);$("#wonderplugin-dialog-postlightbox-height").val(data.postlightboxheight);$("#wonderplugin-dialog-titlelink").attr("checked", data.posttitlelink)}}$("#wonderplugin-dialog-ok").click(function(){var selectedid=$("#wonderplugin-dialog-pagelist").data("selectedpageid");if(!selectedid){$("#wonderplugin-dialog-error").css({display:"block"}).html("

Please select a page

");return}var selectedpageid=$("#wonderplugin-dialog-pagelist").data("selectedpageid");selectedpageid=selectedpageid?selectedpageid:-1;var item={type:dialogType,pageid:selectedpageid,pagechildmode:$("#wonderplugin-dialog-pagechildmode").val(),pageorderby:$("#wonderplugin-dialog-pageorderby").val(), pageorder:$("#wonderplugin-dialog-pageorder").val(),featuredimagesize:$("#wonderplugin-dialog-featuredimagesize").val(),excerptlength:$("#wonderplugin-dialog-excerptlength").val(),postlinktarget:$("#wonderplugin-dialog-postlinktarget").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-page").click(function(){addPageDialog(8,function(data){addMediaToList(data);updateMediaTable()})});$("#wonderplugin-reverselist").click(function(){wonderplugin_carousel_config.slides.reverse();updateMediaTable()});$("#wonderplugin-deleteall").click(function(){$("
").html("Are you sure to remove all items?").dialog({title:"WonderPlugin Carousel", resizable:false,modal:true,buttons:{"Yes":function(){$(this).dialog("close");wonderplugin_carousel_config.slides.length=0;updateMediaTable()},"No":function(){$(this).dialog("close")},"Cancel":function(){$(this).dialog("close")}}})});$(document).on("click",".wonderplugin-carousel-media-table-edit",function(){var index=$(this).parent().parent().index();var mediaType=wonderplugin_carousel_config.slides[index].type;if(mediaType==10)youtubePlaylistDialog(function(items){if(items&&items.length>0){wonderplugin_carousel_config.slides.splice(index, 1);items.map(function(data){wonderplugin_carousel_config.slides.splice(index,0,{type:10,youtubeapikey:data.youtubeapikey,youtubeplaylistid:data.youtubeplaylistid,youtubeplaylistmaxresults:data.youtubeplaylistmaxresults,lightbox:data.lightbox,lightboxsize:data.lightboxsize,lightboxwidth:data.lightboxwidth,lightboxheight:data.lightboxheight,displaythumbnail:false,mp4:"",webm:"",weblink:"",clickhandler:"",linktarget:"",weblinklightbox:false})});updateMediaTable()}},wonderplugin_carousel_config.slides[index], index);else if(mediaType==6)addPostsDialog(6,function(data){wonderplugin_carousel_config.slides.splice(index,1);wonderplugin_carousel_config.slides.splice(index,0,data);updateMediaTable()},wonderplugin_carousel_config.slides[index],index);else if(mediaType==7)addCustomPostDialog(7,function(data){wonderplugin_carousel_config.slides.splice(index,1);wonderplugin_carousel_config.slides.splice(index,0,data);updateMediaTable()},wonderplugin_carousel_config.slides[index],index);else if(mediaType==8)addPageDialog(8, function(data){wonderplugin_carousel_config.slides.splice(index,1);wonderplugin_carousel_config.slides.splice(index,0,data);updateMediaTable()},wonderplugin_carousel_config.slides[index],index);else slideDialog(mediaType,function(items){if(items&&items.length>0){wonderplugin_carousel_config.slides.splice(index,1);items.map(function(data){var itemdata={type:mediaType,image:data.image,thumbnail:data.thumbnail?data.thumbnail:data.image,displaythumbnail:data.displaythumbnail,video:data.video,mp4:data.mp4, webm:data.webm,title:data.title,description:data.description,button:data.button,buttoncss:data.buttoncss,buttonlink:data.buttonlink,buttonlinktarget:data.buttonlinktarget,buttonlightbox:data.buttonlightbox,socialmedia:data.socialmedia,socialmediatarget:data.socialmediatarget,socialmediarotate:data.socialmediarotate,altusetitle:data.altusetitle,alt:data.alt,weblink:data.weblink,clickhandler:data.clickhandler,linktarget:data.linktarget,weblinklightbox:data.weblinklightbox,lightbox:data.lightbox,lightboxsize:data.lightboxsize, lightboxwidth:data.lightboxwidth,lightboxheight:data.lightboxheight};if(mediaType==11)itemdata.pdf=data.pdf;wonderplugin_carousel_config.slides.splice(index,0,itemdata)});updateMediaTable()}},wonderplugin_carousel_config.slides[index],index)});$(document).on("click",".wonderplugin-carousel-media-table-delete",function(){var $tr=$(this).parent().parent();var index=$tr.index();wonderplugin_carousel_config.slides.splice(index,1);$tr.remove();$("#wonderplugin-carousel-media-table").find("li").each(function(index){$(this).find(".wonderplugin-carousel-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_carousel_config.slides.length;if(j<0)j=0;if(j>len-1)j=len-1;if(i==j){$("#wonderplugin-carousel-media-table").find("li").eq(i).find("img").css({top:0,left:0});return}var $tr=$("#wonderplugin-carousel-media-table").find("li").eq(i);var data=wonderplugin_carousel_config.slides[i];wonderplugin_carousel_config.slides.splice(i,1);wonderplugin_carousel_config.slides.splice(j, 0,data);var $trj=$("#wonderplugin-carousel-media-table").find("li").eq(j);$tr.remove();if(j>i)$trj.after($tr);else $trj.before($tr);$("#wonderplugin-carousel-media-table").find("li").each(function(index){$(this).find(".wonderplugin-carousel-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-carousel-media-table-moveup",function(){var $tr=$(this).parent().parent(); var index=$tr.index();var data=wonderplugin_carousel_config.slides[index];wonderplugin_carousel_config.slides.splice(index,1);if(index==0){wonderplugin_carousel_config.slides.push(data);var $last=$tr.parent().find("li:last");$tr.remove();$last.after($tr)}else{wonderplugin_carousel_config.slides.splice(index-1,0,data);var $prev=$tr.prev();$tr.remove();$prev.before($tr)}$("#wonderplugin-carousel-media-table").find("li").each(function(index){$(this).find(".wonderplugin-carousel-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-carousel-media-table-movedown",function(){var $tr=$(this).parent().parent();var index=$tr.index();var len=wonderplugin_carousel_config.slides.length;var data=wonderplugin_carousel_config.slides[index];wonderplugin_carousel_config.slides.splice(index,1);if(index==len-1){wonderplugin_carousel_config.slides.unshift(data); var $first=$tr.parent().find("li:first");$tr.remove();$first.before($tr)}else{wonderplugin_carousel_config.slides.splice(index+1,0,data);var $next=$tr.next();$tr.remove();$next.after($tr)}$("#wonderplugin-carousel-media-table").find("li").each(function(index){$(this).find(".wonderplugin-carousel-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 Carousel",slides:[],skin:"classic",autoplaydir:"left",donotcircularforless:false,circularlimit:3,fixaspectratio:true,centerimage:true,fitimage:false,fitcenterimage:false,sameheight:false,sameheightresponsive:false,sameheightmediumscreen:769,sameheightmediumheight:200,sameheightsmallscreen:415,sameheightsmallheight:150,fullwidth:false,hidecontaineroninit:true,hidecontainerbeforeloaded:false,spacing:8,imgextraprops:"",aextraprops:"",showimgtitle:false,addwoocommerceclass:true,imgtitle:"title", customcss:"",dataoptions:"",customjs:"",lightboxresponsive:true,lightboxshownavigation:false,lightboxnogroup:false,lightboxshowtitle:true,lightboxshowdescription:false,lightboxaddsocialmedia:false,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;", lightboxdescriptioninsidecss:"color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;",lightboxautoslide:false,lightboxslideinterval:5E3,lightboxshowtimer:true,lightboxtimerposition:"bottom",lightboxtimerheight:2,lightboxtimercolor:"#dc572e",lightboxtimeropacity:1,lightboxshowplaybutton:true,lightboxalwaysshownavarrows:false,lightboxbordersize:8,lightboxshowtitleprefix:true,lightboxborderradius:0,lightboximagekeepratio:true, lightboxadvancedoptions:"",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,donotinit:false,addinitscript:false,doshortcodeontext:false,triggerresize:false,triggerresizedelay:100, 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;}"};var configSkinOptions=["width","height","spacing","rownumber","centerimage","fitimage", "fitcenterimage","fixaspectratio","autoplay","random","circular","direction","responsive","visibleitems","autoplaydir","pauseonmouseover","scrollmode","interval","transitionduration","continuous","continuousduration","arrowstyle","arrowimage","arrowwidth","arrowheight","donotcircularforless","circularlimit","navstyle","navimage","navwidth","navheight","navspacing","hidecontainerbeforeloaded","hidecontaineroninit","fullwidth","sameheight","sameheightresponsive","sameheightmediumscreen","sameheightmediumheight", "sameheightsmallscreen","sameheightsmallheight","showhoveroverlay","hoveroverlayimage","screenquery"];var defaultSkinOptions={};for(var key in WONDERPLUGIN_CAROUSEL_SKIN_OPTIONS){defaultSkinOptions[key]={};for(var i=0;i/g,">");wonderplugin_carousel_config.skincss= $.trim($("#wonderplugin-carousel-skincss").val());wonderplugin_carousel_config.customcss=$.trim($("#wonderplugin-carousel-custom-css").val());wonderplugin_carousel_config.dataoptions=$.trim($("#wonderplugin-carousel-data-options").val());wonderplugin_carousel_config.customjs=$.trim($("#wonderplugin-carousel-customjs").val());wonderplugin_carousel_config.lightboxresponsive=$("#wonderplugin-carousel-lightboxresponsive").is(":checked");wonderplugin_carousel_config.lightboxshownavigation=$("#wonderplugin-carousel-lightboxshownavigation").is(":checked"); wonderplugin_carousel_config.lightboxnogroup=$("#wonderplugin-carousel-lightboxnogroup").is(":checked");wonderplugin_carousel_config.lightboxshowtitle=$("#wonderplugin-carousel-lightboxshowtitle").is(":checked");wonderplugin_carousel_config.lightboxshowdescription=$("#wonderplugin-carousel-lightboxshowdescription").is(":checked");wonderplugin_carousel_config.lightboxaddsocialmedia=$("#wonderplugin-carousel-lightboxaddsocialmedia").is(":checked");wonderplugin_carousel_config.lightboxvideohidecontrols= $("#wonderplugin-carousel-lightboxvideohidecontrols").is(":checked");wonderplugin_carousel_config.lightboxfullscreenmode=$("#wonderplugin-carousel-lightboxfullscreenmode").is(":checked");wonderplugin_carousel_config.lightboxcloseonoverlay=$("#wonderplugin-carousel-lightboxcloseonoverlay").is(":checked");wonderplugin_carousel_config.lightboxtitlestyle=$.trim($("#wonderplugin-carousel-lightboxtitlestyle").val());wonderplugin_carousel_config.lightboxdefaultvideovolume=parseFloat($.trim($("#wonderplugin-carousel-lightboxdefaultvideovolume").val())); wonderplugin_carousel_config.lightboximagepercentage=parseInt($.trim($("#wonderplugin-carousel-lightboximagepercentage").val()));wonderplugin_carousel_config.lightboxoverlayopacity=parseFloat($.trim($("#wonderplugin-carousel-lightboxoverlayopacity").val()));wonderplugin_carousel_config.lightboxoverlaybgcolor=$.trim($("#wonderplugin-carousel-lightboxoverlaybgcolor").val());wonderplugin_carousel_config.lightboxbgcolor=$.trim($("#wonderplugin-carousel-lightboxbgcolor").val());wonderplugin_carousel_config.lightboxtitleprefix= $("#wonderplugin-carousel-lightboxtitleprefix").val();wonderplugin_carousel_config.lightboxtitleinsidecss=$.trim($("#wonderplugin-carousel-lightboxtitleinsidecss").val());wonderplugin_carousel_config.lightboxdescriptioninsidecss=$.trim($("#wonderplugin-carousel-lightboxdescriptioninsidecss").val());wonderplugin_carousel_config.lightboxadvancedoptions=$.trim($("#wonderplugin-carousel-lightboxadvancedoptions").val());wonderplugin_carousel_config.lightboxautoslide=$("#wonderplugin-carousel-lightboxautoslide").is(":checked"); wonderplugin_carousel_config.lightboxshowtimer=$("#wonderplugin-carousel-lightboxshowtimer").is(":checked");wonderplugin_carousel_config.lightboxshowplaybutton=$("#wonderplugin-carousel-lightboxshowplaybutton").is(":checked");wonderplugin_carousel_config.lightboxalwaysshownavarrows=$("#wonderplugin-carousel-lightboxalwaysshownavarrows").is(":checked");wonderplugin_carousel_config.lightboxshowtitleprefix=$("#wonderplugin-carousel-lightboxshowtitleprefix").is(":checked");wonderplugin_carousel_config.lightboxslideinterval= parseInt($.trim($("#wonderplugin-carousel-lightboxslideinterval").val()));wonderplugin_carousel_config.lightboxtimerheight=parseInt($.trim($("#wonderplugin-carousel-lightboxtimerheight").val()));wonderplugin_carousel_config.lightboxbordersize=parseInt($.trim($("#wonderplugin-carousel-lightboxbordersize").val()));wonderplugin_carousel_config.lightboxborderradius=parseInt($.trim($("#wonderplugin-carousel-lightboxborderradius").val()));wonderplugin_carousel_config.lightboxtimeropacity=parseFloat($.trim($("#wonderplugin-carousel-lightboxtimeropacity").val())); wonderplugin_carousel_config.lightboxtimerposition=$.trim($("#wonderplugin-carousel-lightboxtimerposition").val());wonderplugin_carousel_config.lightboxtimercolor=$.trim($("#wonderplugin-carousel-lightboxtimercolor").val());wonderplugin_carousel_config.lightboxshowsocial=$("#wonderplugin-carousel-lightboxshowsocial").is(":checked");wonderplugin_carousel_config.lightboxsocialposition=$.trim($("#wonderplugin-carousel-lightboxsocialposition").val());wonderplugin_carousel_config.lightboxsocialpositionsmallscreen= $.trim($("#wonderplugin-carousel-lightboxsocialpositionsmallscreen").val());wonderplugin_carousel_config.lightboxsocialdirection=$.trim($("#wonderplugin-carousel-lightboxsocialdirection").val());wonderplugin_carousel_config.lightboxsocialbuttonsize=parseInt($.trim($("#wonderplugin-carousel-lightboxsocialbuttonsize").val()));wonderplugin_carousel_config.lightboxsocialbuttonfontsize=parseInt($.trim($("#wonderplugin-carousel-lightboxsocialbuttonfontsize").val()));wonderplugin_carousel_config.lightboxsocialrotateeffect= $("#wonderplugin-carousel-lightboxsocialrotateeffect").is(":checked");wonderplugin_carousel_config.lightboxshowfacebook=$("#wonderplugin-carousel-lightboxshowfacebook").is(":checked");wonderplugin_carousel_config.lightboxshowtwitter=$("#wonderplugin-carousel-lightboxshowtwitter").is(":checked");wonderplugin_carousel_config.lightboxshowpinterest=$("#wonderplugin-carousel-lightboxshowpinterest").is(":checked");wonderplugin_carousel_config.lightboximagekeepratio=$("#wonderplugin-carousel-lightboximagekeepratio").is(":checked"); wonderplugin_carousel_config.donotinit=$("#wonderplugin-carousel-donotinit").is(":checked");wonderplugin_carousel_config.addinitscript=$("#wonderplugin-carousel-addinitscript").is(":checked");wonderplugin_carousel_config.doshortcodeontext=$("#wonderplugin-carousel-doshortcodeontext").is(":checked");wonderplugin_carousel_config.triggerresize=$("#wonderplugin-carousel-triggerresize").is(":checked");wonderplugin_carousel_config.triggerresizedelay=parseInt($.trim($("#wonderplugin-carousel-triggerresizedelay").val())); var val=parseInt($.trim($("#wonderplugin-carousel-lightboxthumbwidth").val()));wonderplugin_carousel_config.lightboxthumbwidth=isNaN(val)?default_options.lightboxthumbwidth:val;val=parseInt($.trim($("#wonderplugin-carousel-lightboxthumbheight").val()));wonderplugin_carousel_config.lightboxthumbheight=isNaN(val)?default_options.lightboxthumbheight:val;val=parseInt($.trim($("#wonderplugin-carousel-lightboxthumbtopmargin").val()));wonderplugin_carousel_config.lightboxthumbtopmargin=isNaN(val)?default_options.lightboxthumbtopmargin: val;val=parseInt($.trim($("#wonderplugin-carousel-lightboxthumbbottommargin").val()));wonderplugin_carousel_config.lightboxthumbbottommargin=isNaN(val)?default_options.lightboxthumbbottommargin:val;val=parseInt($.trim($("#wonderplugin-carousel-lightboxbarheight").val()));wonderplugin_carousel_config.lightboxbarheight=isNaN(val)?default_options.lightboxbarheight:val;wonderplugin_carousel_config.lightboxtitlebottomcss=$.trim($("#wonderplugin-carousel-lightboxtitlebottomcss").val());wonderplugin_carousel_config.lightboxdescriptionbottomcss= $.trim($("#wonderplugin-carousel-lightboxdescriptionbottomcss").val())};function generate_socialmedia_code(slide){socialmedia="";sociallist=JSON.parse(slide.socialmedia);socialtarget=slide.socialmediatarget?' target="'+slide.socialmediatarget+'"':"";socialrotate=slide.socialmediarotate?" amazingcarousel-socialmedia-rotate":"";if(sociallist)$.each(sociallist,function(index,social){socialurl=social.name=="mail"&&social.url&&social.url.substring(0,7)!=="mailto:"?"mailto:"+social.url:social.url;socialmedia+= '"});return socialmedia}var generate_button_code=function(slides,i,carouselid,socialmedia){var button_code="";if(slides[i].button&&slides[i].button.length>0){if(slides[i].buttonlightbox){button_code+='0){var categories=slides[i].category.split(":");for(var k=0;k0)button_code+='"'}else if(!wonderplugin_carousel_config.lightboxnogroup)button_code+=' data-wpggroup="wpgridgallery-'+ carouselid+'"';if(slides[i].type==0)button_code+=' href="'+slides[i].image+'"';else if(slides[i].type==1){button_code+=' href="'+slides[i].mp4+'"';if(slides[i].webm)button_code+=' data-webm="'+slides[i].webm+'"'}else if(slides[i].type==2||slides[i].type==3||slides[i].type==4||slides[i].type==5){button_code+=' href="'+slides[i].video+'"';if(slides[i].type==5)button_code+=" data-mediatype=12"}if(slides[i].lightboxsize)button_code+=' data-width="'+slides[i].lightboxwidth+'" data-height="'+slides[i].lightboxheight+ '"'}else if(slides[i].buttonlink&&slides[i].buttonlink.length>0){button_code+='0)button_code+=' target="'+slides[i].buttonlinktarget+'"'}if(slides[i].buttonlightbox||slides[i].buttonlink&&slides[i].buttonlink.length>0){if(slides[i].title&&slides[i].title.length>0)button_code+=' data-title="'+slides[i].title.replace(/"/g,""")+'"';if(slides[i].description&&slides[i].description.length>0)button_code+= ' data-description="'+slides[i].description.replace(/"/g,""")+'"';if(wonderplugin_carousel_config.lightboxaddsocialmedia&&slides[i].socialmedia&&slides[i].socialmedia.length>0)button_code+='" data-socialmedia="'+socialmedia.replace(/"/g,""")+'"';button_code+=">"}button_code+='";if(slides[i].buttonlightbox||slides[i].buttonlink&&slides[i].buttonlink.length>0)button_code+=""}return button_code};var previewCarousel=function(){updateCarouselOptions(); $("#wonderplugin-carousel-preview-container").empty();var previewCode="";$("#wonderplugin-carousel-preview-container").html(previewCode);if(wonderplugin_carousel_config.slides.length>0){$("head").find("style").each(function(){if($(this).data("creator")=="wonderplugincarouselcreator")$(this).remove()}); var carouselid=wonderplugin_carousel_config.id>0?wonderplugin_carousel_config.id:0;if(wonderplugin_carousel_config.customcss&&wonderplugin_carousel_config.customcss.length>0){var customcss=wonderplugin_carousel_config.customcss.replace(/wonderplugincarousel-container-CAROUSELID/g,"wonderplugin-carousel-preview-container").replace(/wonderplugincarousel-CAROUSELID/g,"wonderplugin-carousel-preview").replace(/CAROUSELID/g,carouselid);$("head").append("")}if(wonderplugin_carousel_config.skincss&&wonderplugin_carousel_config.skincss.length>0)$("head").append("");$("#wpcarousellightbox_advanced_options").remove();var code="";if(wonderplugin_carousel_config.lightboxadvancedoptions&&wonderplugin_carousel_config.lightboxadvancedoptions.length>0){code+= "
0)code+="";code+='
  • ';else if(count%wonderplugin_carousel_config.rownumber==0)code+='
  • ';count++;code+='
    '; var socialmedia=wonderplugin_carousel_config.slides[i].socialmedia&&wonderplugin_carousel_config.slides[i].socialmedia.length>0?generate_socialmedia_code(wonderplugin_carousel_config.slides[i]):"";var image_code="";if(wonderplugin_carousel_config.slides[i].lightbox){image_code+="0)image_code+='" data-description="'+wonderplugin_carousel_config.slides[i].description.replace(/"/g,""");if(wonderplugin_carousel_config.lightboxaddsocialmedia&&wonderplugin_carousel_config.slides[i].socialmedia&& wonderplugin_carousel_config.slides[i].socialmedia.length>0)image_code+='" data-socialmedia="'+socialmedia.replace(/"/g,""");if(wonderplugin_carousel_config.slides[i].lightboxsize)image_code+='" data-width="'+wonderplugin_carousel_config.slides[i].lightboxwidth+'" data-height="'+wonderplugin_carousel_config.slides[i].lightboxheight;image_code+='" data-thumbnail="'+wonderplugin_carousel_config.slides[i].thumbnail;image_code+='" class="wondercarousellightbox wondercarousellightbox-'+carouselid+ '"';if(!wonderplugin_carousel_config.lightboxnogroup)image_code+=' data-group="wondercarousellightbox-'+carouselid+'"';if(wonderplugin_carousel_config.slides[i].type==10)image_code+=" data-ytplaylist=1";image_code+=">"}else if(wonderplugin_carousel_config.slides[i].weblink&&wonderplugin_carousel_config.slides[i].weblink.length>0){image_code+="0)image_code+=' onclick="'+wonderplugin_carousel_config.slides[i].clickhandler.replace(/"/g,""")+'"';if(wonderplugin_carousel_config.slides[i].linktarget&&wonderplugin_carousel_config.slides[i].linktarget.length>0)image_code+=' target="'+wonderplugin_carousel_config.slides[i].linktarget+'"';if(wonderplugin_carousel_config.slides[i].weblinklightbox){image_code+='" class="wondercarousellightbox wondercarousellightbox-'+ carouselid+'"';if(!wonderplugin_carousel_config.lightboxnogroup)image_code+=' data-group="wondercarousellightbox-'+carouselid+'"';if(wonderplugin_carousel_config.slides[i].lightboxsize)image_code+=' data-width="'+wonderplugin_carousel_config.slides[i].lightboxwidth+'" data-height="'+wonderplugin_carousel_config.slides[i].lightboxheight+'"'}image_code+=">"}image_code+="0)image_code+="";var title_code="";if(wonderplugin_carousel_config.slides[i].title&&wonderplugin_carousel_config.slides[i].title.length>0)title_code=wonderplugin_carousel_config.slides[i].title;var description_code="";if(wonderplugin_carousel_config.slides[i].description&&wonderplugin_carousel_config.slides[i].description.length>0)description_code= wonderplugin_carousel_config.slides[i].description;var skin_template=wonderplugin_carousel_config.skintemplate.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/__IMAGE__/g,image_code).replace(/__TITLE__/g,title_code).replace(/__DESCRIPTION__/g,description_code).replace(/__ID__/g,count);skin_template=skin_template.replace(/__HREF__/g,wonderplugin_carousel_config.slides[i].weblink);skin_template=skin_template.replace(/__CLICKHANDLER__/g,wonderplugin_carousel_config.slides[i].clickhandler); skin_template=skin_template.replace(/__TARGET__/g,wonderplugin_carousel_config.slides[i].linktarget);skin_template=skin_template.replace(/__SOCIALMEDIA__/g,socialmedia);var buttoncode=generate_button_code(wonderplugin_carousel_config.slides,i,carouselid,socialmedia);skin_template=skin_template.replace(/__BUTTON__/g,buttoncode);code+=skin_template;code+="
    "}if(count>0)code+="
  • ";code+="";code+='
    ';code+="
    "; code+='
    ';var jsfolder=$("#wonderplugin-carousel-jsfolder").text();var carouselOptions=$.extend({},WONDERPLUGIN_CAROUSEL_SKIN_OPTIONS[wonderplugin_carousel_config["skin"]],{carouselid:carouselid,jsfolder:jsfolder},wonderplugin_carousel_config);var totalwidth;if(carouselOptions.direction=="vertical")totalwidth=carouselOptions.width;else totalwidth=carouselOptions.width*carouselOptions.visibleitems;if(carouselOptions.responsive)$("#wonderplugin-carousel-preview").css({display:"none", position:"relative",width:"100%","max-width":totalwidth+"px"});else $("#wonderplugin-carousel-preview").css({display:"none",position:"relative",width:totalwidth+"px"});$("#wonderplugin-carousel-preview").html(code);carouselOptions.screenquery=jQuery.parseJSON(carouselOptions.screenquery);$("#wonderplugin-carousel-preview").wonderplugincarouselslider(carouselOptions);$(window).trigger("resize");if(hasPosts)$("#wonderplugin-carousel-preview-message").html("The WordPress page/post carousel is not available in the Preview tab. To view the effect, save and publish the carousel, then clik the View Carousel link. Or you can add the provided shortcode to a post or page to view the effect."); else $("#wonderplugin-carousel-preview-message").empty()}};var postPublish=function(message){$("#wonderplugin-carousel-publish-loading").hide();var formnonce=$("#wonderplugin-carousel-saveformnonce").html();var errorHtml="";if(message){errorHtml+="

    Error message: "+message+"

    ";errorHtml+="

    WordPress Ajax call failed. Please click the button below and save with POST method

    "}else{errorHtml+="

    WordPress Ajax call failed. Please check your WordPress configuration file and make sure the WP_DEBUG is set to false.

    "; errorHtml+="

    Please click the button below and save with POST method

    "}errorHtml+="
    ";errorHtml+=formnonce;errorHtml+="";errorHtml+="

    "; errorHtml+="
    ";$("#wonderplugin-carousel-publish-information").html(errorHtml)};var publishCarousel=function(){$("#wonderplugin-carousel-publish-loading").show();updateCarouselOptions();var ajaxnonce=$("#wonderplugin-carousel-ajaxnonce").text();jQuery.ajax({url:ajaxurl,type:"POST",data:{action:"wonderplugin_carousel_save_config",nonce:ajaxnonce,item:JSON.stringify(wonderplugin_carousel_config)},success:function(data){$("#wonderplugin-carousel-publish-loading").hide();if(data&&data.success&& data.id>=0){wonderplugin_carousel_config.id=data.id;$("#wonderplugin-carousel-publish-information").html("

    The carousel has been saved and published: View Carousel

    "+"

    To embed the carousel into your page or post, use shortcode: [wonderplugin_carousel id=\""+data.id+'"]

    '+"

    To embed the carousel into your template, use php code: <?php echo do_shortcode('[wonderplugin_carousel id=\""+ data.id+"\"]'); ?>

    ")}else postPublish(data&&data.message?data.message:"")},error:function(){$("#wonderplugin-carousel-publish-loading").hide();postPublish("")}})};var wonderplugin_carousel_config=$.extend({},default_options,defaultSkinOptions[default_options["skin"]]);var carouselId=parseInt($("#wonderplugin-carousel-id").text());if(carouselId>=0){var saved_config=$.parseJSON($("#wonderplugin-carousel-id-config").text());if(!("fixaspectratio"in saved_config))saved_config.fixaspectratio= false;if(!("centerimage"in saved_config))saved_config.centerimage=false;if(!("fitimage"in saved_config))saved_config.fitimage=false;if(!("fitcenterimage"in saved_config))saved_config.fitcenterimage=false;if("skin"in saved_config&&saved_config["skin"]in defaultSkinOptions)$.extend(wonderplugin_carousel_config,defaultSkinOptions[saved_config["skin"]]);$.extend(wonderplugin_carousel_config,saved_config);wonderplugin_carousel_config.id=carouselId}var i;var j;for(i=0;i0)wonderplugin_carousel_config.dataoptions=wonderplugin_carousel_config.dataoptions.replace(/\\"/g,'"').replace(/\\'/g,"'");var printConfig=function(){$("#wonderplugin-newestfirst").attr("checked",wonderplugin_carousel_config.newestfirst);$("#wonderplugin-carousel-name").val(wonderplugin_carousel_config.name);updateMediaTable();$(".wonderplugin-tab-skin").find("img").removeClass("selected");$("input:radio[name=wonderplugin-carousel-skin][value="+ wonderplugin_carousel_config.skin+"]").attr("checked",true);$("input:radio[name=wonderplugin-carousel-skin][value="+wonderplugin_carousel_config.skin+"]").parent().find("img").addClass("selected");printSkinOptions(wonderplugin_carousel_config);$("#wonderplugin-carousel-aextraprops").val(wonderplugin_carousel_config.aextraprops);$("#wonderplugin-carousel-imgextraprops").val(wonderplugin_carousel_config.imgextraprops);$("#wonderplugin-carousel-showimgtitle").attr("checked",wonderplugin_carousel_config.showimgtitle); $("#wonderplugin-carousel-imgtitle").val(wonderplugin_carousel_config.imgtitle);$("#wonderplugin-carousel-addwoocommerceclass").attr("checked",wonderplugin_carousel_config.addwoocommerceclass);$("#wonderplugin-carousel-showplayvideo").attr("checked",wonderplugin_carousel_config.showplayvideo);$("input:radio[name=wonderplugin-carousel-playvideoimagemode][value="+wonderplugin_carousel_config.playvideoimagemode+"]").attr("checked",true);if(wonderplugin_carousel_config.playvideoimagemode=="custom"){$("#wonderplugin-carousel-customplayvideoimage").val(wonderplugin_carousel_config.playvideoimage); $("#wonderplugin-carousel-displayplayvideoimage").attr("src",wonderplugin_carousel_config.playvideoimage)}else{$("#wonderplugin-carousel-playvideoimage").val(wonderplugin_carousel_config.playvideoimage);$("#wonderplugin-carousel-displayplayvideoimage").attr("src",$("#wonderplugin-carousel-jsfolder").text()+wonderplugin_carousel_config.playvideoimage)}$("#wonderplugin-carousel-playvideoimagepos").val(wonderplugin_carousel_config.playvideoimagepos);$("#wonderplugin-carousel-custom-css").val(wonderplugin_carousel_config.customcss); $("#wonderplugin-carousel-data-options").val(wonderplugin_carousel_config.dataoptions);$("#wonderplugin-carousel-customjs").val(wonderplugin_carousel_config.customjs);$("#wonderplugin-carousel-lightboxresponsive").attr("checked",wonderplugin_carousel_config.lightboxresponsive);$("#wonderplugin-carousel-lightboxshownavigation").attr("checked",wonderplugin_carousel_config.lightboxshownavigation);$("#wonderplugin-carousel-lightboxnogroup").attr("checked",wonderplugin_carousel_config.lightboxnogroup); $("#wonderplugin-carousel-lightboxshowtitle").attr("checked",wonderplugin_carousel_config.lightboxshowtitle);$("#wonderplugin-carousel-lightboxshowdescription").attr("checked",wonderplugin_carousel_config.lightboxshowdescription);$("#wonderplugin-carousel-lightboxaddsocialmedia").attr("checked",wonderplugin_carousel_config.lightboxaddsocialmedia);$("#wonderplugin-carousel-lightboxthumbwidth").val(wonderplugin_carousel_config.lightboxthumbwidth);$("#wonderplugin-carousel-lightboxthumbheight").val(wonderplugin_carousel_config.lightboxthumbheight); $("#wonderplugin-carousel-lightboxthumbtopmargin").val(wonderplugin_carousel_config.lightboxthumbtopmargin);$("#wonderplugin-carousel-lightboxthumbbottommargin").val(wonderplugin_carousel_config.lightboxthumbbottommargin);$("#wonderplugin-carousel-lightboxbarheight").val(wonderplugin_carousel_config.lightboxbarheight);$("#wonderplugin-carousel-lightboxtitlebottomcss").val(wonderplugin_carousel_config.lightboxtitlebottomcss);$("#wonderplugin-carousel-lightboxdescriptionbottomcss").val(wonderplugin_carousel_config.lightboxdescriptionbottomcss); $("#wonderplugin-carousel-lightboxvideohidecontrols").attr("checked",wonderplugin_carousel_config.lightboxvideohidecontrols);$("#wonderplugin-carousel-lightboxfullscreenmode").attr("checked",wonderplugin_carousel_config.lightboxfullscreenmode);$("#wonderplugin-carousel-lightboxcloseonoverlay").attr("checked",wonderplugin_carousel_config.lightboxcloseonoverlay);$("#wonderplugin-carousel-lightboxtitlestyle").val(wonderplugin_carousel_config.lightboxtitlestyle);$("#wonderplugin-carousel-lightboximagepercentage").val(wonderplugin_carousel_config.lightboximagepercentage); $("#wonderplugin-carousel-lightboxdefaultvideovolume").val(wonderplugin_carousel_config.lightboxdefaultvideovolume);$("#wonderplugin-carousel-lightboxoverlaybgcolor").val(wonderplugin_carousel_config.lightboxoverlaybgcolor);$("#wonderplugin-carousel-lightboxoverlayopacity").val(wonderplugin_carousel_config.lightboxoverlayopacity);$("#wonderplugin-carousel-lightboxbgcolor").val(wonderplugin_carousel_config.lightboxbgcolor);$("#wonderplugin-carousel-lightboxtitleprefix").val(wonderplugin_carousel_config.lightboxtitleprefix); $("#wonderplugin-carousel-lightboxtitleinsidecss").val(wonderplugin_carousel_config.lightboxtitleinsidecss);$("#wonderplugin-carousel-lightboxdescriptioninsidecss").val(wonderplugin_carousel_config.lightboxdescriptioninsidecss);$("#wonderplugin-carousel-lightboxadvancedoptions").val(wonderplugin_carousel_config.lightboxadvancedoptions);$("#wonderplugin-carousel-lightboxautoslide").attr("checked",wonderplugin_carousel_config.lightboxautoslide);$("#wonderplugin-carousel-lightboxshowtimer").attr("checked", wonderplugin_carousel_config.lightboxshowtimer);$("#wonderplugin-carousel-lightboxshowplaybutton").attr("checked",wonderplugin_carousel_config.lightboxshowplaybutton);$("#wonderplugin-carousel-lightboxalwaysshownavarrows").attr("checked",wonderplugin_carousel_config.lightboxalwaysshownavarrows);$("#wonderplugin-carousel-lightboxshowtitleprefix").attr("checked",wonderplugin_carousel_config.lightboxshowtitleprefix);$("#wonderplugin-carousel-lightboxslideinterval").val(wonderplugin_carousel_config.lightboxslideinterval); $("#wonderplugin-carousel-lightboxtimerposition").val(wonderplugin_carousel_config.lightboxtimerposition);$("#wonderplugin-carousel-lightboxtimerheight").val(wonderplugin_carousel_config.lightboxtimerheight);$("#wonderplugin-carousel-lightboxtimercolor").val(wonderplugin_carousel_config.lightboxtimercolor);$("#wonderplugin-carousel-lightboxtimeropacity").val(wonderplugin_carousel_config.lightboxtimeropacity);$("#wonderplugin-carousel-lightboxbordersize").val(wonderplugin_carousel_config.lightboxbordersize); $("#wonderplugin-carousel-lightboxborderradius").val(wonderplugin_carousel_config.lightboxborderradius);$("#wonderplugin-carousel-lightboximagekeepratio").attr("checked",wonderplugin_carousel_config.lightboximagekeepratio);$("#wonderplugin-carousel-lightboxshowsocial").attr("checked",wonderplugin_carousel_config.lightboxshowsocial);$("#wonderplugin-carousel-lightboxsocialposition").val(wonderplugin_carousel_config.lightboxsocialposition);$("#wonderplugin-carousel-lightboxsocialpositionsmallscreen").val(wonderplugin_carousel_config.lightboxsocialpositionsmallscreen); $("#wonderplugin-carousel-lightboxsocialdirection").val(wonderplugin_carousel_config.lightboxsocialdirection);$("#wonderplugin-carousel-lightboxsocialbuttonsize").val(wonderplugin_carousel_config.lightboxsocialbuttonsize);$("#wonderplugin-carousel-lightboxsocialbuttonfontsize").val(wonderplugin_carousel_config.lightboxsocialbuttonfontsize);$("#wonderplugin-carousel-lightboxsocialrotateeffect").attr("checked",wonderplugin_carousel_config.lightboxsocialrotateeffect);$("#wonderplugin-carousel-lightboxshowfacebook").attr("checked", wonderplugin_carousel_config.lightboxshowfacebook);$("#wonderplugin-carousel-lightboxshowtwitter").attr("checked",wonderplugin_carousel_config.lightboxshowtwitter);$("#wonderplugin-carousel-lightboxshowpinterest").attr("checked",wonderplugin_carousel_config.lightboxshowpinterest);$("#wonderplugin-carousel-donotinit").attr("checked",wonderplugin_carousel_config.donotinit);$("#wonderplugin-carousel-addinitscript").attr("checked",wonderplugin_carousel_config.addinitscript);$("#wonderplugin-carousel-doshortcodeontext").attr("checked", wonderplugin_carousel_config.doshortcodeontext);$("#wonderplugin-carousel-triggerresize").attr("checked",wonderplugin_carousel_config.triggerresize);$("#wonderplugin-carousel-triggerresizedelay").val(wonderplugin_carousel_config.triggerresizedelay)};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';replace_code+='';replace_code+='';replace_code+='';replace_code+='';replace_code+='';replace_code+='