$(document).ready(function() {
	$("#nav-fotos").hover(function() {
		$("#top-navigation").css("background-position","-397px 0px");
	});
});

$(document).ready(function() {
	$("#nav-ueber-mich").hover(function() {
		$("#top-navigation").css("background-position","-794px 0px");
	});
});


$(document).ready(function() {
	$("#nav-kontakt").hover(function() {
		$("#top-navigation").css("background-position","-1191px 0px");
	});
});


$(document).ready(function() {
	$("#nav-impressum").hover(function() {
		$("#top-navigation").css("background-position","-1588px 0px");
	});
});


$(document).ready(function() {
	$("#top-navigation > ul > li > a").mouseout(function() {
		$("#top-navigation").css("background-position","0 0");
	});
});

$('.tooltip-top').qtip({
   position: {
      my: 'bottom center',
      at: 'top center'
   },
   style: {
      classes: 'tooltip-td'
   }

});

$('.tooltip-bottom').qtip({
   position: {
      my: 'top center',
      at: 'bottom center'
   },
   style: {
      classes: 'tooltip-td'
   }

});

$('.tooltip-left').qtip({
   position: {
      my: 'right center',
      at: 'left center'
   },
   style: {
      classes: 'tooltip-td'
   }

});

$('.tooltip-right').qtip({
   position: {
      my: 'left center',
      at: 'right center'
   },
   style: {
      classes: 'tooltip-td'
   }

});

$(document).ready(function() {
	$(".dropdown dt a").click(function() {
		$(".dropdown dd ul").toggle();
	});
				
	$(".dropdown dd ul li a").click(function() {
		var text = $(this).html();
		$(".dropdown dt a span").html(text);
		$(".dropdown dd ul").hide();
	});
				
	function getSelectedValue(id) {
		return $("#" + id).find("dt a span.value").html();
	}

	$(document).bind('click', function(e) {
		var $clicked = $(e.target);
		if (! $clicked.parents().hasClass("dropdown"))
			$(".dropdown dd ul").hide();
	});
});
