if(Drupal.jsEnabled)$(document).ready(function(){$('div.view-field > a').attr('class','popup');$('a.popup').click(function(a){$('div#calpopup').fadeOut();$('div#calpopup').remove();var div=$('<div id="calpopup"><div id="popup-close"><img id="popup-close-img" src="'+Drupal.settings.jcalendar.path+'/images/cross.png" /></div><div id="calpopup-body"><img src="'+Drupal.settings.jcalendar.path+'/images/throbber.gif" id="popthrobber" /></div></div>').attr('style','display: none');div.appendTo(document.body);var offset=$(this).offset(),offset_left=offset.left+5;if($(window).width()<$('#calpopup').width()+offset.left){offset_left-=$('#calpopup').width()+5;if(offset_left<0)offset_left=0};var offset_top=offset.top+25;if($(window).height()<$('#calpopup').height()+offset_top){offset_top-=$('#calpopup').height()+25;if(offset_top<0)offset_top=0};$('#calpopup').css('left',offset_left);$('#calpopup').css('top',offset_top);$('#calpopup').fadeIn('slow')
function domCallback(msg){$('#calpopup-body').html(msg)};var ids=$(this).parent().parent().attr('class'),arrs=ids.split(" "),arr=arrs[0].split("."),nid=arr[1],id=arr[4];$.ajax({type:"GET",url:Drupal.settings.basePath+"?q=jcalendar/getnode/"+nid+"/"+ids,success:function(msg){domCallback(msg)}});$('img#popup-close-img').click(function(x){$('div#calpopup').fadeOut();$('div#calpopup').remove()});$(document).click(function(y){var $tgt=$(y.target);if(!$tgt.parents().is('div#calpopup')){$('div#calpopup').fadeOut();$('div#calpopup').remove();$(document).unbind("click")}});return false})});

