/*!
 * 
 * Copyright 2011, Podium Organisatie BV
 * 
 * This document contains generic javascript functions used in the PC Version of www.PodiumOrganisatie.com
 * 
 */
$(document).ready(function() {
		
	// Swap the name and title attribute. We dont want a title (tooltip), but we will be using the name
	// We do use the title for browsers where javascript is disabled
	$('ul#lang-vertical li a ').attr("name", function(){ 
		return this.title;	
	});
	$('ul#lang-vertical li a ').removeAttr("title");
	
	// Set the hover fade. Instead of fadeIn we use animate, because fadeIn didnt 
	// stop the animation when hovering over sibling items while animation was still running
	$('ul#lang-vertical li a').hover(function(){
		var desc = $(this).attr('name');
		$('#lang-vertical-desc').html(desc);
		$('#lang-vertical-desc').stop(true).animate( { opacity:100 }, 'fast', function(){});
	},
	function() {			
		$('#lang-vertical-desc').stop(true).animate( { opacity:0 }, 'fast', function(){		
			$(this).html('');									
		});
	});
});
