jQuery(document).ready(function($) {
	
		$('#tweets').tweet({
			username: "paseusted",
			join_text: "auto",
			avatar_size: 0,
			count: 1,
			auto_join_text_default: "dijimos,", 
			auto_join_text_ed: "nosotros",
			auto_join_text_ing: "est&aacute;bamos",
			auto_join_text_reply: "contestamos a",
			auto_join_text_url: "est&aacute;bamos viendo",
			loading_text: "cargando tweets..."
		});
	
	$('.tutores, .asesores, .consejo, .aliados,').next().children('.addtoany_share_save_container').remove();
	
	$('#content #connections-list').children().addClass("cuadrito");

	$(function(){
		$('#content #connections-list').masonry({
			columnWidth: 240, 
			itemSelector: '.cuadrito:visible' 
		});
	});
	
	$('.twtr-ft').remove();
	
	$('#content').children('.cuadrito-genera:first').prependTo('#content');
	
	$(function(){
		$('#content').imagefit();
	});
	
	$(function(){
		$('#content').masonry({
			columnWidth: 240, 
			itemSelector: '.cuadrito:visible' 
		});
	});
	
/*
	$('#content').infinitescroll({
	    navSelector  : '#navigation',    // selector for the paged navigation 
	    nextSelector : '#navigation a',    // selector for the NEXT link (to page 2)
	    itemSelector : '.cuadrito',       // selector for all items you'll retrieve
	    loadingImg : 'img/loader.gif',
	    donetext  : 'Ya no hay m&aacute;s p&aacute;ginas que cargar.',
	    debug: true,
	    errorCallback: function() { 
	        // fade out the error message after 2 seconds
	        $('#infscr-loading').animate({opacity: .8},2000).fadeOut('normal');     
	    }
	},
	    // call masonry as a callback
	    function() { $('#content').masonry({ appendedContent: $(this) }); }
	);
	
*/
	$('#semanas li').each(function() {
		if($(this).attr("semana") < $(this).attr("semanaActual")) {
			$(this).addClass('pasado');
		}
		if($(this).attr("semana") == $(this).attr("semanaActual")) {
			$(this).addClass('actual');
		}
		if($(this).attr("semana") > $(this).attr("semanaActual")) {
			$(this).children().removeAttr('href');
		}
	});
		
	$('#sidebar #connections-list').jcarousel({
		wrap: 'circular',
		auto: 4,
		scroll: 1
    });
    
	$('#necesitan .addtoany_share_save_container').remove();
	
	$("#necesito-quitar:contains('necesito')").replaceWith('<a href="http://www.genera.mx/trabajo-genera/"  return false"><img src="http://www.genera.mx/wp-content/themes/genera/img/sidebar/envia.png" alt="Env&iacute;a tu perfil" /></a>');
	
	$(window).load(function () {
		$('.twtr-ft').remove();
	});

});
