/**
 * This plugin can be used in 4 ways, this is only 1. Make sure to check
 * the other 3 links as well to see all the Modes.
 */
jQuery(function( $ ){
	
	if($.cookie('selfHelpModeVar')) {
	
		$('div#loader').hide();
		$('div#splash').hide();
		$('div#menu').show();
	
	} else {
		
		$.cookie('selfHelpModeVar', 'true', { expires: .01 });
		
		var urls = [ 'http://self-helpmode.com/images/self-help-mode.jpg' ];
		$.preload( urls, {

			onFinish:function(){
				$('#loader').fadeOut(2000, function(){
					$('#splash').fadeIn(2000);
				});

			}
		});
	}
	

		

	
		

	
	$('div#splash').click( function() {
		$(this).fadeOut('slow', function() {
			$("div#menu").fadeIn('slow');
		});
		return false;
	});
	
	$('div#archive h4').click( function() {
		if ( $("ul#archive_hidden").is(":hidden") ) {
			$("ul#archive_hidden").slideDown('slow');
		} else {
			$("ul#archive_hidden").slideUp('slow');
		}	
		return false;
	});
	
});