jQuery.noConflict();
jQuery(document).ready(function($) {
    $(".validate").validator({ onSuccess: function() { var phone = $(".phone").val(); $(".phone").val(phone.replace(/[^a-zA-Z 0-9]+/g, '').replace(" ", "")); } });
    $(".phone").mask("(999) 999-9999");

    $('#ShippingSectionButton').click(function() {
        $("#BillingFirstName").value = $("#ShippingFirstName").value
        $('#ShippingSection, #ShippingSectionButton').hide();
        $('#ShippingSectionEdit').slideDown();
        return false;
    });

    $('#BillingSectionButton').click(function() {
        $('#BillingSection, #BillingSectionButton').hide();
        $('#BillingSectionEdit').slideDown();
        return false;
    });

    $('#PaymentSectionButton').click(function() {
        $('#PaymentSection, #PaymentSectionButton').hide();
        $('#PaymentSectionEdit').slideDown();
        return false;
    });


    jQuery('ul.sf-menu').superfish({
    delay: 100,                            // one second delay on mouseout 
    animation: { opacity: 'show', height: 'show' },  // fade-in and slide-down animation 
    speed: 'slow',                          // faster animation speed 
    autoArrows: false,                           // disable generation of arrow mark-up 
    dropShadows: false                            // disable drop shadows
    
    });

    $(".featured-prouduct").hoverIntent(function() {
        var imgAlt = $(this).find('img').attr("alt");


        $(this).find('.feature-slider').stop(false, true).animate({ 'height': '+=70' }, 600).delay(100).append('<div class="tooltip">' + imgAlt + '</div>').fadeIn('fast');

    }, function() {

        $(this).find('.feature-slider').stop(false, true).animate({ 'height': '-=70' }, 600).hide();
        $(this).find('div.tooltip').delay(400).fadeOut('fast', function() {
            $(this).remove();
        });

    });

    var currentYear = (new Date).getFullYear();
    $(".thisYear").text(currentYear);

    /* FAQS Accordion */
    $("div.question").click(function() {
        $(this).parent().find("div.answer").slideToggle();
        $(this).parent().find("div.question").toggleClass("qActive");

    });



    
    
});



