Upcoming Events
var thickDims, tbWidth, tbHeight; jQuery(document).ready(function ($) { thickDims = function () { var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h; if (tbWidth) { if (tbWidth < (W - 90)) w = tbWidth; else w = W - 200; } else w = W - 200; if (tbHeight) { if (tbHeight < (H - 90)) h = tbHeight; else h = H - 200; } else h = H - 200; if (tbWindow.length) { tbWindow.width(w).height(h); $('#TB_iframeContent').width(w).height(h - 27); tbWindow.css({'margin-left':'-' + parseInt((w / 2), 10) + 'px'}); if (typeof document.body.style.maxWidth != 'undefined') tbWindow.css({'top':(H - h) / 2, 'margin-top':'0'}); } if(jQuery(window).width() < 640 ){ var tb_left = parseInt((w / 2), 10) + 20; tbWindow.css({'left':'' + tb_left + 'px'}); jQuery('#TB_window').css('width','91%'); jQuery('#TB_window').css('height','80%'); jQuery('#TB_window').css('margin-top','-10%'); jQuery('#TB_window iframe').css('width','100%'); jQuery('#TB_window iframe').css('height','87%'); } }; thickDims(); $(window).resize(function () { thickDims() }); $('a.thickbox-preview1814').click(function () { tb_click.call(this); var alink = jQuery(this).parents('.available-theme').find('.activatelink'), link = '', href = jQuery(this).attr('href'), url, text; var reg_with = new RegExp(xx_cal_xx + "tbWidth=[0-9]+"); if (tbWidth = href.match(reg_with)) tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10); else tbWidth = jQuery(window).width() - 90; var reg_heght = new RegExp(xx_cal_xx + "tbHeight=[0-9]+"); if (tbHeight = href.match(reg_heght)) tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10); else tbHeight = jQuery(window).height() - 60; jQuery('#TB_title').css({'background-color':'#222', 'color':'#dfdfdf'}); jQuery('#TB_closeAjaxWindow').css({'float':'left'}); jQuery('#TB_ajaxWindowTitle').css({'float':'right'}).html(link); jQuery('#TB_iframeContent').width('100%'); thickDims(); return false; }); });