jQuery.fn.fadeSlideDown = function(speed, easing, callback) {
return this.animate({opacity: 'show', height: 'show'}, speed, easing, callback); 
};
jQuery.fn.fadeSlideToggle = function(speed, easing, callback) {
return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback); 
};
function show_video(id, width, height, video_url, poster_url, controller, simple, autostart)
{
var flashvars = {
width: width,
height: height,
image: poster_url,
file: video_url,
screencolor: "000000",
frontcolor: "555555",
backcolor: "DDDDDD",
lightcolor: "000000",
icons: false,
controlbar: "bottom"
};
if(typeof(simple) != "undefined")
{
flashvars.skin = "/custom/media/swf/simple.swf";
if(controller == true)
height = height - 12;
}
else
{
flashvars.skin = "/custom/media/swf/modieus.swf";
}
if(typeof(autostart) != "undefined")
flashvars.autostart = true;
if(controller == false)
{
//flashvars.icons = true;
flashvars.controlbar = "none";
}
else
{
height = height + 32;
}
var params = {
allowfullscreen: "true"
};
var attributes = {
};
$('#'+id+'').html("");
swfobject.embedSWF("/custom/media/swf/player.swf", id, width, height, "9.0.98", "/custom/media/swf/expressInstall.swf", flashvars, params, attributes);
}
function play_small_video(video_id)
{
$('#video_container ul li.active').each(function()
{
this.className = "";
})
$('#video_player_description').html(videos[video_id].description);
if(videos[video_id].expert != "")
$('#video_player_expert').html(videos[video_id].expert);
else
$('#video_player_expert').html(videos[video_id].title);
var video_url = "/custom/media/videos/"+video_id+".mov";
var poster_url = "/custom/media/videos/"+video_id+"_s.png";
if(videos[video_id].expert_id)
var poster_url = "/custom/media/videos/exp_"+videos[video_id].expert_id+".png";
else
var poster_url = "/custom/media/videos/"+video_id+"_m.png";
//var poster_url = "";
show_video("video_player_video", 177, 133, video_url, poster_url, true, true, true);
}
$(document).ready(function()
{
$('.more_link').show();
$('.more').hide();
$('.more_link a').click(function()
{
var target_id = "#"+this.id+"_more";
if(this.innerHTML == "» mehr")
$(this).html("« weniger");
else
$(this).html("» mehr");
$(target_id).fadeSlideToggle("slow");
return false;
});
if($('#start_video').length > 0)
{
var video_url = "/custom/media/videos/vorstellung_start.mov";
var poster_url = "/custom/media/images/placeholder_video_thumb.jpg";
show_video("start_video", 180, 135, video_url, poster_url, false);
}
if($('#wahlspot_video').length > 0)
{
var video_url = "/custom/media/videos/80_k.mov";
var poster_url = "/custom/media/videos/80_m.png";
show_video("wahlspot_video", 173, 97, video_url, poster_url, false);
}
if($('#video_player_video').length > 0)
{
$('#video_container').attr('class', "javascript_enabled");
var video_id = $('#video_player_video').attr('class').replace(/video_/, "");
video_id = video_id.split("_");
var video_url = "/custom/media/videos/"+video_id[0]+".mov";
if(typeof(video_id[1]) != "undefined")
var poster_url = "/custom/media/videos/exp_"+video_id[1]+".png";
else
var poster_url = "/custom/media/videos/"+video_id[0]+"_m.png";
show_video("video_player_video", 173, 133, video_url, poster_url, true, true);
$('#video_container ul li').click(function()
{
video_id = this.id.replace(/video_/, "");
play_small_video(video_id);
this.className = "active";
return false;
});
$('#video_container ul li h5 a').click(function()
{
video_id = this.parentNode.parentNode.id.replace(/video_/, "");
play_small_video(video_id);
this.parentNode.parentNode.className = "active";
return false;
})
}
if($('#protestanten').length > 0)
{
swfobject.embedSWF("/custom/media/swf/start.swf", "protestanten", "100%", "100%", "9")
}
if($('.video_container').length > 0)
{
$('.video_container').each(function()
{
var height = ($(this).hasClass("widescreen")) ? 360 : 480;
var video_id = this.id.split("_");
video_id = video_id[1];
var video_url = "/custom/media/videos/"+video_id+".mov";
var poster_url = "/custom/media/videos/"+video_id+"_t.png";
show_video(this.id, 640, height, video_url, poster_url, true);
});
}
});
