/**
 * An adapter for the Shadowbox media viewer and the Prototype + Scriptaculous
 * JavaScript framework.
 *
 * This file is part of Shadowbox.
 *
 * Shadowbox is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option)
 * any later version.
 *
 * Shadowbox is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
 * more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Shadowbox.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @author      Michael J. I. Jackson <mjijackson@gmail.com>
 * @copyright   2007 Michael J. I. Jackson
 * @license     http://www.gnu.org/licenses/lgpl-3.0.txt GNU LGPL 3.0
 * @version     SVN: $Id: shadowbox-prototype.js 55 2008-01-29 09:42:41Z mjijackson $
 */if(typeof Prototype=='undefined'){throw'Unable to load Shadowbox, Prototype framework not found.';}
if(typeof Effect=='undefined'){throw'Unable to load Shadowbox, Scriptaculous effects framework not found.';}
var Shadowbox={};Shadowbox.lib={getStyle:function(el,style){return Element.getStyle(el,style);},setStyle:function(el,style,value){if(typeof style!='object'){var temp={};temp[style]=value;style=temp;}
Element.setStyle(el,style);},get:function(el){return $(el);},remove:function(el){Element.remove(el);},getTarget:function(e){return Event.element(e);},preventDefault:function(e){Event.stop(e);},addEvent:function(el,name,handler){Event.observe(el,name,handler);},removeEvent:function(el,name,handler){Event.stopObserving(el,name,handler);},animate:function(el,obj,duration,callback){var o={};for(var p in obj){for(var p in obj){o[p]=String(obj[p].to);if(p!='opacity')o[p]+='px';}}
return new Effect.Morph(el,{afterFinish:callback,duration:duration,style:o});}};
