
/*

	ContentHolder.js
	version 0.1.0
	MIT License
	First Created: 011/04/2009
	Last Revised: 07/23/2010
	edward@edwardhotchkiss.com
	http://www.edwardhotchkiss.com

*/

(function($) {

	$.ContentHolder = function(options) {

    	var settings = {
    		onBefore : function(){},
			onAfter  : function(){},
    		backBtn  : "#backButton",
    		tween    : "easeInOutQuad",
    		tweenMS  : 400,
    	};

    	if (options) {
        	$.extend(settings, options);
   	 	};

		settings.onBefore.apply(this);
		
		var ww = $(window).width();
		var wh = $(window).height();
		
		function createContentHolder() {
			$("body").append('<div id="contentHolder"></div>');
			$("#contentHolder").css("position", "absolute");		
			$("#contentHolder").css("top", wh*3);		
			$("#contentHolder").css("left", 0);				
			$("#contentHolder").css("background", "#fff");
			$("#contentHolder").css("width", ww);
			$("#contentHolder").css("height", wh);
		};

		function slideContentHolder(inOrOut) {
			$("#contentHolder").animate({top : 0}, settings.tweenMS, settings.tween, function() {
				settings.onAfter.apply(this);
			});
		};
		
		createContentHolder();
		slideContentHolder()

	};

})(jQuery);

/*

EXAMPLE
-------

$(document).ready(function() {
	$.ContentHolder();
});

*/

