Cufon.replace ('h1,#motto',{fontFamily: 'Myriad Pro Regular'});
$(document).ready(function() {
	$('#slider ul li a').click(function() {
		$("#slider ul li a[rel=gallery]").fancybox();
		return false;
	});
	var step = 1; 
	var current = 0; 
	var maximum = $('#slider ul li').size(); 
	var visible = 13; 
	var speed = 250; 
	var liSize = 70;
	var carousel_height = 60;
	var ulSize = liSize * maximum;   
	var divSize = liSize * visible;  
	$('#slider ul').css("width", ulSize+"px").css("left", -(current * liSize)).css("position", "absolute");
	$('#slider').css("width", divSize+"px").css("height", carousel_height+"px").css("visibility", "visible").css("overflow", "hidden").css("position", "relative"); 
	$('.next').click(function() { 
		if(current + step < 0 || current + step > maximum - visible) {return; }
		else {
			current = current + step;
			$('#slider ul').animate({left: -(liSize * current)}, speed, null);
		}
		return false;
	});
	$('.prev').click(function() { 
		if(current - step < 0 || current - step > maximum - visible) {return; }
		else {
			current = current - step;
			$('#slider ul').animate({left: -(liSize * current)}, speed, null);
		}
		return false;
	}); 
});
$(document).ready(function() {
	$("#gallery .in, .twitter .in").hide();
	$("#gallery h2").click(function(){
		$(this).toggleClass("active").next().slideToggle(200);
	});
	$(".twitter h2").click(function(){
		$(".twitter").toggleClass("twitter-active");
		$(this).toggleClass("active").next().slideToggle(200);
	});
});
function equalHeight(group) {
	 tallest = 0;
	 group.each(function() {
			thisHeight = $(this).height();
			if(thisHeight > tallest) {
				 tallest = thisHeight;
			}
	 });
	 group.height(tallest);
}
$(document).ready(function() {
	 equalHeight($("#content .box"));
});
