var JQry = jQuery.noConflict();

JQry(document).ready(function() {		
slideShow();

});
function slideShow() {

JQry('#gallery a').css({opacity: 0.0});
JQry('#gallery a:first').css({opacity: 1.0});
JQry('#gallery .caption').css({opacity: 0.7});
JQry('#gallery .caption').css({width: JQry('#gallery a').find('img').css('width')});
JQry('#gallery .content').html(JQry('#gallery a:first').find('img').attr('alt'))
.animate({opacity: 0.7}, 400);
setInterval('gallery()',9000);

}

function gallery() {
	
var current = (JQry('#gallery a.show')?  JQry('#gallery a.show') : JQry('#gallery a:first'));
var next = ((current.next().length) ? ((current.next().hasClass('caption'))? JQry('#gallery a:first') :current.next()) : JQry('#gallery a:first'));	
var caption = next.find('img').attr('rel');	
next.css({opacity: 0.0})
.addClass('show')
.animate({opacity: 1.0}, 1000);
current.animate({opacity: 0.0}, 1000)
.removeClass('show');
JQry('#gallery .content').animate({opacity: 0.0}, { queue:false, duration:0 }).animate({height: '1px'}, { queue:true, duration:300 });	

JQry('#gallery .content').animate({opacity: 0.7},-100 ).animate({height: '50px'},500 );
JQry('#gallery .content').html(caption);


}
