function pilates(e) {
	var width = $(window).width();
	var height = $(document).height();
	$('#scrollable').css('width', width);
	$('#scrollable').css('height', height);
	$('.items').css('height', height);
	$('.items div').css('height', height);
	$('#switch').css('left', width-78);
	api.getVisibleItems().css('width', width);
	img = api.getVisibleItems().find('img');
	label = api.getVisibleItems().find('.label');
	
	img.css('margin-left', -img.width()/2);
	img.css('margin-top', -img.height()/2);
	$(".arrow").css("top", (height-22)/2);
	$("#next").css("left", (width-30-20));
	$("#footer").css("top", (height-60));
	$("#hidden").css("top", (height-60));

	label.css('top', (height + img.height())/2 + 10);
	if ($.browser.msie) { 
	label.css('margin-left', (width + img.width())/2 - 2*label.width());	
	} else {
	label.css('margin-left', (width + img.width())/2 - label.width());
	}
	label.css('display', 'block');
	e.preventDefault();
}

$(document).ready(function() {

Cufon.replace('#menu ul li', {fontFamily: 'Franklin Gothic Book'});
Cufon.replace('#slogan table td', {fontFamily: 'Franklin Gothic Book'});
Cufon.replace('#switch', {fontFamily: 'Franklin Gothic Book'});
Cufon.replace('#minimized .pus', {fontFamily: 'Franklin Gothic Book'});

$('#next').click(pilates);
$('#prev').click(pilates);
$(window).load(pilates);
$(window).resize(pilates);

});

