jQuery(document).ready(function(){


setTimeout("reveal()", 2000);
	/*   	if(typeof(window.innerWidth) == 'number'){		width = window.innerWidth;		adjustedWindow = width-569;	} else if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight )){		width = document.documentElement.clientWidth;		adjustedWindow = width-569;	}   	           	jQuery('#window').css({width: adjustedWindow+'px', height: height+26+'px'});	window.onresize = function(){		if(typeof(window.innerWidth) == 'number'){			width = window.innerWidth;			adjustedWindow = width-569;		} else if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight )){			width = document.documentElement.clientWidth;			adjustedWindow = width-569;		}		if(jQuery('#window').hasClass('withtext')){			adjustedWindow = width-305;		} else {			adjustedWindow = width;		}		jQuery('#window, .jspContainer').css({width: adjustedWindow+'px', height: height+26+'px'});		//jQuery('.jspContainer').css('width', adjustedWindow+'px');  	}*/
    			


//jQuery('#scrollbar2').tinyscrollbar({ axis: 'x', size: 389 ,sizethumb: 142});

});    
function reveal(){
var width = window.innerWidth;
var photorollWidth = 0;
var adjustedWindow = width-569;
var height = 500;
 	jQuery('#loading').hide();	jQuery("#scrollbar2 img").fadeIn();
 	jQuery('#scrollbar2 img').each(function(){ 		
			
		jQuery(this).attr('onload','javascript:reveal();');
		var oPhotoHeight = jQuery(this).height();
		var oPhotoWidth = jQuery(this).width();
		var aPhotoWidth = (oPhotoWidth/height)*oPhotoHeight; 
		jQuery(this).css({height: '500px', width: aPhotoWidth});
		photorollWidth = photorollWidth + aPhotoWidth +  3 ;
		jQuery('#scrollbar2 .overview ').css({width: photorollWidth+'px',height: '500px'});
		jQuery('body').css({width: photorollWidth+'px'});
		});
}
