jQuery.noConflict();

jQuery(document).ready(function($){

	tb_init('a.tb');//pass where to apply thickbox
	imgLoader = new Image();// preload image
	imgLoader.src = '/assets/templates/taupovenues/img/loader.gif';

	//$('ul.thumbs').cycle();

	$('#headers-container').cycle();

	// Open external links in a new window
	$('a[href^=http]').each(function(){
		if(this.href.indexOf(location.hostname) == -1) {
			$(this).attr('target', '_blank');
		}
	});

	// Open popups in a popup
	$('a.popup').each(function(){
		$(this).click(function(){
			window.open(this.href, 'popup', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=800,height=500,left=300,top=150');
			return false;
		});
	});

	$('a[href$=".pdf"]')
		.addClass('pdf')
		.attr({
			target: '_blank',
			title: 'Right-click to download this PDF'
		});

	Cufon.replace('h2.ft');
	Cufon.replace('h3.ft');

	window.setInterval(function(){
		$.ajax({
			url: "/util/date/",
			success: function(data) {
				$("#sb-time").html(data);
			}
		});
	}, 20000);

});

