NEW: Temporary workaround for small screen. ThickBox does nothing on small screen such as iPhone and Android. Thereby the link will be opened normally.

This commit is contained in:
attosoft committed 2012-09-26 08:09:45 +00:00
1 parent 091de8bb1a
commit 71aafb61ec
3 files changed
+40 -32

No files matched your search

+1
View File
@@ -275,6 +275,7 @@ You can localize the plugin with [Poedit](http://www.poedit.net/) and "languages
== 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.
* FIXED: Gallery images cannot be displayed in gallery style with [Cleaner Gallery](http://wordpress.org/extend/plugins/cleaner-gallery/)
= 1.8 =
+7
View File
@@ -63,6 +63,13 @@ function tb_init(domChunk){
}
function tb_click(){
var SMALL_WIDTH = 480;
var SMALL_HEIGHT = 480;
var pageSize = tb_getPageSize();
if (pageSize[0] <= SMALL_WIDTH || pageSize[1] <= SMALL_HEIGHT) {
return true; // do nothing (i.e. the link will be opened normally)
}
if (document.getElementById("TB_window") !== null) {
jQuery(document).unbind('.thickbox');
jQuery("#TB_window").trigger("tb_unload").remove();
+32 -32
View File
@@ -1,7 +1,7 @@
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(){null!==document.getElementById("TB_window")&&(jQuery(document).unbind(".thickbox"),jQuery("#TB_window").trigger("tb_unload").remove(),jQuery("body").append("<div id='TB_window' class='TB_Transition'></div>"));tb_show(this,this.href||this.alt,this.rel||!1);this.blur();return!1}
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("<div id='TB_window' class='TB_Transition'></div>"));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<c.length&&!b;d++)switch(c[d]){case "link-title":b=a.title;break;case "link-name":b=a.name;break;case "blank":return"";case "img-title":b=jQuery(a).children("img").attr("title");break;case "img-alt":b=jQuery(a).children("img").attr("alt");break;case "img-cap":b=jQuery(a).parent().is("dt.gallery-icon")?jQuery(a).parent().nextAll(".wp-caption-text").text().replace(/^\s+|\s+$/g,""):jQuery(a).nextAll(".wp-caption-text").text();break;case "img-desc":b=
jQuery(a).children("img").attr("longdesc");break;case "img-name":b=jQuery(a).children("img").attr("name")}return b.replace(/(\r\n|[\n\r])/g,"<br />")}
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("<iframe id='TB_HideSelect'>"+thickboxL10n.noiframes+"</iframe><div id='TB_overlay'></div><div id='TB_window'></div>"),"close"==tb_options.click_bg&&jQuery("#TB_overlay").click(tb_remove))):null===document.getElementById("TB_overlay")&&(jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>"),
@@ -9,30 +9,30 @@ function tb_show(a,c,b){try{"undefined"===typeof document.body.style.maxHeight?(
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();
for(TB_Counter=0;TB_Counter<TB_TempArray.length&&""===TB_NextHTML;TB_Counter++)TB_TempArray[TB_Counter].href.toLowerCase().match(e),("object"==typeof a?TB_TempArray[TB_Counter]!=a:TB_TempArray[TB_Counter].href!=c)?TB_FoundURL?(TB_NextCaption=TB_TempArray[TB_Counter],TB_NextURL=TB_TempArray[TB_Counter].href,TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.next+"</a></span>"):(TB_PrevCaption=TB_TempArray[TB_Counter],TB_PrevURL=TB_TempArray[TB_Counter].href,TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>"+
thickboxL10n.prev+"</a></span>"):(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(k.width*1,imgPreloader.width):imgPreloader.width,j=k.height?Math.min(k.height*1,imgPreloader.height):imgPreloader.height;
tb_fitWidth=e;tb_fitHeight=Math.round(j*(e/i));if(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}typeof a=="object"&&(a=tb_caption(a));TB_Image="<img id='TB_Image' src='"+c+"' width='"+i+"' height='"+j+"' alt='"+a+"'/>";tb_options.click_img=="close"||!b&&tb_options.click_end=="close"?TB_Image="<a href='' id='TB_ImageOff' title='"+thickboxL10n.close+"'>"+TB_Image+"</a>":tb_options.click_img==
"open"?TB_Image="<a href='"+c+"' target='_blank' title='"+thickboxL10n.open+"'>"+TB_Image+"</a>":tb_options.click_img=="download"?TB_Image="<a href='"+c+"' class='download' title='"+thickboxL10n.download+"'>"+TB_Image+"</a>":tb_options.click_img=="expand_shrink"&&(TB_Image="<a href='' class='scalable' title='"+(tb_fitToWindow?thickboxL10n.actual:thickboxL10n.fit)+"'>"+TB_Image+"</a>");TB_Caption="<div id='TB_caption'>"+a+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='"+
thickboxL10n.close+"'><img src='"+tb_closeImage+"' /></a></div>";tb_options.effect_cap!="none"&&(TB_Caption="<div id='TB_CaptionBar'>"+TB_Caption+"</div>");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");
jQuery("#TB_Image").height()==0&&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];if(TB_WIDTH<k.width*1){TB_WIDTH=k.width*1;jQuery("#TB_Image").css({marginLeft:"auto",marginRight:"auto"})}TB_HEIGHT<k.height*1&&(TB_HEIGHT=k.height*1);k.modal=="true"&&jQuery("#TB_overlay").unbind();jQuery("#TB_closeWindowButton").click(tb_remove);if(TB_PrevHTML!==""){var s=function(){jQuery(document).unbind(".thickbox");
jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window' class='TB_Transition'></div>");tb_show(TB_PrevCaption,TB_PrevURL,b);return false};jQuery("#TB_prev").click(s);var q=function(){jQuery(document).unbind(".thickbox");jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window' class='TB_Transition'></div>");tb_show(TB_FirstCaption,TB_FirstURL,b);return false}}if(TB_NextHTML!==""){var o=function(){jQuery(document).unbind(".thickbox");jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window' class='TB_Transition'></div>");
tb_show(TB_NextCaption,TB_NextURL,b);return false};jQuery("#TB_next").click(o);var r=function(){jQuery(document).unbind(".thickbox");jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window' class='TB_Transition'></div>");tb_show(TB_LastCaption,TB_LastURL,b);return false}}if(b&&tb_options.click_img=="next"){var l,n,f;if(TB_NextHTML!=""){l="TB_ImageNext";n=thickboxL10n.next;f=o}else if(tb_options.click_end=="close"){l="TB_ImageClose";n=thickboxL10n.close;f=tb_remove}else if(tb_options.click_end==
"loop"&&TB_PrevHTML!=""){l="TB_ImageFirst";n=thickboxL10n.first;f=q}if(l&&n&&f){e=e[1];jQuery("#TB_window").append("<div id='TB_ImageClick'><a href='' id='"+l+"' title='"+n+"' style='height:"+e+"px;'><span></span></a></div>");jQuery("#"+l).click(f)}}else if(b&&tb_options.click_img=="prev_next"){var h,g,p;if(TB_PrevHTML!=""){l="TB_ImagePrev";n=thickboxL10n.prev;f=s}if(TB_NextHTML!=""){h="TB_ImageNext";g=thickboxL10n.next;p=o}if(TB_PrevHTML=="")if(tb_options.click_end=="close"){l="TB_ImageClose";n=
thickboxL10n.close;f=tb_remove}else if(tb_options.click_end=="loop"&&TB_NextHTML!=""){l="TB_ImageLast";n=thickboxL10n.last;f=r}if(TB_NextHTML=="")if(tb_options.click_end=="close"){h="TB_ImageClose2";g=thickboxL10n.close;p=tb_remove}else if(tb_options.click_end=="loop"&&TB_PrevHTML!=""){h="TB_ImageFirst";g=thickboxL10n.first;p=q}if(l&&n&&f||h&&g&&p){e=e[1];m=link2="";l&&(n&&f)&&(m="<a href='' id='"+l+"' class='TB_ImageLeft' title='"+n+"' style='height:"+e+"px;'></a>");h&&(g&&p)&&(link2="<a href='' id='"+
h+"' class='TB_ImageRight' title='"+g+"' style='height:"+e+"px;'></a>");jQuery("#TB_window").append("<div id='TB_ImageClick'>"+m+link2+"</div>");m&&jQuery("#"+l).click(f);link2&&jQuery("#"+h).click(p);jQuery.browser.msie&&parseInt(jQuery.browser.version)<=7&&jQuery("#TB_ImageClick > a").focus(function(){this.blur()})}}tb_options.click_img=="download"?jQuery("#TB_window a.download").click(function(){window.location=thickboxL10n.forceDL+"?file="+this.href;return false}):tb_options.click_img=="expand_shrink"&&
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 false});jQuery(document).bind("keydown.thickbox",function(a){a.stopImmediatePropagation();k.modal!="true"&&jQuery.inArray(a.which,tb_options.keys_close)!=-1?jQuery(document).triggerHandler("wp_CloseOnEscape",[{event:a,what:"thickbox",cb:tb_remove}])||tb_remove():jQuery.inArray(a.which,tb_options.keys_prev)!=
-1||a.shiftKey&&jQuery.inArray(a.which,tb_options.keys_prev.shift)!=-1?TB_PrevHTML!=""&&s():jQuery.inArray(a.which,tb_options.keys_next)!=-1?TB_NextHTML!=""&&o():jQuery.inArray(a.which,tb_options.keys_first)!=-1?TB_PrevHTML!=""&&q():jQuery.inArray(a.which,tb_options.keys_last)!=-1&&TB_NextHTML!=""&&r();return false});b&&tb_options.wheel_img=="prev_next"?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 false});if(b>0){if(TB_PrevHTML!=""){s();return false}}else if(b<0&&TB_NextHTML!=""){o();return false}}):tb_options.wheel_img=="scale"?jQuery("#TB_window").bind("mousewheel.thickbox DOMMouseScroll.thickbox",function(a){if(a.ctrlKey)return true;a.stopImmediatePropagation();var b=0,a=a.originalEvent;a.wheelDelta?b=a.wheelDelta:a.detail&&(b=-a.detail);a=1+(b>0?0.1:-0.1);b=Math.round(jQuery("#TB_Image").width()*
a);a=Math.round(jQuery("#TB_Image").height()*a);b>100&&a>100&&d(b,a);return false}):tb_options.wheel_img=="none"&&jQuery("#TB_window").bind("mousewheel.thickbox DOMMouseScroll.thickbox",function(a){a.stopImmediatePropagation();return false});tb_options.wheel_bg=="none"&&jQuery("#TB_overlay").bind("mousewheel.thickbox DOMMouseScroll.thickbox",function(a){a.stopImmediatePropagation();return false});tb_options.move_img&&jQuery("#TB_window").bind("mousedown.thickbox",function(a){return tb_move(a,"image")});
if(tb_options.resize_img){tb_resize_init();jQuery("#TB_Resize").bind("mousedown.thickbox",function(a){return tb_resize(a,"image")})}if(tb_options.effect_cap!="none"){jQuery("#TB_Image").css("margin",jQuery("#TB_Image").css("marginLeft"));tb_options.effect_cap=="zoom"&&jQuery("#TB_CaptionBar").css({left:"50%",marginLeft:-TB_WIDTH/2});jQuery("#TB_window").bind("mouseenter.thickbox",function(){tb_hover(jQuery("#TB_CaptionBar"),tb_options.effect_cap)}).bind("mouseleave.thickbox",function(){tb_hover(jQuery("#TB_CaptionBar"),
tb_options.effect_cap,true)})}tb_position();jQuery("#TB_load").remove();(tb_options.click_img=="close"||!b&&tb_options.click_end=="close")&&jQuery("#TB_ImageOff").click(tb_remove);tb_open()};imgPreloader.src=c}else{var u=c.replace(/^[^\?]+\??/,""),i=tb_parseQuery(u);TB_WIDTH=1*i.width||tb_options.win_width;TB_HEIGHT=1*i.height||tb_options.win_height;ajaxContentW=TB_WIDTH;ajaxContentH=TB_HEIGHT;"object"==typeof a&&(a=tb_caption(a,tb_options.ref_title));TB_Title="<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+
a+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><img src='"+tb_closeImage+"' /></a></div></div>";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="<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(1E3*Math.random())+"' onload='tb_showIframe()' style='width:"+
ajaxContentW+"px;height:"+ajaxContentH+"px;'>"+thickboxL10n.noiframes+"</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="<div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>","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 q=tb_getSize(jQuery("#TB_ajaxContent"),"padding"),v=tb_getSize(jQuery("#TB_ajaxContent"));
TB_WIDTH+=q[0]-v[0];TB_HEIGHT+=q[1]-v[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 w=-1==c.indexOf("?")?"?":"&";jQuery("#TB_ajaxContent").load(c+=w+"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,c.indexOf("TB_iframe")!=-1?"iframe":"ajax")});tb_options.resize_content&&(tb_resize_init(),jQuery("#TB_Resize").bind("mousedown.thickbox",
function(a){return tb_resize(a,c.indexOf("TB_iframe")!=-1?"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,true)}));"true"!=i.modal&&jQuery(document).bind("keyup.thickbox",
function(a){if(jQuery.inArray(a.which,tb_options.keys_close)!=-1){a.stopImmediatePropagation();jQuery(document).triggerHandler("wp_CloseOnEscape",[{event:a,what:"thickbox",cb:tb_remove}])||tb_remove();return false}})}}catch(x){tb_options.debug&&alert(x)}}
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="<img id='TB_Image' src='"+c+"' width='"+i+"' height='"+j+"' alt='"+a+"'/>";"close"==tb_options.click_img||!b&&"close"==tb_options.click_end?TB_Image="<a href='' id='TB_ImageOff' title='"+thickboxL10n.close+"'>"+TB_Image+"</a>":"open"==tb_options.click_img?
TB_Image="<a href='"+c+"' target='_blank' title='"+thickboxL10n.open+"'>"+TB_Image+"</a>":"download"==tb_options.click_img?TB_Image="<a href='"+c+"' class='download' title='"+thickboxL10n.download+"'>"+TB_Image+"</a>":"expand_shrink"==tb_options.click_img&&(TB_Image="<a href='' class='scalable' title='"+(tb_fitToWindow?thickboxL10n.actual:thickboxL10n.fit)+"'>"+TB_Image+"</a>");TB_Caption="<div id='TB_caption'>"+a+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='"+
thickboxL10n.close+"'><img src='"+tb_closeImage+"' /></a></div>";"none"!=tb_options.effect_cap&&(TB_Caption="<div id='TB_CaptionBar'>"+TB_Caption+"</div>");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("<div id='TB_window' class='TB_Transition'></div>");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("<div id='TB_window' class='TB_Transition'></div>");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("<div id='TB_window' class='TB_Transition'></div>");
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("<div id='TB_window' class='TB_Transition'></div>");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("<div id='TB_ImageClick'><a href='' id='"+l+"' title='"+n+"' style='height:"+e+"px;'><span></span></a></div>"),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="<a href='' id='"+l+"' class='TB_ImageLeft' title='"+n+"' style='height:"+e+"px;'></a>"),h&&(g&&q)&&(link2="<a href='' id='"+h+"' class='TB_ImageRight' title='"+
g+"' style='height:"+e+"px;'></a>"),jQuery("#TB_window").append("<div id='TB_ImageClick'>"+m+link2+"</div>"),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(0<b){if(""!=TB_PrevHTML)return t(),!1}else if(0>b&&""!=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<b?0.1:-0.1);b=Math.round(jQuery("#TB_Image").width()*a);a=Math.round(jQuery("#TB_Image").height()*a);100<b&&100<a&&d(b,a);return!1}):"none"==tb_options.wheel_img&&
jQuery("#TB_window").bind("mousewheel.thickbox DOMMouseScroll.thickbox",function(a){a.stopImmediatePropagation();return!1});"none"==tb_options.wheel_bg&&jQuery("#TB_overlay").bind("mousewheel.thickbox DOMMouseScroll.thickbox",function(a){a.stopImmediatePropagation();return!1});tb_options.move_img&&jQuery("#TB_window").bind("mousedown.thickbox",function(a){return tb_move(a,"image")});tb_options.resize_img&&(tb_resize_init(),jQuery("#TB_Resize").bind("mousedown.thickbox",function(a){return tb_resize(a,
"image")}));"none"!=tb_options.effect_cap&&(jQuery("#TB_Image").css("margin",jQuery("#TB_Image").css("marginLeft")),"zoom"==tb_options.effect_cap&&jQuery("#TB_CaptionBar").css({left:"50%",marginLeft:-TB_WIDTH/2}),jQuery("#TB_window").bind("mouseenter.thickbox",function(){tb_hover(jQuery("#TB_CaptionBar"),tb_options.effect_cap)}).bind("mouseleave.thickbox",function(){tb_hover(jQuery("#TB_CaptionBar"),tb_options.effect_cap,!0)}));tb_position();jQuery("#TB_load").remove();("close"==tb_options.click_img||
!b&&"close"==tb_options.click_end)&&jQuery("#TB_ImageOff").click(tb_remove);tb_open()};imgPreloader.src=c}else{var v=c.replace(/^[^\?]+\??/,""),i=tb_parseQuery(v);TB_WIDTH=1*i.width||tb_options.win_width;TB_HEIGHT=1*i.height||tb_options.win_height;ajaxContentW=TB_WIDTH;ajaxContentH=TB_HEIGHT;"object"==typeof a&&(a=tb_caption(a,tb_options.ref_title));TB_Title="<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+a+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+
"'><img src='"+tb_closeImage+"' /></a></div></div>";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="<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(1E3*Math.random())+"' onload='tb_showIframe()' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'>"+thickboxL10n.noiframes+"</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="<div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>",
"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)}}
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))}
@@ -48,13 +48,13 @@ function tb_parseQuery(a){var c={};if(!a)return c;for(var a=a.substring(a.indexO
function tb_detectMacXFF(){var a=navigator.userAgent.toLowerCase();if(-1!=a.indexOf("mac")&&-1!=a.indexOf("firefox"))return!0}function tb_move(a,c){if("image"==c){if(jQuery(a.target).parent().is("#TB_prev, #TB_next, #TB_closeWindowButton"))return!0}else if(!jQuery(a.target).closest("#TB_title").length||jQuery(a.target).parent().is("#TB_closeWindowButton"))return!0;return tb_drag(a,c,"move")}
function tb_resize(a,c){var b;switch(a.target.id){case "TB_ResizeN":b="n-resize";break;case "TB_ResizeE":b="e-resize";break;case "TB_ResizeW":b="w-resize";break;case "TB_ResizeS":b="s-resize";break;case "TB_ResizeNE":b="ne-resize";break;case "TB_ResizeNW":b="nw-resize";break;case "TB_ResizeSE":b="se-resize";break;case "TB_ResizeSW":b="sw-resize";break;default:return!0}return tb_drag(a,c,b)}
function tb_resize_init(){jQuery("#TB_window").append("<div id='TB_Resize'><div id='TB_ResizeN'></div><div id='TB_ResizeE'></div><div id='TB_ResizeW'></div><div id='TB_ResizeS'></div><div id='TB_ResizeNE'></div><div id='TB_ResizeNW'></div><div id='TB_ResizeSE'></div><div id='TB_ResizeSW'></div></div>");"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,u=a.clientY,i=!1,q=jQuery("#TB_window, #TB_overlay, "+("image"==
c?"#TB_window a":"#TB_closeWindowButton")),v="move"==b||"w-resize"==b||"nw-resize"==b||"sw-resize"==b,w="move"==b||"n-resize"==b||"ne-resize"==b||"nw-resize"==b,x="move"!=b&&"n-resize"!=b&&"s-resize"!=b,A="move"!=b&&"e-resize"!=b&&"w-resize"!=b,y="ne-resize"==b||"nw-resize"==b||"se-resize"==b||"sw-resize"==b;if(y)var k=jQuery("#TB_window").width()/jQuery("#TB_window").height();if("move"!=b){var m=jQuery("#TB_window").width(),z=jQuery("#TB_window").height(),t=jQuery("image"==c?"#TB_Image":"iframe"==
c?"#TB_iframeContent":"#TB_ajaxContent"),s=t.width(),B=t.height(),o="e-resize"==b||"ne-resize"==b||"se-resize"==b?1:-1,r="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-u;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;if(Math.abs(a)>0||Math.abs(g)>0){i=true;j=f;u=h;q.css("cursor",b)}}if(i){if(y){f=m+a*o;h=z+g*r;f=f/h;k>f?g=Math.round(a/k)*o*r:k<f&&(a=Math.round(g*k)*o*r)}var p=skipMoveY=false;if(x){f=m+a*o;if(f<MIN_WIDTH)p=true;else{jQuery("#TB_window").width(f);t.width(s+a*o)}}if(A){h=z+g*r;if(h<MIN_HEIGHT)skipMoveY=true;else{jQuery("#TB_window").height(h);t.height(B+g*r);c=="image"&&jQuery("#TB_ImageClick > a").height(jQuery("#TB_Image").outerHeight(true));typeof document.body.style.maxHeight=="undefined"&&
jQuery("#TB_window").css("marginTop",l)}}v&&!p&&jQuery("#TB_window").css("left",d+a);w&&!skipMoveY&&jQuery("#TB_window").css("top",e+g)}return false});jQuery(document).bind("mouseup.thickbox",function(a){jQuery(document).unbind("mousemove.thickbox mouseup.thickbox");c=="iframe"&&jQuery("#TB_iframeContent").contents().unbind("mousemove.thickbox mouseup.thickbox");if(!i)return true;q.css("cursor","");if(jQuery.browser.opera)return false;var b=jQuery(a.target);if(b.is("html"))return false;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<d.length;a++)b.click(d[a]);return false});return false});"iframe"==c&&jQuery("#TB_iframeContent").contents().bind("mousemove.thickbox",function(a){a.clientX=a.clientX+(jQuery("#TB_iframeContent").offset().left-jQuery(document).scrollLeft());a.clientY=a.clientY+(jQuery("#TB_iframeContent").offset().top-
jQuery(document).scrollTop());jQuery(document).trigger("mousemove.thickbox",[a.clientX,a.clientY])}).bind("mouseup.thickbox",function(){jQuery(document).trigger("mouseup.thickbox")});return!1}
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,0<Math.abs(a)||0<Math.abs(g)))i=!0,j=f,v=h,r.css("cursor",b);if(i){z&&(f=m+a*p,h=A+g*s,f/=h,k>f?g=Math.round(a/k)*p*s:k<f&&(a=Math.round(g*k)*p*s));var q=skipMoveY=!1;y&&(f=m+a*p,f<MIN_WIDTH?q=!0:(jQuery("#TB_window").width(f),u.width(t+a*p)));B&&(h=A+g*s,h<MIN_HEIGHT?skipMoveY=!0:(jQuery("#TB_window").height(h),u.height(C+g*s),"image"==c&&jQuery("#TB_ImageClick > 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"))&&
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<d.length;a++)b.click(d[a]);return!1});return!1});"iframe"==c&&jQuery("#TB_iframeContent").contents().bind("mousemove.thickbox",function(a){a.clientX+=jQuery("#TB_iframeContent").offset().left-jQuery(document).scrollLeft();a.clientY+=jQuery("#TB_iframeContent").offset().top-jQuery(document).scrollTop();jQuery(document).trigger("mousemove.thickbox",
[a.clientX,a.clientY])}).bind("mouseup.thickbox",function(){jQuery(document).trigger("mouseup.thickbox")});return!1}
function tb_getSize(a,c){var b,d,e=function(){switch(c){case "padding":b=a.innerWidth();d=a.innerHeight();break;case "border":b=a.outerWidth();d=a.outerHeight();break;case "margin":b=a.outerWidth(!0);d=a.outerHeight(!0);break;default:b=a.width(),d=a.height()}};"none"==jQuery("#TB_window").css("display")&&(0<tb_versionCompare("1.4.4")||0<tb_versionCompare("1.6.2")&&c)?jQuery.swap(jQuery("#TB_window")[0],{position:"absolute",visibility:"hidden",display:"block"},e):e();return[b,d]}
function tb_versionCompare(a,c){c=c||jQuery.fn.jquery;if(a!=c)for(var b=a.split("."),d=c.split("."),e=0;e<b.length||e<d.length;e++){if(b[e]&&!d[e]||b[e]>d[e])return 1;if(!b[e]&&d[e]||b[e]<d[e])return-1}return 0}
function tb_hover(a,c,b){!b&&"visible"!=a.css("visibility")&&a.css({visibility:"visible",display:"none"});switch(c){case "zoom":b?a.hide(tb_options.effect_speed):a.show(tb_options.effect_speed);break;case "slide":b?a.slideUp(tb_options.effect_speed):a.slideDown(tb_options.effect_speed);break;case "fade":b?a.fadeOut(tb_options.effect_speed):a.fadeIn(tb_options.effect_speed)}};