﻿jQuery(document).ready(function()
{
    jQuery('img[src=""]').parents('.img').remove();
    jQuery('span.readmore').html('Lue lisää »');
    jQuery('span.readmore').click(function()
    {
        if (jQuery(this).parents('div.hentry').find('span.dots').size() > 0)
        {
            jQuery(this).parents('div.hentry').find('span').each( function(i)
            {
                switch(this.className)
                {
                    case 'dots':
                    {
                        jQuery(this).remove();
                    };break;
                    case 'full':
                    {
                        jQuery(this).show('slow');
                    }    
                }
            });
            jQuery(this).remove();
            return false;
        }
    });
    
    jQuery('ul.authors li a').click(function()
    {
        /*
        // Remove the old selected
        jQuery(this).parents('ul.authors').find('a').removeClass('selected');
        jQuery(this).addClass('selected');
        
        var author = jQuery(this).attr('rel');
        console.log(author);
        
        jQuery('#content-center div.holder').each(function(i)
        {
            if (   jQuery(this).hasClass(author)
                && jQuery(this).css('display') == 'none')
            {
                jQuery(this).show('slow');
                return;
            }
            
            if (   !jQuery(this).hasClass(author)
                && jQuery(this).css('display') != 'none')
            {
                jQuery(this).hide('slow');
                return;
            }
        });
        
        return false;
        */
    });
});

