$(document).ready(function(){
	$('.video-player ul li:not(:last-child) a, .video-player ul.full-list li a').click(function(e){
		e.preventDefault();
		
		$(this).parents('ul').find('.embed').hide();
		$(this).siblings('.embed').show();
	});
	
	$('#latest-news li:not(:last-child) a').hover(function(){
		$(this).parents('ol').find('img').hide();
		$(this).siblings('img').show();
	});
	
	if($('.thumbnails li:first-child a img').length > 0){
		$('.thumbnails li:first-child a img').ready(function(){
			if($('.thumbnails li:first-child a img').attr('class') == 'big-gallery'){
				$('.first-photo').html('<img src="' + $('.thumbnails li:first-child a img').attr('src').replace('w=96', 'w=630').replace('h=64', 'h=400') + '" alt="" />');
			}else{
				$('.first-photo').html('<img src="' + $('.thumbnails li:first-child a img').attr('src').replace('w=96', 'w=310').replace('h=64', 'h=192') + '" alt="" />');
			}
		});
	}
	
	$('.photos:not(.big-gallery) .thumbnails li a img').hover(function(){
		$('.first-photo').html('<img src="' + $(this).attr('src').replace('w=96', 'w=310').replace('h=64', 'h=192') + '" alt="" />');
	});
	
	$('.big-gallery .thumbnails li a img').click(function(e){
		e.preventDefault();
		
		$('.first-photo').html('<img src="' + $(this).attr('src').replace('w=96', 'w=630').replace('h=64', 'h=400') + '" alt="" />');		
	});
	
	$('#twitter-badge').html('<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script><script type="text/javascript" src="http://twitter.com/statuses/user_timeline/ettatabletennis.json?callback=twitterCallback2&amp;count=4"></script>');
});
