$(document).ready(function() {
	$(".scrollbar").jScrollPane({
		scrollbarWidth: 15,
		showArrows: true
	});
	$(".banners").easySlider({
		auto: true,
		continuous: true,
		loop: true,
		autogeneratePagination: true,
		orientation: 'horizontal',
		pause: 8000,
		easing: 'linear',
		numeric: true,
		numericID: 'controls'
	});
	$("a.single").fancybox();
	$("a#inline").fancybox({
		'hideOnContentClick': false
	});
	$("a.group").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'overlayOpacity':	0.6,
		'overlayColor'	:	'#000',
		'titlePosition'	:	'over'
	});
	$('.rollover').hover(function(){
		var currentImg = $(this).attr('src');
			$(this).attr('src', $(this).attr('hover'));
			$(this).attr('hover', currentImg);}, function() {
		var currentImg = $(this).attr('src');
			$(this).attr('src', $(this).attr('hover'));
			$(this).attr('hover', currentImg);
	});
	$('#newsfeed').rssfeed('http://joeythelips.co.uk/blog/category/joeynews/feed/', {
			limit: 5,
			snippet: false,
			header: false,
			date: false
		  });
		  $('#januarygigs').rssfeed('http://joeythelips.co.uk/blog/category/gig-dates/january/feed/', {
			limit: 10,
			snippet: false,
			header: false,
			date: false
		  });  
		  $('#februarygigs').rssfeed('http://joeythelips.co.uk/blog/category/gig-dates/february/feed/', {
			limit: 10,
			snippet: false,
			header: false,
			date: false
		  });
		  $('#marchgigs').rssfeed('http://joeythelips.co.uk/blog/category/gig-dates/march/feed/', {
			limit: 10,
			snippet: false,
			header: false,
			date: false
		  });  
	$('#gigpress').rssfeed('http://www.joeythelips.co.uk/blog/?feed=gigpress', {
			limit: 5,
			snippet: false,
			header: false,
			date: false
		  });
	$(".youtube").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 680,
			'height'		: 495,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf'
		});
	return false;
	});
/* 
	$("#newsfeed a img").parent().addClass("thickbox");
    $("#newsfeed a img").parent().each(function() {
    	$(this).attr("href", $(this).attr("href") + "?event-only=true&height=300&width=400");
   			});
   		  tb_init('a.thickbox, area.thickbox, input.thickbox'); */
});
