File: //home/roofmagazine.org.uk/public_html/roof_scripts/blog_scripts.js
$(document).ready(function(){
$("#blog_archives ul:not(:first)").hide();
$("#blog_archives h4:first").addClass("archive_open");
$("#blog_archives h4:not(:first)").addClass("archive_closed");
$("#mailing_email").click(function () {
if ($(this).val() == "Your email") {
$(this).val("").css("color","#000000");
}
});
$("#mailing_email").blur(function () {
if (($(this).val() == "Your email") || ($(this).val() == "")) {
$(this).val("Your email").css("color","#666666");
}
});
$("#blog_archives h4").hover(
function () {
$(this).css("cursor","pointer");
},
function () {
$(this).css("cursor","default");
}
);
//Toggle the lists
$("#blog_archives h4").click(function () {
if ($(this).hasClass("archive_open")) {
$(this).removeClass("archive_open");
$(this).next().slideUp("medium");
$(this).addClass("archive_closed");
} else {
$(this).removeClass("archive_closed");
$(this).next().slideDown("medium");
$(this).addClass("archive_open");
}
});
});