jQuery(document).ready(function($) {	
	
	//Cufon	
	Cufon.replace('.thumbs span em', { hover: true, fontFamily: 'Lucida Grande' });
	Cufon.replace('.button', { hover: true, fontFamily: 'Lucida Grande' });
	Cufon.replace('.menu', { hover: true, fontFamily: 'Lucida Grande' });

	
	// add classes				 
	$("li:first-child").addClass("first");	
	$("li:last-child").addClass("last");
	$("ul.menu li a").wrapInner("<span></span>");
	$('ul.menu li a ul a').wrapInner();
	
	// main menu hover
	$("ul.menu li").hover(function(){
	
		$(this).addClass("hover");
		$('ul:first',this).css('display', 'block');
		
		}, function(){
		
			$(this).removeClass("hover");
			$('ul:first',this).css('display', 'none');
    
    });
    
    $("ul.menu li ul li:has(ul)").find("a:first").append(" &raquo; ");
	
	// add classes on tabel rows
	$(".tbl tr:visible:even",this).addClass("even"); 
	$(".tbl tr:visible:odd",this).addClass("odd");

  
    //frontpage slider
	$('#coda-slider-1').codaSlider({
		autoSlide: false,
		autoSlideInterval: 3000,
		dynamicArrows: false,
		dynamicTabs: false
		
	});	
	
    // maatschappijen ticker
	$('#image_rotate').innerfade({ 
		speed: 'slow', 
		timeout:2500, 
		type: 'random', 
		containerheight: '120px'
	});
    
			
						
							
									
	//$('.flipcell').bind("click",function(){
	$('.flipcell').bind("click",function(){
	
									 
		
		// $(this) point to the clicked .sponsorFlip element (caching it in elem for speed):
		
		var elem = $(this);
		
		// data('flipped') is a flag we set when we flip the element:
		
		if(elem.data('flipped'))
		{
			// If the element has already been flipped, use the revertFlip method
			// defined by the plug-in to revert to the default state automatically:
			
			elem.revertFlip();
			
			// Unsetting the flag:
			elem.data('flipped',false)
		}
		else
		{
			// Using the flip method defined by the plugin:
			
			elem.flip({
				direction:'lr',
				speed: 350,
				onBefore: function(){
					// Insert the contents of the .sponsorData div (hidden from view with display:none)
					// into the clicked .flipdata div before the flipping animation starts:
					
					elem.html(elem.siblings('.flipdata').html());
				}
			});
			
			// Setting the flag:
			elem.data('flipped',true);
		}
	});		
	


			
});

