
// config viewers
YAHOO.photoViewer.config = {
	viewers: {
		"photoviewer_base" : {
			properties: {
				id: "photoviewer_base",
				grow: 0.6,
				fade: 0.6,
				modal: true,
				dragable: false,
				fixedcenter: true,
				loadFrom: "html",
				position: "absolute",
				xy: [0,0],
				easing: YAHOO.util.Easing.easeBothStrong
			}
		},
		"blackmin" : {
			properties: {
				id: "blackmin",
				grow: 0.6,
				fade: 0.6,
				modal: true,
				dragable: false,
				fixedcenter: true,
				loadFrom: "html",
				position: "absolute",
				xy: [0,0],
				easing: YAHOO.util.Easing.easeBothStrong
			}
		},
		"vanillamin" : {
			properties: {
				id: "vanillamin",
				grow: 0.6,
				fade: 0.6,
				modal: true,
				dragable: false,
				fixedcenter: true,
				loadFrom: "html",
				position: "absolute",
				xy: [0,0],
				easing: YAHOO.util.Easing.easeBothStrong,
				buttonText: {
					next: " ",
					prev: " ",
					close: "X"
				}
			}
		}
	}
};
YAHOO.photoViewer.skins = function(){
	var skins = ["photoviewer_base","blackmin","vanillamin"];
	var skinPaths = ["yui/extend/photoviewer/build/photoviewer_base.css","yui/extend/photoViewer/assets/skins/blackmin/blackmin.css","yui/extend/photoViewer/assets/skins/vanillamin/vanillamin.css"];
	var public = {
		init: function(){
			var thumbs = null;
			var skin = null;
			for (var a = 0; a < skins.length; a++){
				skin = lib.d.get(skins[a]);
				thumbs = lib.d.getElementsByClassName("photoViewer", "a", skin);
				for (var b = 0; b < thumbs.length; b++){
					thumbs[b].sheet = a;
					lib.e.on(thumbs[b], "mousedown", switchStyle);
				}
			}
		}
	};
	function switchStyle(){
		var sheet = lib.d.get("skinSwitcher");
		sheet.href = skinPaths[this.sheet];
	}
	return public;
}();
lib.e.onDOMReady(YAHOO.photoViewer.skins.init, YAHOO.photoViewer.skins, YAHOO.photoViewer.skins);
