1 | |
---|
2 | jQuery(function($) { |
---|
3 | if ( 'undefined' == typeof $.fn.pngFix ) |
---|
4 | $.fn.pngFix = function() { return this; } |
---|
5 | |
---|
6 | var thickDims = function() { |
---|
7 | var tbWindow = $('#TB_window'); |
---|
8 | var H = $(window).height(); |
---|
9 | var W = $(window).width(); |
---|
10 | |
---|
11 | if ( tbWindow.size() ) { |
---|
12 | tbWindow.width( W - 90 ).height( H - 60 ); |
---|
13 | $('#TB_iframeContent').width( W - 90 ).height( H - 90 ); |
---|
14 | tbWindow.css({'margin-left': '-' + parseInt((( W - 90 ) / 2),10) + 'px'}); |
---|
15 | if ( typeof document.body.style.maxWidth != 'undefined' ) |
---|
16 | tbWindow.css({'top':'30px','margin-top':'0'}); |
---|
17 | }; |
---|
18 | |
---|
19 | return $('a.thickbox').each( function() { |
---|
20 | var href = $(this).parents('.post-title').find('a.thickbox').attr('href'); |
---|
21 | if ( ! href ) return; |
---|
22 | href = href.replace(/&width=[0-9]+/g, ''); |
---|
23 | href = href.replace(/&height=[0-9]+/g, ''); |
---|
24 | $(this).attr( 'href', href + '&width=' + ( W - 110 ) + '&height=' + ( H - 100 ) ); |
---|
25 | }); |
---|
26 | }; |
---|
27 | |
---|
28 | $(window).ready( function() { thickDims() } ); |
---|
29 | |
---|
30 | }); |
---|