$(function() {

	/**
	 * Activate slideshow and add navigation on mouse over
	 */
	var $intro = $("#intro");
	var $introCycle = $("#intro ul");
	if ($intro.length) {
		$introCycle.cycle({
			"timeout": 8000,
			"fx": "scrollHorz",
			"pause": true,
			"pauseOnPagerHover": true
		});
		$introNav = $("#intro-nav");
		$intro.hover(function() { $introNav.show(); }, function() { $introNav.fadeOut(); });
		$("#intro-nav-left").click(function() {
			$introCycle.cycle('prev');
		});
		$("#intro-nav-right").click(function() {
			$introCycle.cycle('next');
		});

	}
	
	/**
	 * make blocks in footer clickable, if link exists
	 */
	/*
	$(function() {
		$("#footer .span-1").hover(function() {
			$t = $(this);
			if ($t.find("a.footer-link").length) {
				$t.addClass("over");
			}
		},function() {
			$(this).removeClass("over")
		}).click(function() {
			var $link = $t.find("a.footer-link");
			if ($link.length) {
				document.location = $link.attr("href");
			}
		});
	});
	*/
	
	/**
	 * search text field
	 */
	$("#search-input").labelify({
		text: "label",
		labeledClass: "labelify",
		hideLabel: true
	});
	
});
