function invertColor(a){var b=a;return b=b.substring(1),b=parseInt(b,16),b^=16777215,b=b.toString(16),b=("000000"+b).slice(-6),b="#"+b}jQuery(document).ready(function(a){if(a("#setting-error-settings_updated").hide(),a(".option-content").hide(),a(".open").show(),a("h3.option-toggle").click(function(){return a(this).toggleClass("option-active").next().slideToggle("fast"),!1}),setTimeout(function(){a(".fade").fadeOut("slow",function(){a(".fade").remove()})},2e3),a("#catchwebtools_seo_title").length){var b=a("#catchwebtools_seo_title").val().length;a("#catchwebtools_seo_title_left").html(70-b),b=a("#catchwebtools_seo_description").val().length,a("#catchwebtools_seo_description_left").html(156-b),a("#catchwebtools_seo_title").keypress(function(){var b=a(this).val().length;a("#catchwebtools_seo_title_left").html(70-b)}),a("#catchwebtools_seo_description").keypress(function(){var b=a(this).val().length;a("#catchwebtools_seo_description_left").html(156-b)})}var c={change:function(b,c){a("#catchwebtools_social_icon_brand_color").val();a(".genericon").css({color:c.color.toString()}),a(".genericon").hover(function(){a(this).css("color","")},function(){a(this).css("color",c.color.toString())})}},d={change:function(b,c){var d=a("#catchwebtools_social_icon_brand_color").val();"hover"!=d&&"hover-static"!=d&&a(".genericon").hover(function(){a(this).css("color",c.color.toString())},function(){a(this).css("color",a("#catchwebtools_social_color").val())})}};a("#catchwebtools_social_color").wpColorPicker(c),a("#catchwebtools_social_hover_color").wpColorPicker(d);var e=a("#catchwebtools_social_color").val(),f=a("#catchwebtools_social_hover_color").val(),g=a("#catchwebtools_social_icon_size").val()+"px",h=a("#catchwebtools_social_icon_brand_color").val();"hover-static"!=h&&(a(".genericon").css({color:e}),a(".genericon").hover(function(){a(this).css("color","")},function(){a(this).css("color",e)})),"hover"!=h&&"hover-static"!=h&&a(".genericon").hover(function(){a(this).css("color",f)},function(){a(this).css("color",e)}),a(".genericon").css({"font-size":g,width:g,height:g}),a("#catchwebtools_social_icon_size").change(function(){var b=this.value+"px";a(".genericon").css({"font-size":b,width:b,height:b})}),"hover-static"==h?(a("#catchwebtools_social_color_hover_main").hide(),a("#catchwebtools_social_color_main").hide()):"hover"==h?(a("#catchwebtools_social_color_hover_main").hide(),a("#catchwebtools_social_color_main").show()):(a("#catchwebtools_social_color_hover_main").show(),a("#catchwebtools_social_color_main").show()),a("#catchwebtools_social_icon_brand_color").change(function(){var b=a("#catchwebtools_social_icon_brand_color").val();a(".catchwebtools-social").removeClass("social-brand-hover"),a(".catchwebtools-social").removeClass("social-brand-static"),"hover-static"==b?(a("#catchwebtools_social_color_hover_main").hide(),a("#catchwebtools_social_color_main").hide(),a(".catchwebtools-social").addClass("social-brand-static"),a(".genericon").css({color:""}),a(".genericon").hover(function(){a(this).css("color","")},function(){a(this).css("color","")})):"hover"==b?(a("#catchwebtools_social_color_hover_main").hide(),a("#catchwebtools_social_color_main").show(),a(".catchwebtools-social").addClass("social-brand-hover")):(a("#catchwebtools_social_color_hover_main").show(),a("#catchwebtools_social_color_main").show())})}),function(a){"use strict";jQuery(document).ready(function(a){a("#setting-error-settings_updated").hide(),setTimeout(function(){a(".fade").fadeOut("slow",function(){a(".fade").remove()})},2e3);var b;a(".st_upload_button").click(function(c){c.preventDefault();var d,e,f,g;d=a(this).val(),e=a(this),f=a(this).attr("ref"),b=wp.media.frames.file_frame=wp.media({title:d,button:{text:f},multiple:!0}),b.on("select",function(){g=b.state().get("selection").first().toJSON(),e.prev().val(g.url)}),b.open()});var c={change:function(b,c){a(".dashicon_to_top_admin").css({color:c.color.toString()})}};a(".catchwebtools_to_top_options_icon_color").wpColorPicker(c);var d={change:function(b,c){a(".dashicon_to_top_admin").css({"background-color":c.color.toString()})}};a(".catchwebtools_to_top_options_icon_bg_color").wpColorPicker(d),a("#catchwebtools_to_top_options_border_radius").change(function(){a(".dashicon_to_top_admin").css({"-webkit-border-radius":a("#catchwebtools_to_top_options_border_radius").val()+"%","-moz-border-radius":a("#catchwebtools_to_top_options_border_radius").val()+"%","border-radius":a("#catchwebtools_to_top_options_border_radius").val()+"%"})}),a("#catchwebtools_to_top_options_icon_size").change(function(){a(".dashicon_to_top_admin").css({"font-size":a("#catchwebtools_to_top_options_icon_size").val()+"px",height:a("#catchwebtools_to_top_options_icon_size").val()+"px",width:a("#catchwebtools_to_top_options_icon_size").val()+"px"})}),a(".dashicon_to_top_admin").css({"-webkit-border-radius":a("#catchwebtools_to_top_options_border_radius").val()+"%","-moz-border-radius":a("#catchwebtools_to_top_options_border_radius").val()+"%","border-radius":a("#catchwebtools_to_top_options_border_radius").val()+"%",color:a(".catchwebtools_to_top_options_icon_color").val(),"background-color":a(".catchwebtools_to_top_options_icon_bg_color").val(),"font-size":a("#catchwebtools_to_top_options_icon_size").val()+"px",height:a("#catchwebtools_to_top_options_icon_size").val()+"px",width:a("#catchwebtools_to_top_options_icon_size").val()+"px"}),a("#catchwebtools_to_top_options_style").change(function(){var b;b=a(this).val(),"image"==b?(a(".catchwebtools_to_top_options_image_settings").show(),a(".catchwebtools_to_top_options_icon_settings").hide()):(a(".catchwebtools_to_top_options_icon_settings").show(),a(".catchwebtools_to_top_options_image_settings").hide())});var e;e=a("#catchwebtools_to_top_options_style").val(),"image"==e?(a(".catchwebtools_to_top_options_image_settings").show(),a(".catchwebtools_to_top_options_icon_settings").hide()):(a(".catchwebtools_to_top_options_icon_settings").show(),a(".catchwebtools_to_top_options_image_settings").hide())})}(jQuery),function(a,b,c){var d,e=a.getElementsByTagName(b)[0];a.getElementById(c)||(d=a.createElement(b),d.id=c,d.src="//connect.facebook.net/en_US/all.js#xfbml=1&appId=276203972392824",e.parentNode.insertBefore(d,e))}(document,"script","facebook-jssdk"),function(a,b,c){var d,e=a.getElementsByTagName(b)[0];a.getElementById(c)||(d=a.createElement(b),d.id=c,d.src="//platform.twitter.com/widgets.js",e.parentNode.insertBefore(d,e))}(document,"script","twitter-wjs");