/* 
	Global javascript file.
	(C) 2008 Kian Ryan, Orange Tentacle
*/

var $j = jQuery.noConflict();
$j.ajaxSetup({ cache: false });
var debug = false;

if (typeof console === "undefined") {
    console = { log: function () { } };
}

$j.browser.msie6 =
    $j.browser.msie
    && /MSIE 6\.0/i.test(window.navigator.userAgent)
    && !/MSIE 7\.0/i.test(window.navigator.userAgent)
    && !/MSIE 8\.0/i.test(window.navigator.userAgent);

$j(document).ready(function() {
    if ($j.browser.msie6) {
        DD_belatedPNG.fix('.bg-png, .button, .controlButton, .title, .headlogo, .button span');

        /* Apply feedback fix */
        $j('#feedbackPager').css('position', 'absolute');
        var newHeight = parseInt(document.documentElement.clientHeight * .4 + document.documentElement.scrollTop);
        $j('#feedbackPager').css('top', newHeight + 'px');
        window.onscroll = function() {
            var newHeight = parseInt(document.documentElement.clientHeight * .4 + document.documentElement.scrollTop);
            $j('#feedbackPager').css('top', newHeight + 'px');
        };
    }

    /* Global AJAX Error Handling */
    $j(document).ajaxError(function (e, jqxhr, settings, exception) {
        var url = "/AjaxError.aspx?height=300&width=400&modal=true";
        tb_show('Title', url, null, function() {});
    });
    
});


