////////////////////////////////////////////////////////////////////////////////
//
//  FEED FORCE INC.
//  Copyright FEED FORCE INC.
//  All Rights Reserved.
//
//  NOTICE: Feed Force Inc. does not permit you to use Feed Force-owned content,
//  including but not limited to icons, texts, logos, and images without Feed Force’s prior permission.
//
////////////////////////////////////////////////////////////////////////////////

/**
 * default console method
 */
if( typeof console == "undefined")console = { log : function(){}, debug : function(){}, info : function(){}, warn : function(){}, error : function(){} };


(function($)
{
    //--------------------------------------
    //  Custom javascript commands
    //--------------------------------------
    
    
    
    
    //--------------------------------------
    //  Document Ready
    //--------------------------------------
    $(function()
    {
        
        //animation scroll to top
        $('a[href^=#]').not('a[href=#]').click(function()
        {
            var target;
            target = $($(this).attr('href'));
            if(target.length == 0)
            {
                return;
            }
            $('html, body').animate(
            {
                scrollTop : target.offset().top
            }, 'slow', 'swing');
            return false;
        });

		//globalnav
		$('#nav-cnt ul li img').buttonImageState({selected: '_on'})
		
		//pagenav
		$('ul.pageLink_02 li a img').buttonImageState({over:'_on',selected: '_s'})

		//globalnav dorop down
		$("#nav-cnt ul li ul").hide();
		$("#nav-cnt ul > li").hover(
			function(){$("ul:not(:animated)",this).slideDown("fast")},
			function(){$("ul",this).slideUp("fast");
		});

		//globalnav dorop down for ie6
		if(jQuery.browser.msie && parseInt(jQuery.browser.version) == 6){
		$("#nav-cnt ul > li:first").hover(
			function(){
			
				$("#search-block form select").css("visibility","hidden")
				},
			function(){$("#search-block form select").css("visibility","visible");
		});
		}

		//globalnav dorop down for ie6
		if(!jQuery.support.style) {
		$("#nav-cnt ul > li:first").hover(
			function(){
			
				$("#side-brand-img img").css("visibility","hidden")
				},
			function(){$("#side-brand-img img").css("visibility","visible");
		});
		}

        
    });
})(jQuery);

