﻿$(document).ready(function(){
	//by caju.nu and brunomacaco.com.br
	function accordion(){
		$('.profile h3').css('cursor','pointer');
		$('.profile h3').click(function() {
			if($(this).next().is('.view')){
				$(this).next().toggle('slow').removeAttr('class') && $(this).children('a').attr('class','down');
			}else{
				$('.profile h3').next().hide('slow').removeAttr('class') && $('.profile h3 a').attr('class','down');
				$(this).next().toggle('slow').attr('class','view') && $(this).children('a').attr('class','up');
			}
			return false;
		}).next().hide()
	}
	
	function targetBlank(){
		$('a[rel="external"]').attr({'target':'blank','title':'Esse link ser&aacute; aberto em uma nova janela'});
	}
	
	function start(){
		accordion();
		targetBlank();
	}
	
	start();
});