/**
 * @plugin Ultimate-Infinite-Scroll
 * @version 1.0.0
 */
jQuery(document).ready(function(e){e(".colorpicker").hide(),e(".colorpicker").each(function(){e(this).farbtastic(e(this).closest(".color-picker").find(".color"))}),e(".color").click(function(){e(this).closest(".color-picker").find(".colorpicker").fadeIn()}),e(document).mousedown(function(){e(".colorpicker").each(function(){var t=e(this).css("display");"block"==t&&e(this).fadeOut()})});var t;jQuery.fn.uploadMediaFile=function(e,i){var o=e.attr("id"),a=o.replace("_button",""),r=o.replace("_button","_preview");return t?void t.open():(t=wp.media.frames.file_frame=wp.media({title:jQuery(this).data("uploader_title"),button:{text:jQuery(this).data("uploader_button_text")},multiple:!1}),t.on("select",function(){attachment=t.state().get("selection").first().toJSON(),jQuery("#"+a).val(attachment.id),i&&jQuery("#"+r).attr("src",attachment.sizes.thumbnail.url)}),void t.open())},jQuery(".image_upload_button").click(function(){jQuery.fn.uploadMediaFile(jQuery(this),!0)}),jQuery(".image_delete_button").click(function(){return jQuery(this).closest("td").find(".image_data_field").val(""),jQuery(".image_preview").remove(),!1}),jQuery("ul#settings-sections.subsubsub").find("a").each(function(e){var t=jQuery(this).attr("href").replace("#","");jQuery('h3:contains("'+jQuery(this).text()+'")').attr("id",t).addClass("section-heading")}),jQuery("#plugin_settings .subsubsub a.tab").click(function(e){if(jQuery(this).parents(".subsubsub").find(".current").removeClass("current"),jQuery(this).addClass("current"),jQuery(this).hasClass("all"))return jQuery("#plugin_settings h3, #plugin_settings form p, #plugin_settings table.form-table, p.submit").fadeIn(),!1;var t=jQuery(this).attr("href");return t=t.replace("#","",t),jQuery('#plugin_settings h3, #plugin_settings form div > p:not(".submit"), #plugin_settings table').hide(),jQuery("h3#"+t).show().nextUntil("h3.section-heading","p, table, table p").fadeIn(),!1}),jQuery("input[type=checkbox]").switchButton(),jQuery("#load_more_button_animate").is(":checked")||jQuery("#animation_method_load_more_button").prop("disabled","disabled"),jQuery("body").on("change","#load_more_button_animate",function(){jQuery(this).is(":checked")?jQuery("#animation_method_load_more_button").prop("disabled",!1):jQuery("#animation_method_load_more_button").prop("disabled","disabled")}),jQuery("#animate_to_top").is(":checked")||jQuery("#pixels_from_top").prop("disabled","disabled"),jQuery("body").on("change","#animate_to_top",function(){jQuery(this).is(":checked")?jQuery("#pixels_from_top").prop("disabled",!1):jQuery("#pixels_from_top").prop("disabled","disabled")}),jQuery("#masonry_bool").is(":checked")||jQuery("#masonry_item_selector,#layout_mode").prop("disabled","disabled"),jQuery("body").on("change","#masonry_bool",function(){jQuery(this).is(":checked")?jQuery("#masonry_item_selector,#layout_mode").prop("disabled",!1):jQuery("#masonry_item_selector,#layout_mode").prop("disabled","disabled")}),"method_infinite_scroll"!=jQuery("#ajax_method").val()&&jQuery("#start_loading_x_from_end").prop("disabled","disabled"),jQuery("body").on("change","#ajax_method",function(){"method_infinite_scroll"!=jQuery("#ajax_method").val()?jQuery("#start_loading_x_from_end").prop("disabled","disabled"):jQuery("#start_loading_x_from_end").prop("disabled",!1)}),e("select#animation_method_load_more_button").change(function(){e("#isw-load-more-button").removeClass();var t=e(this).val();console.log(t),"no_animation"!=t&&e("#isw-load-more-button").addClass("animated "+t)})});