/* 

Author: 		Thomas Lamparter

Description:		This little JavaScript library adds the standard features I need in projects.

*/

$(function()
{	
	var handCounter = 1;
	//var galleryCounter = 1;
	if ( $.cookie("gallery_status") == null) {
			$.cookie("gallery_status", "hidden", { path: '/' });
	}
	
	$('#header-hand').click(function()
	{
		if ((handCounter % 2) == 1 )  {
			$('div#header-hand').animate({'top': '+=450px'},'slow');
		} else {
			$('div#header-hand').animate({'top': '-=450px'},'slow');
		}
		handCounter ++;
	});
	
	$('#zeilentext').click(function()
	{
		if ( $.cookie("gallery_status") == null || $.cookie("gallery_status") == "hidden") {
			document.getElementById("content-zwischendenzeilen-footer").style.display = "block";
			$('div#content-gallery').slideDown('slow');
			$.cookie("gallery_status", "shown", { expires: 1, path: '/' });
		} else {
			$('div#content-gallery').slideUp('slow');
			document.getElementById("content-zwischendenzeilen-footer").style.display = "none";
			$.cookie("gallery_status", "hidden", { expires: 1, path: '/'});
		}
	});
});

$(document).ready(function() {
		if ($.cookie("gallery_status") == "shown") {
			document.getElementById("content-gallery").style.display = "block";
			document.getElementById("content-zwischendenzeilen-footer").style.display = "block";
			$.cookie("gallery_status", "shown", { expires: 1, path: '/' });
		}
	});

