function rudrSwitchTab(t,e){var l=document.getElementsByClassName("tabcontent"),i;for(i=0;i<l.length;i++)l[i].style.display="none";document.getElementById(e).style.display="block";var l=document.getElementsByClassName("tabmenu"),i;for(i=0;i<l.length;i++)l[i].parentElement.className="";document.getElementById(t).parentElement.className="active"}!function($){"use strict";function t(){$(".image-upload-button").click(function(t){var e=$(this).parent(),l=$(this);t.preventDefault();var i=wp.media({title:l.data("upload-title"),button:{text:l.data("upload-button")},multiple:!1}).on("select",function(){var t=i.state().get("selection"),l=t.first().toJSON();$("input[type=text]",e).val(l.url),$("input[type=hidden]",e).val(l.id).trigger("change"),e.hasClass("upload_file")||($("img",e).length>0?$(".image-preview",e).attr("src",l.url):($('<img src="'+l.url+'" class="image-preview">').insertBefore($(":last-child",e)),$(".image-clear-button",e).attr("style","display:inline-block")))}).open()})}function e(){$(".video-upload-button").click(function(t){var e=$(this).parent(),l=$(this);t.preventDefault();var i=wp.media({title:l.data("upload-title"),button:{text:l.data("upload-button")},multiple:!1}).on("select",function(){var t=i.state().get("selection"),l=t.first().toJSON();$("input[type=text]",e).val(l.url),e.hasClass("upload_file")||$(".video-clear-button",e).attr("style","display:inline-block")}).open()})}$(document).ready(function(){$(".image-clear-button").click(function(t){$(this).siblings("input[type=text]").val(null),$(this).siblings("input[type=hidden]").val(null).trigger("change"),$(this).siblings(".image-preview").remove(),t.preventDefault()}),$(".video-clear-button").click(function(t){$(this).siblings("input[type=text]").val(null),t.preventDefault()}),$(".color-picker").wpColorPicker();var l=100;$("#class-settings-wrapper > ul > li[role*=tab]").each(function(){l+=$(this).outerHeight()}),t(),e()})}(jQuery);