/**
 * app.generic.js
 * 
 * TODO: Beschreibung
 * 
 * @author matthiasschmidt <matthias.schmidt@antwerpes.de>
 * @copyright antwerpes + partner AG 2007
 * @version 0.1 - 20.06.2007 12:23:03
 * @access public
 * @package palffythoene.de
 */

$(document).ready(function() {
	
	// waagerechte navigation
	$('ul.headerNavi li').hover( function() {
		$(this).addClass('hover');
	}, function () {
		$(this).removeClass('hover');
	});
	
	
	// aufklappbare listings
	$('#divContent div.divListingHeadline').click( function() {
		pattern = 'divListingHeadlineActive';
		if ( $(this).attr('class').match( pattern ) == null ) {
			$(this).addClass( 'divListingHeadlineActive' );
		}
		else {
			$(this).removeClass( 'divListingHeadlineActive' );
		}
		$(this).next().toggle();
	});
	
	
	// copy contactbox for print-version
	var contactbox = $( 'div#divLeftContentColumn div.divContactBox' ).html();
	$('div#divContentContainer').append( '<div id="divContactBoxPrintVersion">' + contactbox + '</div>' );
	
	
	$('a#c274, a#c270, a#c286, a#c282').next('div').children('div.divListingItem').children('div.divListingHeadline:first').click();
	

	
});

function insertMovie() {
	$('body').prepend('<div id="tbOverlay" class="tbOverlayBg"></div><div id="movieFlash" style="margin-top:100px;"><span style="color:white;font-weight:bold">Der Film ist derzeit aus technischen Gründen nicht verfügbar. Bitte gehen Sie <a style="color:#fff" href="/">zurück</a> und probieren Sie es später erneut.</span></div>');
	
	// var so = new SWFObject("/fileadmin/flash/video/video.swf", "home", "778", "684", "8");
	
	// the following three lines are commented out to hide the film for now -- ld 2011-11-10
	var so = new SWFObject("/fileadmin/flash/video/video.swf", "home", "548", "365", "8");
	so.addParam("wmode", "transparent");
	so.addVariable("flvPath", "DealTalk13Master.flv");
	so.write("movieFlash");
	
	// $('div#movieFlash').prepend('<a href="/" style="color:#ffffff;position:relative;top:-624px;left:810px"><img src="/fileadmin/templates/_img/icons/close.gif" style="border:none"/></a>');*/
	$('div#movieFlash').prepend('<a href="/" style="color:#ffffff;position:relative;top:-348px;left:590px"><img src="/fileadmin/templates/_img/icons/close.gif" style="border:none"/></a>');
}
