function showinfo(id){ $('.pop_info').css('display','block'); $('.pop_info_content').html('読み込み中...'); $.ajax({ url: address + 'ajax/showinfo/' + id, type: 'GET', dataType: 'html', timeout: 10000, error: function(){ alert('申し訳ありません　エラーが発生しました');}, success: function(res){ $('.pop_info_content').fadeTo(0, 0); $('.pop_info_content').fadeTo("noramal", 1); $('.pop_info_content').html(res);}
});}
function endinfo(){ $('.pop_info').css('display','none');}
function getmorecategory(category, type, page){ $('#getnewqmessage').html('読み込み中...'); $.ajax({ url: address + 'ajax/getmorecategory/' + category + '/' + type + '/' + page, type: 'GET', dataType: 'html', timeout: 10000, error: function(){ alert('申し訳ありません　エラーが発生しました');}, success: function(res){ $('.qline_main').html(res);}
});}
function getmoreq(type, page){ $('#getnewqmessage').html('読み込み中...'); $.ajax({ url: address + 'ajax/getmoreq/' + type + '/' + page, type: 'GET', dataType: 'html', timeout: 10000, error: function(){ alert('申し訳ありません　エラーが発生しました');}, success: function(res){ $('#load_more_qline').html(res);}
});}
function getmorenote(page){ $('#getmorenotemessage').html('読み込み中...'); $.ajax({ url: address + 'ajax/getmorenote/' + page, type: 'GET', dataType: 'html', timeout: 10000, error: function(){ alert('申し訳ありません　エラーが発生しました');}, success: function(res){ $('#noteline_main').html(res);}
});}
function getmorenotecategory(category, page){ $('#getmorenotemessage').html('読み込み中...'); $.ajax({ url: address + 'ajax/getmorenotecategory/' + category + '/' + page, type: 'GET', dataType: 'html', timeout: 10000, error: function(){ alert('申し訳ありません　エラーが発生しました');}, success: function(res){ $('.noteline_main').html(res);}
});}
var lastNozoki = new Array(); function showq(q_id, type){ if(type == null) type = ''; lastNozoki[type + q_id] = $('#' + type + 'nozoki_' + q_id).html(); $('#' + type +'showq_' + q_id).css('display', 'block'); $('#' + type + 'nozoki_' + q_id).html('読み込み中...'); $.ajax({ url: address + 'ajax/showq/' + q_id, type: 'GET', dataType: 'html', timeout: 10000, error: function(){ alert('申し訳ありません　エラーが発生しました');}, success: function(res){ $('#' + type + 'showq_' + q_id).html(res); var tag = '<a href= "javascript:void(0)" onClick="delq(' + q_id + ', \'' + type + '\')"><img src="http://nazolab.net/img/aicon-toziru.png"class="nomargin"></a>'; $('#' + type + 'nozoki_' + q_id).html(tag);}
});}
function delq(q_id, type){ $('#' + type +'showq_' + q_id).css('display', 'none'); $('#' + type +'showq_' + q_id).html(''); $('#' + type + 'nozoki_' + q_id).html(lastNozoki[type + q_id]);}
var count = 0; $(document).keydown(function(event){ var key = event.keyCode; if((count == 0 || count == 1) && key == '38') count++; else if((count == 2 || count == 3) && key == '40') count++; else if((count == 4 || count == 6) && key == '37') count++; else if((count == 5 || count == 7) && key == '39') count++; else if(count == 8 && key == '66') count++; else if(count == 9 && key == '65'){ $('#topimg').fadeTo(0, 0); $('#topimg').fadeTo("slow", 1); $('#topimg').attr('src', '/img/special.jpg'); count = 0;}else{ count = 0;}
}); 
