
jQuery(document).ready(function() {
	if(jQuery.cookie("css")) {
		jQuery("link#js_fontStyle").attr("href",jQuery.cookie("css"));
	}

	jQuery("#fontSize a").click(function() {
        jQuery("link#js_fontStyle").attr("href",jQuery(this).attr('rel'));
        jQuery.cookie("css",$(this).attr('rel'), {expires: 365, path: '/'});
        return false;
    });

	jQuery('.lNav > li,.lNav2 > li').hover(
		function(){
			jQuery(this).addClass('lNav_hover');
		},
		function(){
			jQuery(this).removeClass('lNav_hover');
		}
	);

	jQuery('.lNav > li.lNavGrp,.lNav2 > li.lNav2Grp').hover(
		function(){
			jQuery(this).addClass('lNavG_hover');
		},
		function(){
			jQuery(this).removeClass('lNavG_hover');
		}
	);

	RollOver();

	if( jQuery('#socialmedia').size() ){
		var u = encodeURIComponent(location.href);
		var t = encodeURIComponent(document.title);
		jQuery('#sm-tw').click(function(){
			window.open('http://twitter.com/?status='+t+'%20'+u+'%20%23gnavi','twitter');
			return false;
		});
		jQuery("#sm-fb").click(function(){
			window.open('http://www.facebook.com/sharer.php?u='+u,'facebook');
			return false;
		});
	}

});




/* プリントボタン対応 */


function disableStyle() {
	var link = document.getElementById("js_printStyle");
	link.disabled = false;
	window.print();
	link.disabled = true;
}
window.onload = function() {
	if(document.getElementById("js_printStyle")){
		var link = document.getElementById("js_printStyle");
		link.disabled = true;
		if (document.getElementById("btnPrint")){
			document.getElementById("btnPrint").onclick = disableStyle;
		}
	}
}

