/*
    jquery extension for centering element feature - note outerHeight/outerWidth for border/margin mesaurement
*/

jQuery.fn.center = function() {
    if ($(window).height() > 570) {
        this.css("height", $(window).height() + "px");
        $("#dvLoading").css("height", $(window).height() + "px");
    }
    /*
    if ($(window).width() > 1024) {
        this.css("padding-left", "6px");
        this.css("padding-right", "6px");
    } else {
        this.css("padding-left", "0px");
        this.css("padding-right", "0px");
    }
    */
    this.css("left", ($(window).width() - this.outerWidth()) / 2 + $(window).scrollLeft() + "px");
    
    return this;
}

/*
Center barebody div on load & resize
*/
var elementBareBody = '#barebody';
$(document).ready(function() {
    $(elementBareBody).center();
});
$(window).resize(function() {
    $(elementBareBody).center();
});

function doGAT(url) {

    try {

        var pageTracker = _gat._getTracker("UA-15393223-1");
        //alert(url);
        
        //TO DO: uncomment!
        pageTracker._trackPageview(url);

    } catch (err) { }

}
