 $(document).ready(function() {
   $("#fulltexttext").click(function() {
     $(this).val('');
   });
   $("#calendarheader").click(function() {
     $("#calendarholder").hide('slow');
   });   
	$("div.scrollable").scrollable({
		vertical:true, 
		size: 1
	}).mousewheel().autoscroll({ 
    autoplay: true, 
    api: false,
    autopause: true
}).circular();   
     
 
 });


  $(function()  
  {  
    var hideDelay = 500;    
    var currentID;  
    var hideTimer = null;  
    


    
    $('.calajax').live('mouseover', function()  
    {  
 

        var settings = $(this).attr('href').split('?');  
        var params = settings[1];  
 
    
    
        if (hideTimer)  
            clearTimeout(hideTimer);  
    
        var pos = $(this).offset();  
        var width = $(this).width();  
        
        $('#calendarPopupContent').css({  
            left: (pos.left + width) + 'px',  
            top: pos.top - 5 + 'px'  
        });  
    
        $('#calendarPopupContent').html('&nbsp;');  
    
        $.ajax({  
            type: 'GET',  
            url: 'eventajax.php',  
            data: params,  
            success: function(data)  
            {  
                //$('#calendarPopupContent').left = e.pageY;
                //$('#calendarPopupContent').top  = e.pageX;
                //alert();
                $('#calendarPopupContent').html(data); 
                $('#calendarPopupContent').show('fast');
            }  
        });  
    
        //container.css('display', 'block');  
    });  
    
    $('.calajax').live('mouseout', function()  
    {  
        if (hideTimer)  
            clearTimeout(hideTimer);  
        hideTimer = setTimeout(function()  
        {  
            $('#calendarPopupContent').hide('fast');  
        }, hideDelay);  
    });  
    
    
    $('#newsletterform').ajaxForm({target:'#newsletterresponse',url:'newsletter.php',success:function(responseText, statusText) { 
        alert(responseText);
        $('#newsletterresponse').show('slow');
    } }); 
    $('#newsletterbutton').live('click', function()  
    {  
        $('#newsletterform').submit();
        
    });    
  });  
