// this tells jquery to run the function below once the DOM is ready
$(document).ready(function() {

// choose text for the show/hide link
var showText="Show the Domain Pricing Table";
var hideText="Show the Hosting Pricing Table";

var showTitle="Hosting Pricing Table |";
var hideTitle="Domain Pricing Table |";

// create the toggle link
$("#hide_this").before("<p id='tableTitle'>"+showTitle+"</p><a href='#' id='table_link'>"+showText+"</a>");

// hide the content

$('#hosting_table').show();
$('#domain_table').hide();

// capture clicks on the newly created link
$('a#table_link').click(function() {

// change the link text
if ($('a#table_link').text()==showText) {
$('a#table_link').text(hideText);
}
else {
$('a#table_link').text(showText);
}

// change the title text
if ($('p#tableTitle').text()==showTitle) {
$('p#tableTitle').text(hideTitle);
}
else {
$('p#tableTitle').text(showTitle);
}

// toggle the display
$('#hosting_table').toggle('slow');
$('#domain_table').toggle('slow');

// return false so any link destination is not followed
return false;
				});

});
