function imgFade() {  
	$("div[class*='fade']").bind("mouseenter",function(){
		$(this).animate({opacity: 1}, 150);
	}).bind("mouseleave",function(){
		$(this).animate({opacity: 0.2}, 150);
	});
};

function nextLink() {
	$("div[class*='link']").bind("mouseenter",function(){
		$(this).animate({height: "40px"}, 150);
	    $(this).css( 'cursor', 'pointer' );
	}).bind("mouseleave",function(){
		$(this).animate({height: "20px"}, 150);
	}).bind("click",function() {
		window.location = $(this).find("a:first").attr("href");
	});
};

function postHover() {
	$("div[class*='hover']").bind("mouseenter",function(){
	    $(this).animate({ backgroundColor: "white" }, 150);
	    $(this).find("a").animate({ color: "#333" }, 150);
	    $(this).find("h3").animate({ color: "#333" }, 150);
	    $(this).find("h4").animate({ color: "#333" }, 150);
	    $(this).find("div[class*='copy']").animate({ color: "#333" }, 150);
	    $(this).css( 'cursor', 'pointer' );
	}).bind("mouseleave",function(){
	    $(this).animate({ backgroundColor: $(this).find("h2").attr("title") }, 150);
	    $(this).find("a").animate({ color: "white" }, 150);
	    $(this).find("h3").animate({ color: "white" }, 150);
	    $(this).find("h4").animate({ color: "white" }, 150);
	    $(this).find("div[class*='copy']").animate({ color: "white" }, 150);
	}).bind("click",function() {
		window.location = $(this).find("a:first").attr("href");
	});
};

function favIcon() {
	var canvas = document.createElement('canvas'),
	ctx,
	img = document.createElement('img'),
	link = document.getElementById('favicon').cloneNode(true);

		if (canvas.getContext) {
			canvas.height = canvas.width = 16; // set the size
			ctx = canvas.getContext('2d');
			img.onload = function () { // once the image has loaded
			ctx.fillStyle = $("body").css('background-color');
			ctx.fillRect (0, 0, 16, 16);
			link.href = canvas.toDataURL('image/png');
			document.body.appendChild(link);
		};
		img.src = 'http://www.heartshapedwork.com/wp-content/themes/hsw-colors/images/favicon.png';
	}
};

