// JavaScript Document

$(function(){
    if($.browser.msie){
        $("body").addClass("msie");
    }
    if (navigator.platform.indexOf("Win") != -1) {
        $("body").addClass("win");
    }
    
   $('img.bgimage').maxImage({
                isBackground: true,
                slideShow: true,
                position: ('absolute'),
                verticalAlign: 'top',
                horizontalAlign:'right',
                slideDelay: 4, 
                slideShowTitle: false,
                maxFollows: 'height'
            });
    
});
function resize_background_image_now()
{	
	var bg = $('background').getElement('img');
	
	var ratio = 12/8;
	
	bg.set('width', window.getWidth());
	bg.set('height', window.getWidth() / ratio);
	
	if (bg.getStyle('height').toInt() < window.getHeight()) {
		bg.set('height', window.getHeight());
		bg.set('width', window.getHeight() * ratio);
	}
}

