function slideShow() {
	$('#defaultBg img').css({opacity: 0.0});
	$('#defaultBg img:first').css({opacity: 1.0, display: 'block'});
	$('#defaultBg img.show').css({opacity: 1.0, display: 'block'});
	$('#defaultBg').css({display: 'block'});
	
	jQuery("#defaultBg").ezBgResize();
	jQuery(window).bind("resize", function(){
		jQuery("#defaultBg").ezBgResize();
	});
	
	/*$(document).bind('mousemove',function(e){ 
            $("#defaultBg").text("e.pageX: " + e.pageX + ", e.pageY: " + e.pageY);
	});*/
	
	obj="#defaultBg";
	//setInterval('gallery(obj, 400)',7000);
}

function gallery(obj, speed) {

	speed = speed*3;

	var current = ($(obj+' img.show')?  $(obj+' img.show') : $(obj+' img:first'));
	var next = ((current.next().length) ? ((current.next().hasClass('caption'))? $(obj+' img:first') :current.next()) : $(obj+' img:first'));
	var caption = next.attr('rel');

	next.css({opacity: 0.0});
	next.css({display: 'block'});
	next.animate({opacity: 1.0}, speed);

	current.animate({opacity: 0.0}, speed, function () {
		current.removeClass('show');
		current.css({display: 'none'});
		next.addClass('show');
	});
}

function portfolioScroller(obj, speed, type) {

	var current = ($(obj+' div.show')?  $(obj+' div.show') : $(obj+' div:first'));
	
	if(type == 'down'){
		var next = ((current.next().length) ? ((current.next().hasClass('caption'))? $(obj+' div:first') :current.next()) : $(obj+' div:first'));
	}
	if(type == 'up'){
		var next = ((current.prev().length) ? ((current.prev().hasClass('caption'))? $(obj+' div:last') :current.prev()) : $(obj+' div:last'));
	}
	
	var caption = next.attr('rel');

	next.css({opacity: 0.0});
	next.css({display: 'inline'});
	next.animate({opacity: 1.0}, speed);

	current.animate({opacity: 0.0}, speed, function () {
		current.removeClass('show');
		current.css({display: 'none'});
		next.addClass('show');
	});
	
	/*if(caption){
		$('#footnote').animate({opacity: 0.0}, speed, function () {
			$('#footnote').html(caption);
			$('#footnote').css({display: 'block'});
			$('#footnote').css({opacity: 0.0});
			$('#footnote').animate({opacity: 1.0}, speed);
		});
	}else{
		$('#footnote').animate({opacity: 0.0}, speed, function () {
			$('#footnote').css({display: 'none'});
		});
	}*/
}

