Shadowbox.init({
	handleOversize:     'drag',
	resizeDuration:		0.35,
	fadeDuration:		0.10,
	overlayOpacity:		0.6,
	language:  	 		"nl",
	players:			["img", "swf"]
});

var curPos = 0;
var carrSpeed = 500;

$(function(){
	
	Cufon.replace('#hoofdmenu li a, #intro_lang li a, #product_buttons a', {fontFamily: 'Conduit ITC medium'});
	Cufon.replace('#carrousel h2, #news-headlines h2, #carrousel_short h2, #submenu_head h2, #footer_title h1, #product_title h1, #content_info h1', {fontFamily: 'Archer Book'});
	Cufon.replace('.submenu_title h3, #style_gallery_form h2, #product_right h2, #intro_lang_text, #alt_colors h2, .gallery-title', {fontFamily: 'Archer Medium'});
	Cufon.replace('.mailform button, .af_form .af_send input, #alt_submit, .newsletter_btn, .gallery-btn a', {fontFamily: 'Archer Bold'});
	
	
	
	$("#carrousel_short #leftbtn").click(
		function() {
			if (curPos < 0) {
				$("#toppicks_inner").animate({marginLeft: (curPos+628)+'px'}, {duration: carrSpeed, queue: false});
				curPos+=628;
			}
		}
	);
	
	
	$("#carrousel_short #rightbtn").click(
		function() {
			if (curPos > -endPos) {
				$("#toppicks_inner").animate({marginLeft: (curPos-628)+'px'}, {duration: carrSpeed, queue: false});
				curPos-=628;
			} else {
				$("#toppicks_inner").animate({marginLeft: '0px'}, {duration: carrSpeed, queue: false});
				curPos=0;
			}
		}
	);
	
	
	$("#carrousel #leftbtn").click(
		function() {
			if (curPos < 0) {
				$("#toppicks_inner").animate({marginLeft: (curPos+870)+'px'}, {duration: carrSpeed, queue: false});
				curPos+=870;
			}
		}
	);
	
	
	$("#carrousel #rightbtn").click(
		function() {
			if (curPos > -endPos) {
				$("#toppicks_inner").animate({marginLeft: (curPos-870)+'px'}, {duration: carrSpeed, queue: false});
				curPos-=870;
			} else {
				$("#toppicks_inner").animate({marginLeft: '0px'}, {duration: carrSpeed, queue: false});
				curPos=0;
			}
		}
	);
	
	
	$('#alt_submit').click(
		function() {
			$('.af_send input').click();
		}
	);

	
		
});

