function validation()
{

    $("#AddToCartSubmit").click(function(){
        var result = true;
        if( $("#quantity").val() == 0 )
        {
            $("#quantity").css( "background-color", "#53d3ba" );
            setTimeout( "setBackgroundColor( '#quantity', 'white' )", 500 );
            setTimeout( "setBackgroundColor( '#quantity', '#53d3ba' )", 1000 );
            setTimeout( "setBackgroundColor( '#quantity', 'white' )", 1500 );
            result = false;
        } else
            $("#quantity").css( "background-color", "white" );

        if( $("#size").val() == 0 )
        {
            $("#size").css( "background-color", "#53d3ba" );
            setTimeout( "setBackgroundColor( '#size', 'white' )", 500 );
            setTimeout( "setBackgroundColor( '#size', '#53d3ba' )", 1000 );
            setTimeout( "setBackgroundColor( '#size', 'white' )", 1500 );
            result = false;
        } else
            $("#size").css( "background-color", "white" );

        if( result == true )
            $("#FormAddToCart").submit();
    });

    $("#FormCheckout").submit(function(){
        if( $("input[name=payment]:checked").val() == undefined )
        {
            $(".labelPayment").css( "color", "#53d3ba" );
            setTimeout( "setForegroundColor( '.labelPayment', 'white' )", 500 );
            setTimeout( "setForegroundColor( '.labelPayment', '#53d3ba' )", 1000 );
            setTimeout( "setForegroundColor( '.labelPayment', 'white' )", 1500 );
            return false;
        }
        return true;
    });

}

function setBackgroundColor( id, color )
{

    $(id).css( "background-color", color );

}

function setForegroundColor( id, color )
{

    $(id).css( "color", color );

}

function setBold( id, isTrue )
{

    if( isTrue )
        $(id).css( "font-weight", "bold" );
    else
        $(id).css( "font-weight", "normal" );

}