/*
Javascript by electricSnow.co.uk, powered with jquery.com

Please feel free to borrow, steal, abduct, and/or torture the code 
contained in this file. Though you need not give credit to
electricsnow.co.uk, a comment in your source code would help other 
developers.

Stay hungry, Stay foolish.

For more info vist http://jquery.com - New Wave Javascript

*/

$(document).ready(function(){
	$(".box").show();
});


// Lightbox
$(function() {
	$('a[rel*=lightbox]').lightBox();
});

// Tabs
$(function() {
	$('#tabs-news').tabs();
	$('#tabs-results').tabs();
});

// Load
$(document).ready(function(){

	// Cycle
	$('#resultsOverview').cycle({ 
		fx: 		'cover',
		speed:       300, 
		timeout:     5000, 
		pager:      '#resultsNav', 
		pagerEvent: 'mouseover',
		pauseOnPagerHover: true 
	});
	
	$('#news').cycle({ 
		speed:       300, 
		timeout:     10000, 
		pagerEvent: 'mouseover',
		pauseOnPagerHover: true 
	});

	$('#latest_news').cycle({
		speed:       300, 
		timeout:     10000, 
		pagerEvent: 'mouseover',
		pauseOnPagerHover: true 
	});

	// Corner
	$('#resultsNav').corner("12px");
	
	// External Links
	//$("a:not([href*='beta.wilmslowrugby.com/gallery'])a:not([href*='beta.wilmslowrugby.com']):not(.thickbox):not([rel*=lightbox]):not([href*='#'])").bind("click", function(){ return !window.open(this.href); });
	
	$("a[href='#loadGallery']").click(function(){
		$("#gallery").load("/_inc/home-gallery.php");
		alert("gallery reloaded")
		return false;
	});
});