(function($) {

    $(document).ready(function() {
        // IUG dropdown script
        $('.iug-dropdown').not('.inactive').hover(
            function() {
                $(this).children('.iug-dropdown-options').showDropDown(150);
            }, function() {
                $(this).children('.iug-dropdown-options').hideDropDown(150);
                $(this).find('.iug-dropdown-option').css('background-color','#E6E6E6');
                $(this).find('.iug-dropdown-option').css('color','#1D1D1B');
            }
        );

        $('.iug-dropdown-option').hover(
            function() {
                $(this).css('background-color','#B2B2B2');
                $(this).css('color','#FFFFFF');
            }, function() {
                $(this).css('background-color','#E6E6E6');
                $(this).css('color','#1D1D1B');
            }
        ).click(function() {
            $(this).parents(".iug-dropdown-options").slideUp(100);
            $(this).parent().siblings(".iug-dropdown-default").text($(this).text());
            //$(this).children("a").trigger("click");
            window.location.href = $(this).children("a").attr("href");
        });
    });

})(jQuery);
