$(document).ready(function () {

    $('.newsletterForm input.text').addClass('placeholder').val($('.newsletterForm input.text').attr('alt'));

    $('.newsletterForm input.text').focus(function () {
        if ($(this).val() == $(this).attr('alt')) {
            $(this).removeClass('placeholder').val('');
        }
    });
    $('.newsletterForm input.text').blur(function () {
        if ($(this).val() == '') {
            $(this).addClass('placeholder').val($(this).attr('alt'));
        }
    });

    $('.product').hover(function () {
        $(this).addClass('hover');
        $(this).children('.img').children('a').children('span').stop().animate({ 'opacity': 0 }, 200);
    }, function () {
        $(this).removeClass('hover');
        $(this).children('.img').children('a').children('span').stop().animate({ 'opacity': 1 }, 200);
    });

    if ($("a[rel=prod_gallery]").fancybox) {
        $("a[rel=prod_gallery]").fancybox({
            'transitionIn': 'none',
            'transitionOut': 'none',
            'padding': '0',
            'cycle': true
        });
    }

    $(".options .amount input.text").numeric({ decimal: false, negative: false }, function () { console.log("Positive integers only"); this.value = ""; this.focus(); });
});
