$(document).ready(function() {
// Anzeigesteurung des aktiven Akkordeons (Content/Mitte): Variable wird im Template gesetzt
var activeIndex = $('#accord_active').html();
var init = null;
var click = 0;
// Kein aktives Akkordeon: im Template ist "false" gesetzt
if(activeIndex == "false")
{
   init = "false";
}
// Aktives Akkordeon: 0 (1. Element) bis n, im Template gesetzt
else
{
	init = "h3 + div.outer:eq("+ activeIndex + ")";
}

// Optionen fuer das Plugin "jquery.nestedAccordion.js"
// NAVIGATION: Linke Spalte
/*$('#col1_content').accordion({
	objClass: '.vlist',		// css: class
	obj: 'ul', 				// Element, welches das Akkordeon beinhaltet
	event: 'mouseover', 		// click | mouseover
	wrapper: 'li', 			
    el: 'li', 				
    head: 'li', 
    next: 'ul', 
	initShow: 'ul li a.active' // Bereich, der beim Initialisieren expandiert wird
});*/

// AKKORDEONs: Content/Mitte
$('#main').accordion({
  objClass: '.accordion',
  obj: 'div', 
  event: 'click',
  wrapper: 'div', 
  el: '.h', 
  head: 'h3', 
  next: 'div', 
  initShow: init,
  collapsible: true
});

// LIGHTBOX: Plugin "colorbox.js" - Rechte Spalte
$("a[rel='lbox']").colorbox({current:'', opacity:'0.8', maxWidth:'640', maxHeight:'640'});
$("a[rel='nofollow']").colorbox({current:'', opacity:'0.8', maxWidth:'640', maxHeight:'640'});

});

$(document).bind('cbox_complete', function()
{  
	$("#cboxTitle").hide();
	$(".cBoxPhoto").css("margin", "0px 0px 0px 0");
	$("<p>"+$("#cboxTitle").html()+"</p>").css("margin", "15px 0px 0px 0").insertAfter(".cboxPhoto");
	$.fn.colorbox.resize();
}); 


