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

var coming = {
	documentReady: function(){
		$(".slides").center();
		$(".holder").show();
	},
	documentLoaded: function(){
		$(".slide-1").fadeIn(2000, function(){
			$(".slide-2").fadeIn(1000, function(){
				$(".slide-3").fadeIn(1000, function(){
					$(".slide-1, .slide-2").remove();
				})
			})
		})
	}
}

jQuery(document).ready(function(){
	coming.documentReady();
});
jQuery(window).load(function(){
	coming.documentLoaded();
});
