// ===========================================

// Common JS

// ===========================================


// fontchanger
// -------------------------------------------

$(document).ready(function() {
    if($.cookie("css")) {
        var C = $.cookie("css");
        $("body").addClass(C);
    }
    $("#fontchanger a").click(function() {
        var C = $(this).attr('rel');

        $("body").removeClass("fs");
        $("body").removeClass("fm");
        $("body").removeClass("fl");

        $("body").addClass(C);
        $.cookie("css",$(this).attr('rel'), {expires: 90, path: '/'});
        return false;
    });
});



// scroll
// -------------------------------------------

$(document).ready(function() {
  $("a[href*='#']").easingScroll({
		easing: "easeOutQuad"
	});
});


// rollover
// -------------------------------------------

$(document).ready(function() {
  $('.over, #global-navi a img, .bnr a img, .sub-bnr a img, form input:image').rollover();
});



// form
// -------------------------------------------

$(document).ready(function() {
    $("form input[type='text'], textarea").focus(function() {
	      $(this).addClass("focus");
    });
    $("form input[type='text'], textarea").blur(function() {
	      $(this).removeClass("focus");
    });

    $(".submit input[type='submit'], .submit input[type='button']").hover(
		function() {
	      $(this).addClass("hover");
    },
		function() {
	      $(this).removeClass("hover");
    });
});



