﻿/**
 * init.js
 *
 * 初期設定
 *
 * jquery-1.1.3.1.pack.js
 *   jQuery.noConflict()
 */

//ほかのライブラリとのコンフリクトを避ける
$j = jQuery.noConflict();

//共通JS内で定義する変数、functionはこのオブジェクトにまとめる
KDDI = {
	basepath : '/',
	preloader : {
		loadedImages: [],
		load: function (url){
			var img = this.loadedImages;
			var l = img.length;
			img[l] = new Image();
			img[l].src = url;
		}
	}
};

//サイトカタリスト
var s_target_channel="au_other";

$j(function(){
	//pngfix有効
	$j('.png').pngfix();
});


// 旧ライブラリから引用
// [object - navigator | 020916a]
function isWin () { return (navigator.appVersion.indexOf ("Win") != -1); }
function isMac () { return (navigator.appVersion.indexOf ("Mac") != -1); }
function isIE () { return (navigator.appName.indexOf ("Explorer") != -1); }
function isNS () { return (navigator.appName.indexOf ("Netscape") != -1); }
function isWinIE () { return (isWin () && isIE ()); }
function isWinNS () { return (isWin () && isNS ()); }
function isMacIE () { return (isMac () && isIE ()); }
function isMacNS () { return (isMac () && isNS ()); }
function isW3CDOM () { return (document.getElementById ? true : false); }
function isMSDOM () { return (document.all ? true : false); }
function isNCDOM () { return (document.layers ? true : false); }
function isDOM () { return (isW3CDOM () || isMSDOM () || isNCDOM ()); }

function isWindowClosed (o) { var s = navigator.userAgent; return (!o ? true : ((isWin () && ((s.indexOf ("Gecko") != -1) || (s.indexOf ("MSIE 4") != -1))) ? o.closed : (typeof o.document != "object"))); }

function toOpener (s) { var r = isWindowClosed (window.opener); if (!r) window.opener.location.href = s; return (r); }

function toOpener (s) { if (isWindowClosed (window.opener)) openWindow (s); else window.opener.location.href = s; }

