/**
 * script
 * 
 * @category    jQuery plugin
 * @license     http://www.opensource.org/licenses/mit-license.html  MIT License
 * @copyright   2010 RaNa design associates, inc.
 * @author      keisuke YAMAMOTO <keisukey@ranadesign.com>
 * @link        http://kaelab.ranadesign.com/
 * @version     1.0
 * @date        2011
 *
 */
(function($) {

	var phone = /(iPhone)|(iPad)|(iPod)|(Android)/.test(navigator.userAgent);

	$(function() {
		// コンテンツサイズ自動調整
		$("#container").autoHeight({
			headerHeight: $("#header").outerHeight(),
			footerHeight: $("#footer").outerHeight()
		});

		// ページ内遷移
		$("a[href^=#]:not([class$=close])").transfer();
		$("a[href^=#][class$=close]").click(function() { return false; });
		
		// ページトップユミオ
		$("#pagetop").wiggle();
		$(".mod-pagetop").floater({
			agility: 1,
			speed: 2000,
			marginTop: 150,
			marginBottom: 100
		});
		
		// phone
		if (phone) {
			$("header, footer").width($(document).width());
		}
		
		// バックナンバー遷移
		// IE8以下はHTML5要素を扱えないので別処理
		if (!($.browser.msie && $.browser.version < 9)) {
			$(".mod-backnumber a").slidePage();
		}
		
		// ローディング
		$(".mod-loading .loading img").loadingImg();
	});


})(jQuery);

