$(document).ready(function(){
	Cufon.replace('.slogan,.content H1,.content H2,.content H3,.nav UL LI A,.content .sidebar .scope P,.button A,.minfo,.calculate TABLE A.butt', {hover: true});
//	$('#myselectbox1').selectbox();
//	$('#mycarousel-1, #mycarousel-2').jcarousel({
//		auto: 2,
//    	wrap: 'last',
//		scroll: 1
//	});
 
	$(".JMyCarousel").jMyCarousel({  
		visible: '100%',  
		auto: true,
		speed: 2500,
		circular: true
	});  

	$(".JMyCarousel2").jMyCarousel({  
		visible: '100%',  
		auto: true,
		speed: 2500,
		circular: true
	}); 

    $('.slideshow').cycle({
		fx: 'fade',
		random: true,
		speed: 3000,
		timeout: 6000
	});
	
	$('.sidebar UL LI A').click(function(){
		var lnk = $(this);
		if (lnk.parent().hasClass('active') ) {
			$(this).parent().children('UL').slideUp('normal', function (){ lnk.parent().removeClass('active'); });
		}
		else {
			$(this).parent().children('UL').slideDown('normal', function (){ lnk.parent().addClass('active'); });
		}
	});


	/*	//Deze code werkt niet in IE8, en is ook niet meer nodig ivm het laden van pagina's.

		$('.nav UL LI A').click(function(){
			if (!$(this).parent('LI').hasClass('selected') ) {
				$('.nav UL LI').removeClass('selected');
				$(this).parent().addClass('selected');
				Cufon.replace('.nav UL LI A');
			}
		});

	*/
		
		$('.tabs LI A').click(function(){
			if (!$(this).parents('LI').hasClass('selected') ) {
				$('.tabs LI').removeClass('selected');
				$('.main-content .scope .tab-content').removeClass('display').hide();
				$(this).parent().addClass('selected');
				$($(this).attr('href')).show().addClass('display');
			}
			return false;
		});	

	
	
	$("a[rel^='prettyPhoto']").prettyPhoto({theme: 'light_square'});
	/*$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'facebook',slideshow:5000, autoplay_slideshow: false});
	$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',slideshow:10000, hideflash: false});*/

});
