
function TG_MenuObject(baseId, targetId) {
	if (!jQuery) return;
	var $ = jQuery;
	var baseEle = $('#' + baseId);
	var targetEle = $('#' + targetId);
	baseEle.parent().mouseover( function() {
	  var _parent = targetEle.parent();
	  if ( _parent.position().left + targetEle.width() > _parent.parent().width() ) {
	    targetEle.css('right', 0);
	  }
	  targetEle.show();
	});
	baseEle.parent().mouseout( function() {
	  targetEle.hide();
	});
};



function showTopCart(flag){
        		if(flag){
        			jQuery('#cart_detail').slideDown("slow");
        			jQuery('#top-cart-close').show();
        		}
        		
        	}
        	function hideTopCart(){
        		jQuery('#cart_detail').slideUp("slow");
        		jQuery('#top-cart-close').hide();
  }
  
  jQuery('document').ready(function(){
			jQuery('#tools_wrapper').mouseover(function(){
				hideTopCart();
				showSearchBody();
			});
			
			jQuery('#tools_wrapper').mouseout(function(){
				hideSearchBody();
			});
			
			function showSearchBody(){
				jQuery('.search-form').show();
				jQuery('.search-text').addClass('active');
			}
			
			function hideSearchBody(){
				jQuery('.search-form').hide();
				jQuery('.search-text').removeClass('active');
			}
		});
