function oo_bind_leistungen() {
	$(document).bind('reveal.facebox', function() {
		$('.leistungsnavi a').click( function() {
			// deaktiviere alle, aktiviere eines
			$('.leistungsnavi a').removeClass('aktiv');
			$(this).addClass('aktiv');
			$(this).blur();
			load_leistung(this.href, 'leistungscontent');
			rl=this.href.split('#'); if (rl.length>1) pageTracker._trackPageview( rl[ rl.length-1 ] ); else pageTracker._trackPageview( rl[ 0 ] );
			return false;
		});
		$('#facebox .content .leistungscontent').empty();
		$('#facebox .content .leistungscontent').append('<h1 style="padding-top: 110px; text-align: center">' +
					      'Bitte w&auml;hlen<'+'/'+'h1>');
	});
}

function load_leistung(href) {
	
	var s = href.split('?');
	var url = s[0];
	var param = (s.length > 1) ? s[1] : '';
	
	var width = 620;
	var height = 390;
	
	var swffile = "";
	
	var regE;
	
	regE = param.match(/&?width=(\d+)/);
	if (regE != null) {
		width = regE[1];
		param = param.replace(/&?width=(\d+)/, "");
	}
	
	regE = param.match(/&?height=(\d+)/);
	if (regE != null) {
		height = regE[1];
		param = param.replace(/&?height=(\d+)/, "");
	}
	
	regE = url.match(/(.*)\.swf/);
	if (regE != null) {
		swffile = regE[1];
	}
	
	objstr = OO_AC_FL_GetContent(
		'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0',
		'width', width,
		'height', height,
		'src', swffile,
		'quality', 'high',
		'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
		'align', 'middle',
		'play', 'true',
		'loop', 'true',
		'scale', 'noscale',
		'wmode', 'window',
		'devicefont', 'false',
		'id', 'ooflippingbook',
		'bgcolor', '#dae0e2',
		'name', 'ooflippingbook',
		'menu', 'true', 
		'allowScriptAccess','sameDomain',
		'movie', swffile,
		'salign', '' /*lt*/,
		'flashVars', param //'xmlConfig=flipp-buch1.xml'
		); //end AC code
	
	$('#facebox .content .leistungscontent').empty();
	$('#facebox .content .leistungscontent').append(objstr);
	
	
}