

/* --------------------------------------------------

AndroidApp通信用スクリプト集

-------------------------------------------------- */

/* --------------------------------------------------
	ダウンロードに関する処理
-------------------------------------------------- */
function onClickDownloadButton(id)
{
	try {
		var val = $('#' + id).val();
		// Androidアプリ側メソッドの呼び出し
		JSInterface.download(val);
	} catch(e) { }
}

/* --------------------------------------------------
	購入作品一覧画面の起動
	Web上のメニュー／ボタン等からAndroid側アプリの購入作品一覧画面を
	起動する
-------------------------------------------------- */
function onClickShowContentsList()
{
	try {
		JSInterface.showContentsList();
	} catch(e) { }
}

/* --------------------------------------------------
	ウィンドウを開く
-------------------------------------------------- */
function openNewWindow(url)
{
	try {
		if(url) {
			JSInterface.openNewWindow(url);
		}
	} catch(e) { }
	return false;
}

/* --------------------------------------------------
	ウィンドウを閉じる
-------------------------------------------------- */
function closeWindow()
{
	try {
		JSInterface.closeWindow();
	} catch(e) { }
	return false;
}

/* --------------------------------------------------
	履歴から移動する
-------------------------------------------------- */
function historyGo(step)
{
	try {
		JSInterface.historyGo(step);
	} catch(e) { }
	return false;
}




/* --------------------------------------------------

通常スクリプト集

-------------------------------------------------- */


/* --------------------------------------------------
	ドロップダウンリスト作成
-------------------------------------------------- */
$(function(){
    $("li.dropdown").hover(function(){    
        $(this).addClass("hover");
        $('ul:first',this).css('display', 'block');    
    }, function(){    
        $(this).removeClass("hover");
        $('ul:first',this).css('display', 'none');    
    });    
    $("li.dropdown ul li:has(ul)").find("a:first").append(" &raquo; ");
});
