function toggle_cheque_bacs(id)
{
if(id.value=="cheque" || id.value=="bacs")
{
document.getElementById('bacs_cheque_details_container').style.display = 'block';
}
else
{
document.getElementById('bacs_cheque_details_container').style.display = 'none';
}
}
$(document).ready(function() {
// Fix PNG transparencies on IE
jQuery.ifixpng("/image/pixel.gif");
$("img[src$=png]").ifixpng();
$("input.curved, textarea.curved").each(function() {
var input = $(this);
var wrap_width = parseInt(input.css("width"));
var input_width = wrap_width - 8;
var input_height = parseInt(input.css("height"));
if(0 == input_height || isNaN(input_height)) {
input_height = parseInt(input.css("line-height"));
if(0 == input_height || isNaN(input_height)) {
input_height = parseInt(input.css("font-size"));
}
}
var wrap_height = input_height + 8;
var wrapper = $(this).wrap("
<\/div>").parent();
wrapper.css({
"background-color": input.css("background-color"),
"border-top": input.css("border-top"),
"border-bottom": input.css("border-bottom"),
"bottom-left": input.css("bottom-left"),
"bottom-right": input.css("bottom-right"),
"display": "inline-block",
"float": input.css("float"),
"height": wrap_height,
"margin-bottom": parseInt(input.css("margin-bottom")),
"margin-left": parseInt(input.css("margin-left")),
"margin-right": parseInt(input.css("margin-right")),
"margin-top": parseInt(input.css("margin-top")),
"padding": "4px",
"text-align": "center",
"width": wrap_width
});
wrapper.addClass("curved");
input.removeClass("curved");
input.css({
"width": input_width,
"height": input_height,
"border": "none",
"display": "inline-block",
"float": "none",
"margin": "0",
"vertical-align": "middle"
});
wrapper.click(function() { input.focus(); });
});
$(".curved").corner();
$("a.new_window").click(function(){
window.open(this.href);
return false;
});
if(document.getElementById("login_username"))
{
$("#login_username").defaultValue("enter your e-mail address");
}
if(document.getElementById("login_password"))
{
$("#login_password").defaultValue("enter password");
}
});