CHANGED: Modified "Mouse Wheel - Image - Scale" option. Uses calculated size instead of CSS3 transform so now it is not buggy in Drag & Drop action and it works at all browsers, and it scales only an image not ThickBox window. In addition fixed an issue that "Mouse Wheel - Image - Scale" action do not work in "Single Image" style. (See [575200])

This commit is contained in:
attosoft committed 2012-08-14 04:28:28 +00:00
1 parent 14076fbb82
commit 1d61516698
4 files changed
+55 -58

No files matched your search

+1 -1
View File
@@ -204,7 +204,7 @@ class auto_thickbox_options {
<label class="item"><input type="radio" name="auto-thickbox-plus[wheel_img]" value="prev_next"<?php $this->util->checked($this->options['wheel_img'], 'prev_next'); ?> />
<?php echo "{$this->texts['prev2']} / {$this->texts['next2']}"; ?></label>
<label class="item"><input type="radio" name="auto-thickbox-plus[wheel_img]" value="scale"<?php $this->util->checked($this->options['wheel_img'], 'scale'); ?> />
<?php $this->util->_e('Scale'); ?> (<?php $this->util->_e('beta'); ?>)</label>
<?php $this->util->_e('Scale'); ?></label>
<label class="item"><input type="radio" name="auto-thickbox-plus[wheel_img]" value="none"<?php $this->util->checked($this->options['wheel_img'], 'none'); ?> />
<?php echo $this->texts['none']; ?></label>
</td>
+5 -3
View File
@@ -117,7 +117,7 @@ This is available options at Auto ThickBox Plus Options in 'Settings' menu. You
* ThickBox Resources
* Action
* Mouse Click
* Mouse Wheel (Scroll)
* Mouse Wheel
* Drag & Drop
* Keyboard Shortcuts
* View
@@ -278,13 +278,15 @@ You can localize the plugin with [Poedit](http://www.poedit.net/). All you do is
* NEW: "Action - Mouse Click - Image - Download (beta)" option. You can click an image to download it. This is experimental feature so I'm not sure whether it works on all server environments.
* NEW: "Action - Mouse Click - Image - Expand / Shrink" option. You can expand an image to actual size then shrink it to fit window, and vice versa.
* NEW: "View - Size - Window (Content) - Width/Height" option. You can change the default size of ThickBox window with non-image, and it can be overridden with `width`/`height` parameters in URL.
* CHANGED: Modified "Mouse Wheel - Image - Scale" option. Uses calculated size instead of CSS3 transform so now it is not buggy in Drag & Drop action and it works at all browsers, and it scales only an image not ThickBox window.
* CHANGED: Uses spinner controls (input:number) instead of text fields (input:text) in options for entering numerical values. input:number is introduced in HTML5 so now it works only at Google Chrome, Opera and Safari.
* FIXED: "Mouse Wheel" actions do not work in Firefox since some time
* FIXED: "Mouse Wheel - Image - Scale" action do not work in "Single Image" style
* UPDATED: Added **Italian (it_IT) translation (props Gianni Diurno)**
= 1.7 =
* NEW: "General - Auto ThickBox - WordPress Filters/JavaScript/Disabled" option. Auto ThickBox had worked only in content, excerpt, comments and widget tests due to WordPress filters (hooks). Now using JavaScript, the feature can work in whole page such as front page, header/footer, contents output by themes or other plugins. And you can also disable it if unnecessary.
* NEW: "Mouse Wheel (Scroll) - Image - Scale (beta)" option. This is experimental feature so it's a little bit buggy in Drag & Drop action and it works only at modern browsers that support CSS3 transform such as IE9.
* NEW: "Mouse Wheel - Image - Scale (beta)" option. This is experimental feature so it is a little bit buggy in Drag & Drop action and it works only at modern browsers that support CSS3 transform such as IE9.
* NEW: Enabled "Screen Options" menu to show/hide meta boxes in Options page
* CHANGED: Improvements on custom `<script>`/`<style>` tags
* Places not only thidkbox.js but also the custom tags depending on "General - ThickBox Resources - Header/Footer" option
@@ -434,7 +436,7 @@ You can localize the plugin with [Poedit](http://www.poedit.net/). All you do is
= 0.7 =
* NEW: Supports more mouse/keyboard actions, and added **"Action" options** to Options page
* Mouse Click - Close, None
* Mouse Wheel (Scroll) - Prev / Next, None
* Mouse Wheel - Prev / Next, None
* Keyboard Shortcuts - Esc, Enter, < / >, Left / Right, [Shift +] Tab, [Shift +] Space, BackSpace
* NEW: Uses WordPress translations as much as possible
* Now ThickBox window is localized to **more than 70 languages**
+13 -19
View File
@@ -191,9 +191,9 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
var imageWidth = params['width'] ? Math.min(params['width']*1, imgPreloader.width) : imgPreloader.width;
var imageHeight = params['height'] ? Math.min(params['height']*1, imgPreloader.height) : imgPreloader.height;
tb_fitWidth = x;
tb_fitHeight = imageHeight * (x / imageWidth);
tb_fitHeight = Math.round(imageHeight * (x / imageWidth));
if (tb_fitHeight > y) {
tb_fitWidth = tb_fitWidth * (y / tb_fitHeight);
tb_fitWidth = Math.round(tb_fitWidth * (y / tb_fitHeight));
tb_fitHeight = y;
}
tb_fitToWindow = tb_options.auto_resize && (imageWidth > x || imageHeight > y);
@@ -369,12 +369,13 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
var diffWidth = width - jQuery("#TB_Image").width();
var diffHeight = height - jQuery("#TB_Image").height();
jQuery("#TB_window").css({
marginLeft: parseInt(jQuery("#TB_window").css("marginLeft")) - (diffWidth / 2),
marginTop: parseInt(jQuery("#TB_window").css("marginTop")) - (diffHeight / 2)
marginLeft: Math.round(parseInt(jQuery("#TB_window").css("marginLeft")) - (diffWidth / 2)),
marginTop: Math.round(parseInt(jQuery("#TB_window").css("marginTop")) - (diffHeight / 2))
});
jQuery("#TB_window").width(jQuery("#TB_window").width() + diffWidth);
jQuery("#TB_window").width(jQuery("#TB_window").width() + diffWidth).height('auto');
jQuery("#TB_Image").width(width).height(height);
jQuery("#TB_window a.resizable").attr("title", title);
if (title)
jQuery("#TB_window a.resizable").attr("title", title);
}
jQuery(document).bind('keydown.thickbox', function(e){
@@ -432,7 +433,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
}
}
});
} else if (imageGroup && tb_options.wheel_img == "scale") {
} else if (tb_options.wheel_img == "scale") {
jQuery("#TB_window").bind('mousewheel.thickbox DOMMouseScroll.thickbox', function(e){
if (e.ctrlKey) return true;
e.stopImmediatePropagation();
@@ -446,18 +447,11 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
delta = -event.detail; // minus sign
}
var scale = (jQuery.data(jQuery("#TB_window")[0], "scale") || 1.0) + (delta > 0 ? 0.1 : -0.1);
if (scale > 0) {
var scaleVal = "scale(" + scale + ")";
jQuery("#TB_window").css({
"-ms-transform": scaleVal, // IE9 or later
"-moz-transform": scaleVal,
"-webkit-transform": scaleVal,
"-o-transform": scaleVal,
"-khtml-transform": scaleVal
});
jQuery.data(jQuery("#TB_window")[0], "scale", scale);
}
var scale = 1.0 + (delta > 0 ? 0.1 : -0.1);
var width = Math.round(jQuery("#TB_Image").width() * scale);
var height = Math.round(jQuery("#TB_Image").height() * scale);
if (width > 100 && height > 100) // minimum size (100x100)
setImageSize(width, height);
return false;
});
}
+36 -35
View File
@@ -2,56 +2,57 @@ jQuery(document).ready(function(){"string"!=typeof tb_pathToImage&&(tb_pathToIma
var tb_options={auto_resize:!0,click_img:"close",click_end:"loop",click_bg:"close",wheel_img:"prev_next",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_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=
function tb_caption(a,c){for(var c=c||tb_options.ref_cap,b,e=0;e<c.length&&!b;e++)switch(c[e]){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>"),
"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("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");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$/,k=d.toLowerCase().match(e);if(".jpg"==k||".jpeg"==k||".png"==k||".gif"==k||".bmp"==k||".webp"==k){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(){imgPreloader.onload=null;var d=c.replace(/^[^\?]+\??/,""),e=tb_parseQuery(d),g=tb_getPageSize(),d=g[0]-150,i=g[1]-150,l=e.width?Math.min(e.width*
1,imgPreloader.width):imgPreloader.width,g=e.height?Math.min(e.height*1,imgPreloader.height):imgPreloader.height;if(tb_options.auto_resize)if(l>d){g=g*(d/l);l=d;if(g>i){l=l*(i/g);g=i}}else if(g>i){l=l*(i/g);g=i;if(l>d){g=g*(d/l);l=d}}typeof a=="object"&&(a=tb_caption(a));TB_Image="<img id='TB_Image' src='"+c+"' width='"+l+"' height='"+g+"' 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_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");d=tb_getSize(jQuery("#TB_Image"),
"margin");d[1]<g&&(d[1]=d[1]+g);TB_WIDTH=d[0];TB_HEIGHT=d[1]+tb_getSize(jQuery("#TB_closeWindow"),"margin")[1];if(TB_WIDTH<e.width*1){TB_WIDTH=e.width*1;jQuery("#TB_Image").css({marginLeft:"auto",marginRight:"auto"})}TB_HEIGHT<e.height*1&&(TB_HEIGHT=e.height*1);e.modal=="true"&&jQuery("#TB_overlay").unbind();jQuery("#TB_closeWindowButton").click(tb_remove);if(TB_PrevHTML!==""){var k=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(k);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_FirstCaption,TB_FirstURL,b);return false}}if(TB_NextHTML!==""){var n=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(n);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_LastCaption,TB_LastURL,b);return false}}if(b&&tb_options.click_img=="next"){var m,h,f;if(TB_NextHTML!=""){m="TB_ImageNext";h=thickboxL10n.next;f=n}else if(tb_options.click_end=="close"){m="TB_ImageClose";h=thickboxL10n.close;f=tb_remove}else if(tb_options.click_end=="loop"&&TB_PrevHTML!=
""){m="TB_ImageFirst";h=thickboxL10n.first;f=p}if(m&&h&&f){d=d[1];jQuery("#TB_window").append("<div id='TB_ImageClick'><a href='' id='"+m+"' title='"+h+"' style='height:"+d+"px;'><span></span></a></div>");jQuery("#"+m).click(f)}}else if(b&&tb_options.click_img=="prev_next"){var j,q,r;if(TB_PrevHTML!=""){m="TB_ImagePrev";h=thickboxL10n.prev;f=k}if(TB_NextHTML!=""){j="TB_ImageNext";q=thickboxL10n.next;r=n}if(TB_PrevHTML=="")if(tb_options.click_end=="close"){m="TB_ImageClose";h=thickboxL10n.close;f=
tb_remove}else if(tb_options.click_end=="loop"&&TB_NextHTML!=""){m="TB_ImageLast";h=thickboxL10n.last;f=o}if(TB_NextHTML=="")if(tb_options.click_end=="close"){j="TB_ImageClose2";q=thickboxL10n.close;r=tb_remove}else if(tb_options.click_end=="loop"&&TB_PrevHTML!=""){j="TB_ImageFirst";q=thickboxL10n.first;r=p}if(m&&h&&f||j&&q&&r){d=d[1];g=link2="";m&&(h&&f)&&(g="<a href='' id='"+m+"' class='TB_ImageLeft' title='"+h+"' style='height:"+d+"px;'></a>");j&&(q&&r)&&(link2="<a href='' id='"+j+"' class='TB_ImageRight' title='"+
q+"' style='height:"+d+"px;'></a>");jQuery("#TB_window").append("<div id='TB_ImageClick'>"+g+link2+"</div>");g&&jQuery("#"+m).click(f);link2&&jQuery("#"+j).click(r);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=tb_options.dl_file+"?file="+this.href;return false});jQuery(document).bind("keydown.thickbox",function(a){a.stopImmediatePropagation();
e.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!=""&&k():jQuery.inArray(a.which,tb_options.keys_next)!=-1?TB_NextHTML!=""&&n():jQuery.inArray(a.which,tb_options.keys_first)!=-1?TB_PrevHTML!=""&&p():jQuery.inArray(a.which,tb_options.keys_last)!=-1&&
TB_NextHTML!=""&&o();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!=""){k();return false}}else if(b<0&&TB_NextHTML!=""){n();return false}}):b&&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);b=(jQuery.data(jQuery("#TB_window")[0],"scale")||1)+(b>0?0.1:-0.1);if(b>0){a="scale("+b+")";jQuery("#TB_window").css({"-ms-transform":a,"-moz-transform":a,"-webkit-transform":a,"-o-transform":a,"-khtml-transform":a});jQuery.data(jQuery("#TB_window")[0],"scale",b)}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 t=c.replace(/^[^\?]+\??/,""),i=tb_parseQuery(t);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 o=tb_getSize(jQuery("#TB_ajaxContent"),"padding"),u=tb_getSize(jQuery("#TB_ajaxContent"));
TB_WIDTH+=o[0]-u[0];TB_HEIGHT+=o[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("#"+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])&&
2);jQuery("#TB_load").show();var e=c;-1!==c.indexOf("?")&&(e=c.substr(0,c.indexOf("?")));-1!==c.indexOf("#")&&(e=c.substr(0,c.indexOf("#")));var d=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|\.webp$|\.pdf$/,k=e.toLowerCase().match(d);if(".jpg"==k||".jpeg"==k||".png"==k||".gif"==k||".bmp"==k||".webp"==k){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(d),("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 e(a,b,c){var d=a-jQuery("#TB_Image").width(),g=b-jQuery("#TB_Image").height();jQuery("#TB_window").css({marginLeft:Math.round(parseInt(jQuery("#TB_window").css("marginLeft"))-
d/2),marginTop:Math.round(parseInt(jQuery("#TB_window").css("marginTop"))-g/2)});jQuery("#TB_window").width(jQuery("#TB_window").width()+d).height("auto");jQuery("#TB_Image").width(a).height(b);c&&jQuery("#TB_window a.resizable").attr("title",c)}imgPreloader.onload=null;var d=c.replace(/^[^\?]+\??/,""),h=tb_parseQuery(d),j=tb_getPageSize(),d=j[0]-150,k=j[1]-150,o=h.width?Math.min(h.width*1,imgPreloader.width):imgPreloader.width,j=h.height?Math.min(h.height*1,imgPreloader.height):imgPreloader.height;
tb_fitWidth=d;tb_fitHeight=Math.round(j*(d/o));if(tb_fitHeight>k){tb_fitWidth=Math.round(tb_fitWidth*(k/tb_fitHeight));tb_fitHeight=k}if(tb_fitToWindow=tb_options.auto_resize&&(o>d||j>k)){o=tb_fitWidth;j=tb_fitHeight}typeof a=="object"&&(a=tb_caption(a));TB_Image="<img id='TB_Image' src='"+c+"' width='"+o+"' 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='resizable' 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");
d=tb_getSize(jQuery("#TB_Image"),"margin");d[1]<j&&(d[1]=d[1]+j);TB_WIDTH=d[0];TB_HEIGHT=d[1]+tb_getSize(jQuery("#TB_closeWindow"),"margin")[1];if(TB_WIDTH<h.width*1){TB_WIDTH=h.width*1;jQuery("#TB_Image").css({marginLeft:"auto",marginRight:"auto"})}TB_HEIGHT<h.height*1&&(TB_HEIGHT=h.height*1);h.modal=="true"&&jQuery("#TB_overlay").unbind();jQuery("#TB_closeWindowButton").click(tb_remove);if(TB_PrevHTML!==""){var l=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(l);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_FirstCaption,TB_FirstURL,b);return false}}if(TB_NextHTML!==""){var m=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(m);var x=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 i,f,g;if(TB_NextHTML!=""){i="TB_ImageNext";f=thickboxL10n.next;g=m}else if(tb_options.click_end=="close"){i="TB_ImageClose";f=thickboxL10n.close;g=tb_remove}else if(tb_options.click_end=="loop"&&TB_PrevHTML!=
""){i="TB_ImageFirst";f=thickboxL10n.first;g=p}if(i&&f&&g){d=d[1];jQuery("#TB_window").append("<div id='TB_ImageClick'><a href='' id='"+i+"' title='"+f+"' style='height:"+d+"px;'><span></span></a></div>");jQuery("#"+i).click(g)}}else if(b&&tb_options.click_img=="prev_next"){var n,q,r;if(TB_PrevHTML!=""){i="TB_ImagePrev";f=thickboxL10n.prev;g=l}if(TB_NextHTML!=""){n="TB_ImageNext";q=thickboxL10n.next;r=m}if(TB_PrevHTML=="")if(tb_options.click_end=="close"){i="TB_ImageClose";f=thickboxL10n.close;g=
tb_remove}else if(tb_options.click_end=="loop"&&TB_NextHTML!=""){i="TB_ImageLast";f=thickboxL10n.last;g=x}if(TB_NextHTML=="")if(tb_options.click_end=="close"){n="TB_ImageClose2";q=thickboxL10n.close;r=tb_remove}else if(tb_options.click_end=="loop"&&TB_PrevHTML!=""){n="TB_ImageFirst";q=thickboxL10n.first;r=p}if(i&&f&&g||n&&q&&r){d=d[1];j=link2="";i&&(f&&g)&&(j="<a href='' id='"+i+"' class='TB_ImageLeft' title='"+f+"' style='height:"+d+"px;'></a>");n&&(q&&r)&&(link2="<a href='' id='"+n+"' class='TB_ImageRight' title='"+
q+"' style='height:"+d+"px;'></a>");jQuery("#TB_window").append("<div id='TB_ImageClick'>"+j+link2+"</div>");j&&jQuery("#"+i).click(g);link2&&jQuery("#"+n).click(r);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=tb_options.dl_file+"?file="+this.href;return false}):tb_options.click_img=="expand_shrink"&&jQuery("#TB_window a.resizable").click(function(){tb_fitToWindow?
e(imgPreloader.width,imgPreloader.height,thickboxL10n.fit):e(tb_fitWidth,tb_fitHeight,thickboxL10n.actual);tb_fitToWindow=!tb_fitToWindow;return false});jQuery(document).bind("keydown.thickbox",function(a){a.stopImmediatePropagation();h.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!=""&&l():jQuery.inArray(a.which,tb_options.keys_next)!=-1?TB_NextHTML!=""&&m():jQuery.inArray(a.which,tb_options.keys_first)!=-1?TB_PrevHTML!=""&&p():jQuery.inArray(a.which,tb_options.keys_last)!=-1&&TB_NextHTML!=""&&x();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!=""){l();return false}}else if(b<0&&TB_NextHTML!=""){m();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&&e(b,a);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 t=c.replace(/^[^\?]+\??/,""),h=tb_parseQuery(t);TB_WIDTH=1*h.width||tb_options.win_width;TB_HEIGHT=1*h.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"!=h.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"!=h.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("#"+h.inlineId).children()),jQuery("#TB_window").bind("tb_unload",function(){jQuery("#"+h.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"==k)&&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,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){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"!=h.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(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))}
function tb_roundCorner(a){var c=jQuery("#TB_window")[0].currentStyle||document.defaultView.getComputedStyle(jQuery("#TB_window")[0],""),b=c.borderTopLeftRadius;if(0<parseInt(b))if("transparent"!=jQuery("#TB_window").css("backgroundColor")&&"rgba(0, 0, 0, 0)"!=jQuery("#TB_window").css("backgroundColor")&&jQuery("#TB_window").css("backgroundColor",0<parseInt(c.borderTopWidth)?c.borderTopColor:"transparent"),"iframe"==a){if(jQuery.browser.safari||jQuery.browser.webkit){var c=jQuery("#TB_iframeContent"),
d=jQuery("#TB_iframeContent").contents(),a=0==d.length||c.width()<d.width(),c=0==d.length||c.height()<d.height();("top"==tb_options.position_title||"none"==tb_options.position_title)&&(a||c)&&jQuery("#TB_iframeContent").css("paddingBottom",b);("bottom"==tb_options.position_title||"none"==tb_options.position_title)&&c&&jQuery("#TB_iframeContent").css("paddingTop",b)}}else if("ajax"==a){c=jQuery("#TB_ajaxContent")[0];a=c.scrollWidth>c.clientWidth;c=c.scrollHeight>c.clientHeight;if(("top"==tb_options.position_title||
e=jQuery("#TB_iframeContent").contents(),a=0==e.length||c.width()<e.width(),c=0==e.length||c.height()<e.height();("top"==tb_options.position_title||"none"==tb_options.position_title)&&(a||c)&&jQuery("#TB_iframeContent").css("paddingBottom",b);("bottom"==tb_options.position_title||"none"==tb_options.position_title)&&c&&jQuery("#TB_iframeContent").css("paddingTop",b)}}else if("ajax"==a){c=jQuery("#TB_ajaxContent")[0];a=c.scrollWidth>c.clientWidth;c=c.scrollHeight>c.clientHeight;if(("top"==tb_options.position_title||
"none"==tb_options.position_title)&&(a||c))jQuery("#TB_ajaxContent").css("marginBottom",b).after("<div id='TB_ajaxContentMarginBottom'></div>"),"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("<div id='TB_ajaxContentMarginTop'></div>"),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}
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")&&(e?(b=parseInt((window.innerWidth-a)/2,10)+jQuery(document).scrollLeft(),d=parseInt((window.innerHeight-c)/2,10)+jQuery(document).scrollTop(),jQuery("#TB_window").css({marginLeft:b+"px",marginTop:d+"px",top:"0",left:"0"})):(a=parseInt((window.innerHeight-c)/2,10),"absolute"==jQuery("#TB_window").css("position")&&(a+=jQuery(document).scrollTop()),jQuery("#TB_window").css({marginTop:"",top:a+"px"})))}
function tb_parseQuery(a){var c={};if(!a)return c;for(var a=a.substring(a.indexOf("?")+1),a=a.split(/[;&]/),b=0;b<a.length;b++){var d=a[b].split("=");if(d&&2==d.length){var e=unescape(d[0]),d=unescape(d[1]),d=d.replace(/\+/g," ");c[e]=d}}return c}function tb_getPageSize(){var a=document.documentElement;return arrayPageSize=[window.innerWidth||self.innerWidth||a&&a.clientWidth||document.body.clientWidth,window.innerHeight||self.innerHeight||a&&a.clientHeight||document.body.clientHeight]}
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),e=-parseInt(c/2,10),d="undefined"===typeof document.body.style.maxHeight;!d&&"absolute"==jQuery("#TB_window").css("position")&&(b+=jQuery(document).scrollLeft(),e+=jQuery(document).scrollTop());jQuery("#TB_window").css({marginLeft:b+"px",width:TB_WIDTH+"px"});d||jQuery("#TB_window").css({marginTop:e+"px"});
"relative"==jQuery("body").css("position")&&(d?(b=parseInt((window.innerWidth-a)/2,10)+jQuery(document).scrollLeft(),e=parseInt((window.innerHeight-c)/2,10)+jQuery(document).scrollTop(),jQuery("#TB_window").css({marginLeft:b+"px",marginTop:e+"px",top:"0",left:"0"})):(a=parseInt((window.innerHeight-c)/2,10),"absolute"==jQuery("#TB_window").css("position")&&(a+=jQuery(document).scrollTop()),jQuery("#TB_window").css({marginTop:"",top:a+"px"})))}
function tb_parseQuery(a){var c={};if(!a)return c;for(var a=a.substring(a.indexOf("?")+1),a=a.split(/[;&]/),b=0;b<a.length;b++){var e=a[b].split("=");if(e&&2==e.length){var d=unescape(e[0]),e=unescape(e[1]),e=e.replace(/\+/g," ");c[d]=e}}return c}function tb_getPageSize(){var a=document.documentElement;return arrayPageSize=[window.innerWidth||self.innerWidth||a&&a.clientWidth||document.body.clientWidth,window.innerHeight||self.innerHeight||a&&a.clientHeight||document.body.clientHeight]}
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 k=a.clientX,t=a.clientY,i=!1,o=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,x="move"!=b&&"e-resize"!=b&&"w-resize"!=b;if("move"!=b){var y=jQuery("#TB_window").width(),g=jQuery("#TB_window").height(),s=jQuery("image"==c?"#TB_Image":"iframe"==c?"#TB_iframeContent":"#TB_ajaxContent"),l=s.width(),z=s.height(),p="e-resize"==b||"ne-resize"==b||"se-resize"==b?1:-1,n="s-resize"==
b||"se-resize"==b||"sw-resize"==b?1:-1;if("undefined"==typeof document.body.style.maxHeight)var A=jQuery("#TB_window").css("marginTop")}jQuery(document).bind("mousemove.thickbox",function(a,h,f){var h=h?h:a.clientX,f=f?f:a.clientY,a=h-k,j=f-t;if(!i){a=a>TB_THRESHOLD?a-TB_THRESHOLD:a<-TB_THRESHOLD?a+TB_THRESHOLD:0;j=j>TB_THRESHOLD?j-TB_THRESHOLD:j<-TB_THRESHOLD?j+TB_THRESHOLD:0;if(Math.abs(a)>0||Math.abs(j)>0){i=true;k=h;t=f;o.css("cursor",b)}}if(i){h=skipMoveY=false;if(w){f=y+a*p;if(f<MIN_WIDTH)h=
true;else{jQuery("#TB_window").width(f);s.width(l+a*p)}}if(x){f=g+j*n;if(f<MIN_HEIGHT)skipMoveY=true;else{jQuery("#TB_window").height(f);s.height(z+j*n);c=="image"&&jQuery("#TB_ImageClick > a").height(jQuery("#TB_Image").outerHeight(true));typeof document.body.style.maxHeight=="undefined"&&jQuery("#TB_window").css("marginTop",A)}}u&&!h&&jQuery("#TB_window").css("left",d+a);v&&!skipMoveY&&jQuery("#TB_window").css("top",e+j)}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;o.css("cursor","");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});if(d.length>0)b.unbind("click").one("click",function(a){a.preventDefault();a.stopImmediatePropagation?a.stopImmediatePropagation():a.stopPropagation();for(a=
function tb_drag(a,c,b){if(1!=a.which)return!0;TB_THRESHOLD=5;MIN_WIDTH=MIN_HEIGHT=100;var e=jQuery("#TB_window").offset().left-parseInt(jQuery("#TB_window").css("marginLeft")),d=jQuery("#TB_window").offset().top-parseInt(jQuery("#TB_window").css("marginTop"));"undefined"!=typeof document.body.style.maxHeight&&"absolute"!=jQuery("#TB_window").css("position")&&(e-=jQuery(document).scrollLeft(),d-=jQuery(document).scrollTop());var k=a.clientX,t=a.clientY,h=!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,y="move"!=b&&"e-resize"!=b&&"w-resize"!=b;if("move"!=b){var z=jQuery("#TB_window").width(),A=jQuery("#TB_window").height(),j=jQuery("image"==c?"#TB_Image":"iframe"==c?"#TB_iframeContent":"#TB_ajaxContent"),B=j.width(),o=j.height(),l="e-resize"==b||"ne-resize"==b||"se-resize"==b?1:-1,p="s-resize"==
b||"se-resize"==b||"sw-resize"==b?1:-1;if("undefined"==typeof document.body.style.maxHeight)var m=jQuery("#TB_window").css("marginTop")}jQuery(document).bind("mousemove.thickbox",function(a,i,f){var i=i?i:a.clientX,f=f?f:a.clientY,a=i-k,g=f-t;if(!h){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){h=true;k=i;t=f;s.css("cursor",b)}}if(h){i=skipMoveY=false;if(w){f=z+a*l;if(f<MIN_WIDTH)i=
true;else{jQuery("#TB_window").width(f);j.width(B+a*l)}}if(y){f=A+g*p;if(f<MIN_HEIGHT)skipMoveY=true;else{jQuery("#TB_window").height(f);j.height(o+g*p);c=="image"&&jQuery("#TB_ImageClick > a").height(jQuery("#TB_Image").outerHeight(true));typeof document.body.style.maxHeight=="undefined"&&jQuery("#TB_window").css("marginTop",m)}}u&&!i&&jQuery("#TB_window").css("left",e+a);v&&!skipMoveY&&jQuery("#TB_window").css("top",d+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(!h)return true;s.css("cursor","");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});if(d.length>0)b.unbind("click").one("click",function(a){a.preventDefault();a.stopImmediatePropagation?a.stopImmediatePropagation():a.stopPropagation();for(a=
0;a<d.length;a++)b.click(d[a]);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_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_getSize(a,c){var b,e,d=function(){switch(c){case "padding":b=a.innerWidth();e=a.innerHeight();break;case "border":b=a.outerWidth();e=a.outerHeight();break;case "margin":b=a.outerWidth(!0);e=a.outerHeight(!0);break;default:b=a.width(),e=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"},d):d();return[b,e]}
function tb_versionCompare(a,c){c=c||jQuery.fn.jquery;if(a!=c)for(var b=a.split("."),e=c.split("."),d=0;d<b.length||d<e.length;d++){if(b[d]&&!e[d]||b[d]>e[d])return 1;if(!b[d]&&e[d]||b[d]<e[d])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)}};