if(!window.console)
{
	console = {};
	console.log = function(){};}


Gallery = {};

(function(app) {

	app.init = function()
	{
		$('#images img').each(function(i) {
			if(i > 0)
				$(this).hide(0);
		});
		
		$('#thumbs img').each(function(i) {
			$(this).data('index', i).click(app.thumbClickHandler);
		});
	}
	
	app.thumbClickHandler = function()
	{
		var thumb = this;
		$('#images img').each(function(i) {
			if($(thumb).data('index') == i)
				$(this).show(0);
			else
				$(this).hide(0);			
		});
	}

})(Gallery);

$(document).ready(function(){Gallery.init();});