$(document).ready(function(){ 

	var filename = 'sutlm_big.mp4';
	var browser = navigator.userAgent;
	if (browser.match('iPhone') || browser.match('iPod') || browser.match('android')) {
		width = 480;
		half_width = 240;
		height = 270;
		half_height = 135;
	} else {
		width = 960;
		half_width = 480;
		height = 540;
		half_height = 270;
	}

	setTimeout(function(){
		if (browser.match('Safari|Chrome')) { 
			$('#movie_box').animate({'height':height+'px','margin-top':'-'+half_height+'px','width':width+'px','margin-left':'-'+half_width+'px'},{ duration: 1000, easing: 'easeInOutCirc' });
		} else {
			height+=20;
			$('#movie_box').css({'height':height+'px','margin-top':'-'+half_height+'px','width':width+'px','margin-left':'-'+half_width+'px'});
		}
		$('#movie_box').fadeIn(1000);

	}, 1000);

	setTimeout(function(){
		if (Modernizr.video && !(browser.match('Firefox') && !(browser.match('Opera')))) {
			$('#movie_box>.inner').html('<video src="'+filename+'" height="'+height+'" width="'+width+'" controls poster="sutlm.jpg" type="video/mp4" ID="video1"></video>');
		    document._video = document.getElementById("video1");
			document._video.play();
		} else {
			$('#movie_box>.inner').flash({
				swf: 'player.swf',
				width: width,
				height: height,
				allowFullScreen:'true',
				flashvars: {
					file: filename,
					image: 'sutlm.jpg',
					autostart: 'true'
				}
			});
		}
		$('#movie_box>.inner').fadeIn(1000);
	}, 2400);
	

});

