$(document).ready(function()
{
	var activo;
	$.address.change(function(event) {
		//console.log(event.value);
		var idActual = event.value.replace('/', '');
		var tab_content = $('.tab_container > div');
		var tabs = $("ul.tabs > li");
		tab_content.hide();
		tabs.removeClass('active');
		if (event.value == "/"){
			tab_content.filter(':first').show();
			tabs.filter(':first').addClass('active');
		}
		else{
			tabs.filter(('#' + idActual)).addClass('active');
			tab_content.filter(('#-' + idActual)).fadeIn();
		}
			
	});
});

jQuery.fn.hashValue = function() {
    var href = $(location).attr('href');
    return href ? href.replace(/^.*#/, '') : href;
}
