// JavaScript Document
$(document).ready(
	function()
	{
		/* if we have javascript enabled, remove the noScript-hiding-class */
		$('.nsh').removeClass('nsh');
		
		$('table').tablesorter({ 0: {sorter:"string"}, 1: {sorter:"integer"}, 2: {sorter:"integer"}, 3: {sorter:"currency"}});
		$('table').colorize({altColor:'#e1edf9', hoverColor:'#bbddfe', hiliteColor:'#7bb4e8', columns:false, oneClick:true});
		
		$('#tsp-lnk>a').click(
		function(){ $('#todays-special-block').slideToggle('slow', function() { 
				if($('#todays-special-block').is(':visible')) {	$('#tsp-lnk>a').html('Today&#8217;s special interessieren mich nicht'); }
				else { $('#tsp-lnk>a').html("Today&#8217;s special interessieren mich doch"); }
				$.cookie('anime.nutzo-viewstate-special', $('#todays-special-block').is(':visible'), {path: '/'});
		} ); } );
		
		viewState =	$.cookie('anime.nutzo-viewstate-special');
		if(viewState == 'true' || viewState == null || viewState == 'undefined') { $('#todays-special-block').show(); }
		else { $('#todays-special-block').hide(); }
		if($('#todays-special-block').is(':visible')) 	{ $('#tsp-lnk>a').html("Today&#8217;s special interessieren mich nicht"); }
		else											{ $('#tsp-lnk>a').html("Today&#8217;s special interessieren mich doch"); }
	}
);
