// prepare for conflict with another framework
jQuery.noConflict();



// css selectors
var dmTopMenu 			= 'li.top-menu';
var dmTopMenuAnchor		= 'li.top-menu a.top-menu';
var dmMultiMenuBlock	= '#multi-menu-block';
var dmSubmenuBlock		= 'div.submenu-block';
var $dmTopMenu			= jQuery(dmTopMenu);
var $dmMultiMenuBlock	= jQuery(dmMultiMenuBlock);



jQuery(document).ready(function(){

	// 
	$dmTopMenu.hoverIntent(function(){
	
		
		
		if(jQuery(this).children(dmSubmenuBlock).length)
		{
			jQuery(this).children(dmSubmenuBlock).fadeIn(600);
			jQuery(this).children(dmTopMenuAnchor).addClass('top-menu-hover');
			
			if(jQuery.browser.msie && jQuery.browser.version=='6.0')
				jQuery(this).parent().parent().css('border-bottom', 'none');
			// else
				// jQuery(this).parent().parent().css('border-bottom', '3px solid #267092');
			
		}
		
		
	
	}, function(){
	
		if(jQuery(this).children(dmSubmenuBlock).length)
		{
			jQuery(this).children(dmSubmenuBlock).hide();
			jQuery(this).parent().parent().css('border-bottom', 'none');
			jQuery(this).children(dmTopMenuAnchor).removeClass('top-menu-hover');
		}
	
	});

});
