// Project: Limegifts
// 
// Copyright Websites Nederland 2009

function sfeerCycle() {
	$('#sfeer').cycle({
		fx:			'fade',
		timeout:	4500,
		speed:		2000
	});
}

function showsubMenu() {
	$('#menu li').hover(function() {
		$(this).children('a').addClass('active');
		$(this).children('ul').show();
	}, function() {
		$(this).children('a').removeClass('active');
		$(this).children('ul').hide();
	});
}

function showsubsubMenu() {
	$('#menu li ul li').hover(function() {
		$(this).children('a').addClass('active')
		var subsubWidth = $(this).children('span').children('ul').width();
		$(this).children('span').children('ul').children('li').width(subsubWidth);
		$(this).children('span').children('ul').show();
	}, function() {
		$(this).children('a').removeClass('active')
		$(this).children('span').children('ul').hide();
	});
}

function hoverMenu() {
	$('#menu li ul').hover(function() {
		$(this).prev('a').addClass('active');
	}, function() {
		$(this).prev('a').removeClass('active');
	});
}

function getSlider(nItem) {

	if(nItem != 'undefined' && nItem != '') {
		nItem = nItem - 7;	
	}

	var api = 
		$('#getslide').scrollable({
			api: 		true,
			speed: 		400, 
			size: 		7,
			clickable:	false,
			items:		'#slidecontainer',
			prev:		'#prev',
			next:		'#next'
		});
		
	if(api.getSize() < 8) {
		$('#next').hide();	
	}

	api.move(nItem); 
}