function clearInputs(itemToClear, defaultText) {
    jQuery(itemToClear).focus(function() {
        if (this.value == defaultText) {
            this.value = "";
        }
    }).blur(function() {
        if (!this.value.length) {
            this.value = defaultText;
        }
    });

}

function confirm_delete(msg) {
    var msgText = "Are you sure you want to delete this?";

    if (msg != "")
        msgText = msg;

    if (confirm(msgText) == true)
        return true;
    else
        return false;
}

$(document).ready(function() {
// add p element to li's in an ordered list to enable styling of bullet numbers
    $(".content-main ol:not('.category-items') li").wrapInner("<p></p>");

    // aternate row colours for tables
    $(".Table tr:even").addClass("alt");
    $("table tr:even").addClass("alt");
    $("input[type=checkbox], input[type=radio]").each( function() {
		$(this).addClass('checkbox');
	});


if ($.browser.msie && $.browser.version.substr(0,1)<7) {
	// Do nothing, specifically, don't load the input type="file" rewrite for IE6
} else {
    if ($("input[type=file]").length > 0) {
        $("input[type=file]").filestyle({
            image: "/custom/absentfriends/Images/button-upload.png",
            imageheight: 20,
            imagewidth: 93,
            width: 150
        });
    }
}

    $("a.iframe").fancybox({
        frameWidth: 650,
        frameHeight: 475
    });
});
