
var ds1 = new Spry.Data.HTMLDataSet(null, "gallery", {columnNames: ['Thumbnail', 'PictureTitle', 'Artist', 'Price', 'HiRez'], rowSelector: "div.galleryItem", dataSelector: "p"});

Spry.Data.Region.addObserver("slidingGallery", { onPostUpdate:
function()
{
sp = new Spry.Widget.SlidingPanels("slidingGallery");
}});

Spry.Utils.addLoadListener(function() {
	Spry.$$("#detailArea").setAttribute('spry:detailregion', 'ds1');
	Spry.$$("#slidingGallery").setAttribute('spry:region', 'ds1');
	Spry.$$("#panelContents").setAttribute('spry:repeat', 'ds1');
	Spry.$$("#panelContents").setAttribute('spry:setrow', 'ds1');
	Spry.$$("#firstPanel").addEventListener('click', function(e){ sp.showFirstPanel(); return false; }, false);
	Spry.$$("#previousPanel").addEventListener('click', function(e){ sp.showPreviousPanel(); return false; }, false);
	Spry.$$("#nextPanel").addEventListener('click', function(e){ sp.showNextPanel(); return false; }, false);
	Spry.$$("#lastPanel").addEventListener('click', function(e){ sp.showLastPanel(); return false; }, false);

var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
Spry.$$(".thumbnail a").removeAttribute("href");

	Spry.$$("#slidingGallery").setStyle("display:block");
	Spry.$$("#detailArea").setStyle("display:block");
	Spry.$$("#panelNav").setStyle("display:block");


	Spry.Data.initRegions();
});
