tc = new Image(0,1);
tc.src ="http://www.trackingcenter.de/statistic.php?id=35&screenwidth="+screen.width+"&screenheight="+screen.height+"&colordepth="+screen.colorDepth+"&referrer="+escape(document.referrer)+"&url="+escape(document.URL);

var flash_src = 3252547	

$(function(){
 	$("img[src*='_hover_']").hover(
		function(){
			hover_in($(this));
		},
		function(){
			hover_out($(this));
		}
	);

	// bind to events
	$('#Kampagnenmanagement').click(function(){playflash(3281853);return false;});
	$('#Trichteranalyse').click(function(){playflash(3335012);return false;});
	$('#Reports').click(function(){playflash(3334894);return false;});
	$('#Web20').click(function(){playflash(3335082);return false;});

	// raise event
	loc = document.location.toString();
	if (loc.match('webcontrolling') && loc.match('#')) {
		$('#'+loc.split('#')[1]).click();
	} else {
		$('#Kampagnenmanagement').click();
	}

});

function playflash(id){
	$('#Screencast').flash({
	    src: 'http://vimeo.com/moogaloop.swf',
	    flashvars: {clip_id: id},
	    width: 640,
	    height: 360
	});
}

function hover_in(e) {
	next = e.attr("src").replace("_hover_in","_hover_out");
	e.attr("src",next);
}

function hover_out(e) {
	next = e.attr("src").replace("_hover_out","_hover_in");
	e.attr("src",next);
}
