$(document).ready(function(){

	if ($(".image-headline .csc-header h2 a").length > 0) {
		// $(".image-headline .csc-header").css("cursor","pointer");
		$(".image-headline .csc-header h2").css("padding","0");
		$(".image-headline .csc-header h2 a").css("padding","3px 5px");

		$(".image-headline").each(function(){
			var $Box = $(".csc-header", this);
			var Url = $("h2 a", $Box).attr("href");

			$Box
			.css("cursor","pointer")
			.hover(function(){
				$("h2 a", this).css("backgroundColor","#bf000a").css("color","#fff");
			}, function(){
				$("h2 a", this).css("backgroundColor","transparent").css("color","#222");
			})
			.click(function(){
				window.location.href = "/"+Url;
			});
		});
	}

	$("#totop").click(function(){
		$("html, body").animate({
			scrollTop: 0
		});
		return false;
	});

	jQuery('#image').innerfade({
		speed: 2000,
		timeout: 8000,
		type: 'sequence',
		containerheight: '210px'
	});

	if ($(".tx-ttnews-browsebox").length > 0) {
		$(".tx-ttnews-browsebox").find("td").hide();
		$(".tx-ttnews-browsebox-SCell").show();
		$(".tx-ttnews-browsebox-SCell").next("td").show();
		$(".tx-ttnews-browsebox-SCell").next("td").next("td").show();
		$(".tx-ttnews-browsebox-SCell").next("td").next("td").next("td").show();
		$(".tx-ttnews-browsebox-SCell").prev("td").show();
		$(".tx-ttnews-browsebox-SCell").prev("td").prev("td").show();
		$(".tx-ttnews-browsebox-SCell").prev("td").prev("td").prev("td").show();
		$(".tx-ttnews-browsebox").find("td:first-child").show();
		$(".tx-ttnews-browsebox").find("td:last-child").show();
	}

});
