$(document).ready(function () {
	$('#micro-blog-tabs a').click(function () {
		var href = $(this).attr('href');
		var li = $(this).parent();
		var ul = $(li).parent();
		
		$('li', ul).removeClass('select');
		$(li).addClass('select');
		
		
		$('div.micro-blog').addClass('loading');
		$('div.micro-blog').load(href, function () {
			$('div.micro-blog').removeClass('loading');
		});
		
		return false;
	});
	
	$('div.micro-blog ul.paxinacion a').live('click', function () {
		$('div.micro-blog').addClass('loading');
		
		$('div.micro-blog').load($(this).attr('href'), function () {
			$('div.micro-blog').removeClass('loading');
		});
		
		return false;
	});
	
/*
if($('#embedCode').length > 0){
			code = player.embed({
				width: 560,
				height: 315
				}).getEmbedCode(true); 
			$('#embedCode').val(code);
		}
*/

	if ($('.scrollp').length) {
    // Scrollpane
    $('.scrollp').jScrollPane();
	}

	$('ul.rating a').click(function () {
		var href = $(this).attr('href');

		$.get(href);
		
		$('ul.rating li').each(function () {
			var num = $('a', this).html();
			$(this).html(num);
		});
		
		alert('Obrigado por votar');
		
		return false;
	});
});

