function GetNotifications(jq) 
{
    PetKaboodle.services.notif.GetNotification(ukey, function(a,b,c){NotificationRetrieved(a,b,c,jq);}, FailedNotification);
}

// This is the callback function invoked if the Web service
// succeeded.
// It accepts the result object, the user context, and the 
// calling method name as parameters.
function NotificationRetrieved(n, userContext, methodName, jq)
{
    if (methodName == "GetNotification")
	{
	    if(n != '')
	    {
	        jq('span.NotificationMessage').html(n);
	        TriggerNotification(jq);   
	    }
	}    
}

function TriggerNotification(jq)
{
    jq('span.NotificationMessage').jnotifica({
      margin    : 10,
      position  : 'bottom',
      align     : 'right',
      background: 'purple',
      width     : 400,
      classes   : 'rounded_corners'
    });     
}

// This is the callback function invoked if the Web service
// failed.
// It accepts the error object as a parameter.
function FailedNotification(error)
{
    
}

if (typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded();
