// JavaScript Document

jQuery.fn.center = function () {
    this.css("position","absolute");
    this.css("top", (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop() + "px");
    this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px");
    return this;
}
jQuery.fn.topcenter = function () {
    this.css("position","absolute");
    this.css("top", (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop() - 266 + "px");
    this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px");
    return this;
}

$(document).ready(function() 
{
  
  	$(".container").center();
  
  	$(window).bind('resize', function() {
        $('.container').center({transition:300});
    });
	
	
	$(".welcome").topcenter();
  
  	$(window).bind('resize', function() {
        $('.welcome').topcenter({transition:300});
    });	
  
});


$(document).ready(function(){
		$('div.best').pngFix( );
		$('div.rest').pngFix( );
		$('div.welcome').pngFix( );
		
	});
