//Master Javascript file
//version:   1.0
//author:    Paul Boag
//email:     paul.boag@headscape.co.uk
//website:   http://www.headscape.co.uk


// Loads up the various functions we are going to use
$(document).ready(function(){
	buyNow("#buyNow");
	tooltips();
});

function buyNow(x) {
	$("#buy").wrapInner("<div id='buyHighlight'></div>");
	$(x).click(function(){
		$.scrollTo("#buy", 800);
		$("#buyHighlight").colorBlend([{fromColor:"transparent", toColor:"#ead9a5", param:"background-color", cycles:3}]);
		return false;
	});
};

//Displays the tooltips on the download link
function tooltips() {

$(".download").append("<div id='popup'><span class='messageTR'><span class='messageTL'><p><em>Description:</em> Chapter 1 of the website Owners Manual (the secret of a successful website)</p><p><em>Size:</em> 1.6mb</p></span></span><span class='messageBR'><span class='messageBL'><img src='/websiteownersmanual/images/arrow.gif' /></span></span></div>");
$("#popup").animate({ "opacity": 0 }, 1);

$(".download a").hover(
		function() {
			$("#popup").animate({ "bottom": "2em", "opacity": 1 }, 500);

		},
		function() {
			$("#popup").animate({ "bottom": "0", "opacity": 0 }, 500);
		});


};




