// JavaScript Document
$(document).ready(function() {
$(".gallery").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'opacity'		:	'true',
		'autoscale'			: 'true',
		'showCloseButton'	: true,
		'titleShow'         : false,

		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
});
$("a.more").click(function() {
                 $.fancybox({
                  'padding'             : 0,
                  'autoScale'   : false,
                  'transitionIn'        : 'none',
                  'transitionOut'       : 'none',
                  'title'               : this.title,
                  'width'               : 680,
                  'height'              : 495,
                  'href'                : this.href = this.href.replace(new RegExp("watch\\?v=", "i"), 'v/') + '&autoplay=1',
                  'type'                : 'swf',    // <--add a comma here
                  'swf'                 : {'allowfullscreen':'true'} // <-- flashvars here
                  });
                 return false;

            }); 
});

$(window).load(function() {
        $('#slider').nivoSlider({
		animSpeed:700,
		pauseTime:4000,
		directionNav:false,
		pauseOnHover:false
		});
});

function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}

$(document).ready(function() {
	equalHeight($("#center ul"));

});
