var dropTimer = '';

Interface = {
    ExpandFaq: function(el) {
        $('.faqAnswer').slideUp();
        $(el).nextAll('div').slideDown();
    },
    CopyCompanyAddress: function(el) {
        var inputName = $(el).attr('name');
        var property = inputName.split(":")[1];
//        if($('#cAddress2\\:' + property).val() == "")
            $('#cAddress2\\:' + property).val($(el).val());
    },
    PartnerDropInit: function() {
        $('#shopCategories').hide();
        $('#shopCategories > li.shopCategory').hover(function() {
            clearTimeout(dropTimer);
            $(this).toggleClass('categoryHover');
        }, function() {
            $(this).toggleClass('categoryHover');
        });
        $('#allPartnersDrop').mouseover(function() {
            clearTimeout(dropTimer);
            $('#shopCategories').slideDown("fast", function() {
                $('#shopCategories, #allPartnersDrop').mouseout(function() {
                    clearTimeout(dropTimer);
                    dropTimer = setTimeout(function() {
                        $('#shopCategories').slideUp("fast", function() {
                            clearTimeout(dropTimer);
                            $('body').unbind('click')
                        });
                    }, 700);
                });
            });
            $('body').unbind('click');
            $('body').click(function(event) {
                $('#shopCategories').slideUp("fast", function() {
                    clearTimeout(dropTimer);
                    $('body').unbind('click');
                });
            });
        });
    }
}
