$(document).ready( function(){ 
	initJQuery();
});

function initJQuery(){
// runde ecken
$(".roundpic").corner("10px");
$(".roundpic_klein").corner("5px");

//jedes 2te nicht grau

/*
$('#content_wide .content_wide_middle h2').hover(
  function(){ 
  $(this).next().fadeIn(500); 
  }
);
*/

var trigerListMS = $(".ppt");
x = 0;
trigerListMS.each(function(){
	y = x % 2;
	if(y==0)  $(this).css('background-color','#F1F1F1');
	else $(this).css('background-color','#f8f6f6');
	x++;
});

//externe Links in neuem Fenster
$("a[href^='http://']").attr('target', '_blank');

$(function() {
        $('#gallery a').lightBox();
    });

var SPGAL = $(".sp_gal");
x = 0;
SPGAL.each(function(){
	y = x % 4;
	if(y!=0)  $(this).css('margin','0 0 20px 32px');
	else $(this).css('margin','0 0 20px 0');
	x++;
});

//initJQueryNetwork() END   
}

function deletePlayer(theWrapper, thePlaceholder, thePlayerId) { 
	swfobject.removeSWF(thePlayerId);
    var tmp=document.getElementById(theWrapper);
    if (tmp) { tmp.innerHTML = "<div id=" + thePlaceholder + "></div>"; }
	
}

function createPlayer(thePlaceholder, thePlayerId, theFile, title) {
    var flashvars = {
            file:theFile,
            autostart:"false"
    }
    var params = {
            allowfullscreen:"true", 
            allowscriptaccess:"always"
    }
    var attributes = {
            id:thePlayerId,  
            name:thePlayerId
    }
    if(title) $('#video_title').html(title);
    swfobject.embedSWF("player.swf", thePlaceholder, "640", "480", "9.0.115", false, flashvars, params, attributes);
}

function initPlayer(theFile, title) {
    deletePlayer('wrapper', 'placeholder1', 'player1');
    createPlayer('placeholder1', 'player1', theFile, title);
}
