function slider(){
	if($('.slider').length){
		$('.slider').advancedSlider({width:1000, height:432, 
			effectType:'fade',
			height:432,
			width:1000,
			slideshow:true, 
			slideshowDelay:7000,
			pauseSlideshowOnHover:true,
			htmlDuringTransition:false,
			horizontalSlices: 1, 
			verticalSlices: 1,
			sliceDuration:250,
			captionPosition:'bottom'
		});
	}
};



function previous() {
	slider.previousSlide();
}	

function next() {
	slider.nextSlide();
}	

function onTransitionComplete(obj) {
	
} 
	
$(document).ready(function() {

	$('.lightbox').lightbox();

	if($('.tableClass').length){
		$.ajax({
			url: 'http://www.sportingpulse.com/comp_info.cgi?c=1-1047-0-148315-0&pool=1&round=0&a=LADDER',
			type: 'GET',
			success: function(res) {
				var tableHead = $(res.responseText).find('table.tableClass tbody').html();	
				$('table.tableClass tbody').html(tableHead);
				$('table.tableClass tbody')
					.find('tr:nth-child(1)')
					.remove();
				$('table.tableClass tbody')
					.find('td:nth-child(1)')
					.remove();
				$('table.tableClass tbody')
					.find('td:nth-child(2) a')
					.contents()
					.unwrap()
					.addClass('teamName');
				$('table.tableClass tbody')
					.find('td:nth-child(1)')
					.remove();
				$('table.tableClass tbody')
					.find('td:last-child')
					.remove();			
			}
		});
	}

	$('.blocking-1').h2swf({
		debug : 1,
		alpha : .9,
		blocking : [10, 20, 5, 10],
		background_color : '000000',
		leading : 5,
		tracking : -2,
		color : 'ffffff',
		font_size : 38,
		pad_desc : 0,
		swf : "/flash/h2swf/header.swf",
		height: 'callback',
		width:485,
		prevent_widow:true,
		on_ready_callback: function(){ slider(); }
	});
});

