$.fn.clearQueue = $.fn.unpause = function(type) {
	return this.each(function(){
		type = type || "fx";
		if(this.queue && this.queue[type]) {
			this.queue[type].length = 0;
		}
	});
};

$.fn.pause = function(milli,type) {
	milli = milli || 1000;
	type = type || "fx";
	return this.queue(type,function(){
		var self = this;
		var x=setTimeout(function(){
			$.dequeue(self);
		},milli);
	});
};

function tick(id){
	$.getJSON("/scripts/ajax/ticker.asp?not="+id, 
		function(json){
			$("#ticker").hide().html(json.ticker[0].text).slideDown("slow");
			t=setTimeout("tick("+json.ticker[0].id+")",10000);
		});
}

$(document).ready(function(){

	t=setTimeout("tick()",1);
	
	$("img.popup").each(function(i){$(this).wrap('<a class="thickbox" title="'+this.alt+'" href="'+this.src.replace('lores','hires')+'"><'+'/a>');});
	
	
});
