// Generated by CoffeeScript 1.8.0
(function() {
  $(function() {
	  $(".toast").hide();
	  localStorage.clear();
	  var meetingId=GetQueryString("meetingId");
	  $.ajax({
		  url: baseUrl + '/api/meeting/find_detail.do',
          data:{meetingId:meetingId} ,
          beforeSend: function() {
              return toast.show();
            },
          success: function(data) {
            if (data.status === 200) {
            	toast.hide();
            	meeting=data.data.meeting;
            	$(".imgcss")[0].src=meeting.mthumbnail;
            	var _wh = $(window).height();
            	$('.imgcss').each(function(i){		
            		var img = $(this);	
            		var realHeight;	
            		$("<img/>").attr("src", $(img).attr("src")).load(function() {			
            			realHeight = img.height();
            			var _menuh = _wh - 45 - realHeight;	
            	        $('.menulist').find('li').css('height',_menuh/3 - 1);
            		});
            	});
            	if(meeting.title.length>18){
            		$("#text").html(meeting.title.substr(0,18)+"...");
            	}else{
            		$("#text").html(meeting.title);
            	}
            	$("#regist")[0].href="./meetingRegist.html?id="+meeting.meetingId;
            	$("#intro").on("tap",function(){
            		localStorage.setItem("page", meeting.description);
            	});
            	$("#agenda").on("tap",function(){
            		localStorage.setItem("page", meeting.agenda);
            	});
            	$("#guest").on("tap",function(){
            		localStorage.setItem("page", meeting.guest);
            	});
            	$("#map").on("tap",function(){
            		localStorage.setItem("page", meeting.addressInfo);
            	});
            }else{
          	  wrongMsg(data.message);
            }
          }
	  });
  });
    
}).call(this);
