jQuery.noConflict();

jQuery(document).ready(function()
{
    var emailString = 'your email here...'; 
    
    // Make each navigation blocks clickable all over -------------
    jQuery("div#navigation li a").each(function()
    {
        jQuery(this).append('<span style="margin-top:6px">' + jQuery(this).attr('title') + '</span>');
    });
    
    jQuery("div#navigation ul li").click(function(event)
    {
        top.location.href = jQuery(event.target).children('a:first').attr('href');
    });
    
    // subscribe form hint ------------------
    jQuery("form#sf_mail_list_subscribe input[@name='email']").val(emailString);
    jQuery("form#sf_mail_list_subscribe input[@name='email']").addClass('inputHint');
    jQuery("form#sf_mail_list_subscribe input[@name='email']").focus(function()
    {
        var inputValue = jQuery(this).val();
        jQuery(this).val((inputValue == emailString) ? '' : emailString);
    }); 

    jQuery("form#sf_mail_list_subscribe input[@name='email']").blur(function()
    {
        var inputValue = jQuery(this).val();
        jQuery(this).val((inputValue == '') ? emailString : inputValue);
        jQuery(this).removeClass('inputHint');
    });
    
    // arrow buttons ----------------
    jQuery("a.arrow").each(function()
    {
        jQuery(this).wrapInner('<span></span>');
    })
    
    // make sure postage is selected when buying book
    jQuery('input#payForBook').click(function()
    {
        if(jQuery("select#shippingCountry").val() == '')
        {
            alert('Please choose postage destination');
            return false;
        }
    });
});