jQuery(document).ready(function($)
{
	$("ul[id='menu-navigation'] li:even").each(function()
	{
		$(this).css("paddingRight", (parseInt($(this).css("paddingRight")) + 1) + "px");
	});
	$("ul[id='menu-navigation'] li").find("div[class='center']").css('position', 'absolute').css('top', '50%').find("a").css('top', '-25%');
	
	Cufon.replace("ul[id='menu-navigation'] li a", {fontFamily: 'Trebuchet MS'});
	Cufon.replace('h1', {fontFamily: 'Trebuchet MS'});
	Cufon.replace('h3', {fontFamily: 'Trebuchet MS'});
	Cufon.replace('legend', {fontFamily: 'Trebuchet MS'});
	
	$("div[id='footer'] label").inFieldLabels();
	
	var tagCloud = new TagCloud($, $("p[class='catcloud']"));
	tagCloud.makeTransparent(40, 100);
	
	Cufon.replace("p[class='catcloud']", {fontFamily: 'Trebuchet MS'});

	if($("div[id='slideShow']").length > 0)
	{
		var gallery = new Gallery($("div[id='slideShow']").children("a"), $, "/");
	
		gallery.run(0, true);
	
		$("a[class='left']").click(function(event)
		{
			gallery.prev();
			event.preventDefault();
		});
	
		$("div[class='right'] a").click(function(event)
		{
			gallery.next();
			event.preventDefault();
		});
	}
	
	if($("ul[class='slideShow']").length > 0)
	{
		var gallery = new Gallery($("ul[class='slideShow']").find("a"), $, "/");
	
		gallery.run(0, true);
	}
});
