/**
 * @author Christopher Wallace
 */

jQuery(window).load(function(){
	
	// Lazy Load images below the fold
	jQuery(".content img.thumbnail").lazyload();
	
	// The magic sliding panels
	jQuery('.entry-content a span.slide-title').css({
		opacity : '0.0'
	}).parent('a').append('<span class="cover-up"></span>');
	jQuery('.entry-content a').mouseover(function(e){
	  jQuery(this).find('img.thumbnail').stop().animate({
		marginTop : '-25px'
	  }, 100).parent('a').find('span.slide-title').stop().fadeTo("slow",1.0);
	});
	jQuery('.entry-content a').mouseout(function(e){
	  jQuery(this).find('img.thumbnail').stop().animate({
		marginTop : '0'
	  }, 100).parent('a').find('span.slide-title').stop().fadeTo("slow",0.0);
	});
	
	// Comment Author URL hover effect
	jQuery('.comment-author a.url').mouseover(function(e){
		var url = jQuery(this).attr('href');
		jQuery(this).parent('span').append('<span class="hover-url">'+url+'</span>');
	})
	jQuery('.comment-author a.url').mouseout(function(e){
		jQuery(this).parent('span').find('.hover-url').remove();
	})
	
	jQuery('#footer .widgetcontainer:nth-child(3n+1)').addClass('reset');
	jQuery('.ie6 #footer .widgetcontainer:nth-child(3n+1),.ie7 #footer .widgetcontainer:nth-child(3n+1)').css({
		clear : 'left'
	});
	
	
	
	// NAVEGACIÓN
				
	/*jQuery("a[title='About']").css('background-position','right 0px');
	jQuery("a[title='Collaborate']").css('background-position','right -20px');
	jQuery("a[title='Contact']").css('background-position','right -40px');
	
	jQuery("a[title='Sobre el blog']").css('background-position','right 0px');
	jQuery("a[title='Colabora']").css('background-position','right -20px');
	jQuery("a[title='Contacto']").css('background-position','right -40px');*/
	
	/*jQuery('.page_item a').mouseover(function(e){
		jQuery(this).animate({
			marginTop : '-5px',
			height : '+=5px'
		}, 100);
	});
	jQuery('.page_item a').mouseout(function(e){
		jQuery(this).animate({
			marginTop : '0',
			height : '-=5px'
		}, 100);
	});*/
	

	// PAPAS
	
	/*jQuery('#papas_language_selector a').mouseover(function(e){
		jQuery(this).animate({
			marginTop : '-5px',
			height : '+=5px'
		}, 100);
	});
	jQuery('#papas_language_selector a').mouseout(function(e){
		jQuery(this).animate({
			marginTop : '0',
			height : '-=5px'
		}, 100);
	});*/
	
	
});
