var enableVAT = false;

$(window).scroll(function() {
	var scroll = Math.max($('body').scrollTop(), $('html,body').scrollTop());
	if (scroll > 113) $("#signUp").addClass("fixed");
	else $("#signUp").removeClass("fixed");
});

$(document).ready(function() {
        $(".signupbutton").click(function () {
        $("#signupusername").effect("highlight", {"color":"#ffeb70"}, 2200);
        $("#signupusername").css("color","black!important");
        $("#signupusername").css("font-weight","strong");
        $(".signuptext").html('<strong>GET STARTED HERE!</strong>');
        $(".signuptext").effect("shake", { times:3,distance:7 }, 100);
    });
    
   $("#togmon").click(function() {
        $("#togan").addClass('secondary');
        $("#togmon").removeClass('secondary');
        $(".monthly").show();
        $(".annual").hide();
    });
    $("#togan").click(function() {
        $("#togmon").addClass('secondary');
        $("#togan").removeClass('secondary');
        $(".monthly").hide();
        $(".annual").show();
    });

    // stop dominic putting spaces in the username....
   $('input[name="site[username]"]').keydown(function(e) {
        
    	if (e.keyCode == 32) {
    		return false;
    	}
    });
    
  
    if (enableVAT)
    {
        //$("input[type=text]").placeholder();
        if ($(".vatprice").length > 0 || $(".vatmsg").length > 0)
        {
            $(".vatprice").css( 'opacity', '0');
            var arr = ['AT','BE','BG','CY','CZ','DK','EE','FI','FR','DE','GR','HU','IE','IT','LV','LT','LU','MT','NL','PL','PT','RO','SK','SI','ES','SE','UK'];
            var country = $('#countrycode').val();   
            if ($.inArray(country, arr) !== -1) 
            {
                $('.vatmsg').show();
                $('.vatprice').each(function(index) {
                    var newprice = $(this).text() * 1.2;
                    newprice = parseFloat(newprice).toFixed(2);
                    newprice = newprice.replace('.00', '');
                    $(this).html(newprice);
                });
                $(".vatprice").css( 'opacity', '100'  );
                $(".vatmsg").show();
             }
             else
             {
                $(".vatprice").css( 'opacity', '100'  );
                $(".vatmsg").hide();
             }
        }
    }
    else
    {
        $(".vatprice").css( 'opacity', '100'  );        
        $(".vatmsg").hide();
    }
});





