$(document).ready(function(){
	// events widget handler
	$('#events-widget ul').tabs('#events-widget > div', {
		effect: 'fade', 
		fadeInSpeed: 500, 
		rotate: true
	}).slideshow({
		autoplay:true,
		clickable:false
	});
	
	// other pages list widget script
	$("#other-pages-link").click(function(){
		$("#other-pages").slideDown();
		return false;
	});
	
	$("#other-pages-footer-link").click(function(){
		$("#other-pages").slideDown();
		return false;
	});
	$("#other-pages-close").click(function(){
		$("#other-pages").slideUp();
		return false;
	});
		
	// all overlay links are handled here
	$('.overlay-link').click(function(){
		jQuery.colorbox({href:$(this).attr('href'),inline:true});
		return false;
	});
	
	$('a.external').click(function(){
		window.open(jQuery(this).attr("href"));
		return false;
	});
	
	$('#polecamy').stickyPanel({bottomLimitElement:"footer",
        afterDetachCSSClass: "bannerFloating",});
        
        
	jQuery('a.url').click(function(){
		jQuery.ajax({
			url:'/updateStats/'+$(this).attr('id')+'/'
		});
		window.open($(this).attr('href'));
		return false;
	});
});

