$(document).ready(function(){
	
	$(".menuItemText").each(function(){
		$(this).css({'width': ($(this).children().width()+2) + 'px'});
	});
	$(".menuItem").each(function(){
		$(this).css({'width': ($(this).children().next().children().width()) + 60 + 'px'});
	});
	$(".menuItemColor").each(function(){
		$(this).css({'width': $(this).parent().width()+2 + 'px'});
	});
	
	$(".menuItemText").mouseover(function(){
		$(this).parent().addClass("menuHover");
	});
	$(".menuItemText").click(function(){
		window.location = $(this).find("a").attr("href");
	});
	$(".menuItemText").mouseout(function(){
		$(this).parent().removeClass("menuHover");
	});
	$("#mainTopSeparator").css({"height":$("#mainTopLeft").height() > $("#mainTopRight").height()? $("#mainTopLeft").height() : $("#mainTopRight").height()})
	
	$('#mainCarouselContent').serialScroll({
		items:'li',
		prev:'#mainCarouselPrev',
		next:'#mainCarouselNext',
		step:1,
		interval:4000,
		offset:-15, //when scrolling to photo, stop 230 before reaching it (from the left)
		start:0, //as we are centering it, start at the 2nd
		duration:600,
		force:true,
		stop:true,
		lock:false,
		cycle:true, //don't pull back once you reach the end
		jump: true //click on the images to scroll to them
	});
	
	$("#mainCarouselContent img").each(function(){
		$(this).css({'margin-top': (100 - $(this).height())/2 + 'px', 'margin-bottom': (100 - $(this).height())/2 + 'px'});
	});

	
});