raw
mp-wp_genesis           1 // send html to the post editor
mp-wp_genesis 2 function send_to_editor(h) {
mp-wp_remove-tiny... 3 if ( typeof edInsertContent == 'function' ) {
mp-wp_genesis 4 edInsertContent(edCanvas, h);
mp-wp_genesis 5 } else {
mp-wp_genesis 6 jQuery( edCanvas ).val( jQuery( edCanvas ).val() + h );
mp-wp_genesis 7 }
mp-wp_genesis 8
mp-wp_genesis 9 tb_remove();
mp-wp_genesis 10 }
mp-wp_genesis 11
mp-wp_genesis 12 // thickbox settings
mp-wp_genesis 13 jQuery(function($) {
mp-wp_genesis 14 tb_position = function() {
mp-wp_genesis 15 var tbWindow = $('#TB_window');
mp-wp_genesis 16 var width = $(window).width();
mp-wp_genesis 17 var H = $(window).height();
mp-wp_genesis 18 var W = ( 720 < width ) ? 720 : width;
mp-wp_genesis 19
mp-wp_genesis 20 if ( tbWindow.size() ) {
mp-wp_genesis 21 tbWindow.width( W - 50 ).height( H - 45 );
mp-wp_genesis 22 $('#TB_iframeContent').width( W - 50 ).height( H - 75 );
mp-wp_genesis 23 tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
mp-wp_genesis 24 if ( typeof document.body.style.maxWidth != 'undefined' )
mp-wp_genesis 25 tbWindow.css({'top':'20px','margin-top':'0'});
mp-wp_genesis 26 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
mp-wp_genesis 27 };
mp-wp_genesis 28
mp-wp_genesis 29 return $('a.thickbox').each( function() {
mp-wp_genesis 30 var href = $(this).attr('href');
mp-wp_genesis 31 if ( ! href ) return;
mp-wp_genesis 32 href = href.replace(/&width=[0-9]+/g, '');
mp-wp_genesis 33 href = href.replace(/&height=[0-9]+/g, '');
mp-wp_genesis 34 $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) );
mp-wp_genesis 35 });
mp-wp_genesis 36 };
mp-wp_genesis 37
mp-wp_genesis 38 $(window).resize( function() { tb_position() } );
mp-wp_genesis 39 });
mp-wp_genesis 40