$(function(){
	///////////////////////////////
	// ZEBRA
	$('table.zebra tbody tr:not([th]):odd').addClass('odd');
	$('table.zebra tbody tr:not([th]):even').addClass('even');
	$('table.listingTable tbody th').not('.noSpan')
	.prepend(' <span class="expandBtn">[+]</span> ')
	.click(function(){
		var status = $(this).data('class');
		if ( status == 'open' ) {
			$(this).data('class', 'closed' )
			.parents('tr').siblings().hide();
			$(this).children('span.expandBtn').html('[+]');
		} else {
			$(this).data('class', 'open' )
			.parents('tr').siblings().show();
			$(this).children('span.expandBtn').html('[-]');
		}
	})
	.each(function(){
		$(this).data('class', 'closed' )
		.addClass('cursorPointer')
		.parents('tr').siblings().hide();
	});

	///////////////////////////////
	// MENU
	$('div#loggedMenu div.groupLink div').hover(function() {
		$(this).children('ul').slideDown('fast');
		$(this).children('p').addClass('hovered');
	}, function() {
		$(this).children('p').removeClass('hovered');
		$(this).children('ul').fadeOut('fast');
	});

	///////////////////////////////
	// PREVIEW ICON
	$('a.previewIcon').click(function(){
		alert('opa');
		return false;
	});
});