/*
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
dojo._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.image.Gallery"],["require","dojo.fx"],["require","dijit._Widget"],["require","dijit._Templated"],["require","dojox.image.ThumbnailPicker"],["require","dojox.image.SlideShow"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.image.Gallery"]){_4._hasResource["dojox.image.Gallery"]=true;_4.provide("dojox.image.Gallery");_4.experimental("dojox.image.Gallery");_4.require("dojo.fx");_4.require("dijit._Widget");_4.require("dijit._Templated");_4.require("dojox.image.ThumbnailPicker");_4.require("dojox.image.SlideShow");_4.declare("dojox.image.Gallery",[_5._Widget,_5._Templated],{imageHeight:375,imageWidth:500,pageSize:_6.image.SlideShow.prototype.pageSize,autoLoad:true,linkAttr:"link",imageThumbAttr:"imageUrlThumb",imageLargeAttr:"imageUrl",titleAttr:"title",slideshowInterval:3,templateString:_4.cache("dojox.image","resources/Gallery.html","
\n"),postCreate:function(){this.widgetid=this.id;this.inherited(arguments);this.thumbPicker=new _6.image.ThumbnailPicker({linkAttr:this.linkAttr,imageLargeAttr:this.imageLargeAttr,imageThumbAttr:this.imageThumbAttr,titleAttr:this.titleAttr,useLoadNotifier:true,size:this.imageWidth},this.thumbPickerNode);this.slideShow=new _6.image.SlideShow({imageHeight:this.imageHeight,imageWidth:this.imageWidth,autoLoad:this.autoLoad,linkAttr:this.linkAttr,imageLargeAttr:this.imageLargeAttr,titleAttr:this.titleAttr,slideshowInterval:this.slideshowInterval,pageSize:this.pageSize},this.slideShowNode);var _7=this;_4.subscribe(this.slideShow.getShowTopicName(),function(_8){_7.thumbPicker._showThumbs(_8.index);});_4.subscribe(this.thumbPicker.getClickTopicName(),function(_9){_7.slideShow.showImage(_9.index);});_4.subscribe(this.thumbPicker.getShowTopicName(),function(_a){_7.slideShow.moveImageLoadingPointer(_a.index);});_4.subscribe(this.slideShow.getLoadTopicName(),function(_b){_7.thumbPicker.markImageLoaded(_b);});this._centerChildren();},setDataStore:function(_c,_d,_e){this.thumbPicker.setDataStore(_c,_d,_e);this.slideShow.setDataStore(_c,_d,_e);},reset:function(){this.slideShow.reset();this.thumbPicker.reset();},showNextImage:function(_f){this.slideShow.showNextImage();},toggleSlideshow:function(){_4.deprecated("dojox.widget.Gallery.toggleSlideshow is deprecated. Use toggleSlideShow instead.","","2.0");this.toggleSlideShow();},toggleSlideShow:function(){this.slideShow.toggleSlideShow();},showImage:function(_10,_11){this.slideShow.showImage(_10,_11);},resize:function(dim){this.thumbPicker.resize(dim);},_centerChildren:function(){var _12=_4.marginBox(this.thumbPicker.outerNode);var _13=_4.marginBox(this.slideShow.outerNode);var _14=(_12.w-_13.w)/2;if(_14>0){_4.style(this.slideShow.outerNode,"marginLeft",_14+"px");}else{if(_14<0){_4.style(this.thumbPicker.outerNode,"marginLeft",(_14*-1)+"px");}}}});}}};});