//=====================================================//
var LoadReadyLocal = {

    editProfileForm: function(){
        $(function() {
            Member.setupEditProfileFormForm();
        });
    },
    registerForm: function(){
        $(function() {
            Member.setupRegisterForm();
        });
    },
    enquiryForm: function(){
        $(function() {
            Content.setupEnquiryForm();
        });
    },

    login: function(){
        $(function() {
            var options = {
                success: Validate.validateFormData,
                beforeSubmit: function() {},
                dataType: 'json'
            };

            $('#loginForm').ajaxForm(options);

            $('#resetLogin').click(function(e){
                e.preventDefault();
                $('#loginForm').resetForm();
            });

        });
    },

    product: function(){
        $(function() {
            $("a[href*='raiseBid']").click(function(e){
                e.preventDefault();
                Product.raiseBid.call(this);
            });

        });
    }

};


LoadReady = $.extend(LoadReady, LoadReadyLocal);


$(function() {


    // set the border right of last item to 0 //
    $('#list li:nth-child(even)').css({'background-color': '#eff3ef'});
    $('table.generic tr:nth-child(even)').css({'background-color': '#f3f3f3'});
    $('#keyword').focus(function(){
        var value = $(this).val();
        if ($(this).val() == 'search lot no'){
            $(this).val("");
        }
    });

   $('#productImage a').click(function(e) {
        e.preventDefault();
        var media_id = $(this).attr('media_id');
        var url = '/index.php?_room=product&_spAction=largeImage&showHTML=0';
        $.get(url, {media_id: media_id}, function (data) {
            $('.largeImage').html(data).fadeIn('slow');
        }) 
    });
    
   $('#productImage img').css('opacity','0.3');
   $('#productImage img').hover( function () {
   		//Mouse Over
        $(this).css('opacity','1');
        
   		//Mouse Off
      	},function () {
      		
        $(this).css('opacity','0.3');
      	}
    );
   //$('.product .c25l dd').css('border','1px solid red');


});

