$(document).ready(function() {

if (jQuery.browser.msie) {
		$('.text-rotate').css('display', 'block');
	} else {
		$('.text-svg').css('display', 'block');
	} 

Cufon.replace('.top');
Cufon.replace('.block-header');
$('.block').corner('4px');
$('#blob').click(function (e) {
		e.preventDefault();
		$('#basic-modal-content').modal();
	$('#simplemodal-container').corner('10px');
	Cufon.replace('#simplemodal-container h3');
	});

$('.scrollable').scrollable({
	size: 1,
	speed:500,
	item: 'div.slide',
	globalNav:true
});
api = $('.scrollable').scrollable({api:true});

$('.next').click(function(e) {
	api.next();
	e.preventDefault();
});

$(window).load(pilates);

$(window).resize(pilates).pilates;
$('.prev').click(function(e) {
	e.preventDefault();
});
});

function pilates(e) {
	var height = $(window).height();
	if(height < 620) {
		height = 620;
	}
	var width = $(window).width();
	if(width < 920) {
		width = 920;
	}
	x = Math.round((height-380)/3);
	a = Math.round(9+84+x);
	b = Math.round(a+54+x);
	c = Math.round(b+45+x);
	$('wholesomeholder').css('width', width);
	$('wholesomeholder').css('height', height);
	$('.shortcutru-link').css('top', a);
	$('.provisru-link').css('top', b);
	$('.shukaru-link').css('top', c);
	$('.bottom').css('top', height-105);
	$('#blob').css('top', height-118);
	e.preventDefault();
	$('.scrollable').css('top', 45+(height-620)/2);
	$('.prev').css('top', 233+(height-620)/2);
}
