/**
 * @author gharbusch
 */
$(document).ready(function()
{

	/** 
	 * Open external Links in new Window
	 * (target-Attr. not allowed in XHTML Strict)
	 */
	$('a.WIB_newWindow').attr('target', '_blank');
	
	
	// *** Colorbox Iframes for WIB-JS-Games
	$('a#WIB_game_Mensch, a#WIB_game_Puzzle, a#WIB_game_Memory, a.WIB_game').colorbox({
		iframe: true,
		innerWidth: 950,
		innerHeight: 600
	});
	
	// *** ColorBox Images
	$('a.WIB_cboxImage').colorbox();
	
	// *** Init WIB_Tree
	if ($(".WIB_tree").size() > 0) 
	{
		WIB_treeInit();
	}
})


/**
 *  Just for Debugging
 */
function outputObject(o)
{
	var ret = '';
	for (var key in o) 
	{
		ret = ret + key + ' = ' + o[key] + '\n';
	}
	return ret;
}

function WIB_treeInit()
{

	$(".WIB_tree").WIB_Tree({
		startCollapsed: true,
		expandRoot: true,
		cookie: 'auto'
	});
	$('.WIB_tree').fadeIn();
	
}
