(function(a){a(function(){var k=a("#wp_rp_plugin_static_base_url").val();a("#wp_rp_static_base_url").val();var l=a("#wp_rp_json_url").val(),m=a("#wp_rp_version").val(),n={mobile:{wrap:a("#wp_rp_mobile_theme_options_wrap"),theme_area:a("#wp_rp_mobile_theme_area"),current_theme:a("#wp_rp_mobile_theme_selected").val()},desktop:{wrap:a("#wp_rp_desktop_theme_options_wrap"),theme_area:a("#wp_rp_desktop_theme_area"),current_theme:a("#wp_rp_desktop_theme_selected").val()}},h={mobile:[{name:"Modern",location:"m-modern.css"},
{name:"Infinite Stream (experimental)",location:"m-stream.css"},{name:"Plain (your own css)",location:"m-plain.css"}],desktop:[{name:"Momma",location:"momma.css"},{name:"Modern",location:"modern.css"},{name:"Vertical (Large)",location:"vertical.css"},{name:"Vertical (Medium)",location:"vertical-m.css"},{name:"Vertical (Small)",location:"vertical-s.css"},{name:"Pinterest Inspired",location:"pinterest.css"},{name:"Two Columns",location:"twocolumns.css"},{name:"Plain (your own css)",location:"plain.css"}]},
i=function(){a.each(n,function(b,d){var e=d.wrap.find("div.theme-list"),f=d.wrap.find("div.theme-screenshot"),g=function(b){if(b.val()){var b=k+"img/themes/"+b.val().replace(/\.css$/,".jpg"),c=f.find("img");if(c.length){if(c.attr("src")===b)return}else c=a("<img />"),f.html(c);c.attr("src",b)}else f.html("")};e.empty();a.each(h[b],function(a,c){"custom.css"!=c.location&&e.append('<label class="theme-label"><input '+(c.location===d.current_theme?'checked="checked"':"")+' class="theme-option" type="radio" name="wp_rp_'+
b+'_theme_name" value="'+c.location+'" /> '+c.name+"</label><br />")});e.on("hover","label.theme-label",function(){g(a("input",this))});e.on("mouseleave",function(){g(e.find("input:checked"))});g(e.find("input:checked"));d.theme_area.show()})},j=!1;window.wp_rp_themes_cb=function(b){if(b&&b.themes&&(h=b.themes))j=!0,i();j&&a("#wp_rp_theme_options_wrap").show()};a("#wp_rp_enable_themes:checked").length&&(i(),a("#wp_rp_theme_options_wrap").show());a("#wp_rp_enable_themes").change(function(){if(a("#wp_rp_enable_themes:checked").length){var b=
document.createElement("script"),d=document.getElementsByTagName("body").item(0);b.type="text/javascript";b.src=l+"themes2.js?plv="+m;d.appendChild(b)}else a("#wp_rp_theme_options_wrap").hide()})})})(jQuery);
