$(function(){
function ajax_rack_detail(rack_id){
$.post('/store/ajax/ajax_get_rack_data-p.php', {ID :rack_id}, function(h){
$("#data_name").attr('class',h.TStore);
$("#map").html(h.Google_Map);
$("#rack_pic").attr('src',h.Pic_Path);
$("#class_name").html(h.className);
$("#data_name").html(h.Name);
$("#address").html(h.Address);
$("#tel").html(h.Tel);
$("#open").html(h.Open);
$("#rack_content").html(h.Content);
$("div.news").html("").html(h.Rack_Detail);
if(h.Rack_Detail){
$(".news-title").show();
}else{
$(".news-title").hide();
}
if(h.Pic_Path){
$("#rack_pic").show();
}
else{
$("#rack_pic").hide();
}
if(h.Pic_Path2){
$("img.adpic").show().attr('src',h.Pic_Path2);
}
else{
$("img.adpic").hide();
}
}, 'json');
}
$('.item').on('click', '.view_detail', function(event) {
var rack_id = $(this).attr('rack_id');
ajax_rack_detail(rack_id);
});
});
var clickbutton=0;
$('.open-time').on('click',function(){
clickbutton++;
if(clickbutton==1){
$(this).addClass('open');
}
if(clickbutton==2){
$(this).removeClass('open');
clickbutton=0;
}
});