

// modal
// ----------------------------------------------------------------------- //

function closeBK() {
	$("#bookWindow").fadeOut(300).jqmHide();
}


function openBK(cover) {
//	data_file = "cover/" + cover + "/" + cover + ".dat";
	$("#bookWindow")
    .jqm({
      trigger: false,
//      ajax: data_file,
      onShow: function(h) {
//        h.w.css('opacity',0.99).fadeIn(300); 
        h.w.fadeIn(500); 
//    	$(".jqmWindow .bg").pngfix();
        },
      onHide: function(h) {
        h.w.hide(10,function() { if(h.o) h.o.remove(); });
		} 
      });
	$("#bookWindow").jqmShow();
	html_write(cover);
}



function html_write(cover) {

	html_data = '<div class="bg iepngfix">';
	html_data += '<div class="body">';
	html_data += '<img src="cover/' + cover + '/cover_' + cover + '.jpg" alt="" width="610" height="425" class="bookcover" />';
	html_data += '<div class="foot">';
	html_data += '<img src="img/mes_popup.gif" alt="プリントアウトの際は設定項目の「用紙サイズ内に縮小して印刷する」のチェックをはずし、縮小せずにそのままのサイズで印刷してください。" width="357" height="28" class="mes" />';
	html_data += '<ul class="button">';
	html_data += '<li><a href="cover/' + cover + '/cover_' + cover + '.pdf" target="_blank" onClick="javascript: pageTracker._trackPageview("/downloads/cover/' + cover + '");"><img src="img/btn_download_s.gif" alt="ダウンロード" width="93" height="31" /></a></li>';
	html_data += '<li><a href="#" onclick="closeBK(); return false;"><img src="img/btn_close.gif" alt="閉じる" width="93" height="31" /></a></li>';
	html_data += '</ul>';
	html_data += '</div>';
	html_data += '</div>';
	html_data += '</div>';

	$("#bookWindow").html(html_data);

}



// png fix
// ----------------------------------------------------------------------- //

$(function(){
     $("#mv img").pngfix();
//     $(".jqmWindow .bg").pngfix();
});

