$(function(){

$.getJSON("currency.json", function(data) {
    l4 = '1 USD = '+data.convertedAmount+' JPY';
	$("#currency").append('<p style="margin-top:0px;font-size:12px;">'+l4+'</p>');
});
$('div#abgne_marquee').load('./announce.txt', function(){

//$('div#abgne_marquee ul').css('top', -18);
var $marqueeUl = $('div#abgne_marquee ul'),
        $marqueeli = $marqueeUl.children(),
	 timer,speed = 2500, _now = 1, _next;
/*var $marqueeUl = $('div#abgne_marquee ul'),
                $marqueeli = $marqueeUl.append($marqueeUl.html()).children(),
                _height = $('div#abgne_marquee ul li').height() * -1,
                scrollSpeed = 1000,
                timer,
                speed = 3000 + scrollSpeed;*/
        $marqueeli.hover(function(){
                clearTimeout(timer);
        }, function(){
                timer = setTimeout(showad, speed);
        });
        function showad(){
/*                var _now = $marqueeUl.position().top / _height;
                _now = (_now + 1) % $marqueeli.length;
        $marqueeUl.animate({
                        top: _now * _height
                }, scrollSpeed, function(){
                        if(_now == $marqueeli.length-1  ){
                                $marqueeUl.css('top',-18);
                        }
                });*/
		 _next = _now % ($marqueeli.length-1) + 1;
                var c1 = $marqueeli[_next];
                $($marqueeli[0]).html($(c1).html());
                _now = _next;

                timer = setTimeout(showad, speed);
        }
        
        timer = setTimeout(showad, speed);
});

$("#top_navi_sub").mouseout(function(){
                $(this).toggle();
});
$("#top_navi_mail").mouseout(function(){
                $(this).toggle();
});
});
function showServiceSub(){
        $("#top_navi_sub").show();
}
function showMailSub(){
        $("#top_navi_mail").show();
}





