$(document).ready( function(){
	
	//First and last childs, lists
	$('ul li:first-child').addClass('first');
	$('ul li:last-child').addClass('last');

	//Zebra-striped tables
	$('table.zebra tr:even').addClass('even');

	//Zebra-striped forms
	$('form.zebra p:even').addClass('even');

	//Label-switcher for forms
	$('form.labelswitch .swl').each( function(){
		
		$(this).prev().hide();
		if($(this).val() == ''){
			$(this).val($(this).prev().text().slice(0, -1));
			if($(this).attr('type') == 'password'){
				//$(this).attr('type', 'text');
			}
		}

	});
	
	$('form.labelswitch .swl').click( function(){
		$(this).val('');
		if($(this).prev().text() == 'Passord:'){
			$(this).attr('type', 'password');
		}
	});

	//$('#nav li ul').hide();
	//$('#nav > li').hover(
	$('#nav li').hover(
		function () {
			$(this).children('ul').show();
		},
		function () {
			$(this).children('ul').hide();
		}
	);
	
});