function ShowTitle(parent)
{	
	$(parent + " h2").append('<b class="title">' + $(parent + " h2").attr("title") + '</b>');
	$(parent + " .title").css({"opacity": "0.0"});

	$(parent + " h2 a").mouseenter(function(){
		$(parent + " .title").animate({opacity: 1}, 200);
	}).mouseleave(function(){
		$(parent + " .title").animate({opacity: 0}, 200);
	});
}

function ShowMoreHome(parent,child,height)
{
	var originalHeight = $(parent+child).height();

	if(originalHeight > height)
	{	
		$(parent+child).css({"height": height+"px", "overflow": "hidden"});
	
		if(child == "")
		{
			$(parent).after('<a href="'+parent+'" onclick="return false;" rel="'+originalHeight+'" class="readmore">Read More</a>');
			var modifier = "+";
		} else {
			$(parent).append('<a href="'+parent+'" onclick="return false;" rel="'+originalHeight+'" class="readmore">Read More</a>');
			var modifier = "";
		}	
	
		$(".readmore").css({opacity: 0.5});
	
		$(parent+modifier+" .readmore").click(function () {
			  $(parent+child).animate({height: $(this).attr("rel")+"px"}, 1500);
			  $(this).fadeOut(300);
		});
	
		$(parent).mouseenter(function(){
			$(parent+modifier+" a.readmore").animate({opacity: 1.0}, 200);
		}).mouseleave(function(){
			$(parent+modifier+" a.readmore").animate({opacity: 0.5}, 200);
		});
	}
}

$(document).ready(function(){
	ShowMoreHome("#blog"," blockquote:first",625);
	ShowMoreHome("#review"," blockquote:first",625);
	ShowMoreHome("#tech"," blockquote:first",625);

	ShowTitle("#poll");
	ShowTitle("#tech");
	ShowTitle("#review");
	ShowTitle("#video");
});