$(document).ready(function() {
	if ($(".teaser").length) initTeaser();

	if ( (tid = /\-(\d+)$/.exec(document.location.hash)) ) {
		if ($("a.item_" + parseInt(tid[1])).length) {
			$("a.item_" + parseInt(tid[1])).mouseover();
		}
	}
});


function initTeaser() {
	$(".teaser ul.small li a[href='#']").click(function(e) { return false; });

	$(".teaser ul.small li a").mouseover(function(e) {
		var $smallLi	= $(this).parent();
		var className	= $(this).attr("class");
		if ($smallLi.hasClass("sel")) return;

		$(".teaser ul.small li").removeClass("sel");
		$smallLi.addClass("sel");

		$(".teaser ul.big li").removeClass("sel");
		$(".teaser ul.big li." + className).addClass("sel");
	});
}
