﻿/*
* Thickbox patch to fix ie positioning issues, referenced from http://www.ostoast.org/2008/02/27/thickbox-scrolling-in-ie-hot-fix/
* Added by DMM
*/
function tb_position() { // hot fixed for ie
    jQuery("#TB_window").css({ marginLeft: '-' + parseInt((TB_WIDTH / 2), 10) + 'px', width: TB_WIDTH + 'px' });
    var dtop = parseInt((TB_HEIGHT / 2), 10);
    var scrolledDown = 0;
    if (jQuery.browser.msie) {//ie hax
        if (document.body != null) {
            scrolledDown = document.body.scrollTop;
        }
        else if (document.documentElement != null) {
            scrolledDown = document.documentElement.scrollTop; //ie7
        }
    }
    if (scrolledDown) {
        jQuery("#TB_window").css({ marginTop: '+' + scrolledDown + 'px' });
    }
    else {
        jQuery("#TB_window").css({ marginTop: '-' + dtop + 'px' });
    }
}
