ServerUrl = "";
var VideoUrl;

function loadBlock (element, url, complete, video) {
	if (complete == null) {
		complete = showElement;
	}
	if (video != null) {
		VideoUrl = video;
	}
	J(element).load(url, '', complete);
}
function showElement (event, request, settings) {
	J(this).css('display', 'block');
}

function initTvTabelle (event, request, settings) {
	J('#infoBodyTv').css('display','none');
	J('#infoBodyTermine').css('display','none');
	J('#infoBodyNews').css('display','none');
  
	J("#infoHeadTv").click( function () {
		J('#infoBodyTv').css('display','block');
		J('#infoBodyTabelle').css('display','none');
	  	J('#infoBodyTermine').css('display','none');
	  	J('#infoBodyNews').css('display','none');
	  	J('#infoHeadTv').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_tv_on.gif)');
	  	J('#infoHeadTabelle3').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_termine_off.gif)');
	  	J('#infoHeadTermine').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_termine_off.gif)');
	  	J('#infoHeadNews').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_news_off.gif)');
	  });
	
	J("#infoHeadTabelle3").click( function () {	  
		J('#infoBodyTv').css('display','none');
	  	J('#infoBodyTabelle').css('display','block');
	  	J('#infoBodyTermine').css('display','none');
	  	J('#infoBodyNews').css('display','none');
	  	J('#infoHeadTv').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_tv_off.gif)');
	  	J('#infoHeadTabelle3').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_termine_on.gif)');
	  	J('#infoHeadTermine').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_termine_off.gif)');
	  	J('#infoHeadNews').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_news_off.gif)');
	  });
	  
	J("#infoHeadTermine").click( function () {
	  	J('#infoBodyTermine').css('display','block');
	  	J('#infoBodyTv').css('display','none');
	  	J('#infoBodyTabelle').css('display','none');
	  	J('#infoBodyNews').css('display','none');
	  	J('#infoHeadTabelle3').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_termine_off.gif)');
	  	J('#infoHeadTermine').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_termine_on.gif)');
	  	J('#infoHeadNews').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_news_off.gif)');
	  });
	  
	 
	J("#infoHeadNews").click( function () {
	  	J('#infoBodyNews').css('display','block');
	  	J('#infoBodyTv').css('display','none');
	  	J('#infoBodyTermine').css('display','none');
	  	J('#infoBodyTabelle').css('display','none');
	  	J('#infoHeadTabelle3').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_termine_off.gif)');
	  	J('#infoHeadTermine').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_termine_off.gif)');
	  	J('#infoHeadNews').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_news_on.gif)');
	  });
	J(this).css('display', 'block');
}

function initTabelle (event, request, settings) {
	J('#infoBodyTermine').css('display','none');
	J('#infoBodyNews').css('display','none');
  
	J("#infoHeadTabelle").click( function () {	  
	  	J('#infoBodyTabelle').css('display','block');
	  	J('#infoBodyTermine').css('display','none');
	  	J('#infoBodyNews').css('display','none');
	  	J('#infoHeadTabelle').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_tabelle_on.gif)');
	  	J('#infoHeadTermine').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_termine_off.gif)');
	  	J('#infoHeadNews').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_news_off.gif)');
	  });
	  
	J("#infoHeadTermine").click( function () {
	  	J('#infoBodyTermine').css('display','block');
	  	J('#infoBodyTabelle').css('display','none');
	  	J('#infoBodyNews').css('display','none');
	  	J('#infoHeadTabelle').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_tabelle_off.gif)');
	  	J('#infoHeadTermine').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_termine_on.gif)');
	  	J('#infoHeadNews').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_news_off.gif)');
	  });
	  
	 
	J("#infoHeadNews").click( function () {
	  	J('#infoBodyNews').css('display','block');
	  	J('#infoBodyTermine').css('display','none');
	  	J('#infoBodyTabelle').css('display','none');
	  	J('#infoHeadTabelle').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_tabelle_off.gif)');
	  	J('#infoHeadTermine').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_termine_off.gif)');
	  	J('#infoHeadNews').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_news_on.gif)');
	  });
	J(this).css('display', 'block');
}

function initTabelleGross (event, request, settings) {
	J('#infoBodyTabelle').css('display','block');
	J(this).css('display', 'block');
}

function initTabelleSpielplan (event, request, settings) {
	J('#infoBodyTabelle').css('display','none');
	J('#infoHeadTabelle2').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_tabelle2_off.gif)');
  	J('#infoHeadSpielplan').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_spielplan_on.gif)');
  
	J("#infoHeadTabelle2").click( function () {	  
	  	J('#infoBodyTabelle').css('display','block');
	  	J('#infoBodySpielplan').css('display','none');
	  	J('#infoHeadTabelle2').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_tabelle2_on.gif)');
	  	J('#infoHeadSpielplan').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_spielplan_off.gif)');
	  });
	  	 
	J("#infoHeadSpielplan").click( function () {
	  	J('#infoBodySpielplan').css('display','block');
	  	J('#infoBodyTabelle').css('display','none');
	  	J('#infoHeadTabelle2').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_tabelle2_off.gif)');
	  	J('#infoHeadSpielplan').css('background','url(' + ServerUrl + '/themes/hoffenheim/images/info_head_spielplan_on.gif)');
	  });
	J(this).css('display', 'block');
}


