//-----------------------------------------------------------
// Public JS
//-----------------------------------------------------------

function updateSwfSize(w,h){
	var forcesize = new SWFForceSize(so, w, h);
}
function updateBrowserScroll(y) {
	window.scrollTo(0,y);
}
forc = function(w, h) {
	var forcesize = new SWFForceSize(so, w, h);
}

function Track(Title) {
	xh.postResponse('/track/?Title=' + escape(Title), { }, 'Track_Callback');
	if (arguments[1] && arguments[1] == 1) {
//		alert('Param 2: ' + arguments[1]);
		window.scrollTo(0, 0);
	}
}
function Track_Callback(Data) {
}
function ChangeBackground(Color) {
	document.body.style.backgroundColor = Color;
}

//-----------------------------------------------------------


// Skull Lagoon ----------------------------------------[TN]
var SkullLagoon = function( Config ) {
	var This = function() {

		// Private Vars ----------------------------------------[TG]
		var DebugData = { Data: 'My Data' };
		//------------------------------------------------------[TG]
		
		// Public Vars -----------------------------------------[TG]
		This._Config = {
			Pages			: {},
			CurrentIndex	: 0
		};
		//------------------------------------------------------[TG]

		// Constructor -----------------------------------------[TG]
		(function() {
			This._Config = $.extend(This._Config, Config);
		})();
		//------------------------------------------------------[TG]
		
		// Public Functions ------------------------------------[TG]
		This.ShowConfig = function() {
			$(This._Config).debug();
			
			// Call a Private Function
			Debug();
		}

		This.FlipPage = function(Direction) {
			var Index = ( Direction == 'Previous' ) ? ( This._Config.CurrentIndex - 1 ) : ( ( This._Config.CurrentIndex * 1 ) + 1 );

			if ( Index < 0 )
				Index = This._Config.Pages.length - 1;
			else if ( Index >= This._Config.Pages.length )
				Index = 0;

			$( '.' + This._Config.Pages[This._Config.CurrentIndex].Page ).fadeOut( 'normal', function() {
				$( '.' + This._Config.Pages[Index].Page ).fadeIn( 'normal' );
				This._Config.CurrentIndex = Index;
			});
		}

		// Private Functions -----------------------------------[TG]
		function Debug() {
			// Use Private DebugData
			$(DebugData).debug();
		}
		//------------------------------------------------------[TG]

		// Send Back Reference ---------------------------------[TG]
		return This;
		//------------------------------------------------------[TG]

	};

	return This();
};
//------------------------------------------------------[TN]