text: var W3tc_Lightbox={window:jQuery(window),container:null,options:null,create:function(){var a=this;this.container=jQuery('<div class="lightbox lightbox-loading"><div class="lightbox-close">Close window</div><div class="lightbox-content"></div></div>').css({top:0,left:0,width:0,height:0,position:"absolute","z-index":9991,display:"none"});jQuery("#w3tc").append(this.container);this.window.resize(function(){a.resize()});this.window.scroll(function(){a.resize()});this.container.find(".lightbox-close").click(function(){a.close()})},open:function(a){this.options=jQuery.extend({width:0,height:0,maxWidth:0,maxHeight:0,minWidth:0,minHeight:0,widthPercent:0.6,heightPercent:0.8,content:null,url:null,callback:null},a);this.create();this.resize();if(this.options.content){this.content(this.options.content)}else{if(this.options.url){this.load(this.options.url,this.options.callback)}}W3tc_Overlay.show();this.container.show()},close:function(){this.container.remove();W3tc_Overlay.hide()},resize:function(){var b=(this.options.width?this.options.width:this.window.width()*this.options.widthPercent);var a=(this.options.height?this.options.height:this.window.height()*this.options.heightPercent);if(this.options.maxWidth&&b>this.options.maxWidth){b=this.options.maxWidth}else{if(b<this.options.minWidth){b=this.options.minWidth}}if(this.options.maxHeight&&a>this.options.maxHeight){a=this.options.maxHeight}else{if(a<this.options.minHeight){a=this.options.minHeight}}this.container.css({width:b,height:a});this.container.css({top:this.window.scrollTop()+this.window.height()/2-this.container.outerHeight()/2,left:this.window.scrollLeft()+this.window.width()/2-this.container.outerWidth()/2});jQuery(".lightbox-content",this.container).css({width:b,height:a})},load:function(a,c){this.content("");this.loading(true);var b=this;jQuery.get(a,{},function(d){b.loading(false);b.content(d);if(c){c.call(this,b)}})},content:function(a){return this.container.find(".lightbox-content").html(a)},width:function(a){if(a===undefined){return this.container.width()}else{this.container.css("width",a);return this.resize()}},height:function(a){if(a===undefined){return this.container.height()}else{this.container.css("height",a);return this.resize()}},loading:function(a){return(a===undefined?this.container.hasClass("lightbox-loader"):(a?this.container.addClass("lightbox-loader"):this.container.removeClass("lightbox-loader")))}};var W3tc_Overlay={window:jQuery(window),container:null,create:function(){var a=this;this.container=jQuery('<div id="overlay" />').css({top:0,left:0,width:0,height:0,position:"absolute","z-index":9990,display:"none",opacity:0.6});jQuery("#w3tc").append(this.container);this.window.resize(function(){a.resize()});this.window.scroll(function(){a.resize()})},show:function(){this.create();this.resize();this.container.show()},hide:function(){this.container.remove()},resize:function(){this.container.css({top:this.window.scrollTop(),left:this.window.scrollLeft(),width:this.window.width(),height:this.window.height()})}};function w3tc_lightbox_support_us(a){W3tc_Lightbox.open({width:500,height:200,url:"admin.php?page=w3tc_general&w3tc_support_us&_wpnonce="+a})}var w3tc_minify_recommendations_checked={};function w3tc_lightbox_minify_recommendations(a){W3tc_Lightbox.open({width:1000,url:"admin.php?page=w3tc_minify&w3tc_minify_recommendations&_wpnonce="+a,callback:function(c){var b=jQuery("#recom_theme").val();if(jQuery.ui&&jQuery.ui.sortable){jQuery("#recom_js_files,#recom_css_files").sortable({axis:"y",stop:function(){jQuery(this).find("li").each(function(d){jQuery(this).find("td:eq(1)").html((d+1)+".")})}})}if(w3tc_minify_recommendations_checked[b]!==undefined){jQuery("#recom_js_files :text,#recom_css_files :text").each(function(){var e=jQuery(this).parents("li").find("[name=recom_js_template]").val()+":"+jQuery(this).val();if(w3tc_minify_recommendations_checked[b][e]!==undefined){var d=jQuery(this).parents("li").find(":checkbox");if(w3tc_minify_recommendations_checked[b][e]){d.attr("checked","checked")}else{d.removeAttr("checked")}}})}jQuery("#recom_theme").change(function(){jQuery("#recom_js_files :checkbox,#recom_css_files :checkbox").each(function(){var d=jQuery(this).parents("li");var e=d.find("[name=recom_js_template]").val()+":"+d.find(":text").val();if(w3tc_minify_recommendations_checked[b]===undefined){w3tc_minify_recommendations_checked[b]={}}w3tc_minify_recommendations_checked[b][e]=jQuery(this).is(":checked")});c.load("admin.php?page=w3tc_minify&w3tc_minify_recommendations&theme_key="+jQuery(this).val()+"&_wpnonce="+a,c.options.callback)});jQuery("#recom_js_check").click(function(){if(jQuery("#recom_js_files :checkbox:checked").size()){jQuery("#recom_js_files :checkbox").removeAttr("checked")}else{jQuery("#recom_js_files :checkbox").attr("checked","checked")}return false});jQuery("#recom_css_check").click(function(){if(jQuery("#recom_css_files :checkbox:checked").size()){jQuery("#recom_css_files :checkbox").removeAttr("checked")}else{jQuery("#recom_css_files :checkbox").attr("checked","checked")}return false});jQuery(".recom_apply",c.container).click(function(){var d=jQuery("#recom_theme").val();jQuery("#js_files li").each(function(){if(jQuery(this).find(":text").attr("name").indexOf("js_files["+d+"]")!=-1){jQuery(this).remove()}});jQuery("#css_files li").each(function(){if(jQuery(this).find(":text").attr("name").indexOf("css_files["+d+"]")!=-1){jQuery(this).remove()}});jQuery("#recom_js_files li").each(function(){if(jQuery(this).find(":checkbox:checked").size()){w3tc_minify_js_file_add(d,jQuery(this).find("[name=recom_js_template]").val(),jQuery(this).find("[name=recom_js_location]").val(),jQuery(this).find("[name=recom_js_file]").val())}});jQuery("#recom_css_files li").each(function(){if(jQuery(this).find(":checkbox:checked").size()){w3tc_minify_css_file_add(d,jQuery(this).find("[name=recom_css_template]").val(),jQuery(this).find("[name=recom_css_file]").val())}});w3tc_minify_js_theme(d);w3tc_minify_css_theme(d);w3tc_input_enable(".js_enabled",jQuery("#js_enabled:checked").size());w3tc_input_enable(".css_enabled",jQuery("#css_enabled:checked").size());c.close()})}})}function w3tc_lightbox_self_test(a){W3tc_Lightbox.open({width:800,minHeight:300,url:"admin.php?page=w3tc_general&w3tc_self_test&_wpnonce="+a,callback:function(b){jQuery(".button-primary",b.container).click(function(){b.close()})}})}function w3tc_lightbox_cdn_s3_bucket_location(b,a){W3tc_Lightbox.open({width:500,height:130,url:"admin.php?page=w3tc_general&w3tc_cdn_s3_bucket_location&type="+b+"&_wpnonce="+a,callback:function(c){jQuery(".button",c.container).click(function(){c.close()})}})}jQuery(function(){jQuery(".button-minify-recommendations").click(function(){var a=jQuery(this).metadata().nonce;w3tc_lightbox_minify_recommendations(a);return false});jQuery(".button-self-test").click(function(){var a=jQuery(this).metadata().nonce;w3tc_lightbox_self_test(a);return false});jQuery(".button-cdn-s3-bucket-location,.button-cdn-cf-bucket-location").click(function(){var b="";var a=jQuery(this).metadata().nonce;if(jQuery(this).hasClass("cdn_s3")){b="s3"}else{if(jQuery(this).hasClass("cdn_cf")){b="cf"}}w3tc_lightbox_cdn_s3_bucket_location(b,a);return false})});