        $(document).ready(function() {
            $("a.menu").mouseenter(function() {
                if (!$(this).attr('open'))
                    return;
                clearTimeout($(this).data('timeoutId'));
                $("#" + $(this).attr('open')).show();

                $(this).attr('sc_active', true);
				$(this).addClass('sc_active');

            }).mouseleave(function() {
                if (!$(this).attr('open'))
                    return;

                var someelement = this;
                var open = "#" + $(this).attr('open');
                var timeoutId = setTimeout(function() {
                    if ($(open + '[show=true]').length) {

                    }
                    else {
                        $(open).hide();
						$(someelement).removeClass('sc_active');
                    }
                }, 100);
                $(someelement).data('timeoutId', timeoutId);
                $(this).removeAttr('sc_active');
            });

            $('.float-box').mouseenter(function() {

                $(this).attr('show', 'true');
            }).mouseleave(function() {
				var tab = $('[open=' + $(this).attr('id') + '][sc_active]');
                if (tab.length == 0) {
                    $(this).removeAttr('show');
                    $(this).hide();
					
                }
				$('[open=' + $(this).attr('id')  + ']').removeClass('sc_active');
				
            });
        });