diff --git a/auto-thickbox-options.php b/auto-thickbox-options.php
index 4493f0a..4f3c305 100644
--- a/auto-thickbox-options.php
+++ b/auto-thickbox-options.php
@@ -484,6 +484,13 @@ class auto_thickbox_options {
+ |
texts['image']; ?> |
px
diff --git a/auto-thickbox.php b/auto-thickbox.php
index 3c5efe4..cb6e52a 100644
--- a/auto-thickbox.php
+++ b/auto-thickbox.php
@@ -340,6 +340,8 @@ SCRIPT;
$script .= "tb_options.win_width = {$this->options['win_width']};\n";
if ( !$this->is_default_options('win_height') )
$script .= "tb_options.win_height = {$this->options['win_height']};\n";
+ if ( !$this->is_default_options('margin_win') )
+ $script .= "tb_options.margin_win = {$this->options['margin_win']};\n";
if ( !$this->is_default_options('ref_title') )
$script .= "tb_options.ref_title = [{$this->options['ref_title']}];\n";
@@ -628,6 +630,7 @@ SCRIPT;
'bgcolor_content' => 'white',
'bgcolor_bg' => 'black',
'margin_img' => '15',
+ 'margin_win' => '15',
'border_win' => '1px solid #555',
'border_width_win' => '1',
'border_style_win' => 'solid',
diff --git a/readme.txt b/readme.txt
index 8f8b45c..6b615fe 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,7 +1,7 @@
=== Auto ThickBox Plus ===
Contributors: attosoft
Donate link: http://attosoft.info/en/donate/
-Tags: lightbox, thickbox, shadowbox, gallery, semiologic, image, images, thumbnail, thumbnails, popup, pop-up, overlay, photo, photos, picture, pictures, javascript, simple, inline, iframe, ajax, jquery, plugin, plugins, link, links, widget, widgets, nextgen, nextgen gallery
+Tags: lightbox, thickbox, shadowbox, gallery, image, images, thumbnail, thumbnails, popup, pop-up, overlay, photo, photos, picture, pictures, javascript, inline, iframe, ajax, jquery, plugin, plugins, link, links, widget, widgets, nextgen, nextgen gallery, mobile, iphone, android
Requires at least: 2.7
Tested up to: 3.4.2
Stable tag: trunk
@@ -271,11 +271,14 @@ You can localize the plugin with [Poedit](http://www.poedit.net/) and "languages
1. Pop-up image in "Gallery Images" style (with "Prev/Next" links)
1. Auto ThickBox Plus Settings screen
1. Customization example (pink background, transparent window, rounded corners, no borders, custom images, bold font, etc.)
+1. Mobile support for small-screen devices such as iPhone, Android, Symbian, BlackBerry and Windows Phone
== Changelog ==
= Latest Version =
-* NEW: Temporary workaround for small screen. ThickBox does nothing on small screen such as iPhone and Android. Thereby the link will be opened normally.
+* NEW: Mobile support for small-screen devices such as iPhone, Android, Symbian, BlackBerry and Windows Phone
+* NEW: Auto Resize feature works even when resizing browser window
+* NEW: "View - Margin - Window" option
* FIXED: Gallery images cannot be displayed in gallery style with [Cleaner Gallery](http://wordpress.org/extend/plugins/cleaner-gallery/)
= 1.8 =
diff --git a/screenshot-5.jpg b/screenshot-5.jpg
new file mode 100644
index 0000000..fd68854
Binary files /dev/null and b/screenshot-5.jpg differ
diff --git a/thickbox.js b/thickbox.js
index 2cf1a67..ea8c2bc 100644
--- a/thickbox.js
+++ b/thickbox.js
@@ -36,6 +36,7 @@ var tb_options = {
position_cap: "bottom",
win_width: 600,
win_height: 400,
+ margin_win: 15,
ref_title: ['link-title', 'link-name'],
ref_cap: ['link-title', 'link-name'],
effect_open: "none",
@@ -750,7 +751,7 @@ function tb_reposition(params) {
var SMALL_WIDTH = 480;
var SMALL_HEIGHT = 480;
var pageSize = tb_getPageSize();
- var winMargin = (pageSize[0] <= SMALL_WIDTH || pageSize[1] <= SMALL_HEIGHT) ? 0 : 30;
+ var winMargin = (pageSize[0] <= SMALL_WIDTH || pageSize[1] <= SMALL_HEIGHT) ? 0 : tb_options.margin_win * 2;
// Resizing large images - orginal by Christian Montoya edited by me.
var x = jQuery(window).width() - (winBorderSize[0] - winSize[0] + imgMarginSize[0] - imgSize[0]) - winMargin;
diff --git a/thickbox.min.js b/thickbox.min.js
index 616f0bd..bd0ccf1 100644
--- a/thickbox.min.js
+++ b/thickbox.min.js
@@ -1,38 +1,37 @@
jQuery(document).ready(function(){"string"!=typeof tb_pathToImage&&(tb_pathToImage=thickboxL10n.loadingAnimation);"string"!=typeof tb_closeImage&&(tb_closeImage=thickboxL10n.closeImage)});
-var tb_options={auto_resize:!0,click_img:"close",click_end:"loop",click_bg:"close",wheel_img:"prev_next",wheel_bg:"scroll",keys_close:[27,13],keys_prev:[188,37],keys_next:[190,39],keys_first:[36],keys_last:[35],move_img:!1,move_content:!1,resize_img:!1,resize_content:!1,position_title:"top",position_cap:"bottom",win_width:600,win_height:400,ref_title:["link-title","link-name"],ref_cap:["link-title","link-name"],effect_open:"none",effect_close:"fade",effect_trans:"none",effect_title:"none",effect_cap:"none",
-effect_speed:"fast",debug:!1};jQuery(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image;imgLoader.src=tb_pathToImage});function tb_init(a){jQuery.isFunction(jQuery().live)?jQuery(a).live("click",tb_click):jQuery(a).bind("click",tb_click)}
-function tb_click(){var a=tb_getPageSize();if(480>=a[0]||480>=a[1])return!0;null!==document.getElementById("TB_window")&&(jQuery(document).unbind(".thickbox"),jQuery("#TB_window").trigger("tb_unload").remove(),jQuery("body").append(""));tb_show(this,this.href||this.alt,this.rel||!1);this.blur();return!1}
+var tb_options={auto_resize:!0,click_img:"close",click_end:"loop",click_bg:"close",wheel_img:"prev_next",wheel_bg:"scroll",keys_close:[27,13],keys_prev:[188,37],keys_next:[190,39],keys_first:[36],keys_last:[35],move_img:!1,move_content:!1,resize_img:!1,resize_content:!1,position_title:"top",position_cap:"bottom",win_width:600,win_height:400,margin_win:15,ref_title:["link-title","link-name"],ref_cap:["link-title","link-name"],effect_open:"none",effect_close:"fade",effect_trans:"none",effect_title:"none",
+effect_cap:"none",effect_speed:"fast",debug:!1};jQuery(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image;imgLoader.src=tb_pathToImage});function tb_init(a){jQuery.isFunction(jQuery().live)?jQuery(a).live("click",tb_click):jQuery(a).bind("click",tb_click)}
+function tb_click(){null!==document.getElementById("TB_window")&&(jQuery(document).unbind(".thickbox"),jQuery("#TB_window").trigger("tb_unload").remove(),jQuery("body").append(""));tb_show(this,this.href||this.alt,this.rel||!1);this.blur();return!1}
function tb_caption(a,c){for(var c=c||tb_options.ref_cap,b,d=0;d")}
function tb_show(a,c,b){try{"undefined"===typeof document.body.style.maxHeight?(jQuery("body","html").css({height:"100%",width:"100%"}),jQuery("html").css("overflow","hidden"),null===document.getElementById("TB_HideSelect")&&(jQuery("body").append(""),"close"==tb_options.click_bg&&jQuery("#TB_overlay").click(tb_remove))):null===document.getElementById("TB_overlay")&&(jQuery("body").append(""),
"close"==tb_options.click_bg&&jQuery("#TB_overlay").click(tb_remove));tb_detectMacXFF()?jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack"):jQuery("#TB_overlay").addClass("TB_overlayBG");jQuery("body").append(" ");0==parseInt(jQuery("#TB_load").css("marginLeft"))&&jQuery("#TB_load").css("marginLeft",-jQuery("#TB_load").outerWidth()/2);0==parseInt(jQuery("#TB_load").css("marginTop"))&&jQuery("#TB_load").css("marginTop",-jQuery("#TB_load").outerHeight()/
-2);jQuery("#TB_load").show();var d=c;-1!==c.indexOf("?")&&(d=c.substr(0,c.indexOf("?")));-1!==c.indexOf("#")&&(d=c.substr(0,c.indexOf("#")));var e=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|\.webp$|\.pdf$/,j=d.toLowerCase().match(e);if(".jpg"==j||".jpeg"==j||".png"==j||".gif"==j||".bmp"==j||".webp"==j){TB_imageCount=TB_NextHTML=TB_NextURL=TB_NextCaption=TB_PrevHTML=TB_PrevURL=TB_PrevCaption="";TB_FoundURL=!1;TB_LastURL=TB_LastCaption=TB_FirstURL=TB_FirstCaption="";if(b){TB_TempArray=jQuery("a[rel="+b+"]").get();
+2);jQuery("#TB_load").show();var d=c;-1!==c.indexOf("?")&&(d=c.substr(0,c.indexOf("?")));-1!==c.indexOf("#")&&(d=c.substr(0,c.indexOf("#")));var e=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|\.webp$|\.pdf$/,g=d.toLowerCase().match(e);if(".jpg"==g||".jpeg"==g||".png"==g||".gif"==g||".bmp"==g||".webp"==g){TB_imageCount=TB_NextHTML=TB_NextURL=TB_NextCaption=TB_PrevHTML=TB_PrevURL=TB_PrevCaption="";TB_FoundURL=!1;TB_LastURL=TB_LastCaption=TB_FirstURL=TB_FirstCaption="";if(b){TB_TempArray=jQuery("a[rel="+b+"]").get();
for(TB_Counter=0;TB_Counter "+thickboxL10n.next+""):(TB_PrevCaption=TB_TempArray[TB_Counter],TB_PrevURL=TB_TempArray[TB_Counter].href,TB_PrevHTML=" "+
-thickboxL10n.prev+""):(TB_FoundURL=!0,TB_imageCount=thickboxL10n.image+" "+(TB_Counter+1)+" "+thickboxL10n.of+" "+TB_TempArray.length);TB_FirstCaption=TB_TempArray[0];TB_FirstURL=TB_TempArray[0].href;TB_LastCaption=TB_TempArray[TB_TempArray.length-1];TB_LastURL=TB_TempArray[TB_TempArray.length-1].href}imgPreloader=new Image;imgPreloader.onload=function(){function d(a,b,c){var e=a-jQuery("#TB_Image").width(),n=b-jQuery("#TB_Image").height();jQuery("#TB_window").css({marginLeft:Math.round(parseInt(jQuery("#TB_window").css("marginLeft"))-
-e/2),marginTop:Math.round(parseInt(jQuery("#TB_window").css("marginTop"))-n/2)});jQuery("#TB_window").width(jQuery("#TB_window").width()+e).height("auto");jQuery("#TB_Image").width(a).height(b);c&&jQuery("#TB_window a.scalable").attr("title",c)}imgPreloader.onload=null;var e=c.replace(/^[^\?]+\??/,""),k=tb_parseQuery(e),m=tb_getPageSize(),e=m[0]-150,m=m[1]-150,i=k.width?Math.min(1*k.width,imgPreloader.width):imgPreloader.width,j=k.height?Math.min(1*k.height,imgPreloader.height):imgPreloader.height;
-tb_fitWidth=e;tb_fitHeight=Math.round(j*(e/i));tb_fitHeight>m&&(tb_fitWidth=Math.round(tb_fitWidth*(m/tb_fitHeight)),tb_fitHeight=m);if(tb_fitToWindow=tb_options.auto_resize&&(i>e||j>m))i=tb_fitWidth,j=tb_fitHeight;"object"==typeof a&&(a=tb_caption(a));TB_Image=" ";"close"==tb_options.click_img||!b&&"close"==tb_options.click_end?TB_Image=""+TB_Image+"":"open"==tb_options.click_img?
-TB_Image=""+TB_Image+"":"download"==tb_options.click_img?TB_Image=""+TB_Image+"":"expand_shrink"==tb_options.click_img&&(TB_Image=""+TB_Image+"");TB_Caption=""+a+" "+TB_imageCount+TB_PrevHTML+TB_NextHTML+" ";"none"!=tb_options.effect_cap&&(TB_Caption=""+TB_Caption+" ");switch(tb_options.position_cap){case "top":jQuery("#TB_window").append(TB_Caption+TB_Image).addClass("TB_imageContent TB_captionTop");break;case "bottom":jQuery("#TB_window").append(TB_Image+TB_Caption).addClass("TB_imageContent TB_captionBottom");break;case "none":jQuery("#TB_window").append(TB_Image).addClass("TB_imageContent")}(!b||!a)&&jQuery("#TB_window").addClass("TB_singleLine");
-0==jQuery("#TB_Image").height()&&jQuery("#TB_Image").height(j);e=tb_getSize(jQuery("#TB_Image"),"margin");TB_WIDTH=e[0];TB_HEIGHT=e[1]+tb_getSize(jQuery("#TB_closeWindow"),"margin")[1];TB_WIDTH<1*k.width&&(TB_WIDTH=1*k.width,jQuery("#TB_Image").css({marginLeft:"auto",marginRight:"auto"}));TB_HEIGHT<1*k.height&&(TB_HEIGHT=1*k.height);"true"==k.modal&&jQuery("#TB_overlay").unbind();jQuery("#TB_closeWindowButton").click(tb_remove);if(""!==TB_PrevHTML){var t=function(){jQuery(document).unbind(".thickbox");
-jQuery("#TB_window").remove();jQuery("body").append("");tb_show(TB_PrevCaption,TB_PrevURL,b);return!1};jQuery("#TB_prev").click(t);var r=function(){jQuery(document).unbind(".thickbox");jQuery("#TB_window").remove();jQuery("body").append("");tb_show(TB_FirstCaption,TB_FirstURL,b);return!1}}if(""!==TB_NextHTML){var p=function(){jQuery(document).unbind(".thickbox");jQuery("#TB_window").remove();jQuery("body").append("");
-tb_show(TB_NextCaption,TB_NextURL,b);return!1};jQuery("#TB_next").click(p);var s=function(){jQuery(document).unbind(".thickbox");jQuery("#TB_window").remove();jQuery("body").append("");tb_show(TB_LastCaption,TB_LastURL,b);return!1}}if(b&&"next"==tb_options.click_img){var l,n,f;""!=TB_NextHTML?(l="TB_ImageNext",n=thickboxL10n.next,f=p):"close"==tb_options.click_end?(l="TB_ImageClose",n=thickboxL10n.close,f=tb_remove):"loop"==tb_options.click_end&&""!=
-TB_PrevHTML&&(l="TB_ImageFirst",n=thickboxL10n.first,f=r);l&&(n&&f)&&(e=e[1],jQuery("#TB_window").append(""),jQuery("#"+l).click(f))}else if(b&&"prev_next"==tb_options.click_img){var h,g,q;""!=TB_PrevHTML&&(l="TB_ImagePrev",n=thickboxL10n.prev,f=t);""!=TB_NextHTML&&(h="TB_ImageNext",g=thickboxL10n.next,q=p);""==TB_PrevHTML&&("close"==tb_options.click_end?(l="TB_ImageClose",n=thickboxL10n.close,
-f=tb_remove):"loop"==tb_options.click_end&&""!=TB_NextHTML&&(l="TB_ImageLast",n=thickboxL10n.last,f=s));""==TB_NextHTML&&("close"==tb_options.click_end?(h="TB_ImageClose2",g=thickboxL10n.close,q=tb_remove):"loop"==tb_options.click_end&&""!=TB_PrevHTML&&(h="TB_ImageFirst",g=thickboxL10n.first,q=r));if(l&&n&&f||h&&g&&q)e=e[1],m=link2="",l&&(n&&f)&&(m=""),h&&(g&&q)&&(link2=""),jQuery("#TB_window").append(""+m+link2+" "),m&&jQuery("#"+l).click(f),link2&&jQuery("#"+h).click(q),jQuery.browser.msie&&7>=parseInt(jQuery.browser.version)&&jQuery("#TB_ImageClick > a").focus(function(){this.blur()})}"download"==tb_options.click_img?jQuery("#TB_window a.download").click(function(){window.location=thickboxL10n.forceDL+"?file="+this.href;return!1}):"expand_shrink"==tb_options.click_img&&jQuery("#TB_window a.scalable").click(function(){tb_fitToWindow?
-d(imgPreloader.width,imgPreloader.height,thickboxL10n.fit):d(tb_fitWidth,tb_fitHeight,thickboxL10n.actual);tb_fitToWindow=!tb_fitToWindow;return!1});jQuery(document).bind("keydown.thickbox",function(a){a.stopImmediatePropagation();"true"!=k.modal&&-1!=jQuery.inArray(a.which,tb_options.keys_close)?jQuery(document).triggerHandler("wp_CloseOnEscape",[{event:a,what:"thickbox",cb:tb_remove}])||tb_remove():-1!=jQuery.inArray(a.which,tb_options.keys_prev)||a.shiftKey&&-1!=jQuery.inArray(a.which,tb_options.keys_prev.shift)?
-""!=TB_PrevHTML&&t():-1!=jQuery.inArray(a.which,tb_options.keys_next)?""!=TB_NextHTML&&p():-1!=jQuery.inArray(a.which,tb_options.keys_first)?""!=TB_PrevHTML&&r():-1!=jQuery.inArray(a.which,tb_options.keys_last)&&""!=TB_NextHTML&&s();return!1});b&&"prev_next"==tb_options.wheel_img?jQuery("#TB_window").bind("mousewheel.thickbox DOMMouseScroll.thickbox",function(a){a.stopImmediatePropagation();var b=0,a=a.originalEvent;a.wheelDelta?b=a.wheelDelta:a.detail&&(b=-a.detail);jQuery(window).one("MozMousePixelScroll",
-function(){return!1});if(0b&&""!=TB_NextHTML)return p(),!1}):"scale"==tb_options.wheel_img?jQuery("#TB_window").bind("mousewheel.thickbox DOMMouseScroll.thickbox",function(a){if(a.ctrlKey)return!0;a.stopImmediatePropagation();var b=0,a=a.originalEvent;a.wheelDelta?b=a.wheelDelta:a.detail&&(b=-a.detail);a=1+(0"+a+" ";if(-1!=c.indexOf("TB_iframe"))if(ajaxContentW+=2*("\v"=="v"?10:8),ajaxContentH+=2*("\v"=="v"?15:8),urlNoQuery=c.split(/[?&]TB_/),jQuery("#TB_iframeContent").remove(),TB_Iframe="","true"!=i.modal)switch(tb_options.position_title){case "top":jQuery("#TB_window").append(TB_Title+
-TB_Iframe).addClass("TB_iframeContent TB_titleTop");break;case "bottom":jQuery("#TB_window").append(TB_Iframe+TB_Title).addClass("TB_iframeContent TB_titleBottom");break;case "none":jQuery("#TB_window").append(TB_Iframe).addClass("TB_iframeContent")}else jQuery("#TB_overlay").unbind(),jQuery("#TB_window").append(TB_Iframe).addClass("TB_iframeContent");else if("block"!=jQuery("#TB_window").css("display"))if(TB_Ajax="",
-"true"!=i.modal)switch(tb_options.position_title){case "top":jQuery("#TB_window").append(TB_Title+TB_Ajax).addClass("TB_ajaxContent TB_titleTop");break;case "bottom":jQuery("#TB_window").append(TB_Ajax+TB_Title).addClass("TB_ajaxContent TB_titleBottom");break;case "none":jQuery("#TB_window").append(TB_Ajax).addClass("TB_ajaxContent TB_titleNone")}else jQuery("#TB_overlay").unbind(),jQuery("#TB_window").append(TB_Ajax).addClass("TB_ajaxContent"),jQuery("#TB_ajaxContent").addClass("TB_modal");else jQuery("#TB_ajaxContent")[0].style.width=
-ajaxContentW+"px",jQuery("#TB_ajaxContent")[0].style.height=ajaxContentH+"px",jQuery("#TB_ajaxContent")[0].scrollTop=0,jQuery("#TB_ajaxWindowTitle").html(a);if(-1!=c.indexOf("TB_iframe"))TB_WIDTH+=2*("\v"=="v"?10:8),TB_HEIGHT+=2*("\v"=="v"?15:8)+tb_getSize(jQuery("#TB_title"))[1];else{var r=tb_getSize(jQuery("#TB_ajaxContent"),"padding"),w=tb_getSize(jQuery("#TB_ajaxContent"));TB_WIDTH+=r[0]-w[0];TB_HEIGHT+=r[1]-w[1]+tb_getSize(jQuery("#TB_title"))[1]}jQuery("#TB_closeWindowButton").click(tb_remove);
-if(-1!=c.indexOf("TB_inline"))jQuery("#TB_ajaxContent").append(jQuery("#"+i.inlineId).children()),jQuery("#TB_window").bind("tb_unload",function(){jQuery("#"+i.inlineId).append(jQuery("#TB_ajaxContent").children())}),tb_position(),jQuery("#TB_load").remove(),tb_open(),tb_roundCorner("iframe");else if(-1!=c.indexOf("TB_iframe"))tb_position(),(!("onload"in jQuery("#TB_iframeContent")[0])&&"function"!=typeof jQuery("#TB_iframeContent")[0].onload||".pdf"==j)&&tb_showIframe();else{var x=-1==c.indexOf("?")?
-"?":"&";jQuery("#TB_ajaxContent").load(c+=x+"random="+(new Date).getTime(),function(){tb_position();jQuery("#TB_load").remove();tb_open();tb_roundCorner("ajax")})}tb_options.move_content&&jQuery("#TB_window").bind("mousedown.thickbox",function(a){return tb_move(a,-1!=c.indexOf("TB_iframe")?"iframe":"ajax")});tb_options.resize_content&&(tb_resize_init(),jQuery("#TB_Resize").bind("mousedown.thickbox",function(a){return tb_resize(a,-1!=c.indexOf("TB_iframe")?"iframe":"ajax")}));"none"!=tb_options.effect_title&&
-(jQuery("#TB_title").addClass("hover"),"zoom"==tb_options.effect_title&&jQuery("#TB_title").css({left:"50%",marginLeft:-TB_WIDTH/2}),jQuery("#TB_window").bind("mouseenter.thickbox",function(){tb_hover(jQuery("#TB_title"),tb_options.effect_title)}).bind("mouseleave.thickbox",function(){tb_hover(jQuery("#TB_title"),tb_options.effect_title,!0)}));"true"!=i.modal&&jQuery(document).bind("keyup.thickbox",function(a){if(-1!=jQuery.inArray(a.which,tb_options.keys_close))return a.stopImmediatePropagation(),
-jQuery(document).triggerHandler("wp_CloseOnEscape",[{event:a,what:"thickbox",cb:tb_remove}])||tb_remove(),!1})}}catch(y){tb_options.debug&&alert(y)}}
+thickboxL10n.prev+""):(TB_FoundURL=!0,TB_imageCount=thickboxL10n.image+" "+(TB_Counter+1)+" "+thickboxL10n.of+" "+TB_TempArray.length);TB_FirstCaption=TB_TempArray[0];TB_FirstURL=TB_TempArray[0].href;TB_LastCaption=TB_TempArray[TB_TempArray.length-1];TB_LastURL=TB_TempArray[TB_TempArray.length-1].href}imgPreloader=new Image;imgPreloader.onload=function(){function d(a,b,c){var e=a-jQuery("#TB_Image").width(),r=b-jQuery("#TB_Image").height();jQuery("#TB_window").css({marginLeft:Math.round(parseInt(jQuery("#TB_window").css("marginLeft"))-
+e/2),marginTop:Math.round(parseInt(jQuery("#TB_window").css("marginTop"))-r/2)});jQuery("#TB_window").width(jQuery("#TB_window").width()+e).height("auto");jQuery("#TB_Image").width(a).height(b);c&&jQuery("#TB_window a.scalable").attr("title",c)}imgPreloader.onload=null;var e=c.replace(/^[^\?]+\??/,""),f=tb_parseQuery(e);"object"==typeof a&&(a=tb_caption(a));TB_Image=" ";"close"==tb_options.click_img||
+!b&&"close"==tb_options.click_end?TB_Image=""+TB_Image+"":"open"==tb_options.click_img?TB_Image=""+TB_Image+"":"download"==tb_options.click_img?TB_Image=""+TB_Image+"":"expand_shrink"==tb_options.click_img&&(TB_Image=""+TB_Image+"");TB_Caption=""+a+" "+TB_imageCount+TB_PrevHTML+TB_NextHTML+" ";"none"!=tb_options.effect_cap&&(TB_Caption=""+TB_Caption+" ");switch(tb_options.position_cap){case "top":jQuery("#TB_window").append(TB_Caption+TB_Image).addClass("TB_imageContent TB_captionTop");break;
+case "bottom":jQuery("#TB_window").append(TB_Image+TB_Caption).addClass("TB_imageContent TB_captionBottom");break;case "none":jQuery("#TB_window").append(TB_Image).addClass("TB_imageContent")}(!b||!a)&&jQuery("#TB_window").addClass("TB_singleLine");"true"==f.modal&&jQuery("#TB_overlay").unbind();jQuery("#TB_closeWindowButton").click(tb_remove);if(""!==TB_PrevHTML){var g=function(){jQuery(document).unbind(".thickbox");jQuery("#TB_window").remove();jQuery("body").append("");
+tb_show(TB_PrevCaption,TB_PrevURL,b);return!1};jQuery("#TB_prev").click(g);var k=function(){jQuery(document).unbind(".thickbox");jQuery("#TB_window").remove();jQuery("body").append("");tb_show(TB_FirstCaption,TB_FirstURL,b);return!1}}if(""!==TB_NextHTML){var p=function(){jQuery(document).unbind(".thickbox");jQuery("#TB_window").remove();jQuery("body").append("");tb_show(TB_NextCaption,TB_NextURL,b);return!1};
+jQuery("#TB_next").click(p);var s=function(){jQuery(document).unbind(".thickbox");jQuery("#TB_window").remove();jQuery("body").append("");tb_show(TB_LastCaption,TB_LastURL,b);return!1}}if(b&&"next"==tb_options.click_img){var l,i,j;""!=TB_NextHTML?(l="TB_ImageNext",i=thickboxL10n.next,j=p):"close"==tb_options.click_end?(l="TB_ImageClose",i=thickboxL10n.close,j=tb_remove):"loop"==tb_options.click_end&&""!=TB_PrevHTML&&(l="TB_ImageFirst",i=thickboxL10n.first,
+j=k);l&&(i&&j)&&(e=tb_getSize(jQuery("#TB_Image"),"margin")[1],jQuery("#TB_window").append(""),jQuery("#"+l).click(j))}else if(b&&"prev_next"==tb_options.click_img){var q,r,h;""!=TB_PrevHTML&&(l="TB_ImagePrev",i=thickboxL10n.prev,j=g);""!=TB_NextHTML&&(q="TB_ImageNext",r=thickboxL10n.next,h=p);""==TB_PrevHTML&&("close"==tb_options.click_end?(l="TB_ImageClose",i=thickboxL10n.close,j=tb_remove):
+"loop"==tb_options.click_end&&""!=TB_NextHTML&&(l="TB_ImageLast",i=thickboxL10n.last,j=s));""==TB_NextHTML&&("close"==tb_options.click_end?(q="TB_ImageClose2",r=thickboxL10n.close,h=tb_remove):"loop"==tb_options.click_end&&""!=TB_PrevHTML&&(q="TB_ImageFirst",r=thickboxL10n.first,h=k));if(l&&i&&j||q&&r&&h){var e=tb_getSize(jQuery("#TB_Image"),"margin")[1],m=link2="";l&&(i&&j)&&(m="");q&&(r&&h)&&(link2="");jQuery("#TB_window").append(""+m+link2+" ");m&&jQuery("#"+l).click(j);link2&&jQuery("#"+q).click(h);jQuery.browser.msie&&7>=parseInt(jQuery.browser.version)&&jQuery("#TB_ImageClick > a").focus(function(){this.blur()})}}"download"==tb_options.click_img?jQuery("#TB_window a.download").click(function(){window.location=thickboxL10n.forceDL+"?file="+this.href;return!1}):"expand_shrink"==tb_options.click_img&&
+jQuery("#TB_window a.scalable").click(function(){tb_fitToWindow?d(imgPreloader.width,imgPreloader.height,thickboxL10n.fit):d(tb_fitWidth,tb_fitHeight,thickboxL10n.actual);tb_fitToWindow=!tb_fitToWindow;return!1});jQuery(document).bind("keydown.thickbox",function(a){a.stopImmediatePropagation();"true"!=f.modal&&-1!=jQuery.inArray(a.which,tb_options.keys_close)?jQuery(document).triggerHandler("wp_CloseOnEscape",[{event:a,what:"thickbox",cb:tb_remove}])||tb_remove():-1!=jQuery.inArray(a.which,tb_options.keys_prev)||
+a.shiftKey&&-1!=jQuery.inArray(a.which,tb_options.keys_prev.shift)?""!=TB_PrevHTML&&g():-1!=jQuery.inArray(a.which,tb_options.keys_next)?""!=TB_NextHTML&&p():-1!=jQuery.inArray(a.which,tb_options.keys_first)?""!=TB_PrevHTML&&k():-1!=jQuery.inArray(a.which,tb_options.keys_last)&&""!=TB_NextHTML&&s();return!1});b&&"prev_next"==tb_options.wheel_img?jQuery("#TB_window").bind("mousewheel.thickbox DOMMouseScroll.thickbox",function(a){a.stopImmediatePropagation();var b=0,a=a.originalEvent;a.wheelDelta?b=
+a.wheelDelta:a.detail&&(b=-a.detail);jQuery(window).one("MozMousePixelScroll",function(){return!1});if(0b&&""!=TB_NextHTML)return p(),!1}):"scale"==tb_options.wheel_img?jQuery("#TB_window").bind("mousewheel.thickbox DOMMouseScroll.thickbox",function(a){if(a.ctrlKey)return!0;a.stopImmediatePropagation();var b=0,a=a.originalEvent;a.wheelDelta?b=a.wheelDelta:a.detail&&(b=-a.detail);a=1+(0"+
+a+"  ";if(-1!=c.indexOf("TB_iframe"))if(ajaxContentW+=2*("\v"=="v"?10:8),ajaxContentH+=2*("\v"=="v"?15:8),urlNoQuery=c.split(/[?&]TB_/),jQuery("#TB_iframeContent").remove(),TB_Iframe="","true"!=f.modal)switch(tb_options.position_title){case "top":jQuery("#TB_window").append(TB_Title+TB_Iframe).addClass("TB_iframeContent TB_titleTop");break;case "bottom":jQuery("#TB_window").append(TB_Iframe+TB_Title).addClass("TB_iframeContent TB_titleBottom");break;case "none":jQuery("#TB_window").append(TB_Iframe).addClass("TB_iframeContent")}else jQuery("#TB_overlay").unbind(),jQuery("#TB_window").append(TB_Iframe).addClass("TB_iframeContent");
+else if("block"!=jQuery("#TB_window").css("display"))if(TB_Ajax="","true"!=f.modal)switch(tb_options.position_title){case "top":jQuery("#TB_window").append(TB_Title+TB_Ajax).addClass("TB_ajaxContent TB_titleTop");break;case "bottom":jQuery("#TB_window").append(TB_Ajax+TB_Title).addClass("TB_ajaxContent TB_titleBottom");break;case "none":jQuery("#TB_window").append(TB_Ajax).addClass("TB_ajaxContent TB_titleNone")}else jQuery("#TB_overlay").unbind(),
+jQuery("#TB_window").append(TB_Ajax).addClass("TB_ajaxContent"),jQuery("#TB_ajaxContent").addClass("TB_modal");else jQuery("#TB_ajaxContent")[0].style.width=ajaxContentW+"px",jQuery("#TB_ajaxContent")[0].style.height=ajaxContentH+"px",jQuery("#TB_ajaxContent")[0].scrollTop=0,jQuery("#TB_ajaxWindowTitle").html(a);if(-1!=c.indexOf("TB_iframe"))TB_WIDTH+=2*("\v"=="v"?10:8),TB_HEIGHT+=2*("\v"=="v"?15:8)+tb_getSize(jQuery("#TB_title"))[1];else{var s=tb_getSize(jQuery("#TB_ajaxContent"),"padding"),u=tb_getSize(jQuery("#TB_ajaxContent"));
+TB_WIDTH+=s[0]-u[0];TB_HEIGHT+=s[1]-u[1]+tb_getSize(jQuery("#TB_title"))[1]}jQuery("#TB_closeWindowButton").click(tb_remove);if(-1!=c.indexOf("TB_inline"))jQuery("#TB_ajaxContent").append(jQuery("#"+f.inlineId).children()),jQuery("#TB_window").bind("tb_unload",function(){jQuery("#"+f.inlineId).append(jQuery("#TB_ajaxContent").children())}),tb_position(),jQuery("#TB_load").remove(),tb_open(),tb_roundCorner("iframe");else if(-1!=c.indexOf("TB_iframe"))tb_position(),(!("onload"in jQuery("#TB_iframeContent")[0])&&
+"function"!=typeof jQuery("#TB_iframeContent")[0].onload||".pdf"==g)&&tb_showIframe();else{var v=-1==c.indexOf("?")?"?":"&";jQuery("#TB_ajaxContent").load(c+=v+"random="+(new Date).getTime(),function(){tb_position();jQuery("#TB_load").remove();tb_open();tb_roundCorner("ajax")})}tb_options.move_content&&jQuery("#TB_window").bind("mousedown.thickbox",function(a){return tb_move(a,-1!=c.indexOf("TB_iframe")?"iframe":"ajax")});tb_options.resize_content&&(tb_resize_init(),jQuery("#TB_Resize").bind("mousedown.thickbox",
+function(a){return tb_resize(a,-1!=c.indexOf("TB_iframe")?"iframe":"ajax")}));"none"!=tb_options.effect_title&&(jQuery("#TB_title").addClass("hover"),"zoom"==tb_options.effect_title&&jQuery("#TB_title").css({left:"50%",marginLeft:-TB_WIDTH/2}),jQuery("#TB_window").bind("mouseenter.thickbox",function(){tb_hover(jQuery("#TB_title"),tb_options.effect_title)}).bind("mouseleave.thickbox",function(){tb_hover(jQuery("#TB_title"),tb_options.effect_title,!0)}));"true"!=f.modal&&jQuery(document).bind("keyup.thickbox",
+function(a){if(-1!=jQuery.inArray(a.which,tb_options.keys_close))return a.stopImmediatePropagation(),jQuery(document).triggerHandler("wp_CloseOnEscape",[{event:a,what:"thickbox",cb:tb_remove}])||tb_remove(),!1})}}catch(w){tb_options.debug&&alert(w)}}
function tb_open(){"hidden"==jQuery("#TB_window").css("visibility")&&jQuery("#TB_window").css("visibility","visible");var a=jQuery("#TB_window").is(".TB_Transition")?tb_options.effect_trans:tb_options.effect_open;tb_effectView(a,!1);var c=function(){tb_effectView(a)};switch(a){case "zoom":jQuery("#TB_window").height(jQuery("#TB_window").height());"undefined"==typeof document.body.style.maxHeight&&jQuery("#TB_window").css({marginTop:-jQuery("#TB_window").height()/2,top:jQuery(window).height()/2+jQuery(document).scrollTop()});
jQuery("#TB_Image").hide().show(tb_options.effect_speed);jQuery("#TB_window").show(tb_options.effect_speed,c);break;case "slide":"undefined"==typeof document.body.style.maxHeight&&jQuery("#TB_window").css({marginTop:-jQuery("#TB_window").height()/2,top:jQuery(window).height()/2+jQuery(document).scrollTop()});jQuery("#TB_window").slideDown(tb_options.effect_speed,c);break;case "fade":jQuery("#TB_window").fadeIn(tb_options.effect_speed,c);break;default:jQuery("#TB_window").show()}"none"==jQuery("#TB_window").css("display")&&
jQuery("#TB_window").css("display","block");jQuery("#TB_title").height(Math.max(jQuery("#TB_title").height(),jQuery("#TB_ajaxWindowTitle").height()+13))}
@@ -41,18 +40,21 @@ d=jQuery("#TB_iframeContent").contents(),a=0==d.length||c.width()"),"none"==tb_options.position_title&&a?jQuery("#TB_ajaxContent").css({borderBottomLeftRadius:0,borderBottomRightRadius:0}):jQuery("#TB_ajaxContent").css("borderRadius",0),jQuery("#TB_ajaxContentMarginBottom").css({height:b,borderBottomLeftRadius:b,borderBottomRightRadius:b});if(("bottom"==tb_options.position_title||"none"==tb_options.position_title)&&c)jQuery("#TB_ajaxContent").css({marginTop:b,
borderRadius:0}).after(""),jQuery("#TB_ajaxContentMarginTop").css({height:b,borderTopLeftRadius:b,borderTopRightRadius:b})}}function tb_effectView(a,c){"none"!=a&&(("boolean"==typeof c?c:1)?jQuery("#TB_ImageClick").show():jQuery("#TB_ImageClick").hide())}function tb_showIframe(){jQuery("#TB_load").remove();tb_open();tb_roundCorner("iframe")}
function tb_remove(){tb_effectView(tb_options.effect_close,!1);var a=function(){jQuery("#TB_window,#TB_overlay,#TB_HideSelect").trigger("tb_unload").unbind().remove();"undefined"==typeof document.body.style.maxHeight&&(jQuery("body","html").css({height:"auto",width:"auto"}),jQuery("html").css("overflow",""))};switch(tb_options.effect_close){case "zoom":jQuery("#TB_Image").hide(tb_options.effect_speed);jQuery("#TB_window").hide(tb_options.effect_speed,a);break;case "slide":jQuery("#TB_window").slideUp(tb_options.effect_speed,
-a);break;case "fade":jQuery("#TB_window").fadeOut(tb_options.effect_speed,a);break;default:a()}jQuery("#TB_load").remove();jQuery(document).unbind(".thickbox");return!1}
+a);break;case "fade":jQuery("#TB_window").fadeOut(tb_options.effect_speed,a);break;default:a()}jQuery("#TB_load").remove();jQuery(document).add(window).unbind(".thickbox");return!1}
function tb_position(){var a=TB_WIDTH+jQuery("#TB_window").outerWidth()-jQuery("#TB_window").width(),c=TB_HEIGHT+jQuery("#TB_window").outerHeight()-jQuery("#TB_window").height(),b=-parseInt(a/2,10),d=-parseInt(c/2,10),e="undefined"===typeof document.body.style.maxHeight;!e&&"absolute"==jQuery("#TB_window").css("position")&&(b+=jQuery(document).scrollLeft(),d+=jQuery(document).scrollTop());jQuery("#TB_window").css({marginLeft:b+"px",width:TB_WIDTH+"px"});e||jQuery("#TB_window").css({marginTop:d+"px"});
"relative"==jQuery("body").css("position")&&(d=tb_getPageSize(),e&&(b=parseInt((d[0]-a)/2,10)+jQuery(document).scrollLeft(),d=parseInt((d[1]-c)/2,10)+jQuery(document).scrollTop(),jQuery("#TB_window").css({marginLeft:b+"px",marginTop:d+"px",top:"0",left:"0"})))}
-function tb_parseQuery(a){var c={};if(!a)return c;for(var a=a.substring(a.indexOf("?")+1),a=a.split(/[;&]/),b=0;b=g[0]||480>=g[1]?0:2*tb_options.margin_win,g=jQuery(window).width()-(c[0]-b[0]+d[0]-e[0])-k,c=jQuery(window).height()-(c[1]-e[1])-k,k=a.width?Math.min(1*a.width,imgPreloader.width):imgPreloader.width,f=a.height?Math.min(1*a.height,imgPreloader.height):
+imgPreloader.height;tb_fitWidth=g;tb_fitHeight=Math.round(f*(g/k));tb_fitHeight>c&&(tb_fitWidth=Math.round(tb_fitWidth*(c/tb_fitHeight)),tb_fitHeight=c);if(tb_fitToWindow=tb_options.auto_resize&&(k>g||f>c))k=tb_fitWidth,f=tb_fitHeight;jQuery("#TB_Image").attr("width",k).attr("height",f);0==jQuery("#TB_Image").height()&&jQuery("#TB_Image").height(f);TB_WIDTH=k+(d[0]-e[0]);TB_HEIGHT=f+(b[1]-e[1]);TB_WIDTH<1*a.width&&(TB_WIDTH=1*a.width,jQuery("#TB_Image").css({marginLeft:"auto",marginRight:"auto"}));
+TB_HEIGHT<1*a.height&&(TB_HEIGHT=1*a.height);tb_position()}function tb_parseQuery(a){var c={};if(!a)return c;for(var a=a.substring(a.indexOf("?")+1),a=a.split(/[;&]/),b=0;b");"undefined"==typeof document.body.style.maxHeight&&jQuery("#TB_ResizeE, #TB_ResizeW").height(jQuery("#TB_window").height())}
-function tb_drag(a,c,b){if(1!=a.which)return!0;TB_THRESHOLD=5;MIN_WIDTH=MIN_HEIGHT=100;var d=jQuery("#TB_window").offset().left-parseInt(jQuery("#TB_window").css("marginLeft")),e=jQuery("#TB_window").offset().top-parseInt(jQuery("#TB_window").css("marginTop"));"undefined"!=typeof document.body.style.maxHeight&&"absolute"!=jQuery("#TB_window").css("position")&&(d-=jQuery(document).scrollLeft(),e-=jQuery(document).scrollTop());var j=a.clientX,v=a.clientY,i=!1,r=jQuery("#TB_window, #TB_overlay, "+("image"==
-c?"#TB_window a":"#TB_closeWindowButton")),w="move"==b||"w-resize"==b||"nw-resize"==b||"sw-resize"==b,x="move"==b||"n-resize"==b||"ne-resize"==b||"nw-resize"==b,y="move"!=b&&"n-resize"!=b&&"s-resize"!=b,B="move"!=b&&"e-resize"!=b&&"w-resize"!=b,z="ne-resize"==b||"nw-resize"==b||"se-resize"==b||"sw-resize"==b;if(z)var k=jQuery("#TB_window").width()/jQuery("#TB_window").height();if("move"!=b){var m=jQuery("#TB_window").width(),A=jQuery("#TB_window").height(),u=jQuery("image"==c?"#TB_Image":"iframe"==
-c?"#TB_iframeContent":"#TB_ajaxContent"),t=u.width(),C=u.height(),p="e-resize"==b||"ne-resize"==b||"se-resize"==b?1:-1,s="s-resize"==b||"se-resize"==b||"sw-resize"==b?1:-1;if("undefined"==typeof document.body.style.maxHeight)var l=jQuery("#TB_window").css("marginTop")}jQuery(document).bind("mousemove.thickbox",function(a,f,h){var f=f?f:a.clientX,h=h?h:a.clientY,a=f-j,g=h-v;if(!i&&(a=a>TB_THRESHOLD?a-TB_THRESHOLD:a<-TB_THRESHOLD?a+TB_THRESHOLD:0,g=g>TB_THRESHOLD?g-TB_THRESHOLD:g<-TB_THRESHOLD?g+TB_THRESHOLD:
-0,0f?g=Math.round(a/k)*p*s:k a").height(jQuery("#TB_Image").outerHeight(!0)),"undefined"==typeof document.body.style.maxHeight&&jQuery("#TB_window").css("marginTop",
-l)));w&&!q&&jQuery("#TB_window").css("left",d+a);x&&!skipMoveY&&jQuery("#TB_window").css("top",e+g)}return!1});jQuery(document).bind("mouseup.thickbox",function(a){jQuery(document).unbind("mousemove.thickbox mouseup.thickbox");"iframe"==c&&jQuery("#TB_iframeContent").contents().unbind("mousemove.thickbox mouseup.thickbox");if(!i)return!0;r.css("cursor","");if(jQuery.browser.opera)return!1;var b=jQuery(a.target);if(b.is("html"))return!1;b.is(".TB_ImageLeft, .TB_ImageRight")||(b=b.parent());if((a=b.data("events"))&&
+function tb_drag(a,c,b){if(1!=a.which)return!0;TB_THRESHOLD=5;MIN_WIDTH=MIN_HEIGHT=100;var d=jQuery("#TB_window").offset().left-parseInt(jQuery("#TB_window").css("marginLeft")),e=jQuery("#TB_window").offset().top-parseInt(jQuery("#TB_window").css("marginTop"));"undefined"!=typeof document.body.style.maxHeight&&"absolute"!=jQuery("#TB_window").css("position")&&(d-=jQuery(document).scrollLeft(),e-=jQuery(document).scrollTop());var g=a.clientX,k=a.clientY,f=!1,s=jQuery("#TB_window, #TB_overlay, "+("image"==
+c?"#TB_window a":"#TB_closeWindowButton")),u="move"==b||"w-resize"==b||"nw-resize"==b||"sw-resize"==b,v="move"==b||"n-resize"==b||"ne-resize"==b||"nw-resize"==b,w="move"!=b&&"n-resize"!=b&&"s-resize"!=b,B="move"!=b&&"e-resize"!=b&&"w-resize"!=b,y="ne-resize"==b||"nw-resize"==b||"se-resize"==b||"sw-resize"==b;if(y)var t=jQuery("#TB_window").width()/jQuery("#TB_window").height();if("move"!=b){var z=jQuery("#TB_window").width(),A=jQuery("#TB_window").height(),p=jQuery("image"==c?"#TB_Image":"iframe"==
+c?"#TB_iframeContent":"#TB_ajaxContent"),C=p.width(),l=p.height(),i="e-resize"==b||"ne-resize"==b||"se-resize"==b?1:-1,j="s-resize"==b||"se-resize"==b||"sw-resize"==b?1:-1;if("undefined"==typeof document.body.style.maxHeight)var q=jQuery("#TB_window").css("marginTop")}jQuery(document).bind("mousemove.thickbox",function(a,h,m){var h=h?h:a.clientX,m=m?m:a.clientY,a=h-g,n=m-k;if(!f&&(a=a>TB_THRESHOLD?a-TB_THRESHOLD:a<-TB_THRESHOLD?a+TB_THRESHOLD:0,n=n>TB_THRESHOLD?n-TB_THRESHOLD:n<-TB_THRESHOLD?n+TB_THRESHOLD:
+0,0h?n=Math.round(a/t)*i*j:t a").height(jQuery("#TB_Image").outerHeight(!0)),"undefined"==typeof document.body.style.maxHeight&&jQuery("#TB_window").css("marginTop",
+q)));u&&!x&&jQuery("#TB_window").css("left",d+a);v&&!skipMoveY&&jQuery("#TB_window").css("top",e+n)}return!1});jQuery(document).bind("mouseup.thickbox",function(a){jQuery(document).unbind("mousemove.thickbox mouseup.thickbox");"iframe"==c&&jQuery("#TB_iframeContent").contents().unbind("mousemove.thickbox mouseup.thickbox");if(!f)return!0;s.css("cursor","");if(jQuery.browser.opera)return!1;var b=jQuery(a.target);if(b.is("html"))return!1;b.is(".TB_ImageLeft, .TB_ImageRight")||(b=b.parent());if((a=b.data("events"))&&
a.click){var d=[];jQuery.each(a.click,function(a,b){d[d.length]=b.handler||b})}b.unbind("click").one("click",function(a){a.stopImmediatePropagation();if(d)for(a=0;a |