
var twitter_account_name = "TaskosToDoList";

hs.graphicsDir = 'script/highslide/graphics/';
hs.outlineType = 'outer-glow';

$(document).ready(function(){
	
	$(".phone_screens a[rel^='prettyPhoto'], .download a[rel^='prettyPhoto']").prettyPhoto({
		theme: 'facebook'
	});
		
	$('.phone_screens').cycle({
		fx: 'scrollHorz',
		speed: 400,
		pause: 1,
		timeout: 5000
	});
	
	if( $('#twitter_update_list').length > 0 ){	
		twitterLoadCont();
	}

});

$(window).resize(function() {

	$('.fixed_cont').css('top', parseInt(( $(window).height() - $('.fixed_cont').height() ) / 2) + 'px');
	
});

function twitterLoadCont(){
	var e = document.createElement("script");
	e.src = 'http://twitter.com/statuses/user_timeline/'+twitter_account_name+'.json?callback=twitterCallback2&count=1';
	e.type="text/javascript";
	document.getElementsByTagName("head")[0].appendChild(e);
}

function checkStatus(){
	text = $('.twitter_form textarea').val();
	if( text!='' ){
		$('.twitter_form a').attr('href', 'http://twitter.com/home?status='+text);
	}
}

