/*
 * $Id:jwp.2011.common.js, 2011/06/10 18:20:57$
 */
google.setOnLoadCallback(function()
{
    $(document).ready(function()
    {
        $(function()
        {
            $('a > img').hover(function()
            {
                $(this).stop().animate({opacity: 0.5}, "fast");
            }, function()
            {
                $(this).stop().animate({opacity: 1}, "fast");
            }
            );
        });
        $(function()
        {
	    $('a[href*=#]').click(function()
            {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') &&
                    location.hostname == this.hostname)
                {
		    var target = $(this.hash);
		    target = target.length && target;
		    if (target.length)
                    {
			$('html,body').animate({scrollTop: target.offset().top}, 'fast');
                        return false;
		    }
		}
                return true;
            });
        });
    });
});
