/* import JS files
****************************************************/
//言語スライダー
            function expand($elem){
                var angle = 0;
                var t = setInterval(function () {
                    if(angle == 1440){
                        clearInterval(t);
                        return;
                    }
                    angle += 40;
                    $('.link',$elem).stop().animate({rotate: '+=-40deg'}, 0);
                },10);
                $elem.stop().animate({width:'268px'}, 1000)
                .find('.item_content').fadeIn(400,function(){
                    $(this).find('p').stop(true,true).fadeIn(600);
                });
            }
            function collapse($elem){
                var angle = 1440;
                var t = setInterval(function () {
                    if(angle == 0){
                        clearInterval(t);
                        return;
                    }
                    angle -= 40;
                    $('.link',$elem).stop().animate({rotate: '+=40deg'}, 0);
                },10);
                $elem.stop().animate({width:'150px'}, 1000)
                .find('.item_content').stop(true,true).fadeOut().find('p').stop(true,true).fadeOut();
            }
//ヘッダー折り畳み
$(function() {
	$(".open").click(function(){
	$("#h-tool-area").slideToggle("nomal");
	$(this).toggleClass("active"); 
	return false;
	});
    });

//ニューススクロール
	$(function(){
		$("#marquee2").marquee({yScroll: "bottom"});
	});
	var iNewMessageCount = 0;
	function addMessage(selector){
		iNewMessageCount++;
		var $ul = $(selector).append("<li>New message #" + iNewMessageCount + "</li>");
		// update the marquee
		$ul.marquee("update");
	}
	function pause(selector){
		$(selector).marquee('pause');
	}
	function resume(selector){
		$(selector).marquee('resume');
	}
//吹き出し
	$(function(){
	     $(".tooltip a").hover(function() {
	        $(this).next("span").animate({opacity: "show", top: "-75"}, "slow");}, function() {
	               $(this).next("span").animate({opacity: "hide", top: "-85"}, "fast");
	     });
	});




$(document).ready(function() {
//ヨコメニューバー
	// hide #back-top first
	$("#back-top").hide();
	
	// fade in #back-top
	$(function () {
		$(window).scroll(function () {
			if ($(this).scrollTop() > 600) {
				$('#back-top').fadeIn();
			} else {
				$('#back-top').fadeOut();
			}
		});

		// scroll body to 0px on click
		$('#back-top .totop').click(function () {
			$('body,html').animate({
				scrollTop: 0
			}, 300);
			return false;
		});
	});

//トップスライダー

	$("#slider").easySlider({
		auto: true,
		continuous: true,
		speed: 400,
		pause: 6000, 
		numeric: true
	});


//ブラウザアラート用cookie
	if($.cookie('rehyouji')=="true"){
	document.getElementsByName("rehyouji_chk")[0].checked = true;
	}



});


//ブラウザアラート用
var msie=navigator.appVersion.toLowerCase();
msie=(msie.indexOf('msie')>-1)?parseInt(msie.replace(/.*msie[ ]/,'').match(/^[0-9]+/)):0;

if((msie>7)||(msie==0)) {
}else{
	if($.cookie('rehyouji')!="true"){
	    $(document).ready(function() { 
	    	var t = "";
		var a = "#TB_inline?height=120&width=780&inlineId=myOnPageContent&keepThis=true&modal=true";
		var g = false;
		tb_show(t,a,g);
		return false;
	    })
	}
	document.write('<script defer type="text/javascript" src="/_common_/_js_/pngfix.js"></script>');
}



//フォント置き換え

var os = (navigator.appVersion.indexOf ("Win", 0) != -1) ? "win" : "mac";
document.write ('<link rel="stylesheet" href="/_common_/_css_/font_' + os + '.css" type="text/css" />');


//google  Analytics
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-5348109-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();


