// JavaScript Document

$(document).ready(function()
{
	var lastDate = '';
	$('.post.hentry.uncustomized-post-template').each(function(index)
	{
		var post = $(this);
		var date = post.prev();
		var dateHTML=lastDate;
		if (date.hasClass('date-header')) dateHTML = date.html();
		post.prepend('<div class="mm_date"><div class="mm_date_content" style="margin-top:20px;margin-right:15px;">'+dateHTML.toUpperCase()+'</div><div class="mm_post_num">'+(index+1)+'.</div>');
		lastDate = dateHTML;
		var author = post.find('.fn');
		var commentLink = post.find('.post-comment-link');
		author.prepend('~ ');
		post.append(author);
		commentLink.prepend('<br />');
		post.append(commentLink);
		
	});
	$('.post-footer,.date-header').remove();
	$('.feed-links').html('<a class="feed-link" type="application/atom+xml" target="_blank" href="http://www.marketingmattersink.com/feeds/posts/default">Subscribe to our Atom Posts!</a>');
	$("#blog-pager-older-link").html('<a id="Blog1_blog-pager-older-link" class="blog-pager-older-link" title="Older Posts" href="http://www.marketingmattersink.com/search?updated-max=2009-10-22T10%3A28%3A00-07%3A00&max-results=7">View Older Posts</a>');
});

var eyes;
$(document).ready(function(){
	eyes = $('#eyes');
	var eraser = $('#eraser_img');
	eyes.show();
	$('.hoverButton').hover(
						function(){
							eraser.attr('src',eraser.attr('hoversrc'));
							}
						,function(){
							eraser.attr('src',eraser.attr('origsrc'));
							});
	setInterval(function(){makeBlink();},3500);
});

function makeBlink()
{
	eyes.hide();
	setTimeout(function(){eyes.show();},500);
}